summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-06-06 08:31:26 +0000
committerMichał Górny <mgorny@gentoo.org>2011-06-06 08:31:26 +0000
commitca022c5978de9684eb272444756e91166f44be0d (patch)
tree0986a9d0df633abc5f7d6cd29d1cc94f8b6f46e1
parentRemove old version. (diff)
downloadgentoo-2-ca022c5978de9684eb272444756e91166f44be0d.tar.gz
gentoo-2-ca022c5978de9684eb272444756e91166f44be0d.tar.bz2
gentoo-2-ca022c5978de9684eb272444756e91166f44be0d.zip
Introduce sys-apps/systemd wrt bug #318365. The ebuild is currently hard-masked for testing.
(Portage version: 2.2.0_alpha37_p23/cvs/Linux x86_64)
-rw-r--r--sys-apps/systemd/ChangeLog11
-rw-r--r--sys-apps/systemd/metadata.xml12
-rw-r--r--sys-apps/systemd/systemd-28.ebuild143
3 files changed, 166 insertions, 0 deletions
diff --git a/sys-apps/systemd/ChangeLog b/sys-apps/systemd/ChangeLog
new file mode 100644
index 000000000000..1a7e9cf086cb
--- /dev/null
+++ b/sys-apps/systemd/ChangeLog
@@ -0,0 +1,11 @@
+# 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.1 2011/06/06 08:31:26 mgorny Exp $
+
+*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/metadata.xml b/sys-apps/systemd/metadata.xml
new file mode 100644
index 000000000000..e44b596e3475
--- /dev/null
+++ b/sys-apps/systemd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name='audit'>Enable support for <pkg>sys-process/audit</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/systemd/systemd-28.ebuild b/sys-apps/systemd/systemd-28.ebuild
new file mode 100644
index 000000000000..2b3526323807
--- /dev/null
+++ b/sys-apps/systemd/systemd-28.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-28.ebuild,v 1.1 2011/06/06 08:31:26 mgorny Exp $
+
+EAPI=4
+
+inherit autotools-utils linux-info pam
+
+DESCRIPTION="systemd is a 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 gtk pam selinux tcpd"
+
+# XXX: libcryptsetup
+
+COMMON_DEPEND=">=sys-apps/dbus-1.4.8-r1
+ >=sys-fs/udev-171
+ >=sys-apps/util-linux-2.19
+ sys-libs/libcap
+ audit? ( >=sys-process/audit-2 )
+ gtk? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26
+ x11-libs/gtk+:2
+ >=x11-libs/libnotify-0.7 )
+ pam? ( virtual/pam )
+ 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"
+}
+
+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
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-distro=gentoo
+ --with-rootdir=
+ --localstatedir=/var
+ $(use_enable audit)
+ $(use_enable gtk)
+ $(use_enable pam)
+ $(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
+
+ dodoc "${D}"/usr/share/doc/systemd/*
+ rm -rf "${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 || die
+ done
+
+ # Drop the .pc file to avoid automagic depends.
+ # This a temporary workaround for gx86 packages.
+ rm -f "${D}"/usr/share/pkgconfig/systemd.pc
+
+ keepdir /run
+}
+
+check_mtab_is_symlink() {
+ if test ! -L "${ROOT}"etc/mtab; then
+ ewarn "${ROOT}etc/mtab must be a symlink to ${ROOT}proc/self/mounts!"
+ ewarn "To correct that, execute"
+ ewarn " $ ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'"
+ fi
+}
+
+systemd_machine_id_setup() {
+ einfo "Setting up /etc/machine-id..."
+ if ! "${ROOT}"bin/systemd-machine-id-setup; then
+ ewarn "Setting up /etc/machine-id failed, to fix it please see"
+ ewarn " http://lists.freedesktop.org/archives/dbus/2011-March/014187.html"
+ elif test ! -L "${ROOT}"var/lib/dbus/machine-id; then
+ # This should be fixed in the dbus ebuild, but we warn about it here.
+ ewarn "${ROOT}var/lib/dbus/machine-id ideally should be a symlink to"
+ ewarn "${ROOT}etc/machine-id to make it clear that they have the same"
+ ewarn "content."
+ fi
+}
+
+pkg_postinst() {
+ check_mtab_is_symlink
+ systemd_machine_id_setup
+
+ # Inform user about extra configuration
+ elog "You may need to perform some additional configuration for some"
+ elog "programs to work, see the systemd manpages for loading modules and"
+ elog "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."
+}