Bug#957230: freebsd-buildutils: ftbfs with GCC-10

2023-08-06 Thread Bastian Germann

Am 07.08.23 um 02:40 schrieb Bastian Germann:

I am uploading a NMU to fix this. The debdiff is attached.


Now with the correct debdiff. I mixed up the BTS addresses.diff -Nru freebsd-buildutils-10.3~svn296373/debian/changelog 
freebsd-buildutils-10.3~svn296373/debian/changelog
--- freebsd-buildutils-10.3~svn296373/debian/changelog  2017-02-13 
22:45:25.0 +0100
+++ freebsd-buildutils-10.3~svn296373/debian/changelog  2023-08-07 
00:36:34.0 +0200
@@ -1,3 +1,14 @@
+freebsd-buildutils (10.3~svn296373-7.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Don't build against flex-old. (Closes: #932512)
+  * Build with gcc-9. (Closes: #957230)
+  * Depend on bsd{extra}utils instead of bsdmainutils. (Closes: #964527)
+  * Require newer freebsd-glue.
+  * Do not require lorder.
+
+ -- Bastian Germann   Mon, 07 Aug 2023 00:36:34 +0200
+
 freebsd-buildutils (10.3~svn296373-7) unstable; urgency=medium
 
   * Build fmtree with support for MD5, SHA1, RMD160, SHA256 checksums
diff -Nru freebsd-buildutils-10.3~svn296373/debian/control 
freebsd-buildutils-10.3~svn296373/debian/control
--- freebsd-buildutils-10.3~svn296373/debian/control2017-02-13 
22:25:13.0 +0100
+++ freebsd-buildutils-10.3~svn296373/debian/control2023-08-07 
00:36:34.0 +0200
@@ -7,13 +7,14 @@
  Robert Millan ,
  Steven Chamberlain ,
 Build-Depends: debhelper (>= 9),
- flex | flex-old,
- libfl-dev | flex-old,
+ gcc-9,
+ flex,
+ libfl-dev,
  bison,
  dpkg-dev (>= 1.16.1.1),
  libbsd-dev (>= 0.3.0),
  libmd-dev,
- freebsd-glue (>= 0.2.20),
+ freebsd-glue (>> 0.2.22),
  bmake,
  byacc (>= 20120115~),
 # for freebsd-config
@@ -24,8 +25,8 @@
 
 Package: freebsd-buildutils
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, bsdmainutils, unzip, patchutils,
- freebsd-glue (>= 0.2.8~),
+Depends: ${shlibs:Depends}, ${misc:Depends}, bsdutils, bsdextrautils, unzip,
+ patchutils, freebsd-glue (>= 0.2.8~),
 # Required by lex
  m4,
 # Not strictly required anymore. But let's drag it in for now, to avoid 
breaking
diff -Nru freebsd-buildutils-10.3~svn296373/debian/patches/01_make_fixes.diff 
freebsd-buildutils-10.3~svn296373/debian/patches/01_make_fixes.diff
--- freebsd-buildutils-10.3~svn296373/debian/patches/01_make_fixes.diff 
2016-03-05 16:28:15.0 +0100
+++ freebsd-buildutils-10.3~svn296373/debian/patches/01_make_fixes.diff 
2023-08-07 00:36:34.0 +0200
@@ -76,7 +76,7 @@
@${ECHO} building static ${LIB} library
@rm -f ${.TARGET}
 -  @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | 
tsort -q` ${ARADD}
-+  @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | 
tsort` ${ARADD}
++  ${AR} ${ARFLAGS} ${.TARGET} ${OBJS} ${STATICOBJS} ${ARADD}
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
  .endif
  
@@ -85,7 +85,7 @@
@${ECHO} building profiled ${LIB} library
@rm -f ${.TARGET}
 -  @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` 
${ARADD}
-+  @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort` 
${ARADD}
++  ${AR} ${ARFLAGS} ${.TARGET} ${POBJS} ${ARADD}
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
  .endif
  
@@ -94,7 +94,7 @@
${_LD} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
-o ${.TARGET} -Wl,-soname,${SONAME} \
 -  `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
-+  `NM='${NM}' lorder ${SOBJS} | tsort` ${LDADD}
++  ${SOBJS} ${LDADD}
  .if ${MK_CTF} != "no"
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
  .endif
diff -Nru 
freebsd-buildutils-10.3~svn296373/debian/patches/ar_command_lines.diff 
freebsd-buildutils-10.3~svn296373/debian/patches/ar_command_lines.diff
--- freebsd-buildutils-10.3~svn296373/debian/patches/ar_command_lines.diff  
2016-07-19 10:30:55.0 +0200
+++ freebsd-buildutils-10.3~svn296373/debian/patches/ar_command_lines.diff  
2023-08-07 00:36:34.0 +0200
@@ -1,27 +1,9 @@
 Date: Tue, 19 Jul 2016 09:06:50 +0100
 From: Steven Chamberlain 
-Subject: make ar command lines visible in build log
+Subject: make ar command line visible in build log
 
 --- a/src/share/mk/bsd.lib.mk
 +++ b/src/share/mk/bsd.lib.mk
-@@ -175,7 +175,7 @@
- lib${LIB}.a: ${OBJS} ${STATICOBJS}
-   @${ECHO} building static ${LIB} library
-   @rm -f ${.TARGET}
--  @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | 
tsort` ${ARADD}
-+  ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | 
tsort` ${ARADD}
-   ${RANLIB} ${RANLIBFLAGS} ${.TARGET}
- .endif
- 
-@@ -188,7 +188,7 @@
- lib${LIB}_p.a: ${POBJS}
-   @${ECHO} building profiled ${LIB} library
-   @rm -f ${.TARGET}
--  @${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort` 
${ARADD}
-+  ${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort` 
${ARADD}
-   ${RANLIB} ${RANLIBFLAGS} ${.TARGET}
- .endif
- 
 @@ -239,7 +239,7 @@
  lib${LIB}_pic.a: ${SOBJS}
@${ECHO} 

Bug#957230: freebsd-buildutils: ftbfs with GCC-10

2023-08-06 Thread Bastian Germann

I am uploading a NMU to fix this. The debdiff is attached.diff -Nru freebsd-glue-0.2.22/debian/changelog 
freebsd-glue-0.2.22+nmu1/debian/changelog
--- freebsd-glue-0.2.22/debian/changelog2016-03-05 16:44:54.0 
+0100
+++ freebsd-glue-0.2.22+nmu1/debian/changelog   2023-08-07 01:20:16.0 
+0200
@@ -1,3 +1,12 @@
+freebsd-glue (0.2.22+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Build with gcc-9. (Closes: #964661)
+  * Include #pragma once in md5.h for freebsd-buildutils.
+  * Temporarily include lorder/tsort workaround. (Closes: #964661)
+
+ -- Bastian Germann   Mon, 07 Aug 2023 01:20:16 +0200
+
 freebsd-glue (0.2.22) unstable; urgency=medium
 
   * Actually use the proper build architecture compiler
diff -Nru freebsd-glue-0.2.22/debian/control 
freebsd-glue-0.2.22+nmu1/debian/control
--- freebsd-glue-0.2.22/debian/control  2016-03-05 02:08:01.0 +0100
+++ freebsd-glue-0.2.22+nmu1/debian/control 2023-08-07 01:18:20.0 
+0200
@@ -7,6 +7,7 @@
  Steven Chamberlain ,
 Build-Depends:
  debhelper (>= 8.0),
+ gcc-9,
  kfreebsd-kernel-headers (>= 10.0~3) [kfreebsd-any],
  freebsd-mk,
  bmake,
diff -Nru freebsd-glue-0.2.22/debian/lorder 
freebsd-glue-0.2.22+nmu1/debian/lorder
--- freebsd-glue-0.2.22/debian/lorder   1970-01-01 01:00:00.0 +0100
+++ freebsd-glue-0.2.22+nmu1/debian/lorder  2023-08-07 01:20:16.0 
+0200
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo $@
diff -Nru freebsd-glue-0.2.22/debian/rules freebsd-glue-0.2.22+nmu1/debian/rules
--- freebsd-glue-0.2.22/debian/rules2016-03-05 01:54:10.0 +0100
+++ freebsd-glue-0.2.22+nmu1/debian/rules   2023-08-07 01:20:16.0 
+0200
@@ -6,7 +6,7 @@
 # Determine host architecture compiler
 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 ifeq ($(origin CC),default)
-CC := $(DEB_HOST_GNU_TYPE)-gcc
+CC := $(DEB_HOST_GNU_TYPE)-gcc-9
 endif
 
 # Determine build architecture compiler
@@ -23,7 +23,7 @@
 endif
 
 DESTDIR = $(CURDIR)/debian/tmp
-PATH := /usr/lib/freebsd:$(PATH)
+PATH := $(CURDIR)/debian:/usr/lib/freebsd:$(PATH)
 PMAKE := \
MAKEFLAGS=$(BSD_MAKEFLAGS) \
MAKEOBJDIRPREFIX=$(CURDIR)/obj-deb \
diff -Nru freebsd-glue-0.2.22/debian/tsort freebsd-glue-0.2.22+nmu1/debian/tsort
--- freebsd-glue-0.2.22/debian/tsort1970-01-01 01:00:00.0 +0100
+++ freebsd-glue-0.2.22+nmu1/debian/tsort   2023-08-07 01:20:16.0 
+0200
@@ -0,0 +1,2 @@
+#!/bin/sh
+sort $@
diff -Nru freebsd-glue-0.2.22/include/md5.h 
freebsd-glue-0.2.22+nmu1/include/md5.h
--- freebsd-glue-0.2.22/include/md5.h   2014-08-25 21:40:17.0 +0200
+++ freebsd-glue-0.2.22+nmu1/include/md5.h  2023-08-07 01:20:16.0 
+0200
@@ -1 +1,2 @@
+#pragma once
 #include