[RFC,PATCHv3,1/3] allow to build more native packages

Message ID 20220520125419.4115417-1-f_l_k@t-online.de
State New
Headers show
Series [RFC,PATCHv3,1/3] allow to build more native packages | expand

Commit Message

Markus Volk May 20, 2022, 12:54 p.m. UTC
basically this would fix build for pipewire-native, libpam-native and openssh-native.
Hopefully without breaking things ;)
---
 .../openssh/openssh_9.0p1.bb                  |  2 +-
 meta/recipes-core/udev/eudev_3.2.11.bb        |  2 ++
 meta/recipes-extended/pam/libpam_1.5.2.bb     | 24 +++++++++++--------
 .../recipes-graphics/xorg-lib/libxv_1.0.11.bb |  1 +
 meta/recipes-multimedia/flac/flac_1.3.4.bb    |  1 +
 .../gstreamer1.0-plugins-base_1.20.1.bb       |  2 ++
 .../gstreamer/gstreamer1.0_1.20.1.bb          |  2 ++
 .../recipes-multimedia/libogg/libogg_1.3.5.bb |  2 ++
 .../libsamplerate/libsamplerate0_0.2.2.bb     |  2 ++
 .../libsndfile/libsndfile1_1.1.0.bb           |  2 ++
 .../libtheora/libtheora_1.1.1.bb              |  2 ++
 .../libvorbis/libvorbis_1.3.7.bb              |  2 ++
 .../iso-codes/iso-codes_4.9.0.bb              |  2 ++
 13 files changed, 35 insertions(+), 11 deletions(-)

Comments

Luca Ceresoli May 20, 2022, 3:20 p.m. UTC | #1
Hi Markus,

Il giorno Fri, 20 May 2022 14:54:17 +0200
"Markus Volk" <f_l_k@t-online.de> ha scritto:

> basically this would fix build for pipewire-native, libpam-native and
> openssh-native. Hopefully without breaking things ;)

Missing Signed-off-by :line.

Patch

diff --git a/meta/recipes-connectivity/openssh/openssh_9.0p1.bb b/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
index b63ea2b137..d2cf8a6cf8 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
@@ -180,4 +180,4 @@  ALTERNATIVE_PRIORITY = "90"
 ALTERNATIVE:${PN}-scp = "scp"
 ALTERNATIVE:${PN}-ssh = "ssh"
 
