Skip to contentSkip to conversation

Updates & enhancements

PATCH In review Andreas Müller 2 participants 9 messages Apr 8, 2019 – Apr 9, 2019

lore
Share & tools
lore
#0 lore raw

cover Updates & enhancements

Should apply to current master-next

Andreas Müller (5):
udisks2: upgrade 2.8.1 -> 2.8.2
parole: upgrade 1.0.1 -> 1.0.2
parole: replace gstreamer1.0-plugins-good by gstreamer1.0-meta-video
in RDEPENDS
ristretto: upgrade 0.8.3 -> 0.8.4
networkmanager: rework musl patches

 ...ix-build-with-musl-systemd-specific.patch} | 196 ++----------------
 .../musl/0002-Fix-build-with-musl.patch       | 118 +++++++++++
 .../networkmanager/networkmanager_1.16.0.bb   |   7 +-
 .../{udisks2_2.8.1.bb => udisks2_git.bb}      |  13 +-
 ...{ristretto_0.8.3.bb => ristretto_0.8.4.bb} |   4 +-
 .../{parole_1.0.1.bb => parole_1.0.2.bb}      |   8 +-
 6 files changed, 149 insertions(+), 197 deletions(-)
 rename meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/{0001-Fix-build-with-musl.patch => 0001-Fix-build-with-musl-systemd-specific.patch} (51%)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch
 rename meta-oe/recipes-support/udisks/{udisks2_2.8.1.bb => udisks2_git.bb} (76%)
 rename meta-xfce/recipes-apps/ristretto/{ristretto_0.8.3.bb => ristretto_0.8.4.bb} (76%)
 rename meta-xfce/recipes-multimedia/parole/{parole_1.0.1.bb => parole_1.0.2.bb} (76%)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/5 udisks2: upgrade 2.8.1 -> 2.8.2

From release shortlog [1]:

| The 2.8.2 release brings mostly bugfixes without any changes to the public API. Notable changes include:
|
| * migration from intltool to gettext, udisks no longer depends on gnome-common
| * added 'windows_names' as a default mount option for ntfs-3g
| * fixed an issue potentially leading to open filedescriptors exhaustion

OE-Notes:

* Follow changes mentioned in announcement
* Rename recipe and move PV into recipe

[1] https://github.com/storaged-project/udisks/releases

---
 .../udisks/{udisks2_2.8.1.bb => udisks2_git.bb}     | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
 rename meta-oe/recipes-support/udisks/{udisks2_2.8.1.bb => udisks2_git.bb} (76%)
meta-oe/recipes-support/udisks/udisks2_git.bb renamed from meta-oe/recipes-support/udisks/udisks2_2.8.1.bb +9 -4
similarity index 76%
rename from meta-oe/recipes-support/udisks/udisks2_2.8.1.bb
rename to meta-oe/recipes-support/udisks/udisks2_git.bb
index 3f2130ecd..9c9e5e52a 100644
@@ -10,8 +10,6 @@ DEPENDS = " \
     dbus-glib \
     glib-2.0 \
     libblockdev \
-    intltool-native \
-    gnome-common-native \
     libxslt-native \
 "
 DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
@@ -22,17 +20,24 @@ SRC_URI = " \
     git://github.com/storaged-project/udisks.git;branch=master \
     file://non-gnu-libc.patch \
 "
-SRCREV = "05ae471be3c2adf2255b3a01edb00bba06e02afb"
+PV = "2.8.2"
+SRCREV = "7a787aa3b340fc7f1ca72d748635d6c5445edc58"
 S = "${WORKDIR}/git"
 
 CVE_PRODUCT = "udisks"
 
-inherit autotools systemd gtk-doc gobject-introspection distro_features_check
+inherit autotools systemd gtk-doc gobject-introspection gettext distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "polkit"
 
 EXTRA_OECONF = "--disable-man --disable-gtk-doc"
 
+do_configure_prepend() {
+    # | configure.ac:656: error: required file 'build-aux/config.rpath' not found
+    mkdir -p ${S}/build-aux
+    touch ${S}/build-aux/config.rpath
+}
+
 FILES_${PN} += " \
     ${datadir}/dbus-1/ \
     ${datadir}/polkit-1 \
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/5 parole: upgrade 1.0.1 -> 1.0.2

In reply to Andreas Müller

