1 |
commit: 2d8d7761ed767b800e70f68268674b472ba60030 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 30 14:09:46 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 30 14:22:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d8d7761 |
7 |
|
8 |
sys-process/procps: Revbump to add elogind support (bug #599504). |
9 |
|
10 |
Thanks to Sven Eden for providing the procps patch and to asturm for |
11 |
providing the initial ebuild patch. |
12 |
|
13 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
14 |
|
15 |
.../procps/files/procps-3.3.12-elogind.patch | 265 +++++++++++++++++++++ |
16 |
sys-process/procps/metadata.xml | 1 + |
17 |
sys-process/procps/procps-3.3.12-r1.ebuild | 91 +++++++ |
18 |
3 files changed, 357 insertions(+) |
19 |
|
20 |
diff --git a/sys-process/procps/files/procps-3.3.12-elogind.patch b/sys-process/procps/files/procps-3.3.12-elogind.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..07c165310ce |
23 |
--- /dev/null |
24 |
+++ b/sys-process/procps/files/procps-3.3.12-elogind.patch |
25 |
@@ -0,0 +1,265 @@ |
26 |
+--- procps-ng-3.3.12/configure 2016-07-10 07:32:09.862265237 +0200 |
27 |
++++ procps-ng-3.3.12/configure 2016-07-10 07:32:09.862265237 +0200 |
28 |
+@@ -650,6 +650,10 @@ |
29 |
+ BUILD_KILL_TRUE |
30 |
+ BUILD_PIDOF_FALSE |
31 |
+ BUILD_PIDOF_TRUE |
32 |
++WITH_ELOGIND_FALSE |
33 |
++WITH_ELOGIND_TRUE |
34 |
++ELOGIND_LIBS |
35 |
++ELOGIND_CFLAGS |
36 |
+ WITH_SYSTEMD_FALSE |
37 |
+ WITH_SYSTEMD_TRUE |
38 |
+ SYSTEMD_LIBS |
39 |
+@@ -815,6 +819,7 @@ |
40 |
+ enable_libselinux |
41 |
+ with_ncurses |
42 |
+ with_systemd |
43 |
++with_elogind |
44 |
+ enable_pidof |
45 |
+ enable_kill |
46 |
+ enable_skill |
47 |
+@@ -845,7 +850,9 @@ |
48 |
+ NCURSESW_CFLAGS |
49 |
+ NCURSESW_LIBS |
50 |
+ SYSTEMD_CFLAGS |
51 |
+-SYSTEMD_LIBS' |
52 |
++SYSTEMD_LIBS |
53 |
++ELOGIND_CFLAGS |
54 |
++ELOGIND_LIBS' |
55 |
+ |
56 |
+ |
57 |
+ # Initialize some variables set by options. |
58 |
+@@ -1521,6 +1528,7 @@ |
59 |
+ --without-libintl-prefix don't search for libintl in includedir and libdir |
60 |
+ --without-ncurses build only applications not needing ncurses |
61 |
+ --with-systemd enable systemd support |
62 |
++ --with-elogind enable elogind support |
63 |
+ |
64 |
+ Some influential environment variables: |
65 |
+ CC C compiler command |
66 |
+@@ -1550,6 +1558,10 @@ |
67 |
+ C compiler flags for SYSTEMD, overriding pkg-config |
68 |
+ SYSTEMD_LIBS |
69 |
+ linker flags for SYSTEMD, overriding pkg-config |
70 |
++ ELOGIND_CFLAGS |
71 |
++ C compiler flags for ELOGIND, overriding pkg-config |
72 |
++ ELOGIND_LIBS |
73 |
++ linker flags for ELOGIND, overriding pkg-config |
74 |
+ |
75 |
+ Use these variables to override the choices made by `configure' or to help |
76 |
+ it to find libraries and programs with nonstandard names/locations. |
77 |
+@@ -17295,6 +17307,127 @@ |
78 |
+ fi |
79 |
+ |
80 |
+ |
81 |
++ |
82 |
++# Check whether --with-elogind was given. |
83 |
++if test "${with_elogind+set}" = set; then : |
84 |
++ withval=$with_elogind; |
85 |
++else |
86 |
++ with_elogind=no |
87 |
++ |
88 |
++fi |
89 |
++ |
90 |
++# Do not allow elogind if systemd is wanted and found |
91 |
++if test "x$with_systemd" != "xno"; then : |
92 |
++ with_elogind=no |
93 |
++fi |
94 |
++ |
95 |
++if test "x$with_elogind" != "xno"; then : |
96 |
++ |
97 |
++ |
98 |
++pkg_failed=no |
99 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libelogind" >&5 |
100 |
++$as_echo_n "checking for libelogind... " >&6; } |
101 |
++ |
102 |
++if test -n "$ELOGIND_CFLAGS"; then |
103 |
++ pkg_cv_ELOGIND_CFLAGS="$ELOGIND_CFLAGS" |
104 |
++ elif test -n "$PKG_CONFIG"; then |
105 |
++ if test -n "$PKG_CONFIG" && \ |
106 |
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelogind\""; } >&5 |
107 |
++ ($PKG_CONFIG --exists --print-errors "libelogind") 2>&5 |
108 |
++ ac_status=$? |
109 |
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
110 |
++ test $ac_status = 0; }; then |
111 |
++ pkg_cv_ELOGIND_CFLAGS=`$PKG_CONFIG --cflags "libelogind" 2>/dev/null` |
112 |
++ test "x$?" != "x0" && pkg_failed=yes |
113 |
++else |
114 |
++ pkg_failed=yes |
115 |
++fi |
116 |
++ else |
117 |
++ pkg_failed=untried |
118 |
++fi |
119 |
++if test -n "$ELOGIND_LIBS"; then |
120 |
++ pkg_cv_ELOGIND_LIBS="$ELOGIND_LIBS" |
121 |
++ elif test -n "$PKG_CONFIG"; then |
122 |
++ if test -n "$PKG_CONFIG" && \ |
123 |
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelogind\""; } >&5 |
124 |
++ ($PKG_CONFIG --exists --print-errors "libelogind") 2>&5 |
125 |
++ ac_status=$? |
126 |
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
127 |
++ test $ac_status = 0; }; then |
128 |
++ pkg_cv_ELOGIND_LIBS=`$PKG_CONFIG --libs "libelogind" 2>/dev/null` |
129 |
++ test "x$?" != "x0" && pkg_failed=yes |
130 |
++else |
131 |
++ pkg_failed=yes |
132 |
++fi |
133 |
++ else |
134 |
++ pkg_failed=untried |
135 |
++fi |
136 |
++ |
137 |
++ |
138 |
++ |
139 |
++if test $pkg_failed = yes; then |
140 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
141 |
++$as_echo "no" >&6; } |
142 |
++ |
143 |
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
144 |
++ _pkg_short_errors_supported=yes |
145 |
++else |
146 |
++ _pkg_short_errors_supported=no |
147 |
++fi |
148 |
++ if test $_pkg_short_errors_supported = yes; then |
149 |
++ ELOGIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libelogind" 2>&1` |
150 |
++ else |
151 |
++ ELOGIND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libelogind" 2>&1` |
152 |
++ fi |
153 |
++ # Put the nasty error message in config.log where it belongs |
154 |
++ echo "$ELOGIND_PKG_ERRORS" >&5 |
155 |
++ |
156 |
++ as_fn_error $? "Package requirements (libelogind) were not met: |
157 |
++ |
158 |
++$ELOGIND_PKG_ERRORS |
159 |
++ |
160 |
++Consider adjusting the PKG_CONFIG_PATH environment variable if you |
161 |
++installed software in a non-standard prefix. |
162 |
++ |
163 |
++Alternatively, you may set the environment variables ELOGIND_CFLAGS |
164 |
++and ELOGIND_LIBS to avoid the need to call pkg-config. |
165 |
++See the pkg-config man page for more details." "$LINENO" 5 |
166 |
++elif test $pkg_failed = untried; then |
167 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
168 |
++$as_echo "no" >&6; } |
169 |
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
170 |
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
171 |
++as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it |
172 |
++is in your PATH or set the PKG_CONFIG environment variable to the full |
173 |
++path to pkg-config. |
174 |
++ |
175 |
++Alternatively, you may set the environment variables ELOGIND_CFLAGS |
176 |
++and ELOGIND_LIBS to avoid the need to call pkg-config. |
177 |
++See the pkg-config man page for more details. |
178 |
++ |
179 |
++To get pkg-config, see <http://pkg-config.freedesktop.org/>. |
180 |
++See \`config.log' for more details" "$LINENO" 5; } |
181 |
++else |
182 |
++ ELOGIND_CFLAGS=$pkg_cv_ELOGIND_CFLAGS |
183 |
++ ELOGIND_LIBS=$pkg_cv_ELOGIND_LIBS |
184 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
185 |
++$as_echo "yes" >&6; } |
186 |
++ |
187 |
++fi |
188 |
++ |
189 |
++$as_echo "#define WITH_ELOGIND 1" >>confdefs.h |
190 |
++ |
191 |
++ |
192 |
++fi |
193 |
++ if test x$with_elogind != xno; then |
194 |
++ WITH_ELOGIND_TRUE= |
195 |
++ WITH_ELOGIND_FALSE='#' |
196 |
++else |
197 |
++ WITH_ELOGIND_TRUE='#' |
198 |
++ WITH_ELOGIND_FALSE= |
199 |
++fi |
200 |
++ |
201 |
++ |
202 |
+ # AC_ARG_ENABLEs |
203 |
+ # Check whether --enable-pidof was given. |
204 |
+ if test "${enable_pidof+set}" = set; then : |
205 |
+@@ -17712,6 +17845,10 @@ |
206 |
+ as_fn_error $? "conditional \"WITH_SYSTEMD\" was never defined. |
207 |
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
208 |
+ fi |
209 |
++if test -z "${WITH_ELOGIND_TRUE}" && test -z "${WITH_ELOGIND_FALSE}"; then |
210 |
++ as_fn_error $? "conditional \"WITH_ELOGIND\" was never defined. |
211 |
++Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
212 |
++fi |
213 |
+ if test -z "${BUILD_PIDOF_TRUE}" && test -z "${BUILD_PIDOF_FALSE}"; then |
214 |
+ as_fn_error $? "conditional \"BUILD_PIDOF\" was never defined. |
215 |
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
216 |
+--- procps-ng-3.3.12/configure.ac 2016-07-09 23:49:25.817307031 +0200 |
217 |
++++ procps-ng-3.3.12/configure.ac 2016-07-09 23:49:25.817307031 +0200 |
218 |
+@@ -155,6 +155,19 @@ |
219 |
+ ]) |
220 |
+ AM_CONDITIONAL([WITH_SYSTEMD], [test x$with_systemd != xno]) |
221 |
+ |
222 |
++AC_ARG_WITH([elogind], |
223 |
++ [AS_HELP_STRING([--with-elogind], [enable elogind support])], |
224 |
++ [], [with_elogind=no] |
225 |
++) |
226 |
++# Do not allow elogind if systemd is wanted and found |
227 |
++AS_IF([test "x$with_systemd" != "xno"], [with_elogind=no]) |
228 |
++ |
229 |
++AS_IF([test "x$with_elogind" != "xno"], [ |
230 |
++ PKG_CHECK_MODULES([ELOGIND], [libelogind]) |
231 |
++ AC_DEFINE(WITH_ELOGIND, 1, [enable elogind support]) |
232 |
++]) |
233 |
++AM_CONDITIONAL([WITH_ELOGIND], [test x$with_elogind != xno]) |
234 |
++ |
235 |
+ # AC_ARG_ENABLEs |
236 |
+ AC_ARG_ENABLE([pidof], |
237 |
+ AS_HELP_STRING([--disable-pidof], [do not build pidof]), |
238 |
+--- procps-ng-3.3.12/Makefile.am 2016-07-10 00:40:44.235121270 +0200 |
239 |
++++ procps-ng-3.3.12/Makefile.am 2016-07-10 00:40:44.235121270 +0200 |
240 |
+@@ -155,6 +155,10 @@ |
241 |
+ proc_libprocps_la_LIBADD += @SYSTEMD_LIBS@ |
242 |
+ endif |
243 |
+ |
244 |
++if WITH_ELOGIND |
245 |
++proc_libprocps_la_LIBADD += @ELOGIND_LIBS@ |
246 |
++endif |
247 |
++ |
248 |
+ proc_libprocps_la_LDFLAGS = \ |
249 |
+ -version-info $(LIBprocps_CURRENT):$(LIBprocps_REVISION):$(LIBprocps_AGE) \ |
250 |
+ -no-undefined \ |
251 |
+--- procps-ng-3.3.12/Makefile.in 2016-07-10 07:32:11.170237828 +0200 |
252 |
++++ procps-ng-3.3.12/Makefile.in 2016-07-10 07:32:11.170237828 +0200 |
253 |
+@@ -126,6 +126,7 @@ |
254 |
+ @BUILD_SKILL_FALSE@ snice.1 |
255 |
+ |
256 |
+ @WITH_SYSTEMD_TRUE@am__append_14 = @SYSTEMD_LIBS@ |
257 |
++@WITH_ELOGIND_TRUE@am__append_15 = @ELOGIND_LIBS@ |
258 |
+ TESTS = lib/test_strtod_nol$(EXEEXT) |
259 |
+ check_PROGRAMS = $(am__EXEEXT_5) |
260 |
+ noinst_PROGRAMS = lib/test_strutils$(EXEEXT) \ |
261 |
+@@ -688,6 +689,8 @@ |
262 |
+ ECHO_N = @ECHO_N@ |
263 |
+ ECHO_T = @ECHO_T@ |
264 |
+ EGREP = @EGREP@ |
265 |
++ELOGIND_CFLAGS = @ELOGIND_CFLAGS@ |
266 |
++ELOGIND_LIBS = @ELOGIND_LIBS@ |
267 |
+ EXEEXT = @EXEEXT@ |
268 |
+ FGREP = @FGREP@ |
269 |
+ GMSGFMT = @GMSGFMT@ |
270 |
+--- procps-ng-3.3.12/proc/readproc.c 2016-07-09 23:49:25.825306872 +0200 |
271 |
++++ procps-ng-3.3.12/proc/readproc.c 2016-07-09 23:49:25.825306872 +0200 |
272 |
+@@ -40,6 +40,9 @@ |
273 |
+ #ifdef WITH_SYSTEMD |
274 |
+ #include <systemd/sd-login.h> |
275 |
+ #endif |
276 |
++#ifdef WITH_ELOGIND |
277 |
++#include <elogind/sd-login.h> |
278 |
++#endif |
279 |
+ |
280 |
+ // sometimes it's easier to do this manually, w/o gcc helping |
281 |
+ #ifdef PROF |
282 |
+@@ -518,7 +521,7 @@ |
283 |
+ } |
284 |
+ |
285 |
+ static void sd2proc(proc_t *restrict p) { |
286 |
+-#ifdef WITH_SYSTEMD |
287 |
++#if defined(WITH_SYSTEMD) || defined(WITH_ELOGIND) |
288 |
+ char buf[64]; |
289 |
+ uid_t uid; |
290 |
+ |
291 |
|
292 |
diff --git a/sys-process/procps/metadata.xml b/sys-process/procps/metadata.xml |
293 |
index a21aac9eb21..263e639ef30 100644 |
294 |
--- a/sys-process/procps/metadata.xml |
295 |
+++ b/sys-process/procps/metadata.xml |
296 |
@@ -6,6 +6,7 @@ |
297 |
<name>Gentoo Base System</name> |
298 |
</maintainer> |
299 |
<use> |
300 |
+ <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking.</flag> |
301 |
<flag name="kill">Build the kill program</flag> |
302 |
<flag name="modern-top">Enables new startup defaults of top. Keeps old defaults if disabled</flag> |
303 |
<flag name="ncurses">Build programs that use ncurses: top, slabtop, watch</flag> |
304 |
|
305 |
diff --git a/sys-process/procps/procps-3.3.12-r1.ebuild b/sys-process/procps/procps-3.3.12-r1.ebuild |
306 |
new file mode 100644 |
307 |
index 00000000000..997abda25df |
308 |
--- /dev/null |
309 |
+++ b/sys-process/procps/procps-3.3.12-r1.ebuild |
310 |
@@ -0,0 +1,91 @@ |
311 |
+# Copyright 1999-2017 Gentoo Foundation |
312 |
+# Distributed under the terms of the GNU General Public License v2 |
313 |
+ |
314 |
+EAPI=5 |
315 |
+ |
316 |
+inherit epatch toolchain-funcs flag-o-matic |
317 |
+ |
318 |
+DESCRIPTION="standard informational utilities and process-handling tools" |
319 |
+HOMEPAGE="http://procps-ng.sourceforge.net/ https://gitlab.com/procps-ng/procps" |
320 |
+SRC_URI="mirror://sourceforge/${PN}-ng/${PN}-ng-${PV}.tar.xz" |
321 |
+ |
322 |
+LICENSE="GPL-2" |
323 |
+SLOT="0/5" # libprocps.so |
324 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
325 |
+IUSE="elogind +kill modern-top +ncurses nls selinux static-libs systemd test unicode" |
326 |
+ |
327 |
+COMMON_DEPEND=" |
328 |
+ elogind? ( sys-auth/elogind ) |
329 |
+ ncurses? ( >=sys-libs/ncurses-5.7-r7:=[unicode?] ) |
330 |
+ selinux? ( sys-libs/libselinux ) |
331 |
+ systemd? ( sys-apps/systemd ) |
332 |
+" |
333 |
+DEPEND="${COMMON_DEPEND} |
334 |
+ elogind? ( virtual/pkgconfig ) |
335 |
+ ncurses? ( virtual/pkgconfig ) |
336 |
+ systemd? ( virtual/pkgconfig ) |
337 |
+ test? ( dev-util/dejagnu )" |
338 |
+RDEPEND=" |
339 |
+ ${COMMON_DEPEND} |
340 |
+ kill? ( |
341 |
+ !sys-apps/coreutils[kill] |
342 |
+ !sys-apps/util-linux[kill] |
343 |
+ ) |
344 |
+ !<sys-apps/sysvinit-2.88-r6 |
345 |
+" |
346 |
+ |
347 |
+S="${WORKDIR}/${PN}-ng-${PV}" |
348 |
+ |
349 |
+PATCHES=( |
350 |
+ "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch # http://crbug.com/255209 |
351 |
+ "${FILESDIR}"/${PN}-3.3.12-proc-tests.patch # 583036 |
352 |
+ |
353 |
+ # Upstream fixes |
354 |
+ "${FILESDIR}"/${P}-strtod_nol_err.patch |
355 |
+) |
356 |
+ |
357 |
+src_prepare() { |
358 |
+ epatch "${PATCHES[@]}" |
359 |
+ |
360 |
+ # Requires special handling or autoreconf gets triggered which we don't |
361 |
+ # want to happen in a base-system package. |
362 |
+ EPATCH_OPTS="-Z" \ |
363 |
+ epatch "${FILESDIR}"/${PN}-3.3.12-elogind.patch # 599504 |
364 |
+ |
365 |
+ epatch_user |
366 |
+} |
367 |
+ |
368 |
+src_configure() { |
369 |
+ # http://www.freelists.org/post/procps/PATCH-enable-transparent-large-file-support |
370 |
+ append-lfs-flags #471102 |
371 |
+ econf \ |
372 |
+ --docdir='$(datarootdir)'/doc/${PF} \ |
373 |
+ --sbindir="${EPREFIX}/sbin" \ |
374 |
+ $(use_with elogind) \ |
375 |
+ $(use_enable kill) \ |
376 |
+ $(use_enable modern-top) \ |
377 |
+ $(use_with ncurses) \ |
378 |
+ $(use_enable nls) \ |
379 |
+ $(use_enable selinux libselinux) \ |
380 |
+ $(use_enable static-libs static) \ |
381 |
+ $(use_with systemd) \ |
382 |
+ $(use_enable unicode watch8bit) |
383 |
+} |
384 |
+ |
385 |
+src_test() { |
386 |
+ emake check </dev/null #461302 |
387 |
+} |
388 |
+ |
389 |
+src_install() { |
390 |
+ default |
391 |
+ #dodoc sysctl.conf |
392 |
+ |
393 |
+ dodir /bin |
394 |
+ mv "${ED}"/usr/bin/ps "${ED}"/bin/ || die |
395 |
+ if use kill; then |
396 |
+ mv "${ED}"/usr/bin/kill "${ED}"/bin/ || die |
397 |
+ fi |
398 |
+ |
399 |
+ gen_usr_ldscript -a procps |
400 |
+ find "${D}" -name '*.la' -delete || die |
401 |
+} |