From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH] sarg: Update to 2.4.0 Date: Mon, 26 Apr 2021 15:01:19 +0200 Message-ID: <2706384d-9870-fcdf-8395-23b22b66e876@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7023905546376925520==" List-Id: --===============7023905546376925520== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, On 26/04/2021 13:15, Adolf Belka wrote: > Hi Michael, > > On 26/04/2021 13:08, Michael Tremer wrote: >> Hello, >> >>> On 26 Apr 2021, at 11:50, Adolf Belka wrote: >>> >>> Hi Michael, >>> >>> On 26/04/2021 12:23, Michael Tremer wrote: >>>> Hello, >>>>> On 25 Apr 2021, at 13:28, Adolf Belka wrote: >>>>> >>>>> - Update from 2.3.11 to 2.4.0 >>>>> - Update of rootfile not required >>>>> - Thanks to Marcel Lorenz for advice on changes to lfs needed to enable >>>>> =C2=A0=C2=A0 successful build of sarg-2.4.0 >>>>> - Removal of old patches that are no longer needed >>>>> >>>>> Signed-off-by: Adolf Belka >>>>> --- >>>>> lfs/sarg=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 | 32 ++++++-------- >>>>> src/patches/sarg/sarg-2.3.11-configure.patch | 38 ----------------- >>>>> src/patches/sarg/sarg-2.3.11-format.patch=C2=A0=C2=A0=C2=A0 | 45 ------= -------------- >>>>> 3 files changed, 13 insertions(+), 102 deletions(-) >>>>> delete mode 100644 src/patches/sarg/sarg-2.3.11-configure.patch >>>>> delete mode 100644 src/patches/sarg/sarg-2.3.11-format.patch >>>>> >>>>> diff --git a/lfs/sarg b/lfs/sarg >>>>> index 697ce7513..9b8a2b763 100644 >>>>> --- a/lfs/sarg >>>>> +++ b/lfs/sarg >>>>> @@ -24,7 +24,7 @@ >>>>> >>>>> include Config >>>>> >>>>> -VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2.3.11 >>>>> +VER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2.4.0 >>>>> >>>>> THISAPP=C2=A0=C2=A0=C2=A0 =3D sarg-$(VER) >>>>> DL_FILE=C2=A0=C2=A0=C2=A0 =3D $(THISAPP).tar.gz >>>>> @@ -32,11 +32,11 @@ DL_FROM=C2=A0=C2=A0=C2=A0 =3D $(URL_IPFIRE) >>>>> DIR_APP=C2=A0=C2=A0=C2=A0 =3D $(DIR_SRC)/$(THISAPP) >>>>> TARGET=C2=A0=C2=A0=C2=A0=C2=A0 =3D $(DIR_INFO)/$(THISAPP) >>>>> PROG=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D sarg >>>>> -PAK_VER=C2=A0=C2=A0=C2=A0 =3D 4 >>>>> +PAK_VER=C2=A0=C2=A0=C2=A0 =3D 5 >>>>> >>>>> DEPS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D >>>>> >>>>> -CFLAGS=C2=A0=C2=A0=C2=A0 +=3D -fcommon >>>>> +CFLAGS=C2=A0=C2=A0=C2=A0 +=3D -Wno-format-truncation -Wformat-overflow= =3D1 -fcommon >>>> There are quite severe problems and I do not think that just silencing t= he warnings is a good solution. >>>> Is there no updated version of the patch available? Or: why has upstream= not fixed those issues? >>> I created new versions of the two patches but then I had a problem with t= he following error (in earlier email) >>> >>> error: gettext infrastructure mismatch: using a Makefile.in.in from gette= xt version 0.20 but the autoconf macros are from gettext version 0.18 >> >> Hopefully running autopoint should fix that. >> >>> I could not find anything on line to fix this. Marcel Lorenz gave the fee= dback that the only way he got sarg-2.4.0 to build was with the lfs that I th= en copied where he had no patches and used the CFLAGS I then used. >> >> Is he not able to use the list? > Sorry, I missed that he had not added the list and just did reply to all. >> >>> If this is not the way that you would like to solve this then I still nee= d help with the autoconf gettext macro at version 0.18. I could not find how = to fix this. >> >> Running autopoint (or autoreconf which will probably call it) is fine. The= problem is the stack overruns that were patched before and the patch that wa= s dropped. Those could potentially be used to inject any code. > Okay. Will try autoreconf and pull the patches I created out of my backup a= nd do a v2 version of the sarg update patch. > I looked at the log file from the failed sarg build and realised that it alre= ady ran autoreconf -vfi and that included running autopoint --force so the pr= oblem with the infrastructure is there after the autoreconf/autopoint command= s have been run. Regards, Adolf. > Adolf. > >> >> -Michael >> >>> >>> Regards, >>> Adolf. >>> >>>>> #######################################################################= ######## >>>>> # Top-level Rules >>>>> @@ -46,7 +46,7 @@ objects =3D $(DL_FILE) >>>>> >>>>> $(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) >>>>> >>>>> -$(DL_FILE)_MD5 =3D 8e30d86b16597aec89ad401c72c761bc >>>>> +$(DL_FILE)_MD5 =3D 1b84509c1a0d55d46148bd957744870f >>>>> >>>>> install : $(TARGET) >>>>> >>>>> @@ -79,23 +79,17 @@ $(subst %,%_MD5,$(objects)) : >>>>> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>>>> =C2=A0=C2=A0=C2=A0=C2=A0@$(PREBUILD) >>>>> =C2=A0=C2=A0=C2=A0=C2=A0@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf = $(DIR_DL)/$(DL_FILE) >>>>> -=C2=A0=C2=A0=C2=A0 $(UPDATE_AUTOMAKE) >>>>> - >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patche= s/sarg/sarg-2.3.11-format.patch >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patche= s/sarg/sarg-2.3.11-configure.patch >>>>> - >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && autoreconf -vfi >>>>> - >>>>> -=C2=A0=C2=A0=C2=A0 # Update gettext Makefile >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && cp -vf /usr/share/gettext/po/Makef= ile.in.in po/Makefile.in.in >>>>> - >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && ./configure \ >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --prefix=3D/usr \ >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --sysconfdir=3D/etc/sarg >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) >>>>> -=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && make $(EXTRA_INSTALL) install >>>>> +=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && autoreconf -vi >>>>> +=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) &&=C2=A0 ./configure \ >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --p= refix=3D/usr=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 \ >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --s= ysconfdir=3D/etc/sarg=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 \ >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --e= nable-sargphp=3D/var/www/html/sarg-php=C2=A0=C2=A0=C2=A0 \ >>>> We don=E2=80=99t have PHP. >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --b= indir=3D/usr/bin >>>> This should be the default. >>>>> +=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && make $(MAKETUNING) >>>>> +=C2=A0=C2=A0=C2=A0 cd $(DIR_APP) && make install >>>>> >>>>> =C2=A0=C2=A0=C2=A0=C2=A0# Install configuration file. >>>>> +=C2=A0=C2=A0=C2=A0 mkdir -p /etc/sarg >>>>> =C2=A0=C2=A0=C2=A0=C2=A0cp -v $(DIR_SRC)/config/sarg/sarg.conf /etc/sar= g/sarg.conf >>>>> >>>>> =C2=A0=C2=A0=C2=A0=C2=A0# Install helper script. >>>>> diff --git a/src/patches/sarg/sarg-2.3.11-configure.patch b/src/patches= /sarg/sarg-2.3.11-configure.patch >>>>> deleted file mode 100644 >>>>> index ca9695595..000000000 >>>>> --- a/src/patches/sarg/sarg-2.3.11-configure.patch >>>>> +++ /dev/null >>>>> @@ -1,38 +0,0 @@ >>>>> ---- sarg-2.3.11/configure.ac~=C2=A0=C2=A0=C2=A0 2019-04-26 22:34:33.49= 9022406 +0000 >>>>> -+++ sarg-2.3.11/configure.ac=C2=A0=C2=A0=C2=A0 2019-04-26 22:35:11.886= 556020 +0000 >>>>> -@@ -29,35 +29,6 @@ >>>>> - # Report more warnings to improve code quality. >>>>> - CFLAGS=3D"${CFLAGS} -Wall -Wno-sign-compare" >>>>> - >>>>> --dnl Check for supported compiler options >>>>> --=20 >>>>> --AC_MSG_CHECKING([for extra warnings flag in $CC]) >>>>> --saved_CFLAGS=3D"${CFLAGS}" >>>>> --CFLAGS=3D"${CFLAGS} -Wextra -Wno-unused-parameter" >>>>> --AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings=3D"yes"],= [have_extra_warnings=3D"no"]) >>>>> --AC_MSG_RESULT($have_extra_warnings) >>>>> --if test "$have_extra_warnings" =3D "no" ; then >>>>> --=C2=A0=C2=A0=C2=A0 CFLAGS=3D"${saved_CFLAGS}" >>>>> --fi >>>>> --=20 >>>>> --AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC]) >>>>> --saved_CFLAGS=3D"${CFLAGS}" >>>>> --CFLAGS=3D"${CFLAGS} -Werror=3Dimplicit-function-declaration" >>>>> --AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declar= ation=3D"yes"],[have_implicit_function_declaration=3D"no"]) >>>>> --AC_MSG_RESULT($have_implicit_function_declaration) >>>>> --if test "$have_implicit_function_declaration" =3D "no" ; then >>>>> --=C2=A0=C2=A0=C2=A0 CFLAGS=3D"${saved_CFLAGS}" >>>>> --fi >>>>> --=20 >>>>> --AC_MSG_CHECKING([for format error flag in $CC]) >>>>> --saved_CFLAGS=3D"${CFLAGS}" >>>>> --CFLAGS=3D"${CFLAGS} -Werror=3Dformat" >>>>> --AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format=3D"yes"],[h= ave_error_format=3D"no"]) >>>>> --AC_MSG_RESULT($have_error_format) >>>>> --if test "$have_error_format" =3D "no" ; then >>>>> --=C2=A0=C2=A0=C2=A0 CFLAGS=3D"${saved_CFLAGS}" >>>>> --fi >>>>> --=20 >>>>> - case "$host" in >>>>> -=C2=A0=C2=A0=C2=A0 *-solaris*) >>>>> -=C2=A0=C2=A0=C2=A0 LDFLAGS=3D"${LDFLAGS} -lsocket -lnsl" >>>>> diff --git a/src/patches/sarg/sarg-2.3.11-format.patch b/src/patches/sa= rg/sarg-2.3.11-format.patch >>>>> deleted file mode 100644 >>>>> index d8ed22028..000000000 >>>>> --- a/src/patches/sarg/sarg-2.3.11-format.patch >>>>> +++ /dev/null >>>>> @@ -1,45 +0,0 @@ >>>>> -diff -wbBur sarg-2.3.11/index.c sarg-2.3.11.my/index.c >>>>> ---- sarg-2.3.11/index.c=C2=A0=C2=A0=C2=A0 2018-01-14 21:00:22.00000000= 0 +0300 >>>>> -+++ sarg-2.3.11.my/index.c=C2=A0=C2=A0=C2=A0 2018-02-19 12:20:15.89620= 3347 +0300 >>>>> -@@ -208,7 +208,7 @@ >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 m1=3Dmonth / 16; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 if(month % 16 !=3D 0) { >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 m2=3Dmonth % 16; >>>>> --=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 sprintf(monthnum,"%02d-%02d",m1,m2); >>>>> -+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 sprintf(monthnum,"%02u-%02u",(unsigned int)m1,(unsigned= int)m2); >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 sprintf(monthname1,"%02d",m1); >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 sprintf(monthname2,"%02d",m2); >>>>> - name_month(monthname1,sizeof(monthname1)); >>>>> -@@ -269,7 +269,7 @@ >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 d1=3Dday / 32; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 if(day % 32 !=3D 0) { >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 d2=3Dday % 32; >>>>> --=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sprintf(daynum,"%02d-%02d",d1,d= 2); >>>>> -+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sprintf(daynum,"%02u-%02u",(uns= igned int)d1,(unsigned int)d2); >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sprintf(daynum,"%02d",d1); >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 } >>>>> -diff -wbBur sarg-2.3.11/report.c sarg-2.3.11.my/report.c >>>>> ---- sarg-2.3.11/report.c=C2=A0=C2=A0=C2=A0 2018-01-14 21:00:23.0000000= 00 +0300 >>>>> -+++ sarg-2.3.11.my/report.c=C2=A0=C2=A0=C2=A0 2018-02-19 12:18:45.1512= 07192 +0300 >>>>> -@@ -54,7 +54,7 @@ >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 char accsmart[MAXLEN]; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 char crc2[MAXLEN/2 -1]; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 char siteind[MAX_TRUNCATED_URL]; >>>>> --=C2=A0=C2=A0=C2=A0 char arqtt[256]; >>>>> -+=C2=A0=C2=A0=C2=A0 char arqtt[267]; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 char *oldurltt=3DNULL; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 char oldaccdiatt[11],oldacchoratt[9]; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 char tmp3[MAXLEN]; >>>>> -diff -wbBur sarg-2.3.11/userinfo.c sarg-2.3.11.my/userinfo.c >>>>> ---- sarg-2.3.11/userinfo.c=C2=A0=C2=A0=C2=A0 2013-06-01 22:02:04.00000= 0000 +0400 >>>>> -+++ sarg-2.3.11.my/userinfo.c=C2=A0=C2=A0=C2=A0 2018-02-19 12:21:16.10= 3200796 +0300 >>>>> -@@ -67,7 +67,7 @@ >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 int skip; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 int flen; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 int count, clen; >>>>> --=C2=A0=C2=A0=C2=A0 char cstr[9]; >>>>> -+=C2=A0=C2=A0=C2=A0 char cstr[11]; >>>>> - >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 last=3DNULL; >>>>> -=C2=A0=C2=A0=C2=A0=C2=A0 for (group=3Dfirst_user_group ; group ; group= =3Dgroup->next) { >>>>> --=20 >>>>> 2.31.1 >> --===============7023905546376925520==--