diff --git a/extra-repos/systemd/networkmanager/APKBUILD b/extra-repos/systemd/networkmanager/APKBUILD index a3f94681b8bc4e0424eed866ac651bada1d83d05..bde14f89440b3b0b0f2dbc1ef190339318fb29b6 100644 --- a/extra-repos/systemd/networkmanager/APKBUILD +++ b/extra-repos/systemd/networkmanager/APKBUILD @@ -5,7 +5,7 @@ maintainer="Jane Rachinger <jane400+pmaports@postmarketos.org>" pkgname=networkmanager pkgver=9991.50.2 _pkgver=1.50.2 -pkgrel=0 +pkgrel=1 pkgdesc="Network Management daemon" url="https://wiki.gnome.org/Projects/NetworkManager" arch="all" @@ -61,7 +61,6 @@ subpackages=" libnm $pkgname-dev $pkgname-lang - $pkgname-systemd $pkgname-adsl $pkgname-bluetooth $pkgname-ovs @@ -232,11 +231,6 @@ _default_plugin() { amove $_plugindir/libnm*-${subpkgname#"$pkgname"-}.so } -systemd() { - install="$subpkgname.post-install $subpkgname.pre-deinstall" - default_systemd -} - sha512sums=" a1291aad85b34f7dc2d8ef4610a34772fee3e158ee64421ee6c4d379db3c78dca0539cb6c9110e20fe6a19b7ca1ee247025b7ae251f6011c7ff0efa788da570c NetworkManager-1.50.2.tar.gz 0f79016bf717dea43830962f524deae8d1cedc274376e40bd912ebe63208c5b1c3b7a5aa14379da19020c587dbd5588df2f0066ca1540070a226983a43e4159b networkmanager.conf diff --git a/extra-repos/systemd/postmarketos-base-systemd/APKBUILD b/extra-repos/systemd/postmarketos-base-systemd/APKBUILD index b69fb6e77b1e928257e600aacc9e8478765fb2e5..d79feabbcf765337d6d0906f8cd787780e1640c1 100644 --- a/extra-repos/systemd/postmarketos-base-systemd/APKBUILD +++ b/extra-repos/systemd/postmarketos-base-systemd/APKBUILD @@ -2,13 +2,14 @@ # Co-maintainer: Clayton Craft <clayton@craftyguy.net> # pmbootstrap installs this, if systemd is selected in "pmbootstrap init". pkgname=postmarketos-base-systemd -pkgver=27 -pkgrel=0 +pkgver=28 +pkgrel=1 pkgdesc="Meta package for running postmarketOS with systemd" url="https://postmarketos.org" arch="noarch" license="GPL-3.0-or-later" options="!check" +triggers="$pkgname.trigger=/usr/lib/systemd/*" # systemd <-> util-linux is an expected cycial dependency # Also we can't parse .note.dlopen yet. diff --git a/extra-repos/systemd/postmarketos-base-systemd/postmarketos-base-systemd.trigger b/extra-repos/systemd/postmarketos-base-systemd/postmarketos-base-systemd.trigger new file mode 100644 index 0000000000000000000000000000000000000000..cc8636dd569299d9853b6072cf9e215916d3b9e2 --- /dev/null +++ b/extra-repos/systemd/postmarketos-base-systemd/postmarketos-base-systemd.trigger @@ -0,0 +1,14 @@ +#!/bin/sh + +# system units +systemctl preset-all + +# session/user units +systemctl --global preset-all + +cat <<EOF +--------------------------------------------------------------------------------------------------------- +HINT: To permanently DISABLE a systemd unit, use: systemctl mask <unit> +HINT: To permanently ENABLE a systemd unit, add a preset for it in the appropriate /etc/systemd/*-preset +--------------------------------------------------------------------------------------------------------- +EOF diff --git a/extra-repos/systemd/systemd-services/APKBUILD b/extra-repos/systemd/systemd-services/APKBUILD index 94f77c2012ca6eef223c42cc63dbcfa8ccffbad4..5051a39ae8420b826869a37efc84d874bee61527 100644 --- a/extra-repos/systemd/systemd-services/APKBUILD +++ b/extra-repos/systemd/systemd-services/APKBUILD @@ -7,7 +7,7 @@ # How to add a new service file (5 steps): pkgname=systemd-services # 1. bump pkgver -pkgver=54 +pkgver=55 pkgrel=0 pkgdesc="Systemd service files" url="https://postmarketos.org" @@ -244,51 +244,11 @@ source="$(flatpath \ $_zram_init_sources \ )" -# 5. Add any *system* or *user* unit files that should be passed to 'systemctl -# preset'. Variables with *system* unit files should use "_system_presets" and -# variables with *user* unit files should use "_user_presets". -_apk_polkit_rs_system_presets="apk-polkit-server.service" -_bluez_system_presets="bluetooth.service" -_fnott_user_presets="fnott.service" -_geoclue_system_presets="geoclue.service" -_gnome_clocks_user_presets="gnome-clocks.service" -_hexagonrpcd_system_presets="hexagonrpcd-adsp-rootpd.service hexagonrpcd-adsp-sensorspd.service hexagonrpcd-sdsp.service" -_hfd_service_system_presets="hfd-service.service" -_iwd_system_presets="iwd.service" -_kanshi_user_presets="kanshi.service" -_mmsd_tng_user_presets="mmsd-tng.service" -_modemmanager_system_presets="ModemManager.service" -_msm_modem_system_presets="msm-modem-uim-selection.service" -_nftables_system_presets="nftables.service" -_openssh_server_pam_system_presets="sshd.service" -_pd_mapper_system_presets="pd-mapper.service" -_plasma_mobile_system_presets="plasma-mobile.service" -_q6voiced_system_presets="q6voiced.service" -_qbootctl_system_presets="qbootctl.service" -_qcom_diag_system_presets="diag-router.service" -_rmtfs_system_presets="rmtfs.service" -_rtkit_system_presets="rtkit-daemon.service" -_sensorfw_system_presets="sensorfwd.service" -_sleep_inhibitor_system_presets="sleep-inhibitor.service" -_syncthing_user_presets="syncthing.service" -_tinydm_system_presets="tinydm.service" -_tqftpserv_system_presets="tqftpserv.service" -_udisks2_system_presets="udisks2.service" -_udiskie_user_presets="udiskie.service" -_vvmd_user_presets="vvmd.service" -_waydroid_system_presets="waydroid-container.service" -_waydroid_sensors_system_presets="waydroid-sensors.service" -_wireplumber_user_presets="wireplumber.service" -_wpa_supplicant_system_presets="wpa_supplicant.service" -_xdg_desktop_portal_user_presets="xdg-desktop-portal-rewrite-launchers.service" -_zram_init_system_presets="zram_swap.service" - _service() { local name=$(echo ${subpkgname%%-systemd}) local n=$(echo ${subpkgname%-systemd} | sed s/-/_/g) pkgdesc="$name systemd service files" install_if="systemd-services=$pkgver-r$pkgrel systemd $name" - install="" # defined later if presets are configured for the service for f in $(eval "echo \$_${n}_sources"); do prefix="$subpkgdir" @@ -306,24 +266,6 @@ _service() { fi install -Dm$mode "$srcdir/$(flatpath "$f")" "$prefix/$f" done - - for t in user system; do - local presets - presets="$(eval "echo \$_${n}_${t}_presets" || true)" - [ -z "$presets" ] && continue - presets="$(echo "$presets" | tr -s '[:space:]' ' ')" - - if [ -z "$install" ]; then - cat <<- EOF > "$subpkgname.post-install" - #!/bin/sh - . /usr/lib/systemd/systemd-apk-macros.sh - EOF - cp "$subpkgname.post-install" "$subpkgname.pre-deinstall" - install="$subpkgname.post-install $subpkgname.pre-deinstall" - fi - echo "systemd_service_post_install "$t" $presets" >> "$subpkgname.post-install" - echo "systemd_service_pre_deinstall "$t" $presets" >> "$subpkgname.pre-deinstall" - done } package() { diff --git a/extra-repos/systemd/systemd/APKBUILD b/extra-repos/systemd/systemd/APKBUILD index dece596e097df7d365cfbca15ae08150e83eb977..fd88bf2e80e43f74e951270295279ed55ea32180 100644 --- a/extra-repos/systemd/systemd/APKBUILD +++ b/extra-repos/systemd/systemd/APKBUILD @@ -6,7 +6,7 @@ pkgname=systemd # currently tracking git MR pkgver=256.11 _pkgver="musl-v${pkgver//_/-}-split-usr" -pkgrel=0 +pkgrel=1 pkgdesc="System and service manager" url="https://github.com/systemd/systemd" arch="all !ppc64le !s390x" # blocked by pmboostrap not supporting @@ -267,7 +267,6 @@ udevd_zcomp() { timesyncd() { pkgdesc="systemd Time Synchronization" depends="$pkgname=$pkgver-r$pkgrel" - install="$subpkgname.post-install $subpkgname.pre-deinstall" amove etc/systemd/timesyncd.conf amove usr/bin/timedatectl @@ -290,7 +289,6 @@ timesyncd_zcomp() { networkd() { pkgdesc="systemd Network Configuration" depends="$pkgname=$pkgver-r$pkgrel" - install="$subpkgname.post-install $subpkgname.pre-deinstall" amove usr/bin/networkctl amove etc/systemd/network @@ -325,7 +323,6 @@ networkd_zcomp() { resolved() { pkgdesc="systemd Network Name Resolution" depends="$pkgname=$pkgver-r$pkgrel" - install="$subpkgname.post-install $subpkgname.pre-deinstall" replaces="resolvconf" provides="resolvconf" @@ -422,6 +419,6 @@ dev() { sha512sums=" 3cd75d5ba29a3994230ecbe16ea106d4fe05d7d76e7cd9b9a6a63177f09d8c362c055a1fea49e6c9a10a949afc07a6c75fe75dad2bd302d94e41a81f8ddb2a15 systemd-musl-v256.11-split-usr.tar.gz -2f9ec875de67fc4bb401bebea88653cd34c22787a26a8122233fbb761bfbf190be72cfa0c26a433c30d703ee1e10489787d75492f0e1a76cbd5f6601e7e23d49 systemd-apk-macros.sh +a5f644408b4df9ec71c3c57c8bb9dc34001e196a64bcb9f9c35003b596fb14b9b4320dcb55ff165b7e0a47c92fcc02fa2dfba75d5a6aa73de950fed312c1f2ff systemd-apk-macros.sh 81c897fed8a3fbfb67ec591b2398a5d65e4af1b3ef379376c157c98d71f085b707f8ebc896d5571a94f99f8fc84fd6b43e3b879ca9b0d57fc6c4596034c7a777 wired.network " diff --git a/extra-repos/systemd/systemd/systemd-apk-macros.sh b/extra-repos/systemd/systemd/systemd-apk-macros.sh index 0ccfb011327ff5897808882bbafb1649d7edc7b0..6e6cfe25d6e0680a39dc54baf62e6ccb94812742 100644 --- a/extra-repos/systemd/systemd/systemd-apk-macros.sh +++ b/extra-repos/systemd/systemd/systemd-apk-macros.sh @@ -1,88 +1,9 @@ #!/bin/sh -# systemd.preset reference: -# https://www.freedesktop.org/software/systemd/man/latest/systemd.preset.html -# Systemd macro file for RPM: -# https://github.com/systemd/systemd/blob/main/src/rpm/macros.systemd.in -# https://github.com/systemd/systemd/blob/main/src/rpm/systemd-update-helper.in -SYSTEMD_BUS_TIMEOUT=5s +cat <<-EOF +--------------------------------------------------------------------------------- +ERROR: Do not use install scripts to call this macro, it is no longer necessary! +--------------------------------------------------------------------------------- +EOF -is_systemd_running() { - [ -d "/run/systemd/running" ] -} - -# runs `systemctl preset` on the list of services of the given type -# $1: type of service, supported values: "user" or "system" -# $@: list of service unit names, as you'd pass to `systemctl preset` -# FIXME: this may not work with wildcards in unit names, and other input you -# can give to the preset command -systemd_service_post_install() { - local type="$1" - shift - - if [ -z "$type" ]; then - echo "service type (user or service) not given" - exit 1 - fi - - if ! command -v systemctl > /dev/null; then - echo "systemctl is not available" - exit 1 - fi - - case "$type" in - "user") - systemctl --no-reload preset --global "$@" - ;; - "system") - systemctl --no-reload preset "$@" || true - ;; - *) - echo "unsupported service type: $type" - exit 1 - esac -} - -# disables the list of services of the given type -# $1: type of service, supported values: "user" or "system" -# $@: list of service unit names, as you'd pass to `systemctl disable` -# FIXME: this may not work with wildcards in unit names, and other input you -# can give to the disable command -systemd_service_pre_deinstall() { - local type="$1" - shift - - if [ -z "$type" ]; then - echo "service type (user/service) not given" - exit 1 - fi - - if ! command -v systemctl > /dev/null; then - echo "systemctl is not available" - exit 1 - fi - - case "$type" in - "user") - systemctl --global disable --no-warn "$@" - if is_systemd_running; then - local users - users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p') - for user in $users; do - systemctl --user -M "$user@" disable --now --no-warn "$@" & - done - wait - fi - ;; - "system") - if is_systemd_running; then - systemctl --no-reload disable --now --no-warn "$@" - else - systemctl --no-reload disable --no-warn "$@" - fi - ;; - *) - echo "unsupported service type: $type" - exit 1 - esac -} +exit 1 diff --git a/extra-repos/systemd/systemd/systemd-networkd.post-install b/extra-repos/systemd/systemd/systemd-networkd.post-install deleted file mode 100644 index 7090ed5a1d0168e21dce5fd308630500696b7244..0000000000000000000000000000000000000000 --- a/extra-repos/systemd/systemd/systemd-networkd.post-install +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. /usr/lib/systemd/systemd-apk-macros.sh -systemd_service_post_install system systemd-networkd diff --git a/extra-repos/systemd/systemd/systemd-networkd.pre-deinstall b/extra-repos/systemd/systemd/systemd-networkd.pre-deinstall deleted file mode 100644 index fd99d8792c96b9cc9e5e053d891c0694490392c7..0000000000000000000000000000000000000000 --- a/extra-repos/systemd/systemd/systemd-networkd.pre-deinstall +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. /usr/lib/systemd/systemd-apk-macros.sh -systemd_service_pre_deinstall system systemd-networkd diff --git a/extra-repos/systemd/systemd/systemd-resolved.post-install b/extra-repos/systemd/systemd/systemd-resolved.post-install deleted file mode 100644 index 2ecb0d2793875a614b0f2c2b0cc048f9d6b7f73c..0000000000000000000000000000000000000000 --- a/extra-repos/systemd/systemd/systemd-resolved.post-install +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. /usr/lib/systemd/systemd-apk-macros.sh -systemd_service_post_install system systemd-resolved diff --git a/extra-repos/systemd/systemd/systemd-resolved.pre-deinstall b/extra-repos/systemd/systemd/systemd-resolved.pre-deinstall deleted file mode 100644 index c3623ded50ee0606f6f6503f36dd2e592b19ae0b..0000000000000000000000000000000000000000 --- a/extra-repos/systemd/systemd/systemd-resolved.pre-deinstall +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. /usr/lib/systemd/systemd-apk-macros.sh -systemd_service_pre_deinstall system systemd-resolved diff --git a/extra-repos/systemd/systemd/systemd-timesyncd.post-install b/extra-repos/systemd/systemd/systemd-timesyncd.post-install deleted file mode 100644 index 43d4a4dda38b7dc1d31eda66821838984eb17a97..0000000000000000000000000000000000000000 --- a/extra-repos/systemd/systemd/systemd-timesyncd.post-install +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. /usr/lib/systemd/systemd-apk-macros.sh -systemd_service_post_install system systemd-timesyncd diff --git a/extra-repos/systemd/systemd/systemd-timesyncd.pre-deinstall b/extra-repos/systemd/systemd/systemd-timesyncd.pre-deinstall deleted file mode 100644 index e93dc023801fad209efc28d652a4365896e4c2be..0000000000000000000000000000000000000000 --- a/extra-repos/systemd/systemd/systemd-timesyncd.pre-deinstall +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. /usr/lib/systemd/systemd-apk-macros.sh -systemd_service_pre_deinstall system systemd-timesyncd