summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYurii Kolesnykov2016-12-29 18:04:50 +0200
committerYurii Kolesnykov2016-12-29 18:07:01 +0200
commita0e20679cac7ccf17a988c595e7be3a5966c38c7 (patch)
tree51350ca0658d75b722a76ec92a02efb54111fd17
parentc5951cc0b7fb3517cb437c818164f24bb4372c0e (diff)
downloadaur-a0e20679cac7ccf17a988c595e7be3a5966c38c7.tar.gz
fix error, port from systemd
-rw-r--r--.SRCINFO37
-rw-r--r--PKGBUILD62
-rw-r--r--initcpio-install-systemd34
-rw-r--r--systemd-git.install153
-rw-r--r--systemd-user.pam5
5 files changed, 90 insertions, 201 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8d1bc2a527e9..adc3b7bbbf47 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = systemd-git
pkgdesc = systemd from git
- pkgver = 230.r197.g7f40134
- pkgrel = 2
+ pkgver = 232.r485.g4b2419165
+ pkgrel = 1
url = http://www.freedesktop.org/wiki/Software/systemd
arch = i686
arch = x86_64
@@ -29,21 +29,22 @@ pkgbase = systemd-git
makedepends = gnu-efi-libs
makedepends = git
options = strip
- options = debug
- source = git://github.com/systemd/systemd.git#branch=master
+ source = systemd-git::git://github.com/systemd/systemd.git#branch=master
source = initcpio-hook-udev
source = initcpio-install-systemd
source = initcpio-install-udev
source = arch.conf
source = loader.conf
source = udev-hwdb.hook
- md5sums = SKIP
- md5sums = 90ea67a7bb237502094914622a39e281
- md5sums = cfb3f8ea657ab24535cc061bb38ec4c1
- md5sums = 1b3aa3a0551b08af9305d33f85b5c2fc
- md5sums = 20ead378f5d6df4b2a3e670301510a7d
- md5sums = ddaef54f68f6c86c6c07835fc668f62a
- md5sums = a475a5ed8f03fb0f6b58b4684998d05c
+ source = systemd-user.pam
+ sha512sums = SKIP
+ sha512sums = f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73
+ sha512sums = 52af734947a768758d5eb3f18e31a1cfec6699eca6fa10e40b90c7f11991509186c0a696e3490af3eaba80064ea4cb93e041579abf05addf072d294300aa4b28
+ sha512sums = fec639de0d99967ed3e67289eff5ff78fff0c5829d350e73bed536a8391f1daa1d118d72dbdc1f480ffd33fc22b72f4817d0973bd09ec7f182fd26ad87b24355
+ sha512sums = 61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648
+ sha512sums = c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5
+ sha512sums = 888ab01bc6e09beb08d7126472c34c9e1aa35ea34e62a09e900ae34c93b1de2fcc988586efd8d0dc962393974f45c77b206d59a86cf53e370f061bf9a1b1a862
+ sha512sums = b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19
pkgname = systemd-git
pkgdesc = system and service manager
@@ -73,23 +74,15 @@ pkgname = systemd-git
optdepends = systemd-sysvcompat-git: symlink package to provide sysvinit binaries
optdepends = polkit: allow administration as unprivileged user
provides = nss-myhostname
- provides = systemd-tools=230.r197.g7f40134
- provides = udev=230.r197.g7f40134
- provides = systemd=230.r197.g7f40134
+ provides = systemd-tools=232.r485.g4b2419165
+ provides = udev=232.r485.g4b2419165
+ provides = systemd=232.r485.g4b2419165
conflicts = nss-myhostname
conflicts = systemd-tools
conflicts = udev
replaces = nss-myhostname
replaces = systemd-tools
replaces = udev
- backup = etc/dbus-1/system.d/org.freedesktop.systemd1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.hostname1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.login1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.locale1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.machine1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.timedate1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.import1.conf
- backup = etc/dbus-1/system.d/org.freedesktop.network1.conf
backup = etc/pam.d/systemd-user
backup = etc/systemd/coredump.conf
backup = etc/systemd/journald.conf
diff --git a/PKGBUILD b/PKGBUILD
index 72c0a4586da7..b5cc8b8006fc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,42 +3,44 @@
# Credit: Tom Gundersen <teg@jklm.no>
pkgbase=systemd-git
-_realpkgname=systemd
pkgname=('systemd-git' 'libsystemd-git' 'systemd-sysvcompat-git')
pkgdesc="systemd from git"
-pkgver=230.r197.g7f40134
-pkgrel=2
-_branch='master'
+pkgver=232.r485.g4b2419165
+pkgrel=1
+branch='master'
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
'intltool' 'iptables' 'kmod' 'libcap' 'libidn' 'libgcrypt'
'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git')
-options=('strip' 'debug')
-source=("git://github.com/systemd/systemd.git#branch=${_branch}"
+options=('strip')
+source=("systemd-git::git://github.com/systemd/systemd.git#branch=${branch}"
'initcpio-hook-udev'
'initcpio-install-systemd'
'initcpio-install-udev'
'arch.conf'
'loader.conf'
-# 'splash-arch.bmp'
- 'udev-hwdb.hook')
-md5sums=('SKIP'
- '90ea67a7bb237502094914622a39e281'
- 'cfb3f8ea657ab24535cc061bb38ec4c1'
- '1b3aa3a0551b08af9305d33f85b5c2fc'
- '20ead378f5d6df4b2a3e670301510a7d'
- 'ddaef54f68f6c86c6c07835fc668f62a'
- 'a475a5ed8f03fb0f6b58b4684998d05c')
+ 'udev-hwdb.hook'
+ 'systemd-user.pam')
+sha512sums=('SKIP'
+ 'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73'
+ '52af734947a768758d5eb3f18e31a1cfec6699eca6fa10e40b90c7f11991509186c0a696e3490af3eaba80064ea4cb93e041579abf05addf072d294300aa4b28'
+ 'fec639de0d99967ed3e67289eff5ff78fff0c5829d350e73bed536a8391f1daa1d118d72dbdc1f480ffd33fc22b72f4817d0973bd09ec7f182fd26ad87b24355'
+ '61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
+ 'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
+ '888ab01bc6e09beb08d7126472c34c9e1aa35ea34e62a09e900ae34c93b1de2fcc988586efd8d0dc962393974f45c77b206d59a86cf53e370f061bf9a1b1a862'
+ 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19')
pkgver() {
- cd "${srcdir}/$_realpkgname"
+ cd "${srcdir}/$pkgbase"
# cutting off 'foo-' prefix that presents in the git tag
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- cd "$_realpkgname"
+ cd "$pkgbase"
+
+ #_validate_tag || return
if (( ${#_backports[*]} > 0 )); then
git cherry-pick -n "${_backports[@]}"
@@ -48,7 +50,7 @@ prepare() {
}
build() {
- cd "$_realpkgname"
+ cd "$pkgbase"
local timeservers=({0..3}.arch.pool.ntp.org)
@@ -88,15 +90,7 @@ package_systemd-git() {
'quota-tools: kernel-level quota management'
'systemd-sysvcompat-git: symlink package to provide sysvinit binaries'
'polkit: allow administration as unprivileged user')
- backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf
- etc/dbus-1/system.d/org.freedesktop.hostname1.conf
- etc/dbus-1/system.d/org.freedesktop.login1.conf
- etc/dbus-1/system.d/org.freedesktop.locale1.conf
- etc/dbus-1/system.d/org.freedesktop.machine1.conf
- etc/dbus-1/system.d/org.freedesktop.timedate1.conf
- etc/dbus-1/system.d/org.freedesktop.import1.conf
- etc/dbus-1/system.d/org.freedesktop.network1.conf
- etc/pam.d/systemd-user
+ backup=(etc/pam.d/systemd-user
etc/systemd/coredump.conf
etc/systemd/journald.conf
etc/systemd/journal-remote.conf
@@ -109,7 +103,7 @@ package_systemd-git() {
etc/udev/udev.conf)
install="systemd-git.install"
- make -C "$_realpkgname" DESTDIR="$pkgdir" install
+ make -C "$pkgbase" DESTDIR="$pkgdir" install
# don't write units to /etc by default. some of these will be re-enabled on
# post_install.
@@ -119,7 +113,7 @@ package_systemd-git() {
rm -r "$pkgdir/usr/lib/rpm"
# add back tmpfiles.d/legacy.conf
- install -m644 "$_realpkgname/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
+ install -m644 "$pkgbase/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d"
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
sed -i 's#GROUP="dialout"#GROUP="uucp"#g;
@@ -141,9 +135,6 @@ package_systemd-git() {
# we'll create this on installation
rmdir "$pkgdir/var/log/journal/remote"
- # fix pam file
- sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user"
-
# ship default policy to leave services disabled
echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
@@ -159,6 +150,9 @@ package_systemd-git() {
#install -Dm644 "$srcdir/splash-arch.bmp" "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp
install -Dm644 "$srcdir/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook"
+
+ # overwrite the systemd-user PAM configuration with our own
+ install -Dm644 systemd-user.pam "$pkgdir/etc/pam.d/systemd-user"
}
package_libsystemd-git() {
@@ -168,7 +162,7 @@ package_libsystemd-git() {
provides=('libsystemd.so' 'libudev.so' 'libsystemd')
conflicts=('libsystemd')
- make -C "$_realpkgname" DESTDIR="$pkgdir" install-libLTLIBRARIES
+ make -C "$pkgbase" DESTDIR="$pkgdir" install-rootlibLTLIBRARIES
}
package_systemd-sysvcompat-git() {
@@ -181,7 +175,7 @@ package_systemd-sysvcompat-git() {
install -dm755 "$pkgdir"/usr/share/man/man8
cp -d --no-preserve=ownership,timestamp \
- "$_realpkgname"/man/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
+ "$pkgbase"/man/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
"$pkgdir"/usr/share/man/man8
install -dm755 "$pkgdir/usr/bin"
diff --git a/initcpio-install-systemd b/initcpio-install-systemd
index d8d30aa3d719..f6d0afdb8285 100644
--- a/initcpio-install-systemd
+++ b/initcpio-install-systemd
@@ -93,6 +93,13 @@ add_systemd_unit() {
fi
}
+add_systemd_drop_in() {
+ local unit=$1 dropin_name=$2
+
+ mkdir -p "$BUILDROOT/etc/systemd/system/$unit.d"
+ cat >"$BUILDROOT/etc/systemd/system/$unit.d/$2.conf"
+}
+
build() {
local rules unit
@@ -100,6 +107,7 @@ build() {
add_binary /bin/mount
add_binary /usr/bin/kmod /usr/bin/modprobe
add_binary /usr/lib/systemd/systemd /init
+ add_binary /usr/bin/sulogin
map add_binary \
/usr/bin/systemd-tmpfiles \
@@ -139,12 +147,15 @@ build() {
systemd-journald.service \
systemd-journald-audit.socket \
systemd-journald-dev-log.socket \
+ systemd-modules-load.service \
systemd-tmpfiles-setup-dev.service \
systemd-udev-trigger.service \
systemd-udevd-control.socket \
systemd-udevd-kernel.socket \
systemd-udevd.service \
- timers.target
+ timers.target \
+ rescue.target \
+ emergency.target
add_symlink "/usr/lib/systemd/system/default.target" "initrd.target"
add_symlink "/usr/lib/systemd/system/ctrl-alt-del.target" "reboot.target"
@@ -152,14 +163,29 @@ build() {
# udev wants /etc/group since it doesn't launch with --resolve-names=never
add_file "/etc/nsswitch.conf"
add_binary "$(readlink -f /usr/lib/libnss_files.so)"
- add_file "/etc/passwd"
- add_file "/etc/group"
+
+ echo "root:x:0:0:root:/:/bin/sh" >"$BUILDROOT/etc/passwd"
+ echo "root:x:0:root" >"$BUILDROOT/etc/group"
+ echo "root::::::::" >"$BUILDROOT/etc/shadow"
+
+ add_systemd_drop_in systemd-udevd.service resolve-names <<EOF
+[Service]
+ExecStart=
+ExecStart=/usr/lib/systemd/systemd-udevd --resolve-names=never
+EOF
+
+ add_dir "/etc/modules-load.d"
+ (
+ . "$_f_config"
+ set -f
+ printf "%s\n" $MODULES >"$BUILDROOT/etc/modules-load.d/MODULES.conf"
+ )
}
help() {
cat <<HELPEOF
This will install a basic systemd setup in your initramfs, and is meant to
-replace the 'base', 'usr', 'udev' and 'timestamp' hooks. Other hooks with runtime
+replace the 'base', 'usr', 'udev' and 'resume' hooks. Other hooks with runtime
components will need to be ported, and will not work as intended. You also may
wish to still include the 'base' hook (before this hook) to ensure that a
rescue shell exists on your initramfs.
diff --git a/systemd-git.install b/systemd-git.install
index 60d0cfb5ad62..b59de2008a1c 100644
--- a/systemd-git.install
+++ b/systemd-git.install
@@ -4,142 +4,17 @@ sd_booted() {
[[ -d run/systemd/system && ! -L run/systemd/system ]]
}
-add_privs() {
- if ! setcap "$2" "$1" 2>/dev/null; then
- echo "==> Warning: setcap failed, falling back to setuid root on /$1"
- chmod u+s "$1"
- fi
-}
-
add_journal_acls() {
# ignore errors, since the filesystem might not support ACLs
setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null
:
}
-maybe_reexec() {
- # don't reexec on 209-1 upgrade due to large infrastructural changes.
- if [[ $(vercmp 209-1 "$2") -eq 1 ]]; then
- echo ':: systemd has not been reexecuted. It is recommended that you'
- echo ' reboot at your earliest convenience.'
- return
- fi
-
- if sd_booted; then
- systemctl --system daemon-reexec
- fi
-}
-
-_dir_empty() {
- set -- "$1"/*
- [[ ! -e $1 && ! -L $1 ]]
-}
-
post_common() {
systemd-sysusers
journalctl --update-catalog
}
-_204_1_changes() {
- printf '==> The /bin/systemd symlink has been removed. Any references in your\n'
- printf ' bootloader (or elsewhere) must be updated to /usr/lib/systemd/systemd.\n'
-}
-
-_205_1_changes() {
- printf '==> systemd 205 restructures the cgroup hierarchy and changes internal\n'
- printf ' protocols. You should reboot at your earliest convenience.\n'
-}
-
-_206_1_changes() {
- printf '==> The "timestamp" hook for mkinitcpio no longer exists. If you used\n'
- printf ' this hook, you must remove it from /etc/mkinitcpio.conf. A "systemd"\n'
- printf ' hook has been added which provides this functionality, and more.\n'
-}
-
-_208_1_changes() {
- if [[ -e var/lib/backlight && ! -e var/lib/systemd/backlight ]]; then
- mv -T var/lib/backlight var/lib/systemd/backlight
- fi
-
- if [[ -e var/lib/random-seed && ! -e var/lib/systemd/random-seed ]]; then
- mv -T var/lib/random-seed var/lib/systemd/random-seed
- fi
-}
-
-_208_8_changes() {
- add_journal_acls
-}
-
-_209_1_changes() {
- # attempt to preserve existing behavior
-
- local old_rule=etc/udev/rules.d/80-net-name-slot.rules
- local new_rule=etc/udev/rules.d/80-net-setup-link.rules
-
- echo ":: Network device naming is now controlled by udev's net_setup_link"
- echo " builtin. Refer to the systemd.link manpage for a full description."
-
- # not clear what action we can take here, so don't do anything
- [[ -e $new_rule ]] && return 0
-
- # rename the old rule to the new one so that we preserve the user's
- # existing option.
- if [[ -e $old_rule ]]; then
- printf ':: Renaming %s to %s in order\n' "${old_rule##*/}" "${new_rule##*/}"
- printf ' to preserve existing network naming behavior.\n'
- mv -v "$old_rule" "$new_rule"
- else
- echo ':: No changes have been made to your network naming configuration.'
- echo ' Interfaces should continue to maintain the same names.'
- fi
-}
-
-_210_1_changes() {
- if sd_booted; then
- # If /etc/systemd/network is non-empty, then this is a 209 user who used
- # networkd. Re-enable it for them.
- if ! _dir_empty etc/systemd/network; then
- systemctl enable systemd-networkd
- fi
- fi
-}
-
-_213_4_changes() {
- if sd_booted; then
- # if /etc/resolv.conf is a symlink, just assume that it was being managed
- # by systemd-networkd, and re-enable systemd-resolved.
- if [[ -L etc/resolv.conf ]]; then
- systemctl enable systemd-resolved
- fi
- fi
-}
-
-_214_2_changes() {
- # /run/systemd/network/resolv.conf -> /run/systemd/resolve/resolv.conf
- if [[ etc/resolv.conf -ef run/systemd/network/resolv.conf ]]; then
- ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
-
- if sd_booted; then
- if [[ ! -d run/systemd/resolve ]]; then
- mkdir run/systemd/resolve
- fi
-
- if [[ -f run/systemd/network/resolv.conf ]]; then
- mv run/systemd/{network,resolve}/resolv.conf
- fi
- fi
- fi
-
- echo ':: coredumps are no longer sent to the journal by default. To re-enable:'
- echo ' echo >/etc/sysctl.d/50-coredump.conf \'
- echo ' "kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e"'
-}
-
-_215_2_changes() {
- # create at least the symlink from /etc/os-release to /usr/lib/os-release
- systemd-tmpfiles --create etc.conf
-}
-
_216_2_changes() {
echo ':: Coredumps are handled by systemd by default. Collection behavior can be'
echo ' tuned in /etc/systemd/coredump.conf.'
@@ -182,22 +57,18 @@ post_install() {
post_upgrade() {
post_common "$@"
- maybe_reexec "$@"
-
- local v upgrades=(204-1
- 205-1
- 206-1
- 208-1
- 208-8
- 209-1
- 210-1
- 213-4
- 214-2
- 215-2
- 216-2
- 219-2
- 219-4
- 230-1)
+ # don't reexec if the old version is 231-1 or 231-2.
+ # https://github.com/systemd/systemd/commit/bd64d82c1c
+ if [[ $1 != 231-[12] ]] && sd_booted; then
+ systemctl --system daemon-reexec
+ fi
+
+ local v upgrades=(
+ 216-2
+ 219-2
+ 219-4
+ 230-1
+ )
for v in "${upgrades[@]}"; do
if [[ $(vercmp "$v" "$2") -eq 1 ]]; then
diff --git a/systemd-user.pam b/systemd-user.pam
new file mode 100644
index 000000000000..83f762696e0e
--- /dev/null
+++ b/systemd-user.pam
@@ -0,0 +1,5 @@
+# Used by systemd --user instances.
+
+account include system-login
+session required pam_loginuid.so
+session include system-login