Source: oath-toolkit Version: 2.6.7-3 Severity: wishlist Tags: patch upstream
Hello. Datefudge is broken on 32-bit architectures (release-critical bug #1028587). The author recommends to use alternative tools in message 24 of the bug log. Only two consumers are remaining, gnutls28 and oath-toolkit. The attached diff replaces datefudge with faketime in gnutls28. The change only affects tests. The severity is 'wishlist' for oath-toolkit, but the attached patch (and a similar one for gnutls28) would allow to remove the datefudge package and 1 RC bug from bookworm.
>From 621fef1bb538d0f4dab5f23f2ba25d0ef093c850 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Sat, 18 Feb 2023 18:08:58 +0100 Subject: [PATCH] Replace datefudge with faketime --- debian/control | 2 +- .../replace-datefudge-with-faketime.diff | 47 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 debian/patches/replace-datefudge-with-faketime.diff diff --git a/debian/control b/debian/control index 2c64292..5f7d31f 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: OATH Toolkit Team <oath-toolkit-h...@nongnu.org> Uploaders: Simon Josefsson <si...@josefsson.org> -Build-Depends: datefudge <!nocheck>, +Build-Depends: faketime <!nocheck>, debhelper-compat (= 13), pkg-config, gengetopt, diff --git a/debian/patches/replace-datefudge-with-faketime.diff b/debian/patches/replace-datefudge-with-faketime.diff new file mode 100644 index 0000000..39780c1 --- /dev/null +++ b/debian/patches/replace-datefudge-with-faketime.diff @@ -0,0 +1,47 @@ +Description: replace datefudge with faketime + Datefudge is broken on 32-bit architectures. The author recommends + to use alternative tools in message 24 of #1028587. + . + There only remains two users of datefudge, which has an RC bug. +Author: Nicolas Boulenguez <nico...@debian.org> + +--- a/liboath/tests/tst_usersfile.sh ++++ b/liboath/tests/tst_usersfile.sh +@@ -22,15 +22,15 @@ + TZ=UTC + export TZ + +-TSTAMP=`datefudge "2006-09-23" date -u +%s` ++TSTAMP=`faketime "2006-09-23" date -u +%s` + if test "$TSTAMP" != "1158969600"; then +- echo "Could not fake timestamps with datefudge." ++ echo "Could not fake timestamps with faketime." + exit 77 + fi + + cp $srcdir/users.oath tmp.oath + +-datefudge 2006-12-07 ./tst_usersfile$EXEEXT ++faketime 2006-12-07 ./tst_usersfile$EXEEXT + rc=$? + sed 's/2006-12-07T00:00:0.L/2006-12-07T00:00:00L/g' < tmp.oath > tmp2.oath + diff -ur $srcdir/expect.oath tmp2.oath || rc=1 +--- a/pam_oath/tests/run-root-tests.sh ++++ b/pam_oath/tests/run-root-tests.sh +@@ -52,13 +52,13 @@ + exit 77 + fi + +-TSTAMP=`datefudge "2006-09-23" date -u +%s` ++TSTAMP=`faketime "2006-09-23" date -u +%s` + if test "$TSTAMP" != "1158962400"; then +- echo "Cannot fake timestamp, install datefudge to check better. ($TSTAMP)" ++ echo "Cannot fake timestamp, install faketime to check better. ($TSTAMP)" + ./test-pam_oath-root user3 + rc=$? + else +- datefudge 2006-12-07 ./test-pam_oath-root user3 ++ faketime 2006-12-07 ./test-pam_oath-root user3 + rc=$? + fi + diff --git a/debian/patches/series b/debian/patches/series index ecac8e7..1a1bb7d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ handle-xmlsec-1.2.35.diff +replace-datefudge-with-faketime.diff -- 2.39.1