commit:     ca1bb8531416b974b09efde5028ea46829e3c2c0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 20 01:27:07 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 20 01:27:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca1bb853

sys-apps/shadow: fix libsubid SONAME, add subslot for libsubid

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../shadow/files/shadow-4.10-libsubid-soname.patch | 27 ++++++++++++++++++++++
 sys-apps/shadow/metadata.xml                       |  4 +++-
 ...shadow-4.10-r1.ebuild => shadow-4.10-r2.ebuild} |  9 +++++---
 3 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/sys-apps/shadow/files/shadow-4.10-libsubid-soname.patch 
b/sys-apps/shadow/files/shadow-4.10-libsubid-soname.patch
new file mode 100644
index 000000000000..dffffb9c917b
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.10-libsubid-soname.patch
@@ -0,0 +1,27 @@
+https://github.com/shadow-maint/shadow/pull/463
+
+From: Sam James <s...@gentoo.org>
+Date: Mon, 20 Dec 2021 01:24:16 +0000
+Subject: [PATCH] libsubid: fix defining SONAME version
+
+We were overriding this when --enable-shared was passed. We can actually
+just dump the conditional logic as libtool will do the right thing for
+us here anyway.
+
+Without this patch, libsubid is installed as .0.
+
+Signed-off-by: Sam James <s...@gentoo.org>
+--- a/libsubid/Makefile.am
++++ b/libsubid/Makefile.am
+@@ -1,10 +1,6 @@
+ lib_LTLIBRARIES = libsubid.la
+-if ENABLE_SHARED
+-libsubid_la_LDFLAGS = -Wl,-soname,libsubid.so.@LIBSUBID_ABI@ \
+-      -shared -version-info @LIBSUBID_ABI_MAJOR@
+-endif
+ libsubid_la_SOURCES = api.c
+-libsubid_la_LDFLAGS = -export-symbols-regex '^subid_'
++libsubid_la_LDFLAGS = -version-info @LIBSUBID_ABI_MAJOR@ 
-export-symbols-regex '^subid_'
+ 
+ pkginclude_HEADERS = subid.h
+ 

diff --git a/sys-apps/shadow/metadata.xml b/sys-apps/shadow/metadata.xml
index 980dcbed0ddb..9c7dcc5444cf 100644
--- a/sys-apps/shadow/metadata.xml
+++ b/sys-apps/shadow/metadata.xml
@@ -9,7 +9,9 @@
                <flag name="bcrypt">build the bcrypt password encryption 
algorithm</flag>
                <flag name="su">build the su program</flag>
        </use>
-       <!-- only for USE=pam -->
+        <slots>
+               <subslots>Reflect ABI of libsubids.so</subslots>
+       </slots>
        <upstream>
                <remote-id type="cpe">cpe:/a:debian:shadow</remote-id>
                <remote-id type="github">shadow-maint/shadow</remote-id>

diff --git a/sys-apps/shadow/shadow-4.10-r1.ebuild 
b/sys-apps/shadow/shadow-4.10-r2.ebuild
similarity index 97%
rename from sys-apps/shadow/shadow-4.10-r1.ebuild
rename to sys-apps/shadow/shadow-4.10-r2.ebuild
index a213030fec37..888a5dd2db52 100644
--- a/sys-apps/shadow/shadow-4.10-r1.ebuild
+++ b/sys-apps/shadow/shadow-4.10-r2.ebuild
@@ -3,14 +3,15 @@
 
 EAPI=7
 
-inherit libtool pam
+inherit autotools pam
 
 DESCRIPTION="Utilities to deal with user accounts"
 HOMEPAGE="https://github.com/shadow-maint/shadow";
 
SRC_URI="https://github.com/shadow-maint/shadow/releases/download/v${PV}/${P}.tar.xz";
 
 LICENSE="BSD GPL-2"
-SLOT="0"
+# Subslot is for libsubid's SONAME.
+SLOT="0/4"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86"
 IUSE="acl audit bcrypt cracklib nls pam selinux skey split-usr su xattr"
 # Taken from the man/Makefile.am file.
@@ -54,12 +55,14 @@ RDEPEND="${COMMON_DEPEND}
 
 PATCHES=(
        "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch"
+       "${FILESDIR}/${PN}-4.10-libsubid-soname.patch"
 )
 
 src_prepare() {
        default
 
-       elibtoolize
+       eautoreconf
+       #elibtoolize
 }
 
 src_configure() {

Reply via email to