proc/readproc.c from procps makes use of libsystemd-login if it is available. Add a new USE flag "elogind" which patches in support for libelogind as an alternative.
Created attachment 453032 [details] procps-3.3.12-r2 Updated ebuild that accepts USE="elogind" and patches in libelogind support.
Created attachment 453034 [details, diff] Patch to enable libelogind support This patch does the following: a) Add "--with-elogind" to configure.ac b) Add ELOGIND_LIBS to Makefile.am c) Add include <elogind/sd-login.h> to proc/readproc.c if elogind is used.
The current ebuild has the following serious issue: sys-process/procps installs /bin/kill and /bin/ps. At least the latter is used during the start of openrc and fails, because libelogind.so.0 is not found. To make this secure for users with a separate /usr partition, the elogind ebuild might need to be changed to install libelogind into /lib and symlink back to /usr/lib. Thoughts?
With the new ebuild for elogind (https://bugs.gentoo.org/attachment.cgi?id=453370) from bug 599474, there is no longer any error message on early boot.
Hey Sven, Thanks for doing this - I'm a regular user trying to join in on the elogind testing. During my attempt to compile sys-process/procps-3.3.12-r2 from your seden overlay, I discovered that the Manifest is no longer accurate. From Gentoo's default tree: DIST procps-3.3.11-remove_Unix98_output_limits.patch 8390 SHA256 8818abe9e4bfe192030891297fbc39230bd834642248e6277f38451d40ddacf1 SHA512 01763dd7cf55f4ac638a2515c2efd59ea184fbfeac4cc6381654a2df6bc848329c55dd92556d24a4b3b68e711a1af1f757ac347be2934b41791208b4edfedef1 WHIRLPOOL 57ddcf8b9ce92cd4c4b085306f6146cb67c3a74d0bd49619d14f4bf78e63133ef43fe5d9f3ddaeb8760a18175cdb390300742349b23efa0537ad9840c62929ff From the seden overlay: DIST procps-3.3.11-remove_Unix98_output_limits.patch 7582 SHA256 0801b971c630d2d68fe87da0b84842169df38cd88d3854da73b0e9bb45572d29 SHA512 8502264cba62475e3fc218dfde6c8ac375ccbf309843cec3000796e7455f41f287692aafd423f301b6c1a7e5f04c708fe30c2dd305ec3345b7a77b3443e35e55 WHIRLPOOL cbdba6dc94a4bec63f9fae8edc396aa5e59551a1606ed7dee56a65fad2e3d75ea5f391105806262f00103386c47434ec656b55bcefdd565313139355fa31ac61 As a result, when portage has fetches the patch it will error out before starting the compilation process because the filesize does not amtch: !!! Fetched file: procps-3.3.11-remove_Unix98_output_limits.patch VERIFY FAILED! !!! Reason: Filesize does not match recorded size !!! Got: 8390 !!! Expected: 7582 Refetching... File renamed to '/usr/portage/distfiles/procps-3.3.11-remove_Unix98_output_limits.patch._checksum_failure_.4dyqix3b' Could you please adjust the manifest to match the one from the main tree, and push the update to your overlay?
Looks like the bug is fixed in the overlay, and I managed to compile it without manual changes to the ebuild/Manifest - thanks Sven! https://cgit.gentoo.org/user/seden.git/commit/?id=58704d12183121d78e433aefb05e2b5bbe4a90b6
(In reply to Martijn Schmidt from comment #6) > Looks like the bug is fixed in the overlay, and I managed to compile it > without manual changes to the ebuild/Manifest - thanks Sven! > > https://cgit.gentoo.org/user/seden.git/commit/ > ?id=58704d12183121d78e433aefb05e2b5bbe4a90b6 I am very sorry, but somehow I overlooked the notification of your comment. :-( That's why it took so long, although it is just a minor manifest update.
Created attachment 474514 [details, diff] procps-3.3.12.ebuild.diff Add USE=elogind, bump to EAPI 6, drop eutils
Created attachment 474534 [details, diff] procps-3.3.12.ebuild.diff Add USE=elogind, eutils->epatch
commit 2d8d7761ed767b800e70f68268674b472ba60030 (HEAD -> master, origin/master, origin/HEAD) Author: Lars Wendler <polynomial-c@gentoo.org> Date: Tue May 30 16:09:46 2017 sys-process/procps: Revbump to add elogind support (bug #599504). Thanks to Sven Eden for providing the procps patch and to asturm for providing the initial ebuild patch. Package-Manager: Portage-2.3.6, Repoman-2.3.2
Created a pull request: https://gitlab.com/procps-ng/procps/merge_requests/47
Thank you very much, both of you!