Merge Debian 3.0.33-2 and 3.0.33-3 changes.
authorRoland Rosenfeld <roland@debian.org>
Sun, 25 Sep 2022 18:02:44 +0000 (20:02 +0200)
committerRoland Rosenfeld <roland@debian.org>
Sun, 25 Sep 2022 18:02:44 +0000 (20:02 +0200)
debian/changelog
debian/control
debian/privoxy-cleanup.service [new file with mode: 0644]
debian/privoxy-cleanup.timer [new file with mode: 0644]
debian/privoxy.cron.daily
debian/rules
debian/tests/conditional-defines [changed mode: 0644->0755]
debian/tests/conditional-defines.pl

index b18610b..e9cd823 100644 (file)
@@ -2,17 +2,25 @@ privoxy (3.0.34~gitsnapshot-1) UNRELEASED; urgency=medium
 
   * Unreleased GIT snapshot.
 
- -- Roland Rosenfeld <roland@debian.org>  Thu, 09 Dec 2021 16:35:46 +0100
+ -- Roland Rosenfeld <roland@debian.org>  Sun, 25 Sep 2022 20:01:09 +0200
 
-privoxy (3.0.33-2) UNRELEASED; urgency=medium
+privoxy (3.0.33-3) unstable; urgency=medium
+
+  * d/tests/conditional-defines: ignore 32-bit time_t on 32bit systems.
+
+ -- Roland Rosenfeld <roland@debian.org>  Sun, 25 Sep 2022 19:49:17 +0200
+
+privoxy (3.0.33-2) unstable; urgency=medium
 
   * d/maintscript: Remove orphaned
     templates/edit-actions-for-url-string-filter (Closes: #1001501).
   * d/tests/conditional-defines: Check that expected #defines are enabled.
   * d/rules: --enable-compression at build time (still disabled in config).
   * d/tests/privoxy-regression-tests: 2 pass check with different options.
+  * Update to Standards-Version 4.6.1 (no changes).
+  * Add systemd timer support for cert cleanup.
 
- -- Roland Rosenfeld <roland@debian.org>  Sat, 11 Dec 2021 10:36:30 +0100
+ -- Roland Rosenfeld <roland@debian.org>  Sun, 25 Sep 2022 11:52:25 +0200
 
 privoxy (3.0.33-1) unstable; urgency=medium
 
index 9e7bde5..4318695 100644 (file)
@@ -18,7 +18,7 @@ Build-Depends: autoconf,
                sgmlspl <!nodoc>,
                w3m <!nodoc>,
                zlib1g-dev
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Homepage: https://www.privoxy.org/
 Vcs-Git: https://salsa.debian.org/debian/privoxy.git
 Vcs-Browser: https://salsa.debian.org/debian/privoxy
diff --git a/debian/privoxy-cleanup.service b/debian/privoxy-cleanup.service
new file mode 100644 (file)
index 0000000..8887181
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=privoxy certificate cleanup
+Documentation=man:privoxy(8) https://www.privoxy.org/user-manual/
+ConditionACPower=true
+
+[Service]
+Type=oneshot
+ExecStart=/etc/cron.daily/privoxy systemd-timer
+
+# performance options
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
+
diff --git a/debian/privoxy-cleanup.timer b/debian/privoxy-cleanup.timer
new file mode 100644 (file)
index 0000000..28b254f
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=privoxy certificate cleanup
+Documentation=man:privoxy(8) https://www.privoxy.org/user-manual/
+Before=logrotate.timer
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
+
+[Install]
+WantedBy=timers.target
index 114fd41..97eff8a 100644 (file)
@@ -4,9 +4,15 @@
 
 set -e
 
+# skip in favour of systemd timer if called from cron.daily
+if [ -d /run/systemd/system ] && [ "$1" != "systemd-timer" ]; then
+    exit 0
+fi
+
+
 CERTDIR=/var/lib/privoxy/certs
 EXPIREDAYS=90
 
 if [ -d $CERTDIR ]; then
-    find $CERTDIR -type f -mtime +$EXPIREDAYS | xargs -r rm -f
+    find $CERTDIR -type f -mtime +$EXPIREDAYS -print0 | xargs -0 -r rm -f
 fi
index 87c8cf4..5b49300 100755 (executable)
@@ -117,3 +117,7 @@ endif
 override_dh_perl:
 #      We only need perl-base:
        dh_perl -d
+
+override_dh_installsystemd:
+       dh_installsystemd
+       dh_installsystemd --name privoxy-cleanup
old mode 100644 (file)
new mode 100755 (executable)
index d1554a3..693f4fb 100755 (executable)
@@ -45,8 +45,13 @@ foreach my $tr ($table->look_down('_tag' => 'tr')) {
    my $value = $td2->detach_content;
    if ($value !~ /Yes/) {
       # feature disabled, check whitelist
-      if (! defined $disabled_features{$feature}) {
-         printf STDERR "%s is disabled, but should be enabled\n", $feature;
+      if ($feature eq 'FEATURE_64_BIT_TIME_T') {
+         # See https://en.wikipedia.org/wiki/Year_2038_problem
+         # On Linux >= 5.6 time_t should be 64bit, too.
+         printf "%s is disabled, which is ok on 32bit systems", $feature;
+         $disabled_ok++;
+      } elsif (! defined $disabled_features{$feature}) {
+         printf "%s is disabled, but should be enabled\n", $feature;
          $exitcode = 1;
          $disabled_nok++;
       } else {