summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2016-07-28 15:51:35 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2016-07-28 16:52:46 +0100
commitca114f3c76374493f0fd64f8ea0a9b96ae9b1dc5 (patch)
treebc9868009a6ce0bafa9a4737938e1684e2d15e40 /debian
parent22821d8e740c4012566c4bc672acdb8f545cf89f (diff)
Bring in changes from Ubuntu, to bring packages in sync.debian/3.4-4
* Bring in changes from Ubuntu, to make the two packages in sync: - Drop README.Debian, quite out-of-date w.r.t. current packaging. - debian/control - on ubuntu, downgrade default-mta from Recommends to Suggests. - update-grub in postinst, if available (note does not update grub1). - drop stderr warnings in postrm. - drop presubj, out of date, and all types of bugs are welcomed. - on ubuntu, install apport package hook. - on ubuntu, install incremental assembly udev rules into udeb.
Diffstat (limited to 'debian')
-rw-r--r--debian/README.Debian148
-rw-r--r--debian/changelog14
-rw-r--r--debian/control3
-rw-r--r--debian/mdadm.postinst4
-rw-r--r--debian/mdadm.postrm2
-rw-r--r--debian/presubj32
-rwxr-xr-xdebian/rules12
-rw-r--r--debian/source_mdadm.py60
8 files changed, 89 insertions, 186 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index bfca8cb3..00000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,148 +0,0 @@
-mdadm for Debian
-================
-
-Please make sure you read into /usr/share/doc/mdadm/NEWS.Debian.gz and the
-documents listed under "further reading" a little later in this file.
-
-The latest version of this document is available here:
- http://git.debian.org/?p=pkg-mdadm/mdadm.gita=blob;f=debian/README.Debian;hb=HEAD
-
-Autostarting devices
-~~~~~~~~~~~~~~~~~~~~
-The mdadm.conf file controls which devices are to be started automatically by
-mdadm during boot, and various other parameters about how they are to be started.
-The file can also contain some control parameters for the mdadm monitor daemon.
-See mdadm.conf(5) for more information.
-
-Note: this only applies to modular kernels. If you use a monolithic kernel,
-you can control which devices are started automatically by changing the
-partition type: 0xfd for autostart, 0x83 to prevent autostart. mdadm does not
-actually care about the partition type, only the kernel does.
-
-Common recipes
-~~~~~~~~~~~~~~
-Check /usr/share/doc/mdadm/README.recipes.gz for some simple examples of how
-to do the most common stuff with mdadm.
-
-To RAID5 or not to RAID5
-~~~~~~~~~~~~~~~~~~~~~~~~
-See http://www.miracleas.com/BAARF/BAARF2.html . The package maintainer could
-not possibly come up with so much emotion over such a technical topic.
-
-Further reading
-~~~~~~~~~~~~~~~
-The documentation for the kernel md driver is included in
-/usr/share/doc/mdadm/md.txt.gz. In addition, the md(4) manpage provides
-valuable information about the applicable concepts. Do read those!
-
-Further documents of interest:
- - Linux-RAID reference Wiki:
- http://linux-raid.osdl.org
- - Linux software RAID HOWTO:
- http://tldp.org/HOWTO/Software-RAID-HOWTO.html
- - linux-raid mailing list info:
- http://vger.kernel.org/vger-lists.html#linux-raid
- - linux-raid mailing list FAQ:
- http://www.faqs.org/contrib/linux-raid/
-
-Upstream
-~~~~~~~~
-For completeness: The upstream repository is available from
- git clone git://neil.brown.name/mdadm
-
-You can browse Neil's repository here:
- http://neil.brown.name/git?p=mdadm
-
-You can also clone from Debian's Git repository, where upstream's code is in
-the 'upstream' branch:
- git://git.debian.org/git/pkg-mdadm/mdadm
-
-Reporting bugs
-~~~~~~~~~~~~~~
-For reporting bugs, please use the reportbug tool, as it collects useful
-information about the system where you're experiencing the problem.
-
-If the system is another, please include the output of
-/usr/share/bug/mdadm/scripts with your report.
-
-If you are turning to the linux-raid@vger.kernel.org mailing list because you
-already know that the issue is with the md kernel driver and certainly not
-Debian-specific, please also include the output of
-/usr/share/bug/mdadm/scripts.
-
-In general, report bugs against the mdadm Debian package, using reportbug.
-I am happy to route reports to where they belong.
-
-Debian package maintenance
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-The package is maintained with Git and published on git.debian.org. To obtain
-the source:
-
- git clone git://git.debian.org/git/pkg-mdadm/mdadm
-
-You can browse the repository here:
- http://git.debian.org/?p=pkg-mdadm/mdadm
-
-If you want to join the mdadm effort, please send me an email. I'll be very
-glad for any help I get.
-
-There are things to do listed in debian/TODO.
-
-You might also be interested in the following document, which explains how
-package maintenance of mdadm was migrated from SVN to Git:
- http://blog.madduck.net/debian/2007.10.07_converting-a-package-to-git
-
-Patches
-~~~~~~~
-The best way to submit patches is with git-format-patch, as outlined in the
-following. If this is too complicated for you, please feel free to make
-normal diffs, or contact me for assistance if you'd like to learn how to use
-Git.
-
-Please try to follow the guidelines outlined in
- http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD
-
-First, the setup, which you only have to do once on each machine you work with:
-
-# leave out --global if you want to set your identity only for mdadm
-git config --global user.name 'your name'
-git config --global user.email 'your@email.address'
-git clone git://git.debian.org/git/pkg-mdadm/mdadm.git
-
-To prepare the actual patch, do the following:
-
-git pull
-git checkout -b some-name-identifying-my-work
-while not finished:
- // if resuming after a while, maybe update your branch:
- git rebase master
- // edit files
- git add files
- git commit
- ...
-end
-
-After you've brought your change to a state where you want to submit it, please
-squash it into logical single commits. If you only made one change, then this
-will do:
-
-git checkout -b temp-squash master
-git merge --squash some-name-identifying-my-work
-git commit // ... remove the "Squashed commit of the following:" leader
-git format-patch -M -s master
-// now inspect the files this created in $PWD
-// when you're ready to submit, do:
-git send-email --to your@email.address
-// check that it's okay when it arrives
-git send-email --to pkg-mdadm-devel@lists.alioth.debian.org
-
-For multiple logical changes, cherry-pick or squash-merge every commit
-belonging to a change to the integration branch and then commit it.
-
-Also, read the git-send-email manpage in case you're submitting multiple
-logical changes, in case you want to thread them.
-
-The manpage also includes information about adding a prologue message explaining your patch, or how to insert it into an existing
-thread (in-reply-to).
-
- -- martin f. krafft <madduck@debian.org> Tue, 16 Oct 2007 18:12:13 +0100
diff --git a/debian/changelog b/debian/changelog
index a5583e6f..557e7414 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+mdadm (3.4-4) unstable; urgency=high
+
+ * Bring in changes from Ubuntu, to make the two packages in sync:
+ - Drop README.Debian, quite out-of-date w.r.t. current packaging.
+ - debian/control - on ubuntu, downgrade default-mta from Recommends to
+ Suggests.
+ - update-grub in postinst, if available (note does not update grub1).
+ - drop stderr warnings in postrm.
+ - drop presubj, out of date, and all types of bugs are welcomed.
+ - on ubuntu, install apport package hook.
+ - on ubuntu, install incremental assembly udev rules into udeb.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 28 Jul 2016 16:52:07 +0100
+
mdadm (3.4-3) unstable; urgency=high
* Fix UUID= grep for configured RAIDs to be case incesetive, regression from 3.4-2.
diff --git a/debian/control b/debian/control
index acd514fe..df66b9ad 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,8 @@ Homepage: http://neil.brown.name/blog/mdadm
Package: mdadm
Architecture: linux-any
Depends: ${shlibs:Depends}, udev, ${misc:Depends}, lsb-base, debconf
-Recommends: default-mta | mail-transport-agent, kmod | module-init-tools
+Recommends: ${mta:Recommends}, kmod | module-init-tools
+Suggests: ${mta:Suggests}
Description: tool to administer Linux MD arrays (software RAID)
The mdadm utility can be used to create, manage, and monitor MD
(multi-disk) arrays for software RAID or multipath I/O.
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
index fbe1f362..35ae2d94 100644
--- a/debian/mdadm.postinst
+++ b/debian/mdadm.postinst
@@ -93,6 +93,10 @@ _eof
command -v update-initramfs >/dev/null 2>&1 && update-initramfs -u
+ if command -v update-grub2 >/dev/null 2>&1; then
+ update-grub || true
+ fi
+
if dpkg --compare-versions "$2" le 3.3.2-3; then
rm -f /var/lib/mdadm/CONF-UNCHECKED /var/lib/mdadm/mdadm.conf-generated
if [ -d /var/lib/mdadm ]; then
diff --git a/debian/mdadm.postrm b/debian/mdadm.postrm
index eaa62ad3..a3c15f1b 100644
--- a/debian/mdadm.postrm
+++ b/debian/mdadm.postrm
@@ -8,8 +8,6 @@ set -e
case "${1:-}" in
remove)
if command -v update-initramfs >/dev/null 2>&1; then
- echo "W: mdadm: I'll update the initramfs, but if you need MD to boot" >&2
- echo "W: mdadm: with initramfs, your system may be left unbootable!" >&2
update-initramfs -u
fi
;;
diff --git a/debian/presubj b/debian/presubj
deleted file mode 100644
index 103208df..00000000
--- a/debian/presubj
+++ /dev/null
@@ -1,32 +0,0 @@
-Reporting bugs against mdadm
-============================
-Before reporting bugs against mdadm, please read the README documents, as well
-as the FAQ in /usr/share/doc/mdadm . Most issues that are reported against the
-mdadm package are adequately answered therein.
-
-In particular, please do not file bugs about mdadm assembling arrays too
-early, e.g. when the driver is not yet ready and device nodes do not exist.
-Check FAQ item 27 about use of the rootdelay parameter instead.
-
-Also, please check out http://bugs.debian.org/mdadm and make sure that the
-issue you are facing has not already been reported.
-
-If you are not sure that the answer you are seeking is in those files, or you
-are not sure that you are facing a genuine bug, please approach
-debian-user@lists.debian.org or linux-raid@vger.kernel.org with your
-question(s).
-
-Gathering information relevant to mdadm as root
-===============================================
-If you are not reporting bugs as root (which you should not), you will be
-prompted to give permission to run a script to collect relevant information
-from your system as the root user. Only the root user has access to some
-information that might be relevant to the bug report you are about to file.
-
-** Please give permission to run the script as root when asked momentarily.
-
-If you would rather obtain the same information manually, you can run
- /usr/share/bug/mdadm/script 3>&1
-as root and include or attach the output.
-
- -- martin f. krafft <madduck@debian.org> Mon, 20 Jul 2009 15:02:48 +0200
diff --git a/debian/rules b/debian/rules
index 3a1b5a6f..1ed970a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -64,11 +64,13 @@ install-arch: build-arch
install -Dm0755 debian/mkconf $(DESTDIR)/usr/share/mdadm/mkconf
install -Dm0755 debian/checkarray $(DESTDIR)/usr/share/mdadm/checkarray
install -Dm0755 debian/bugscript $(DESTDIR)/usr/share/bug/mdadm/script
- install -Dm0644 debian/presubj $(DESTDIR)/usr/share/bug/mdadm/presubj
-
install -Dm0755 udeb/mdadm $(DESTDIR_UDEB)/sbin/mdadm
install -Dm0755 udeb/mdmon $(DESTDIR_UDEB)/sbin/mdmon
install -Dm0644 udev-md-raid-arrays.rules $(DESTDIR_UDEB)/lib/udev/rules.d/63-md-raid-arrays.rules
+ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes)
+ install -Dm0644 udev-md-raid-assembly.rules $(DESTDIR_UDEB)/lib/udev/rules.d/64-md-raid-assembly.rules
+ install -Dm0644 debian/source_mdadm.py $(DESTDIR)/usr/share/apport/package-hooks/source_mdadm.py
+endif
binary-arch: install-arch
dh_testdir
@@ -90,7 +92,11 @@ binary-arch: install-arch
dh_fixperms
dh_installdeb
dh_shlibdeps
- dh_gencontrol
+ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes)
+ dh_gencontrol -- -Vmta:Suggests="default-mta | mail-transport-agent"
+else
+ dh_gencontrol -- -Vmta:Recommends="default-mta | mail-transport-agent"
+endif
dh_md5sums
dh_builddeb
diff --git a/debian/source_mdadm.py b/debian/source_mdadm.py
new file mode 100644
index 00000000..0aad41b1
--- /dev/null
+++ b/debian/source_mdadm.py
@@ -0,0 +1,60 @@
+'''apport package hook for mdadm
+
+(c) 2009-2016 Canonical Ltd.
+Author: Steve Beattie <sbeattie@ubuntu.com>
+
+Based on the ideas in debian's /usr/share/bug/mdadm/script
+'''
+
+from apport.hookutils import attach_file, attach_file_if_exists, attach_hardware, path_to_key, command_output
+import os
+import re
+import glob
+import gzip
+import subprocess
+import sys
+
+
+def get_initrd_files(pattern):
+ '''Extract listing of files from the current initrd which match a regex.
+
+ pattern should be a "re" object. '''
+
+ (_, _, release, _, _) = os.uname()
+ try:
+ fd = gzip.GzipFile('/boot/initrd.img-' + release, 'rb')
+ # universal_newlines needs to be False here as we're passing
+ # binary data from gzip into cpio, which means we'll need to
+ # decode the bytes into strings later when reading the output
+ cpio = subprocess.Popen(['cpio', '-t'], close_fds=True, stderr=subprocess.STDOUT,
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ universal_newlines=False)
+ except OSError as e:
+ return 'Error: ' + str(e)
+
+ out = cpio.communicate(fd.read())[0].decode(sys.stdout.encoding, errors='replace')
+ if cpio.returncode != 0:
+ return 'Error: command %s failed with exit code %i %' % (
+ 'cpio', cpio.returncode, out)
+
+ lines = ''.join([l for l in out.splitlines(True) if pattern.search(l)])
+ return lines
+
+
+def add_info(report):
+ attach_hardware(report)
+ attach_file(report, '/proc/mounts', 'ProcMounts')
+ attach_file_if_exists(report, '/etc/mdadm/mdadm.conf', 'mdadm.conf')
+ attach_file(report, '/proc/mdstat', 'ProcMDstat')
+ attach_file(report, '/proc/partitions', 'ProcPartitions')
+ attach_file(report, '/etc/blkid.tab', 'etc.blkid.tab')
+ attach_file_if_exists(report, '/boot/grub/menu.lst', 'GrubMenu.lst')
+ attach_file_if_exists(report, '/boot/grub/grub.cfg', 'Grub.cfg')
+ attach_file_if_exists(report, '/etc/lilo.conf', 'lilo.conf')
+
+ devices = glob.glob("/dev/[hs]d*")
+ for dev in devices:
+ report['MDadmExamine' + path_to_key(dev)] = command_output(['/sbin/mdadm', '-E', dev])
+
+ initrd_re = re.compile('md[a/]')
+ report['initrd.files'] = get_initrd_files(initrd_re)