From mboxrd@z Thu Jan  1 00:00:00 1970
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] sarg: Update to 2.4.0
Date: Mon, 26 Apr 2021 11:23:05 +0100
Message-ID: <A616A743-7F65-44F8-9112-EBB54890B707@ipfire.org>
In-Reply-To: <20210425122844.434587-1-adolf.belka@ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3183331039888037421=="
List-Id: <development.lists.ipfire.org>

--===============3183331039888037421==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hello,

> On 25 Apr 2021, at 13:28, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>=20
> - 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
>   successful build of sarg-2.4.0
> - Removal of old patches that are no longer needed
>=20
> Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
> ---
> lfs/sarg                                     | 32 ++++++--------
> src/patches/sarg/sarg-2.3.11-configure.patch | 38 -----------------
> src/patches/sarg/sarg-2.3.11-format.patch    | 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
>=20
> diff --git a/lfs/sarg b/lfs/sarg
> index 697ce7513..9b8a2b763 100644
> --- a/lfs/sarg
> +++ b/lfs/sarg
> @@ -24,7 +24,7 @@
>=20
> include Config
>=20
> -VER        =3D 2.3.11
> +VER        =3D 2.4.0
>=20
> THISAPP    =3D sarg-$(VER)
> DL_FILE    =3D $(THISAPP).tar.gz
> @@ -32,11 +32,11 @@ DL_FROM    =3D $(URL_IPFIRE)
> DIR_APP    =3D $(DIR_SRC)/$(THISAPP)
> TARGET     =3D $(DIR_INFO)/$(THISAPP)
> PROG       =3D sarg
> -PAK_VER    =3D 4
> +PAK_VER    =3D 5
>=20
> DEPS       =3D
>=20
> -CFLAGS    +=3D -fcommon
> +CFLAGS    +=3D -Wno-format-truncation -Wformat-overflow=3D1 -fcommon

There are quite severe problems and I do not think that just silencing the wa=
rnings is a good solution.

Is there no updated version of the patch available? Or: why has upstream not =
fixed those issues?

> ###########################################################################=
####
> # Top-level Rules
> @@ -46,7 +46,7 @@ objects =3D $(DL_FILE)
>=20
> $(DL_FILE) =3D $(DL_FROM)/$(DL_FILE)
>=20
> -$(DL_FILE)_MD5 =3D 8e30d86b16597aec89ad401c72c761bc
> +$(DL_FILE)_MD5 =3D 1b84509c1a0d55d46148bd957744870f
>=20
> install : $(TARGET)
>=20
> @@ -79,23 +79,17 @@ $(subst %,%_MD5,$(objects)) :
> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> 	@$(PREBUILD)
> 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
> -	$(UPDATE_AUTOMAKE)
> -
> -	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sarg/sarg-2.3.11-for=
mat.patch
> -	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sarg/sarg-2.3.11-con=
figure.patch
> -
> -	cd $(DIR_APP) && autoreconf -vfi
> -
> -	# Update gettext Makefile
> -	cd $(DIR_APP) && cp -vf /usr/share/gettext/po/Makefile.in.in po/Makefile.=
in.in
> -
> -	cd $(DIR_APP) && ./configure \
> -		--prefix=3D/usr \
> -		--sysconfdir=3D/etc/sarg
> -	cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
> -	cd $(DIR_APP) && make $(EXTRA_INSTALL) install
> +	cd $(DIR_APP) && autoreconf -vi=20
> +	cd $(DIR_APP) &&  ./configure 				\
> +			--prefix=3D/usr				\
> +			--sysconfdir=3D/etc/sarg			\
> +			--enable-sargphp=3D/var/www/html/sarg-php	\

We don=E2=80=99t have PHP.

> +			--bindir=3D/usr/bin

This should be the default.

