From 5a1d06453f6dbddd543f34a005556aaa8888f6c0 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 5 Aug 2012 21:40:07 -0400 Subject: [PATCH] systemd-git: track "missing" files, bump PKGBUILD --- systemd-git/PKGBUILD | 28 ++++++------- systemd-git/initcpio-hook-udev | 20 ++++++++++ systemd-git/locale.sh | 60 ++++++++++++++++++++++++++++ systemd-git/systemd.install | 7 ++-- systemd-git/use-split-usr-path.patch | 14 +++++++ 5 files changed, 111 insertions(+), 18 deletions(-) create mode 100644 systemd-git/initcpio-hook-udev create mode 100644 systemd-git/locale.sh create mode 100644 systemd-git/use-split-usr-path.patch diff --git a/systemd-git/PKGBUILD b/systemd-git/PKGBUILD index 6367cc1..a343757 100644 --- a/systemd-git/PKGBUILD +++ b/systemd-git/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Dave Reisner pkgname=systemd-git -pkgver=20120604 +pkgver=20120730 pkgrel=1 pkgdesc="system and service manager" arch=('i686' 'x86_64') @@ -9,13 +9,11 @@ url="http://www.freedesktop.org/wiki/Software/systemd" license=('GPL2' 'LGPL2.1' 'MIT') depends=('acl' 'dbus-core' 'glib2' 'hwids' 'kbd' 'kmod' 'libcap' 'pam' 'util-linux' 'xz') makedepends=('docbook-xsl' 'git' 'gobject-introspection' 'gperf' - 'gtk-doc' 'intltool' 'libxslt') + 'gtk-doc' 'intltool' 'libxslt' 'python2') optdepends=('cryptsetup: required for encrypted block devices' - 'dbus-python: systemd-analyze' - 'initscripts: legacy hostname, locale, and vconsole support' - 'selinux-usr-libselinux: integration with security enhanced Linux' - 'systemd-arch-units-git: collection of native unit files for Arch daemon/init scripts' - 'tcp_wrappers: filter remote access to services') + 'python-cairo: systemd-analyze' + 'python-dbus: systemd-analyze' + 'systemd-arch-units: collection of native unit files for Arch daemon/init scripts') provides=('systemd' 'libsystemd' 'systemd-sysvcompat' 'systemd-tools' 'udev=999') conflicts=('systemd' 'libsystemd' 'systemd-sysvcompat' 'systemd-tools' 'sysvinit' 'initscripts' 'udev') groups=('systemd') @@ -31,11 +29,13 @@ backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf etc/systemd/journald.conf etc/udev/udev.conf) install='systemd.install' -source=('locale.sh' +source=('use-split-usr-path.patch' + 'locale.sh' 'initcpio-hook-udev' 'initcpio-install-udev' 'initcpio-install-timestamp') -md5sums=('f15956945052bb911e5df81cf5e7e5dc' +md5sums=('482dba45a783f06c2239f1355f4ce72f' + 'f15956945052bb911e5df81cf5e7e5dc' 'e99e9189aa2f6084ac28b8ddf605aeb8' '59e91c4d7a69b7bf12c86a9982e37ced' 'df69615503ad293c9ddf9d8b7755282d') @@ -50,7 +50,7 @@ build() { cd $_gitname && git pull origin msg "The local files are updated." else - git clone $_gitroot $_gitname + git clone "$_gitroot" "$_gitname" fi msg "GIT checkout done or server timeout" @@ -60,12 +60,14 @@ build() { git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" cd "$srcdir/$_gitname-build" + patch -Np1 <"$srcdir/use-split-usr-path.patch" + ./autogen.sh ./configure \ + PYTHON=python2 \ --libexecdir=/usr/lib \ --localstatedir=/var \ --sysconfdir=/etc \ - --enable-split-usr \ --enable-introspection \ --enable-gtk-doc \ --disable-audit \ @@ -89,7 +91,6 @@ package() { # compat symlinks install -dm755 "$pkgdir"/{,s}bin ln -s ../usr/lib/systemd/systemd "$pkgdir/bin/systemd" - ln -s ../usr/bin/udevadm "$pkgdir/sbin/udevadm" install -dm755 "$pkgdir/sbin" for tool in runlevel reboot shutdown poweroff halt telinit; do @@ -100,9 +101,6 @@ package() { # systemd-wide user locale install -Dm755 "$srcdir/locale.sh" "$pkgdir/etc/profile.d/locale.sh" - # fix systemd-analyze for python2 - sed -i '1s/python$/python2/' "$pkgdir/usr/bin/systemd-analyze" - # fix .so links in manpage stubs find "$pkgdir/usr/share/man" -type f -name '*.[[:digit:]]' \ -exec sed -ri '1s|^\.so (.*)\.([0-9]+)|.so man\2/\1.\2|' {} + diff --git a/systemd-git/initcpio-hook-udev b/systemd-git/initcpio-hook-udev new file mode 100644 index 0000000..75da7e4 --- /dev/null +++ b/systemd-git/initcpio-hook-udev @@ -0,0 +1,20 @@ +#!/usr/bin/ash + +run_earlyhook() { + udevd --daemon --resolve-names=never + udevd_running=1 +} + +run_hook() { + msg ":: Triggering uevents..." + udevadm trigger --action=add --type=subsystems + udevadm trigger --action=add --type=devices + udevadm settle +} + +run_cleanuphook() { + udevadm control --exit + udevadm info --cleanup-db +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/systemd-git/locale.sh b/systemd-git/locale.sh new file mode 100644 index 0000000..a4c413e --- /dev/null +++ b/systemd-git/locale.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +if [ ! -r /etc/locale.conf ]; then + return +fi + +. /etc/locale.conf + +if [ "${LANG+x}" = 'x' ]; then + export LANG +fi + +if [ "${LC_CTYPE+x}" = 'x' ]; then + export LC_CTYPE +fi + +if [ "${LC_NUMERIC+x}" = 'x' ]; then + export LC_NUMERIC +fi + +if [ "${LC_TIME+x}" = 'x' ]; then + export LC_TIME +fi + +if [ "${LC_COLLATE+x}" = 'x' ]; then + export LC_COLLATE +fi + +if [ "${LC_MONETARY+x}" = 'x' ]; then + export LC_MONETARY +fi + +if [ "${LC_MESSAGES+x}" = 'x' ]; then + export LC_MESSAGES +fi + +if [ "${LC_PAPER+x}" = 'x' ]; then + export LC_PAPER +fi + +if [ "${LC_NAME+x}" = 'x' ]; then + export LC_NAME +fi + +if [ "${LC_ADDRESS+x}" = 'x' ]; then + export LC_ADDRESS +fi + +if [ "${LC_TELEPHONE+x}" = 'x' ]; then + export LC_TELEPHONE +fi + +if [ "${LC_MEASUREMENT+x}" = 'x' ]; then + export LC_MEASUREMENT +fi + +if [ "${LC_IDENTIFICATION+x}" = 'x' ]; then + export LC_IDENTIFICATION +fi + diff --git a/systemd-git/systemd.install b/systemd-git/systemd.install index ec16ea8..77bb424 100644 --- a/systemd-git/systemd.install +++ b/systemd-git/systemd.install @@ -11,10 +11,11 @@ machine_id_setup() { } post_install() { - machine_id_setup + # enable getty@tty1 by default, but don't track the file + systemctl enable getty@.service - echo "systemd has been installed to /bin/systemd. Please ensure you append" - echo "init=/bin/systemd to your kernel command line in your bootloader." + echo ":: Append 'init=/bin/systemd' to your kernel command line in your" + echo " bootloader to replace sysvinit with systemd" } post_upgrade() { diff --git a/systemd-git/use-split-usr-path.patch b/systemd-git/use-split-usr-path.patch new file mode 100644 index 0000000..057045b --- /dev/null +++ b/systemd-git/use-split-usr-path.patch @@ -0,0 +1,14 @@ +--- a/src/core/main.c 2012-07-17 19:46:24.000000000 -0400 ++++ b/src/core/main.c 2012-07-27 10:04:13.000000000 -0400 +@@ -1379,11 +1379,7 @@ + + /* Set up PATH unless it is already set */ + setenv("PATH", +-#ifdef HAVE_SPLIT_USR + "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", +-#else +- "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", +-#endif + arg_running_as == MANAGER_SYSTEM); + + if (arg_running_as == MANAGER_SYSTEM) {