From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH] libloc: Update to 0.9.15 Date: Sat, 15 Oct 2022 15:53:07 +0000 Message-ID: <9d37030b-7a09-7994-7cde-73f3d6043390@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8869346551113360590==" List-Id: --===============8869346551113360590== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Please refer to https://lists.ipfire.org/pipermail/location/2022-September/00= 0579.html for the release announcement of this version. 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.patch create mode 100644 src/patches/libloc-0.9.15-export-Fix-generating-file-name= s-for-ipset-output.patch 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/ar= chive/location-$(DB_DATE).db.xz =20 -$(DL_FILE)_BLAKE2 =3D 5fccd6f0564899499939c63af8975f20b1f7d5267a8cf6c15e14ab= 377b9d5c008ae5e154c804ac6a1106471aaeebac97dc4ebe6b70fc1e59f416fe2cc02c52a7 -location-$(DB_DATE).db.xz_BLAKE2 =3D 11b6e9735c911f3dd548fc1759f72ae983eacbe= 6262f211a4a0080b5b13e3d9704d5080dc9ed0cee289b9ca2643d2adbf266d8a8a25f39129318= c3e370a7c9a9 +$(DL_FILE)_BLAKE2 =3D f3db0fc75ac930805f0df2892b00ffb8f31123a5f28a8cade78f8f= 1614c0cd806ea365810c5192720d067531b199c342a2c6039f3cd5370c4c9efeded4e31857 +location-$(DB_DATE).db.xz_BLAKE2 =3D b34b554923a8291ea60ec34c98609da1d71aab6= 6bc1aa2f973ea2e6fd14b6f750559d1e9365df4dd3f707a8dce373aba5f79381c61a4953f272b= 3557be88af2c =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-Makefile= -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-F= ix-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/src= /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-i= pset-output.patch b/src/patches/libloc-0.9.15-export-Fix-generating-file-name= s-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-ou= tput.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 me. + =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 --===============8869346551113360590==--