> +	cd $(DIR_APP) && make $(MAKETUNING)
> +	cd $(DIR_APP) && make install
>=20
> 	# Install configuration file.
> +	mkdir -p /etc/sarg
> 	cp -v $(DIR_SRC)/config/sarg/sarg.conf /etc/sarg/sarg.conf
>=20
> 	# Install helper script.
> diff --git a/src/patches/sarg/sarg-2.3.11-configure.patch b/src/patches/sar=
g/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~	2019-04-26 22:34:33.499022406 +0000
> -+++ sarg-2.3.11/configure.ac	2019-04-26 22:35:11.886556020 +0000
> -@@ -29,35 +29,6 @@
> - # Report more warnings to improve code quality.
> - CFLAGS=3D"${CFLAGS} -Wall -Wno-sign-compare"
> -=20
> --dnl Check for supported compiler options
> --
> --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"],[hav=
e_extra_warnings=3D"no"])
> --AC_MSG_RESULT($have_extra_warnings)
> --if test "$have_extra_warnings" =3D "no" ; then
> --    CFLAGS=3D"${saved_CFLAGS}"
> --fi
> --
> --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_declaratio=
n=3D"yes"],[have_implicit_function_declaration=3D"no"])
> --AC_MSG_RESULT($have_implicit_function_declaration)
> --if test "$have_implicit_function_declaration" =3D "no" ; then
> --    CFLAGS=3D"${saved_CFLAGS}"
> --fi
> --
> --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"],[have_=
error_format=3D"no"])
> --AC_MSG_RESULT($have_error_format)
> --if test "$have_error_format" =3D "no" ; then
> --    CFLAGS=3D"${saved_CFLAGS}"
> --fi
> --
> - case "$host" in
> -    *-solaris*)
> -    LDFLAGS=3D"${LDFLAGS} -lsocket -lnsl"
> diff --git a/src/patches/sarg/sarg-2.3.11-format.patch b/src/patches/sarg/s=
arg-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	2018-01-14 21:00:22.000000000 +0300
> -+++ sarg-2.3.11.my/index.c	2018-02-19 12:20:15.896203347 +0300
> -@@ -208,7 +208,7 @@
> - 			m1=3Dmonth / 16;
> - 			if(month % 16 !=3D 0) {
> - 				m2=3Dmonth % 16;
> --				sprintf(monthnum,"%02d-%02d",m1,m2);
> -+				sprintf(monthnum,"%02u-%02u",(unsigned int)m1,(unsigned int)m2);
> - 				sprintf(monthname1,"%02d",m1);
> - 				sprintf(monthname2,"%02d",m2);
> - 				name_month(monthname1,sizeof(monthname1));
> -@@ -269,7 +269,7 @@
> - 				d1=3Dday / 32;
> - 				if(day % 32 !=3D 0) {
> - 					d2=3Dday % 32;
> --					sprintf(daynum,"%02d-%02d",d1,d2);
> -+					sprintf(daynum,"%02u-%02u",(unsigned int)d1,(unsigned int)d2);
> - 				} else {
> - 					sprintf(daynum,"%02d",d1);
> - 				}
> -diff -wbBur sarg-2.3.11/report.c sarg-2.3.11.my/report.c
> ---- sarg-2.3.11/report.c	2018-01-14 21:00:23.000000000 +0300
> -+++ sarg-2.3.11.my/report.c	2018-02-19 12:18:45.151207192 +0300
> -@@ -54,7 +54,7 @@
> - 	char accsmart[MAXLEN];
> - 	char crc2[MAXLEN/2 -1];
> - 	char siteind[MAX_TRUNCATED_URL];
> --	char arqtt[256];
> -+	char arqtt[267];
> - 	char *oldurltt=3DNULL;
> - 	char oldaccdiatt[11],oldacchoratt[9];
> - 	char tmp3[MAXLEN];
> -diff -wbBur sarg-2.3.11/userinfo.c sarg-2.3.11.my/userinfo.c
> ---- sarg-2.3.11/userinfo.c	2013-06-01 22:02:04.000000000 +0400
> -+++ sarg-2.3.11.my/userinfo.c	2018-02-19 12:21:16.103200796 +0300
> -@@ -67,7 +67,7 @@
> - 	int skip;
> - 	int flen;
> - 	int count, clen;
> --	char cstr[9];
> -+	char cstr[11];
> -=20
> - 	last=3DNULL;
> - 	for (group=3Dfirst_user_group ; group ; group=3Dgroup->next) {
> --=20
> 2.31.1
>=20


--===============3183331039888037421==--