From patchwork Sat Oct 15 15:53:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 6062 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 4MqSTQ0SZKz3wgN for ; Sat, 15 Oct 2022 15:53:14 +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 4MqSTN3fH0zyp; Sat, 15 Oct 2022 15:53:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4MqSTN2Pvkz2yZk; Sat, 15 Oct 2022 15:53:12 +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 4MqSTM2jjQz2xd2 for ; Sat, 15 Oct 2022 15:53:11 +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)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4MqSTL3H6dzWn for ; Sat, 15 Oct 2022 15:53:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1665849191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WWL9wLWMGlnyWX5PIaJUHlCdREbv/mnRinRQ/oS6oM0=; b=K9TDDnTWOf60aEqnwVfGU6Go55WJSggRSt96nfhoDhX2hmjlJOtiMkoSCGcg2eJa+uTiF/ brZ7tusr3hhVD/Dw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1665849191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WWL9wLWMGlnyWX5PIaJUHlCdREbv/mnRinRQ/oS6oM0=; b=X5UGpKofF1RC/q1gm3BCkjLWlzMYjxh+XdBxX5NYeBmgozwGINEk49r3SN+xCXA9JSQdyO xu3NI8qK7fiqlKB3m4A6qFSKj5EDJS/7ptbgislW7ciuLeSaIG4/p7iaAPUFG7XH4Harn/ e86KI6bNL/aQz8Wpd8MUTLGfEQGEdva7uYRyTpHmDWGFSD35pihVHKq9Z+e1EUDHEOdBj6 QEOQLDl64EihEIFpYimi9EC2zZjEwyuapsrQpm2GhAQQHQ7EdhzJmF3w+WuIb4OYKC+ZPf Ho4im0KgfKYqlzptlVO1gTTt46RbMi6bEv4jp8kCxO8569KNQLMQXuAQGnB3/Q== Message-ID: <9d37030b-7a09-7994-7cde-73f3d6043390@ipfire.org> Date: Sat, 15 Oct 2022 15:53:07 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] libloc: Update to 0.9.15 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" Please refer to https://lists.ipfire.org/pipermail/location/2022-September/000579.html for the release announcement of this version. Signed-off-by: Peter Müller Reviewed-by: Michael Tremer --- 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-names-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 @@ include Config -VER = 0.9.13 -DB_DATE = 2022-08-04 +VER = 0.9.15 +DB_DATE = 2022-10-15 THISAPP = libloc-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -43,8 +43,8 @@ objects = $(DL_FILE) \ $(DL_FILE) = https://source.ipfire.org/releases/libloc/$(DL_FILE) location-$(DB_DATE).db.xz = https://location.ipfire.org/databases/1/archive/location-$(DB_DATE).db.xz -$(DL_FILE)_BLAKE2 = 5fccd6f0564899499939c63af8975f20b1f7d5267a8cf6c15e14ab377b9d5c008ae5e154c804ac6a1106471aaeebac97dc4ebe6b70fc1e59f416fe2cc02c52a7 -location-$(DB_DATE).db.xz_BLAKE2 = 11b6e9735c911f3dd548fc1759f72ae983eacbe6262f211a4a0080b5b13e3d9704d5080dc9ed0cee289b9ca2643d2adbf266d8a8a25f39129318c3e370a7c9a9 +$(DL_FILE)_BLAKE2 = f3db0fc75ac930805f0df2892b00ffb8f31123a5f28a8cade78f8f1614c0cd806ea365810c5192720d067531b199c342a2c6039f3cd5370c4c9efeded4e31857 +location-$(DB_DATE).db.xz_BLAKE2 = b34b554923a8291ea60ec34c98609da1d71aab66bc1aa2f973ea2e6fd14b6f750559d1e9365df4dd3f707a8dce373aba5f79381c61a4953f272b3557be88af2c install : $(TARGET) @@ -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=12944 + 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=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - --disable-man-pages + --disable-man-pages \ + --with-database-path=/var/lib/location/database.db cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install 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 + + 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 = $(localstatedir)/lib/location + pkgconfigdir = $(libdir)/pkgconfig + + # Overwrite Python path +-#pkgpythondir = $(pythondir)/location +-pkgpythondir = /usr/lib/python3/dist-packages/location ++pkgpythondir = $(pythondir)/location + + %: %.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-names-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 + + 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. + + 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 = family + self.directory = directory + ++ # Tag ++ self.tag = self._make_tag() ++ + # Open output file + if f: + self.f = f +@@ -58,9 +61,6 @@ class OutputWriter(object): + else: + self.f = io.StringIO() + +- # Tag +- self.tag = self._make_tag() +- + # Call any custom initialization + self.init() +