Skip to content
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

Fix docker/linux-image.sh script #1405

Merged
merged 5 commits into from
Jan 8, 2024

Conversation

gamma0987
Copy link
Contributor

As promised here's the fixed linux-image.sh script.

As outlined in #1399 this pr fixes:

  • Missing gpg key 8D69674688B6CB36 (Debian Ports Archive Automatic Signing Key (2024) [email protected])
  • The binaries and busybox might also be installed into /usr/bin/ instead of /bin.
  • The kernel modules might also installed into /usr/lib/modules instead of /lib/modules.
  • The kernel modules might be compressed with xz and end with *.ko.xz instead of just *.ko

The first commit adds some vim special files to .gitignore and in the second commit the script was formatted with shfmt with standard settings and some minor issues from shellcheck were fixed.

The third commit fixes the actual issues. Not sure if you wanna keep the first two commits but they made working on this file easier.

Closes #1399

@gamma0987 gamma0987 requested a review from a team as a code owner January 7, 2024 11:21
@Emilgardis
Copy link
Member

Emilgardis commented Jan 7, 2024

/ci try

This is great! You can see the CI run here

@Emilgardis
Copy link
Member

Emilgardis commented Jan 7, 2024

ugh, forgot I havn't fixed the try action yet, it skips the actual build of the images :D

@gamma0987
Copy link
Contributor Author

I was just about to ask if the script is actually running somewhere :)

@Emilgardis
Copy link
Member

Emilgardis commented Jan 7, 2024

@Emilgardis
Copy link
Member

Emilgardis commented Jan 7, 2024

The mips*-musl errors are unrelated, should be fixed with #1407

You can see the latest CI run here https://github.com/cross-rs/cross/actions/runs/7391006735, basically there's no changes

As seen, the ci still fails, but that's because it's during qemu-user, do you think it would make sense to remove qemu-user from powerpc? That would be done here

This comment was marked as outdated.

@gamma0987
Copy link
Contributor Author

basically there's no changes

That's because the ci job didn't pick up the commits and the new linux-image.sh script. I'm not sure what's going wrong but I downloaded the logs of https://github.com/cross-rs/cross/actions/runs/7438545066?pr=1405 and did a grep:

❯ rg 'curl.*2023' .
./try  target (powerpc64-unknown-linux-gnu,ubuntu-latest)/10_Build Docker image.txt
7950:2024-01-07T13:49:01.9909003Z #22 10.43 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./try  target (riscv64gc-unknown-linux-gnu,ubuntu-latest)/10_Build Docker image.txt
7633:2024-01-07T13:49:07.4924205Z #22 11.40 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./20_try  target (powerpc64-unknown-linux-gnu,ubuntu-latest).txt
9265:2024-01-07T13:49:01.9909044Z #22 10.43 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./4_try  target (x86_64-unknown-linux-gnucentos,ubuntu-latest).txt
2457:2024-01-07T13:49:00.4962792Z #14 17.02 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./try  target (aarch64-unknown-linux-gnucentos,ubuntu-latest)/10_Build Docker image.txt
1185:2024-01-07T13:37:26.7686432Z #15 19.64 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./62_try  target (aarch64-unknown-linux-gnucentos,ubuntu-lates.txt
2502:2024-01-07T13:37:26.7686467Z #15 19.64 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./24_try  target (sparc64-unknown-linux-gnu,ubuntu-latest).txt
8965:2024-01-07T13:49:16.5505277Z #22 11.54 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./try  target (x86_64-unknown-linux-gnucentos,ubuntu-latest)/10_Build Docker image.txt
1140:2024-01-07T13:49:00.4962754Z #14 17.02 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./try  target (sparc64-unknown-linux-gnu,ubuntu-latest)/10_Build Docker image.txt
7648:2024-01-07T13:49:16.5505246Z #22 11.54 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./try  target (powerpc-unknown-linux-gnu,ubuntu-latest)/10_Build Docker image.txt
7811:2024-01-07T13:49:18.8106413Z #22 10.77 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./19_try  target (powerpc-unknown-linux-gnu,ubuntu-latest).txt
9122:2024-01-07T13:49:18.8106437Z #22 10.77 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

