2017-10-01 20:48:13 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# shellcheck disable=SC2034
|
2020-10-19 17:12:42 +02:00
|
|
|
pkgname=(qubes-vm-core qubes-vm-networking qubes-vm-keyring qubes-vm-passwordless-root)
|
2017-10-01 20:48:13 +02:00
|
|
|
pkgver=$(cat version)
|
2018-08-08 14:48:50 +02:00
|
|
|
pkgrel=15
|
2013-04-12 16:43:46 +02:00
|
|
|
epoch=
|
|
|
|
pkgdesc="The Qubes core files for installation inside a Qubes VM."
|
|
|
|
arch=("x86_64")
|
|
|
|
url="http://qubes-os.org/"
|
|
|
|
license=('GPL')
|
|
|
|
groups=()
|
2020-02-05 18:57:22 +01:00
|
|
|
makedepends=(gcc make pkg-config qubes-vm-utils qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python lsb-release pandoc)
|
2013-04-12 16:43:46 +02:00
|
|
|
checkdepends=()
|
|
|
|
provides=()
|
|
|
|
conflicts=()
|
|
|
|
replaces=()
|
|
|
|
backup=()
|
|
|
|
options=()
|
|
|
|
changelog=
|
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
source=(
|
|
|
|
PKGBUILD.qubes-ensure-lib-modules.service PKGBUILD.qubes-update-desktop-icons.hook
|
2017-10-23 20:22:04 +02:00
|
|
|
PKGBUILD-qubes-pacman-options.conf
|
2019-04-22 00:31:28 +02:00
|
|
|
PKGBUILD-qubes-repo-4.1.conf
|
2017-10-30 16:31:05 +01:00
|
|
|
PKGBUILD-keyring-keys
|
|
|
|
PKGBUILD-keyring-trusted
|
|
|
|
PKGBUILD-keyring-revoked
|
2017-10-01 20:48:13 +02:00
|
|
|
)
|
2013-04-12 16:43:46 +02:00
|
|
|
|
|
|
|
noextract=()
|
2017-01-29 15:37:15 +01:00
|
|
|
md5sums=(SKIP)
|
2013-04-12 16:43:46 +02:00
|
|
|
|
|
|
|
build() {
|
2020-10-19 17:12:42 +02:00
|
|
|
for source in autostart-dropins applications-dropins app-menu qubes-rpc misc passwordless-root Makefile vm-init.d vm-systemd network init version doc setup.py qubesagent post-install.d; do
|
2017-10-01 20:48:13 +02:00
|
|
|
# shellcheck disable=SC2154
|
|
|
|
(ln -s "$srcdir/../$source" "$srcdir/$source")
|
|
|
|
done
|
|
|
|
|
|
|
|
# Fix for network tools paths
|
|
|
|
sed 's:/sbin/ifconfig:ifconfig:g' -i network/*
|
|
|
|
sed 's:/sbin/route:route:g' -i network/*
|
|
|
|
sed 's:/sbin/ethtool:ethtool:g' -i network/*
|
|
|
|
sed 's:/sbin/ip:ip:g' -i network/*
|
|
|
|
sed 's:/bin/grep:grep:g' -i network/*
|
|
|
|
|
|
|
|
# Fix for archlinux sbindir
|
|
|
|
sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock
|
|
|
|
|
2020-10-18 14:28:02 +02:00
|
|
|
for dir in qubes-rpc misc; do
|
2017-10-02 13:49:40 +02:00
|
|
|
make -C "$dir"
|
2017-10-01 20:48:13 +02:00
|
|
|
done
|
2013-04-12 16:43:46 +02:00
|
|
|
}
|
|
|
|
|
2017-11-19 08:57:31 +01:00
|
|
|
#This package provides:
|
|
|
|
# * qubes rpc scripts
|
|
|
|
# * core linux tools and scripts
|
|
|
|
# * core systemd services and drop-ins
|
|
|
|
# * basic network functionality (setting IP address, DNS, default gateway)
|
2017-10-29 08:24:51 +01:00
|
|
|
package_qubes-vm-core() {
|
2020-02-05 18:57:22 +01:00
|
|
|
depends=(qubes-vm-utils python python-xdg ethtool ntp net-tools
|
2017-10-29 08:24:51 +01:00
|
|
|
gnome-packagekit imagemagick fakeroot notification-daemon dconf
|
2020-02-05 18:57:22 +01:00
|
|
|
zenity qubes-libvchan qubes-db-vm haveged python-gobject
|
2020-02-05 06:18:43 +01:00
|
|
|
python-dbus xdg-utils notification-daemon gawk sed procps-ng librsvg
|
2017-10-29 08:24:51 +01:00
|
|
|
socat
|
|
|
|
)
|
2020-02-06 07:05:07 +01:00
|
|
|
optdepends=(gnome-keyring gnome-settings-daemon python-nautilus gpk-update-viewer qubes-vm-networking qubes-vm-keyring)
|
2017-10-29 08:24:51 +01:00
|
|
|
install=PKGBUILD.install
|
|
|
|
|
2020-10-21 08:37:53 +02:00
|
|
|
|
|
|
|
# shellcheck disable=SC2154
|
2019-09-18 01:42:51 +02:00
|
|
|
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
|
2020-10-19 16:01:33 +02:00
|
|
|
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
|
2019-10-21 23:27:45 +02:00
|
|
|
make -C qubes-rpc DESTDIR="$pkgdir" install
|
|
|
|
make -C qubes-rpc/kde DESTDIR="$pkgdir" install
|
|
|
|
make -C qubes-rpc/nautilus DESTDIR="$pkgdir" install
|
|
|
|
make -C qubes-rpc/thunar DESTDIR="$pkgdir" install
|
2013-04-12 16:43:46 +02:00
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
# Install systemd script allowing to automount /lib/modules
|
|
|
|
install -m 644 "$srcdir/PKGBUILD.qubes-ensure-lib-modules.service" "${pkgdir}/usr/lib/systemd/system/qubes-ensure-lib-modules.service"
|
2013-04-12 16:43:46 +02:00
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
# Install pacman hook to update desktop icons
|
|
|
|
mkdir -p "${pkgdir}/usr/share/libalpm/hooks/"
|
|
|
|
install -m 644 "$srcdir/PKGBUILD.qubes-update-desktop-icons.hook" "${pkgdir}/usr/share/libalpm/hooks/qubes-update-desktop-icons.hook"
|
2014-02-03 20:53:03 +01:00
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
# Install pacman.d drop-ins (at least 1 drop-in must be installed or pacman will fail)
|
|
|
|
mkdir -p "${pkgdir}/etc/pacman.d"
|
2017-10-23 20:22:04 +02:00
|
|
|
install -m 644 "$srcdir/PKGBUILD-qubes-pacman-options.conf" "${pkgdir}/etc/pacman.d/10-qubes-options.conf"
|
2016-07-11 15:29:31 +02:00
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
# Install pacman repository
|
2017-10-21 14:44:05 +02:00
|
|
|
release=$(echo "$pkgver" | cut -d '.' -f 1,2)
|
|
|
|
echo "Installing repository for release ${release}"
|
|
|
|
install -m 644 "$srcdir/PKGBUILD-qubes-repo-${release}.conf" "${pkgdir}/etc/pacman.d/99-qubes-repository-${release}.conf.disabled"
|
2016-07-11 17:21:55 +02:00
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
# Archlinux specific: enable autologin on tty1
|
|
|
|
mkdir -p "$pkgdir/etc/systemd/system/getty@tty1.service.d/"
|
|
|
|
cat <<EOF > "$pkgdir/etc/systemd/system/getty@tty1.service.d/autologin.conf"
|
2014-02-16 17:29:40 +01:00
|
|
|
[Service]
|
|
|
|
ExecStart=
|
|
|
|
ExecStart=-/usr/bin/agetty --autologin user --noclear %I 38400 linux
|
|
|
|
EOF
|
|
|
|
|
2017-10-01 20:48:13 +02:00
|
|
|
# Archlinux packaging guidelines: /var/run is a symlink to a tmpfs. Don't create it
|
2020-10-18 14:28:02 +02:00
|
|
|
rm -rf "$pkgdir/var/run"
|
2013-04-12 16:43:46 +02:00
|
|
|
}
|
|
|
|
|
2017-10-29 08:24:51 +01:00
|
|
|
#This package provides:
|
|
|
|
# * proxy service used by TemplateVMs to download updates
|
|
|
|
# * qubes-firewall service (FirewallVM)
|
|
|
|
#
|
|
|
|
#Integration of NetworkManager for Qubes VM:
|
|
|
|
# * make connections config persistent
|
|
|
|
# * adjust DNS redirections when needed
|
|
|
|
# * show/hide NetworkManager applet icon
|
|
|
|
#
|
|
|
|
package_qubes-vm-networking() {
|
2017-11-19 08:57:31 +01:00
|
|
|
pkgdesc="Qubes OS tools allowing to use a Qubes VM as a NetVM/ProxyVM"
|
2020-02-05 18:57:22 +01:00
|
|
|
depends=(qubes-vm-core qubes-vm-utils python ethtool net-tools
|
|
|
|
qubes-db-vm networkmanager iptables tinyproxy nftables
|
2020-12-16 07:45:23 +01:00
|
|
|
conntrack-tools
|
2017-10-29 08:24:51 +01:00
|
|
|
)
|
|
|
|
install=PKGBUILD-networking.install
|
|
|
|
|
|
|
|
# shellcheck disable=SC2154
|
2020-10-19 15:41:18 +02:00
|
|
|
make -C network 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
|
2019-09-18 01:42:51 +02:00
|
|
|
make install-netvm 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
|
2017-10-29 08:24:51 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-10-30 16:31:05 +01:00
|
|
|
package_qubes-vm-keyring() {
|
|
|
|
pkgdesc="Qubes OS Binary Repository Activation package and Keyring"
|
|
|
|
install=PKGBUILD-keyring.install
|
|
|
|
|
|
|
|
# Install keyring (will be activated through the .install file)
|
2017-10-31 15:12:04 +01:00
|
|
|
install -dm755 "${pkgdir}/usr/share/pacman/keyrings/"
|
|
|
|
install -m0644 PKGBUILD-keyring-keys "${pkgdir}/usr/share/pacman/keyrings/qubesos-vm.gpg"
|
|
|
|
install -m0644 PKGBUILD-keyring-trusted "${pkgdir}/usr/share/pacman/keyrings/qubesos-vm-trusted"
|
|
|
|
install -m0644 PKGBUILD-keyring-revoked "${pkgdir}/usr/share/pacman/keyrings/qubesos-vm-revoked"
|
2017-10-30 16:31:05 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-10-19 17:12:42 +02:00
|
|
|
package_qubes-vm-passwordless-root() {
|
|
|
|
pkgdesc="Qubes OS Passwordless root access from normal user"
|
|
|
|
make -C passwordless-root 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
|
|
|
|
}
|
|
|
|
|
2013-04-12 16:43:46 +02:00
|
|
|
# vim:set ts=2 sw=2 et:
|