debian/0000755000000000000000000000000012153144271007166 5ustar debian/compat0000644000000000000000000000000212113116706010362 0ustar 7 debian/control0000644000000000000000000000124212153130177010570 0ustar Source: task Section: utils Priority: optional Maintainer: Jakub Wilk Build-Depends: debhelper (>= 8.1), dpkg-dev (>= 1.15.7), cmake, uuid-dev, libjson-perl, Standards-Version: 3.9.4 Homepage: http://taskwarrior.org Package: task Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Description: feature-rich console based todo list manager Taskwarrior is a sophisticated command line todo list and task manager with a lot of features: . * colorful tabbed output * feature rich search function * tags * statistics * Getting Things Done compatible * interactive editing of items in text editor debian/patches/0000755000000000000000000000000012143527754010627 5ustar debian/patches/directory-no-path-max.diff0000644000000000000000000000300712131341666015605 0ustar Description: use get_current_dir_name() instead of relying on PATH_MAX Author: Jakub Wilk Forwarded: yes Bug: http://taskwarrior.org/issues/1196 Last-Update: 2013-04-10 --- a/src/Directory.cpp +++ b/src/Directory.cpp @@ -27,6 +27,8 @@ #define L10N // Localization complete. +#include +#include #include #include #include @@ -150,9 +152,18 @@ //////////////////////////////////////////////////////////////////////////////// std::string Directory::cwd () { +#ifdef HAVE_GET_CURRENT_DIR_NAME + char *buf = get_current_dir_name(); + if (buf == NULL) + throw std::bad_alloc(); + std::string result(buf); + free(buf); + return result; +#else char buf[PATH_MAX]; getcwd (buf, PATH_MAX - 1); return std::string (buf); +#endif } //////////////////////////////////////////////////////////////////////////////// --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ set (PACKAGE_VERSION "${VERSION}") set (PACKAGE_STRING "${PACKAGE} ${VERSION}") +check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME) check_function_exists (random HAVE_RANDOM) check_function_exists (srandom HAVE_SRANDOM) check_function_exists (timegm HAVE_TIMEGM) --- a/cmake.h.in +++ b/cmake.h.in @@ -46,6 +46,9 @@ #cmakedefine HAVE_READLINE #cmakedefine HAVE_LIBREADLINE +/* Found get_current_dir_name */ +#cmakedefine HAVE_GET_CURRENT_DIR_NAME + /* Found random */ #cmakedefine HAVE_RANDOM debian/patches/tests-unset-env-vars.diff0000644000000000000000000000073612131360563015512 0ustar Description: unset TASK* environment variables for test suite Make the test runner unset TASKDATA and TASKRC environment variables, so that running the test suite doesn't stomp on user's data. Author: Jakub Wilk Bug: http://taskwarrior.org/issues/1251 Forwarded: no Last-Update: 2013-03-13 --- a/test/run_all.in +++ b/test/run_all.in @@ -1,5 +1,8 @@ #! /bin/sh +unset TASKDATA +unset TASKRC + if [ x"$1" = x"--verbose" ]; then for i in ${TESTBLOB} debian/patches/debian-paths.diff0000644000000000000000000000524612131075407014015 0ustar Description: update paths to those used by the Debian package Author: Alexander Neumann , Jakub Wilk Forwarded: not-needed Last-Update: 2013-02-26 --- a/doc/man/task-tutorial.5.in +++ b/doc/man/task-tutorial.5.in @@ -1286,19 +1286,19 @@ blue theme, add this line to your .taskrc file: .RS -include /usr/local/share/doc/task/rc/dark-blue-256.theme +include /usr/share/task/dark-blue-256.theme .RE For a red theme: .RS -include /usr/local/share/doc/task/rc/dark-red-256.theme +include /usr/share/task/dark-red-256.theme .RE For a general dark theme: .RS -include /usr/local/share/doc/task/rc/dark-256.theme +include /usr/share/task/dark-256.theme .RE Here are two color rules that specify a dark blue background for all tasks that @@ -1497,7 +1497,7 @@ on the calendar. Try adding this line to your ~/.taskrc file: .RS -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include /usr/share/task/holidays.en-US.rc .RE Then: --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -129,9 +129,9 @@ There are two excellent uses of includes in your .taskrc, shown here: .RS -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include /usr/share/task/holidays.en-US.rc .br -include /usr/local/share/doc/task/rc/dark-16.theme +include /usr/share/task/dark-16.theme .RE This includes two standard files that are distributed with taskwarrior, which @@ -717,7 +717,7 @@ .RS .RS .br -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include /usr/share/task/holidays.en-US.rc .RE .RE --- a/doc/man/task-color.5.in +++ b/doc/man/task-color.5.in @@ -265,7 +265,7 @@ from the example): .RS -include /usr/local/share/doc/task/rc/dark-256.theme +include /usr/share/task/dark-256.theme .RE You can use any of the standard taskwarrior themes: --- a/doc/man/taskrc.5 +++ b/doc/man/taskrc.5 @@ -129,9 +129,9 @@ There are two excellent uses of includes in your .taskrc, shown here: .RS -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include /usr/share/task/holidays.en-US.rc .br -include /usr/local/share/doc/task/rc/dark-16.theme +include /usr/share/task/dark-16.theme .RE This includes two standard files that are distributed with taskwarrior, which @@ -717,7 +717,7 @@ .RS .RS .br -include /usr/local/share/doc/task/rc/holidays.en-US.rc +include /usr/share/task/holidays.en-US.rc .RE .RE --- a/cmake.h.in +++ b/cmake.h.in @@ -12,7 +12,7 @@ #define PACKAGE_STRING "${PACKAGE_STRING}" /* Installation details */ -#define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_DOCDIR}/rc" +#define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/share/task" /* Localization */ #define PACKAGE_LANGUAGE ${PACKAGE_LANGUAGE} debian/patches/tests-temporary-directory.diff0000644000000000000000000001623612131341734016642 0ustar Description: fix insecure use of /tmp Author: Jakub Wilk Bug: http://taskwarrior.org/issues/1247 Forwarded: yes Last-Update: 2013-04-10 --- a/test/directory.t.cpp +++ b/test/directory.t.cpp @@ -39,33 +39,33 @@ // Directory (const File&); // Directory (const Path&); - Directory d0 (Path ("/tmp")); - Directory d1 (File ("/tmp")); - Directory d2 (File (Path ("/tmp"))); + Directory d0 (Path ("tmp")); + Directory d1 (File ("tmp")); + Directory d2 (File (Path ("tmp"))); t.is (d0._data, d1._data, "Directory(std::string) == Directory (File&)"); t.is (d0._data, d2._data, "Directory(std::string) == Directory (File (Path &))"); t.is (d1._data, d2._data, "Directory(File&)) == Directory (File (Path &))"); // Directory (const Directory&); Directory d3 (d2); - t.is (d3._data, "/tmp", "Directory (Directory&)"); + t.is (d3._data, "tmp", "Directory (Directory&)"); // Directory (const std::string&); - Directory d4 ("/tmp/test_directory"); + Directory d4 ("tmp/test_directory"); // Directory& operator= (const Directory&); Directory d5 = d4; - t.is (d5._data, "/tmp/test_directory", "Directory::operator="); + t.is (d5._data, "tmp/test_directory", "Directory::operator="); // operator (std::string) const; - t.is ((std::string) d3, "/tmp", "Directory::operator (std::string) const"); + t.is ((std::string) d3, "tmp", "Directory::operator (std::string) const"); // virtual bool create (); - t.ok (d5.create (), "Directory::create /tmp/test_directory"); - t.ok (d5.exists (), "Directory::exists /tmp/test_directory"); + t.ok (d5.create (), "Directory::create tmp/test_directory"); + t.ok (d5.exists (), "Directory::exists tmp/test_directory"); Directory d6 (d5._data + "/dir"); - t.ok (d6.create (), "Directory::create /tmp/test_directory/dir"); + t.ok (d6.create (), "Directory::create tmp/test_directory/dir"); File::create (d5._data + "/f0"); File::create (d6._data + "/f1"); @@ -74,35 +74,35 @@ std::vector files = d5.list (); std::sort (files.begin (), files.end ()); t.is ((int)files.size (), 2, "Directory::list 1 file"); - t.is (files[0], "/tmp/test_directory/dir", "file[0] is /tmp/test_directory/dir"); - t.is (files[1], "/tmp/test_directory/f0", "file[1] is /tmp/test_directory/f0"); + t.is (files[0], "tmp/test_directory/dir", "file[0] is tmp/test_directory/dir"); + t.is (files[1], "tmp/test_directory/f0", "file[1] is tmp/test_directory/f0"); // std::vector listRecursive (); files = d5.listRecursive (); std::sort (files.begin (), files.end ()); t.is ((int)files.size (), 2, "Directory::list 1 file"); - t.is (files[0], "/tmp/test_directory/dir/f1", "file is /tmp/test_directory/dir/f1"); - t.is (files[1], "/tmp/test_directory/f0", "file is /tmp/test_directory/f0"); + t.is (files[0], "tmp/test_directory/dir/f1", "file is tmp/test_directory/dir/f1"); + t.is (files[1], "tmp/test_directory/f0", "file is tmp/test_directory/f0"); // virtual bool remove (); - t.ok (File::remove (d5._data + "/f0"), "File::remove /tmp/test_directory/f0"); - t.ok (File::remove (d6._data + "/f1"), "File::remove /tmp/test_directory/dir/f1"); + t.ok (File::remove (d5._data + "/f0"), "File::remove tmp/test_directory/f0"); + t.ok (File::remove (d6._data + "/f1"), "File::remove tmp/test_directory/dir/f1"); - t.ok (d6.remove (), "Directory::remove /tmp/test_directory/dir"); - t.notok (d6.exists (), "Directory::exists /tmp/test_directory/dir - no"); + t.ok (d6.remove (), "Directory::remove tmp/test_directory/dir"); + t.notok (d6.exists (), "Directory::exists tmp/test_directory/dir - no"); - t.ok (d5.remove (), "Directory::remove /tmp/test_directory"); - t.notok (d5.exists (), "Directory::exists /tmp/test_directory - no"); + t.ok (d5.remove (), "Directory::remove tmp/test_directory"); + t.notok (d5.exists (), "Directory::exists tmp/test_directory - no"); // bool remove (const std::string&); - Directory d7 ("/tmp/to_be_removed"); - t.ok (d7.create (), "Directory::create /tmp/to_be_removed"); + Directory d7 ("tmp/to_be_removed"); + t.ok (d7.create (), "Directory::create tmp/to_be_removed"); File::create (d7._data + "/f0"); Directory d8 (d7._data + "/another"); - t.ok (d8.create (), "Directory::create /tmp/to_be_removed/another"); + t.ok (d8.create (), "Directory::create tmp/to_be_removed/another"); File::create (d8._data + "/f1"); - t.ok (d7.remove (), "Directory::remove /tmp/to_be_removed"); - t.notok (d7.exists (), "Directory /tmp/to_be_removed gone"); + t.ok (d7.remove (), "Directory::remove tmp/to_be_removed"); + t.notok (d7.exists (), "Directory tmp/to_be_removed gone"); // static std::string cwd (); std::string cwd = Directory::cwd (); --- a/test/file.t.cpp +++ b/test/file.t.cpp @@ -36,33 +36,33 @@ { UnitTest t (13); - File::write ("/tmp/file.t.txt", "This is a test\n"); - File f6 ("/tmp/file.t.txt"); - t.ok (f6.size () == 15, "File::size /tmp/file.t.txt good"); - t.ok (f6.mode () & S_IRUSR, "File::mode /tmp/file.t.txt good"); - t.ok (File::remove ("/tmp/file.t.txt"), "File::remove /tmp/file.t.txt good"); + File::write ("tmp/file.t.txt", "This is a test\n"); + File f6 ("tmp/file.t.txt"); + t.ok (f6.size () == 15, "File::size tmp/file.t.txt good"); + t.ok (f6.mode () & S_IRUSR, "File::mode tmp/file.t.txt good"); + t.ok (File::remove ("tmp/file.t.txt"), "File::remove tmp/file.t.txt good"); // operator (std::string) const; - t.is ((std::string) f6, "/tmp/file.t.txt", "File::operator (std::string) const"); + t.is ((std::string) f6, "tmp/file.t.txt", "File::operator (std::string) const"); - t.ok (File::create ("/tmp/file.t.create"), "File::create /tmp/file.t.create good"); - t.ok (File::remove ("/tmp/file.t.create"), "File::remove /tmp/file.t.create good"); + t.ok (File::create ("tmp/file.t.create"), "File::create tmp/file.t.create good"); + t.ok (File::remove ("tmp/file.t.create"), "File::remove tmp/file.t.create good"); // basename (std::string) const; - t.is (f6.name (), "file.t.txt", "File::basename /tmp/file.t.txt --> file.t.txt"); + t.is (f6.name (), "file.t.txt", "File::basename tmp/file.t.txt --> file.t.txt"); // dirname (std::string) const; - t.is (f6.parent (), "/tmp", "File::dirname /tmp/file.t.txt --> /tmp"); + t.is (f6.parent (), "tmp", "File::dirname tmp/file.t.txt --> /tmp"); // bool rename (const std::string&); - File f7 ("/tmp/file.t.2.txt"); + File f7 ("tmp/file.t.2.txt"); f7.append ("something\n"); f7.close (); - t.ok (f7.rename ("/tmp/file.t.3.txt"), "File::rename did not fail"); - t.is (f7._data, "/tmp/file.t.3.txt", "File::rename stored new name"); + t.ok (f7.rename ("tmp/file.t.3.txt"), "File::rename did not fail"); + t.is (f7._data, "tmp/file.t.3.txt", "File::rename stored new name"); t.ok (f7.exists (), "File::rename new file exists"); - t.ok (f7.remove (), "File::remove /tmp/file.t.3.txt good"); + t.ok (f7.remove (), "File::remove tmp/file.t.3.txt good"); t.notok (f7.exists (), "File::remove new file no longer exists"); return 0; --- a/test/run_all.in +++ b/test/run_all.in @@ -3,6 +3,8 @@ unset TASKDATA unset TASKRC +mkdir -p tmp/ + rc=0 if [ x"$1" = x"--verbose" ]; then debian/patches/tests-set-build-type.diff0000644000000000000000000000102612131376621015457 0ustar Description: set build type and CXXFLAGS for the test suite Author: Jakub Wilk Forwarded: not-needed Last-Update: 2013-04-11 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -44,6 +44,9 @@ target_link_libraries (${src_FILE} task commands task columns ${TASK_LIBRARIES}) endforeach (src_FILE) +set (CMAKE_BUILD_TYPE debug) +set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -Wall") + #SET(CMAKE_BUILD_TYPE gcov) #SET(CMAKE_CXX_FLAGS_GCOV "--coverage") #SET(CMAKE_C_FLAGS_GCOV "--coverage") debian/patches/series0000644000000000000000000000041612143511152012026 0ustar debian-paths.diff tests-out-of-tree.diff tests-unset-env-vars.diff tests-fail.diff tests-for-released-version.diff tests-temporary-directory.diff tests-set-build-type.diff directory-no-path-max.diff directory-handle-dt-unknown.diff system-kfreebsd.diff system-hurd.diff debian/patches/system-hurd.diff0000644000000000000000000000156312143527754013752 0ustar Description: add support for GNU/Hurd systems Author: Jakub Wilk Bug: http://taskwarrior.org/issues/1249 Forwarded: yes Last-Update: 2013-04-10 --- a/src/DOM.cpp +++ b/src/DOM.cpp @@ -128,6 +128,8 @@ return "NetBSD"; #elif defined (LINUX) return "Linux"; +#elif defined (__GNU__) + return "GNU/Hurd"; #else return STRING_DOM_UNKNOWN; #endif --- a/src/commands/CmdDiagnostics.cpp +++ b/src/commands/CmdDiagnostics.cpp @@ -86,6 +86,8 @@ "NetBSD" #elif defined (LINUX) "Linux" +#elif defined (__GNU__) + "GNU/Hurd" #else STRING_CMD_DIAG_UNKNOWN #endif --- a/src/commands/CmdVersion.cpp +++ b/src/commands/CmdVersion.cpp @@ -92,6 +92,8 @@ << "netbsd" #elif defined (LINUX) << "linux" +#elif defined (__GNU__) + << "gnu-hurd" #else << STRING_CMD_VERSION_UNKNOWN #endif debian/patches/directory-handle-dt-unknown.diff0000644000000000000000000000256612131341663017017 0ustar Description: properly handle d_type == DT_UNKNOWN readdir(3) manpage reads: “Currently, only some file systems […] have full support for returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN.” . This patch implements this requirement. Author: Jakub Wilk Bug: http://taskwarrior.org/issues/1200 Forwarded: yes Last-Update: 2013-04-10 --- a/src/Directory.cpp +++ b/src/Directory.cpp @@ -119,8 +119,14 @@ else unlink ((dir + "/" + de->d_name).c_str ()); #else - if (de->d_type == DT_DIR || - de->d_type == DT_UNKNOWN) + if (de->d_type == DT_UNKNOWN) + { + struct stat s; + lstat ((dir + "/" + de->d_name).c_str (), &s); + if (s.st_mode & S_IFDIR) + de->d_type = DT_DIR; + } + if (de->d_type == DT_DIR) remove_directory (dir + "/" + de->d_name); else unlink ((dir + "/" + de->d_name).c_str ()); @@ -205,6 +211,13 @@ else results.push_back (base + "/" + de->d_name); #else + if (recursive && de->d_type == DT_UNKNOWN) + { + struct stat s; + lstat ((base + "/" + de->d_name).c_str (), &s); + if (s.st_mode & S_IFDIR) + de->d_type = DT_DIR; + } if (recursive && de->d_type == DT_DIR) list (base + "/" + de->d_name, results, recursive); else debian/patches/tests-fail.diff0000644000000000000000000000254012120061247013516 0ustar Description: exit with non-zero code on test failure Make the test runner exit with non-zero code if any of the tests fail. Author: Jakub Wilk Forwarded: no Last-Update: 2013-03-13 --- a/test/run_all.in +++ b/test/run_all.in @@ -3,18 +3,20 @@ unset TASKDATA unset TASKRC +rc=0 if [ x"$1" = x"--verbose" ]; then for i in ${TESTBLOB} do echo '#' $i - $i > test.log 2>&1 + $i > test.log 2>&1 || rc=1 while read LINE do echo $LINE done < test.log rm test.log done + exit $rc else date > all.log @@ -40,7 +42,7 @@ COUNT=`expr $COUNT + 1` fi - $i >> all.log 2>&1 + $i >> all.log 2>&1 || rc=1 done if [ $BAR -eq 1 ]; then @@ -56,4 +58,5 @@ printf "Fail: %5d\n" `grep -c '^not' all.log` printf "Skipped: %5d\n" `grep -c '^skip' all.log` printf "Runtime: %5d seconds\n" $RUNTIME + exit $rc fi --- a/test/test.cpp +++ b/test/test.cpp @@ -25,6 +25,7 @@ // //////////////////////////////////////////////////////////////////////////////// +#include #include #include #include @@ -85,6 +86,7 @@ << " skipped. " << std::setprecision (3) << percentPassed << "% passed.\n"; + exit(mFailed > 0); } /////////////////////////////////////////////////////////////////////////////// debian/patches/tests-out-of-tree.diff0000644000000000000000000001136212131354123014753 0ustar Description: allow running tests out-of-tree Author: Jakub Wilk Bug: http://taskwarrior.org/issues/1250 Forwarded: yes Last-Update: 2013-03-13 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,9 +106,9 @@ add_subdirectory (doc) add_subdirectory (i18n) add_subdirectory (scripts) -if (EXISTS test) +if (EXISTS ${CMAKE_SOURCE_DIR}/test) add_subdirectory (test EXCLUDE_FROM_ALL) -endif (EXISTS test) +endif (EXISTS ${CMAKE_SOURCE_DIR}/test) if (EXISTS performance) add_subdirectory (performance EXCLUDE_FROM_ALL) endif (EXISTS performance) --- a/test/run_all.in +++ b/test/run_all.in @@ -5,7 +5,7 @@ for i in ${TESTBLOB} do echo '#' $i - ./$i > test.log 2>&1 + $i > test.log 2>&1 while read LINE do echo $LINE @@ -37,7 +37,7 @@ COUNT=`expr $COUNT + 1` fi - ./$i >> all.log 2>&1 + $i >> all.log 2>&1 done if [ $BAR -eq 1 ]; then --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,17 +12,29 @@ width.t json_test) message ("-- Configuring run_all") -set (TESTBLOB "*.t") +if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + +set (TESTBLOB "./*.t") if (CYGWIN) -set (TESTBLOB "*.t *.t.exe") +set (TESTBLOB "./*.t ./*.t.exe") endif (CYGWIN) + +else (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + +set (TESTBLOB "${CMAKE_SOURCE_DIR}/test/*.t ${CMAKE_BINARY_DIR}/test/*.t") +if (CYGWIN) +set (TESTBLOB "${CMAKE_SOURCE_DIR}/test/*.t ${CMAKE_BINARY_DIR}/test/*.t.exe") +endif (CYGWIN) + +endif (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + configure_file ( - ${CMAKE_SOURCE_DIR}/test/run_all.in - ${CMAKE_SOURCE_DIR}/test/run_all) + run_all.in + run_all) add_custom_target (test ./run_all --verbose DEPENDS ${test_SRCS} task_executable - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test) add_custom_target (build_tests DEPENDS ${test_SRCS} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test) --- a/test/export.yaml.t +++ b/test/export.yaml.t @@ -30,6 +30,9 @@ use warnings; use Test::More tests => 22; +my $source_dir = $0; +$source_dir =~ s{[^/]+$}{..}; + # Create the rc file. if (open my $fh, '>', 'export.rc') { @@ -44,7 +47,7 @@ qx{../src/task rc:export.rc add priority:H project:A one 2>&1}; qx{../src/task rc:export.rc add +tag1 +tag2 two 2>&1}; -my $output = qx{../src/task rc:export.rc export | ../scripts/add-ons/export-yaml.pl > ./export.txt 2>&1}; +my $output = qx{../src/task rc:export.rc export | $source_dir/scripts/add-ons/export-yaml.pl > ./export.txt 2>&1}; my @lines; if (open my $fh, '<', './export.txt') { --- a/test/import.todo.sh.t +++ b/test/import.todo.sh.t @@ -30,6 +30,9 @@ use warnings; use Test::More tests => 26; +my $source_dir = $0; +$source_dir =~ s{[^/]+$}{..}; + # Create the rc file. if (open my $fh, '>', 'import.rc') { @@ -64,7 +67,7 @@ } # Convert todo.sh --> task JSON. -qx{../scripts/add-ons/import-todo.sh.pl import.json 2>&1}; +qx{$source_dir/scripts/add-ons/import-todo.sh.pl import.json 2>&1}; # Import the JSON. my $output = qx{../src/task rc:import.rc import import.json 2>&1}; --- a/test/import.yaml.t +++ b/test/import.yaml.t @@ -30,6 +30,9 @@ use warnings; use Test::More tests => 16; +my $source_dir = $0; +$source_dir =~ s{[^/]+$}{..}; + # Create the rc file. if (open my $fh, '>', 'import.rc') { @@ -70,7 +73,7 @@ } # Convert YAML --> task JSON. -qx{../scripts/add-ons/import-yaml.pl import.json 2>&1}; +qx{$source_dir/scripts/add-ons/import-yaml.pl import.json 2>&1}; # Import the JSON. my $output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null}; @@ -122,7 +125,7 @@ } # Convert YAML --> task JSON. -qx{../scripts/add-ons/import-yaml.pl import.json 2>&1}; +qx{$source_dir/scripts/add-ons/import-yaml.pl import.json 2>&1}; # Import the JSON. $output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null}; --- a/test/json_test.t +++ b/test/json_test.t @@ -30,7 +30,10 @@ use warnings; use Test::More; -my @files = glob "./json/*.json"; +my $source_dir = $0; +$source_dir =~ s{[^/]+$}{..}; + +my @files = glob "$source_dir/test/json/*.json"; plan tests => scalar @files; my $output; --- a/test/bash_completion.t +++ b/test/bash_completion.t @@ -41,10 +41,13 @@ ok (-r 'bug.rc', 'Created bug.rc'); } +my $source_dir = $0; +$source_dir =~ s{[^/]+$}{..}; + # Copy task.sh and make substitutions & additions needed for testing. if (open my $target, '>', 'task.sh') { - if (open my $source, '<', '../scripts/bash/task.sh') + if (open my $source, '<', "$source_dir/scripts/bash/task.sh") { while (<$source>) { debian/patches/tests-for-released-version.diff0000644000000000000000000000115712131354423016644 0ustar Description: allow running tests against released version The test suite assumed that the version is a git hash. This patch removes this assumption, thus allowing to run tests against a released version of taskwarrior. Author: Jakub Wilk Forwarded: no Last-Update: 2013-03-08 --- a/test/basic.t +++ b/test/basic.t @@ -54,7 +54,7 @@ # Test the _version command. $output = qx{../src/task rc:basic.rc _version 2>&1}; -like ($output, qr/[a-f0-9]{7}/, '_version - task version number'); +like ($output, qr/^([0-9.]+|[a-f0-9]{7})$/, '_version - task version number'); # Cleanup. unlink 'basic.rc'; debian/patches/system-kfreebsd.diff0000644000000000000000000000277112131341707014564 0ustar Description: add support for GNU/kFreeBSD systems Author: Jakub Wilk Bug: http://taskwarrior.org/issues/1249 Forwarded: yes Last-Update: 2013-04-10 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,8 @@ set (LINUX true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set (DARWIN true) +elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") + set (GNUKFREEBSD true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set (FREEBSD true) elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") --- a/cmake.h.in +++ b/cmake.h.in @@ -33,6 +33,7 @@ #cmakedefine DARWIN #cmakedefine CYGWIN #cmakedefine FREEBSD +#cmakedefine GNUKFREEBSD #cmakedefine OPENBSD #cmakedefine NETBSD #cmakedefine HAIKU --- a/src/DOM.cpp +++ b/src/DOM.cpp @@ -122,6 +122,8 @@ return "OpenBSD"; #elif defined (FREEBSD) return "FreeBSD"; +#elif defined (GNUKFREEBSD) + return "GNU/kFreeBSD"; #elif defined (NETBSD) return "NetBSD"; #elif defined (LINUX) --- a/src/commands/CmdDiagnostics.cpp +++ b/src/commands/CmdDiagnostics.cpp @@ -80,6 +80,8 @@ "OpenBSD" #elif defined (FREEBSD) "FreeBSD" +#elif defined (GNUKFREEBSD) + "GNU/kFreeBSD" #elif defined (NETBSD) "NetBSD" #elif defined (LINUX) --- a/src/commands/CmdVersion.cpp +++ b/src/commands/CmdVersion.cpp @@ -86,6 +86,8 @@ << "openbsd" #elif defined (FREEBSD) << "freebsd" +#elif defined (GNUKFREEBSD) + << "gnu-kfreebsd" #elif defined (NETBSD) << "netbsd" #elif defined (LINUX) debian/lintian-overrides0000644000000000000000000000015612113134456012551 0ustar # the "teh" misspelling is deliberate spelling-error-in-manpage usr/share/man/man5/task-tutorial.5.gz teh the debian/copyright0000644000000000000000000000513012131074523011116 0ustar This work was packaged for Debian by: Alexander Neumann on Tue, 02 Feb 2010 15:33:14 +0100 It was downloaded from: http://taskwarrior.org Upstream Authors: Paul Beckingham Federico Hernandez A complete list of authors can be found in the file AUTHORS. Copyright: Copyright 2006-2013, Paul Beckingham, Federico Hernandez License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. http://www.opensource.org/licenses/mit-license.php Some files have different copyright holder, while they are avalable under the same license (MIT): src/{TDB2.cpp,Transport*,Uri.*}: Copyright 2010-2012, Johannes Schlatow scripts/vim/{ftdetect/task.vim,syntax/task*.vim}: Copyright 2009-2012, John Florian scripts/zsh/_task: Copyright 2010-2012, Johannes Schlatow Copyright 2009, P.C. Shyamshankar scripts/extensions/*.lua: Copyright 2012, Göteborg Bit Factory scripts/fish/task.fish: Copyright 2009-2012, Mick Koch The content of the holiday calendar files in doc/rc/holidays*.rc was provided by holidata.net and is licensed CC-BY-3.0. src/wcwidth6.c was written by Markus Kuhn and is available under the following license: Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted. The author disclaims all warranties with regard to this software. The Debian packaging is: Copyright 2010-2012, Alexander Neumann Copyright 2013, Jakub Wilk It is available under the MIT license (see above). debian/watch0000644000000000000000000000032212113116706010212 0ustar # Compulsory line, this is a version 3 file version=3 # the main taskwarrior download website http://taskwarrior.org/wiki/taskwarrior/Download http://www.taskwarrior.org/download/task-(\d+\.\d+\.\d+)\.tar\.gz debian/maintscript0000644000000000000000000000006412153144250011443 0ustar rm_conffile /etc/bash_completion.d/task.sh 2.2.0-3~ debian/docs0000644000000000000000000000001412113116706010032 0ustar NEWS README debian/changelog0000644000000000000000000001506512153144271011047 0ustar task (2.2.0-3) unstable; urgency=low * Rename /etc/bash_completion.d/task.sh back as /etc/bash_completion.d/task (closes: #710321): + Update debian/rules accordingly. + Add debian/maintscript to let dh_installdeb add maintainer script snippets to remove the old file. + Bump minimum required version of debhelper to 8.1 (for dpkg-maintscript-helper support.) + Add ${misc:Pre-Depends} to Pre-Depends. (It's not strictly necessary for unstable, but it eases wheezy backports). * Add DEP-8 tests. -- Jakub Wilk Mon, 03 Jun 2013 18:47:50 +0200 task (2.2.0-2) unstable; urgency=low * Upload to unstable. * Adapt the test suite to Debian needs: + Add patch (tests-set-build-type.diff) to set cmake build type to ‘debug’ and append -Wall to CXXFLAGS. That way tests are built with the same flags as normal code. -- Jakub Wilk Sun, 12 May 2013 02:12:45 +0200 task (2.2.0-1) experimental; urgency=low * New upstream release. + This release no longer supports Lua extensions. - Remove lublua5.1-dev from Build-Depends. + Drop fix-manpage-formatting.diff; applied upstream. + Drop fix-manpage-installation.diff; applied upstream. + Drop fix-typos.diff; applied upstream. + Refresh other patches. + Update debian/copyright. + Fix duplication of completed task on merge (closes: #700255). Thanks to Helmut Grohne for the bug report. * Add supplemental .orig.tar with the test suite. + Add get-orig-source target, which imports the tests from the upstream VCS. * Adapt the test suite to Debian needs: + Add patch (tests-out-of-tree.diff) to allow running tests out-of-tree + Add patch (tests-unset-env-vars.diff) unset TASK* environment variables. + Add patch (tests-fail.diff) to make the test runner exit with non-zero code if any of the tests fail. + Add patch (tests-for-released-version.diff) to allow running tests against a released version of taskwarrior. + Add patch (tests-temporary-directory.diff) to fix insecure use of /tmp. * Run tests at build time. + Update debian/rules. + Add libjson-perl to Build-Depends. * Add patch (directory-no-path-max.diff) to use get_current_dir_name() instead of relying on PATH_MAX, as the latter is not defined on GNU/Hurd. * Add patch (directory-handle-dt-unknown.diff) to properly handle d_type == DT_UNKNOWN. * Add patch (system-hurd.diff) to add support for GNU/Hurd systems. * Add patch (system-kfreebsd.diff) to add support for GNU/kFreeBSD systems. * Link against libuuid. + Add uuid-dev to Build-Depends. * Don't use dh_testdir; instead use target dependencies to ensure that debian/rules is run from the correct directory. * Run dh_clean as the first command in the clean target. -- Jakub Wilk Thu, 11 Apr 2013 00:43:17 +0200 task (2.1.2-1) experimental; urgency=low * New maintainer. Thanks to Alexander Neumann for his past work on this package. * Relicense Debian packaging to the same license upstream uses (MIT), as agreed with Alexander. * New upstream release (closes: 693979). + Fix order of priorities in the project summary (closes: #680353). Thanks to Marcin Kulisz for the bug report. * Update debian/copyright. * Bump standards version to 3.9.4 (no changes needed). * Switch to source format 3.0 (quilt). * Remove pre-built static libraries early in the build* targets. * Remove cmake.h in the clean target. * Rewrite debian/rules from scratch, without cdbs. + Drop "cbds" from Build-Depends. + Add "dpkg-dev (>= 1.15.7)" to Build-Depends, for dpkg-buildflags. * Don't install vim support files to the binary package; they are already included in the vim package itself. * Don't install /usr/share/task/refresh to the binary package; it's not useful at runtime. * Fix TASK_RCDIR in cmake.h (closes: #669344). Thanks to Sylvain Fankhauser for the bug report. * Add Lintian override for spelling-error-in-manpage; the misspelling in question is deliberate. * Add patch (fix-manpage-formatting.diff) to fix a formatting error in the task(1) manual page (closes: #699332). * Add patch (fix-manpage-installation.diff) to fix manual page installation for out-of-tree builds. * Add patch (fix-typos.diff) to fix some spelling errors. -- Jakub Wilk Wed, 27 Feb 2013 17:05:06 +0100 task (2.0.0-1) unstable; urgency=low * new upstream version (closes: #666903) * this version can be built using gcc-4.7 (closes: #667390) -- Alexander Neumann Sun, 08 Apr 2012 12:37:11 +0200 task (1.9.4-2) unstable; urgency=low * include right path to colorthemes in generated .taskrc (closes: #638269) -- Alexander Neumann Thu, 25 Aug 2011 22:18:17 +0200 task (1.9.4-1) unstable; urgency=low * new upstream version (closes: #635141) * update standards version to 3.9.2 (no changes) -- Alexander Neumann Mon, 01 Aug 2011 22:01:52 +0200 task (1.9.3-1) unstable; urgency=low * new upstream version * update standards version to 3.9.1 (no changes) -- Alexander Neumann Sun, 05 Dec 2010 13:46:37 +0100 task (1.9.2-1) unstable; urgency=low * new upstream version * update standards version to 3.9.0 -- Alexander Neumann Tue, 20 Jul 2010 10:02:25 +0200 task (1.9.1-1) unstable; urgency=low * new upstream version -- Alexander Neumann Mon, 31 May 2010 16:55:14 +0200 task (1.9.0-3) unstable; urgency=low * restored old (buggy) behaviour, as libuuid is untested (by upstream) (reopens #573066, will be fixed upstream in 1.9.1) -- Alexander Neumann Tue, 09 Mar 2010 12:32:30 +0100 task (1.9.0-2) unstable; urgency=low * link against libuuid, use library function for generating uuids instead of internal (not rfc-conforming) implementation (closes: #573066) -- Alexander Neumann Mon, 08 Mar 2010 22:57:19 +0100 task (1.9.0-1) unstable; urgency=low * new upstream version * update standards version to 3.8.4 * change copyright notice for scripts/*, Thanks Torsten! -- Alexander Neumann Tue, 23 Feb 2010 01:17:40 +0100 task (1.8.5-2) unstable; urgency=low * Add libncurses5-dev to Build-Deps -- Alexander Neumann Tue, 09 Feb 2010 22:13:58 +0100 task (1.8.5-1) unstable; urgency=low * Initial release (closes: #531587) -- Alexander Neumann Tue, 02 Feb 2010 15:33:14 +0100 debian/README.Debian0000644000000000000000000000032712113116706011227 0ustar Sample configs, color themes and calendar files have been installed to /usr/share/task and can be included in ~/.taskrc like this: include /usr/share/task/dark-16.theme -- Alexander Neuamnn debian/get-orig-source.sh0000644000000000000000000000074612115201140012527 0ustar #!/bin/sh set -e -u -x version="$1" uscan --no-conf --force-download --download-current-version --rename --verbose --destdir="$PWD" "${0%/*}"/../ tmpdir=$(mktemp -d -t task.get-orig-source.XXXXXX) git clone -b "v$version" git://tasktools.org/task.git "$tmpdir/task" tarfile="task_${version}.orig-test.tar" git -c tar.umask=022 --git-dir="$tmpdir/task/.git/" archive "v$version" --prefix="task-$version-" test/ -o "$tarfile" gzip -9 -n -f "$tarfile" rm -rf "$tmpdir" # vim:ts=4 sw=4 et debian/install0000644000000000000000000000022412113125740010551 0ustar scripts/bash/task.sh /etc/bash_completion.d scripts/zsh/_task /usr/share/zsh/functions/Completion/Unix scripts/fish/task.fish /etc/fish/completions debian/source/0000755000000000000000000000000012115351677010476 5ustar debian/source/format0000644000000000000000000000001412113116733011672 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000403112153130177010244 0ustar #!/usr/bin/make -f cflags = $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) cxxflags = $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) ldflags = $(shell dpkg-buildflags --get LDFLAGS) cmake_options = \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_C_FLAGS_DEBUG="$(cflags)" \ -DCMAKE_CXX_FLAGS_DEBUG="$(cxxflags)" \ -DCMAKE_EXE_LINKER_FLAGS_DEBUG="$(ldflags)" \ parallel = -j$(or $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))),1) .PHONY: clean clean: debian/control dh_clean rm -rf obj/ rm -f cmake.h # Add here any variable or target overrides you need. .PHONY: build build-arch build-indep build build-arch: obj/stamp obj/stamp: debian/control mkdir -p $(dir $@) find src -name '*.a' -delete # pre-built cruft; see http://taskwarrior.org/issues/1178 cd obj && cmake .. $(cmake_options) $(MAKE) -C obj/ $(parallel) ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" "" $(MAKE) -C obj/test/ $(parallel) mkdir -p obj/home/ obj/mock/ ln -sf /bin/false obj/mock/scp HOME="$(CURDIR)/obj/home/" PATH="$(CURDIR)/obj/mock/:$$PATH" $(MAKE) -C obj/test/ test endif touch $(@) .PHONY: binary binary-arch binary-indep binary: binary-arch binary-arch: obj/stamp dh_testroot dh_prep $(MAKE) -C obj/ install DESTDIR=../debian/task/ mkdir -p debian/task/usr/share/task/ set -e; cd debian/task/usr/share/doc/task; \ mv i18n ../../task; \ rm rc/refresh; mv rc/* ../../task; rmdir rc; \ rm -rf scripts; \ rm INSTALL COPYING ChangeLog; dh_install cd debian/task/etc/bash_completion.d && mv task.sh task dh_installdocs dh_installchangelogs ChangeLog dh_installexamples dh_installman dh_lintian dh_compress dh_fixperms dh_strip dh_shlibdeps dh_installdeb dh_gencontrol dh_md5sums dh_builddeb debdir = $(dir $(firstword $(MAKEFILE_LIST))) version = $(shell head -n1 $(debdir)/changelog | cut -d ' ' -f2 | tr -d '()' | cut -d - -f 1) .PHONY: get-orig-source get-orig-source: sh $(debdir)/get-orig-source.sh $(version) # vim:ts=4 sw=4 noet debian/tests/0000755000000000000000000000000012153130216010322 5ustar debian/tests/control0000644000000000000000000000004712153130216011726 0ustar Tests: taskwarrior Depends: task, perl debian/tests/taskwarrior0000755000000000000000000000116312153130216012621 0ustar #!/bin/sh set -e -u [ -d "$ADTTMP/" ] # sanity check cp -a test "$ADTTMP/" cd "$ADTTMP" mkdir -p home mock src ln -sf /bin/false mock/scp ln -sf $(which task) src/task export HOME="$PWD/home/" export PATH="$PWD/mock/:$PATH" cd test/ rm -f export.yaml.t # requires export-yaml.pl rm -f import.yaml.t # requires import-yaml.pl rm -f json_test.t # requires json_test.cpp rm -f import.todo.sh.t # requires import-todo.sh.pl sed -i -e 's,"$source_dir/scripts/bash/task.sh","/etc/bash_completion.d/task",' bash_completion.t sed -e 's,${TESTBLOB},./*.t,' run_all.in > run_all chmod a+x run_all ./run_all --verbose # vim:ts=4 sw=4 et