Package: apticron
Version: 1.2.3+nmu1
Severity: normal
Tags: patch

Dear Maintainer,

Starting with debianutils version 4.10 the tempfile(1) program displays
a run-time deprecation warning; this causes cron to send the output via
email separate from any message that would be sent by apticron.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.6.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apticron depends on:
ii  apt                 2.1.6
ii  bsd-mailx [mailx]   8.1.2-0.20180807cvs-1+b1
ii  bzip2               1.0.8-3
ii  cron [cron-daemon]  3.0pl1-136
ii  dpkg                1.19.7
ii  mailutils [mailx]   1:3.9-2
ii  ucf                 3.0042

Versions of packages apticron recommends:
ii  apt-listchanges  3.22
ii  gpg              2.2.20-1
ii  iproute2         5.7.0-1

apticron suggests no packages.

-- debconf information:
  apticron/notification: root
From 8f1206539aa08487c5729830e7c7da17f0fb8bb3 Mon Sep 17 00:00:00 2001
From: Aaron Schrab <aa...@schrab.com>
Date: Mon, 15 Jun 2020 19:52:18 -0400
Subject: [PATCH] Use mktemp(1) rather than tempfile(1)

Starting with debianutils version 4.10 the tempfile(1) program displays
a run-time deprecation warning; this causes cron to send the output via
email separate from any message that would be sent by apticron. Switch
to using mktemp(1) instead.
---
 apticron | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apticron b/apticron
index fceb182..dcce1f6 100755
--- a/apticron
+++ b/apticron
@@ -4,10 +4,10 @@
 # implementations in Debian. Make sure we send proper headers, and a
 # text/plain content type.
 Mailx() {
-    MAIL_BODY_FILE=$(tempfile)
+    MAIL_BODY_FILE=$(mktemp)
     cat > "$MAIL_BODY_FILE"
     if [ "x$GPG_ENCRYPT" = "x1" ] && gpg --list-public-keys "$EMAIL" > /dev/null 2>&1; then
-        MAIL_ENC_FILE=$(tempfile)
+        MAIL_ENC_FILE=$(mktemp)
         gpg --trust-model always --batch --armor --encrypt --recipient "$EMAIL" < "$MAIL_BODY_FILE" > "$MAIL_ENC_FILE"
         mv "$MAIL_ENC_FILE" "$MAIL_BODY_FILE"
     fi
-- 
2.27.0

Reply via email to