From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH v2 1/3] squid-asnbl: New package Date: Thu, 14 Oct 2021 17:47:31 +0100 Message-ID: <7EFE47BE-9D39-4DDB-ABC5-FEDE277B88E3@ipfire.org> In-Reply-To: <70b2de8c-85b5-a010-ecd9-d907263fc2db@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7393532443352151684==" List-Id: --===============7393532443352151684== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, > On 13 Oct 2021, at 17:25, Peter M=C3=BCller wr= ote: >=20 > Hello Michael, >=20 > thanks for your reply. >=20 >> Hello, >>=20 >>> On 10 Oct 2021, at 18:43, Peter M=C3=BCller = wrote: >>>=20 >>> This package adds an ASNBL helper for detecting Fast Flux setups and >>> selectively announced networks (i. e. FQDNs resolving to IP addresses >>> not being announced by an Autonomous System) to the distribution. >>> Afterwards, the helper script is located at /usr/bin/asnbl-helper.py . >>=20 >> This is maybe purely aesthetic, but a helper script in /usr/bin feels wron= g to me. >=20 > Where would you place it instead? /usr/lib/squid/helpers/asnbl >=20 >> Neither am I a fan of having a file extension like this in /usr/bin. Somet= hing similar has caused us to ship our backup script which is written in shel= l as backup.pl. Implementations might change. >=20 > True. Is this a show-stopper to you? If so, I will hand in a third version = of > this patch series to correct this. >=20 > Aside from that, I can assure you (if this is what you desire) this won't c= ause > the problem you described. I doubt any other application within IPFire will= ever > need this script. :-) Not really a showstopper. I just want to make things look sleek. It will help= us to name things in a more meaningful manner and to type less. -Michael > Thanks, and best regards, > Peter M=C3=BCller >=20 >>=20 >>> The second version of this patch updates squid-asnbl to upstream version >>> 0.2.2, improving logging in case of detected Fast Flux setups. >>>=20 >>> Signed-off-by: Peter M=C3=BCller >>> --- >>> config/rootfiles/common/squid-asnbl | 1 + >>> lfs/squid-asnbl | 83 +++++++++++++++++++++++++++++ >>> make.sh | 1 + >>> 3 files changed, 85 insertions(+) >>> create mode 100644 config/rootfiles/common/squid-asnbl >>> create mode 100644 lfs/squid-asnbl >>>=20 >>> diff --git a/config/rootfiles/common/squid-asnbl b/config/rootfiles/commo= n/squid-asnbl >>> new file mode 100644 >>> index 000000000..f129f441e >>> --- /dev/null >>> +++ b/config/rootfiles/common/squid-asnbl >>> @@ -0,0 +1 @@ >>> +usr/bin/asnbl-helper.py >>> diff --git a/lfs/squid-asnbl b/lfs/squid-asnbl >>> new file mode 100644 >>> index 000000000..3fc001768 >>> --- /dev/null >>> +++ b/lfs/squid-asnbl >>> @@ -0,0 +1,83 @@ >>> +########################################################################= ####### >>> +# = # >>> +# IPFire.org - A linux based firewall = # >>> +# Copyright (C) 2007-2021 IPFire Team = # >>> +# = # >>> +# This program is free software: you can redistribute it and/or modify = # >>> +# it under the terms of the GNU General Public License as published by = # >>> +# the Free Software Foundation, either version 3 of the License, or = # >>> +# (at your option) any later version. = # >>> +# = # >>> +# This program is distributed in the hope that it will be useful, = # >>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of = # >>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the = # >>> +# GNU General Public License for more details. = # >>> +# = # >>> +# You should have received a copy of the GNU General Public License = # >>> +# along with this program. If not, see . = # >>> +# = # >>> +########################################################################= ####### >>> + >>> + >>> +########################################################################= ####### >>> +# Definitions >>> +########################################################################= ####### >>> + >>> +include Config >>> + >>> +VER =3D 0.2.2 >>> + >>> +THISAPP =3D squid-asnbl-$(VER) >>> +DL_FILE =3D $(THISAPP).tar.gz >>> +DL_FROM =3D $(URL_IPFIRE) >>> + >>> +DIR_APP =3D $(DIR_SRC)/$(THISAPP) >>> + >>> +TARGET =3D $(DIR_INFO)/$(THISAPP) >>> + >>> +DEPS =3D libloc squid python3 >>> + >>> +########################################################################= ####### >>> +# Top-level Rules >>> +########################################################################= ####### >>> + >>> +objects =3D $(DL_FILE) >>> + >>> +$(DL_FILE) =3D $(DL_FROM)/$(DL_FILE) >>> + >>> +$(DL_FILE)_MD5 =3D d62be77baa30b16d1c2362460123d6c0 >>> + >>> +install : $(TARGET) >>> + >>> +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) >>> + >>> +download :$(patsubst %,$(DIR_DL)/%,$(objects)) >>> + >>> +md5 : $(subst %,%_MD5,$(objects)) >>> + >>> +########################################################################= ####### >>> +# Downloading, checking, md5sum >>> +########################################################################= ####### >>> + >>> +$(patsubst %,$(DIR_CHK)/%,$(objects)) : >>> + @$(CHECK) >>> + >>> +$(patsubst %,$(DIR_DL)/%,$(objects)) : >>> + @$(LOAD) >>> + >>> +$(subst %,%_MD5,$(objects)) : >>> + @$(MD5) >>> + >>> +########################################################################= ####### >>> +# Installation Details >>> +########################################################################= ####### >>> + >>> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >>> + @$(PREBUILD) >>> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zvxf $(DIR_DL)/$(DL_FILE) >>> + >>> + # Install ASNBL helper script >>> + cd $(DIR_APP) && install -o root -g root -m 0755 asnbl-helper.py /usr/b= in/asnbl-helper.py >>> + >>> + @rm -rf $(DIR_APP) >>> + @$(POSTBUILD) >>> diff --git a/make.sh b/make.sh >>> index dabed5aa5..215e5c633 100755 >>> --- a/make.sh >>> +++ b/make.sh >>> @@ -1613,6 +1613,7 @@ buildipfire() { >>> lfsmake2 socat >>> lfsmake2 libcdada >>> lfsmake2 pmacct >>> + lfsmake2 squid-asnbl >>> } >>>=20 >>> buildinstaller() { >>> --=20 >>> 2.26.2 >>=20 --===============7393532443352151684==--