Package: calcurse
Version: 3.1.2-1
Followup-For: Bug #697013
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Dear Maintainer,

This patch fixes an FTBFS that exists with this package. I have tested
this with the Ubuntu version of the package.

  * Fix FTBFS for 32-bit architectures.

Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-35-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

diff -Nru calcurse-3.1.2/debian/changelog calcurse-3.1.2/debian/changelog
diff -Nru calcurse-3.1.2/debian/patches/series calcurse-3.1.2/debian/patches/series
--- calcurse-3.1.2/debian/patches/series	1969-12-31 18:00:00.000000000 -0600
+++ calcurse-3.1.2/debian/patches/series	2013-01-04 10:02:05.000000000 -0600
@@ -0,0 +1 @@
+test-Use-faketime-f.patch
diff -Nru calcurse-3.1.2/debian/patches/test-Use-faketime-f.patch calcurse-3.1.2/debian/patches/test-Use-faketime-f.patch
--- calcurse-3.1.2/debian/patches/test-Use-faketime-f.patch	1969-12-31 18:00:00.000000000 -0600
+++ calcurse-3.1.2/debian/patches/test-Use-faketime-f.patch	2013-01-04 10:09:12.000000000 -0600
@@ -0,0 +1,96 @@
+From: Chris J Arges <chris.j.ar...@canonical.com>
+Subject: [PATCH] test/: Use `faketime -f`
+
+Description: Use the advanced timestamp specification format for libfaketime.
+  Before using that, some tests failed on 32-bit systems due to integer
+  overflows. It seems like faketime translates absolute dates to relative
+  dates by default. Moreover, libfaketime is not able to handle relative
+  dates that exceed the maximum value of a signed integer. Using "-f"
+  skips the conversion to relative dates.
+
+Bug-Debian: http://bugs.debian.org/697013
+
+Origin: upstream, commit 2ea91e1a8a2ee4318e3530ec2680565ad11b1585 git://git.calcurse.org/calcurse.git
+Author: Lukas Fleischer <calcu...@cryptocrack.de>
+
+--- a/test/appointment-001.sh
++++ b/test/appointment-001.sh
+@@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '2011-02-25 23:42' "$CALCURSE" --read-only -D "$DATA_DIR" -a
++  faketime -f '2011-02-25 23:42:00' "$CALCURSE" --read-only -D "$DATA_DIR" -a
+ elif [ "$1" = 'expected' ]; then
+   cat <<EOD
+ 02/25/11:
+--- a/test/day-002.sh
++++ b/test/day-002.sh
+@@ -6,7 +6,8 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '1912-06-23' "$CALCURSE" --read-only -D "$DATA_DIR"/ -d42
++  faketime -f '1912-06-23 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ \
++    -d42
+ elif [ "$1" = 'expected' ]; then
+   cat <<EOD
+ 06/24/12:
+--- a/test/day-003.sh
++++ b/test/day-003.sh
+@@ -6,7 +6,8 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '1912-06-23' "$CALCURSE" --read-only -D "$DATA_DIR"/ -d42
++  faketime -f '1912-06-23 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ \
++    -d42
+ elif [ "$1" = 'expected' ]; then
+   "$CALCURSE" --read-only -D "$DATA_DIR"/ -s06/23/1912 -r42
+ else
+--- a/test/next-001.sh
++++ b/test/next-001.sh
+@@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '1912-07-10 04:10' "$CALCURSE" --read-only -D "$DATA_DIR" -n
++  faketime -f '1912-07-10 04:10:00' "$CALCURSE" --read-only -D "$DATA_DIR" -n
+ elif [ "$1" = 'expected' ]; then
+   cat <<EOD
+ next appointment:
+--- a/test/range-001.sh
++++ b/test/range-001.sh
+@@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '2011-02-25 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r
++  faketime -f '2011-02-25 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r
+ elif [ "$1" = 'expected' ]; then
+   cat <<EOD
+ 02/25/11:
+--- a/test/range-002.sh
++++ b/test/range-002.sh
+@@ -6,7 +6,8 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '2000-01-01 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r400
++  faketime -f '2000-01-01 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ \
++    -r400
+ elif [ "$1" = 'expected' ]; then
+   cat <<EOD
+ 04/07/00:
+--- a/test/range-003.sh
++++ b/test/range-003.sh
+@@ -6,7 +6,8 @@ if [ ! -x "$(command -v faketime)" ]; th
+ fi
+ 
+ if [ "$1" = 'actual' ]; then
+-  faketime '2000-01-01 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r400
++  faketime -f '2000-01-01 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ \
++    -r400
+ elif [ "$1" = 'expected' ]; then
+   "$CALCURSE" --read-only -D "$DATA_DIR"/ -s01/01/2000 -r400
+ else

Reply via email to