From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka <adolf.belka@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH 1/2] pmacct: Patch file to allow build to work with GCC 11 Date: Fri, 16 Jul 2021 13:12:57 +0200 Message-ID: <20210716111258.210479-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6682032932711874663==" List-Id: <development.lists.ipfire.org> --===============6682032932711874663== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - Created pmacct-1.7.6-Werror.patch to remove -Werror flags from the configure This was flagging up warnings as errors and stopping the build - Removed the SUP_ARCH line to allow it to build again - No update required to the rootfile Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org> --- lfs/pmacct | 17 ++++++------ src/patches/pmacct-1.7.6-Werror.patch | 38 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 src/patches/pmacct-1.7.6-Werror.patch diff --git a/lfs/pmacct b/lfs/pmacct index 5674ecc1b..2307f8c87 100644 --- a/lfs/pmacct +++ b/lfs/pmacct @@ -32,9 +32,8 @@ DL_FROM =3D $(URL_IPFIRE) DIR_APP =3D $(DIR_SRC)/$(THISAPP) TARGET =3D $(DIR_INFO)/$(THISAPP) PROG =3D pmacct -PAK_VER =3D 1 +PAK_VER =3D 2 =20 -SUP_ARCH =3D none =20 DEPS =3D libcdada =20 @@ -79,13 +78,15 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && rm configure + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/pmacct-1.7.6-Werror.p= atch cd $(DIR_APP) && ./autogen.sh - cd $(DIR_APP) && ./configure \ - --prefix=3D/usr \ - --sysconfdir=3D/etc/pmacct \ - --enable-sqlite3 \ - --enable-l2 \ - --enable-jansson + cd $(DIR_APP) && ./configure \ + --prefix=3D/usr \ + --sysconfdir=3D/etc/pmacct \ + --enable-sqlite3 \ + --enable-l2 \ + --enable-jansson # Add directory for plugins and pipes -mkdir -v /var/spool/pmacct # Add configuration folder and copy conf file to it diff --git a/src/patches/pmacct-1.7.6-Werror.patch b/src/patches/pmacct-1.7.6= -Werror.patch new file mode 100644 index 000000000..57bb7d1ff --- /dev/null +++ b/src/patches/pmacct-1.7.6-Werror.patch @@ -0,0 +1,38 @@ +--- pmacct-1.7.6/configure.ac.orig 2021-02-05 02:07:36.000000000 +0100 ++++ pmacct-1.7.6/configure.ac 2021-07-15 19:58:37.247916727 +0200 +@@ -1153,9 +1153,9 @@ AC_ARG_ENABLE(debug, + AC_MSG_RESULT(yes) + tmp_CFLAGS=3D`echo $CFLAGS | sed 's/O2/O0/g'` + CFLAGS=3D"$tmp_CFLAGS" +- CFLAGS=3D"$CFLAGS -g -Wall -Werror" ++ CFLAGS=3D"$CFLAGS -g -Wall" + else +- CFLAGS=3D"$CFLAGS -Wall -Werror" ++ CFLAGS=3D"$CFLAGS -Wall" + AC_MSG_RESULT(no) + fi + ], + + +--- pmacct-1.7.6/src/external_libs/libcdada/configure.ac.orig 2021-02-07 16:= 29:15.000000000 +0100 ++++ pmacct-1.7.6/src/external_libs/libcdada/configure.ac 2021-07-16 09:04:30= .858749121 +0200 +@@ -4,7 +4,7 @@ AC_INIT(LIBCDADA, m4_esyscmd_s(cat VERSI + AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_MACRO_DIR([m4]) +=20 +-AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) ++AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) +=20 + AC_GNU_SOURCE +=20 +@@ -24,8 +24,8 @@ LT_INIT + AC_ENABLE_STATIC +=20 + # Some useful default flags +-CFLAGS=3D"-std=3Dgnu89 -Werror -Wall $CFLAGS" +-CXXFLAGS=3D"-Werror -Wall $CXXFLAGS" ++CFLAGS=3D"-std=3Dgnu89 -Wall $CFLAGS" ++CXXFLAGS=3D"-Wall $CXXFLAGS" + AC_DEFINE([__STDC_FORMAT_MACROS], [], [Description]) +=20 + # Check for Python3 --=20 2.32.0 --===============6682032932711874663==--