Skip to contentSkip to conversation

libtirpc: Make it easy to disable the installation of legacy headers

PATCH Peter Kjellerstedt 2 participants 2 messages Dec 5, 2019

lore
Share & tools
lore
#0 lore raw
Quoted 24 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 5 december 2019 23:07
To: [email protected]
Subject: [OE-core] [master][zeus][PATCH 2/2] libtirpc: Make it easy to disable the installation of legacy headers

Providing symbolic links to the header files to replace the old corresponding glibc headers seems like a band aid for applications that have not been updated to cope with the lack of the RPC headers from glibc. Additionally they clash with glibc if an older version of glibc is used that still provides the header files. To remedy this, make it easy to disable the installation of the legacy headers by not setting the legacy-headers PACKAGECONFIG.

---
 .../libtirpc/libtirpc_1.1.4.bb                | 23 +++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)
meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +0 -0
index 91e0ce6fd2..3c84694161 100644

meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" · line 20

Quoted 4 lines
meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +1 -0
@@ -17,6 +17,9 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
 SRC_URI[md5sum] = "f5d2a623e9dfbd818d2f3f3a4a878e3a"
 SRC_URI[sha256sum] = "2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d"
 
+PACKAGECONFIG = "legacy-headers"

I set the legacy-headers PACKAGECONFIG by default to maintain the compatibility with zeus-22.0.1. However, it can be argued that it should not be set to maintain compatibility with zeus-22.0.0. In our case, the change between 22.0.0 and 22.0.1 broke the build for a couple of our products that build using an older glibc.

Quoted 34 lines
meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +13 -10
+PACKAGECONFIG[legacy-headers] = ""
+
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--disable-gssapi"
@@ -24,16 +27,18 @@ EXTRA_OECONF = "--disable-gssapi"
 do_install_append() {
 	chown root:root ${D}${sysconfdir}/netconfig
 
-	for dir in rpc rpcsvc; do
-		install -d ${D}${includedir}/$dir
-		for link_header in ${D}${includedir}/tirpc/$dir/*; do
-			if [ -f $link_header ] &&
-			   [ ! -e ${D}${includedir}/$dir/$(basename $link_header) ]; then
-				ln -sf ../tirpc/$dir/$(basename $link_header) ${D}${includedir}/$dir/$(basename $link_header)
-			fi
+	if [ "${@bb.utils.filter('PACKAGECONFIG', 'legacy-headers', d)}" ]; then
+		for dir in rpc rpcsvc; do
+			install -d ${D}${includedir}/$dir
+			for link_header in ${D}${includedir}/tirpc/$dir/*; do
+				if [ -f $link_header ] &&
+				   [ ! -e ${D}${includedir}/$dir/$(basename $link_header) ]; then
+					ln -sf ../tirpc/$dir/$(basename $link_header) ${D}${includedir}/$dir/$(basename $link_header)
+				fi
+			done
 		done
-	done
-	ln -sf tirpc/netconfig.h ${D}${includedir}/netconfig.h
+		ln -sf tirpc/netconfig.h ${D}${includedir}/netconfig.h
+	fi
 }
 
 BBCLASSEXTEND = "native nativesdk"
--
Quoted 1 line

2.21.0

//Peter

#1 lore raw
Quoted 28 lines · Peter Kjellerstedt
Quoted 28 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 5 december 2019 23:07
To: [email protected]
Subject: [OE-core] [master][zeus][PATCH 2/2] libtirpc: Make it easy to disable the installation of legacy headers

Providing symbolic links to the header files to replace the old corresponding glibc headers seems like a band aid for applications that have not been updated to cope with the lack of the RPC headers from glibc. Additionally they clash with glibc if an older version of glibc is used that still provides the header files. To remedy this, make it easy to disable the installation of the legacy headers by not setting the legacy-headers PACKAGECONFIG.

---
 .../libtirpc/libtirpc_1.1.4.bb                | 23 +++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)
meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +0 -0
index 91e0ce6fd2..3c84694161 100644
@@ -17,6 +17,9 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
 SRC_URI[md5sum] = "f5d2a623e9dfbd818d2f3f3a4a878e3a"
 SRC_URI[sha256sum] = "2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d"
 
Quoted 7 lines

meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" · line 20

Quoted 1 line
meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +1 -0
+PACKAGECONFIG = "legacy-headers"

I set the legacy-headers PACKAGECONFIG by default to maintain the compatibility with zeus-22.0.1. However, it can be argued that it should not be set to maintain compatibility with zeus-22.0.0. In our case, the change between 22.0.0 and 22.0.1 broke the build for a couple of our products that build using an older glibc.

The change broke builds for me too. I'd prefer to have the PACKAGECONFIG disabled by default in zeus.

Quoted 43 lines
Quoted 34 lines
meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +13 -10
+PACKAGECONFIG[legacy-headers] = ""
+
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--disable-gssapi"
@@ -24,16 +27,18 @@ EXTRA_OECONF = "--disable-gssapi"
 do_install_append() {
      chown root:root ${D}${sysconfdir}/netconfig
 
-     for dir in rpc rpcsvc; do
-             install -d ${D}${includedir}/$dir
-             for link_header in ${D}${includedir}/tirpc/$dir/*; do
-                     if [ -f $link_header ] &&
-                        [ ! -e ${D}${includedir}/$dir/$(basename $link_header) ]; then
-                             ln -sf ../tirpc/$dir/$(basename $link_header) ${D}${includedir}/$dir/$(basename $link_header)
-                     fi
+     if [ "${@bb.utils.filter('PACKAGECONFIG', 'legacy-headers', d)}" ]; then
+             for dir in rpc rpcsvc; do
+                     install -d ${D}${includedir}/$dir
+                     for link_header in ${D}${includedir}/tirpc/$dir/*; do
+                             if [ -f $link_header ] &&
+                                [ ! -e ${D}${includedir}/$dir/$(basename $link_header) ]; then
+                                     ln -sf ../tirpc/$dir/$(basename $link_header) ${D}${includedir}/$dir/$(basename $link_header)
+                             fi
+                     done
              done
-     done
-     ln -sf tirpc/netconfig.h ${D}${includedir}/netconfig.h
+             ln -sf tirpc/netconfig.h ${D}${includedir}/netconfig.h
+     fi
 }
 
 BBCLASSEXTEND = "native nativesdk"
--
Quoted 1 line

2.21.0

//Peter

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core