From beaf251e16d40bb38d56a1ec5573bfdc1c1cfb0d Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 11 Jan 2014 23:05:33 -0400 Subject: debian: update notmuch-emacs for emacs policy 2.0.6 This involves - the meta-flavour emacs has gone away - a compat file is needed (also installed by dh_installemacsen) - a conflict with pre-2.0.0 emacsen-common - manually managing the "installed" semaphore file --- debian/changelog | 6 ++++++ debian/control | 1 + debian/notmuch-emacs.emacsen-compat | 1 + debian/notmuch-emacs.emacsen-install | 2 -- debian/notmuch-emacs.emacsen-remove | 6 ++---- debian/notmuch-emacs.postinst | 4 ++++ debian/notmuch-emacs.prerm | 3 +++ 7 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 debian/notmuch-emacs.emacsen-compat create mode 100644 debian/notmuch-emacs.postinst create mode 100644 debian/notmuch-emacs.prerm diff --git a/debian/changelog b/debian/changelog index 0f2b69b8..9ee7ed15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +notmuch (0.17-3) UNRELEASED; urgency=low + + * update notmuch-emacs for debian emacs policy 2.0.6 + + -- David Bremner Sun, 12 Jan 2014 17:07:16 -0400 + notmuch (0.17-2) unstable; urgency=medium * Bug fix: "package should warn in a NEWS.Debian file about possible diff --git a/debian/control b/debian/control index 1f8cbff7..a887263c 100644 --- a/debian/control +++ b/debian/control @@ -108,6 +108,7 @@ Architecture: all Section: mail Breaks: notmuch (<<0.6~254~) Replaces: notmuch (<<0.6~254~) +Conflicts: emacsen-common (<< 2.0.0) Depends: ${misc:Depends}, notmuch (>= ${source:Version}), emacs23 (>= 23~) | emacs23-nox (>=23~) | emacs23-lucid (>=23~) | emacs24 (>= 24~) | emacs24-nox (>=24~) | emacs24-lucid (>=24~) diff --git a/debian/notmuch-emacs.emacsen-compat b/debian/notmuch-emacs.emacsen-compat new file mode 100644 index 00000000..573541ac --- /dev/null +++ b/debian/notmuch-emacs.emacsen-compat @@ -0,0 +1 @@ +0 diff --git a/debian/notmuch-emacs.emacsen-install b/debian/notmuch-emacs.emacsen-install index 8fd30276..dfd8fda9 100755 --- a/debian/notmuch-emacs.emacsen-install +++ b/debian/notmuch-emacs.emacsen-install @@ -8,8 +8,6 @@ FLAVOR=$1 PACKAGE=notmuch -if [ ${FLAVOR} = emacs ]; then exit 0; fi - # We know that the notmuch emacs code doesn't work with emacs before emacs23 if [ ${FLAVOR} = emacs21 ]; then exit 0; fi if [ ${FLAVOR} = emacs22 ]; then exit 0; fi diff --git a/debian/notmuch-emacs.emacsen-remove b/debian/notmuch-emacs.emacsen-remove index 184c2b60..3b433ae2 100755 --- a/debian/notmuch-emacs.emacsen-remove +++ b/debian/notmuch-emacs.emacsen-remove @@ -4,7 +4,5 @@ FLAVOR=$1 PACKAGE=notmuch -if [ ${FLAVOR} != emacs ]; then - echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} - rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} -fi +echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} +rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} diff --git a/debian/notmuch-emacs.postinst b/debian/notmuch-emacs.postinst new file mode 100644 index 00000000..48ecf231 --- /dev/null +++ b/debian/notmuch-emacs.postinst @@ -0,0 +1,4 @@ +dir="/var/lib/emacsen-common/state/package/installed" +mkdir -p 0755 ${dir} +touch ${dir}/notmuch-emacs +#DEBHELPER# diff --git a/debian/notmuch-emacs.prerm b/debian/notmuch-emacs.prerm new file mode 100644 index 00000000..5e2758d3 --- /dev/null +++ b/debian/notmuch-emacs.prerm @@ -0,0 +1,3 @@ +#DEBHELPER# +dir="/var/lib/emacsen-common/state/package/installed" +rm -f ${dir}/notmuch-emacs -- cgit v1.2.3 From b4f3be53c8789485d63aafde03b5f5a7e5d86592 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 11 Jan 2014 13:25:39 -0400 Subject: test/emacs: replace the use of process-attributes with signal-process In some environments (at least Hurd), process-attributes is unimplimented and always returns nil. This ends up causing test failures (see e.g. id:87a9ffofsc.fsf@zancas.localnet). Historically and according to POSIX 1003.1-2001, a signal of 0 can be used to check the validity of a pid. This seems less heinous than parsing the output of ps(1). --- test/test-lib.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/test-lib.el b/test/test-lib.el index d26b49f7..37fcb3d0 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -77,19 +77,22 @@ invisible text." (setq start next-pos))) str)) +;; process-attributes is not defined everywhere, so define an +;; alternate way to test if a process still exists. + +(defun test-process-running (pid) + (= 0 + (signal-process pid 0))) + (defun orphan-watchdog-check (pid) "Periodically check that the process with id PID is still running, quit if it terminated." - (if (not (process-attributes pid)) + (if (not (test-process-running pid)) (kill-emacs))) (defun orphan-watchdog (pid) "Initiate orphan watchdog check." - ; If process-attributes returns nil right away, that probably means - ; it is unimplimented. So we delay two minutes before killing emacs. - (if (process-attributes pid) - (run-at-time 60 60 'orphan-watchdog-check pid) - (run-at-time 120 60 'orphan-watchdog-check pid))) + (run-at-time 60 60 'orphan-watchdog-check pid)) (defun hook-counter (hook) "Count how many times a hook is called. Increments -- cgit v1.2.3 From 030c85bc03fb308c5cc641411b5f50e77ece1d6e Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 12 Jan 2014 08:53:28 -0400 Subject: debian: finalize changelog for 0.17-3 --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9ee7ed15..a6efc929 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ -notmuch (0.17-3) UNRELEASED; urgency=low +notmuch (0.17-3) unstable; urgency=medium * update notmuch-emacs for debian emacs policy 2.0.6 + * Update emacs test suite for Hurd compatibility -- David Bremner Sun, 12 Jan 2014 17:07:16 -0400 -- cgit v1.2.3 From f2e1f0b006d281b9b0a3361dcae37b019eecd502 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 12 Jan 2014 08:55:00 -0400 Subject: debian: add single-debian-patch The point of fancy patch systems is to share things with upstream. We have met the upstream and he is us. --- debian/source/options | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian/source/options diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 00000000..7423a2df --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +single-debian-patch -- cgit v1.2.3