Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/systemd: ChangeLog systemd-44-r1.ebuild systemd-44.ebuild
Date: Wed, 02 May 2012 07:55:25
Message-Id: 20120502075434.AFF222004B@flycatcher.gentoo.org
1 mgorny 12/05/02 07:54:34
2
3 Modified: ChangeLog
4 Added: systemd-44-r1.ebuild
5 Removed: systemd-44.ebuild
6 Log:
7 systemd-analyze works only with py2.7, wrt bug #413755.
8
9 (Portage version: 2.2.0_alpha101_p3/cvs/Linux x86_64, RepoMan options: --force)
10
11 Revision Changes Path
12 1.30 sys-apps/systemd/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?rev=1.30&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?rev=1.30&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?r1=1.29&r2=1.30
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v
21 retrieving revision 1.29
22 retrieving revision 1.30
23 diff -u -r1.29 -r1.30
24 --- ChangeLog 6 Apr 2012 20:13:13 -0000 1.29
25 +++ ChangeLog 2 May 2012 07:54:34 -0000 1.30
26 @@ -1,6 +1,12 @@
27 # ChangeLog for sys-apps/systemd
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.29 2012/04/06 20:13:13 mgorny Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.30 2012/05/02 07:54:34 mgorny Exp $
31 +
32 +*systemd-44-r1 (02 May 2012)
33 +
34 + 02 May 2012; Michał Górny <mgorny@g.o> -systemd-44.ebuild,
35 + +systemd-44-r1.ebuild:
36 + systemd-analyze works only with py2.7, wrt bug #413755.
37
38 06 Apr 2012; Michał Górny <mgorny@g.o> systemd-44.ebuild,
39 +files/0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch:
40
41
42
43 1.1 sys-apps/systemd/systemd-44-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-44-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-44-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: systemd-44-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-44-r1.ebuild,v 1.1 2012/05/02 07:54:34 mgorny Exp $
53
54 EAPI=4
55
56 inherit autotools-utils bash-completion-r1 linux-info pam systemd
57
58 DESCRIPTION="System and service manager for Linux"
59 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
60 SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~amd64 ~arm ~x86"
65 IUSE="acl audit cryptsetup lzma pam plymouth selinux tcpd"
66
67 # We need to depend on sysvinit for sulogin which is used in the rescue
68 # mode. Bug #399615.
69
70 # A little higher than upstream requires
71 # but I had real trouble with 2.6.37 and systemd.
72 MINKV="2.6.38"
73
74 # dbus version because of systemd units
75 # sysvinit for sulogin
76 RDEPEND=">=sys-apps/dbus-1.4.10
77 >=sys-apps/kmod-5
78 sys-apps/sysvinit
79 >=sys-apps/util-linux-2.19
80 >=sys-fs/udev-172
81 sys-libs/libcap
82 acl? ( sys-apps/acl )
83 audit? ( >=sys-process/audit-2 )
84 cryptsetup? ( sys-fs/cryptsetup )
85 lzma? ( app-arch/xz-utils )
86 pam? ( virtual/pam )
87 plymouth? ( sys-boot/plymouth )
88 selinux? ( sys-libs/libselinux )
89 tcpd? ( sys-apps/tcp-wrappers )"
90
91 DEPEND="${RDEPEND}
92 app-arch/xz-utils
93 app-text/docbook-xsl-stylesheets
94 dev-libs/libxslt
95 dev-util/gperf
96 dev-util/intltool
97 >=sys-kernel/linux-headers-${MINKV}"
98
99 PATCHES=(
100 # bug #408879: Session Logout File Deletion Weakness (CVE-2012-1174)
101 "${FILESDIR}"/0001-util-never-follow-symlinks-in-rm_rf_children.patch
102 # bug #410973: fails to build on ARM due to PAGE_SIZE not being defined
103 "${FILESDIR}"/0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch
104 )
105
106 pkg_setup() {
107 enewgroup lock # used by var-lock.mount
108 enewgroup tty 5 # used by mount-setup for /dev/pts
109 }
110
111 src_prepare() {
112 # systemd-analyze is for python2.7 only nowadays.
113 sed -i -e '1s/python/&2.7/' src/systemd-analyze
114
115 autotools-utils_src_prepare
116 }
117
118 src_configure() {
119 local myeconfargs=(
120 --with-distro=gentoo
121 # install everything to /usr
122 --with-rootprefix=/usr
123 --with-rootlibdir=/usr/$(get_libdir)
124 # but pam modules have to lie in /lib*
125 --with-pamlibdir=/$(get_libdir)/security
126 --localstatedir=/var
127 # make sure we get /bin:/sbin in $PATH
128 --enable-split-usr
129 $(use_enable acl)
130 $(use_enable audit)
131 $(use_enable cryptsetup libcryptsetup)
132 $(use_enable lzma xz)
133 $(use_enable pam)
134 $(use_enable plymouth)
135 $(use_enable selinux)
136 $(use_enable tcpd tcpwrap)
137 # now in sys-apps/systemd-ui
138 --disable-gtk
139 )
140
141 autotools-utils_src_configure
142 }
143
144 src_install() {
145 autotools-utils_src_install \
146 bashcompletiondir=/tmp
147
148 # compat for init= use
149 dosym ../usr/lib/systemd/systemd /bin/systemd
150 dosym ../lib/systemd/systemd /usr/bin/systemd
151 # rsyslog.service depends on it...
152 dosym ../usr/bin/systemctl /bin/systemctl
153
154 # move files as necessary
155 newbashcomp "${D}"/tmp/systemd-bash-completion.sh ${PN}
156 rm -r "${D}"/tmp || die
157
158 # we just keep sysvinit tools, so no need for the mans
159 rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
160 || die
161 rm "${D}"/usr/share/man/man1/init.1 || die
162 # collision with -ui
163 rm "${D}"/usr/share/man/man1/systemadm.1 || die
164
165 # Create /run/lock as required by new baselay/OpenRC compat.
166 insinto /usr/lib/tmpfiles.d
167 doins "${FILESDIR}"/gentoo-run.conf
168
169 # Migration helpers.
170 exeinto /usr/libexec/systemd
171 doexe "${FILESDIR}"/update-etc-systemd-symlinks.sh
172 systemd_dounit "${FILESDIR}"/update-etc-systemd-symlinks.{service,path}
173 systemd_enable_service sysinit.target update-etc-systemd-symlinks.path
174 }
175
176 pkg_preinst() {
177 local CONFIG_CHECK="~AUTOFS4_FS ~CGROUPS ~DEVTMPFS ~FANOTIFY ~IPV6"
178 kernel_is -ge ${MINKV//./ } || ewarn "Kernel version at least ${MINKV} required"
179 check_extra_config
180 }
181
182 optfeature() {
183 local i desc=${1} text
184 shift
185
186 text=" [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1}"
187 shift
188
189 for i; do
190 elog "${text}"
191 text="& [\e[1m$(has_version ${1} && echo I || echo ' ')\e[0m] ${1}"
192 done
193 elog "${text} (${desc})"
194 }
195
196 pkg_postinst() {
197 mkdir -p "${ROOT}"/run || ewarn "Unable to mkdir /run, this could mean trouble."
198 if [[ ! -L "${ROOT}"/etc/mtab ]]; then
199 ewarn "Upstream suggests that the /etc/mtab file should be a symlink to /proc/mounts."
200 ewarn "It is known to cause users being unable to unmount user mounts. If you don't"
201 ewarn "require that specific feature, please call:"
202 ewarn " $ ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'"
203 ewarn
204 fi
205
206 elog "You may need to perform some additional configuration for some programs"
207 elog "to work, see the systemd manpages for loading modules and handling tmpfiles:"
208 elog " $ man modules-load.d"
209 elog " $ man tmpfiles.d"
210 elog
211
212 elog "To get additional features, a number of optional runtime dependencies may"
213 elog "be installed:"
214 optfeature 'for systemd-analyze' \
215 'dev-lang/python:2.7' 'dev-python/dbus-python'
216 optfeature 'for systemd-analyze plotting ability' \
217 'dev-python/pycairo[svg]'
218 optfeature 'for GTK+ systemadm UI and gnome-ask-password-agent' \
219 'sys-apps/systemd-ui'
220 elog
221
222 ewarn "Please note this is a work-in-progress and many packages in Gentoo"
223 ewarn "do not supply systemd unit files yet. You are testing it on your own"
224 ewarn "responsibility. Please remember than you can pass:"
225 ewarn " init=/sbin/init"
226 ewarn "to your kernel to boot using sysvinit / OpenRC."
227
228 # Don't run it if we're outta /
229 if [[ ! ${ROOT%/} ]]; then
230 # Update symlinks to moved units.
231 sh "${FILESDIR}"/update-etc-systemd-symlinks.sh
232
233 # Try to start migration unit.
234 ebegin "Trying to start migration helper path monitoring."
235 systemctl --system start update-etc-systemd-symlinks.path 2>/dev/null
236 eend ${?}
237 fi
238 }