-
Notifications
You must be signed in to change notification settings - Fork 100
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 Some Lint Issues for Debian-based Images #821
Conversation
This fixes DL3027 (https://github.com/hadolint/hadolint/wiki/DL3027). That surfaces DL3088 (https://github.com/hadolint/hadolint/wiki/DL3008), which this change adds to the ignore file for now. Along the way, it also fixes DL3009 (https://github.com/hadolint/hadolint/wiki/DL3009) and DL3059 (https://github.com/hadolint/hadolint/wiki/DL3059) for the Debian-based images. Signed-off-by: Shawn Wilsher <[email protected]>
✅ Deploy Preview for kairos-io canceled.
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #821 +/- ##
=======================================
Coverage 21.60% 21.60%
=======================================
Files 21 21
Lines 1523 1523
=======================================
Hits 329 329
Misses 1142 1142
Partials 52 52 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This isn't ready yet. It looks like we were depending on some of the recommended packages that are now not installed since one of the lint rules wants us to pass |
Signed-off-by: Shawn Wilsher <[email protected]>
Signed-off-by: Shawn Wilsher <[email protected]>
This isn't used by `systemd-networkd`, so there is no value in modifying the file. Signed-off-by: Shawn Wilsher <[email protected]>
This is used by dracut in ubuntu images (fatally), and debian images (gracefully falls back to `gzip`). This was a previously recommended package that was no longer being installed. Signed-off-by: Shawn Wilsher <[email protected]>
I'm not really sure what's going on with that Ubuntu failure, nor how to reproduce it. Guidance would be appreciated! |
hey @sdwilsh thanks 💯, this is looking really nice! at a glance doesn't look related, but on the other hand never saw it before, so it doesn't look a typical flaky test, I'll try retriggering and see if it's consistent. |
Pointed out by @c0ffee, this is handled automatically now. Signed-off-by: Shawn Wilsher <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
…lsh:debian-hadolint-fixes Signed-off-by: Shawn Wilsher <[email protected]>
Adding some additional rigor to this, since @c0ffee had asked if this was parity with what we had before. The short answer is no. I grabbed the list of packages that were installed on master (9b34a0b) and with this fix (9a99177), and dumped them in this gist: https://gist.github.com/sdwilsh/4730c01787bf285f19d2dad98d0471cd debianMissingExpand for full list of 123 packages
Added
ubuntuMissingExpand for the full list of 106 packagesubuntu-20-ltsMissingExpand for the full list of 99 packages
AddedExpand for the full list of 8 packages
ubuntu-22-ltsMissingExpand for the full list of 102 packages
|
In the logs for debian images, `dracut` provides this warning: ``` dracut: *** Creating image file '/boot/initrd-6.1.0-3-amd64' *** dracut: Cannot execute compression command 'xz', falling back to default dracut: Using auto-determined compression method 'pigz' ``` This change adds `xz-utils` to debian images so that it can use `xz` compression. This was first discovered during the work in kairos-io#821. Signed-off-by: Shawn Wilsher <[email protected]>
This file is not used by `systemd-networkd`, but these images enable `systemd-networkd`. This change removes the `RUN` commands since the file should be unused. This was originally identified in kairos-io#821. Signed-off-by: Shawn Wilsher <[email protected]>
I pulled out two of the safer changes that won't have merge conflicts into their own PRs. We should talk about what we want to do about the missing packages before we merge this. Some of those on this list we probably don't want to include, but some of them we might want to still! |
`xz` Compress initrd Image In the logs for debian images, `dracut` provides this warning: ``` dracut: *** Creating image file '/boot/initrd-6.1.0-3-amd64' *** dracut: Cannot execute compression command 'xz', falling back to default dracut: Using auto-determined compression method 'pigz' ``` This change adds `xz-utils` to debian images so that it can use `xz` compression. This was first discovered during the work in #821. Signed-off-by: Shawn Wilsher <[email protected]>
Remove `RUN` commands that change `/etc/network/interfaces` This file is not used by `systemd-networkd`, but these images enable `systemd-networkd`. This change removes the `RUN` commands since the file should be unused. This was originally identified in #821. Signed-off-by: Shawn Wilsher <[email protected]>
…dolint-fixes Signed-off-by: Shawn Wilsher <[email protected]>
bc4dd6c
to
7281432
Compare
I'll try to look into this more tomorrow. |
…dolint-fixes Signed-off-by: Shawn Wilsher <[email protected]>
I'm having some issues trying to build the ISO so I can see what is going on locally for Am I using the right command to build this locally? It seems like I shouldn't have a dependency problem because the project uses Earthly, but that kinda looks like what I'm hitting, alas. |
…lsh:debian-hadolint-fixes Signed-off-by: Shawn Wilsher <[email protected]>
Signed-off-by: Shawn Wilsher <[email protected]>
f2fe0cf
to
e6247cc
Compare
Signed-off-by: Shawn Wilsher <[email protected]>
Signed-off-by: Shawn Wilsher <[email protected]>
Signed-off-by: Shawn Wilsher <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup, thank you!
In kairos-io#821 a number of packages were expliciatly added that were previously installed automatically. This change removes some of the more obvious ones that we should not need to install manually. Signed-off-by: Shawn Wilsher <[email protected]>
[ubuntu] Remove some packages that should not be needed In #821 a number of packages were expliciatly added that were previously installed automatically. This change removes some of the more obvious ones that we should not need to install manually. Signed-off-by: Shawn Wilsher <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
* added initial Dockerfile for ubuntu-arm-rpi flavor Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * added Dockerfiles for the other ubuntu arm rpi flavors Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * added overlay files for ubuntu-arm-rpi Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * propagate new flavor ubuntu-arm-rpi through repo Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * propagate ubuntu-20-lts-arm-rpi and ubuntu-22-lts-arm-rpi through the repo Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * ubuntu-20-lts-arm-rpi: use the correct firmware package Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * use dracut-network-legacy-compat for all ubuntu lts flavors Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * one package per line for rpi ubuntu dockerfiles Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * some cosmetic changes on the rpi dockefiles Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * removed unnecessary network interface files from dockerfile Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * hadolint: ignore apt pinned version and missing no-install-recommend for now Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * added explicit systemd-timesyncd to rpi dockerfiles Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * removed more unneeded apt-get clean from dockerfiles Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * minor name corrections and removing commented out stuff Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> * Change sizes for rpi ubuntu images Signed-off-by: Mauro Morales <[email protected]> * Lint Signed-off-by: Mauro Morales <[email protected]> * This was fixed on #821 Signed-off-by: Mauro Morales <[email protected]> * Keep use of cos instead of kairos in bootargs.cfg Signed-off-by: Mauro Morales <[email protected]> * Add ports to RPi Docker images Signed-off-by: Mauro Morales <[email protected]> * Force platform arm64 on all-arm target Signed-off-by: Mauro Morales <[email protected]> * Use model to generate the generic ubuntu arm image Signed-off-by: Mauro Morales <[email protected]> * lint and apply changes to other ubuntu versions Signed-off-by: Mauro Morales <[email protected]> * force platform and model for all-arm fix issues with ubuntu 20 lts arm rpi remove unnecessary dockerfile Signed-off-by: Mauro Morales <[email protected]> * Add missing reference in dockerfiles Signed-off-by: Mauro Morales <[email protected]> * Increment trivy timeout Signed-off-by: Mauro Morales <[email protected]> * Update packages for 20.04 Signed-off-by: Mauro Morales <[email protected]> * Remove dl3015 Signed-off-by: Mauro Morales <[email protected]> * Fix issue with ubuntu arm rpi overlay files Signed-off-by: Mauro Morales <[email protected]> * Refactor overlay files for rpi Signed-off-by: Mauro Morales <[email protected]> * Part of last commit Signed-off-by: Mauro Morales <[email protected]> * Pass model to framework Signed-off-by: Mauro Morales <[email protected]> * No need to have a different persistency config for the rpi Signed-off-by: Mauro Morales <[email protected]> * Disable rpi-eeprom-update Signed-off-by: Mauro Morales <[email protected]> * review feedback Signed-off-by: Mauro Morales <[email protected]> --------- Signed-off-by: Martin Schuessler <[email protected]> Signed-off-by: Mauro Morales <[email protected]> Co-authored-by: Martin Schuessler <[email protected]>
What this PR does / why we need it:
This fixes DL3027. That surfaces DL3088, which this change adds to the ignore file for now.
Along the way, it also fixes DL3009 and partially fixes DL3059 for the Debian-based images.