Diff sssd-2.6.0-r2 with a sssd-2.9.1

/usr/portage/sys-auth/sssd/sssd-2.9.1.ebuild 2023-10-09 14:52:35.432368500 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
PYTHON_COMPAT=( python3_{9..11} )
6
PLOCALES="ca de es fr ja ko pt_BR ru sv tr uk"
7
PLOCALES_BIN="${PLOCALES} bg cs eu fi hu id it ka nb nl pl pt tg zh_TW zh_CN"
8
PLOCALE_BACKUP="sv"
9
PYTHON_COMPAT=( python3_{10..12} )
7 10

  
8
inherit autotools linux-info multilib-minimal optfeature python-single-r1 pam systemd toolchain-funcs
11
inherit autotools linux-info multilib-minimal optfeature plocale \
12
	python-single-r1 pam systemd toolchain-funcs
9 13

  
10 14
DESCRIPTION="System Security Services Daemon provides access to identity and authentication"
11 15
HOMEPAGE="https://github.com/SSSD/sssd"
12
SRC_URI="https://github.com/SSSD/sssd/releases/download/${PV}/${P}.tar.gz"
16
if [[ ${PV} != 9999 ]]; then
17
	SRC_URI="https://github.com/SSSD/sssd/releases/download/${PV}/${P}.tar.gz"
18
else
19
	inherit git-r3
20
	EGIT_REPO_URI="https://github.com/SSSD/sssd.git"
21
	EGIT_BRANCH="master"
22
fi
13 23

  
14 24
LICENSE="GPL-3"
15 25
SLOT="0"
16
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
17
IUSE="acl doc +locator +netlink nfsv4 nls +man pac python samba selinux sudo systemd systemtap test"
26
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
27
IUSE="acl doc +netlink nfsv4 nls +man python samba selinux subid sudo systemd systemtap test"
18 28
REQUIRED_USE="
19
	pac? ( samba )
20 29
	python? ( ${PYTHON_REQUIRED_USE} )
21 30
	test? ( sudo )"
22 31
RESTRICT="!test? ( test )"
......
26 35
	app-crypt/p11-kit
27 36
	>=dev-libs/ding-libs-0.2
28 37
	>=dev-libs/cyrus-sasl-2.1.25-r3[kerberos]
38
	dev-libs/jansson:=
29 39
	dev-libs/libpcre2:=
40
	dev-libs/libunistring:=
30 41
	>=dev-libs/popt-1.16
31 42
	>=dev-libs/openssl-1.0.2:=
32
	dev-libs/libunistring:=
33 43
	>=net-dns/bind-tools-9.9[gssapi]
34
	>=net-dns/c-ares-1.7.4:=
35
	>=net-nds/openldap-2.4.30:=[sasl]
44
	>=net-dns/c-ares-1.10.0-r1:=[${MULTILIB_USEDEP}]
45
	>=net-nds/openldap-2.4.30:=[sasl,experimental]
36 46
	>=sys-apps/dbus-1.6
37 47
	>=sys-apps/keyutils-1.5:=
38 48
	>=sys-libs/pam-0-r1[${MULTILIB_USEDEP}]
......
42 52
	>=sys-libs/ldb-1.1.17-r1:=
43 53
	virtual/libintl
44 54
	acl? ( net-fs/cifs-utils[acl] )
45
	locator? ( >=net-dns/c-ares-1.10.0-r1:=[${MULTILIB_USEDEP}] )
46 55
	netlink? ( dev-libs/libnl:3 )
47 56
	nfsv4? ( >=net-fs/nfs-utils-2.3.1-r2 )
48
	pac? ( net-fs/samba )
49
	python? ( ${PYTHON_DEPS} )
57
	nls? ( >=sys-devel/gettext-0.18 )
58
	python? (
59
		${PYTHON_DEPS}
60
		systemd? (
61
			$(python_gen_cond_dep '
62
				dev-python/python-systemd[${PYTHON_USEDEP}]
63
			')
64
		)
65
	)
50 66
	samba? ( >=net-fs/samba-4.10.2[winbind] )
51 67
	selinux? (
52 68
		>=sys-libs/libselinux-2.1.9
53 69
		>=sys-libs/libsemanage-2.1
54 70
	)
71
	subid? ( >=sys-apps/shadow-4.9 )
55 72
	systemd? (
56 73
		sys-apps/systemd:=
57 74
		sys-apps/util-linux
58 75
	)
59 76
	systemtap? ( dev-util/systemtap )"
60 77
RDEPEND="${DEPEND}
61
	>=sys-libs/glibc-2.17[nscd]
62 78
	selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )"
