From patchwork Tue May 18 16:58:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4338 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Fl2Jc6zkPz3wbk for ; Tue, 18 May 2021 16:58:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Fl2Jb3KN3z125; Tue, 18 May 2021 16:58:39 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Fl2JZ6YKtz2xs0; Tue, 18 May 2021 16:58:38 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Fl2JY6ygWz2xLr for ; Tue, 18 May 2021 16:58:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Fl2JX444yzYJ; Tue, 18 May 2021 16:58:36 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1621357116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6J1aTR2PRbgiyvV6gA/wZEOlz3ZkVu9Tr/+Nxk7+Q5E=; b=4MLkhawVOsWqLat51Pqv+iHfsVgD/mMS0r6csjdETXGR/MqRzE24UjYq7YIRuPgEx1sPBn VAp0ICDoxo249BBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1621357116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6J1aTR2PRbgiyvV6gA/wZEOlz3ZkVu9Tr/+Nxk7+Q5E=; b=P7R7OSyUZzHRbooQFuaEE+eE1oMWf0SWTa9iScyP+6c8HhkcepuBCla8ab/Vq0G1/X0CxI dwAIqXxwGkjWHnIfiURT/UcgAg7gCNYOIo33sfW45ZmmJbLnHNUFYep9jBc/MlCad6SXBS OKbrCK0pvlzb3/75CdPZueM1IbAooQQK0lLvQlQQNfGvDCQmI7LdifDz8W8aKVHKxCi71B Xux9AswY/6R8zUwZ//iSl5OAgjX0ibsBVaEZhvWX48C0tFhhE588DCXS+ZKggkOR8ca3nV CFLgmi6meVtqZR4Yq6/K6v4xfJ92/VlqCPtYZMGdUf/uA/mC6AZ19xFjiKyV5A== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH v2] sarg: Update to 2.4.0 Date: Tue, 18 May 2021 18:58:31 +0200 Message-Id: <20210518165831.3561017-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Update from 2.3.11 to 2.4.0 - Update of rootfile not required - Update of patches as the source code is different enough that the patches failed to work. - Changelog has information on changes for version 2.4.0. Prior version information is for 2.3.3 from 2012. All intervening versions have no changelog information available. Version 2.4.0 - Update translations. - Useragent report is produced if information is available. - Don't abort if DNS resolution is failing to resolve a host IP address. - xz compressed log files are supported. - Compressed redirector logs are now supported. - Filter converted and split logs using -t command line option. - Add many new buffer overflow checks. - Use random temporary directory name by default. - Many bug fixed. - Many new features added. Signed-off-by: Adolf Belka --- lfs/sarg | 13 +++--- src/patches/sarg/sarg-2.3.11-format.patch | 45 ------------------- ...igure.patch => sarg-2.4.0-configure.patch} | 26 +++++------ src/patches/sarg/sarg-2.4.0-format.patch | 33 ++++++++++++++ 4 files changed, 49 insertions(+), 68 deletions(-) delete mode 100644 src/patches/sarg/sarg-2.3.11-format.patch rename src/patches/sarg/{sarg-2.3.11-configure.patch => sarg-2.4.0-configure.patch} (66%) create mode 100644 src/patches/sarg/sarg-2.4.0-format.patch diff --git a/lfs/sarg b/lfs/sarg index 697ce7513..6a8b52e6c 100644 --- a/lfs/sarg +++ b/lfs/sarg @@ -24,7 +24,7 @@ include Config -VER = 2.3.11 +VER = 2.4.0 THISAPP = sarg-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = sarg -PAK_VER = 4 +PAK_VER = 5 DEPS = @@ -46,7 +46,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 8e30d86b16597aec89ad401c72c761bc +$(DL_FILE)_MD5 = 1b84509c1a0d55d46148bd957744870f install : $(TARGET) @@ -81,14 +81,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @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-format.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sarg/sarg-2.3.11-configure.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sarg/sarg-2.4.0-format.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/sarg/sarg-2.4.0-configure.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=/usr \ --sysconfdir=/etc/sarg diff --git a/src/patches/sarg/sarg-2.3.11-format.patch b/src/patches/sarg/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 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=month / 16; - if(month % 16 != 0) { - m2=month % 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=day / 32; - if(day % 32 != 0) { - d2=day % 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=NULL; - 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]; - - last=NULL; - for (group=first_user_group ; group ; group=group->next) { diff --git a/src/patches/sarg/sarg-2.3.11-configure.patch b/src/patches/sarg/sarg-2.4.0-configure.patch similarity index 66% rename from src/patches/sarg/sarg-2.3.11-configure.patch rename to src/patches/sarg/sarg-2.4.0-configure.patch index ca9695595..ff40d81f1 100644 --- a/src/patches/sarg/sarg-2.3.11-configure.patch +++ b/src/patches/sarg/sarg-2.4.0-configure.patch @@ -1,8 +1,8 @@ ---- 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 @@ +--- sarg-2.4.0/configure.ac.orig 2020-01-16 12:24:11.000000000 +0100 ++++ sarg-2.4.0/configure.ac 2021-04-24 14:16:03.677756214 +0200 +@@ -38,31 +38,6 @@ # Report more warnings to improve code quality. - CFLAGS="${CFLAGS} -Wall -Wno-sign-compare" + CFLAGS="${CFLAGS} -Wall" -dnl Check for supported compiler options - @@ -11,28 +11,24 @@ -CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings="yes"],[have_extra_warnings="no"]) -AC_MSG_RESULT($have_extra_warnings) --if test "$have_extra_warnings" = "no" ; then -- CFLAGS="${saved_CFLAGS}" --fi +-AS_IF([test "$have_extra_warnings" = "no"],[CFLAGS="${saved_CFLAGS}"]) +- +-# Don't compare signs as it is a mess +-CFLAGS="${CFLAGS} -Wno-sign-compare" - -AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC]) -saved_CFLAGS="${CFLAGS}" -CFLAGS="${CFLAGS} -Werror=implicit-function-declaration" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"]) -AC_MSG_RESULT($have_implicit_function_declaration) --if test "$have_implicit_function_declaration" = "no" ; then -- CFLAGS="${saved_CFLAGS}" --fi +-AS_IF([test "$have_implicit_function_declaration" = "no"],[CFLAGS="${saved_CFLAGS}"]) - -AC_MSG_CHECKING([for format error flag in $CC]) -saved_CFLAGS="${CFLAGS}" -CFLAGS="${CFLAGS} -Werror=format" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"]) -AC_MSG_RESULT($have_error_format) --if test "$have_error_format" = "no" ; then -- CFLAGS="${saved_CFLAGS}" --fi -- +-AS_IF([test "$have_error_format" = "no"],[CFLAGS="${saved_CFLAGS}"]) + case "$host" in *-solaris*) - LDFLAGS="${LDFLAGS} -lsocket -lnsl" diff --git a/src/patches/sarg/sarg-2.4.0-format.patch b/src/patches/sarg/sarg-2.4.0-format.patch new file mode 100644 index 000000000..1d1ac1e4c --- /dev/null +++ b/src/patches/sarg/sarg-2.4.0-format.patch @@ -0,0 +1,33 @@ +diff -Naur sarg-2.4.0.orig/index.c sarg-2.4.0/index.c +--- sarg-2.4.0.orig/index.c 2019-12-24 12:04:00.000000000 +0100 ++++ sarg-2.4.0/index.c 2021-04-24 14:09:57.779097194 +0200 +@@ -325,7 +325,7 @@ + d1=(day >> 5) & 0x1F; + if ((day & 0x1F) != 0) { + d2=day & 0x1F; +- snprintf(daynum,sizeof(daynum),"%02d-%02d",d1,d2); ++ snprintf(daynum,sizeof(daynum),"%02u-%02u",(unsigned int)d1,(unsigned int)d2); + } else { + snprintf(daynum,sizeof(daynum),"%02d",d1); + } +@@ -485,7 +485,7 @@ + m1=(month >> 4) & 0x0F; + if ((month & 0x0F) != 0) { + m2=month & 0x0F; +- snprintf(monthnum,sizeof(monthnum),"%02d-%02d",m1,m2); ++ snprintf(monthnum,sizeof(monthnum),"%02u-%02u",(unsigned int)m1,(unsigned int)m2); + name_month(m1,monthname1,sizeof(monthname1)); + name_month(m2,monthname2,sizeof(monthname2)); + snprintf(nmonth,sizeof(nmonth),"%s-%s",monthname1,monthname2); +diff -Naur sarg-2.4.0.orig/userinfo.c sarg-2.4.0/userinfo.c +--- sarg-2.4.0.orig/userinfo.c 2019-12-24 12:04:00.000000000 +0100 ++++ sarg-2.4.0/userinfo.c 2021-04-24 14:11:31.965734470 +0200 +@@ -78,7 +78,7 @@ + int skip; + int flen; + int count, clen; +- char cstr[9]; ++ char cstr[11]; + char filename[MAX_USER_FNAME_LEN]; + + if (!UserStrings) {