summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2011-07-30 18:16:57 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2011-07-30 18:16:57 +0800
commitab40c7fb95a02afc9499fa1686b587a0ddaa1dc2 (patch)
treec9bf860b7607cae0999bc904c5926759b96baa43
parent463bad06786377cd6b977f1f304c66820b2f3057 (diff)
systemd: sync with portage
-rw-r--r--sys-apps/systemd/ChangeLog44
-rw-r--r--sys-apps/systemd/Manifest7
-rw-r--r--sys-apps/systemd/files/0003-Revert-logind-use-new-udev_enumerate_add_match_paren.patch65
-rw-r--r--sys-apps/systemd/files/0004-Revert-loginctl-use-new-udev_device_has_tag-call-fro.patch116
-rw-r--r--sys-apps/systemd/metadata.xml16
-rw-r--r--sys-apps/systemd/systemd-9999.ebuild145
6 files changed, 344 insertions, 49 deletions
diff --git a/sys-apps/systemd/ChangeLog b/sys-apps/systemd/ChangeLog
new file mode 100644
index 0000000..a9f777b
--- /dev/null
+++ b/sys-apps/systemd/ChangeLog
@@ -0,0 +1,44 @@
+# 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.9 2011/06/24 20:56:01 mgorny Exp $
+
+ 24 Jun 2011; Michał Górny <mgorny@gentoo.org> systemd-29-r1.ebuild:
+ Add systemd inherit to silence the new portage QA warning.
+
+*systemd-29-r1 (24 Jun 2011)
+
+ 24 Jun 2011; Michał Górny <mgorny@gentoo.org> -systemd-28.ebuild,
+ -systemd-29.ebuild, +systemd-29-r1.ebuild:
+ Use bash-completion eclass to install bash completion file correctly.
+ Temp-install docs to ${D}/tmp as well.
+
+*systemd-29 (17 Jun 2011)
+
+ 17 Jun 2011; Michał Górny <mgorny@gentoo.org> +systemd-29.ebuild:
+ Version bump.
+
+ 15 Jun 2011; Michał Górny <mgorny@gentoo.org> systemd-28.ebuild,
+ metadata.xml:
+ Support plymouth as requested by Christoph Brill.
+
+ 10 Jun 2011; Michał Górny <mgorny@gentoo.org> metadata.xml:
+ Switch the maintainer to systemd@g.o alias.
+
+ 08 Jun 2011; Michał Górny <mgorny@gentoo.org> systemd-28.ebuild:
+ Fix DESCRIPTION. Rely on dbus-1.4.10 to set up /etc/machine-id for us. Add a
+ warning about downsides of having /etc/mtab symlinked, reformat messages.
+
+ 07 Jun 2011; Michał Górny <mgorny@gentoo.org> systemd-28.ebuild,
+ metadata.xml:
+ Support libcryptsetup, misc fixes.
+
+ 06 Jun 2011; Robert Piasek <dagger@gentoo.org> metadata.xml:
+ Add dagger to metadata as maintainer
+
+*systemd-28 (06 Jun 2011)
+
+ 06 Jun 2011; Michał Górny <mgorny@gentoo.org> +systemd-28.ebuild,
+ +metadata.xml:
+ Introduce sys-apps/systemd wrt bug #318365. The ebuild is currently
+ hard-masked for testing.
+
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
index 956b80a..c1bd211 100644
--- a/sys-apps/systemd/Manifest
+++ b/sys-apps/systemd/Manifest
@@ -1,4 +1,7 @@
AUX 0001-Revert-Revert-Revert-fsck-add-new-l-switch-to-fsck-m.patch 1045 RMD160 f080497a39fb8d9c4a1afe46066bdba248373a72 SHA1 dfc7df7b5667a8cace130273e4137dd783966080 SHA256 55ac7ebe6f241261bd72e4d6c6eae1c8b7883cca2ef5c2d18ea7da6addbdba18
AUX 0002-never-umount-lib-rc-init.d.patch 803 RMD160 6e62d9631496984ff8b7c8938e279f1f43439ce8 SHA1 5a377c49813fb390022cde987acbbf528b7a3f55 SHA256 eccc3ba9ea0172bf6a7eae8ad9b823275b3e7a319a1688f22a452f649ba8c310
-EBUILD systemd-9999.ebuild 1690 RMD160 69f9232ce0ac95f2a727acc8ebc02600590d22e2 SHA1 ca50fbaa68620a50e86e542c5a772894ec1cda93 SHA256 82cc00356b83be9ff8472aebf8cb8d3407e39a5d6d52d7a71dc45f4f4be5469e
-MISC metadata.xml 285 RMD160 a394b62e33a5c004c74938e8105bd29b135dc6bc SHA1 672d2415dd51ce2c12c36c659c7926a9b2345fed SHA256 0d6905daec8d05c9a874142bfcc3084691ba54df9328d04bd7dd5a9f64ff4c54
+AUX 0003-Revert-logind-use-new-udev_enumerate_add_match_paren.patch 1893 RMD160 05c4dc35aea2b109fabe2fe8873107e31c5ac488 SHA1 bf881e6c3ba08d7ab70e3c88ea35ffacbe36bc0f SHA256 5160e982bb4da3b7a016ff4776d356c77e9ee9f9ea7ce57041cb428fd84e738c
+AUX 0004-Revert-loginctl-use-new-udev_device_has_tag-call-fro.patch 3788 RMD160 33ff6f15a9eeecd644848260ccb3847be5f070f9 SHA1 0a9852ea5a4b04407b6537c0ac4c975677aebb9f SHA256 b7ed863ff9675b680ab333c1b808365e63b10629b503045c0b9dd9f68cfd97af
+EBUILD systemd-9999.ebuild 3878 RMD160 dcd04ebe13215e0ffe806298015e05fe26fe5cf3 SHA1 d69edbc8d4b65df2b46f48e35245fd4c99d09675 SHA256 225e0095efcbb83b929a6baf598aee56d4d618267ed2738aa41e8484eada493a
+MISC ChangeLog 1624 RMD160 94503486a7be92493a8afa8fc72337b19dd3cfa9 SHA1 2adf0d3ef152ceaf342d598c138fd86a20f6e0f5 SHA256 aebdc6e74d77a5f172ed5ea77fde1dbfa2a48f0da04a8654bc7b862b44bfd9c7
+MISC metadata.xml 524 RMD160 d51fb3f45aefd84a637f2f67cead553e12d389ab SHA1 4f86cab283737af9e58633d466e2588d80bec18c SHA256 0ee1c96fc4604189104897c95e2ded166e55be2e04af40523b2afb5564dbbe33
diff --git a/sys-apps/systemd/files/0003-Revert-logind-use-new-udev_enumerate_add_match_paren.patch b/sys-apps/systemd/files/0003-Revert-logind-use-new-udev_enumerate_add_match_paren.patch
new file mode 100644
index 0000000..09e367e
--- /dev/null
+++ b/sys-apps/systemd/files/0003-Revert-logind-use-new-udev_enumerate_add_match_paren.patch
@@ -0,0 +1,65 @@
+From 1f2227e01475ca98aa57f7ae4a883d0b580e71f3 Mon Sep 17 00:00:00 2001
+From: Luo Jinghua <sunmoon1997@gmail.com>
+Date: Sat, 30 Jul 2011 17:29:34 +0800
+Subject: [PATCH 2/3] Revert "logind: use new
+ udev_enumerate_add_match_parent() where applicable"
+
+This reverts commit 2eb916cdff570a2ce741fc9b40d7316a77c57c27.
+
+Conflicts:
+
+ src/logind-dbus.c
+ src/logind.h
+---
+ src/logind-dbus.c | 14 +++++---------
+ 1 files changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/src/logind-dbus.c b/src/logind-dbus.c
+index b8f7d67..ae5dc29 100644
+--- a/src/logind-dbus.c
++++ b/src/logind-dbus.c
+@@ -562,7 +562,7 @@ fail:
+ return r;
+ }
+
+-static int trigger_device(Manager *m, struct udev_device *d) {
++static int trigger_device(Manager *m, const char *prefix) {
+ struct udev_enumerate *e;
+ struct udev_list_entry *first, *item;
+ int r;
+@@ -575,13 +575,6 @@ static int trigger_device(Manager *m, struct udev_device *d) {
+ goto finish;
+ }
+
+- if (d) {
+- if (udev_enumerate_add_match_parent(e, d) < 0) {
+- r = -EIO;
+- goto finish;
+- }
+- }
+-
+ if (udev_enumerate_scan_devices(e) < 0) {
+ r = -EIO;
+ goto finish;
+@@ -594,6 +587,9 @@ static int trigger_device(Manager *m, struct udev_device *d) {
+
+ p = udev_list_entry_get_name(item);
+
++ if (prefix && !path_startswith(p, prefix))
++ continue;
++
+ t = strappend(p, "/uevent");
+ if (!t) {
+ r = -ENOMEM;
+@@ -653,7 +649,7 @@ static int attach_device(Manager *m, const char *seat, const char *sysfs) {
+ if (r < 0)
+ goto finish;
+
+- r = trigger_device(m, d);
++ r = trigger_device(m, sysfs);
+
+ finish:
+ free(rule);
+--
+1.7.6
+
diff --git a/sys-apps/systemd/files/0004-Revert-loginctl-use-new-udev_device_has_tag-call-fro.patch b/sys-apps/systemd/files/0004-Revert-loginctl-use-new-udev_device_has_tag-call-fro.patch
new file mode 100644
index 0000000..ef31d16
--- /dev/null
+++ b/sys-apps/systemd/files/0004-Revert-loginctl-use-new-udev_device_has_tag-call-fro.patch
@@ -0,0 +1,116 @@
+From 0ba8151265f46164fa509b6a326b141857b0b1a1 Mon Sep 17 00:00:00 2001
+From: Luo Jinghua <sunmoon1997@gmail.com>
+Date: Sat, 30 Jul 2011 17:30:49 +0800
+Subject: [PATCH 3/3] Revert "loginctl: use new udev_device_has_tag() call
+ from libudev where applicable"
+
+This reverts commit 309c2a2ce95aae54879b4957d113f03608530c15.
+
+Conflicts:
+
+ src/logind.h
+---
+ configure.ac | 2 +-
+ src/logind-dbus.c | 19 ++++++++++++++++++-
+ src/sysfs-show.c | 21 +++++++++++++++++++--
+ 3 files changed, 38 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2641de6..75dd15f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -123,7 +123,7 @@ AC_SUBST(CAP_LIBS)
+ # This makes sure pkg.m4 is available.
+ m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+
+-PKG_CHECK_MODULES(UDEV, [ libudev >= 172 ])
++PKG_CHECK_MODULES(UDEV, [ libudev >= 160 ])
+ AC_SUBST(UDEV_CFLAGS)
+ AC_SUBST(UDEV_LIBS)
+
+diff --git a/src/logind-dbus.c b/src/logind-dbus.c
+index ae5dc29..f5ae516 100644
+--- a/src/logind-dbus.c
++++ b/src/logind-dbus.c
+@@ -562,6 +562,23 @@ fail:
+ return r;
+ }
+
++static bool device_has_tag(struct udev_device *d, const char *tag) {
++ struct udev_list_entry *first, *item;
++
++ assert(d);
++ assert(tag);
++
++ /* FIXME */
++ udev_device_get_is_initialized(d);
++
++ first = udev_device_get_tags_list_entry(d);
++ udev_list_entry_foreach(item, first)
++ if (streq(udev_list_entry_get_name(item), tag))
++ return true;
++
++ return false;
++}
++
+ static int trigger_device(Manager *m, const char *prefix) {
+ struct udev_enumerate *e;
+ struct udev_list_entry *first, *item;
+@@ -623,7 +640,7 @@ static int attach_device(Manager *m, const char *seat, const char *sysfs) {
+ if (!d)
+ return -ENODEV;
+
+- if (!udev_device_has_tag(d, "seat")) {
++ if (!device_has_tag(d, "seat")) {
+ r = -ENODEV;
+ goto finish;
+ }
+diff --git a/src/sysfs-show.c b/src/sysfs-show.c
+index ab866a4..b456bf1 100644
+--- a/src/sysfs-show.c
++++ b/src/sysfs-show.c
+@@ -26,6 +26,23 @@
+ #include "util.h"
+ #include "sysfs-show.h"
+
++static bool device_has_tag(struct udev_device *d, const char *tag) {
++ struct udev_list_entry *first, *item;
++
++ assert(d);
++ assert(tag);
++
++ /* FIXME */
++ udev_device_get_is_initialized(d);
++
++ first = udev_device_get_tags_list_entry(d);
++ udev_list_entry_foreach(item, first)
++ if (streq(udev_list_entry_get_name(item), tag))
++ return true;
++
++ return false;
++}
++
+ static int show_sysfs_one(
+ struct udev *udev,
+ const char *seat,
+@@ -60,7 +77,7 @@ static int show_sysfs_one(
+ sn = "seat0";
+
+ /* fixme, also check for tag 'seat' here */
+- if (!streq(seat, sn) || !udev_device_has_tag(d, "seat")) {
++ if (!streq(seat, sn) || !device_has_tag(d, "seat")) {
+ udev_device_unref(d);
+ *item = udev_list_entry_get_next(*item);
+ continue;
+@@ -92,7 +109,7 @@ static int show_sysfs_one(
+ if (isempty(lookahead_sn))
+ lookahead_sn = "seat0";
+
+- found = streq(seat, lookahead_sn) && udev_device_has_tag(lookahead_d, "seat");
++ found = streq(seat, lookahead_sn) && device_has_tag(lookahead_d, "seat");
+ udev_device_unref(lookahead_d);
+
+ if (found)
+--
+1.7.6
+
diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml
index f2675b9..5af7c34 100644
--- a/sys-apps/systemd/metadata.xml
+++ b/sys-apps/systemd/metadata.xml
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>no-herd</herd>
-<maintainer><email>sunmoon1997@gmail.com</email></maintainer>
-<use>
- <flag name='tcpwrap'>support the tcpwrap</flag>
-</use>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>systemd@gentoo.org</email>
+ <name>Gentoo systemd team</name>
+ </maintainer>
+ <use>
+ <!-- XXX: describe those two better -->
+ <flag name='audit'>Enable support for <pkg>sys-process/audit</pkg></flag>
+ <flag name='cryptsetup'>Use libcryptsetup</flag>
+ <flag name='plymouth'>Enable support for <pkg>sys-boot/plymouth</pkg></flag>
+ </use>
</pkgmetadata>
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
index 358555f..b160ac8 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -1,78 +1,139 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=3
+EAPI=4
-inherit autotools git
+inherit autotools bash-completion linux-info pam systemd git
EGIT_BRANCH="master"
EGIT_REPO_URI="git://anongit.freedesktop.org/systemd"
-DESCRIPTION="Systemd : rethinking PID 1"
+DESCRIPTION="System and service manager for Linux"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="gtk pam +tcpwrap selinux"
-
-RDEPEND="
- >=sys-apps/dbus-1.3.2
- dev-libs/dbus-glib
- >=sys-fs/udev-160
- >=sys-kernel/linux-headers-2.6.32
- sys-libs/libcap
- gtk? ( >=x11-libs/gtk+-2.20 )
- tcpwrap? ( sys-apps/tcp-wrappers )
- pam? ( virtual/pam )
- >=dev-lang/vala-0.8
- >=app-admin/syslog-ng-3"
-DEPEND="${RDEPEND}
- app-text/docbook-xml-dtd:4.2
- app-text/docbook-xsl-stylesheets
- app-text/build-docbook-catalog
- dev-libs/libxslt"
-
-CFLAGS+=" -g -O0"
-WANT_AUTOMAKE=1.11
+IUSE="audit cryptsetup gtk pam plymouth selinux tcpd"
-pkg_setup() {
- enewgroup lock
+COMMON_DEPEND=">=sys-apps/dbus-1.4.10
+ >=sys-fs/udev-171
+ >=sys-apps/util-linux-2.19
+ 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.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/systemd-dbus
+ !!sys-apps/systemd-udev
+ !<sys-apps/openrc-0.8.3"
+DEPEND="${COMMON_DEPEND}
+ gtk? ( dev-lang/vala:${VALASLOT} )
+ >=sys-kernel/linux-headers-${MINKV}"
+
+pkg_pretend() {
+ local CONFIG_CHECK="AUTOFS4_FS CGROUPS DEVTMPFS ~FANOTIFY ~IPV6"
+ linux-info_pkg_setup
+ kernel_is -ge ${MINKV//./ } || die "Kernel version at least ${MINKV} required"
}
-src_unpack() {
- git_src_unpack
+pkg_setup() {
+ enewgroup lock # used by var-lock.mount
+ enewgroup tty 5 # used by mount-setup for /dev/pts
}
src_prepare() {
git_src_prepare
+ # Force the rebuild of .vala sources
+ #touch src/*.vala || die
epatch "${FILESDIR}"/*.patch
eautoreconf
+ intltoolize -c -f
}
src_configure() {
- econf --with-distro=gentoo \
+ if use gtk; then
+ export VALAC="$(type -p valac-${VALASLOT})"
+ fi
+
+ econf --with-distro=gentoo \
+ --with-rootdir= \
+ --localstatedir=/var \
+ --docdir=/tmp/docs \
+ $(use_enable audit) \
+ $(use_enable cryptsetup libcryptsetup) \
$(use_enable gtk) \
- --prefix=/usr \
- --with-rootdir=/ \
$(use_enable pam) \
$(use_enable selinux) \
- $(use_enable tcpwrap)
+ $(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)
}
src_install() {
- # make sure all directory are created
- mkdir -p "${D}"/cgroup/{cpu,cpuacct,cpuset,debug,devices,freezer,memory,ns,systemd}
- emake DESTDIR="${D}" install
+ emake DESTDIR="${D}" bashcompletiondir=/tmp install
+
+ # move files as necessary
+ dobashcompletion "${D}"/tmp/systemctl-bash-completion.sh
+ dodoc "${D}"/tmp/docs/*
+ rm -rf "${D}"/tmp || die
+
+ cd "${D}"/usr/share/man/man8/
+ for i in halt poweroff reboot runlevel shutdown telinit; do
+ mv ${i}.8 systemd.${i}.8 || die
+ done
+
if ! use selinux; then
rm "${D}"/lib/systemd/system/sysinit.target.wants/sys-kernel-security.automount
fi
- dodoc "${D}/usr/share/doc/systemd"/* && \
- rm -r "${D}/usr/share/doc/systemd/"
- cd "${D}/usr/share/man/man8"
- for i in halt poweroff reboot runlevel shutdown telinit; do
- mv "${i}.8" "systemd.${i}.8"
- done
+
+ # Drop the .pc file to avoid automagic depends.
+ # This a temporary workaround for gx86 packages.
+ rm -f "${D}"/usr/share/pkgconfig/systemd.pc || die
+
+ keepdir /run
+}
+
+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
+
+ 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."
}