Skip to content

[pull] main from u-root:main #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 120 commits into
base: main
Choose a base branch
from
Open

[pull] main from u-root:main #119

wants to merge 120 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 13, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Apr 13, 2025
lersek and others added 24 commits April 15, 2025 16:35
cmd.connection() in "netcat.go" rejects SOCKET_TYPE_UNIX when
SSLConfig.Enabled or SSLConfig.VerifyTrust is set.

Therefore, checking for (SSLConfig.Enabled or SSLConfig.VerifyTrust) under
SOCKET_TYPE_UNIX in cmd.setupListener() in "listen.go" can only yield
false. Remove this dead check.

Best viewed with "git show -U5".

Signed-off-by: Laszlo Ersek <[email protected]>
…ource

In a subsequent patch, I'll rewrite SSLOptions.GenerateTLSConfiguration().
So that hunks of the old and the new function not be interleaved in that
patch, move the current code verbatim to a new source file, temporarily.

Best viewed with "git show --no-renames --color-moved=zebra".

Signed-off-by: Laszlo Ersek <[email protected]>
GenerateTLSConfiguration() currently works identically in client mode and
server mode. This is wrong for several reasons:

(1) "--ssl-verify" only makes sense in client mode (neither nmap's ncat,
    nor u-root's netcat, support client authentication in server mode).
    Ignore "-ssl-verify" in server mode. (This is also what nmap's ncat
    does.)

(2) "--ssl-trustfile" only makes sense if "--ssl-verify" is in effect;
    ignore "--ssl-trustfile" otherwise.

(3) "--ssl-cert" and "--ssl-key" are indeed required in server mode, but
    they should be possible to omit in client mode; make them optional in
    client mode.

    Note that, if these options are set in client mode, an interfacing
    *netcat* server still does not authenticate the client; however, a
    *different* SSL server could try to authenticate the client.

(4) "--ssl-servername" only makes sense in client mode; ignore it in
    server mode.

Add 39 unit tests for covering every *path* (not just every branch) in
GenerateTLSConfiguration().

Signed-off-by: Laszlo Ersek <[email protected]>
Enable the netcatVM() helper function to take any number of trailing
"uimage.Modifier" arguments. This is a pure refactoring; no observable
change.

Best viewed with "git show -b -W".

Signed-off-by: Laszlo Ersek <[email protected]>
Demonstrate certificate validation and data transfer.

Signed-off-by: Laszlo Ersek <[email protected]>
Remove unimplemented features.

Signed-off-by: Jens Drenhaus <[email protected]>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.37.0 to 0.38.0.
- [Commits](golang/net@v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.38.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
when context will be cancelled cleanup will be executed in a loop, this
probably never happens because context is context.Background(), but I
think its better to exit function anyway.

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
SMBIOSBase returns base address and size of header. Since SMBIOSBase
might return either base address SMBIOS2 or SMBIO3, we need a way
to distinguish the actual version of SMBIOS.

Introudce a new method to get SMBIO3 header size. This method allows
caller to compare the size of header to figure out the SMBIOS version.

Signed-off-by: Ajan Zhong <[email protected]>
According to EDK2 UPL implementation, SMBIOS3 info can be provided
by device tree info only. Add SMBIOS3 child node in reserved memory
node to provide SMBIOS3 info.

Signed-off-by: Ajan Zhong <[email protected]>
In previous implementation of universalpayload.Load() method, execution
will be handed over to Universal Payload directly. In this case, warning
messages need to be printed inside universalpayload package in case we
succeed to load and boot Universal Payload.

In order to keep universalpayload package without any warning printed,
separate universalpayload.Load() method to Load() and Exec(), then any
warning messages can be retrieved from return value of Load() method,
and print warning messages out of universalpayload package before caller
invokes Exec() method.

Signed-off-by: Ajan Zhong <[email protected]>
Returns any warning message produced during universalpayload package
loading Universal Paylaod binary to kexec, then kexec prints warning
messages.

This logic ensures universalpayload package never prints message when
it succees to load Universal Payload binary.

Signed-off-by: Ajan Zhong <[email protected]>
Add test case to cover constructing SMBIOS3 node in Device Tree.

Signed-off-by: Ajan Zhong <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
CONFIG_NET_CLS_U32=y is necessary for the upcoming "tc" integration test.

Signed-off-by: Laszlo Ersek <[email protected]>
Start using the kernels with CONFIG_NET_CLS_U32=y, from commit
f0e05c3 (".circleci/images: enable the tc-u32 filter type in kernel
configs", 2025-04-25).

(I visited

  https://ghcr.io/u-root/u-root/test-kernel-amd64
  https://ghcr.io/u-root/u-root/test-kernel-arm
  https://ghcr.io/u-root/u-root/test-kernel-arm64

with my browser, and grabbed the digests of the most recently built images
that were tagged as "main".)

Signed-off-by: Laszlo Ersek <[email protected]>
Non-root qdiscs have classes for parents, which are identified by class
IDs, not by flat integers. Fix the qdisc args parser.

Signed-off-by: Laszlo Ersek <[email protected]>
Deduplicate the fmt.Fprintf call.

Signed-off-by: Laszlo Ersek <[email protected]>
The output changes, for example, from

            TestDev2   htb
            TestDev2   sfq
            TestDev2   sfq
            TestDev2   sfq

to

            TestDev2   qdisc htb 1: root
            TestDev2   qdisc sfq 30: parent 1:30
            TestDev2   qdisc sfq 10: parent 1:10
            TestDev2   qdisc sfq 20: parent 1:20

Signed-off-by: Laszlo Ersek <[email protected]>
The output changes, for example, from

            TestDev2   qdisc htb 1: root

to

            TestDev2   qdisc htb 1: root r2q 10 default 0x30 direct_qlen 1000

Signed-off-by: Laszlo Ersek <[email protected]>
binjip978 and others added 30 commits May 29, 2025 11:49
listing all files from /proc/pid/ directory

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
There is no code in this package. The doc.md showing the feature status is outdated. The ip command is located at cmds/core/ip.
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Previously, whenever you ssh into u-root, you'd get gosh as your shell,
regardless of what defaultsh is.

Not sure if it was intentional, but the old code would pick the last
executable in the list of shells, which is invariably gosh.  The code
looked like it might intend to pick bash, then zsh, then gosh.

Either way, just use /bin/sh. (or /bin/rc on Plan 9).

Tested: ssh in, with defaultsh=bash, got bash.
Signed-off-by: Barret Rhoden <[email protected]>
Tested: scp'd a file in and out using openssh's scp
Fixes: #3400
Signed-off-by: Barret Rhoden <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Bumps  and [brace-expansion](https://github.com/juliangruber/brace-expansion). These dependencies needed to be updated together.

Updates `brace-expansion` from 2.0.1 to 2.0.2
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v2.0.1...v2.0.2)

Updates `brace-expansion` from 1.1.11 to 2.0.2
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 2.0.2
  dependency-type: indirect
- dependency-name: brace-expansion
  dependency-version: 2.0.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.7 to 1.6.1.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](cloudflare/circl@v1.3.7...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-version: 1.6.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
after addition of stfp
#3403

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
encoder writer must be closed otherwise sometimes bytes
at the end will be missed

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
this test don't work under root user

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Use time.Duration instead of string, fix documentation, remove parsing
test that are no longer needed, rename files according to other u-root
commands, make verbose false by default to match documentation.

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Andrea Barisani <[email protected]>
Signed-off-by: Andrea Barisani <[email protected]>
Signed-off-by: Andrea Barisani <[email protected]>
Signed-off-by: Siarhiej Siemianczuk <[email protected]>
./date +%j returns 188, and date +%j returns 181,
propagate error from setDate anyway run will call Fatal

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Signed-off-by: Ronald G Minnich <[email protected]>
Since Plan 9 tty control is all file-based, we can
even add tests for Plan 9 functions which run
on linux/*bsd/osx. Right now, mainly Raw is needed,
to support cpu and sidecore commands.

This includes both Plan 9 tests that can run under
Linux, and Plan 9 tests that run only under Plan 9.

They all pass.

Signed-off-by: Ronald G Minnich <[email protected]>
This also provides a better error message:
rminnich@pop-os:~/go/src/github.com/u-root/u-root/cmds/core/ip$ ./ip -6  route  add default
2025/06/25 10:24:56 ip: adding route for <nil>: either Dst.IP, Src.IP or Gw must be set
rminnich@pop-os:~/go/src/github.com/u-root/u-root/cmds/core/ip$ ./ip   route  add default
2025/06/25 10:24:58 ip: adding route for <nil>: either Dst.IP, Src.IP or Gw must be set

before it would just segv.

Signed-off-by: Ronald G Minnich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants