Source: rpcsvc-proto
Version: 1.4.2-4
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

rpcsvc-proto fails to cross build from source, because it runs the just
built rpcgen during build. There are basically two ways to fix this. One
is modifying the upstream build system to build rpcgen twice (for build
and for host). The other is adding a self-dependency and running the
installed rpcgen. Since the latter is far simpler, I'm attaching a patch
for that variant. Do you find that acceptable?

Helmut
diff --minimal -Nru rpcsvc-proto-1.4.2/debian/changelog 
rpcsvc-proto-1.4.2/debian/changelog
--- rpcsvc-proto-1.4.2/debian/changelog 2021-08-18 22:04:55.000000000 +0200
+++ rpcsvc-proto-1.4.2/debian/changelog 2022-11-30 08:22:32.000000000 +0100
@@ -1,3 +1,10 @@
+rpcsvc-proto (1.4.2-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Run the installed rpcgen during cross builds. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 30 Nov 2022 08:22:32 +0100
+
 rpcsvc-proto (1.4.2-4) unstable; urgency=medium
 
   * Bump the breaks + replace version to 2.31-14. Thanks to Simon McVittie for
diff --minimal -Nru rpcsvc-proto-1.4.2/debian/control 
rpcsvc-proto-1.4.2/debian/control
--- rpcsvc-proto-1.4.2/debian/control   2021-08-18 22:04:42.000000000 +0200
+++ rpcsvc-proto-1.4.2/debian/control   2022-11-30 08:20:02.000000000 +0100
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
 Uploaders: Aurelien Jarno <aure...@debian.org>, Josue Ortega <jo...@debian.org>
-Build-Depends: debhelper-compat (= 13)
+Build-Depends: debhelper-compat (= 13), rpcsvc-proto <cross>
 Rules-Requires-Root: no
 Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/glibc-team/rpcsvc-proto
diff --minimal -Nru rpcsvc-proto-1.4.2/debian/rules 
rpcsvc-proto-1.4.2/debian/rules
--- rpcsvc-proto-1.4.2/debian/rules     2020-08-19 23:45:51.000000000 +0200
+++ rpcsvc-proto-1.4.2/debian/rules     2022-11-30 08:22:32.000000000 +0100
@@ -1,4 +1,13 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 %:
        dh $@
+
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+execute_before_dh_auto_build:
+       set -e; for f in rpcsvc/*.x; do \
+               rpcgen -h -o $${f%.x}.h $$f; \
+       done
+endif

Reply via email to