./22_try  target (riscv64gc-unknown-linux-gnu,ubuntu-latest).txt
8945:2024-01-07T13:49:07.4924240Z #22 11.40 + curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023}.key' -O

If this would have been the new linux-image.sh script this line should include the 2024 key:

curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022,2023,2024}.key' -O

@gamma0987
Copy link
Contributor Author

Looks like the error already happens in the actions/checkout@v3 step

0s
Run actions/checkout@v3
Syncing repository: cross-rs/cross
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/9e0762cf-65f4-49d3-835d-a4d525697544' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/cross/cross
Deleting the contents of '/home/runner/work/cross/cross'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
  /usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
  Switched to a new branch 'main'
  branch 'main' set up to track 'origin/main'.
/usr/bin/git log -[1](https://github.com/cross-rs/cross/actions/runs/7438545066/job/20237413186?pr=1405#step:3:1) --format='%H'
'4da645bc4553fbe6b16df320d7c5c9cc6839dba8'

because it checks out the main branch instead of the pull request.

I've rebased onto the main branch to pick up the latest ci changes from #1406. Maybe that helps...

@Emilgardis
Copy link
Member

hmm, thank you for looking into it @gamma0987, with that information I know what's wrong. I'll fix it

@gamma0987
Copy link
Contributor Author

Sure. Thanks for fixing it

@Emilgardis
Copy link
Member

Emilgardis commented Jan 8, 2024

Now it should work!

/ci try

ehm, when #1408 is merged, did the comment a bit prematurely :)

@Emilgardis
Copy link
Member

Emilgardis commented Jan 8, 2024

Copy link

github-actions bot commented Jan 8, 2024

Diff for comment

@gamma0987
Copy link
Contributor Author

Looks like it worked so far. Any idea why the zig job fails? The riscv64gc-unknown-linux-gnu target doesn't build, too. Since there's something wrong in the linux-image.sh script, I can try fixing it.

@gamma0987
Copy link
Contributor Author

I tried locally and the riscv64gc-unknown-linux-gnu target should build and run now. The zig job doesn't use the linux-image.sh script, so I think this failure is unrelated to the changes of this pr.

Could you please trigger a last test run?

@Emilgardis
Copy link
Member

/ci try

@Emilgardis

This comment was marked as outdated.

@Emilgardis
Copy link
Member

Oops, trying out different ways to represent the data and forgot to remove the command that actually makes the comment :D

Copy link

github-actions bot commented Jan 8, 2024

Diff for comment

Successful Jobs - [✅ aarch64-linux-android](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255526720?pr=1405#step:10:1) - [✅ aarch64-unknown-freebsd](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255526995?pr=1405#step:10:1) - [✅ aarch64-unknown-linux-gnu:centos](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255527216?pr=1405#step:10:1) - [✅ aarch64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255527422?pr=1405#step:10:1) - [✅ aarch64-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255527662?pr=1405#step:10:1) - [✅ arm-linux-androideabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255527896?pr=1405#step:10:1) - [✅ arm-unknown-linux-gnueabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255528080?pr=1405#step:10:1) - [✅ arm-unknown-linux-gnueabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255528269?pr=1405#step:10:1) - [✅ arm-unknown-linux-musleabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255528470?pr=1405#step:10:1) - [✅ armv5te-unknown-linux-gnueabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255528691?pr=1405#step:10:1) - [✅ arm-unknown-linux-musleabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255528913?pr=1405#step:10:1) - [✅ armv5te-unknown-linux-musleabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255529190?pr=1405#step:10:1) - [✅ armv7-linux-androideabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255529408?pr=1405#step:10:1) - [✅ armv7-unknown-linux-gnueabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255529632?pr=1405#step:10:1) - [✅ armv7-unknown-linux-gnueabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255529839?pr=1405#step:10:1) - [✅ armv7-unknown-linux-musleabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255530066?pr=1405#step:10:1) - [✅ armv7-unknown-linux-musleabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255530304?pr=1405#step:10:1) - [✅ cross](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255530537?pr=1405#step:10:1) - [✅ i686-linux-android](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255530756?pr=1405#step:10:1) - [✅ i586-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255530960?pr=1405#step:10:1) - [✅ i586-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255531198?pr=1405#step:10:1) - [✅ i686-pc-windows-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255531419?pr=1405#step:10:1) - [✅ i686-unknown-freebsd](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255531644?pr=1405#step:10:1) - [✅ i686-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255531866?pr=1405#step:10:1) - [✅ i686-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255532095?pr=1405#step:10:1) - [✅ mips64el-unknown-linux-gnuabi64](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255532317?pr=1405#step:10:1) - [✅ mips64-unknown-linux-gnuabi64](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255532740?pr=1405#step:10:1) - [✅ mipsel-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255533153?pr=1405#step:10:1) - [✅ mips-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255533571?pr=1405#step:10:1) - [✅ powerpc64le-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255534010?pr=1405#step:10:1) - [✅ powerpc64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255534288?pr=1405#step:10:1) - [✅ powerpc-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255534540?pr=1405#step:10:1) - [✅ s390x-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255534813?pr=1405#step:10:1) - [✅ sparc64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255535366?pr=1405#step:10:1) - [✅ thumbv6m-none-eabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255535883?pr=1405#step:10:1) - [✅ thumbv7em-none-eabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255536146?pr=1405#step:10:1) - [✅ thumbv7em-none-eabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255536417?pr=1405#step:10:1) - [✅ thumbv7m-none-eabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255536704?pr=1405#step:10:1) - [✅ thumbv7neon-linux-androideabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255536956?pr=1405#step:10:1) - [✅ thumbv7neon-unknown-linux-gnueabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255537210?pr=1405#step:10:1) - [✅ thumbv8m.base-none-eabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255537469?pr=1405#step:10:1) - [✅ thumbv8m.main-none-eabi](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255537759?pr=1405#step:10:1) - [✅ thumbv8m.main-none-eabihf](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255538034?pr=1405#step:10:1) - [✅ wasm32-unknown-emscripten](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255538349?pr=1405#step:10:1) - [✅ x86_64-apple-darwin](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255538669?pr=1405#step:10:1) - [✅ x86_64-linux-android](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255538933?pr=1405#step:10:1) - [✅ x86_64-pc-windows-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255539205?pr=1405#step:10:1) - [✅ x86_64-pc-windows-msvc](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255539455?pr=1405#step:10:1) - [✅ x86_64-unknown-dragonfly](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255540051?pr=1405#step:10:1) - [✅ x86_64-unknown-freebsd](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255540313?pr=1405#step:10:1) - [✅ x86_64-unknown-illumos](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255540648?pr=1405#step:10:1) - [✅ x86_64-unknown-linux-gnu:centos](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255540867?pr=1405#step:10:1) - [✅ x86_64-unknown-linux-gnu](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255541123?pr=1405#step:10:1) - [✅ x86_64-unknown-linux-musl](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255541382?pr=1405#step:10:1) - [✅ x86_64-unknown-netbsd](https://github.com/cross-rs/cross/actions/runs/7446008899/job/20255541647?pr=1405#step:10:1)

@gamma0987
Copy link
Contributor Author

The ci test for riscv64 fails with a linker error unsupported ISA subset 'z'. That's where my knowledge about risc ends. Do you have any idea? If not, I have to leave this to someone else and remove the last commit.

@Emilgardis
Copy link
Member

I think we can keep the commit anyway, we'll make fixes for the remaining targets

@Emilgardis Emilgardis added the CI-powerpc-unknown-linux-gnu Run CI for powerpc-unknown-linux-gnu target label Jan 8, 2024
@Emilgardis Emilgardis added the CI-powerpc64-unknown-linux-gnu Run CI for powerpc64-unknown-linux-gnu target label Jan 8, 2024
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Emilgardis Emilgardis added this pull request to the merge queue Jan 8, 2024
@gamma0987
Copy link
Contributor Author

Sure :)

Merged via the queue into cross-rs:main with commit 5daae4d Jan 8, 2024
23 checks passed
@Emilgardis Emilgardis added this to the v0.3.0 milestone Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-powerpc64-unknown-linux-gnu Run CI for powerpc64-unknown-linux-gnu target CI-powerpc-unknown-linux-gnu Run CI for powerpc-unknown-linux-gnu target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building a custom initrd with the linux-image.sh script of the docker image fails on powerpc64
2 participants