Skip to contentSkip to conversation

cifs-utils: add patch for upstream build bug

PATCH Superseded Daniel Parks 2 participants 2 messages Jun 6, 2022

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs-utils: add patch for upstream build bug

cifs-utils upstream has a bug that causes our build to fail when PARALLEL_MAKE is set to "-j1". This adds an overlay with the patch for the bug, which I have also submitted upstream.

It only changes the order of the build process, so rebuilding already built packages is not necessary.

---
 ...automake-treat-sbin-as-exec-not-data.patch | 34 +++++++++++++++++++
 .../cifs/cifs-utils_6.10.bbappend             |  4 +++
 2 files changed, 38 insertions(+)
 create mode 100644 meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch
 create mode 100644 meta-arago-distro/recipes-support/cifs/cifs-utils_6.10.bbappend
meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch new file +34 -0
new file mode 100644
index 00000000..5a7bdd20
@@ -0,0 +1,34 @@
+From fd5f395514256572c451127006a68483106cf2b8 Mon Sep 17 00:00:00 2001
+From: Daniel Parks <[email protected]>
+Date: Fri, 3 Jun 2022 15:34:59 -0500
+Subject: [PATCH] cifs-utils: Make automake treat /sbin as exec, not data
+
+Otherwise, $(DESTDIR)/sbin doesn't get created until install-data on a
+-j1 build and install-exec-hook can fail because it might not exist.
+
+Steps to reproduce this bug:
+$ autoreconf -i
+$ ./configure
+$ mkdir image
+$ make DESTDIR=image install -j1
+
+Signed-off-by: Daniel Parks <[email protected]>
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e9be6b3..edb1b7f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,8 @@
+ AM_CFLAGS = -Wall -Wextra -D_FORTIFY_SOURCE=2 $(PIE_CFLAGS) $(RELRO_CFLAGS)
+ ACLOCAL_AMFLAGS = -I aclocal
+ 
+-root_sbindir = $(ROOTSBINDIR)
+-root_sbin_PROGRAMS = mount.cifs
++root_exec_sbindir = $(ROOTSBINDIR)
++root_exec_sbin_PROGRAMS = mount.cifs
+ mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
+ mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD) $(RT_LDADD)
+ include_HEADERS = cifsidmap.h
meta-arago-distro/recipes-support/cifs/cifs-utils_6.10.bbappend new file +4 -0
new file mode 100644
index 00000000..33030b87
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch"
+
Signature · 1 line
2.17.1
#1 lore raw
Quoted 24 lines · Daniel Parks via lists.yoctoproject.org

cifs-utils upstream has a bug that causes our build to fail when PARALLEL_MAKE is set to "-j1". This adds an overlay with the patch for the bug, which I have also submitted upstream.

It only changes the order of the build process, so rebuilding already built packages is not necessary.

---
 ...automake-treat-sbin-as-exec-not-data.patch | 34 +++++++++++++++++++
 .../cifs/cifs-utils_6.10.bbappend             |  4 +++
 2 files changed, 38 insertions(+)
 create mode 100644 meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch
 create mode 100644 meta-arago-distro/recipes-support/cifs/cifs-utils_6.10.bbappend
meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch new file +3 -0
new file mode 100644
index 00000000..5a7bdd20
@@ -0,0 +1,34 @@
+From fd5f395514256572c451127006a68483106cf2b8 Mon Sep 17 00:00:00 2001
+From: Daniel Parks <[email protected]>
+Date: Fri, 3 Jun 2022 15:34:59 -0500

meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch line 13

Quoted 10 lines
meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch new file +10 -0
+Subject: [PATCH] cifs-utils: Make automake treat /sbin as exec, not data
+
+Otherwise, $(DESTDIR)/sbin doesn't get created until install-data on a
+-j1 build and install-exec-hook can fail because it might not exist.
+
+Steps to reproduce this bug:
+$ autoreconf -i
+$ ./configure
+$ mkdir image
+$ make DESTDIR=image install -j1

Would be nice to have an Upstream-Status: tag here.

Quoted 32 lines
meta-arago-distro/recipes-support/cifs/cifs-utils/0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch new file +20 -0
+Signed-off-by: Daniel Parks <[email protected]>
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e9be6b3..edb1b7f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,8 @@
+ AM_CFLAGS = -Wall -Wextra -D_FORTIFY_SOURCE=2 $(PIE_CFLAGS) $(RELRO_CFLAGS)
+ ACLOCAL_AMFLAGS = -I aclocal
+ 
+-root_sbindir = $(ROOTSBINDIR)
+-root_sbin_PROGRAMS = mount.cifs
++root_exec_sbindir = $(ROOTSBINDIR)
++root_exec_sbin_PROGRAMS = mount.cifs
+ mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
+ mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD) $(RT_LDADD)
+ include_HEADERS = cifsidmap.h
meta-arago-distro/recipes-support/cifs/cifs-utils_6.10.bbappend new file +4 -0
new file mode 100644
index 00000000..33030b87
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0001-cifs-utils-Make-automake-treat-sbin-as-exec-not-data.patch"
+
Signature · 1 line
2.17.1