summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog138
-rw-r--r--debian/compat1
-rw-r--r--debian/control9
-rw-r--r--debian/copyright8
-rwxr-xr-xdebian/tests/build-deb13
-rw-r--r--debian/tests/control4
-rw-r--r--debian/tests/elpa-test/all.el203
-rw-r--r--debian/tests/elpa-test/debian/changelog5
-rw-r--r--debian/tests/elpa-test/debian/control31
-rw-r--r--debian/tests/elpa-test/debian/copyright27
-rw-r--r--debian/tests/elpa-test/debian/elpa1
-rwxr-xr-xdebian/tests/elpa-test/debian/rules4
-rw-r--r--debian/tests/elpa-test/debian/source/format1
-rw-r--r--dh-elpa.el7
-rwxr-xr-xdh_elpa35
-rwxr-xr-xdh_elpa_test50
-rwxr-xr-xhelper/install10
-rwxr-xr-xhelper/remove5
18 files changed, 529 insertions, 23 deletions
diff --git a/debian/changelog b/debian/changelog
index 5262c2f..8790187 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,141 @@
+dh-elpa (2.0.17) unstable; urgency=medium
+
+ * Bug fix: "Ugly // in symlinks", thanks to Sven Joachim (Closes:
+ #1030560).
+
+ -- David Bremner <bremner@debian.org> Sun, 23 Jul 2023 07:10:38 -0300
+
+dh-elpa (2.0.16) unstable; urgency=medium
+
+ * Drop dependencies on emacs-el introduced in 2.0.11.
+ Emacs itself now has this dependency. It's required for native-comp.
+ * install/remove: Export EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION=t.
+ This is likely temporary, pending updates to emacsen-common.
+
+ * dh_elpa_test: Revert changes in 2.0.12, 2.0.13 and 2.0.14.
+ * dh_elpa_test: Export EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION=t.
+ Unconditionally prevent native comp writing to HOME while running tests.
+ * dh_elpa_test: Replace use of smartmatch operator.
+ It is expected that Perl upstream will soon deprecate the operator.
+
+ * Add license & copyright headers to dh_elpa{,_test}.
+ * Tighten dependency on emacs-nox|emacs to require >= 1:28.2+1-9.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Fri, 23 Dec 2022 11:49:04 -0700
+
+dh-elpa (2.0.15) unstable; urgency=medium
+
+ * Add elpa-org to the list of packages that are built-in but also
+ packaged separately in Debian.
+ Thanks to Aymeric Agon-Rambosson for reporting the issue.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Tue, 08 Nov 2022 12:19:46 -0700
+
+dh-elpa (2.0.14) unstable; urgency=medium
+
+ * Per Eli Z. suggestion, try native-comp-eln-load-path to limit reading
+ and writing of eln during dh_elpa_test.
+
+ -- David Bremner <bremner@debian.org> Sun, 02 Oct 2022 09:18:37 -0300
+
+dh-elpa (2.0.13) unstable; urgency=medium
+
+ * Disable native code when running ERT tests
+
+ -- David Bremner <bremner@debian.org> Fri, 30 Sep 2022 07:04:56 -0300
+
+dh-elpa (2.0.12) unstable; urgency=medium
+
+ * Set temporary native code cached directory when running (ERT) tests.
+
+ -- David Bremner <bremner@debian.org> Sun, 25 Sep 2022 08:15:00 -0300
+
+dh-elpa (2.0.11) unstable; urgency=medium
+
+ * Depend (temporarily?) on emacs-el as workaround for #1017698
+
+ -- David Bremner <bremner@debian.org> Thu, 25 Aug 2022 08:38:18 -0700
+
+dh-elpa (2.0.10) unstable; urgency=medium
+
+ * Update dh_elpa_test documentation
+ * Bug fix: "Adding a basic autopkgtest", thanks to Lukas Märdian
+ (Closes: #1001452).
+
+ -- David Bremner <bremner@debian.org> Thu, 16 Dec 2021 12:48:45 -0400
+
+dh-elpa (2.0.9) unstable; urgency=medium
+
+ * Bug fix: "install error when root user has packages under
+ /root/.emacs.d/elpa", thanks to Nick Gasson (Closes: #985459). The fix
+ is to set PACKAGE-USER-DIR to "/nonexistent" when doing an install.
+
+ -- David Bremner <bremner@debian.org> Mon, 20 Sep 2021 08:24:37 -0300
+
+dh-elpa (2.0.8) unstable; urgency=medium
+
+ * Retry upload interrupted by Emacs crash.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Thu, 28 Jan 2021 13:40:23 -0700
+
+dh-elpa (2.0.7) unstable; urgency=medium
+
+ * Mark dh-elpa as providing dh-sequence-elpa, for use in
+ Build-Depends{,-Indep}, to enable implicit "--with elpa" rules
+ (Closes: #981084).
+ Thanks to Olivier Tilloy for the patch and others for discussion.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Thu, 28 Jan 2021 13:28:45 -0700
+
+dh-elpa (2.0.6) unstable; urgency=medium
+
+ * Bug fix: "Can't install non-ELPA package due to typo in helper
+ script", thanks to Youhei SASAKI (Closes: #973346).
+
+ -- David Bremner <bremner@debian.org> Thu, 29 Oct 2020 08:17:42 -0300
+
+dh-elpa (2.0.5) unstable; urgency=medium
+
+ * Add xref and project to the list of built-in packages that we also
+ have packaged separately (Closes: #972995).
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Tue, 27 Oct 2020 09:23:33 -0700
+
+dh-elpa (2.0.4) unstable; urgency=medium
+
+ [ David Bremner ]
+ * Enable Multi-Arch: foreign. Currently it seems like any
+ architecture-dependent variance in the behaviour of dh_elpa is
+ probably a bug.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Mon, 01 Jun 2020 17:29:26 -0700
+
+dh-elpa (2.0.3) unstable; urgency=medium
+
+ [ Nicholas D Steeves ]
+ * Fix typos in dh_elpa documentation.
+ * Clean up trailing whitespace in this changelog.
+
+ [ Sean Whitton ]
+ * dh_elpa_test(1): Note exit code requirement in docs for ert_helper
+ (Closes: #941330).
+
+ [ Daniel Kahn Gillmor ]
+ * Use secure copyright file specification URI.
+ * Update standards version to 4.4.1, no changes needed.
+ * Bump debhelper from old 10 to 12.
+ * Set debhelper-compat version in Build-Depends.
+ * Rules-Requires-Root: no
+
+ -- David Bremner <bremner@debian.org> Sun, 19 Apr 2020 08:52:10 -0300
+
dh-elpa (2.0.2) unstable; urgency=medium
* Upload to unstable
+ * Assert compliance with policy version to 4.4.0
+ * Drop dependencies on obsolete "emacs25" variants
- -- David Bremner <bremner@debian.org> Sat, 14 Sep 2019 10:07:54 -0300
+ -- David Bremner <bremner@debian.org> Sat, 14 Sep 2019 10:18:40 -0300
dh-elpa (2.0.1) experimental; urgency=medium
@@ -314,7 +447,7 @@ dh-elpa (0.0.8) unstable; urgency=medium
* Skip binary packages with no files in their package.elpa file and or
on the command line.
-
+
-- David Bremner <bremner@debian.org> Sat, 12 Sep 2015 20:54:05 -0300
dh-elpa (0.0.7) unstable; urgency=medium
@@ -369,4 +502,3 @@ dh-elpa (0.0.1) experimental; urgency=medium
* Initial upload, early adopters only.
-- David Bremner <bremner@debian.org> Sat, 11 Jul 2015 15:24:57 +0200
-
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index f599e28..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/debian/control b/debian/control
index d3f00d5..ef45d59 100644
--- a/debian/control
+++ b/debian/control
@@ -6,18 +6,20 @@ Uploaders:
David Bremner <bremner@debian.org>,
Sean Whitton <spwhitton@spwhitton.name>,
Build-Depends:
- debhelper (>= 10),
+ debhelper-compat (= 12),
emacs-nox (>= 47) | emacs (>= 47.0)
-Standards-Version: 4.4.0
+Standards-Version: 4.4.1
Vcs-Git: https://salsa.debian.org/emacsen-team/dh-elpa.git
Vcs-Browser: https://salsa.debian.org/emacsen-team/dh-elpa
+Rules-Requires-Root: no
Package: dh-elpa
Architecture: all
+Multi-Arch: foreign
Depends:
debhelper (>= 9.20151004),
libdebian-source-perl | dh-make-perl (>= 0.90),
- emacs-nox (>= 47) | emacs (>= 47.0),
+ emacs-nox (>= 1:28.2+1-9) | emacs (>= 1:28.2+1-9),
libarray-utils-perl,
libconfig-tiny-perl,
libfile-find-rule-perl,
@@ -25,6 +27,7 @@ Depends:
libtext-glob-perl,
${misc:Depends},
${perl:Depends},
+Provides: dh-sequence-elpa
Description: Debian helper tools for packaging emacs lisp extensions
This package provides a helper for packaging emacs lisp extensions
in a way compatible with the GNU Emacs 'elpa' package repository.
diff --git a/debian/copyright b/debian/copyright
index 5ab2d31..ed80c0e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,10 +1,16 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
Copyright: © 2007-2015 Free Software Foundation Inc,
© 2015 David Bremner <bremner@debian.org>
© 2016 Sean Whitton <spwhitton@spwhitton.name>
License: GPL-3+
+
+Files: debian/tests/elpa-test/all.el
+Copyright: © 1985-2020 Free Software Foundation, Inc.
+License: GPL-3+
+
+License: GPL-3+
dh-elpa is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
diff --git a/debian/tests/build-deb b/debian/tests/build-deb
new file mode 100755
index 0000000..f79a43b
--- /dev/null
+++ b/debian/tests/build-deb
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Build an elpa package according to:
+# https://wiki.debian.org/Teams/DebianEmacsenTeam/elpa-hello
+#
+set -eu
+
+cd debian/tests/elpa-test
+# Create a dummy .orig.tar.gz
+tar czvf ../elpa-test_1.0.orig.tar.gz all.el
+dpkg-buildpackage
+# Make sure the ${elpa:Depends} were picked up
+dpkg-deb --info ../elpa-all_1.0-1_all.deb | grep Depends | grep dh-elpa-helper
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..42018db
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,4 @@
+Tests: build-deb
+Restrictions: allow-stderr
+Depends: @, build-essential, dpkg, dpkg-dev, emacs-nox
+
diff --git a/debian/tests/elpa-test/all.el b/debian/tests/elpa-test/all.el
new file mode 100644
index 0000000..79dcea5
--- /dev/null
+++ b/debian/tests/elpa-test/all.el
@@ -0,0 +1,203 @@
+;;; all.el --- Edit all lines matching a given regexp -*- lexical-binding: t; -*-
+
+;; Copyright (C) 1985-2020 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <per.abrahamsen@gmail.com>
+;; Version: 1.0
+;; Keywords: matching
+
+;; LCD Archive Entry:
+;; all|Per Abrahamsen|abraham@dina.kvl.dk|
+;; Edit all lines matching a given regexp|
+;; $Date: 1997/03/04 10:29:42 $|$Revision: 5.2 $|~/misc/all.Z|
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Just like occur, except that changes in the *All* buffer are
+;; propagated to the original buffer.
+
+;; You can no longer use mouse-2 to find a match in the original file,
+;; since the default definition of mouse is too useful.
+;; However, `C-c C-c' still works.
+
+;; Line numbers are not listed in the *All* buffer.
+
+;; Ok, it is _not_ just like occur.
+
+;; Some limitations:
+
+;; - Undo in the *All* buffer is an ordinary change in the original.
+;; - Changes to the original buffer are not reflected in the *All* buffer.
+;; - A single change in the *All* buffer must be limited to a single match.
+
+;;; Code:
+
+(defvar all-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "\C-c\C-c" #'all-mode-goto)
+ map))
+
+(defvar all-buffer nil)
+(make-variable-buffer-local 'all-buffer)
+
+(define-derived-mode all-mode fundamental-mode "All"
+ "Major mode for output from \\[all].
+
+All changes made in this buffer will be propagated to the buffer where
+you ran \\[all].
+
+Press \\[all-mode-goto] to go to the same spot in the original buffer."
+ (add-hook 'before-change-functions #'all-before-change-function nil 'local)
+ (add-hook 'after-change-functions #'all-after-change-function nil 'local))
+
+(defun all-mode-find (pos)
+ ;; Find position in original buffer corresponding to POS.
+ (let ((overlay (all-mode-find-overlay pos)))
+ (if overlay
+ (+ (marker-position (overlay-get overlay 'all-marker))
+ (- pos (overlay-start overlay))))))
+
+(defun all-mode-find-overlay (pos)
+ ;; Find the overlay containing POS.
+ (let ((overlays (overlays-at pos)))
+ (while (and overlays (null (overlay-get (car overlays) 'all-marker)))
+ (setq overlays (cdr overlays)))
+ (car-safe overlays)))
+
+(defun all-mode-goto ()
+ "Move point to the corresponding position in the original buffer."
+ (interactive)
+ (let ((pos (all-mode-find (point))))
+ (if pos
+ (pop-to-buffer all-buffer)
+ (error "This text is not from the original buffer"))
+ (goto-char pos)))
+
+(defvar all-initialization-p nil)
+
+(defun all-before-change-function (from to)
+ ;; Check that change is legal.
+ (and all-buffer
+ (not all-initialization-p)
+ (let ((start (all-mode-find-overlay from))
+ (end (all-mode-find-overlay to)))
+ (not (and start (eq start end))))
+ (error "Changes should be limited to a single text piece")))
+
+(defun all-after-change-function (from to length)
+ ;; Propagate changes from *All* buffer.
+ (and all-buffer
+ (null all-initialization-p)
+ (let ((buffer (current-buffer))
+ (pos (all-mode-find from)))
+ (if pos
+ (with-current-buffer all-buffer
+ (save-excursion
+ (goto-char pos)
+ (delete-region pos (+ pos length))
+ (insert-buffer-substring buffer from to)))))))
+
+;;;###autoload
+(defun all (regexp &optional nlines)
+ "Show all lines in the current buffer containing a match for REGEXP.
+
+If a match spreads across multiple lines, all those lines are shown.
+
+Each line is displayed with NLINES lines before and after, or -NLINES
+before if NLINES is negative.
+NLINES defaults to `list-matching-lines-default-context-lines'.
+Interactively it is the prefix arg.
+
+The lines are shown in a buffer named `*All*'.
+Any changes made in that buffer will be propagated to this buffer."
+ (interactive
+ (list (let* ((default (car regexp-history)))
+ (read-regexp
+ (if default
+ (format
+ "Edit lines matching regexp (default `%s'): " default)
+ "Edit lines matching regexp: ")
+ default))
+ current-prefix-arg))
+ (setq nlines (if nlines (prefix-numeric-value nlines)
+ list-matching-lines-default-context-lines))
+ (let ((all-initialization-p t)
+ (buffer (current-buffer))
+ (prevend nil)
+ (prevstart nil)
+ (prevpos (point-min)))
+ (with-output-to-temp-buffer "*All*"
+ (with-current-buffer standard-output
+ (all-mode)
+ (setq all-buffer buffer)
+ (insert "Lines matching ")
+ (prin1 regexp)
+ (insert " in buffer " (buffer-name buffer) ?. ?\n)
+ (insert "--------\n"))
+ (if (eq buffer standard-output)
+ (goto-char (point-max)))
+ (save-excursion
+ (goto-char (point-min))
+ ;; Find next match, but give up if prev match was at end of buffer.
+ (while (and (not (= prevpos (point-max)))
+ (re-search-forward regexp nil t))
+ (goto-char (match-beginning 0))
+ (beginning-of-line)
+ (setq prevpos (point))
+ (goto-char (match-end 0))
+ (let* ((start (save-excursion
+ (goto-char (match-beginning 0))
+ (forward-line (if (< nlines 0) nlines (- nlines)))
+ (point)))
+ (end (save-excursion
+ (goto-char (match-end 0))
+ (if (> nlines 0)
+ (forward-line (1+ nlines))
+ (forward-line 1))
+ (point))))
+ (cond ((null prevend)
+ (setq prevstart start
+ prevend end))
+ ((> start prevend)
+ (all-insert prevstart prevend regexp nlines)
+ (setq prevstart start
+ prevend end))
+ (t
+ (setq prevend end)))))
+ (if prevend
+ (all-insert prevstart prevend regexp nlines))))))
+
+(defun all-insert (start end regexp nlines)
+ ;; Insert match.
+ (let ((marker (copy-marker start))
+ (buffer (current-buffer)))
+ (with-current-buffer standard-output
+ (let ((from (point))
+ to)
+ (insert-buffer-substring buffer start end)
+ (setq to (point))
+ (overlay-put (make-overlay from to) 'all-marker marker)
+ (goto-char from)
+ (while (re-search-forward regexp to t)
+ (put-text-property (match-beginning 0) (match-end 0)
+ 'face 'match))
+ (goto-char to)
+ (if (> nlines 0)
+ (insert "--------\n"))))))
+
+(provide 'all)
+
+;;; all.el ends here
diff --git a/debian/tests/elpa-test/debian/changelog b/debian/tests/elpa-test/debian/changelog
new file mode 100644
index 0000000..d2228f3
--- /dev/null
+++ b/debian/tests/elpa-test/debian/changelog
@@ -0,0 +1,5 @@
+elpa-test (1.0-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Lukas Märdian <slyon@ubuntu.com> Tue, 7 Dec 2021 12:05:48 +0100
diff --git a/debian/tests/elpa-test/debian/control b/debian/tests/elpa-test/debian/control
new file mode 100644
index 0000000..d0455f3
--- /dev/null
+++ b/debian/tests/elpa-test/debian/control
@@ -0,0 +1,31 @@
+Source: elpa-test
+Section: editors
+Priority: optional
+Maintainer: Lukas Märdian <slyon@ubuntu.com>
+Build-Depends: debhelper-compat (= 13),
+ dh-elpa
+Standards-Version: 4.5.1
+Rules-Requires-Root: no
+
+Package: elpa-all
+Architecture: all
+Depends: ${elpa:Depends}, ${misc:Depends}
+Recommends: emacs (>= 46.0)
+Enhances: emacs
+Description: Edit all lines matching a given regexp
+ Just like occur, except that changes in the *All* buffer are
+ propagated to the original buffer.
+ .
+ You can no longer use mouse-2 to find a match in the original file,
+ since the default definition of mouse is too useful.
+ However, `C-c C-c' still works.
+ .
+ Line numbers are not listed in the *All* buffer.
+ .
+ Ok, it is _not_ just like occur.
+ .
+ Some limitations:
+ .
+ - Undo in the *All* buffer is an ordinary change in the original.
+ - Changes to the original buffer are not reflected in the *All* buffer.
+ - A single change in the *All* buffer must be limited to a single match.
diff --git a/debian/tests/elpa-test/debian/copyright b/debian/tests/elpa-test/debian/copyright
new file mode 100644
index 0000000..373f3d9
--- /dev/null
+++ b/debian/tests/elpa-test/debian/copyright
@@ -0,0 +1,27 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: elpa-test
+
+Files: *
+Copyright: (C) 1985-2020 Free Software Foundation, Inc.
+License: GPL-3+
+
+Files: debian/*
+Copyright: (C) 2021 Lukas Märdian <slyon@ubuntu.com>
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'
diff --git a/debian/tests/elpa-test/debian/elpa b/debian/tests/elpa-test/debian/elpa
new file mode 100644
index 0000000..abf136d
--- /dev/null
+++ b/debian/tests/elpa-test/debian/elpa
@@ -0,0 +1 @@
+*.el
diff --git a/debian/tests/elpa-test/debian/rules b/debian/tests/elpa-test/debian/rules
new file mode 100755
index 0000000..e8e22ba
--- /dev/null
+++ b/debian/tests/elpa-test/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@ --with elpa
diff --git a/debian/tests/elpa-test/debian/source/format b/debian/tests/elpa-test/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/tests/elpa-test/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/dh-elpa.el b/dh-elpa.el
index 3643452..b45734c 100644
--- a/dh-elpa.el
+++ b/dh-elpa.el
@@ -183,9 +183,10 @@ These are packaged separately for two reasons:
- it permits use of addons with older versions of Emacs, for
which the dependency is not yet a built-in package."
- (let ((non-elpa (list 'emacs))
- (packaged-separately (list 'let-alist 'seq)))
- (cl-remove-if (lambda (dep) (let ((pkg (car dep)))
+ (let ((non-elpa '(emacs))
+ (packaged-separately '(let-alist seq xref org project)))
+ (cl-remove-if (lambda (dep)
+ (let ((pkg (car dep)))
(or (memq pkg non-elpa)
(and
(package-built-in-p pkg)
diff --git a/dh_elpa b/dh_elpa
index e6fd714..7a7cde2 100755
--- a/dh_elpa
+++ b/dh_elpa
@@ -1,5 +1,21 @@
#!/usr/bin/perl
+# Copyright (C) 2015, 2018 David Bremner <bremner@debian.org>
+# Copyright (C) 2016, 2018 Sean Whitton <spwhitton@spwhitton.name>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
=head1 NAME
dh_elpa - install emacs lisp packages into package build directories
@@ -24,10 +40,10 @@ B<dh_elpa> is a debhelper program that is responsible for installing
elpa style emacs lisp packages into package build directories.
B<dh_elpa> will attempt to run ERT and Buttercup test suites using
-dh_elpa_test(1) if the debhelper compat level is 10 or higher. To
-disable this behaviour, or tweak it if it is failing to run the tests
-as they should be run, set environment variables in debian/rules as
-detailed in dh_elpa_test(1).
+dh_elpa_test(1) if the debhelper compat level is 10 or higher. This
+will override dh_auto_test(1). To disable this behaviour, or tweak it
+if it is failing to run the tests as they should be run, see
+dh_elpa_test(1).
=head1 FILES
@@ -210,10 +226,11 @@ if ($dh{BYTECOMPILE}) {
}
PACKAGE:
-foreach my $package (@{$dh{DOPACKAGES}}) {
+foreach my $package (getpackages()) {
my $tmp=tmpdir($package);
my $file=pkgfile($package,"elpa");
+ my $skip_install = process_pkg($package) ? 0 : 1;
my $varname="ELPA_NAME_${package}";
my $elpapkg = $ENV{$varname} || $ENV{ELPA_NAME};
@@ -265,7 +282,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
push @actions, map { {"src" => $_} } @ARGV;
}
- next PACKAGE if (scalar(@actions) == 0);
+ log_installed_files($package, map { @{$_->{src}} } @actions);
+
+ next PACKAGE if ($skip_install or (scalar(@actions) == 0));
my $pkg_file;
my $cwd = getcwd();
@@ -367,7 +386,7 @@ Note that Emacs Lisp dependencies packaged outside the elpa-* dpkg
namespace must be specified manually. For example, the s.el library
was once provided by the binary package s-el, and at that time packages
depending on it required an explicit dependency on s-el. A dependency
-on s.el is now fulfilled automaticaly by elpa-s via ${elpa:Depends}.
+on s.el is now fulfilled automatically by elpa-s via ${elpa:Depends}.
If dh_elpa adds dependency elpa-x where x is an Emacs Lisp binary
package outside the elpa-* namespace, please file a bug against
@@ -479,7 +498,7 @@ initialization time. This is better than using
C<debian/emacsen-startup> because the forms are then added to
I<elpa-package>-autoloads.el, rather than a file in C</etc/>, as the
contents of C<debian/emacsen-startup> was. This simplifies package
-maintainance.
+maintenance.
These cookies can either annotate upstream source, or be added (along
with the relevant forms) to a file in C<debian/>, by convention
diff --git a/dh_elpa_test b/dh_elpa_test
index f0f70ca..c2504bf 100755
--- a/dh_elpa_test
+++ b/dh_elpa_test
@@ -1,5 +1,21 @@
#!/usr/bin/perl
+# Copyright (C) 2016, 2017 Sean Whitton <spwhitton@spwhitton.name>
+# Copyright (C) 2021 David Bremner <bremner@debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
=head1 NAME
dh_elpa_test - run ELPA package testsuites
@@ -8,7 +24,6 @@ dh_elpa_test - run ELPA package testsuites
use strict;
use warnings;
-no warnings "experimental::smartmatch";
=head1 SYNOPSIS
@@ -85,6 +100,9 @@ The name of a *.el file containing Emacs Lisp code that will run the
ERT test suite. When this key is not defined, B<dh_elpa_test>
calls the function B<(ert-run-tests-batch-and-exit)>.
+Your helper code should ensure that Emacs exits nonzero if there were
+any test failures, or exits zero if the test suite passed.
+
Note that this is not the way to load test helpers that do needed work
but don't actually run the tests. For that, you can use something like
@@ -139,6 +157,31 @@ example, the B<ert_eval> configuration key replaced environment
variable B<DH_ELPA_TEST_ERT_EVAL>. Their use is now deprecated. If
the debian/elpa-test file exists, they will be ignored.
+=head1 CONTROLLING INVOCATION
+
+The following recipes can be combined to enable an appropriate
+combination of build time and autopkgtest time tests.
+
+=head2 DISABLING BUILD TIME TESTS
+
+To disable running tests at build time, you have two choices. You can
+override B<dh_elpa_test> (not B<dh_auto_test>), or you can use the
+B<disable> key in B<debian/elpa-test>. Note that the latter will also
+(mostly) disable autopkgtests (see below).
+
+=head2 ENABLING AUTOPKGTESTS
+
+To enable running autopkgtests via B<dh_elpa_test>, add "Testsuite:
+autpkgtest-pkg-elpa" to B<debian/control>. With B<disable> in
+B<debian/elpa-test>, only B<superficial> tests, namely installing the
+binary packages and byte-compiling any that use B<dh_elpa>.
+
+=head2 ENABLING DH_AUTO_TEST
+
+By default B<dh_elpa_test> replaces B<dh_auto_test>. You can re-enable
+B<dh_auto_test> either with the B<disable> key discussed above, or by
+overriding B<dh_elpa_test> to call B<dh_auto_test>.
+
=cut
use File::Find::Rule;
@@ -149,6 +192,9 @@ use Config::Tiny;
use Debian::Debhelper::Dh_Lib;
use Debian::Control;
+# avoid writes to HOME
+$ENV{EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION} = "t";
+
# ---- Subroutines
# like Find::File::Rule::name, but matches the whole path of the file
@@ -172,7 +218,7 @@ sub long_name {
# ---- Script setup
# check command line opts for autopkgtest mode
-my $autopkgtest = ( "--autopkgtest" ~~ @ARGV );
+my $autopkgtest = grep $_ eq "--autopkgtest", @ARGV;
# This checks whether the debhelper compat is 10 or above. With
# debhelper compat below 9, dh_elpa_test will get run more in more
diff --git a/helper/install b/helper/install
index 622cbc7..c0679bb 100755
--- a/helper/install
+++ b/helper/install
@@ -3,6 +3,11 @@
set -e
+# Avoid writes to HOME.
+# This should probably move into bin:emacsen-common.
+EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION=t
+export EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION
+
# safe values for important variables
unset HOME
@@ -13,7 +18,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin
FLAVOR=$1
ELPA_PACKAGE=$2
ELPA_VERSION=$3
-ELPA_LOADPATH=$4
+ELPA_LOAD_PATH=$4
ELPA_DIR=${ELPA_PACKAGE}-${ELPA_VERSION}
@@ -45,12 +50,13 @@ echo install/${ELPA_DIR}: byte-compiling for ${FLAVOR}
# policy). This makes complation easy, and also allows find-function
# and find-library to work properly. Also link all other top level
# files and directories into the flavor directory
-(cd ${elc_dir} && ln -sf ${el_dir}/* .)
+(cd ${elc_dir} && ln -sf ${el_dir}* .)
# Byte compile them
(cd ${elc_dir}
set +e
${FLAVOR} --quick --batch -l package \
+ --eval "(setq package-user-dir \"/nonexistent\")" \
--eval "(add-to-list 'package-directory-list \"$src_dir\")" \
-f package-initialize -f batch-byte-compile *.el > Install.log 2>&1
if test $? -ne 0
diff --git a/helper/remove b/helper/remove
index 9a980e9..3182eeb 100755
--- a/helper/remove
+++ b/helper/remove
@@ -4,6 +4,11 @@
set -e
+# Avoid writes to HOME.
+# This should probably move into bin:emacsen-common.
+EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION=t
+export EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION
+
# safe values for important variables
unset HOME