From b06c29c6dc3fe4c5c8bc511a67b07222b1f52555 Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Sat, 16 Jan 2016 11:52:49 +0100 Subject: [PATCH 1/6] update qubes.InstallUpdateGUI to support archlinux --- qubes-rpc/qubes.InstallUpdatesGUI | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes-rpc/qubes.InstallUpdatesGUI b/qubes-rpc/qubes.InstallUpdatesGUI index 52a22e1..4ad107e 100755 --- a/qubes-rpc/qubes.InstallUpdatesGUI +++ b/qubes-rpc/qubes.InstallUpdatesGUI @@ -8,6 +8,8 @@ if [ -e /etc/redhat-release ]; then xterm -title update -e su -l -c 'yum update; echo Done. Press Enter to exit.; read x' elif [ -e /etc/debian_version ]; then xterm -title update -e su -l -c 'apt-get update && apt-get -V dist-upgrade; echo Done. Press Enter to exit.; read x' +elif [ -e /etc/arch-release ]; then + xterm -title update -e su -l -c 'pacman -Suy; echo Done. Press Enter to exit.; read x' else xterm -title update -e su -l -c 'echo Unsupported distribution, install updates manually; bash -i' fi From 857598cbfc29b8e6080bd509273eeb835c6989df Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Sat, 16 Jan 2016 11:54:04 +0100 Subject: [PATCH 2/6] archlinux: add gcc and make as make dependencies --- archlinux/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD index 72f9e46..f3a0b3c 100644 --- a/archlinux/PKGBUILD +++ b/archlinux/PKGBUILD @@ -14,7 +14,7 @@ url="http://qubes-os.org/" license=('GPL') groups=() depends=("qubes-vm-utils>=3.1.3" python2 python3 python2-xdg ethtool ntp net-tools gnome-packagekit imagemagick fakeroot notification-daemon dconf pygtk zenity qubes-libvchan qubes-db-vm haveged python2-gobject python2-dbus xdg-utils notification-daemon) -makedepends=("qubes-vm-utils>=3.1.3" qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python2 python3) +makedepends=(gcc make pkg-config "qubes-vm-utils>=3.1.3" qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python2 python3) checkdepends=() optdepends=(gnome-keyring gnome-settings-daemon networkmanager iptables tinyproxy python2-nautilus gpk-update-viewer) provides=() From 95569318081e75419342d152eeb527f36f8676fd Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Sat, 16 Jan 2016 12:11:06 +0100 Subject: [PATCH 3/6] implement update proxy support for archlinux --- network/update-proxy-configs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/network/update-proxy-configs b/network/update-proxy-configs index 6480c58..208363b 100755 --- a/network/update-proxy-configs +++ b/network/update-proxy-configs @@ -117,3 +117,8 @@ fi if [ -e /etc/PackageKit/PackageKit.conf ]; then update_conf /etc/PackageKit/PackageKit.conf "ProxyHTTP=$PROXY_ADDR" fi + +# Pacman (archlinux) also +if [ -e /etc/pacman.conf ]; then + update_conf /etc/pacman.conf "XferCommand = http_proxy=$PROXY_ADDR /usr/bin/wget --passive-ftp -c -O %o %u" +fi From 1bbcf126ad44851f44f88a452955f06d2db8dc43 Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Thu, 21 Jan 2016 07:59:35 +0100 Subject: [PATCH 4/6] archlinux: add Qubes Markers in pacman.conf so that changes done by qubes scripts are not inserted at the end of pacman.conf --- archlinux/PKGBUILD | 2 +- archlinux/PKGBUILD.install | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD index f3a0b3c..1259683 100644 --- a/archlinux/PKGBUILD +++ b/archlinux/PKGBUILD @@ -6,7 +6,7 @@ # Maintainer: Olivier Medoc pkgname=qubes-vm-core pkgver=`cat version` -pkgrel=2 +pkgrel=4 epoch= pkgdesc="The Qubes core files for installation inside a Qubes VM." arch=("x86_64") diff --git a/archlinux/PKGBUILD.install b/archlinux/PKGBUILD.install index 58245f6..810af8a 100644 --- a/archlinux/PKGBUILD.install +++ b/archlinux/PKGBUILD.install @@ -198,6 +198,15 @@ systemctl daemon-reload } +config_addlinetofile() { + +FILE=$1 +APPENDAFTERLINE=$2 +APPENDLINE=$3 +grep -q "$APPENDLINE" "$FILE" || sed "/$APPENDAFTERLINE/a$APPENDLINE" -i "$FILE" + +} + update_finalize() { # Archlinux specific: Update pam.d configuration for su to enable systemd-login wrapper @@ -213,6 +222,13 @@ update_finalize() { rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service systemctl enable getty\@tty1.service + # Archlinux specific: Prepare pacman.conf to add qubes specific config + QUBES_MARKER="### QUBES CONFIG MARKER ###" + config_addlinetofile "/etc/pacman.conf" "NoUpgrade" "$QUBES_MARKER" + + # Add Qubes setup script markers at the right place (this won't work at the end of pacman.conf)" + config_addlinetofile "/etc/pacman.conf "$QUBES_MARKER" "### QUBES BEGIN ###" + systemctl daemon-reload } From eb105540c5f414bbbff53fa02faebbc5cda8d0ad Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Thu, 21 Jan 2016 18:21:44 +0100 Subject: [PATCH 5/6] archlinux: properly add qubes markers in pacman.conf --- archlinux/PKGBUILD | 2 +- archlinux/PKGBUILD.install | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD index 1259683..b34452e 100644 --- a/archlinux/PKGBUILD +++ b/archlinux/PKGBUILD @@ -6,7 +6,7 @@ # Maintainer: Olivier Medoc pkgname=qubes-vm-core pkgver=`cat version` -pkgrel=4 +pkgrel=6 epoch= pkgdesc="The Qubes core files for installation inside a Qubes VM." arch=("x86_64") diff --git a/archlinux/PKGBUILD.install b/archlinux/PKGBUILD.install index 810af8a..4f17442 100644 --- a/archlinux/PKGBUILD.install +++ b/archlinux/PKGBUILD.install @@ -198,13 +198,18 @@ systemctl daemon-reload } -config_addlinetofile() { +config_prependtomark() { +FILE=$1 +APPENDBEFORELINE=$2 +APPENDLINE=$3 +grep -q "$APPENDLINE" "$FILE" || sed "/$APPENDBEFORELINE/i$APPENDLINE" -i "$FILE" +} +config_appendtomark() { FILE=$1 APPENDAFTERLINE=$2 APPENDLINE=$3 grep -q "$APPENDLINE" "$FILE" || sed "/$APPENDAFTERLINE/a$APPENDLINE" -i "$FILE" - } update_finalize() { @@ -224,10 +229,11 @@ update_finalize() { # Archlinux specific: Prepare pacman.conf to add qubes specific config QUBES_MARKER="### QUBES CONFIG MARKER ###" - config_addlinetofile "/etc/pacman.conf" "NoUpgrade" "$QUBES_MARKER" + config_prependtomark "/etc/pacman.conf" "# REPOSITORIES" "$QUBES_MARKER" # Add Qubes setup script markers at the right place (this won't work at the end of pacman.conf)" - config_addlinetofile "/etc/pacman.conf "$QUBES_MARKER" "### QUBES BEGIN ###" + config_appendtomark "/etc/pacman.conf" "$QUBES_MARKER" "### QUBES END ###" + config_appendtomark "/etc/pacman.conf" "$QUBES_MARKER" "### QUBES BEGIN ###" systemctl daemon-reload } From 57e50269638ebaf77faa1a83ac8384b3920f6888 Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Thu, 21 Jan 2016 18:23:48 +0100 Subject: [PATCH 6/6] update-proxy: use curl instead of wget in archlinux in order to limit additional dependencies --- network/update-proxy-configs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/update-proxy-configs b/network/update-proxy-configs index 208363b..3264f6d 100755 --- a/network/update-proxy-configs +++ b/network/update-proxy-configs @@ -120,5 +120,5 @@ fi # Pacman (archlinux) also if [ -e /etc/pacman.conf ]; then - update_conf /etc/pacman.conf "XferCommand = http_proxy=$PROXY_ADDR /usr/bin/wget --passive-ftp -c -O %o %u" + update_conf /etc/pacman.conf "XferCommand = http_proxy=$PROXY_ADDR /usr/bin/curl -C - -f %u > %o" fi