diff mbox series

[v2] subversion: fix svn-revision.txt conflict when building for qemux86-64

Message ID 20260520023754.2076160-1-haixiao.yan.cn@windriver.com
State New
Headers show
Series [v2] subversion: fix svn-revision.txt conflict when building for qemux86-64 | expand

Commit Message

Haixiao Yan May 20, 2026, 2:37 a.m. UTC
From: Haixiao Yan <haixiao.yan.cn@windriver.com>

The revision-install target in Makefile.in generates svn-revision.txt
by first trying to run the cross-compiled svnversion binary on the host.
When the target architecture is x86-64 (same as the build host), the
cross-compiled binary can execute on the host. If the host has libapr1
installed, the 64-bit svnversion succeeds and outputs "Unversioned
directory", while the 32-bit (lib32) binary lacks the 32-bit libapr1
and fails, falling back to "unknown". The differing content causes an
RPM file conflict on /usr/include/subversion-1/svn-revision.txt when
lib32-subversion-dev and subversion-dev are installed together in
do_rootfs.

This does not affect non-x86-64 targets (e.g. ARM) because the
cross-compiled binary cannot execute on the x86-64 host, so both
64-bit and 32-bit builds fall through to the same fallback.

Since the source is a release tarball with no SVN metadata, the correct
value is always "unknown". Fix by patching Makefile.in to skip the
svnversion invocations entirely.

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
---
 ...-fix-svn-revision-host-contamination.patch | 43 +++++++++++++++++++
 .../subversion/subversion_1.14.5.bb           |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-devtools/subversion/subversion/0001-fix-svn-revision-host-contamination.patch

Comments

Alexander Kanavin May 20, 2026, 9:22 a.m. UTC | #1
On Wed, 20 May 2026 at 04:38, Yan, Haixiao (CN) via
lists.openembedded.org
<Haixiao.Yan.CN=windriver.com@lists.openembedded.org> wrote:
> +Upstream-Status: Pending

There needs to be an explanation why this is 'pending', or patch needs
to be submitted upstream, or an upstream ticket needs to be opened,
and the patch marked as Inappropriate [upstream ticket link].

Alex
diff mbox series

Patch

diff --git a/meta/recipes-devtools/subversion/subversion/0001-fix-svn-revision-host-contamination.patch b/meta/recipes-devtools/subversion/subversion/0001-fix-svn-revision-host-contamination.patch
new file mode 100644
index 000000000000..a1851d84e031
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion/0001-fix-svn-revision-host-contamination.patch
@@ -0,0 +1,43 @@ 
+From e6b8f4fd18887d894767b62c0ac4611ea86767e2 Mon Sep 17 00:00:00 2001
+From: Haixiao Yan <haixiao.yan.cn@windriver.com>
+Date: Tue, 19 May 2026 11:00:00 +0800
+Subject: [PATCH] build: do not run svnversion during install
+
+The revision-install target generates svn-revision.txt by first trying
+to run the cross-compiled svnversion binary on the host. When the target
+architecture is x86-64 (same as the build host), the cross-compiled
+binary can execute on the host. If the host has libapr1 installed, the
+64-bit svnversion succeeds and outputs "Unversioned directory", while
+the 32-bit (lib32) binary lacks the 32-bit libapr1 and fails, falling
+back to "unknown". The differing content causes an RPM file conflict
+when lib32-subversion-dev and subversion-dev are installed together.
+
+Since the source is a release tarball with no SVN metadata, the correct
+value is always "unknown". Skip the svnversion invocations entirely.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
+---
+ Makefile.in | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 7f0a37dd9a9b..914c1c37790c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -499,10 +499,7 @@ local-install: @INSTALL_RULES@
+ revision-install:
+ 	test -d $(DESTDIR)$(includedir)/subversion-1 || \
+ 	  $(MKDIR) $(DESTDIR)$(includedir)/subversion-1
+-	(subversion/svnversion/svnversion $(top_srcdir) 2> /dev/null ||  \
+-	 svnversion $(top_srcdir) 2> /dev/null ||                        \
+-	 echo "unknown";                                                 \
+-	) > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
++	echo "unknown" > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
+ 
+ install-static: @INSTALL_STATIC_RULES@
+ 
+-- 
+2.53.0
+
diff --git a/meta/recipes-devtools/subversion/subversion_1.14.5.bb b/meta/recipes-devtools/subversion/subversion_1.14.5.bb
index 13bec4ad5956..05f80b3319aa 100644
--- a/meta/recipes-devtools/subversion/subversion_1.14.5.bb
+++ b/meta/recipes-devtools/subversion/subversion_1.14.5.bb
@@ -11,6 +11,7 @@  DEPENDS:append:class-native = " file-replacement-native"
 SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://serfmacro.patch \
            file://parallel.patch \
+           file://0001-fix-svn-revision-host-contamination.patch \
            "
 
 SRC_URI[sha256sum] = "e78a29e7766b8b7b354497d08f71a55641abc53675ce1875584781aae35644a1"