-BBCLASSEXTEND += "nativesdk"
+BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-core/udev/eudev_3.2.11.bb b/meta/recipes-core/udev/eudev_3.2.11.bb
index 841039f6d7..2c1c59b993 100644
--- a/meta/recipes-core/udev/eudev_3.2.11.bb
+++ b/meta/recipes-core/udev/eudev_3.2.11.bb
@@ -89,3 +89,5 @@  pkg_postinst:eudev-hwdb () {
 pkg_prerm:eudev-hwdb () {
         rm -f $D${sysconfdir}/udev/hwdb.bin
 }
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/pam/libpam_1.5.2.bb b/meta/recipes-extended/pam/libpam_1.5.2.bb
index 081986ef43..1b0bb0d51c 100644
--- a/meta/recipes-extended/pam/libpam_1.5.2.bb
+++ b/meta/recipes-extended/pam/libpam_1.5.2.bb
@@ -54,7 +54,7 @@  FILES:${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libd
 FILES:${PN}-runtime = "${sysconfdir} ${sbindir} ${systemd_system_unitdir}"
 FILES:${PN}-xtests = "${datadir}/Linux-PAM/xtests"
 
-PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
+PACKAGES_DYNAMIC:class-target += "^${MLPREFIX}pam-plugin-.*"
 
 def get_multilib_bit(d):
     baselib = d.getVar('baselib') or ''
@@ -65,23 +65,24 @@  libpam_suffix = "suffix${@get_multilib_bit(d)}"
 RPROVIDES:${PN} += "${PN}-${libpam_suffix}"
 RPROVIDES:${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
 
-RDEPENDS:${PN}-runtime = "${PN}-${libpam_suffix} \
+RDEPENDS:${PN}-xtests = "bash coreutils"
+
+RRECOMMENDS:${PN}-runtime = "${PN}-${libpam_suffix} \
+    ${PN}-runtime-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
     "
-RDEPENDS:${PN}-xtests = "${PN}-${libpam_suffix} \
+RRECOMMENDS:${PN}-xtests = "${PN}-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
     ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
-    bash coreutils"
+    "
 
-# FIXME: Native suffix breaks here, disable it for now
-RRECOMMENDS:${PN} = "${PN}-runtime-${libpam_suffix}"
-RRECOMMENDS:${PN}:class-native = ""
+RRECOMMENDS:${PN} = "${PN}-runtime"
 
 python populate_packages:prepend () {
     def pam_plugin_hook(file, pkg, pattern, format, basename):
@@ -148,6 +149,9 @@  do_install() {
 	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
 		echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
 	fi
+}
+
+do_install:append:class-target() {
 	if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)}; then
 		install -d ${D}/${libdir}/
 		mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}/
@@ -169,9 +173,7 @@  pkg_postinst:${PN}() {
 }
 
 inherit features_check
-REQUIRED_DISTRO_FEATURES = "pam"
-
-BBCLASSEXTEND = "nativesdk native"
+REQUIRED_DISTRO_FEATURES:class-target = "pam"
 
 CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-session"
 CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
@@ -183,3 +185,5 @@  CONFFILES:${PN}-runtime += "${sysconfdir}/security/limits.conf"
 UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases"
 
 CVE_PRODUCT = "linux-pam"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb b/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
index 3c8bf08153..0eb8f97181 100644
--- a/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
+++ b/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
@@ -17,3 +17,4 @@  XORG_PN = "libXv"
 SRC_URI[md5sum] = "210b6ef30dda2256d54763136faa37b9"
 SRC_URI[sha256sum] = "d26c13eac99ac4504c532e8e76a1c8e4bd526471eb8a0a4ff2a88db60cb0b088"
 
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/flac/flac_1.3.4.bb b/meta/recipes-multimedia/flac/flac_1.3.4.bb
index 012da0a0a0..e177c90b0a 100644
--- a/meta/recipes-multimedia/flac/flac_1.3.4.bb
+++ b/meta/recipes-multimedia/flac/flac_1.3.4.bb
@@ -43,3 +43,4 @@  FILES:libflac++ = "${libdir}/libFLAC++.so.*"
 FILES:liboggflac = "${libdir}/libOggFLAC.so.*"
 FILES:liboggflac++ = "${libdir}/libOggFLAC++.so.*"
 
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.1.bb
index 0953261a98..b52a80d3e1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.1.bb
@@ -92,3 +92,5 @@  def get_opengl_cmdline_list(switch_name, options, d):
         return ''
 
 CVE_PRODUCT += "gst-plugins-base"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.1.bb
index 81b94928d9..fa5ec44a23 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.1.bb
@@ -71,3 +71,5 @@  FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
 CVE_PRODUCT = "gstreamer"
 
 PTEST_BUILD_HOST_FILES = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.5.bb b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb
index b4f02e404c..87362cb6cf 100644
--- a/meta/recipes-multimedia/libogg/libogg_1.3.5.bb
+++ b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb
@@ -15,3 +15,5 @@  SRC_URI[md5sum] = "3178c98341559657a15b185bf5d700a5"
 SRC_URI[sha256sum] = "c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705"
 
 inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
index ed2b6437dd..2ddbd411ee 100644
--- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
+++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
@@ -24,3 +24,5 @@  inherit autotools pkgconfig
 # normal builds. It should be safe to ignore these, but explicitly disabling
 # them adds some extra certainty that builds are deterministic.
 EXTRA_OECONF = "--disable-fftw --disable-alsa"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb
index 70626b3c16..85c11c7ca9 100644
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb
@@ -30,3 +30,5 @@  inherit autotools lib_package pkgconfig multilib_header
 do_install:append() {
     oe_multilib_header sndfile.h
 }
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
index 178e1a9240..45b5f5c358 100644
--- a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
+++ b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
@@ -20,3 +20,5 @@  UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--disable-examples"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb
index 023bce0abe..9b7e2d8ad6 100644
--- a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb
+++ b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb
@@ -17,3 +17,5 @@  SRC_URI[md5sum] = "50902641d358135f06a8392e61c9ac77"
 SRC_URI[sha256sum] = "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b"
 
 inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/iso-codes/iso-codes_4.9.0.bb b/meta/recipes-support/iso-codes/iso-codes_4.9.0.bb
index f51edf09a4..f69e67961d 100644
--- a/meta/recipes-support/iso-codes/iso-codes_4.9.0.bb
+++ b/meta/recipes-support/iso-codes/iso-codes_4.9.0.bb
@@ -20,3 +20,5 @@  S = "${WORKDIR}/git"
 inherit allarch autotools
 
 FILES:${PN} += "${datadir}/xml/"
+
+BBCLASSEXTEND = "native nativesdk"