aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* Bump to 2.99.10•••Signed-off-by: Michał Górny <mgorny@gentoo.org> HEADv2.99.10masterMichał Górny2024-11-111-1/+1
* file: Fix zstandard decompress invocation•••Closes: https://github.com/projg2/eclean-kernel/pull/58 Signed-off-by: Michał Górny <mgorny@gentoo.org> Haochen Tong2024-11-111-2/+2
* Bump to 2.99.9•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.9Michał Górny2024-10-271-2/+2
* bootloader: consider GRUB_CFG as location for grub config•••sys-kernel/installkernel[grub] supports setting GRUB_CFG in the environment to update a grub.cfg in a non-standard location. Specifically this is useful with sys-boot/grub[secureboot] where the built grub efi executable loads the grub.cfg from the same directory it is in. Recognize the same environment variable here so we don't accidentally update the wrong config. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/57 Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-10-273-3/+13
* layout/blspec.py: consider bls named after ID from os-release•••OpenRC machines are not guaranteed to have the machine-id Closes: https://github.com/projg2/eclean-kernel/issues/55 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/56 Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-10-271-6/+6
* tox: Add py313•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2024-10-271-1/+1
* test: Add a test for EFI zboot images•••Closes: https://github.com/projg2/eclean-kernel/pull/53 Haochen Tong2024-10-271-0/+24
* file: Support reading EFI zboot imagesHaochen Tong2024-10-271-1/+11
* file: Allow limiting read size in KernelImage.decompress_rawHaochen Tong2024-10-271-12/+12
* Use more considerate language in "no kernels" error•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2024-08-141-1/+2
* Include COPYING in sdist•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2024-07-151-0/+1
* github: Update Python versions•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2024-05-081-2/+2
* Relicense as GPL-2.0+•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2024-05-0824-66/+360
* tox: Remove py38•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2024-05-081-1/+1
* tox.ini: move mypy to main testenv•••this works around a bug in tox.ini where it does not take into account the dependencies of the package Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/51 Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-05-081-2/+3
* *{blspec.py,std.py}: update copyright headers•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-05-084-0/+4
* ecleankernel/layout: do not hardcode os id/name•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-05-085-32/+48
* test: add rEFInd icon files to tests for std and bls•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-05-082-0/+15
* ecleankernel/layout: clean-up rEFInd icon files•••Closes: https://github.com/projg2/eclean-kernel/issues/49 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-05-082-5/+17
* blspec.py: clean-up type 2 (uki) also if no type 1 directory present•••On systems without systemd-boot we might still install and boot UKIs, with e.g. refind, or directly from firmware. On such systems the 'loader' directory (bls type 1) won't be present. Instead we only have the ESP/EFI/Linux directory (bls type 2), which we still want to clean-up. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-05-081-2/+5
* test/test_layout_std.py: add tests for efistub•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/50 Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-04-231-5/+75
* also find std kernels on ESP/EFI/Gentoo•••These kernels are installed by installkernel[efistub] for efi stub booting (not UKI booting, UKIs are in ESP/EFI/Linux) Closes: https://github.com/projg2/eclean-kernel/issues/28 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2024-04-231-44/+54
* Bump to 2.99.7•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.7Michał Górny2023-12-051-1/+1
* Parse UKIs produced by `ukify`•••Closes: https://github.com/projg2/eclean-kernel/issues/46 Signed-off-by: Michał Górny <mgorny@gentoo.org> David Seifert2023-12-052-8/+48
* Fix pyflakes error•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-12-041-1/+1
* layout/blspec.py: also clean-up UKI's with 'gentoo' prefix•••With version 8 installkernel-gentoo gains an optional plugin to install UKIs to the usual location at ${ESP}/EFI/Linux (i.e. BLS type 2 layout). This is useful for boot loaders such as systemd-boot that auto discover UKIs at this location, as well as for EFI stub booting where it is required to have the UKI on the ESP (which is not necessarily mounted at /boot). Because the entry-token that is the usual prefix for these UKIs is specific to systemd and kernel-install (i.e. installkernel-systemd), installkernel-gentoo prefixes the UKIs with 'gentoo' instead. The changes here ensure that eclean- kernel recognizes these UKIs as ours and cleans them up as well. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/45 Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-12-041-5/+9
* tox: Add an upload env•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-08-211-0/+9
* Bump to 2.99.6•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.6Michał Górny2023-08-211-1/+1
* process: Handle missing files in the new logic more reliably•••Use `FileNotFoundError` to handle missing files instead of prefiltering. This has the extra advantage that it also handles missing files (broken symlinks) in file lists. Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-08-212-5/+10
* Use samefile() when checking bootloader kernel paths•••This allows eclean-kernel to correctly identify the kernels used by the bootloader config in the following scenario: 1. LILO says `image=/boot/vmlinuz` 2. `/boot/vmlinuz` is a symlink to `/boot/vmlinuz-X.Y.Z-suffix`, which is the actual kernel. Before this commit, eclean-kernel -ap woulc complain that Note: strangely named used kernel: /boot/vmlinuz and then list `vmlinuz-X.Y.Z-suffix` as one of the kernels to be removed. Boris Staletic2023-08-212-23/+34
* Bump to 2.99.5•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.5Michał Górny2023-07-121-1/+1
* tox: Add py312•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-07-121-1/+1
* blspec: version 1.2.5 in both test layouts•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/39 Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-121-10/+63
* blspec: support same kernel version in both layouts•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-121-9/+19
* kernel: add layout attribute•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-124-14/+19
* blspec: add some ukis to the test spec•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-121-81/+170
* blspec: support the type 2 unified kernel image layout•••Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-121-0/+26
* blspec: move appending of kernel files into its own function•••In preparation of adding support for the uki layout Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-121-18/+33
* blspec: find /boot/loader instead of /boot/entry_token•••/boot/entry_token does not exist if all kernels are installed in the uki layout Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Andrew Ammerlaan2023-07-122-32/+36
* .github: Also disable pypy-3.8•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-211-1/+1
* .github: Remove 3.8 from test matrix•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-211-2/+2
* Bump to 2.99.4•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.4Michał Górny2023-03-211-1/+1
* tox: Disable coverage testing•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-211-12/+1
* Convert to flit_core•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-216-52/+58
* file: Support reading EFI stub images•••Based on the work of ajak which in turn was based on earlier work of Jannik2099. Closes: https://github.com/projg2/eclean-kernel/pull/33 Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-212-2/+87
* file: Use auto-rewinding decorator•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-211-11/+24
* file: Refactor kernel reading to use a loop over methods•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-201-4/+7
* file: Use relative seeks when reading the kernel file•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-201-3/+3
* cli: Add --read-kernel-version action•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-201-0/+10
* .github: Add FUNDING•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-201-0/+2
* file: Split version reading into separate methods•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-03-201-38/+54
* CI: add Python 3.12 alphas•••Closes: https://github.com/projg2/eclean-kernel/pull/36 Signed-off-by: Sam James <sam@gentoo.org> Sam James2023-03-201-1/+1
* CI: fix Python 3.11 job•••Signed-off-by: Sam James <sam@gentoo.org> Sam James2023-03-201-1/+1
* blspec: Support /etc/kernel/entry-token•••Thanks to @MeisterP for the report. Closes: https://github.com/projg2/eclean-kernel/issues/35 Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-02-282-24/+42
* blspec: Add a debug log for unrecognized kernel image•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2023-02-281-3/+5
* add github actions to run tox suite•••Signed-off-by: John Helmert III <ajak@gentoo.org> Closes: https://github.com/projg2/eclean-kernel/pull/34 Signed-off-by: Michał Górny <mgorny@gentoo.org> John Helmert III2022-12-021-0/+36
* tox.ini: drop <py38, add py311,pypy3•••Signed-off-by: John Helmert III <ajak@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> John Helmert III2022-12-021-1/+1
* Fix decompression errors for LZMA-compressed kernels•••Closes: https://github.com/mgorny/eclean-kernel/pull/30 Signed-off-by: Michał Górny <mgorny@gentoo.org> natanhp2022-03-171-2/+7
* Improve the exception message for missing decompressor•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2021-08-201-3/+3
* test: Mock missing decompressor test to work w/ python-lzo installed•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2021-08-201-4/+5
* Bump to 2.99.3•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.3Michał Górny2021-08-101-2/+2
* tox: Add py310•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2021-08-101-1/+1
* use zstd stream reader since image may not have content size header•••Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com> Closes: https://github.com/mgorny/eclean-kernel/pull/12 Signed-off-by: Michał Górny <mgorny@gentoo.org> Jannik Glückert2021-08-101-1/+8
* Fix missing bracket in output•••Closes: https://github.com/mgorny/eclean-kernel/pull/20 Signed-off-by: Michał Górny <mgorny@gentoo.org> Pavel Kulyov2021-08-101-1/+1
* Perform layout and bootloader detection _after_ mounting /boot•••Currently, layout and bootloader detection happens _before_ /boot is automounted, resulting in failure to detect anything. Closes: https://github.com/mgorny/eclean-kernel/pull/18 Signed-off-by: Michał Górny <mgorny@gentoo.org> Elvis Pranskevichus2021-05-271-27/+27
* Fix --no-mount logic inversion•••The `--no-mount` argument uses `store_false` which implies `True` as the default, making `--no-mount` the default behavior, which doesn't seem to be the actual intent (otherwise the option should be renamed to `--mount`). Closes: https://github.com/mgorny/eclean-kernel/pull/17 Signed-off-by: Michał Górny <mgorny@gentoo.org> Elvis Pranskevichus2021-05-271-1/+1
* blspec: Add /boot/efi and /efi as potential EFI directories•••According to https://systemd.io/BOOT_LOADER_SPECIFICATION/ the placeholder file system $BOOT should be mounted on /boot or /efi. Additional locations like /boot/efi might also be supported. This is also what systemd's /usr/bin/kernel-install bash script currently supports. Bug: https://github.com/mgorny/eclean-kernel/issues/2 Signed-off-by: Florian Schmaus <flo@geekplace.eu> Closes: https://github.com/mgorny/eclean-kernel/pull/14 Signed-off-by: Michał Górny <mgorny@gentoo.org> Florian Schmaus2021-04-071-1/+1
* add support for non-bzImage kernels•••Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com> Closes: https://github.com/mgorny/eclean-kernel/pull/10 Signed-off-by: Michał Górny <mgorny@gentoo.org> Jannik Glückert2020-10-264-15/+154
* Bump to 2.99.2•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.2Michał Górny2020-09-221-1/+1
* Fix GRUB2._autogen AttributeError•••GRUB2._autogen should and can be determined on initialization, rather than when retrieving the list of kernels (which may or may not happen before the attribute is accessed). Signed-off-by: Konstantinos Smanis <konstantinos.smanis@gmail.com> Closes: https://github.com/mgorny/eclean-kernel/pull/6 Signed-off-by: Michał Górny <mgorny@gentoo.org> Konstantinos Smanis2020-09-221-2/+4
* Fix incorrect grub-mkconfig fallback logic•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-06-301-2/+2
* Enable testing on py3.9•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-281-1/+1
* Add a test for ignoring .sig file•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-261-0/+1
* Ignore *.sig files•••Closes: https://github.com/mgorny/eclean-kernel/pull/4 Skruppy2020-05-261-1/+2
* Refactor Layout to do root and checks in __init__()•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-256-85/+72
* Add explicit has_postrm() method for bootloader•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-253-3/+13
* Create an abstract class for bootloaders•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-257-23/+35
* Add debug for class choices•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-251-1/+4
* Move bootloader loop into __main__•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-252-29/+24
* grub2: Be more flexible about autogen header•••Bug: https://bugs.gentoo.org/721834 Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-241-1/+1
* Bump to 2.99.1•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.1Michał Górny2020-05-241-1/+1
* Fix --no-mount argument•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-241-1/+1
* Fix entry point•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-241-1/+1
* Bump to 2.99.0•••Signed-off-by: Michał Górny <mgorny@gentoo.org> v2.99.0Michał Górny2020-05-241-1/+1
* Fix config file handling and add tests•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-243-2/+49
* Test for layout mismatches•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-243-1/+18
* Update README•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-241-28/+18
* Explicitly distinguish files and directories•••Use explicit GenericDirectory class for directories. Invoke unlink() for files and rmtree() for directories, so that we raise an exception instead of silently removing stuff when things go wrong. Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-242-7/+24
* Clean up empty dirs in blspec layout•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-243-22/+76
* Abstract away file removal•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-242-5/+16
* Verify that correct directories are removed•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-242-0/+19
* Add a legend•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-241-1/+10
* Improve typing•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-2417-82/+119
* Modernize strings and exceptions•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-246-42/+34
* Add options to disable kernel-install and postrm•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-241-16/+28
* Remove wrong comment wrt kernel-install•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-231-2/+0
* Add main() tests for bootloader spec layout•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-231-12/+177
* Run prerm/postrm only for root==/•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-231-14/+17
* Add main() tests for std layout•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-232-14/+196
* Support --root argument•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-05-232-3/+12