Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mgorny:master commit in: sys-apps/systemd/, sys-apps/systemd/files/
Date: Mon, 09 Jul 2012 22:03:31
Message-Id: 1341868569.304d659d5f00e5da67ad87c7f8b51c5df3ea0956.mgorny@gentoo
1 commit: 304d659d5f00e5da67ad87c7f8b51c5df3ea0956
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 9 21:16:09 2012 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 9 21:16:09 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=304d659d
7
8 sys-apps/systemd: Update the udev code, and remove the (old already) /usr update code.
9
10 (Portage version: 2.2.0_alpha114/git/Linux x86_64, unsigned Manifest commit)
11
12 ---
13 sys-apps/systemd/files/40-gentoo.rules | 14 +++++
14 .../systemd/files/update-etc-systemd-symlinks.path | 5 --
15 .../files/update-etc-systemd-symlinks.service | 6 --
16 .../systemd/files/update-etc-systemd-symlinks.sh | 19 -------
17 sys-apps/systemd/systemd-9999.ebuild | 57 ++++++++------------
18 5 files changed, 37 insertions(+), 64 deletions(-)
19
20 diff --git a/sys-apps/systemd/files/40-gentoo.rules b/sys-apps/systemd/files/40-gentoo.rules
21 new file mode 100644
22 index 0000000..fa99ba9
23 --- /dev/null
24 +++ b/sys-apps/systemd/files/40-gentoo.rules
25 @@ -0,0 +1,14 @@
26 +# do not edit this file, it will be overwritten on update
27 +
28 +# setting permissions
29 +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
30 +
31 +# dialout devices
32 +KERNEL=="ippp*|isdn*|dcbri*|rfcomm*|ttyACM[0-9]*|pilot", GROUP="uucp"
33 +
34 +# sound devices (oss)
35 +SUBSYSTEM=="snd", GROUP="audio"
36 +
37 +# Sony Vaio Jogdial sonypi device
38 +KERNEL=="sonypi", MODE="0666"
39 +
40
41 diff --git a/sys-apps/systemd/files/update-etc-systemd-symlinks.path b/sys-apps/systemd/files/update-etc-systemd-symlinks.path
42 deleted file mode 100644
43 index 33a9576..0000000
44 --- a/sys-apps/systemd/files/update-etc-systemd-symlinks.path
45 +++ /dev/null
46 @@ -1,5 +0,0 @@
47 -[Unit]
48 -Description=Update /etc/systemd/system symlinks for units moved to /usr
49 -
50 -[Path]
51 -PathChanged=/lib/systemd/system
52
53 diff --git a/sys-apps/systemd/files/update-etc-systemd-symlinks.service b/sys-apps/systemd/files/update-etc-systemd-symlinks.service
54 deleted file mode 100644
55 index c05a194..0000000
56 --- a/sys-apps/systemd/files/update-etc-systemd-symlinks.service
57 +++ /dev/null
58 @@ -1,6 +0,0 @@
59 -[Unit]
60 -Description=Update /etc/systemd/system symlinks for units moved to /usr
61 -
62 -[Service]
63 -Type=oneshot
64 -ExecStart=/usr/libexec/systemd/update-etc-systemd-symlinks.sh
65
66 diff --git a/sys-apps/systemd/files/update-etc-systemd-symlinks.sh b/sys-apps/systemd/files/update-etc-systemd-symlinks.sh
67 deleted file mode 100755
68 index ce81bba..0000000
69 --- a/sys-apps/systemd/files/update-etc-systemd-symlinks.sh
70 +++ /dev/null
71 @@ -1,19 +0,0 @@
72 -#!/bin/sh
73 -# Update symlinks to systemd units moved into /usr/systemd.
74 -# (c) 2012 Michał Górny
75 -# Released under the terms of the 2-clause BSD license
76 -
77 -IFS_SAVE=${IFS}
78 -IFS='
79 -'
80 -# follow + symlink type will match broken symlinks only
81 -set -- $(find -L /etc/systemd/system -type l -print)
82 -IFS=${IFS_SAVE}
83 -
84 -for f; do
85 - old_path=$(readlink "${f}")
86 - new_path=/usr/lib${old_path#/lib}
87 - if [ -f "${new_path}" ]; then
88 - ln -v -s -f "${new_path}" "${f}"
89 - fi
90 -done
91
92 diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
93 index 4db8f77..910eba1 100644
94 --- a/sys-apps/systemd/systemd-9999.ebuild
95 +++ b/sys-apps/systemd/systemd-9999.ebuild
96 @@ -18,7 +18,7 @@ DESCRIPTION="System and service manager for Linux"
97 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
98 SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
99
100 -LICENSE="GPL-2"
101 +LICENSE="GPL-2 LGPL-2.1 MIT"
102 SLOT="0"
103 KEYWORDS="~amd64 ~arm ~x86"
104 IUSE="acl audit cryptsetup doc gudev introspection lzma pam selinux tcpd"
105 @@ -26,18 +26,10 @@ IUSE="acl audit cryptsetup doc gudev introspection lzma pam selinux tcpd"
106 # We need to depend on sysvinit for sulogin which is used in the rescue
107 # mode. Bug #399615.
108
109 -# A little higher than upstream requires
110 -# but I had real trouble with 2.6.37 and systemd.
111 -MINKV="2.6.38"
112 +MINKV="2.6.39"
113
114 -# dbus version because of systemd units
115 -# sysvinit for sulogin
116 -RDEPEND="!sys-fs/udev
117 - >=sys-apps/dbus-1.4.10
118 +COMMON_DEPEND=">=sys-apps/dbus-1.4.10
119 >=sys-apps/kmod-5
120 - sys-apps/pciutils
121 - sys-apps/sysvinit
122 - sys-apps/usbutils
123 >=sys-apps/util-linux-2.20
124 sys-libs/libcap
125 acl? ( sys-apps/acl )
126 @@ -50,7 +42,14 @@ RDEPEND="!sys-fs/udev
127 selinux? ( sys-libs/libselinux )
128 tcpd? ( sys-apps/tcp-wrappers )"
129
130 -DEPEND="${RDEPEND}
131 +# sysvinit for sulogin
132 +# udev is bundled
133 +RDEPEND="${COMMON_DEPEND}
134 + sys-apps/hwids
135 + sys-apps/sysvinit
136 + !sys-fs/udev
137 + !<sys-libs/glibc-2.10"
138 +DEPEND="${COMMON_RDEPEND}
139 app-arch/xz-utils
140 app-text/docbook-xsl-stylesheets
141 dev-libs/libxslt
142 @@ -67,6 +66,8 @@ DEPEND="dev-libs/gobject-introspection
143 dev-util/gtk-doc"
144 #endif
145
146 +AUTOTOOLS_IN_SOURCE_BUILD=1
147 +
148 pkg_setup() {
149 enewgroup lock # used by var-lock.mount
150 enewgroup tty 5 # used by mount-setup for /dev/pts
151 @@ -76,6 +77,10 @@ src_prepare() {
152 # systemd-analyze is for python2.7 only nowadays.
153 sed -i -e '1s/python/&2.7/' src/analyze/systemd-analyze
154
155 + # change rules back to group uucp instead of dialout for now
156 + sed -e '/GROUP=/s:dialout:uucp:' \
157 + -i rules/*.rules || die
158 +
159 #if LIVE /* XXX: do something about it... */
160 gtkdocize --docdir docs/ || die
161 #endif
162 @@ -90,6 +95,9 @@ src_configure() {
163 --with-rootlibdir=/usr/$(get_libdir)
164 # but pam modules have to lie in /lib*
165 --with-pamlibdir=/$(get_libdir)/security
166 + # this avoids dep on pciutils & usbutils
167 + --with-pci-ids-path=/usr/share/misc/pci.ids
168 + --with-usb-ids-path=/usr/share/misc/usb.ids
169 --localstatedir=/var
170 # make sure we get /bin:/sbin in $PATH
171 --enable-split-usr
172 @@ -131,11 +139,9 @@ src_install() {
173 insinto /usr/lib/tmpfiles.d
174 doins "${FILESDIR}"/gentoo-run.conf
175
176 - # Migration helpers.
177 - exeinto /usr/libexec/systemd
178 - doexe "${FILESDIR}"/update-etc-systemd-symlinks.sh
179 - systemd_dounit "${FILESDIR}"/update-etc-systemd-symlinks.{service,path}
180 - systemd_enable_service sysinit.target update-etc-systemd-symlinks.path
181 + # Gentoo rules for udev.
182 + insinto /usr/lib/udev/rules.d
183 + doins "${FILESDIR}"/40-gentoo.rules
184 #if LIVE
185
186 # Check whether we won't break user's system.
187 @@ -176,12 +182,6 @@ pkg_postinst() {
188 ewarn
189 fi
190
191 - elog "You may need to perform some additional configuration for some programs"
192 - elog "to work, see the systemd manpages for loading modules and handling tmpfiles:"
193 - elog " $ man modules-load.d"
194 - elog " $ man tmpfiles.d"
195 - elog
196 -
197 elog "To get additional features, a number of optional runtime dependencies may"
198 elog "be installed:"
199 optfeature 'for systemd-analyze' \
200 @@ -197,15 +197,4 @@ pkg_postinst() {
201 ewarn "responsibility. Please remember than you can pass:"
202 ewarn " init=/sbin/init"
203 ewarn "to your kernel to boot using sysvinit / OpenRC."
204 -
205 - # Don't run it if we're outta /
206 - if [[ ! ${ROOT%/} ]]; then
207 - # Update symlinks to moved units.
208 - sh "${FILESDIR}"/update-etc-systemd-symlinks.sh
209 -
210 - # Try to start migration unit.
211 - ebegin "Trying to start migration helper path monitoring."
212 - systemctl --system start update-etc-systemd-symlinks.path 2>/dev/null
213 - eend ${?}
214 - fi
215 }