Skip to contentSkip to conversation

sssd: Add PACKAGECONFIG for python2

PATCH In review Jonatan Pålsson 2 participants 5 messages Mar 5, 2020 – Mar 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 sssd: Add PACKAGECONFIG for python2

Fixes the following build error:

.. snip ..
| checking for python2... no
| checking for python3... (cached) python3.8
| configure: error:
| The program python2 was not found in search path.
| Please ensure that it is installed and its directory is included in the search | path. It is required for building python2 bindings. If you do not want to build | them please use argument --without-python2-bindings when running configure. | WARNING: exit code 1 from a shell command.

---
 recipes-security/sssd/sssd_1.16.4.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-security/sssd/sssd_1.16.4.bb +1 -0
index c381c32..9feba14 100644
@@ -33,6 +33,7 @@ PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
 PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
 PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
 PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
+PACKAGECONFIG[python2] = "--with-python2-bindings, --without-python2-bindings, python, python"
 PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
 PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
 PACKAGECONFIG[cyrpto] = "--with-crypto=libcrypto, , libcrypto"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 sssd: Fix typo in PACKAGECONFIG. cyrpto -> crypto

---
 recipes-security/sssd/sssd_1.16.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-security/sssd/sssd_1.16.4.bb +1 -1
index 9feba14..525cea8 100644
@@ -36,7 +36,7 @@ PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
 PACKAGECONFIG[python2] = "--with-python2-bindings, --without-python2-bindings, python, python"
 PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
 PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
-PACKAGECONFIG[cyrpto] = "--with-crypto=libcrypto, , libcrypto"
+PACKAGECONFIG[crypto] = "--with-crypto=libcrypto, , libcrypto"
 PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
 PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
 PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/, --with-systemdunitdir="
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/3 sssd: DEPEND on nss if nothing else is chosen

In reply to Jonatan Pålsson

sssd will attempt to build against nss if no crypto is selected. If a bbappend sets PACKAGECONFIG = <list without nss or crypto>, the appropriate DEPEND is not established.

Fixes the following configure error:

... snip ...
| checking for NSS... configure: error: Package requirements (nss) were not met:
|
| No package 'nss' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you | installed software in a non-standard prefix.
|
| Alternatively, you may set the environment variables NSS_CFLAGS | and NSS_LIBS to avoid the need to call pkg-config.
| See the pkg-config man page for more details.
|
| WARNING: exit code 1 from a shell command.

---
 recipes-security/sssd/sssd_1.16.4.bb | 5 +++++
 1 file changed, 5 insertions(+)
recipes-security/sssd/sssd_1.16.4.bb +5 -0
index 525cea8..8335596 100644
@@ -8,6 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive"
 DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
 
+# If no crypto has been selected, default to DEPEND on nss, since that's what
+# sssd will pick if no active choice is made during configure
+DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'nss', '', \
+               bb.utils.contains('PACKAGECONFIG', 'crypto', '', 'nss', d), d)}"
+
 SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz\
             file://sssd.conf "
 
Signature · 1 line
2.25.1
#3 lore raw
In reply to Jonatan Pålsson
Quoted 22 lines · Jonatan Pålsson

Fixes the following build error:

.. snip ..
| checking for python2... no
| checking for python3... (cached) python3.8
| configure: error:
| The program python2 was not found in search path.
| Please ensure that it is installed and its directory is included in the search | path. It is required for building python2 bindings. If you do not want to build | them please use argument --without-python2-bindings when running configure. | WARNING: exit code 1 from a shell command.

---
 recipes-security/sssd/sssd_1.16.4.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-security/sssd/sssd_1.16.4.bb +0 -0
index c381c32..9feba14 100644

recipes-security/sssd/sssd_1.16.4.bb PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " · line 36

Quoted 4 lines
recipes-security/sssd/sssd_1.16.4.bb +1 -0
@@ -33,6 +33,7 @@ PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
 PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
 PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
 PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
+PACKAGECONFIG[python2] = "--with-python2-bindings, --without-python2-bindings, python, python"

Python2 is not supported in Master so maybe append EXTRA_OECONF  with --without-python2-binding. I can take this for zeus thou.

- armi

||

Quoted 5 lines
recipes-security/sssd/sssd_1.16.4.bb +0 -0
 PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
 PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
 PACKAGECONFIG[cyrpto] = "--with-crypto=libcrypto, , libcrypto"
#4 lore raw

Hello Armin,

Quoted 30 lines · On Thu, Mar 5, 2020 at 4:18 PM akuster808 <[email protected]> wrote:

On 3/5/20 4:47 AM, Jonatan Pålsson wrote:

Fixes the following build error:

.. snip ..
| checking for python2... no
| checking for python3... (cached) python3.8
| configure: error:
| The program python2 was not found in search path.
| Please ensure that it is installed and its directory is included in the search | path. It is required for building python2 bindings. If you do not want to build | them please use argument --without-python2-bindings when running configure. | WARNING: exit code 1 from a shell command.

---
 recipes-security/sssd/sssd_1.16.4.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-security/sssd/sssd_1.16.4.bb +1 -0
index c381c32..9feba14 100644
@@ -33,6 +33,7 @@ PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
 PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
 PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
 PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
+PACKAGECONFIG[python2] = "--with-python2-bindings, --without-python2-bindings, python, python"
 
Quoted 1 line

Python2 is not supported in Master so maybe append EXTRA_OECONF with --without-python2-binding.

Ah, I see. I'll prepare a new patch with this.

Quoted 1 line

I can take this for zeus thou.

For zeus, a PACKAGECONFIG entry for python2 is available, but the RDEPENDS and DEPENDS entries are missing. I'll prepare a patch to add those entries.

Thanks,
Jonatan