summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-01-06 10:19:44 +0000
committerMichał Górny <mgorny@gentoo.org>2012-01-06 10:19:44 +0000
commita4f19721fd717a8c4f68a49950b94cb34af6d9fe (patch)
tree0678a5f982a053d9ccc57827db5328fd6e4bbdb0 /sys-apps
parentEmpty py-compile script instead of symlinking it to /path/to/true for automak... (diff)
downloadgentoo-2-a4f19721fd717a8c4f68a49950b94cb34af6d9fe.tar.gz
gentoo-2-a4f19721fd717a8c4f68a49950b94cb34af6d9fe.tar.bz2
gentoo-2-a4f19721fd717a8c4f68a49950b94cb34af6d9fe.zip
Migrate to /usr.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/systemd/ChangeLog14
-rw-r--r--sys-apps/systemd/files/update-etc-systemd-symlinks.path5
-rw-r--r--sys-apps/systemd/files/update-etc-systemd-symlinks.service6
-rwxr-xr-xsys-apps/systemd/files/update-etc-systemd-symlinks.sh19
-rw-r--r--sys-apps/systemd/systemd-29-r3.ebuild8
-rw-r--r--sys-apps/systemd/systemd-29-r4.ebuild168
-rw-r--r--sys-apps/systemd/systemd-37-r1.ebuild8
-rw-r--r--sys-apps/systemd/systemd-37-r2.ebuild170
8 files changed, 390 insertions, 8 deletions
diff --git a/sys-apps/systemd/ChangeLog b/sys-apps/systemd/ChangeLog
index 859dc2aafe79..27b5d2f4bc1a 100644
--- a/sys-apps/systemd/ChangeLog
+++ b/sys-apps/systemd/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-apps/systemd
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.16 2011/12/12 08:17:37 mgorny Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.17 2012/01/06 10:19:43 mgorny Exp $
+
+*systemd-37-r2 (06 Jan 2012)
+*systemd-29-r4 (06 Jan 2012)
+
+ 06 Jan 2012; Michał Górny <mgorny@gentoo.org> systemd-29-r3.ebuild,
+ +systemd-29-r4.ebuild, systemd-37-r1.ebuild, +systemd-37-r2.ebuild,
+ +files/update-etc-systemd-symlinks.path,
+ +files/update-etc-systemd-symlinks.service,
+ +files/update-etc-systemd-symlinks.sh:
+ Migrate to /usr.
*systemd-37-r1 (12 Dec 2011)
*systemd-29-r3 (12 Dec 2011)
diff --git a/sys-apps/systemd/files/update-etc-systemd-symlinks.path b/sys-apps/systemd/files/update-etc-systemd-symlinks.path
new file mode 100644
index 000000000000..33a95763da2a
--- /dev/null
+++ b/sys-apps/systemd/files/update-etc-systemd-symlinks.path
@@ -0,0 +1,5 @@
+[Unit]
+Description=Update /etc/systemd/system symlinks for units moved to /usr
+
+[Path]
+PathChanged=/lib/systemd/system
diff --git a/sys-apps/systemd/files/update-etc-systemd-symlinks.service b/sys-apps/systemd/files/update-etc-systemd-symlinks.service
new file mode 100644
index 000000000000..c05a19439d9b
--- /dev/null
+++ b/sys-apps/systemd/files/update-etc-systemd-symlinks.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Update /etc/systemd/system symlinks for units moved to /usr
+
+[Service]
+Type=oneshot
+ExecStart=/usr/libexec/systemd/update-etc-systemd-symlinks.sh
diff --git a/sys-apps/systemd/files/update-etc-systemd-symlinks.sh b/sys-apps/systemd/files/update-etc-systemd-symlinks.sh
new file mode 100755
index 000000000000..ce81bba58f25
--- /dev/null
+++ b/sys-apps/systemd/files/update-etc-systemd-symlinks.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Update symlinks to systemd units moved into /usr/systemd.
+# (c) 2012 Michał Górny
+# Released under the terms of the 2-clause BSD license
+
+IFS_SAVE=${IFS}
+IFS='
+'
+# follow + symlink type will match broken symlinks only
+set -- $(find -L /etc/systemd/system -type l -print)
+IFS=${IFS_SAVE}
+
+for f; do
+ old_path=$(readlink "${f}")
+ new_path=/usr/lib${old_path#/lib}
+ if [ -f "${new_path}" ]; then
+ ln -v -s -f "${new_path}" "${f}"
+ fi
+done
diff --git a/sys-apps/systemd/systemd-29-r3.ebuild b/sys-apps/systemd/systemd-29-r3.ebuild
index 3cb1a89cb052..5bb1c567d3bf 100644
--- a/sys-apps/systemd/systemd-29-r3.ebuild
+++ b/sys-apps/systemd/systemd-29-r3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-29-r3.ebuild,v 1.1 2011/12/12 08:17:37 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-29-r3.ebuild,v 1.2 2012/01/06 10:19:43 mgorny Exp $
EAPI=4
@@ -40,8 +40,10 @@ MINKV="2.6.38"
# dbus, udev versions because of systemd units
# blocker on old packages to avoid collisions with above
# openrc blocker to avoid udev rules starting openrc scripts
+# systemd blocker due to /usr migration
RDEPEND="${COMMON_DEPEND}
- !<sys-apps/openrc-0.8.3"
+ !<sys-apps/openrc-0.8.3
+ !=sys-apps/systemd-29-r4"
DEPEND="${COMMON_DEPEND}
gtk? ( dev-lang/vala:${VALASLOT} )
>=sys-kernel/linux-headers-${MINKV}"
diff --git a/sys-apps/systemd/systemd-29-r4.ebuild b/sys-apps/systemd/systemd-29-r4.ebuild
new file mode 100644
index 000000000000..11cd763edbd4
--- /dev/null
+++ b/sys-apps/systemd/systemd-29-r4.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-29-r4.ebuild,v 1.1 2012/01/06 10:19:43 mgorny Exp $
+
+EAPI=4
+
+inherit autotools-utils bash-completion-r1 linux-info pam systemd
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
+SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="audit cryptsetup gtk pam plymouth selinux tcpd"
+
+COMMON_DEPEND=">=sys-apps/dbus-1.4.10
+ >=sys-apps/util-linux-2.19
+ >=sys-fs/udev-171
+ sys-libs/libcap
+ audit? ( >=sys-process/audit-2 )
+ cryptsetup? ( sys-fs/cryptsetup )
+ gtk? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26
+ x11-libs/gtk+:2
+ >=x11-libs/libnotify-0.7 )
+ pam? ( virtual/pam )
+ plymouth? ( sys-boot/plymouth )
+ selinux? ( sys-libs/libselinux )
+ tcpd? ( sys-apps/tcp-wrappers )"
+
+# Vala-0.10 doesn't work with libnotify 0.7.1
+VALASLOT="0.14"
+# A little higher than upstream requires
+# but I had real trouble with 2.6.37 and systemd.
+MINKV="2.6.38"
+
+# dbus, udev versions because of systemd units
+# blocker on old packages to avoid collisions with above
+# openrc blocker to avoid udev rules starting openrc scripts
+RDEPEND="${COMMON_DEPEND}
+ !<sys-apps/openrc-0.8.3"
+DEPEND="${COMMON_DEPEND}
+ gtk? ( dev-lang/vala:${VALASLOT} )
+ >=sys-kernel/linux-headers-${MINKV}"
+
+# Due to vala being broken.
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ enewgroup lock # used by var-lock.mount
+ enewgroup tty 5 # used by mount-setup for /dev/pts
+}
+
+src_prepare() {
+ # Force the rebuild of .vala sources
+ touch src/*.vala || die
+
+ # Fix hardcoded path in .vala.
+ sed -i -e 's:/lib/systemd:/usr/lib/systemd:g' src/*.vala || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-distro=gentoo
+ --with-rootdir=/usr
+ --localstatedir=/var
+ --docdir=/tmp/docs
+ $(use_enable audit)
+ $(use_enable cryptsetup libcryptsetup)
+ $(use_enable gtk)
+ $(use_enable pam)
+ $(use_enable selinux)
+ $(use_enable tcpd tcpwrap)
+
+ # right now it is enabled on per-distro basis
+ # let's just hack into the check
+ $(use plymouth && echo have_plymouth=true)
+ )
+
+ if use gtk; then
+ export VALAC="$(type -p valac-${VALASLOT})"
+ fi
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install \
+ bashcompletiondir=/tmp
+
+ # compat for init= use
+ dosym ../usr/bin/systemd /bin/systemd
+
+ # move files as necessary
+ newbashcomp "${D}"/tmp/systemctl-bash-completion.sh ${PN}
+ dodoc "${D}"/tmp/docs/*
+ rm -r "${D}"/tmp || die
+
+ # we just keep sysvinit tools, so no need for the mans
+ rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
+ || die
+
+ keepdir /run
+
+ # Create /run/lock as required by new baselay/OpenRC compat.
+ insinto /usr/lib/tmpfiles.d
+ doins "${FILESDIR}"/gentoo-run.conf
+
+ # Migration helpers.
+ exeinto /usr/libexec/systemd
+ doexe "${FILESDIR}"/update-etc-systemd-symlinks.sh
+ systemd_dounit "${FILESDIR}"/update-etc-systemd-symlinks.{service,path}
+ systemd_enable_service sysinit.target update-etc-systemd-symlinks.path
+}
+
+pkg_preinst() {
+ local CONFIG_CHECK="~AUTOFS4_FS ~CGROUPS ~DEVTMPFS ~FANOTIFY ~IPV6"
+ kernel_is -ge ${MINKV//./ } || ewarn "Kernel version at least ${MINKV} required"
+ check_extra_config
+}
+
+optfeature() {
+ elog " [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1} (${2})"
+}
+
+pkg_postinst() {
+ if [[ ! -L "${ROOT}"etc/mtab ]]; then
+ ewarn "Upstream suggests that the /etc/mtab file should be a symlink to /proc/mounts."
+ ewarn "It is known to cause users being unable to unmount user mounts. If you don't"
+ ewarn "require that specific feature, please call:"
+ ewarn " $ ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'"
+ ewarn
+ fi
+
+ elog "You may need to perform some additional configuration for some programs"
+ elog "to work, see the systemd manpages for loading modules and handling tmpfiles:"
+ elog " $ man modules-load.d"
+ elog " $ man tmpfiles.d"
+ elog
+
+ elog "To get additional features, a number of optional runtime dependencies may"
+ elog "be installed:"
+ optfeature 'dev-python/dbus-python' 'for systemd-analyze'
+ optfeature 'dev-python/pycairo[svg]' 'for systemd-analyze plotting ability'
+ elog
+
+ ewarn "Please note this is a work-in-progress and many packages in Gentoo"
+ ewarn "do not supply systemd unit files yet. You are testing it on your own"
+ ewarn "responsibility. Please remember than you can pass:"
+ ewarn " init=/sbin/init"
+ ewarn "to your kernel to boot using sysvinit / OpenRC."
+
+ # Don't run it if we're outta /
+ if [[ ! ${ROOT%/} ]]; then
+ # Update symlinks to moved units.
+ sh "${FILESDIR}"/update-etc-systemd-symlinks.sh
+
+ # Try to start migration unit.
+ ebegin "Trying to start migration helper path monitoring."
+ systemctl --system start update-etc-systemd-symlinks.path 2>/dev/null
+ eend ${?}
+ fi
+}
diff --git a/sys-apps/systemd/systemd-37-r1.ebuild b/sys-apps/systemd/systemd-37-r1.ebuild
index c1df28dc5cab..62dc59ae9d2f 100644
--- a/sys-apps/systemd/systemd-37-r1.ebuild
+++ b/sys-apps/systemd/systemd-37-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-37-r1.ebuild,v 1.1 2011/12/12 08:17:37 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-37-r1.ebuild,v 1.2 2012/01/06 10:19:43 mgorny Exp $
EAPI=4
@@ -41,8 +41,10 @@ MINKV="2.6.38"
# dbus, udev versions because of systemd units
# blocker on old packages to avoid collisions with above
# openrc blocker to avoid udev rules starting openrc scripts
+# systemd blocker due to /usr migration
RDEPEND="${COMMON_DEPEND}
- !<sys-apps/openrc-0.8.3"
+ !<sys-apps/openrc-0.8.3
+ !=sys-apps/systemd-29-r4"
DEPEND="${COMMON_DEPEND}
dev-util/gperf
dev-util/intltool
diff --git a/sys-apps/systemd/systemd-37-r2.ebuild b/sys-apps/systemd/systemd-37-r2.ebuild
new file mode 100644
index 000000000000..6a6fc404077b
--- /dev/null
+++ b/sys-apps/systemd/systemd-37-r2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-37-r2.ebuild,v 1.1 2012/01/06 10:19:43 mgorny Exp $
+
+EAPI=4
+
+inherit autotools-utils bash-completion-r1 linux-info pam systemd
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
+SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="acl audit cryptsetup gtk pam plymouth selinux tcpd"
+
+COMMON_DEPEND=">=sys-apps/dbus-1.4.10
+ >=sys-apps/util-linux-2.19
+ >=sys-fs/udev-172
+ sys-libs/libcap
+ acl? ( sys-apps/acl )
+ audit? ( >=sys-process/audit-2 )
+ cryptsetup? ( sys-fs/cryptsetup )
+ gtk? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26
+ x11-libs/gtk+:2
+ >=x11-libs/libnotify-0.7 )
+ pam? ( virtual/pam )
+ plymouth? ( sys-boot/plymouth )
+ selinux? ( sys-libs/libselinux )
+ tcpd? ( sys-apps/tcp-wrappers )"
+
+# Vala-0.10 doesn't work with libnotify 0.7.1
+VALASLOT="0.12"
+# A little higher than upstream requires
+# but I had real trouble with 2.6.37 and systemd.
+MINKV="2.6.38"
+
+# dbus, udev versions because of systemd units
+# blocker on old packages to avoid collisions with above
+# openrc blocker to avoid udev rules starting openrc scripts
+RDEPEND="${COMMON_DEPEND}
+ !<sys-apps/openrc-0.8.3"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gperf
+ dev-util/intltool
+ gtk? ( dev-lang/vala:${VALASLOT} )
+ >=sys-kernel/linux-headers-${MINKV}"
+
+# Due to vala being broken.
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ enewgroup lock # used by var-lock.mount
+ enewgroup tty 5 # used by mount-setup for /dev/pts
+}
+
+src_prepare() {
+ # Force the rebuild of .vala sources
+ touch src/*.vala || die
+
+ # Fix hardcoded path in .vala.
+ sed -i -e 's:/lib/systemd:/usr/lib/systemd:g' src/*.vala || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-distro=gentoo
+ --with-rootdir=/usr
+ --with-rootlibdir=/usr/$(get_libdir)
+ --localstatedir=/var
+ --docdir=/tmp/docs
+ $(use_enable acl)
+ $(use_enable audit)
+ $(use_enable cryptsetup libcryptsetup)
+ $(use_enable gtk)
+ $(use_enable pam)
+ $(use_enable plymouth)
+ $(use_enable selinux)
+ $(use_enable tcpd tcpwrap)
+ )
+
+ if use gtk; then
+ export VALAC="$(type -p valac-${VALASLOT})"
+ fi
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install \
+ bashcompletiondir=/tmp
+
+ # compat for init= use
+ dosym ../usr/bin/systemd /bin/systemd
+
+ # move files as necessary
+ newbashcomp "${D}"/tmp/systemctl-bash-completion.sh ${PN}
+ dodoc "${D}"/tmp/docs/*
+ rm -r "${D}"/tmp || die
+
+ # we just keep sysvinit tools, so no need for the mans
+ rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
+ || die
+
+ keepdir /run
+
+ # Create /run/lock as required by new baselay/OpenRC compat.
+ insinto /usr/lib/tmpfiles.d
+ doins "${FILESDIR}"/gentoo-run.conf
+
+ # Migration helpers.
+ exeinto /usr/libexec/systemd
+ doexe "${FILESDIR}"/update-etc-systemd-symlinks.sh
+ systemd_dounit "${FILESDIR}"/update-etc-systemd-symlinks.{service,path}
+ systemd_enable_service sysinit.target update-etc-systemd-symlinks.path
+}
+
+pkg_preinst() {
+ local CONFIG_CHECK="~AUTOFS4_FS ~CGROUPS ~DEVTMPFS ~FANOTIFY ~IPV6"
+ kernel_is -ge ${MINKV//./ } || ewarn "Kernel version at least ${MINKV} required"
+ check_extra_config
+}
+
+optfeature() {
+ elog " [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1} (${2})"
+}
+
+pkg_postinst() {
+ if [[ ! -L "${ROOT}"etc/mtab ]]; then
+ ewarn "Upstream suggests that the /etc/mtab file should be a symlink to /proc/mounts."
+ ewarn "It is known to cause users being unable to unmount user mounts. If you don't"
+ ewarn "require that specific feature, please call:"
+ ewarn " $ ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'"
+ ewarn
+ fi
+
+ elog "You may need to perform some additional configuration for some programs"
+ elog "to work, see the systemd manpages for loading modules and handling tmpfiles:"
+ elog " $ man modules-load.d"
+ elog " $ man tmpfiles.d"
+ elog
+
+ elog "To get additional features, a number of optional runtime dependencies may"
+ elog "be installed:"
+ optfeature 'dev-python/dbus-python' 'for systemd-analyze'
+ optfeature 'dev-python/pycairo[svg]' 'for systemd-analyze plotting ability'
+ elog
+
+ ewarn "Please note this is a work-in-progress and many packages in Gentoo"
+ ewarn "do not supply systemd unit files yet. You are testing it on your own"
+ ewarn "responsibility. Please remember than you can pass:"
+ ewarn " init=/sbin/init"
+ ewarn "to your kernel to boot using sysvinit / OpenRC."
+
+ # Don't run it if we're outta /
+ if [[ ! ${ROOT%/} ]]; then
+ # Update symlinks to moved units.
+ sh "${FILESDIR}"/update-etc-systemd-symlinks.sh
+
+ # Try to start migration unit.
+ ebegin "Trying to start migration helper path monitoring."
+ systemctl --system start update-etc-systemd-symlinks.path 2>/dev/null
+ eend ${?}
+ fi
+}