ppp: make pam optional to avoid host contamination
PATCH 1/1 ppp: make pam optional to avoid host contamination
From: Dan McGregor <[email protected]>
Without explicitly disabling pam in ppp, it will check the host for pam headers. This leads to this QA error:
ERROR: ppp-2.5.1-r0 do_configure: QA Issue: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
Rerun configure task after fixing this. [configure-unsafe]
This is a somewhat difficult to hit, only my test machines that have the pam dev package installed show it.
Fix this by adding a packageconfig for pam, with its default value off, since enabling PAM is completely untested.
--- meta/recipes-connectivity/ppp/ppp_2.5.1.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-connectivity/ppp/ppp_2.5.1.bb +4 -1
@@ -27,7 +27,10 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ SRC_URI[sha256sum] = "733b7f5840b613da4eab0429a5081293275f06ba8b528e1b8eea6964faf0243a" -inherit autotools systemd +inherit autotools systemd pkgconfig + +PACKAGECONFIG ??= "" +PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam" EXTRA_OECONF += "--with-openssl=${STAGING_EXECPREFIXDIR}"
Signature · 1 line
2.47.0
Quoted 2 lines · Dan McGregor via lists.openembedded.org
This is a somewhat difficult to hit, only my test machines that have the pam dev package installed show it.
That’s exactly the reproducer with host contaimination problems.
Review
Quoted 2 lines
(quoted diff) +2
-0+PACKAGECONFIG ??= "" +PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam”
We have a ‘pam’ DISTRO_FEATURE, should we just respect that as the default PACKAGECONFIG using bb.utils.filter?
Ross
Quoted 4 lines · Ross Burton via lists.openembedded.org
Review
Quoted 2 lines
(quoted diff) +2
-0+PACKAGECONFIG ??= "" +PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam”We have a ‘pam’
DISTRO_FEATURE, should we just respect that as the default PACKAGECONFIG using bb.utils.filter?
Only if the host contamination is tracked down and solved? Otherwise this should not be an option, but rather a hard disable with a comment on how to reproduce.
Alex
Quoted 14 lines · Alexander Kanavin
Quoted 4 lines · Ross Burton via lists.openembedded.org
Review
Quoted 2 lines
(quoted diff) +2
-0+PACKAGECONFIG ??= "" +PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam”We have a ‘pam’
DISTRO_FEATURE, should we just respect that as the default PACKAGECONFIG using bb.utils.filter?Only if the host contamination is tracked down and solved? Otherwise this should not be an option, but rather a hard disable with a comment on how to reproduce.
Well, if there’s no pam in distro features then it is explicitly turned off, and if there is pam in distro features then we have a libpam in DEPENDS.
The failure path is in https://github.com/ppp-project/ppp/blob/master/m4/ax_check_pam.m4, yet again autoconf-archive has some pretty terrible logic. It looks like if it can find libpam with pkg-config then it won’t try and hunt around /usr, which is where the contamination comes from.
As long as we either explicitly disable or enable-with-DEPENDS, there is no contamination.
Ross
Quoted 11 lines · Ross Burton
Quoted 2 lines · Dan McGregor via lists.openembedded.org
This is a somewhat difficult to hit, only my test machines that have the pam dev package installed show it.
That’s exactly the reproducer with host contaimination problems.
Review
Quoted 2 lines
(quoted diff) +2
-0+PACKAGECONFIG ??= "" +PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam”We have a ‘pam’
DISTRO_FEATURE, should we just respect that as the default PACKAGECONFIG using bb.utils.filter?
I'm not opposed, my original version of this patch did do that, but I also didn't test that pam actually worked, so I figured it was safer to just disable.
Quoted 3 lines
Ross