El lun, 15 feb 2021 a las 22:17, Agustin Martin (<agmar...@debian.org>) escribió: > > El lun, 15 feb 2021 a las 20:55, Agustin Martin > (<agmar...@debian.org>) escribió: > > > Find attached proposed patch for regina-rexx wrapper under multiarch. regina-config ^^^^^^^^^^^^^^ Hi, Alen,
I am attaching proposed patches for three additional changes on top of the previous debhelper ones. I do not know current build status for ia64 build, problematic CFLAFS should be added to DEB_CFLAGS_MAINT_STRIP inside the ifeq to make sure dpkg-buildflags does not include them for ia64. Regards, -- Agustin
From 8d5b3a87178b5e300162ec6dec0cee8cd775575b Mon Sep 17 00:00:00 2001 From: Agustin Martin <agmar...@debian.org> Date: Tue, 16 Feb 2021 12:10:01 +0100 Subject: [PATCH 1/3] Do not hardcode compile/link flags into Makefile.in It is better to handle this from debian/rules and build chain. Signed-off-by: Agustin Martin <agmar...@debian.org> --- ...000_Makefile.in_Do-not-hardcode-FLAGS.diff | 23 +++++++++++++++++++ debian/patches/az-patch-01 | 9 -------- debian/patches/series | 1 + debian/rules | 2 +- 4 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 debian/patches/2000_Makefile.in_Do-not-hardcode-FLAGS.diff diff --git a/debian/patches/2000_Makefile.in_Do-not-hardcode-FLAGS.diff b/debian/patches/2000_Makefile.in_Do-not-hardcode-FLAGS.diff new file mode 100644 index 0000000..5993b3c --- /dev/null +++ b/debian/patches/2000_Makefile.in_Do-not-hardcode-FLAGS.diff @@ -0,0 +1,23 @@ +Description: Do not hardcode compile/link flags into Makefile.in +Author: Agustin Martin <agmar...@debian.org> + +Index: regina-rexx/Makefile.in +=================================================================== +--- regina-rexx.orig/Makefile.in 2021-02-12 12:21:43.598716459 +0100 ++++ regina-rexx/Makefile.in 2021-02-12 12:48:55.833461248 +0100 +@@ -39,11 +39,11 @@ + + INSTALL = $(srcdir)/install-sh + +-CC = @CC@ +-RANLIB = @RANLIB@ ++# CC = @CC@ ++# RANLIB = @RANLIB@ + LN_S = @LN_S@ +-CFLAGS = @CFLAGS@ +-LDFLAGS = @LDFLAGS@ ++# CFLAGS = @CFLAGS@ ++# LDFLAGS = @LDFLAGS@ + + RANLIB_DYNAMIC = @RANLIB_DYNAMIC@ + CEXTRA = @CEXTRA@ @DLFCNINCDIR@ -DREGINA_SHARE_DIRECTORY=\"$(sharedir)\" @MH_UNSIGNED_CHAR_SWITCH@ -DREGINA_VERSION_DATE=\"@VER_DATE@\" -DREGINA_VERSION_MAJOR=\"@VER_MAJOR@\" -DREGINA_VERSION_MINOR=\"@VER_MINOR@\" -DREGINA_VERSION_SUPP=\"@VER_SUPP@\" diff --git a/debian/patches/az-patch-01 b/debian/patches/az-patch-01 index 70e0b30..3bff999 100644 --- a/debian/patches/az-patch-01 +++ b/debian/patches/az-patch-01 @@ -12,15 +12,6 @@ Bug-Debian: http://bugs.debian.org/661883 --- a/Makefile.in +++ b/Makefile.in -@@ -41,7 +41,7 @@ INSTALL = $(srcdir)/install-sh - CC = @CC@ - RANLIB = @RANLIB@ - LN_S = @LN_S@ --CFLAGS = @CFLAGS@ -+CFLAGS = $(DEB_CFLAGS) - LDFLAGS = @LDFLAGS@ - - RANLIB_DYNAMIC = @RANLIB_DYNAMIC@ @@ -124,7 +124,7 @@ REGINAEXP = @REGINAEXP@ RPMTOPDIR = @RPMTOPDIR@ HAVE_GCI = @HAVE_GCI@ diff --git a/debian/patches/series b/debian/patches/series index 39a24b0..ca3dfa7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ az-patch-01 0000_Makefile.in_libdir.diff 0000_Makefile.in_sharedir.diff 2000_regina-config_use-wrapper.diff +2000_Makefile.in_Do-not-hardcode-FLAGS.diff diff --git a/debian/rules b/debian/rules index 159510e..5a2cde5 100755 --- a/debian/rules +++ b/debian/rules @@ -50,7 +50,7 @@ build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. - $(MAKE) DEB_CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" + $(MAKE) CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" #docbook-to-man debian/pam-encfs.sgml > pam-encfs.1 touch build-stamp -- 2.30.1
From d26c89fd7d5c80818b85df69a4b11045a86adee0 Mon Sep 17 00:00:00 2001 From: Agustin Martin <agmar...@debian.org> Date: Tue, 16 Feb 2021 13:03:27 +0100 Subject: [PATCH 2/3] debian/rules: Set hardening flags. CFLAGS for ia64 will be adjusted later. Inside the ifeq statement CFLAGS options not working for ia64 will be added to DEB_CFLAGS_MAINT_STRIP as a space separated string to have it stripped from resulting CFLAGS. Signed-off-by: Agustin Martin <agmar...@debian.org> --- debian/patches/az-patch-01 | 67 +++++++++++++++++++------------------- debian/rules | 21 ++++++------ 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/debian/patches/az-patch-01 b/debian/patches/az-patch-01 index 3bff999..3196c57 100644 --- a/debian/patches/az-patch-01 +++ b/debian/patches/az-patch-01 @@ -10,9 +10,11 @@ Author: Alen Zekulic <a...@nms.hr> Forwarded: not-needed Bug-Debian: http://bugs.debian.org/661883 ---- a/Makefile.in -+++ b/Makefile.in -@@ -124,7 +124,7 @@ REGINAEXP = @REGINAEXP@ +Index: regina-rexx-debhelper/Makefile.in +=================================================================== +--- regina-rexx-debhelper.orig/Makefile.in 2021-02-16 12:52:05.887474588 +0100 ++++ regina-rexx-debhelper/Makefile.in 2021-02-16 12:52:05.879474663 +0100 +@@ -124,7 +124,7 @@ RPMTOPDIR = @RPMTOPDIR@ HAVE_GCI = @HAVE_GCI@ GCI_CONVERT_HEADER = @GCI_CONVERT_HEADER@ @@ -21,7 +23,7 @@ Bug-Debian: http://bugs.debian.org/661883 MISCDEFS = -DHAVE_CONFIG_H $(HAVE_GCI) $(TRACEMEM) $(FLISTS) -I. -I$(srcdir) -I$(srcdir)/contrib $(SYS_DEFS) $(REXXSOCKET) LARGE_FILE_SUPPORT = @LARGE_FILE_SUPPORT@ -@@ -285,7 +285,8 @@ ZIP_CFILES = $(ZIP_CSRCFILES) yaccsrc.c +@@ -285,7 +285,8 @@ DEBIANFILES = $(DEBIAN_DIR)/rules $(DEBIAN_DIR)/control $(DEBIAN_DIR)/changelog $(DEBIAN_DIR)/md5_sums \ $(DEBIAN_DIR)/postinst $(DEBIAN_DIR)/postrm $(DEBIAN_DIR)/postrm-dev $(DEBIAN_DIR)/copyright @@ -31,7 +33,7 @@ Bug-Debian: http://bugs.debian.org/661883 #.SUFFIXES: .sho $(SUFFIXES) # -@@ -300,34 +301,28 @@ $(srcdir)/rexx.h : $(srcdir)/extern.h $( +@@ -300,34 +301,28 @@ $(srcdir)/mt.h : $(srcdir)/mt_notmt.h $(srcdir)/mt_posix.h rexx$(binarybitprefix)$(EXE) : $(OFILES) rexx.$(OBJ) nosaa.$(OBJ) @@ -69,7 +71,7 @@ Bug-Debian: http://bugs.debian.org/661883 $(LIBPRE)$(LIBFILE)$(LIBPST): $(OFILES) client.$(OBJ) drexx.$(OBJ) rexxsaa.$(OBJ) rm -f $(LIBPRE)$(LIBFILE)$(LIBPST) -@@ -926,7 +921,7 @@ rxsupport.$(OBJ): $(regutildir)/rxsuppor +@@ -926,7 +921,7 @@ # $(CC) -c $(COPT) $(CC2O) $(DYN_COMP) $(regutildir)/regtrig.c $(SHLPRE)regutil$(MODPST): $(REGUTILOBJ) $(SHLPRE)$(SHLFILE)$(SHLPST) $(REGUTILEXP) @@ -78,9 +80,11 @@ Bug-Debian: http://bugs.debian.org/661883 $(RANLIB_DYNAMIC) ---- a/configure -+++ b/configure -@@ -690,6 +690,7 @@ EFENCE +Index: regina-rexx-debhelper/configure +=================================================================== +--- regina-rexx-debhelper.orig/configure 2021-02-16 12:52:05.887474588 +0100 ++++ regina-rexx-debhelper/configure 2021-02-16 12:52:37.635180631 +0100 +@@ -690,6 +690,7 @@ PURIFY DEBUGGING DEBUG @@ -88,7 +92,7 @@ Bug-Debian: http://bugs.debian.org/661883 FNMATCH_TSO FNMATCH_SHO FNMATCH -@@ -3445,7 +3446,7 @@ case "$target" in +@@ -3445,7 +3446,7 @@ ;; *linux*|*kfreebsd*-gnu*) mach="`uname -m`" @@ -97,18 +101,11 @@ Bug-Debian: http://bugs.debian.org/661883 bitflag="64" osis64bit=yes fi -@@ -8455,7 +8456,7 @@ case "$target" in - LD_RXLIB_B2="${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI)" - LD_RXLIB_UTILB="${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI)" - SHLPRE="lib" -- SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI) -shared ${LDFLAGS} ${SHL_SCRIPT} -Wl,-soname=${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI_MAJOR) \$(SHOFILES)" -+ SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI) -shared ${LDFLAGS} ${SHL_SCRIPT} -Wl,-z,relro,-soname=${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI_MAJOR) \$(SHOFILES)" - SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI)" - OTHER_INSTALLS="installabilib" - USE_ABI="yes" ---- a/regina.1 -+++ b/regina.1 -@@ -60,13 +60,13 @@ Sets tracing of the program to the optio +Index: regina-rexx-debhelper/regina.1 +=================================================================== +--- regina-rexx-debhelper.orig/regina.1 2021-02-16 12:52:05.887474588 +0100 ++++ regina-rexx-debhelper/regina.1 2021-02-16 12:52:05.883474625 +0100 +@@ -60,13 +60,13 @@ commands in the program will be ignored. If you want to run your program with tracing set to "Intermediate", you can use the option @@ -125,7 +122,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP \-i Starts Regina in interactive mode. No script will be executed. -@@ -100,8 +100,8 @@ as a tokenised image. All other switches +@@ -100,8 +100,8 @@ The tokenised image is not allowed to be supplied via stdin. @@ -136,7 +133,7 @@ Bug-Debian: http://bugs.debian.org/661883 more complete description of each function, see the documentation accompanying Regina. -@@ -130,7 +130,7 @@ or was omitted. The option `N' is the sa +@@ -130,7 +130,7 @@ option. .IP B2X(binstring) @@ -145,7 +142,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP BITAND(string1[,[string2][,padchar]]) Returns a string which is the bitwise AND of its two first parameters. -@@ -147,7 +147,7 @@ Converts the character string `string' t +@@ -147,7 +147,7 @@ specifies the number of characters in `string' to convert. .IP C2X(string) @@ -154,7 +151,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP CENTER(string,length[,padchar]) .IP CENTRE(string,length[,padchar]) -@@ -194,11 +194,11 @@ is a variable, and `BAD' otherwise. If ` +@@ -194,11 +194,11 @@ be one of these four, and then `0' or `1' is returned, depending on whether `string' is of the named type. @@ -169,7 +166,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP DELSTR(string,start[,length]) Deletes the substring of `string' starting at position `start' and -@@ -216,12 +216,12 @@ Converts the decimal number `integer' to +@@ -216,12 +216,12 @@ `length'. .IP D2X(integer[,length]) @@ -184,7 +181,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP FORM() Returns the current setting of NUMERIC FORM. -@@ -292,7 +292,7 @@ Loads an external function called; `inte +@@ -292,7 +292,7 @@ as known to the interpreter. .IP SIGN(number) @@ -193,7 +190,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP SOURCELINE([lineno]) Returns the number of lines in the source for the current script, or -@@ -321,11 +321,11 @@ Returns a subsequence of `length' words +@@ -321,11 +321,11 @@ .IP SYMBOL(name) Test whether `name' is a numbol, variable, literal. @@ -208,7 +205,7 @@ Bug-Debian: http://bugs.debian.org/661883 .IP TRACE([setting]) Returns the current trace setting, and optionally sets a new one. -@@ -365,20 +365,20 @@ Returns in alphabetic order all the char +@@ -365,20 +365,20 @@ from the character `start' to the character `end'. .IP X2B(hexstring) @@ -233,7 +230,7 @@ Bug-Debian: http://bugs.debian.org/661883 distribution. .SH Author -@@ -388,7 +388,7 @@ Anders Christensen, University of Trondh +@@ -388,7 +388,7 @@ .SH Maintainer Changes to Regina since 0.07a, Mark Hessling <mark (at) rexx.org> @@ -242,9 +239,11 @@ Bug-Debian: http://bugs.debian.org/661883 .SH See Also There are several good reference books on Rexx. The most famous is ---- a/configure.in -+++ b/configure.in -@@ -249,6 +249,7 @@ if test "$REGUTIL_TERM_LIB" = "none requ +Index: regina-rexx-debhelper/configure.in +=================================================================== +--- regina-rexx-debhelper.orig/configure.in 2021-02-16 12:52:05.887474588 +0100 ++++ regina-rexx-debhelper/configure.in 2021-02-16 12:52:05.883474625 +0100 +@@ -249,6 +249,7 @@ REGUTIL_TERM_LIB="" fi LIBS="$save_LIBS" diff --git a/debian/rules b/debian/rules index 5a2cde5..1c55f6f 100755 --- a/debian/rules +++ b/debian/rules @@ -19,28 +19,29 @@ export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) export DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +ifeq ($(DEB_BUILD_ARCH), ia64) + DEB_CFLAGS_MAINT_STRIP="" +endif + +# Get default build flags for maximum hardening (Needs dpkg-dev >= 1.16.1.1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + confflags=--prefix=/usr \ --with-addon-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/$(rexxpkg)/$(soversion) \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) + # Enable Regina GCI only on supported platforms. ifneq ($(filter alpha amd64 i386,$(DEB_HOST_ARCH)), ) confflags+=--enable-gci endif -ifeq ($(DEB_BUILD_ARCH), ia64) - CFLAGS=-g -else - CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) -endif - -CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) -LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) - configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. - LDFLAGS="$(LDFLAGS)" ./configure $(confflags) + ./configure $(confflags) touch configure-stamp build: build-arch build-indep -- 2.30.1
From 39740b5ac8855a09dc92acfa8ea02e06964b24eb Mon Sep 17 00:00:00 2001 From: Agustin Martin <agmar...@debian.org> Date: Mon, 1 Mar 2021 23:47:42 +0100 Subject: [PATCH 3/3] libregina3.symbols: Add Build-Depends-Package line. Signed-off-by: Agustin Martin <agmar...@debian.org> --- debian/libregina3.symbols | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/libregina3.symbols b/debian/libregina3.symbols index 7564717..58759b1 100644 --- a/debian/libregina3.symbols +++ b/debian/libregina3.symbols @@ -1,4 +1,5 @@ libregina.so.3 libregina3 #MINVER# +* Build-Depends-Package: libregina3-dev REXXSAA_API@REXXSAA_API 3.5 ReginaCleanup@regina_3.3 3.5 ReginaVersion@regina_2.0 3.5 -- 2.30.1