| 9 |
9 |
# Can reconsider w/ EAPI 8 and IDEPEND, bug #810979
|
| 10 |
10 |
TMPFILES_OPTIONAL=1
|
| 11 |
11 |
|
| 12 |
|
inherit db-use fcaps flag-o-matic meson-multilib toolchain-funcs
|
|
12 |
inherit db-use flag-o-matic meson-multilib user-info
|
| 13 |
13 |
|
| 14 |
14 |
DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
|
| 15 |
15 |
HOMEPAGE="https://github.com/linux-pam/linux-pam"
|
| ... | ... | |
| 42 |
42 |
# meson.build specifically checks for bison and then byacc
|
| 43 |
43 |
# also requires xsltproc
|
| 44 |
44 |
BDEPEND+="
|
|
45 |
acct-group/shadow
|
| 45 |
46 |
|| ( sys-devel/bison dev-util/byacc )
|
| 46 |
47 |
app-text/docbook-xsl-ns-stylesheets
|
| 47 |
48 |
dev-libs/libxslt
|
| ... | ... | |
| 63 |
64 |
>=net-libs/libtirpc-0.2.4-r2:=[${MULTILIB_USEDEP}]
|
| 64 |
65 |
)
|
| 65 |
66 |
"
|
| 66 |
|
RDEPEND="${DEPEND}"
|
|
67 |
RDEPEND="${DEPEND}
|
|
68 |
acct-group/shadow
|
|
69 |
"
|
| 67 |
70 |
PDEPEND=">=sys-auth/pambase-20200616"
|
| 68 |
71 |
|
|
72 |
PATCHES=(
|
|
73 |
"${FILESDIR}"/${P}-32-bit-lastlog.patch
|
|
74 |
"${FILESDIR}"/${P}-32-bit-timestamp.patch
|
|
75 |
)
|
|
76 |
|
| 69 |
77 |
src_configure() {
|
| 70 |
78 |
# meson.build sets -Wl,--fatal-warnings and with e.g. mold, we get:
|
| 71 |
79 |
# cannot assign version `global` to symbol `pam_sm_open_session`: symbol not found
|
| ... | ... | |
| 90 |
98 |
w3m='true'
|
| 91 |
99 |
EOF
|
| 92 |
100 |
|
| 93 |
|
local emesonargs=()
|
| 94 |
|
|
| 95 |
|
if tc-is-cross-compiler; then
|
| 96 |
|
emesonargs+=( --cross-file "${machine_file}" )
|
| 97 |
|
else
|
| 98 |
|
emesonargs+=( --native-file "${machine_file}" )
|
| 99 |
|
fi
|
|
101 |
local emesonargs=(
|
|
102 |
--native-file "${machine_file}"
|
| 100 |
103 |
|
| 101 |
|
emesonargs+=(
|
| 102 |
104 |
$(meson_feature audit)
|
| 103 |
105 |
$(meson_native_use_bool examples)
|
| 104 |
106 |
$(meson_use debug pam-debug)
|
| ... | ... | |
| 162 |
164 |
multilib_src_install_all() {
|
| 163 |
165 |
find "${ED}" -type f -name '*.la' -delete || die
|
| 164 |
166 |
|
|
167 |
fowners :shadow /sbin/unix_chkpwd
|
|
168 |
fperms g+s /sbin/unix_chkpwd
|
|
169 |
|
| 165 |
170 |
# tmpfiles.eclass is impossible to use because
|
| 166 |
171 |
# there is the pam -> tmpfiles -> systemd -> pam dependency loop
|
| 167 |
172 |
dodir /usr/lib/tmpfiles.d
|
| ... | ... | |
| 175 |
180 |
}
|
| 176 |
181 |
|
| 177 |
182 |
pkg_postinst() {
|
|
183 |
if [[ -n ${ROOT} ]]; then
|
|
184 |
# Portage does not currently update the gid on installed files
|
|
185 |
# based on ${EROOT}/etc/group.
|
|
186 |
local gid=$(egetent group shadow | cut -d: -f3)
|
|
187 |
if [[ -n ${gid} ]]; then
|
|
188 |
chgrp "${gid}" "${EROOT}/sbin/unix_chkpwd" &&
|
|
189 |
chmod g+s "${EROOT}/sbin/unix_chkpwd"
|
|
190 |
fi
|
|
191 |
fi
|
| 178 |
192 |
ewarn "Some software with pre-loaded PAM libraries might experience"
|
| 179 |
193 |
ewarn "warnings or failures related to missing symbols and/or versions"
|
| 180 |
194 |
ewarn "after any update. While unfortunate this is a limit of the"
|
| ... | ... | |
| 185 |
199 |
ewarn " lsof / | grep -E -i 'del.*libpam\\.so'"
|
| 186 |
200 |
ewarn ""
|
| 187 |
201 |
ewarn "Alternatively, simply reboot your system."
|
| 188 |
|
|
| 189 |
|
# The pam_unix module needs to check the password of the user which requires
|
| 190 |
|
# read access to /etc/shadow only.
|
| 191 |
|
fcaps -m u+s cap_dac_override sbin/unix_chkpwd
|
| 192 |
202 |
}
|