[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1001452: marked as done (dh-elpa: Adding a basic autopkgtest)



Your message dated Thu, 16 Dec 2021 17:19:22 +0000
with message-id <E1mxuPa-0000Di-EJ@fasolo.debian.org>
and subject line Bug#1001452: fixed in dh-elpa 2.0.10
has caused the Debian Bug report #1001452,
regarding dh-elpa: Adding a basic autopkgtest
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1001452: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001452
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: dh-elpa
Version: 2.0.10
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
X-Debbugs-Cc: slyon@ubuntu.com

Hello David,

the testing situation of dh-elpa isn't very good.
I added a simple autopkgtest to have some basic verification of the dh-elpa and
dh-elpa-helper functionality.

The test in debian/tests/build-dep uses dpkg-buildpackage to build a dummy deb
in debian/tests/elpa-test/ that was generated using dh-make-elpa and the "all"
elpa package (https://elpa.gnu.org/packages/all.html).

Afterwards dpkg-deb is used to make sure that the dh-elpa-helper dependency was
picked up correctly.

Thanks for considering the patch.

Cheers,
  Lukas

-- System Information:
Debian Release: 11.0
  APT prefers impish-updates
  APT policy: (500, 'impish-updates'), (500, 'impish-security'), (500, 'impish'), (100, 'impish-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.13.0-22-generic (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru dh-elpa-2.0.9/debian/tests/build-deb dh-elpa-2.0.10/debian/tests/build-deb
--- dh-elpa-2.0.9/debian/tests/build-deb	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/build-deb	2021-12-09 16:36:46.000000000 +0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Build an elpa package according to:
+# https://wiki.debian.org/Teams/DebianEmacsenTeam/elpa-hello
+#
+set -eu
+
+cd debian/tests/elpa-test
+dpkg-buildpackage
+# Make sure the ${elpa:Depends} were picked up
+dpkg-deb --info ../elpa-all_1.0_all.deb | grep Depends | grep dh-elpa-helper
diff -Nru dh-elpa-2.0.9/debian/tests/control dh-elpa-2.0.10/debian/tests/control
--- dh-elpa-2.0.9/debian/tests/control	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/control	2021-12-09 16:36:46.000000000 +0100
@@ -0,0 +1,4 @@
+Tests: build-deb
+Restrictions: allow-stderr
+Depends: @, build-essential, dpkg, dpkg-dev, emacs-nox
+
diff -Nru dh-elpa-2.0.9/debian/tests/elpa-test/all.el dh-elpa-2.0.10/debian/tests/elpa-test/all.el
--- dh-elpa-2.0.9/debian/tests/elpa-test/all.el	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/elpa-test/all.el	2021-12-09 16:36:46.000000000 +0100
@@ -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 -Nru dh-elpa-2.0.9/debian/tests/elpa-test/debian/control dh-elpa-2.0.10/debian/tests/elpa-test/debian/control
--- dh-elpa-2.0.9/debian/tests/elpa-test/debian/control	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/elpa-test/debian/control	2021-12-09 16:36:46.000000000 +0100
@@ -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 -Nru dh-elpa-2.0.9/debian/tests/elpa-test/debian/copyright dh-elpa-2.0.10/debian/tests/elpa-test/debian/copyright
--- dh-elpa-2.0.9/debian/tests/elpa-test/debian/copyright	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/elpa-test/debian/copyright	2021-12-09 16:36:46.000000000 +0100
@@ -0,0 +1,35 @@
+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'
+
+DISCLAIMER: This copyright info was automatically extracted
+ from the ELPA package. It might not be accurate. You need
+ to throughly verify that the code passes the DFSG, and that
+ the info in this file is accurate. In case there are any FIXME
+ in this file, these should be fixed.
+NOTE: Don't forget to remove this disclaimer when you've
+ performed this verification.
diff -Nru dh-elpa-2.0.9/debian/tests/elpa-test/debian/elpa dh-elpa-2.0.10/debian/tests/elpa-test/debian/elpa
--- dh-elpa-2.0.9/debian/tests/elpa-test/debian/elpa	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/elpa-test/debian/elpa	2021-12-09 16:36:46.000000000 +0100
@@ -0,0 +1 @@
+*.el
diff -Nru dh-elpa-2.0.9/debian/tests/elpa-test/debian/rules dh-elpa-2.0.10/debian/tests/elpa-test/debian/rules
--- dh-elpa-2.0.9/debian/tests/elpa-test/debian/rules	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/elpa-test/debian/rules	2021-12-09 16:36:46.000000000 +0100
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@ --with elpa
diff -Nru dh-elpa-2.0.9/debian/tests/elpa-test/debian/source/format dh-elpa-2.0.10/debian/tests/elpa-test/debian/source/format
--- dh-elpa-2.0.9/debian/tests/elpa-test/debian/source/format	1970-01-01 01:00:00.000000000 +0100
+++ dh-elpa-2.0.10/debian/tests/elpa-test/debian/source/format	2021-12-09 16:36:46.000000000 +0100
@@ -0,0 +1 @@
+3.0 (native)

--- End Message ---
--- Begin Message ---
Source: dh-elpa
Source-Version: 2.0.10
Done: David Bremner <bremner@debian.org>

We believe that the bug you reported is fixed in the latest version of
dh-elpa, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1001452@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
David Bremner <bremner@debian.org> (supplier of updated dh-elpa package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 16 Dec 2021 12:48:45 -0400
Source: dh-elpa
Architecture: source
Version: 2.0.10
Distribution: unstable
Urgency: medium
Maintainer: Debian Emacsen team <debian-emacsen@lists.debian.org>
Changed-By: David Bremner <bremner@debian.org>
Closes: 1001452
Changes:
 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).
Checksums-Sha1:
 41ebd65793e985aee1eba7c6e3ea27c4eb9a4d0c 1919 dh-elpa_2.0.10.dsc
 6122d0ffee3f823475edffc88893b2907a40cf98 25816 dh-elpa_2.0.10.tar.xz
Checksums-Sha256:
 ddf461ce6f47aa5c6883cbfb5e912bf18afd71160636343e556709183578fc53 1919 dh-elpa_2.0.10.dsc
 642b879d3eadf84845e1ccae20d016bec782033ec828642fe7ab47a1a9419b19 25816 dh-elpa_2.0.10.tar.xz
Files:
 3e00bcfc58c45e544383ba4a95009092 1919 devel optional dh-elpa_2.0.10.dsc
 dfefe3c15964eda1f56778c11896f0dd 25816 devel optional dh-elpa_2.0.10.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAmG7cM8ACgkQA0U5G1Wq
FSH+RhAAjgdWqdXXiTIeQSFymkQp6gRB+tTsFCwI285nosreTP3Kgx1J3Apl4QUV
D9XzCvmVwySCwKfslKeygRIxmpHtrhyv0RJh9j7sgr8ujo9HVuzbGSEGts2w6DKW
V9dar48nA06VN1F4pJh0bylZ6zpZzlP+Ogu+O/GqZFTVQJQsgvh2iw2eGzSVgWY8
KH9caRKsaUhM4btfv7WpVn2SHNcW4ZHB/M7Ws+mUP2oJkfiAkeLDedNQexTTx+eC
LKO0Dr+rrDZSC0oQ6qd/ZVLGwCMJHmMlOmxbpGllJXFp7phdpH/lbwCM4U3L/4Qr
/1GrsD3x+j8MgxBXBi0FA9L0CNri4DiaAUInLBvQ7MAVj7twxkinnSsfqd5zgfWA
C2bxSr+CZN19PBEfMP/trhdms+7QNhfuAkLI1GdE/p95t2yR/2gPKcIdO6rp4ZE/
Ybrtx7EJxzNUIN9j+tsPFsfKDB6Dt61ZDiOVJwMhPKaejm2CHcPkMBOKI33Rvttg
qoheenwIkf94qnFBkacAAabXGQCkjUsJRtOwPI/ELiQ4rt8zobrJmonMhF+2jXw9
3uOL/wEYIjN73m6KJ9k4rSWxawu6tJPL1qA8p2cbFN97SkC4/Gnygc8FxmlVfVyx
N8ydH3LIOj3K7tblPMlhRosZ/1L6JMgNSIx5eseoR/s+Rb4kIdk=
=Jx3D
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: