From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] libloc: Update to 0.9.15 Date: Mon, 17 Oct 2022 11:42:06 +0100 Message-ID: <680A9C8B-40D7-4F69-A52E-A19DE8DE3C7D@ipfire.org> In-Reply-To: <9d37030b-7a09-7994-7cde-73f3d6043390@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3001340557054723884==" List-Id: --===============3001340557054723884== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael Tremer > On 15 Oct 2022, at 16:53, Peter M=C3=BCller wr= ote: >=20 > Please refer to https://lists.ipfire.org/pipermail/location/2022-September/= 000579.html > for the release announcement of this version. >=20 > Signed-off-by: Peter M=C3=BCller > --- > lfs/libloc | 18 +++++++--- > ...oc-0.9.15-Makefile-reset-Python-path.patch | 22 ++++++++++++ > ...nerating-file-names-for-ipset-output.patch | 36 +++++++++++++++++++ > 3 files changed, 71 insertions(+), 5 deletions(-) > create mode 100644 src/patches/libloc-0.9.15-Makefile-reset-Python-path.pat= ch > create mode 100644 src/patches/libloc-0.9.15-export-Fix-generating-file-nam= es-for-ipset-output.patch >=20 > diff --git a/lfs/libloc b/lfs/libloc > index 8fea42315..579982f11 100644 > --- a/lfs/libloc > +++ b/lfs/libloc > @@ -24,8 +24,8 @@ >=20 > include Config >=20 > -VER =3D 0.9.13 > -DB_DATE =3D 2022-08-04 > +VER =3D 0.9.15 > +DB_DATE =3D 2022-10-15 >=20 > THISAPP =3D libloc-$(VER) > DL_FILE =3D $(THISAPP).tar.gz > @@ -43,8 +43,8 @@ objects =3D $(DL_FILE) \ > $(DL_FILE) =3D https://source.ipfire.org/releases/libloc= /$(DL_FILE) > location-$(DB_DATE).db.xz =3D https://location.ipfire.org/databases/1/a= rchive/location-$(DB_DATE).db.xz >=20 > -$(DL_FILE)_BLAKE2 =3D 5fccd6f0564899499939c63af8975f20b1f7d5267a8cf6c15e14= ab377b9d5c008ae5e154c804ac6a1106471aaeebac97dc4ebe6b70fc1e59f416fe2cc02c52a7 > -location-$(DB_DATE).db.xz_BLAKE2 =3D 11b6e9735c911f3dd548fc1759f72ae983eac= be6262f211a4a0080b5b13e3d9704d5080dc9ed0cee289b9ca2643d2adbf266d8a8a25f391293= 18c3e370a7c9a9 > +$(DL_FILE)_BLAKE2 =3D f3db0fc75ac930805f0df2892b00ffb8f31123a5f28a8cade78f= 8f1614c0cd806ea365810c5192720d067531b199c342a2c6039f3cd5370c4c9efeded4e31857 > +location-$(DB_DATE).db.xz_BLAKE2 =3D b34b554923a8291ea60ec34c98609da1d71aa= b66bc1aa2f973ea2e6fd14b6f750559d1e9365df4dd3f707a8dce373aba5f79381c61a4953f27= 2b3557be88af2c >=20 > install : $(TARGET) >=20 > @@ -77,12 +77,20 @@ $(subst %,%_BLAKE2,$(objects)) : > $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > @$(PREBUILD) > @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xvf $(DIR_DL)/$(DL_FILE) > + > + # https://lists.ipfire.org/pipermail/location/2022-October/000596.html > + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.15-Makefi= le-reset-Python-path.patch > + > + # https://bugzilla.ipfire.org/show_bug.cgi?id=3D12944 > + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.15-export= -Fix-generating-file-names-for-ipset-output.patch > + > cd $(DIR_APP) && ./autogen.sh > cd $(DIR_APP) && ./configure \ > --prefix=3D/usr \ > --sysconfdir=3D/etc \ > --localstatedir=3D/var \ > - --disable-man-pages > + --disable-man-pages \ > + --with-database-path=3D/var/lib/location/database.db > cd $(DIR_APP) && make $(MAKETUNING) > cd $(DIR_APP) && make install >=20 > diff --git a/src/patches/libloc-0.9.15-Makefile-reset-Python-path.patch b/s= rc/patches/libloc-0.9.15-Makefile-reset-Python-path.patch > new file mode 100644 > index 000000000..2d2a99887 > --- /dev/null > +++ b/src/patches/libloc-0.9.15-Makefile-reset-Python-path.patch > @@ -0,0 +1,22 @@ > +commit bed4777fc99494854335a90c5a6e7fc2e30edf4d > +Author: Michael Tremer > +Date: Sat Oct 1 11:56:31 2022 +0000 > + > + Makefile: Reset Python path > + =20 > + Signed-off-by: Michael Tremer > + > +diff --git a/Makefile.am b/Makefile.am > +index 81bd992..ec737d0 100644 > +--- a/Makefile.am > ++++ b/Makefile.am > +@@ -56,8 +56,7 @@ databasedir =3D $(localstatedir)/lib/location > + pkgconfigdir =3D $(libdir)/pkgconfig > +=20 > + # Overwrite Python path > +-#pkgpythondir =3D $(pythondir)/location > +-pkgpythondir =3D /usr/lib/python3/dist-packages/location > ++pkgpythondir =3D $(pythondir)/location > +=20 > + %: %.in Makefile > + $(SED_PROCESS) > diff --git a/src/patches/libloc-0.9.15-export-Fix-generating-file-names-for= -ipset-output.patch b/src/patches/libloc-0.9.15-export-Fix-generating-file-na= mes-for-ipset-output.patch > new file mode 100644 > index 000000000..19fe42f12 > --- /dev/null > +++ b/src/patches/libloc-0.9.15-export-Fix-generating-file-names-for-ipset-= output.patch > @@ -0,0 +1,36 @@ > +commit cd214f295797e5cc8dbc296753924863b33ab8bd > +Author: Michael Tremer > +Date: Tue Oct 4 08:47:03 2022 +0000 > + > + export: Fix generating file names for ipset output > + =20 > + The tag that is being used in the filename was set after creating the > + filename. The order has now been fixed and the export works fine for m= e. > + =20 > + Fixes: #12944 > + Signed-off-by: Michael Tremer > + > +diff --git a/src/python/location/export.py b/src/python/location/export.py > +index f5ed37f..3f58498 100644 > +--- a/src/python/location/export.py > ++++ b/src/python/location/export.py > +@@ -48,6 +48,9 @@ class OutputWriter(object): > + self.family =3D family > + self.directory =3D directory > +=20 > ++ # Tag > ++ self.tag =3D self._make_tag() > ++ > + # Open output file > + if f: > + self.f =3D f > +@@ -58,9 +61,6 @@ class OutputWriter(object): > + else: > + self.f =3D io.StringIO() > +=20 > +- # Tag > +- self.tag =3D self._make_tag() > +- > + # Call any custom initialization > + self.init() > +=20 > --=20 > 2.35.3 --===============3001340557054723884==--