From bf6c700798271cb9df71369132a45a398b86c772 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 21 Sep 2020 15:09:20 +0000 Subject: [PATCH 1/7] openvmtools: Depend on libtirpc Fixes: #12487 Signed-off-by: Michael Tremer --- lfs/openvmtools | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lfs/openvmtools b/lfs/openvmtools index fe0e0b16b..fb0d312a5 100644 --- a/lfs/openvmtools +++ b/lfs/openvmtools @@ -33,9 +33,9 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) SUP_ARCH = x86_64 i586 PROG = openvmtools -PAK_VER = 5 +PAK_VER = 6 -DEPS = +DEPS = libtirpc CFLAGS += -Wno-error=array-bounds From 97f68af983562e35a420459e849e1ff78e8787e4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Sep 2020 10:24:56 +0000 Subject: [PATCH 2/7] xinetd: Depend on libtirpc Signed-off-by: Michael Tremer --- lfs/xinetd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lfs/xinetd b/lfs/xinetd index 9e14279d4..d3196beef 100644 --- a/lfs/xinetd +++ b/lfs/xinetd @@ -32,7 +32,9 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = xinetd -PAK_VER = 1 +PAK_VER = 2 + +DEPS = libtirpc CFLAGS += -fcommon -I/usr/include/tirpc -Wl,-ltirpc From 05ca47a0a712d65c55d0c8a0d093bb2446aad49b Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 22 Sep 2020 20:25:09 +0200 Subject: [PATCH 3/7] libloc: Update to 0.9.4 Also update to the shipped database to 2020-09-21. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- lfs/libloc | 12 ++++------ ...te-buffer-when-reading-from-database.patch | 24 ------------------- ...c-0.9.3-location-provide-return-code.patch | 22 ----------------- 3 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 src/patches/libloc-0.9.3-country-terminate-buffer-when-reading-from-database.patch delete mode 100644 src/patches/libloc-0.9.3-location-provide-return-code.patch diff --git a/lfs/libloc b/lfs/libloc index 178f9f9cc..da53e5149 100644 --- a/lfs/libloc +++ b/lfs/libloc @@ -24,8 +24,8 @@ include Config -VER = 0.9.3 -DB_DATE = 2020-07-10 +VER = 0.9.4 +DB_DATE = 2020-09-21 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)_MD5 = 61f1d543f67baf665b0140d3676fdade -location-$(DB_DATE).db.xz_MD5 = 3f68f631e94c29b953c4e60454567540 +$(DL_FILE)_MD5 = 82770e9eba20f636c96e6fa42ff234b5 +location-$(DB_DATE).db.xz_MD5 = fa3069bf31170629d638317e283913c0 install : $(TARGET) @@ -78,10 +78,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xvf $(DIR_DL)/$(DL_FILE) - # Apply upstream patches - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libloc-0.9.3-country-terminate-buffer-when-reading-from-database.patch - cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libloc-0.9.3-location-provide-return-code.patch - # Add patch for i586 to disable strong stack protector. ifeq "$(BUILD_ARCH)" "i586" cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libloc-0.9.3-perl-i586-regular-stack-protector.patch diff --git a/src/patches/libloc-0.9.3-country-terminate-buffer-when-reading-from-database.patch b/src/patches/libloc-0.9.3-country-terminate-buffer-when-reading-from-database.patch deleted file mode 100644 index 0ad9229fd..000000000 --- a/src/patches/libloc-0.9.3-country-terminate-buffer-when-reading-from-database.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 61d3516bbfce6b4e6393825329c07b1e2a88d47d -Author: Michael Tremer -Date: Mon Jul 13 10:47:30 2020 +0000 - - country: Terminate buffer when reading from database - - Compilers on ARM do not seem to initialise the buffer. - - Signed-off-by: Michael Tremer - -diff --git a/src/country.c b/src/country.c -index d6ddf50..2ba93e6 100644 ---- a/src/country.c -+++ b/src/country.c -@@ -125,6 +125,9 @@ int loc_country_new_from_database_v1(struct loc_ctx* ctx, struct loc_stringpool* - // Read country code - loc_country_code_copy(buffer, dbobj->code); - -+ // Terminate buffer -+ buffer[2] = '\0'; -+ - // Create a new country object - int r = loc_country_new(ctx, country, buffer); - if (r) diff --git a/src/patches/libloc-0.9.3-location-provide-return-code.patch b/src/patches/libloc-0.9.3-location-provide-return-code.patch deleted file mode 100644 index 2382145c3..000000000 --- a/src/patches/libloc-0.9.3-location-provide-return-code.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 1be0681cc4bcc006369e69d90dc4439eaa6f58d5 -Author: Stefan Schantl -Date: Wed Jul 29 18:50:20 2020 +0200 - - location: Provide a return code if the database does not need to be - updated. - - Signed-off-by: Stefan Schantl - -diff --git a/src/python/location.in b/src/python/location.in -index 5211b28..8cdd140 100644 ---- a/src/python/location.in -+++ b/src/python/location.in -@@ -416,7 +416,7 @@ class CLI(object): - _("The datase has recently be updated recently (%s)") % \ - format_timedelta(now - t), - ) -- return -+ return 3 - - # Fetch the timestamp we need from DNS - t = location.discover_latest_version() From 4522b5f6b005a3b4094aca6b3d6eed4c6343fc52 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Sep 2020 17:15:57 +0000 Subject: [PATCH 4/7] libloc: Update rootfile Signed-off-by: Michael Tremer --- config/rootfiles/common/libloc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/rootfiles/common/libloc b/config/rootfiles/common/libloc index 9985b939f..b12052074 100644 --- a/config/rootfiles/common/libloc +++ b/config/rootfiles/common/libloc @@ -14,8 +14,8 @@ usr/bin/location #usr/include/libloc/writer.h #usr/lib/libloc.la #usr/lib/libloc.so -usr/lib/libloc.so.0 -usr/lib/libloc.so.0.0.0 +usr/lib/libloc.so.1 +usr/lib/libloc.so.1.0.0 usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/Location.pm #usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Location #usr/lib/perl5/site_perl/5.30.0/xxxMACHINExxx-linux-thread-multi/auto/Location/.packlist From b57d9769b573770473bcd80addd856273fe948f4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Sep 2020 10:08:41 +0000 Subject: [PATCH 5/7] fcron: Fix invalid syntax in update-location-database cronjob Fixes: #12484 Signed-off-by: Michael Tremer --- config/cron/crontab | 2 +- config/rootfiles/core/150/update.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/cron/crontab b/config/cron/crontab index 331eaa4a5..1a1939336 100644 --- a/config/cron/crontab +++ b/config/cron/crontab @@ -60,7 +60,7 @@ HOME=/ 00 2 * 10-11 0 /usr/local/bin/timezone-transition /usr/local/bin/firewallctrl # Update location database once a month -%hourly,random * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/update-location-database >/dev/null 2>&1 +%hourly,random * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/update-location-database >/dev/null 2>&1 # Retry sending spooled mails regularly %hourly * /usr/sbin/dma -q diff --git a/config/rootfiles/core/150/update.sh b/config/rootfiles/core/150/update.sh index c125c058c..cb8d53261 100644 --- a/config/rootfiles/core/150/update.sh +++ b/config/rootfiles/core/150/update.sh @@ -103,6 +103,11 @@ ldconfig # Filesytem cleanup /usr/local/bin/filesystem-cleanup +# Fix invalid cronjob syntax +sed -e "s/^%hourly,random \* \* \*/%hourly,random */g" \ + -i /var/spool/cron/root.orig +fcrontab -z + # Start services /etc/init.d/collectd start From d3e88e3485f057dfc4721689912ec48f48b153da Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Sep 2020 15:25:27 +0000 Subject: [PATCH 6/7] crontab: Update misleading comment Signed-off-by: Michael Tremer --- config/cron/crontab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cron/crontab b/config/cron/crontab index 1a1939336..f1ac3666d 100644 --- a/config/cron/crontab +++ b/config/cron/crontab @@ -59,7 +59,7 @@ HOME=/ 00 3 * 3 0 /usr/local/bin/timezone-transition /usr/local/bin/firewallctrl 00 2 * 10-11 0 /usr/local/bin/timezone-transition /usr/local/bin/firewallctrl -# Update location database once a month +# Update location database %hourly,random * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/update-location-database >/dev/null 2>&1 # Retry sending spooled mails regularly From 277721c2b7d373ab232645ea7e8699592a084054 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Sep 2020 17:41:41 +0000 Subject: [PATCH 7/7] core150: Ship libloc Signed-off-by: Michael Tremer --- config/rootfiles/core/150/filelists/libloc | 1 + 1 file changed, 1 insertion(+) create mode 120000 config/rootfiles/core/150/filelists/libloc diff --git a/config/rootfiles/core/150/filelists/libloc b/config/rootfiles/core/150/filelists/libloc new file mode 120000 index 000000000..ff4a92429 --- /dev/null +++ b/config/rootfiles/core/150/filelists/libloc @@ -0,0 +1 @@ +../../../common/libloc \ No newline at end of file