This is a safe guard check, as otherwise DAB might end up putting the
wrong 'init' executable in the final image, like it happened for
Ubuntu 24.04 before the fixing commit d2e70cf ("explicitly add
systemd-syv to required packages for systemd based releases").
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This fixes template creations for some newer releases that do not have
the `init` meta package as "required" priority anymore, like Ubuntu
24.04.
Without that the /sbin/init did not exist after unpacking the required
packages, which broke DABs assumption it holds when creating a
diversion for the PID 1 init for bootstrap setup.
The order of events went as follows:
1. extract required packages
2. rename init to init.org (but no init exists at this point)
3. copy fake init to init (that works)
4. unpack required packages
5. rename init.org to init (doesn't work, since 2 failed)
6. divert init (still fake init!) to init.distrib
7. copy fake init (again) to init
8. .. install, including now really installing systemd-sysv which
overwrites init
9. remove divert, copying back fake init to init
So, in the end the CT image shipped the very basic DAB init, which was
only intended to be used for during the appliance building process.
Fix this by explicitly adding `systemd-sysv` as required package for
all distros and releases using systemd.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
well in unprivileged ones, but if one has a privileged CT and really
wants those things, they can just unmask those units..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
just added the more straight-forward things, albeit userid mappings
might mess with file owner in the tar assembled at the end?
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the systemd ones won't work on modern cgroupv2 systems anyway and the
other ones are just ancient.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
it should test the local module, not the installed one (the latter also
requires dab to be a build-dependency of itself, which is bad for
bootstrapping).
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
get_target_name will be reused later for adding a dab command to get
the final archive name, to be used for a `make upload` target.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
we should get something better to check though, maybe just systemd
support - we got until 2027 to figure that out though.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
ftp is a thing of the past and only exists for backward compat, use
the modern CDN backed deb.debian.org directly instead.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
note that both, php5 and the affected releases are EOL since years,
but as we do not want to drop the historic releases completely just
yet, restore the task functionality.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
for now only a systemd flag that defaults to true for all but Devuan,
so set it explicitly to false for older Debian/Ubuntu releases
Could be extended in the future to avoid to much coupling on
codenames/versions.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
It depends on x11-apps, x11-session-utils, x11-utils, x11-xkb-utils,
x11-xserver-utils, xauth, xinit which in turn depend on mesa/glx/drm
libraries, all in all accumulating to ~200 MiB of disk space for
stuff that most container applicaitons nowadays won't have any use.
Note that the original reasoning was probably `xauth` for X11 display
redirection, but for that there's a package with the same name that
has a much smaller disk usage footprint overall.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>