63 79
BDEPEND="
64 80
	virtual/pkgconfig
65 81
	${PYTHON_DEPS}
66 82
	doc? ( app-doc/doxygen )
83
	man? (
84
		app-text/docbook-xml-dtd:4.4
85
		>=dev-libs/libxslt-1.1.26
86
		nls? ( app-text/po4a )
87
	)
67 88
	nls? ( sys-devel/gettext )
68 89
	test? (
69 90
		dev-libs/check
......
75 96
		sys-libs/pam_wrapper
76 97
		sys-libs/uid_wrapper
77 98
	)
78
	man? (
79
		app-text/docbook-xml-dtd:4.4
80
		>=dev-libs/libxslt-1.1.26
81
		nls? ( app-text/po4a )
82
	)"
99
"
83 100

  
84 101
CONFIG_CHECK="~KEYS"
85 102

  
86
PATCHES=( "${FILESDIR}"/${PN}-2.6.0-conditional-python-install.patch )
103
PATCHES=(
104
	"${FILESDIR}/${PN}-2.8.2-krb5_pw_locked.patch"
105
	"${FILESDIR}/${PN}-2.9.1-BUILD-Accept-krb5-1.21-for-building-the-PAC-plugin.patch"
106
	"${FILESDIR}/${PN}-2.9.1-certmap-fix-partial-string-comparison.patch"
107
	"${FILESDIR}/${PN}-2.9.1-sssct-allow-cert-show-and-cert-eval-rule-as-non-root.patch"
108
	"${FILESDIR}/${PN}-2.9.1-conditional-python-install.patch"
109
)
87 110

  
88 111
MULTILIB_WRAPPED_HEADERS=(
89 112
	/usr/include/ipa_hbac.h
......
104 127
src_prepare() {
105 128
	default
106 129

  
130
	plocale_get_locales > src/man/po/LINGUAS || die
131

  
132
	sed -i \
133
		-e "/_langs]/ s/ .*//" \
134
		src/man/po/po4a.cfg \
135
		|| die
136
	enable_locale() {
137
		local locale=${1}
138

  
139
		sed -i \
140
			-e "/_langs]/ s/$/ ${locale}/" \
141
			src/man/po/po4a.cfg \
142
			|| die
143
	}
144

  
145
	plocale_for_each_locale enable_locale
146

  
147
	PLOCALES="${PLOCALES_BIN}"
148
	plocale_get_locales > po/LINGUAS || die
149

  
107 150
	sed -i \
108 151
		-e 's:/var/run:/run:' \
109 152
		src/examples/logrotate \
......
130 173
	local myconf=()
131 174

  
132 175
	myconf+=(
176
		--libexecdir="${EPREFIX}"/usr/libexec
133 177
		--localstatedir="${EPREFIX}"/var
134 178
		--runstatedir="${EPREFIX}"/run
179
		--sbindir="${EPREFIX}"/usr/sbin
135 180
		--with-pid-path="${EPREFIX}"/run
136 181
		--with-plugin-path="${EPREFIX}"/usr/$(get_libdir)/sssd
137 182
		--enable-pammoddir="${EPREFIX}"/$(getpam_mod_dir)
......
143 188
		--with-mcache-path="${EPREFIX}"/var/lib/sss/mc
144 189
		--with-secrets-db-path="${EPREFIX}"/var/lib/sss/secrets
145 190
		--with-log-path="${EPREFIX}"/var/log/sssd
191
		--with-kcm
192
		--enable-kcm-renewal
146 193
		--with-os=gentoo
147 194
		--disable-rpath
148 195
		--disable-static
149 196
		# Valgrind is only used for tests
150 197
		--disable-valgrind
151
		--sbindir="${EPREFIX}"/usr/sbin
152
		$(multilib_native_use_with systemd kcm)
153 198
		$(use_with samba)
154 199
		--with-smb-idmap-interface-version=6
155 200
		$(multilib_native_use_enable acl cifs-idmap-plugin)
156 201
		$(multilib_native_use_with selinux)
157 202
		$(multilib_native_use_with selinux semanage)
158
		$(use_enable locator krb5-locator-plugin)
159
		$(use_enable pac pac-responder)
203
		--enable-krb5-locator-plugin
204
		$(use_enable samba pac-responder)
160 205
		$(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin)
161 206
		$(use_enable nls)
162 207
		$(multilib_native_use_with netlink libnl)
......
164 209
		$(multilib_native_use_with sudo)
165 210
		$(multilib_native_with autofs)
166 211
		$(multilib_native_with ssh)
212
		--without-oidc-child
213
		--without-passkey
214
		$(use_with subid)
167 215
		$(use_enable systemtap)
168 216
		--without-python2-bindings
169 217
		$(multilib_native_use_with python python3-bindings)
......
181 229
			{POPT,TALLOC,TDB,TEVENT,LDB}_{CFLAGS,LIBS}=' '
182 230
			# ldb headers are fine since native needs it
183 231
			# ldb lib fails... but it does not seem to bother
184
			{DHASH,COLLECTION,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' '
185
			{PCRE,CARES,SYSTEMD_LOGIN,SASL,GLIB2,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' '
186
			{NDR_NBT,SMBCLIENT,NDR_KRB5PAC}_{CFLAGS,LIBS}=' '
232
			{DHASH,UNISTRING,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' '
233
			{PCRE,CARES,SYSTEMD_LOGIN,SASL,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' '
234
			{NDR_NBT,SAMBA_UTIL,SMBCLIENT,NDR_KRB5PAC,JANSSON}_{CFLAGS,LIBS}=' '
187 235

  
188 236
			# use native include path for dbus (needed for build)
189 237
			DBUS_CFLAGS="${native_dbus_cflags}"
......
191 239
			# non-pkgconfig checks
192 240
			ac_cv_lib_ldap_ldap_search=yes
193 241
			--without-kcm
242
			--without-manpages
194 243
		)
195 244
	fi
196 245

  
......
201 250
	if multilib_is_native_abi; then
202 251
		default
203 252
		use doc && emake docs
204
		if use man || use nls; then
205
			emake update-po
206
		fi
207 253
	else
208
		emake libnss_sss.la pam_sss.la
209
		use locator && emake sssd_krb5_locator_plugin.la
210
		use pac && emake sssd_pac_plugin.la
254
		emake libnss_sss.la pam_sss.la pam_sss_gss.la
255
		emake sssd_krb5_locator_plugin.la
256
		use samba && emake sssd_pac_plugin.la
211 257
	fi
212 258
}
213 259

  
......
228 274
	else
229 275
		# easier than playing with automake...
230 276
		dopammod .libs/pam_sss.so
277
		dopammod .libs/pam_sss_gss.so
231 278

  
232 279
		into /
233 280
		dolib.so .libs/libnss_sss.so*
234 281

  
235
		if use locator; then
236
			exeinto /usr/$(get_libdir)/krb5/plugins/libkrb5
237
			doexe .libs/sssd_krb5_locator_plugin.so
238
		fi
282
		exeinto /usr/$(get_libdir)/krb5/plugins/libkrb5
283
		doexe .libs/sssd_krb5_locator_plugin.so
239 284

  
240
		if use pac; then
285
		if use samba; then
241 286
			exeinto /usr/$(get_libdir)/krb5/plugins/authdata
242 287
			doexe .libs/sssd_pac_plugin.so
243 288
		fi
......
270 315
	# strip empty dirs
271 316
	if ! use doc; then
272 317
		rm -r "${ED}"/usr/share/doc/"${PF}"/doc || die
273
		rm -r "${ED}"/usr/share/doc/"${PF}"/{hbac,idmap,nss_idmap,sss_simpleifp}_doc || die
318
		rm -r "${ED}"/usr/share/doc/"${PF}"/{hbac,idmap,nss_idmap}_doc || die
274 319
	fi
275 320

  
276 321
	rm -r "${ED}"/run || die
......
280 325
pkg_postinst() {
281 326
	elog "You must set up sssd.conf (default installed into /etc/sssd)"
282 327
	elog "and (optionally) configuration in /etc/pam.d in order to use SSSD"
283
	elog "features. Please see howto in	https://sssd.io/docs/design_pages/smartcard_authentication_require.html"
328
	elog "features."
284 329
	optfeature "Kerberos keytab renew (see krb5_renew_interval)" app-crypt/adcli
285 330
}
Thank you!