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

archlinux: package tools for fetching dom0 updates #549

Merged
merged 6 commits into from
Jan 26, 2025
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
31 changes: 29 additions & 2 deletions archlinux/PKGBUILD.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Frédéric Pierret (fepitre) <[email protected]>

pkgname=(qubes-vm-core qubes-vm-networking qubes-vm-keyring qubes-vm-passwordless-root)
pkgname=(qubes-vm-core qubes-vm-networking qubes-vm-keyring qubes-vm-passwordless-root qubes-vm-dom0-updates)
pkgver=@VERSION@
pkgrel=@REL@
pkgdesc="The Qubes core files for installation inside a Qubes VM."
Expand Down Expand Up @@ -38,7 +38,7 @@ build() {
sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock

for dir in qubes-rpc misc; do
make -C "$dir"
make -C "$dir" VERSION=${pkgver}
done
}

Expand Down Expand Up @@ -153,6 +153,7 @@ package_qubes-vm-networking() {
python
iproute2
networkmanager
network-manager-applet
tinyproxy
nftables
conntrack-tools
Expand Down Expand Up @@ -204,3 +205,29 @@ package_qubes-vm-passwordless-root() {
USER_DROPIN_DIR=/usr/lib/systemd/user \
DIST=archlinux
}

package_qubes-vm-dom0-updates() {
pkgdesc="Qubes OS tools for fetching dom0 updates"
depends=(
qubes-vm-core
qubes-vm-networking
python
dnf
)

cd "${_pkgnvr}"
make -C package-managers install \
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

# already included in the main package
rm -f "${pkgdir}/usr/lib/qubes/upgrades-installed-check"
rm -f "${pkgdir}/usr/lib/qubes/upgrades-status-notify"
# not relevant for dom0 updates
rm -f "${pkgdir}/usr/lib/environment.d/60-gnome-software-fix.conf"
}
6 changes: 3 additions & 3 deletions package-managers/qubes-download-dom0-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ fi
if type dnf >/dev/null 2>&1; then
UPDATE_CMD=dnf
UPDATE_ARGUMENTS+=(--noplugins -y)
"$UPDATE_CMD" "$UPDATE_ACTION" --help | grep -q best && UPDATE_ARGUMENTS+=(--best)
"$UPDATE_CMD" "$UPDATE_ACTION" --help | grep -q allowerasing && UPDATE_ARGUMENTS+=(--allowerasing)
"$UPDATE_CMD" "${OPTS[@]}" "$UPDATE_ACTION" --help | grep -q best && UPDATE_ARGUMENTS+=(--best)
"$UPDATE_CMD" "${OPTS[@]}" "$UPDATE_ACTION" --help | grep -q allowerasing && UPDATE_ARGUMENTS+=(--allowerasing)
if "$UPDATE_CMD" --version | grep -q dnf5 && [ "$CHECK_ONLY" = "1" ]; then
UPDATE_ACTION=check-upgrade
fi
Expand Down Expand Up @@ -151,7 +151,7 @@ UPDATE_COMMAND=(fakeroot "$UPDATE_CMD" "$UPDATE_ACTION" "${UPDATE_ARGUMENTS[@]}"
# search, info and similar actions if --downloadonly is specified. The below
# condition is a smart way to check if --downloadonly option is applicable to
# the action.
"$UPDATE_CMD" "$UPDATE_ACTION" --help | grep -q downloadonly && UPDATE_COMMAND+=(--downloadonly)
"$UPDATE_CMD" "${OPTS[@]}" "$UPDATE_ACTION" --help | grep -q downloadonly && UPDATE_COMMAND+=(--downloadonly)

mkdir -p "$DOM0_UPDATES_DIR/packages"

Expand Down
1 change: 1 addition & 0 deletions qubes-rpc/post-install.d/10-qubes-core-agent-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ qvm-features-request qubes-agent-version="$qubes_version"
if [ -r /etc/os-release ]; then
distro_like=""
eol=""
version=""
while IFS='=' read -r key val; do
val="${val##[\"\']}"
val="${val%%[\"\']}"
Expand Down
2 changes: 2 additions & 0 deletions vm-systemd/75-qubes-vm.preset
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ enable module-load-dummy-psu.service
enable module-load-dummy-backlight.service
enable [email protected] default sys-usb
enable dev-xvdc1-swap.service
enable NetworkManager.service
enable NetworkManager-dispatcher.service

# Disable useless Xen services in Qubes VM
disable xenstored.service
Expand Down