From patchwork Sat Sep 12 10:34:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 10186 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 (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4hhnpp492Yz3wqL for ; Sat, 12 Sep 2026 10:34:42 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE1" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4hhnpn5mjBz5kf for ; Sat, 12 Sep 2026 10:34:41 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4hhnpn50pzz2xvl for ; Sat, 12 Sep 2026 10:34:41 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4hhnpl0y38z2xHd for ; Sat, 12 Sep 2026 10:34:39 +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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4hhnph4Kclz7b; Sat, 12 Sep 2026 10:34:36 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1789209276; 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=weMq0pPsUOTn5fjYMCH8Mz8ojFXAl8yd5j6joFqAUrs=; b=ejYfWQl722ZDkdjN8PfNiqJhLJzNDHOlnNm0kzqdwuyIpT1+3iaq5yvOBdvCEP5N7e9vVL 75+9AVpvPGpF5WCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1789209276; 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=weMq0pPsUOTn5fjYMCH8Mz8ojFXAl8yd5j6joFqAUrs=; b=ZJq8YB5pIolRO4TF+lEnFdukbBeE0G915K7x+Ya6FBGZhHKWQ0zKWaIDM+Nn62qsGSb1FC uPf8D6BZPRBdKRKZoLkeT2pvRs9oliU3UhG+RHf4P4L9Q7N7C39s9rODvuIkeq8qpZOKUx rCfcnVmQl+QYuyz+bobu0OUhH8/vwNvqIjDH2d0dWhmHTgIOOVDShwiV5s/8Yhq+2zAyht jIpZF2T4eDqeUuhqkZZHscB5g1loaQlWUPaTeSWc2Cmx0L1VyUJH/adkNG1kOuFOYC/g1l B36l1n0STeur6oHJTFNBj0/60zhw2ofiSc0L/rjBonD/xq0gjl1bXZjzQ4WZkg== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] libloc: Fix bug14047 - return 3 when database is latest version Date: Sat, 12 Sep 2026 12:34:17 +0200 Message-ID: <20260912103417.14444-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - Currently libloc returns 0 when the database is the current version. Tha man page says it should return 3. The reason is that the return for that check is on its own so it defaults to returning 0. - This patch makes it return 3. - Fix has been confirmed to return 3 on my vm testbed system. - A separate patch will be submitted that adds the fix to location.in in the libloc repo so that a future update version of libloc will include this fix and the patch in this submission can then be removed. Tested-by: Adolf Belka Fixes: bug14047 Signed-off-by: Adolf Belka --- lfs/libloc | 3 ++- ....19-Return_3_when_database_is_latest_version.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch diff --git a/lfs/libloc b/lfs/libloc index 5aee8813f..bfa0234d2 100644 --- a/lfs/libloc +++ b/lfs/libloc @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2025 IPFire Team # +# Copyright (C) 2007-2026 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 # @@ -81,6 +81,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # https://lists.ipfire.org/pipermail/development/2022-November/014763.html cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch cd $(DIR_APP) && ./autogen.sh cd $(DIR_APP) && ./configure \ --prefix=/usr \ diff --git a/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch b/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch new file mode 100644 index 000000000..4ebd84c10 --- /dev/null +++ b/src/patches/libloc-0.9.19-Return_3_when_database_is_latest_version.patch @@ -0,0 +1,11 @@ +--- libloc-0.9.19/src/scripts/location.in.orig 2026-06-02 16:41:25.000000000 +0200 ++++ libloc-0.9.19/src/scripts/location.in 2026-09-10 16:00:33.706282553 +0200 +@@ -468,7 +468,7 @@ + # Check the version of the local database + if db and t and db.created_at >= t: + log.info("Already on the latest version") +- return ++ return 3 + + # Download the database into the correct directory + tmpdir = os.path.dirname(ns.database)