Skip to contentSkip to conversation

libxcrypt: Switch to disable obsolete APIs

PATCH In review Richard Purdie 2 participants 5 messages Jun 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 libxcrypt: Switch to disable obsolete APIs

Since we have a fair amount of control of what we build in OE we can disable the obsolete APIs which is what most distros are doing at this point.

This causes the library version to bump from 1 to 2.

---
 meta/recipes-core/libxcrypt/libxcrypt_4.4.6.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/libxcrypt/libxcrypt_4.4.6.bb +3 -0
index 637c0e6ffbd..893f5e73791 100644
@@ -29,4 +29,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error=missing-attributes"
 CPPFLAGS_append_class-nativesdk = " -Wno-error=missing-attributes"
 
+API = "--disable-obsolete-api"
+EXTRA_OECONF += "${API}"
+
 BBCLASSEXTEND = "nativesdk"
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/3 libxcrypt-compat: Add recipe to build the obsolete APIs

Add a recipe which is able to build the obsolete APIs. This is mainly to support uninative which needs to have both the new and obsolete APIs available to support the different host combinations.

---
 .../libxcrypt/libxcrypt-compat_4.4.6.bb          | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.6.bb
meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.6.bb new file +16 -0
new file mode 100644
index 00000000000..810c707e881
@@ -0,0 +1,16 @@
+#
+# This provides libcrypto.so.1 which contains obsolete APIs, needed for uninative in particular
+#
+
+require libxcrypt_${PV}.bb
+
+PROVIDES = ""
+
+API = "--enable-obsolete-api"
+
+do_install_append () {
+	rm -rf ${D}${includedir}
+	rm -rf ${D}${libdir}/pkgconfig
+	rm -rf ${D}${datadir}
+}
+
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/3 uninative-tarball: Add libxcrypt-compat

In reply to Richard Purdie

This avoids sstate/uninative relocation issues where a binary was built against a system with libcrypt.so.1 or libcrypt.so.2 and then run on the opposite by ensuring both libraries are in uninative.

---
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/uninative-tarball.bb +1 -0
index 25635fc2f50..39638eb8c55 100644
@@ -16,6 +16,7 @@ TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc-gconv-libjis \
     nativesdk-patchelf \
     nativesdk-libxcrypt \
+    nativesdk-libxcrypt-compat \
     nativesdk-libnss-nis \
     "
 
Signature · 1 line
2.20.1
#3 lore raw

Re: [PATCH 3/3] uninative-tarball: Add libxcrypt-compat

Quoted 3 lines · Richard Purdie

This avoids sstate/uninative relocation issues where a binary was built against a system with libcrypt.so.1 or libcrypt.so.2 and then run on the opposite by ensuring both libraries are in uninative.

Does this affect stable branches?
- armin

Quoted 17 lines
---
 meta/recipes-core/meta/uninative-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/uninative-tarball.bb +1 -0
index 25635fc2f50..39638eb8c55 100644
@@ -16,6 +16,7 @@ TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc-gconv-libjis \
     nativesdk-patchelf \
     nativesdk-libxcrypt \
+    nativesdk-libxcrypt-compat \
     nativesdk-libnss-nis \
     "
 
#4 lore raw

Re: [PATCH 3/3] uninative-tarball: Add libxcrypt-compat

Quoted 8 lines · On Wed, 2019-06-19 at 07:45 -0700, akuster808 wrote:
Quoted 5 lines · Richard Purdie

This avoids sstate/uninative relocation issues where a binary was built against
a system with libcrypt.so.1 or libcrypt.so.2 and then run on the opposite by
ensuring both libraries are in uninative.

Does this affect stable branches?

Yes, we'll need to upgrade to the new uninative release, assuming these patches test successfully, merge and we make a new release with these tweaks in.

I was going to send you email about this.

I've cc'd Vineela+Tracy so they know too as I'd planned to give them a headsup.

[Context is autobuilder failures with this issue which I root caused, SWAT hasn't filed the bug yet so we're ahead of them!]

Cheers,

Richard