Message ID | 20200522114903.7093-1-michael.tremer@ipfire.org |
---|---|
State | Accepted |
Commit | 91b23ce05b77dc96b38de3589049cbe8350ba9ad |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> 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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49T4X66GYXz3xyt for <patchwork@web04.haj.ipfire.org>; Fri, 22 May 2020 11:49:10 +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 "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49T4X52bt4zXh; Fri, 22 May 2020 11:49:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49T4X51jMCz2yWj; Fri, 22 May 2020 11:49:09 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49T4X43J6Wz2xFj for <development@lists.ipfire.org>; Fri, 22 May 2020 11:49:08 +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) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49T4X33481zXh; Fri, 22 May 2020 11:49:07 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1590148147; 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=BX7PYPT1Sm38+C2BRuYihVKJRxUS5h9Dmtm8Z6Oin0I=; b=cv9PH3aQxfbdT4bNWHKqKh8AmTO9LIfL/S762lRCdxDNLM/2bhvvHng9wSIicsIXOJshmY MY7tv6iZNK7EHTBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1590148147; 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=BX7PYPT1Sm38+C2BRuYihVKJRxUS5h9Dmtm8Z6Oin0I=; b=TW+oFJpwvgkxz9YikBoky7c4jvdAYsyYNkwDuS+a79zWdjA5exyhkECz4KooAapQq5227+ H0e51949VVNGAbzbxs21WK/lEa8r1+sHlnwHl2D4FGA+3BiEKKq31tjVVIqM1jXWTMGpRj 7fJroHPw55totj0RVZwCbDFxPvYGTDCbmNYrcDCxQWo1O524179YToC3qKF9H5JpsgXnfW XznD8eWDGgmFk4WyzK7tYu78QeY8rShOgpCR5+jUqFhlWRhk9xVWf5iztNJc/m1w4rQOmw sK3KpK/+OSiCZBt8zz+Zy1SgkWs+9URxC29NRP9Sga51IbgCDZcUKHQtKiHy/A== From: Michael Tremer <michael.tremer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] squidGuard: Fix generating databases with libdb >= 5 Date: Fri, 22 May 2020 11:49:03 +0000 Message-Id: <20200522114903.7093-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Cc: Michael Tremer <michael.tremer@ipfire.org> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
squidGuard: Fix generating databases with libdb >= 5
|
|
Commit Message
Michael Tremer
May 22, 2020, 11:49 a.m. UTC
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
lfs/squidguard | 1 +
src/patches/squidGuard-1.4-db5.patch | 12 ++++++++++++
2 files changed, 13 insertions(+)
create mode 100644 src/patches/squidGuard-1.4-db5.patch
Comments
Hi, just saw this patch (and couldn't help but smile a bit): => https://patchwork.ipfire.org/patch/947/ I don't know why, but I can't find this one on GIT anymore. But: Interested? Best, Matthias On 22.05.2020 13:49, Michael Tremer wrote: > Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> > --- > lfs/squidguard | 1 + > src/patches/squidGuard-1.4-db5.patch | 12 ++++++++++++ > 2 files changed, 13 insertions(+) > create mode 100644 src/patches/squidGuard-1.4-db5.patch > > diff --git a/lfs/squidguard b/lfs/squidguard > index f627a27d8..38efab0ee 100644 > --- a/lfs/squidguard > +++ b/lfs/squidguard > @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > @$(PREBUILD) > @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) > cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidguard-1.4-squid-helper-protocol.patch > + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidGuard-1.4-db5.patch > cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \ > --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \ > --with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \ > diff --git a/src/patches/squidGuard-1.4-db5.patch b/src/patches/squidGuard-1.4-db5.patch > new file mode 100644 > index 000000000..733fbad2e > --- /dev/null > +++ b/src/patches/squidGuard-1.4-db5.patch > @@ -0,0 +1,12 @@ > +diff -ruN squidGuard-1.4-vanilla/src/sgDb.c squidGuard-1.4/src/sgDb.c > +--- squidGuard-1.4-vanilla/src/sgDb.c 2008-07-15 04:29:41.000000000 +1000 > ++++ squidGuard-1.4/src/sgDb.c 2013-01-21 12:47:41.049325756 +1100 > +@@ -114,7 +114,7 @@ > + } > + } > + #endif > +-#if DB_VERSION_MAJOR == 4 > ++#if DB_VERSION_MAJOR >= 4 > + if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){ > + flag = DB_CREATE; > + if(createdb) > \ No newline at end of file >
Hi, Oh yes, I totally forgot. Patchwork only seems to have half of the patch for some reason. But it is here: https://lists.ipfire.org/pipermail/development/2016-December/002829.html @Arne: I would recommend to merge this one then for the next core update. There seem to be some security-related fixes in it. Best, -Michael > On 22 May 2020, at 13:33, Matthias Fischer <matthias.fischer@ipfire.org> wrote: > > Hi, > > just saw this patch (and couldn't help but smile a bit): > > => https://patchwork.ipfire.org/patch/947/ > > I don't know why, but I can't find this one on GIT anymore. > > But: > Interested? > > Best, > Matthias > > On 22.05.2020 13:49, Michael Tremer wrote: >> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> >> --- >> lfs/squidguard | 1 + >> src/patches/squidGuard-1.4-db5.patch | 12 ++++++++++++ >> 2 files changed, 13 insertions(+) >> create mode 100644 src/patches/squidGuard-1.4-db5.patch >> >> diff --git a/lfs/squidguard b/lfs/squidguard >> index f627a27d8..38efab0ee 100644 >> --- a/lfs/squidguard >> +++ b/lfs/squidguard >> @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >> @$(PREBUILD) >> @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) >> cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidguard-1.4-squid-helper-protocol.patch >> + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidGuard-1.4-db5.patch >> cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \ >> --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \ >> --with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \ >> diff --git a/src/patches/squidGuard-1.4-db5.patch b/src/patches/squidGuard-1.4-db5.patch >> new file mode 100644 >> index 000000000..733fbad2e >> --- /dev/null >> +++ b/src/patches/squidGuard-1.4-db5.patch >> @@ -0,0 +1,12 @@ >> +diff -ruN squidGuard-1.4-vanilla/src/sgDb.c squidGuard-1.4/src/sgDb.c >> +--- squidGuard-1.4-vanilla/src/sgDb.c 2008-07-15 04:29:41.000000000 +1000 >> ++++ squidGuard-1.4/src/sgDb.c 2013-01-21 12:47:41.049325756 +1100 >> +@@ -114,7 +114,7 @@ >> + } >> + } >> + #endif >> +-#if DB_VERSION_MAJOR == 4 >> ++#if DB_VERSION_MAJOR >= 4 >> + if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){ >> + flag = DB_CREATE; >> + if(createdb) >> \ No newline at end of file >> >
Hi, JFYI: regarding this update I saw that at that time I forgot to delete a no longer needed patch while sending it: src/patches/squidGuard-1.4-db5.patch Best, Matthias On 22.05.2020 14:38, Michael Tremer wrote: > Hi, > > Oh yes, I totally forgot. > > Patchwork only seems to have half of the patch for some reason. > > But it is here: https://lists.ipfire.org/pipermail/development/2016-December/002829.html > > @Arne: I would recommend to merge this one then for the next core update. There seem to be some security-related fixes in it. > > Best, > -Michael > >> On 22 May 2020, at 13:33, Matthias Fischer <matthias.fischer@ipfire.org> wrote: >> >> Hi, >> >> just saw this patch (and couldn't help but smile a bit): >> >> => https://patchwork.ipfire.org/patch/947/ >> >> I don't know why, but I can't find this one on GIT anymore. >> >> But: >> Interested? >> >> Best, >> Matthias >> >> On 22.05.2020 13:49, Michael Tremer wrote: >>> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> >>> --- >>> lfs/squidguard | 1 + >>> src/patches/squidGuard-1.4-db5.patch | 12 ++++++++++++ >>> 2 files changed, 13 insertions(+) >>> create mode 100644 src/patches/squidGuard-1.4-db5.patch >>> >>> diff --git a/lfs/squidguard b/lfs/squidguard >>> index f627a27d8..38efab0ee 100644 >>> --- a/lfs/squidguard >>> +++ b/lfs/squidguard >>> @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>> @$(PREBUILD) >>> @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) >>> cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidguard-1.4-squid-helper-protocol.patch >>> + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidGuard-1.4-db5.patch >>> cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \ >>> --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \ >>> --with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \ >>> diff --git a/src/patches/squidGuard-1.4-db5.patch b/src/patches/squidGuard-1.4-db5.patch >>> new file mode 100644 >>> index 000000000..733fbad2e >>> --- /dev/null >>> +++ b/src/patches/squidGuard-1.4-db5.patch >>> @@ -0,0 +1,12 @@ >>> +diff -ruN squidGuard-1.4-vanilla/src/sgDb.c squidGuard-1.4/src/sgDb.c >>> +--- squidGuard-1.4-vanilla/src/sgDb.c 2008-07-15 04:29:41.000000000 +1000 >>> ++++ squidGuard-1.4/src/sgDb.c 2013-01-21 12:47:41.049325756 +1100 >>> +@@ -114,7 +114,7 @@ >>> + } >>> + } >>> + #endif >>> +-#if DB_VERSION_MAJOR == 4 >>> ++#if DB_VERSION_MAJOR >= 4 >>> + if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){ >>> + flag = DB_CREATE; >>> + if(createdb) >>> \ No newline at end of file >>> >> >
diff --git a/lfs/squidguard b/lfs/squidguard index f627a27d8..38efab0ee 100644 --- a/lfs/squidguard +++ b/lfs/squidguard @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidguard-1.4-squid-helper-protocol.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidGuard-1.4-db5.patch cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \ --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \ --with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \ diff --git a/src/patches/squidGuard-1.4-db5.patch b/src/patches/squidGuard-1.4-db5.patch new file mode 100644 index 000000000..733fbad2e --- /dev/null +++ b/src/patches/squidGuard-1.4-db5.patch @@ -0,0 +1,12 @@ +diff -ruN squidGuard-1.4-vanilla/src/sgDb.c squidGuard-1.4/src/sgDb.c +--- squidGuard-1.4-vanilla/src/sgDb.c 2008-07-15 04:29:41.000000000 +1000 ++++ squidGuard-1.4/src/sgDb.c 2013-01-21 12:47:41.049325756 +1100 +@@ -114,7 +114,7 @@ + } + } + #endif +-#if DB_VERSION_MAJOR == 4 ++#if DB_VERSION_MAJOR >= 4 + if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){ + flag = DB_CREATE; + if(createdb) \ No newline at end of file