Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599504 - sys-process/procps: Add elogind support
Summary: sys-process/procps: Add elogind support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: elogind-support
  Show dependency tree
 
Reported: 2016-11-11 16:50 UTC by Sven Eden
Modified: 2017-05-31 12:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
procps-3.3.12-r2 (procps-3.3.12-r2.ebuild,2.23 KB, text/plain)
2016-11-11 16:51 UTC, Sven Eden
Details
Patch to enable libelogind support (procps-enable-elogind.patch,1.60 KB, patch)
2016-11-11 16:53 UTC, Sven Eden
Details | Diff
procps-3.3.12.ebuild.diff (procps-3.3.12.ebuild.diff,2.35 KB, patch)
2017-05-27 11:33 UTC, Andreas Sturmlechner
Details | Diff
procps-3.3.12.ebuild.diff (procps-3.3.12.ebuild.diff,2.18 KB, patch)
2017-05-28 10:07 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2016-11-11 16:50:52 UTC
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.
Comment 1 Sven Eden 2016-11-11 16:51:48 UTC
Created attachment 453032 [details]
procps-3.3.12-r2

Updated ebuild that accepts USE="elogind" and patches in libelogind support.
Comment 2 Sven Eden 2016-11-11 16:53:40 UTC
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.
Comment 3 Sven Eden 2016-11-11 16:55:42 UTC
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?
Comment 4 Sven Eden 2016-11-15 09:54:54 UTC
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.
Comment 5 Martijn Schmidt 2017-01-26 21:21:55 UTC
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?
Comment 6 Martijn Schmidt 2017-02-24 23:22:34 UTC
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
Comment 7 Sven Eden 2017-02-25 07:32:40 UTC
(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.
Comment 8 Andreas Sturmlechner gentoo-dev 2017-05-27 11:33:21 UTC
Created attachment 474514 [details, diff]
procps-3.3.12.ebuild.diff

Add USE=elogind, bump to EAPI 6, drop eutils
Comment 9 Andreas Sturmlechner gentoo-dev 2017-05-28 10:07:50 UTC
Created attachment 474534 [details, diff]
procps-3.3.12.ebuild.diff

Add USE=elogind, eutils->epatch
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-05-30 14:22:57 UTC
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
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-05-30 14:39:47 UTC
Created a pull request:

https://gitlab.com/procps-ng/procps/merge_requests/47
Comment 12 Sven Eden 2017-05-31 12:19:50 UTC
Thank you very much, both of you!