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 dracut config to the Debian package too #536

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion archlinux/PKGBUILD.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ package_qubes-vm-core() {

cd "${_pkgnvr}"

install -D -m 0644 -- "boot/grub.qubes" "${pkgdir}/etc/default/grub.qubes"
# shellcheck disable=SC2154
make -C boot DESTDIR="$pkgdir" install
make install-corevm DESTDIR="$pkgdir" SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib SYSTEM_DROPIN_DIR=/usr/lib/systemd/system USER_DROPIN_DIR=/usr/lib/systemd/user DIST=archlinux
make -C app-menu install DESTDIR="$pkgdir" install LIBDIR=/usr/lib SYSLIBDIR=/usr/lib
make -C misc install DESTDIR="$pkgdir" install LIBDIR=/usr/lib SYSLIBDIR=/usr/lib
Expand Down
5 changes: 3 additions & 2 deletions boot/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
LIBDIR ?= /usr/lib
SYSCONFDIR ?= /etc
GRUBCONFDIR ?= $(SYSCONFDIR)/grub.d
GRUBCONFDIR ?= $(SYSCONFDIR)/default
DRACUTCONFDIR ?= $(LIBDIR)/dracut/dracut.conf.d
GRUBCFGNAME ?= grub.qubes

.PHONY: install

install:
install -D -m 0644 grub.qubes $(DESTDIR)$(GRUBCONFDIR)/30_qubes
install -D -m 0644 grub.qubes $(DESTDIR)$(GRUBCONFDIR)/$(GRUBCFGNAME)
install -D -m 0644 dracut-qubes.conf $(DESTDIR)$(DRACUTCONFDIR)/30-qubes.conf
7 changes: 7 additions & 0 deletions boot/dracut-qubes.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ omit_dracutmodules+=" ifcfg qemu-net i18n resume mdraid terminfo crypt lunmask n
# confidential computing is not a Qubes feature). This saves about 5MB (20%) of
# initramfs size.
omit_dracutmodules+=" tpm2-tss "

# Exclude plymouth, as it pulls in a lot of graphical stack, including GPU
# drivers, and none of the boot screen is visible in a qube anyway
omit_dracutmodules+=" plymouth "

# Exclude microcode, as VM cannot load it anyway, saves over 10MB of space
early_microcode="no"
1 change: 1 addition & 0 deletions debian/qubes-core-agent.install
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ usr/bin/qvm-run-vm
usr/bin/qvm-connect-tcp
usr/bin/qvm-sync-clock
usr/lib/environment.d/60-gnome-software-fix.conf
usr/lib/dracut/dracut.conf.d/30-qubes.conf
usr/lib/python3/dist-packages/qubesagent-*.egg-info/*
usr/lib/python3/dist-packages/qubesagent/*
usr/lib/qubes-bind-dirs.d/30_cron.conf
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ override_dh_auto_install:
make -C qubes-rpc/kde install
make -C qubes-rpc/nautilus install
make -C qubes-rpc/thunar install
install -D -m 0644 boot/grub.qubes $(DESTDIR)/etc/default/grub.d/30-qubes.cfg
make -C boot install GRUBCFGNAME=grub.d/30-qubes.cfg

override_dh_fixperms:
dh_fixperms -a -Xqfile-unpacker
Expand Down
4 changes: 1 addition & 3 deletions rpm_spec/core-agent.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ usermod -L root

make install-vm PYTHON=%{__python3} "DESTDIR=$RPM_BUILD_ROOT" SYSTEM_DROPIN_DIR=%{_unitdir} SYSLIBDIR=/usr/lib ENABLE_SELINUX=%with_selinux
make -C app-menu DESTDIR=$RPM_BUILD_ROOT install
make -C boot DESTDIR=$RPM_BUILD_ROOT install
make -C boot/redhat DESTDIR=$RPM_BUILD_ROOT install
make -C config-overrides DESTDIR=$RPM_BUILD_ROOT install
make -C filesystem DESTDIR=$RPM_BUILD_ROOT install
Expand Down Expand Up @@ -520,9 +521,6 @@ sed -i \
$RPM_BUILD_ROOT/etc/yum.repos.d/qubes-*.repo
%endif

install -D -m 0644 boot/dracut-qubes.conf $RPM_BUILD_ROOT/usr/lib/dracut/dracut.conf.d/30-qubes.conf
install -D -m 0644 boot/grub.qubes $RPM_BUILD_ROOT/etc/default/grub.qubes

%if ! %with_sysvinit
rm -rf $RPM_BUILD_ROOT/etc/init.d/qubes-* $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes-core.modules
%endif
Expand Down