Skip to content

Commit 526ea60

Browse files
committed
Always update dom0 dnf.conf even if it is deleted
Also drop yum. It is not used anymore
1 parent b479add commit 526ea60

File tree

4 files changed

+39
-88
lines changed

4 files changed

+39
-88
lines changed

dom0-updates/patch-dnf-config

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
#
3+
# The Qubes OS Project, http://www.qubes-os.org
4+
#
5+
# Copyright (C) 2025 Marek Marczykowski-Górecki
6+
7+
#
8+
# This program is free software; you can redistribute it and/or
9+
# modify it under the terms of the GNU General Public License
10+
# as published by the Free Software Foundation; either version 2
11+
# of the License, or (at your option) any later version.
12+
#
13+
# This program is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
# GNU General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU General Public License
19+
# along with this program; if not, write to the Free Software
20+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21+
#
22+
#
23+
24+
BEGIN_MARKER="### QUBES BEGIN ###"
25+
END_MARKER="### QUBES END ###"
26+
27+
set -e
28+
29+
[ ! -f /etc/dnf/dnf.conf ]; exit 0
30+
31+
sed -i -e "/^$BEGIN_MARKER$/,/^$END_MARKER$/{d}" /etc/dnf/dnf.conf
32+

dom0-updates/patch-dnf-yum-config

Lines changed: 0 additions & 85 deletions
This file was deleted.

dom0-updates/protect-qubes.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main]
2+
reposdir=/etc/yum.real.repos.d
3+
installonlypkgs = kernel, kernel-qubes-vm"

rpm_spec/core-dom0-linux.spec.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ make install DESTDIR=$RPM_BUILD_ROOT
108108
install -m 0755 -D -- dom0-updates/qubes-dom0-updates.cron "$RPM_BUILD_ROOT/etc/cron.daily/qubes-dom0-updates.cron"
109109
install -D dom0-updates/qubes-dom0-update $RPM_BUILD_ROOT/usr/bin/qubes-dom0-update
110110
install -D dom0-updates/qubes-receive-updates $RPM_BUILD_ROOT/usr/libexec/qubes/qubes-receive-updates
111-
install -D dom0-updates/patch-dnf-yum-config $RPM_BUILD_ROOT/usr/lib/qubes/patch-dnf-yum-config
111+
install -D dom0-updates/patch-dnf-config $RPM_BUILD_ROOT/usr/lib/qubes/patch-dnf-config
112+
install -m 0644 -D dom0-updates/dom0-updates/protect-qubes.conf $RPM_BUILD_ROOT/usr/share/dnf5/libdnf.conf.d/protect-qubes.conf
112113
install -m 0644 -D dom0-updates/qubes-cached.repo $RPM_BUILD_ROOT/etc/yum.real.repos.d/qubes-cached.repo
113114
install -D dom0-updates/qfile-dom0-unpacker $RPM_BUILD_ROOT/usr/libexec/qubes/qfile-dom0-unpacker
114115
install -d $RPM_BUILD_ROOT/etc/qubes-rpc
@@ -210,7 +211,7 @@ fi
210211
%post
211212
set -eo pipefail
212213

213-
/usr/lib/qubes/patch-dnf-yum-config
214+
/usr/lib/qubes/patch-dnf-config
214215

215216
systemctl --quiet enable qubes-suspend.service
216217
systemctl --quiet preset usbguard.service
@@ -270,7 +271,7 @@ chmod -x /etc/grub.d/10_linux
270271
/etc/cron.daily/qubes-dom0-updates.cron
271272
/etc/yum.real.repos.d/qubes-cached.repo
272273
%_bindir/qubes-dom0-update
273-
/usr/lib/qubes/patch-dnf-yum-config
274+
/usr/lib/qubes/patch-dnf-config
274275
%attr(4750,root,qubes) /usr/libexec/qubes/qfile-dom0-unpacker
275276
/usr/libexec/qubes/qubes-receive-updates
276277
/etc/qubes-rpc/qubes.ReceiveUpdates

0 commit comments

Comments
 (0)