Bugfix release - from release announcement [1]:
- Added support for GST_INSTALL_PLUGINS_HELPER_MISSING when attempting to install missing codecs (Xfce #14529)
- Fixed compiler error -Wcast-function-type (GCC 8)
- Fixed disabling vendor-enabled plugins
- Fixed crash when disabling plugins (LP #1698540)
- Fixed play button sensitivity items are added to playlist (Xfce #13724, LP #1705243)
- Fixed Appstream validation by removing em tags (Xfce #14260)
- Fixed plugin active state when reopening the Plugins dialog
- Resolved g_type_class_add_private warnings (Xfce #15014)

[1] https://mail.xfce.org/pipermail/xfce/2019-April/036347.html

---
 .../parole/{parole_1.0.1.bb => parole_1.0.2.bb}             | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
 rename meta-xfce/recipes-multimedia/parole/{parole_1.0.1.bb => parole_1.0.2.bb} (81%)
meta-xfce/recipes-multimedia/parole/parole_1.0.2.bb renamed from meta-xfce/recipes-multimedia/parole/parole_1.0.1.bb +2 -4
similarity index 81%
rename from meta-xfce/recipes-multimedia/parole/parole_1.0.1.bb
rename to meta-xfce/recipes-multimedia/parole/parole_1.0.2.bb
index 2b4e97490..a286a5adb 100644
@@ -19,8 +19,8 @@ DEPENDS += " \
     taglib \
 "
 
-SRC_URI[md5sum] = "46fe86bbe0c4aa02c53244d66e62e90c"
-SRC_URI[sha256sum] = "8ad2931fdb35415cc3d7551b5f2207bfaa1aba15545accbacbb4984cdabd7099"
+SRC_URI[md5sum] = "cd22ab579470c5728db0aa6c0b9d4c7d"
+SRC_URI[sha256sum] = "bff0fc846d0d7b8f435ac5514976f1cd1d82b62dbf1b7d470e253a5b439407da"
 
 RDEPENDS_${PN} += "gstreamer1.0-plugins-good"
 
@@ -34,5 +34,3 @@ FILES_${PN} += " \
     ${datadir}/appdata \
     ${libdir}/parole-0/*.so \
 "
-
-FILES_${PN}-dev += "${libdir}/parole-0/*.la"
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/5 parole: replace gstreamer1.0-plugins-good by gstreamer1.0-meta-video in RDEPENDS

In reply to Andreas Müller
---
 meta-xfce/recipes-multimedia/parole/parole_1.0.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-xfce/recipes-multimedia/parole/parole_1.0.2.bb +1 -1
index a286a5adb..a3763a0dc 100644
@@ -22,7 +22,7 @@ DEPENDS += " \
 SRC_URI[md5sum] = "cd22ab579470c5728db0aa6c0b9d4c7d"
 SRC_URI[sha256sum] = "bff0fc846d0d7b8f435ac5514976f1cd1d82b62dbf1b7d470e253a5b439407da"
 
-RDEPENDS_${PN} += "gstreamer1.0-plugins-good"
+RDEPENDS_${PN} += "gstreamer1.0-meta-video"
 
 EXTRA_OECONF = "--disable-gtk-doc"
 
Signature · 1 line
2.20.1
#4 lore raw

Re: [PATCH 3/5] parole: replace gstreamer1.0-plugins-good by gstreamer1.0-meta-video in RDEPENDS

Quoted 6 lines · Andreas Müller
---
 meta-xfce/recipes-multimedia/parole/parole_1.0.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Please ignore this one

Andreas

#5 lore raw

PATCH 4/5 ristretto: upgrade 0.8.3 -> 0.8.4

In reply to Andreas Müller

A bugfix release - see announcement [1]:
- Add missing field initializers
- Instead of thumbnails, the same icons with a crossed red circle (bug #13419)
- Resolve g_type_class_add_private() deprecation
- Glib-Critical errors to stdout: Source ID X was not found when attempting to remove it (bug #15268)
- Fix memory leak (bug #12034)
- Show file size in the status bar (bug #14791)
- Fix opening of PPM files (bug #14709)

[1] https://mail.xfce.org/pipermail/xfce/2019-April/036350.html

---
 .../ristretto/{ristretto_0.8.3.bb => ristretto_0.8.4.bb}      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-xfce/recipes-apps/ristretto/{ristretto_0.8.3.bb => ristretto_0.8.4.bb} (76%)
meta-xfce/recipes-apps/ristretto/ristretto_0.8.4.bb renamed from meta-xfce/recipes-apps/ristretto/ristretto_0.8.3.bb +2 -2
similarity index 76%
rename from meta-xfce/recipes-apps/ristretto/ristretto_0.8.3.bb
rename to meta-xfce/recipes-apps/ristretto/ristretto_0.8.4.bb
index d9b9b2cb0..416ac2adc 100644
@@ -9,8 +9,8 @@ inherit xfce-app
 
 RRECOMMENDS_${PN} += "tumbler"
 
-SRC_URI[md5sum] = "5866b4e11c32a38f72bc737239102544"
-SRC_URI[sha256sum] = "8c9c11760816dfd9ed57fb8b9df86c6a98a2604ab551be3133996a1c32ca2665"
+SRC_URI[md5sum] = "0142c8b9c492cf447e563b00c6204359"
+SRC_URI[sha256sum] = "3a0be4526c93ec0ebbf2e63e69dd0c98f16b20b863d3b6426272592e5b00cea2"
 SRC_URI += "file://0001-Fix-build-after-update-of-xfconf.patch"
 
 FILES_${PN} += "${datadir}/appdata"
Signature · 1 line
2.20.1
#6 lore raw

PATCH 5/5 networkmanager: rework musl patches

In reply to Andreas Müller

* Split out systemd specifics
* Simplfy patch to fix musl / linux-libc-header definition conflicts. This makes future maintenance less pain and fixes build for recipes depending on networkmanager.

For further background read patch description in 0002-Fix-build-with-musl.patch

Build tested with all dependents found in my layers:

* network-manager-applet
* networkmanager-openvpn
* python-networkmanager
* networkmanager-qt
* plasma-nm
* liri-networkmanager

---
 ...ix-build-with-musl-systemd-specific.patch} | 196 ++----------------
 .../musl/0002-Fix-build-with-musl.patch       | 118 +++++++++++
 .../networkmanager/networkmanager_1.16.0.bb   |   7 +-
 3 files changed, 135 insertions(+), 186 deletions(-)
 rename meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/{0001-Fix-build-with-musl.patch => 0001-Fix-build-with-musl-systemd-specific.patch} (51%)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch
meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch +12 -184
similarity index 51%
rename from meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch
rename to meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
index b3f93ff92..accd2f256 100644
@@ -1,75 +1,26 @@
-From f43c9a5b07832a91383e59d655bc3c8a9f48c451 Mon Sep 17 00:00:00 2001
+From 7b09945585e6ce65049fa4039f26caee8daa44b9 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
 Date: Tue, 2 Apr 2019 01:34:35 +0200
-Subject: [PATCH] Fix build with musl
+Subject: [PATCH 1/2] Fix build with musl - systemd specific
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+Networkmanager imported some code from systemd. This requires some adjustments
+for musl.
+
 Upstream-Status: Pending
 
 Signed-off-by: Andreas Müller <[email protected]>
 ---
- clients/cli/connections.c                    |  1 -
- libnm-core/nm-utils.c                        |  2 +-
- shared/n-acd/src/n-acd.c                     |  1 -
- shared/systemd/src/basic/in-addr-util.c      |  1 +
- shared/systemd/src/basic/process-util.c      |  9 ++++++
- shared/systemd/src/basic/socket-util.h       |  6 ++++
- shared/systemd/src/basic/stdio-util.h        |  2 ++
- shared/systemd/src/basic/string-util.h       |  5 ++++
- shared/systemd/src/basic/util.h              | 29 ++++----------------
- src/platform/wifi/nm-wifi-utils.h            |  4 +++
- src/platform/wpan/nm-wpan-utils.h            |  2 --
- src/settings/nm-settings-connection.h        |  2 --
- src/systemd/src/libsystemd-network/sd-lldp.c |  1 +
- src/systemd/src/systemd/sd-dhcp-client.h     |  2 ++
- src/systemd/src/systemd/sd-dhcp-lease.h      |  2 ++
- src/systemd/src/systemd/sd-dhcp6-client.h    |  2 ++
- src/systemd/src/systemd/sd-ipv4ll.h          |  2 ++
- src/systemd/src/systemd/sd-lldp.h            |  2 +-
- 19 files changed, 44 insertions(+), 32 deletions(-)
+ shared/systemd/src/basic/in-addr-util.c |  1 +
+ shared/systemd/src/basic/process-util.c |  9 ++++++++
+ shared/systemd/src/basic/socket-util.h  |  6 +++++
+ shared/systemd/src/basic/stdio-util.h   |  2 ++
+ shared/systemd/src/basic/string-util.h  |  5 +++++
+ shared/systemd/src/basic/util.h         | 29 +++++--------------------
+ 6 files changed, 28 insertions(+), 24 deletions(-)
 
-diff --git a/clients/cli/connections.c b/clients/cli/connections.c
-index 6db44f8..36e51cc 100644
---- a/clients/cli/connections.c
-+++ b/clients/cli/connections.c
-@@ -25,7 +25,6 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <signal.h>
--#include <netinet/ether.h>
- #include <readline/readline.h>
- #include <readline/history.h>
- #include <fcntl.h>
-diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
-index d276cfe..2aec785 100644
---- a/libnm-core/nm-utils.c
-+++ b/libnm-core/nm-utils.c
-@@ -21,10 +21,10 @@
- 
- #include "nm-default.h"
- 
-+#include <netinet/ether.h>
- #include "nm-utils.h"
- 
- #include <stdlib.h>
--#include <netinet/ether.h>
- #include <arpa/inet.h>
- #include <uuid/uuid.h>
- #include <libintl.h>
-diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c
-index def56a2..dd4eb78 100644
---- a/shared/n-acd/src/n-acd.c
-+++ b/shared/n-acd/src/n-acd.c
-@@ -11,7 +11,6 @@
- #include <inttypes.h>
- #include <limits.h>
- #include <linux/if_packet.h>
--#include <netinet/if_ether.h>
- #include <netinet/in.h>
- #include <stdlib.h>
- #include <string.h>
 diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c
 index 5ced350..c6b52b8 100644
 --- a/shared/systemd/src/basic/in-addr-util.c
@@ -223,129 +174,6 @@ index dc33d66..cc768e9 100644
  /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */
  static inline void memcpy_safe(void *dst, const void *src, size_t n) {
          if (n == 0)
-diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h
-index 36148b5..d282eb2 100644
---- a/src/platform/wifi/nm-wifi-utils.h
-+++ b/src/platform/wifi/nm-wifi-utils.h
-@@ -22,7 +22,11 @@
- #ifndef __WIFI_UTILS_H__
- #define __WIFI_UTILS_H__
- 
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#else /* musl libc */
-+#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
-+#endif
- 
- #include "nm-dbus-interface.h"
- #include "nm-setting-wireless.h"
-diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h
-index 1b54ec4..ed39938 100644
---- a/src/platform/wpan/nm-wpan-utils.h
-+++ b/src/platform/wpan/nm-wpan-utils.h
-@@ -20,8 +20,6 @@
- #ifndef __WPAN_UTILS_H__
- #define __WPAN_UTILS_H__
- 
--#include <net/ethernet.h>
--
- #include "nm-dbus-interface.h"
- #include "platform/nm-netlink.h"
- 
-diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
-index e796b71..c01fef6 100644
---- a/src/settings/nm-settings-connection.h
-+++ b/src/settings/nm-settings-connection.h
-@@ -22,8 +22,6 @@
- #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__
- #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__
- 
--#include <net/ethernet.h>
--
- #include "nm-dbus-object.h"
- #include "nm-connection.h"
- 
-diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c
-index 741128e..62914ae 100644
---- a/src/systemd/src/libsystemd-network/sd-lldp.c
-+++ b/src/systemd/src/libsystemd-network/sd-lldp.c
-@@ -3,6 +3,7 @@
- #include "nm-sd-adapt-core.h"
- 
- #include <arpa/inet.h>
-+#include <net/ethernet.h>
- #include <linux/sockios.h>
- #include <sys/ioctl.h>
- 
-diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h
-index bd0d429..c935fe1 100644
---- a/src/systemd/src/systemd/sd-dhcp-client.h
-+++ b/src/systemd/src/systemd/sd-dhcp-client.h
-@@ -20,7 +20,9 @@
- ***/
- 
- #include <inttypes.h>
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <netinet/in.h>
- #include <sys/types.h>
- #include <stdbool.h>
-diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h
-index d299c79..991e67e 100644
---- a/src/systemd/src/systemd/sd-dhcp-lease.h
-+++ b/src/systemd/src/systemd/sd-dhcp-lease.h
-@@ -19,7 +19,9 @@
- ***/
- 
- #include <inttypes.h>
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <netinet/in.h>
- #include <sys/types.h>
- 
-diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h
-index 43d38f5..57ab487 100644
---- a/src/systemd/src/systemd/sd-dhcp6-client.h
-+++ b/src/systemd/src/systemd/sd-dhcp6-client.h
-@@ -20,7 +20,9 @@
- ***/
- 
- #include <inttypes.h>
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <sys/types.h>
- 
- #include "sd-dhcp6-lease.h"
-diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h
-index 71bd4cf..1c667ba 100644
---- a/src/systemd/src/systemd/sd-ipv4ll.h
-+++ b/src/systemd/src/systemd/sd-ipv4ll.h
-@@ -19,7 +19,9 @@
-   along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
- 
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <netinet/in.h>
- 
- #include "sd-event.h"
-diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h
-index bf3afad..4cace87 100644
---- a/src/systemd/src/systemd/sd-lldp.h
-+++ b/src/systemd/src/systemd/sd-lldp.h
-@@ -18,7 +18,7 @@
- ***/
- 
- #include <inttypes.h>
--#include <net/ethernet.h>
-+//#include <net/ethernet.h>
- #include <sys/types.h>
- 
- #include "sd-event.h"
 -- 
 2.20.1
 
meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch new file +118 -0

118 lines not on this page · raw message

meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb +5 -2
index 9f57908e9..970782c72 100644
@@ -28,7 +28,10 @@ SRC_URI = " \
     file://0002-Do-not-create-settings-settings-property-documentati.patch \
     file://0003-dlopen-failure.patch \
 "
-SRC_URI_append_libc-musl = " file://musl/0001-Fix-build-with-musl.patch"
+SRC_URI_append_libc-musl = " \
+    file://musl/0001-Fix-build-with-musl-systemd-specific.patch \
+    file://musl/0002-Fix-build-with-musl.patch \
+"
 
 SRC_URI[md5sum] = "10abacaafb162a67d2942adf03e7e9e4"
 SRC_URI[sha256sum] = "8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c"
@@ -53,7 +56,7 @@ GI_DATA_ENABLED_libc-musl = "False"
 # stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template
 CFLAGS_libc-musl_append = " \
     -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \
-    -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \
+    -DRTLD_DEEPBIND=0 \
 "
 
 do_compile_prepend() {
Signature · 1 line
2.20.1
#7 lore raw

Re: [PATCH 5/5] networkmanager: rework musl patches

Quoted 392 lines · Andreas Müller

* Split out systemd specifics
* Simplfy patch to fix musl / linux-libc-header definition conflicts. This makes future maintenance less pain and fixes build for recipes depending on networkmanager.

For further background read patch description in 0002-Fix-build-with-musl.patch

Build tested with all dependents found in my layers:

* network-manager-applet
* networkmanager-openvpn
* python-networkmanager
* networkmanager-qt
* plasma-nm
* liri-networkmanager

---
 ...ix-build-with-musl-systemd-specific.patch} | 196 ++----------------
 .../musl/0002-Fix-build-with-musl.patch       | 118 +++++++++++
 .../networkmanager/networkmanager_1.16.0.bb   |   7 +-
 3 files changed, 135 insertions(+), 186 deletions(-)
 rename meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/{0001-Fix-build-with-musl.patch => 0001-Fix-build-with-musl-systemd-specific.patch} (51%)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch
meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch +12 -184
similarity index 51%
rename from meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl.patch
rename to meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch
index b3f93ff92..accd2f256 100644
@@ -1,75 +1,26 @@
-From f43c9a5b07832a91383e59d655bc3c8a9f48c451 Mon Sep 17 00:00:00 2001
+From 7b09945585e6ce65049fa4039f26caee8daa44b9 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
 Date: Tue, 2 Apr 2019 01:34:35 +0200
-Subject: [PATCH] Fix build with musl
+Subject: [PATCH 1/2] Fix build with musl - systemd specific
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+Networkmanager imported some code from systemd. This requires some adjustments
+for musl.
+
 Upstream-Status: Pending
 
 Signed-off-by: Andreas Müller <[email protected]>
 ---
- clients/cli/connections.c                    |  1 -
- libnm-core/nm-utils.c                        |  2 +-
- shared/n-acd/src/n-acd.c                     |  1 -
- shared/systemd/src/basic/in-addr-util.c      |  1 +
- shared/systemd/src/basic/process-util.c      |  9 ++++++
- shared/systemd/src/basic/socket-util.h       |  6 ++++
- shared/systemd/src/basic/stdio-util.h        |  2 ++
- shared/systemd/src/basic/string-util.h       |  5 ++++
- shared/systemd/src/basic/util.h              | 29 ++++----------------
- src/platform/wifi/nm-wifi-utils.h            |  4 +++
- src/platform/wpan/nm-wpan-utils.h            |  2 --
- src/settings/nm-settings-connection.h        |  2 --
- src/systemd/src/libsystemd-network/sd-lldp.c |  1 +
- src/systemd/src/systemd/sd-dhcp-client.h     |  2 ++
- src/systemd/src/systemd/sd-dhcp-lease.h      |  2 ++
- src/systemd/src/systemd/sd-dhcp6-client.h    |  2 ++
- src/systemd/src/systemd/sd-ipv4ll.h          |  2 ++
- src/systemd/src/systemd/sd-lldp.h            |  2 +-
- 19 files changed, 44 insertions(+), 32 deletions(-)
+ shared/systemd/src/basic/in-addr-util.c |  1 +
+ shared/systemd/src/basic/process-util.c |  9 ++++++++
+ shared/systemd/src/basic/socket-util.h  |  6 +++++
+ shared/systemd/src/basic/stdio-util.h   |  2 ++
+ shared/systemd/src/basic/string-util.h  |  5 +++++
+ shared/systemd/src/basic/util.h         | 29 +++++--------------------
+ 6 files changed, 28 insertions(+), 24 deletions(-)
 
-diff --git a/clients/cli/connections.c b/clients/cli/connections.c
-index 6db44f8..36e51cc 100644
---- a/clients/cli/connections.c
-+++ b/clients/cli/connections.c
-@@ -25,7 +25,6 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <signal.h>
--#include <netinet/ether.h>
- #include <readline/readline.h>
- #include <readline/history.h>
- #include <fcntl.h>
-diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
-index d276cfe..2aec785 100644
---- a/libnm-core/nm-utils.c
-+++ b/libnm-core/nm-utils.c
-@@ -21,10 +21,10 @@
-
- #include "nm-default.h"
-
-+#include <netinet/ether.h>
- #include "nm-utils.h"
-
- #include <stdlib.h>
--#include <netinet/ether.h>
- #include <arpa/inet.h>
- #include <uuid/uuid.h>
- #include <libintl.h>
-diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c
-index def56a2..dd4eb78 100644
---- a/shared/n-acd/src/n-acd.c
-+++ b/shared/n-acd/src/n-acd.c
-@@ -11,7 +11,6 @@
- #include <inttypes.h>
- #include <limits.h>
- #include <linux/if_packet.h>
--#include <netinet/if_ether.h>
- #include <netinet/in.h>
- #include <stdlib.h>
- #include <string.h>
 diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c
 index 5ced350..c6b52b8 100644
 --- a/shared/systemd/src/basic/in-addr-util.c
@@ -223,129 +174,6 @@ index dc33d66..cc768e9 100644
  /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */
  static inline void memcpy_safe(void *dst, const void *src, size_t n) {
          if (n == 0)
-diff --git a/src/platform/wifi/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h
-index 36148b5..d282eb2 100644
---- a/src/platform/wifi/nm-wifi-utils.h
-+++ b/src/platform/wifi/nm-wifi-utils.h
-@@ -22,7 +22,11 @@
- #ifndef __WIFI_UTILS_H__
- #define __WIFI_UTILS_H__
-
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#else /* musl libc */
-+#define ETH_ALEN      6               /* Octets in one ethernet addr   */
-+#endif
-
- #include "nm-dbus-interface.h"
- #include "nm-setting-wireless.h"
-diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h
-index 1b54ec4..ed39938 100644
---- a/src/platform/wpan/nm-wpan-utils.h
-+++ b/src/platform/wpan/nm-wpan-utils.h
-@@ -20,8 +20,6 @@
- #ifndef __WPAN_UTILS_H__
- #define __WPAN_UTILS_H__
-
--#include <net/ethernet.h>
--
- #include "nm-dbus-interface.h"
- #include "platform/nm-netlink.h"
-
-diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
-index e796b71..c01fef6 100644
---- a/src/settings/nm-settings-connection.h
-+++ b/src/settings/nm-settings-connection.h
-@@ -22,8 +22,6 @@
- #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__
- #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__
-
--#include <net/ethernet.h>
--
- #include "nm-dbus-object.h"
- #include "nm-connection.h"
-
-diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c
-index 741128e..62914ae 100644
---- a/src/systemd/src/libsystemd-network/sd-lldp.c
-+++ b/src/systemd/src/libsystemd-network/sd-lldp.c
-@@ -3,6 +3,7 @@
- #include "nm-sd-adapt-core.h"
-
- #include <arpa/inet.h>
-+#include <net/ethernet.h>
- #include <linux/sockios.h>
- #include <sys/ioctl.h>
-
-diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h
-index bd0d429..c935fe1 100644
---- a/src/systemd/src/systemd/sd-dhcp-client.h
-+++ b/src/systemd/src/systemd/sd-dhcp-client.h
-@@ -20,7 +20,9 @@
- ***/
-
- #include <inttypes.h>
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <netinet/in.h>
- #include <sys/types.h>
- #include <stdbool.h>
-diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h
-index d299c79..991e67e 100644
---- a/src/systemd/src/systemd/sd-dhcp-lease.h
-+++ b/src/systemd/src/systemd/sd-dhcp-lease.h
-@@ -19,7 +19,9 @@
- ***/
-
- #include <inttypes.h>
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <netinet/in.h>
- #include <sys/types.h>
-
-diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h
-index 43d38f5..57ab487 100644
---- a/src/systemd/src/systemd/sd-dhcp6-client.h
-+++ b/src/systemd/src/systemd/sd-dhcp6-client.h
-@@ -20,7 +20,9 @@
- ***/
-
- #include <inttypes.h>
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <sys/types.h>
-
- #include "sd-dhcp6-lease.h"
-diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h
-index 71bd4cf..1c667ba 100644
---- a/src/systemd/src/systemd/sd-ipv4ll.h
-+++ b/src/systemd/src/systemd/sd-ipv4ll.h
-@@ -19,7 +19,9 @@
-   along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#if defined(__GLIBC__)
- #include <net/ethernet.h>
-+#endif
- #include <netinet/in.h>
-
- #include "sd-event.h"
-diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h
-index bf3afad..4cace87 100644
---- a/src/systemd/src/systemd/sd-lldp.h
-+++ b/src/systemd/src/systemd/sd-lldp.h
-@@ -18,7 +18,7 @@
- ***/
-
- #include <inttypes.h>
--#include <net/ethernet.h>
-+//#include <net/ethernet.h>
- #include <sys/types.h>
-
- #include "sd-event.h"
 --
 2.20.1
 
meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch new file +118 -0
new file mode 100644
index 000000000..25f9a4a00
@@ -0,0 +1,118 @@
+From 0b0f2d5abe27b2c9587f449795f0ae3568fc3e38 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Mon, 8 Apr 2019 23:10:43 +0200
+Subject: [PATCH 2/2] Fix build with musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The build issues caused by definition conflicts musl vs linux-libc headers
+(error: redefinition of ...) can be reduced to two headers:
+
+1. netinet/if_ether.h <-> linux/if_ether.h: linux-libc header plays well with
+   glibc and musl headers in case libc's variant (netinet/if_ether.h) is
+   included BEFORE linux variant [1]. We add include at two positions:
+   1. shared/nm-default.h: This is a global which used for networkmanager and
+      is included at the very beginning of all c-files.
+   2. libnm-core/nm-utils.h: This file makes it into installation and is used
+      by dependent packages as network-manager-applet
+2. net/if_arp. <-> linux/if_ether.h: linux-libc: Unfortunaly these files do
+   not play together in harmony. Therefore the libc variant is included early in
+   shared/nm-default.h and occurances linux/if_arp.h are removed.
+
+Note:
+Be aware that this is still nasty business: We have to trust that musl headers
+define same signatures as linux would do - just because musl-makers consider
+linux-libc headers 'notoriously broken for userspace' [2] (search for
+'error: redefinition of').
+
+[1] http://lists.openembedded.org/pipermail/openembedded-core/2019-March/280440.html
+[2] https://wiki.musl-libc.org/faq.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <[email protected]>
+---
+ clients/tui/nmt-device-entry.c   | 1 -
+ libnm-core/nm-utils.h            | 4 ++++
+ shared/nm-default.h              | 3 +++
+ src/devices/nm-device.c          | 2 +-
+ src/platform/nm-linux-platform.c | 1 -
+ 5 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c
+index 43fbbc1..3eae286 100644
+--- a/clients/tui/nmt-device-entry.c
++++ b/clients/tui/nmt-device-entry.c
+@@ -39,7 +39,6 @@
+ #include "nmt-device-entry.h"
+
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+
+ #include "nmtui.h"
+
+diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
+index 2b5baba..8a50131 100644
+--- a/libnm-core/nm-utils.h
++++ b/libnm-core/nm-utils.h
+@@ -25,6 +25,10 @@
+ #error "Only <NetworkManager.h> can be included directly."
+ #endif
+
++/* include as early as possible for musl */
++#include <netinet/if_ether.h>
++/* #include <net/if_arp.h> - uncoment for broken dependents?? */
++
+ #include <glib.h>
+
+ #include <netinet/in.h>
+diff --git a/shared/nm-default.h b/shared/nm-default.h
+index 26d6476..b29e8af 100644
+--- a/shared/nm-default.h
++++ b/shared/nm-default.h
+@@ -211,6 +211,9 @@
+ #endif
+
+ #include <stdlib.h>
++/* include as early as possible for musl */
++#include <netinet/if_ether.h>
++#include <net/if_arp.h>
+
+ /*****************************************************************************/
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 7514fa7..d305fa5 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -24,6 +24,7 @@
+ #include "nm-device.h"
+
+ #include <netinet/in.h>
++#include <net/if.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <signal.h>
+@@ -32,7 +33,6 @@
+ #include <arpa/inet.h>
+ #include <fcntl.h>
+ #include <linux/if_addr.h>
+-#include <linux/if_arp.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/pkt_sched.h>
+
+diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
+index 2f5c75b..d6ca6d9 100644
+--- a/src/platform/nm-linux-platform.c
++++ b/src/platform/nm-linux-platform.c
+@@ -27,7 +27,6 @@
+ #include <fcntl.h>
+ #include <libudev.h>
+ #include <linux/ip.h>
+-#include <linux/if_arp.h>
+ #include <linux/if_link.h>
+ #include <linux/if_tun.h>
+ #include <linux/if_tunnel.h>
+--
+2.20.1
+
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb +4 -1
index 9f57908e9..970782c72 100644
@@ -28,7 +28,10 @@ SRC_URI = " \
     file://0002-Do-not-create-settings-settings-property-documentati.patch \
     file://0003-dlopen-failure.patch \
 "
-SRC_URI_append_libc-musl = " file://musl/0001-Fix-build-with-musl.patch"
+SRC_URI_append_libc-musl = " \
+    file://musl/0001-Fix-build-with-musl-systemd-specific.patch \
+    file://musl/0002-Fix-build-with-musl.patch \
+"
 
 SRC_URI[md5sum] = "10abacaafb162a67d2942adf03e7e9e4"
 SRC_URI[sha256sum] = "8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c"

meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb GI_DATA_ENABLED_libc-musl = "False" · line 57

Quoted 2 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb +0 -0
@@ -53,7 +56,7 @@ GI_DATA_ENABLED_libc-musl = "False"
 # stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template
 CFLAGS_libc-musl_append = " \

this is wrong, it should be CFLAGS_append_libc-musl
but I see it builds without these but probably wont run. So while here can you address this ?

Quoted 14 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb +1 -2
     -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \
-    -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \
+    -DRTLD_DEEPBIND=0 \
 "
 
 do_compile_prepend() {
--

2.20.1

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

#8 lore raw

Re: [PATCH 5/5] networkmanager: rework musl patches

Quoted 5 lines · Khem Raj
Quoted 1 line

CFLAGS_libc-musl_append = " \

this is wrong, it should be CFLAGS_append_libc-musl
but I see it builds without these but probably wont run. So while here can you address this ?

Let's get it right. Will send a V2 tonight.

Andreas