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

Add support for building grml ISOs with zfs #117

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

akorn
Copy link
Contributor

@akorn akorn commented Aug 21, 2022

The ZFS FAI class will, via the instsoft.ZFS hook, install the packages
needed to build the zfs modules, build the zfs modules, then remove the
development packages again to avoid bloating the ISO. The ZFS
package_config now only installs zfsutils-linux so that the iso contains
the userspace zfs tools.

In my tests, the ZFS class now only increases the size of the ISO by about
3MB.

I wanted to rely on apt autoremove to get rid of automatically installed
packages, but for some reason as of 2.5.2 autoremove doesn't actually remove
some of the development packages (e.g. gcc-11) even though they're Priority
optional, marked as auto-installed, and not depended on by anything that
isn't auto-installed.

So, to avoid bloating the ISO with hundreds of MB of development packages,
the instsoft.ZFS script works out which packages it installs and removes
those explicitly, using potentially brittle parsing of apt-get output.
This has been tested to work and should do until a better solution is found.

The `ZFS` FAI class will, via the `instsoft.ZFS` hook, install the packages
needed to build the zfs modules, build the zfs modules, then remove the
development packages again to avoid bloating the ISO. The ZFS
`package_config` now only installs `zfsutils-linux` so that the iso contains
the userspace zfs tools.

In my tests, the ZFS class now only increases the size of the ISO by about
3MB.

I wanted to rely on apt autoremove to get rid of automatically installed
packages, but for some reason as of 2.5.2 autoremove doesn't actually remove
some of the development packages (e.g. gcc-11) even though they're Priority
optional, marked as auto-installed, and not depended on by anything that
isn't auto-installed.

So, to avoid bloating the ISO with hundreds of MB of development packages,
the `instsoft.ZFS` script works out which packages it installs and removes
those explicitly, using potentially brittle parsing of `apt-get` output.
This has been tested to work and should do until a better solution is found.
@mika mika merged commit 12daa74 into grml:master Aug 29, 2022
@mika
Copy link
Member

mika commented Aug 29, 2022

Finally had the chance to give it a try, LGTM - thanks! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants