123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- #!/bin/bash
- # shellcheck disable=SC2034
- pkgname=(qubes-vm-core qubes-vm-networking qubes-vm-keyring qubes-vm-passwordless-root)
- pkgver=$(cat version)
- pkgrel=15
- epoch=
- pkgdesc="The Qubes core files for installation inside a Qubes VM."
- arch=("x86_64")
- url="http://qubes-os.org/"
- license=('GPL')
- groups=()
- makedepends=(gcc make pkg-config qubes-vm-utils qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python lsb-release pandoc)
- checkdepends=()
- provides=()
- conflicts=()
- replaces=()
- backup=()
- options=()
- changelog=
- source=(
- PKGBUILD.qubes-ensure-lib-modules.service PKGBUILD.qubes-update-desktop-icons.hook
- PKGBUILD-qubes-pacman-options.conf
- PKGBUILD-qubes-repo-4.1.conf
- PKGBUILD-keyring-keys
- PKGBUILD-keyring-trusted
- PKGBUILD-keyring-revoked
- )
- noextract=()
- md5sums=(SKIP)
- build() {
- 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
- # 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
- for dir in qubes-rpc misc; do
- make -C "$dir"
- done
- }
- #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)
- package_qubes-vm-core() {
- depends=(qubes-vm-utils python python-xdg ethtool ntp net-tools
- gnome-packagekit imagemagick fakeroot notification-daemon dconf
- zenity qubes-libvchan qubes-db-vm haveged python-gobject
- python-dbus xdg-utils notification-daemon gawk sed procps-ng librsvg
- socat
- )
- optdepends=(gnome-keyring gnome-settings-daemon python-nautilus gpk-update-viewer qubes-vm-networking qubes-vm-keyring)
- install=PKGBUILD.install
- # shellcheck disable=SC2154
- 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
- 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
- # 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"
- # 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"
- # Install pacman.d drop-ins (at least 1 drop-in must be installed or pacman will fail)
- mkdir -p "${pkgdir}/etc/pacman.d"
- install -m 644 "$srcdir/PKGBUILD-qubes-pacman-options.conf" "${pkgdir}/etc/pacman.d/10-qubes-options.conf"
- # Install pacman repository
- 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"
- # 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"
- [Service]
- ExecStart=
- ExecStart=-/usr/bin/agetty --autologin user --noclear %I 38400 linux
- EOF
- # Archlinux packaging guidelines: /var/run is a symlink to a tmpfs. Don't create it
- rm -rf "$pkgdir/var/run"
- }
- #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() {
- pkgdesc="Qubes OS tools allowing to use a Qubes VM as a NetVM/ProxyVM"
- depends=(qubes-vm-core qubes-vm-utils python ethtool net-tools
- qubes-db-vm networkmanager iptables tinyproxy nftables
- conntrack-tools
- )
- install=PKGBUILD-networking.install
- # shellcheck disable=SC2154
- 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
- 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
- }
- 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)
- 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"
- }
- 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
- }
- # vim:set ts=2 sw=2 et:
|