Public bug reported:

todotxt-cli 2.11.0-2build1 fails to build from source in stonking-proposed (and 
previously resolute):
https://launchpad.net/ubuntu/+source/todotxt-cli/2.11.0-2build1
Build log: 
https://launchpad.net/ubuntu/+source/todotxt-cli/2.11.0-2build1/+build/32793645/+files/buildlog_ubuntu-stonking-amd64.todotxt-cli_2.11.0-2build1_BUILDING.txt.gz

The test suite fails during dh_auto_test. Every failure is a date
mismatch, e.g.:

  -2 (B) 2009-02-13 notice the daisies
  +2 (B) 2026-09-24 notice the daisies

and the log warns:

  WARNING: Current date executable not recognized
  So today date will be used, expect false negative tests...

Cause: tests/test-lib.sh fakes the current date by wrapping date(1) as
'date -d @$TODO_TEST_TIME', but only if 'date --version' contains "GNU"
(or matches two old macOS forms). On stonking, date comes from rust-
coreutils 0.12.0 (uutils), which prints 'date (uutils coreutils)
0.12.0', so nothing matches, the real date is used and all date-
dependent tests fail.

uutils date supports the same interface: running stonking's rust-
coreutils 0.12.0 binary, 'date -d @1234567890' gives 'Fri Feb 13
23:31:30 UTC 2009', identical to GNU date. todo.sh itself only calls
'date +FORMAT'.

Fix: have test-lib.sh also accept "uutils" as GNU-style (one-line change; patch 
attached in a comment). Tested with the full 'make test' (44 test files):
- uutils 0.12.0, unmodified: reproduces the builder failure (9 test files, 58 
failing cases)
- uutils 0.12.0, patched: all 44 pass
- GNU date 9.4, patched: all 44 pass (no regression)
The patch applies cleanly after the existing Debian patches; a full package 
build has not been done.

Upstream (todotxt/todo.txt-cli master) still only checks for "GNU";
Debian (2.11.0-2) has no related bug since it uses GNU coreutils.
Suggested: upload 2.11.0-2ubuntu1 with the patch and forward the change
upstream.

** Affects: todotxt-cli (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2168969

Title:
  todotxt-cli FTBFS: test suite does not recognise uutils date, date-
  dependent tests fail

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/todotxt-cli/+bug/2168969/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to