]> git.proxmox.com Git - drbd-utils.git/commitdiff
initial import
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 17 Mar 2015 15:23:48 +0000 (16:23 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 19 Mar 2015 09:11:08 +0000 (10:11 +0100)
Debian files copied from upstream, then modified to fit our needs.

14 files changed:
Makefile [new file with mode: 0644]
debian/README.Debian [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/drbd-utils.config [new file with mode: 0644]
debian/drbd-utils.dirs [new file with mode: 0644]
debian/drbd-utils.postinst [new file with mode: 0644]
debian/drbd-utils.postrm [new file with mode: 0644]
debian/drbd-utils.prerm [new file with mode: 0644]
debian/drbd-utils.templates [new file with mode: 0644]
debian/rules [new file with mode: 0755]
drbd-utils.tgz [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..4b7ef43
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,52 @@
+RELEASE=4.0
+
+PACKAGE=drbd-utils
+PKGREL=1
+
+DRBDVER=8.9.2~rc3
+DRBDDIR=${PACKAGE}
+DRBDSRC=${DRBDDIR}.tgz
+
+DEBS=                                          \
+drbd8-utils_${DRBDVER}-${PKGREL}_amd64.deb     \
+drbd-utils_${DRBDVER}-${PKGREL}_amd64.deb
+
+all: ${DEBS}
+       echo ${DEBS}
+
+.PHONY: deb
+deb ${DEBS}: ${DRBDSRC}
+       rm -rf ${DRBDDIR}
+       tar xzf ${DRBDSRC}
+       mv ${DRBDDIR}/debian ${DRBDDIR}/debian.old
+       rsync -a debian ${DRBDDIR}
+       cd ${DRBDDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
+       lintian ${DEBS}
+
+.PHONY: download
+download ${DRBDSRC}:
+       rm -rf ${DRBDDIR} ${DRBDSRC}
+       git clone --recursive git://git.drbd.org/drbd-utils
+       cd ${DRBDDIR}; ./autogen.sh
+       tar czf ${DRBDSRC} ${DRBDDIR}
+
+.PHONY: upload
+upload: ${DEBS}
+       umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
+       mkdir -p /pve/${RELEASE}/extra
+       rm -f /pve/${RELEASE}/extra/drbd8-utils_*.deb
+       rm -f /pve/${RELEASE}/extra/drbd-utils_*.deb
+       rm -f /pve/${RELEASE}/extra/Packages*
+       cp ${DEBS} /pve/${RELEASE}/extra
+       cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
+       umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+
+distclean: clean
+
+clean:
+       rm -rf ${DRBDDIR} *.deb *.changes
+       find . -name '*~' -exec rm {} ';'
+
+.PHONY: dinstall
+dinstall: ${DEBS}
+       dpkg -i ${DEBS}
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..600ba7f
--- /dev/null
@@ -0,0 +1,38 @@
+Upgrading to DRBD 8.4
+=====================
+
+Linux kernel versions after 3.8 include DRBD 8.4, a new minor release with
+significant changes both in configuration and operation. An overview of the
+most important changes can be found at:
+
+        http://www.drbd.org/users-guide-8.4/ap-recent-changes.html
+
+Configuration file changes
+--------------------------
+
+A number of changes in the configuration file format are present in 8.4. They
+are outlined at:
+
+      http://www.drbd.org/users-guide-8.4/s-recent-changes-config.html
+
+If you are upgrading from 8.3, please upgrade your configuration files to the
+new format. Unfortunately, due to the way backwards compatility is provided
+upstream, these options will not be understood by drbdadm if you boot a kernel
+with DRBD 8.3 (kernel versions before 3.8), so you will have to revert your
+changes if you want to use older kernels.
+
+Downgrading to DRBD 8.3
+------------------------
+
+A device that has been attached or created using DRBD 8.4 will not work
+automatically under DRBD 8.3, due to changes in device metadata. In order to
+make your devices work with DRBD 8.3, you will have to do the following
+*before* booting the old kernel, to ensure that the metadata is clean:
+
+  drbdadm down all
+  drbdadm apply-al all
+
+More information can be found at:
+
+       http://www.drbd.org/users-guide-8.4/s-downgrading-drbd84.html
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..e396115
--- /dev/null
@@ -0,0 +1,7 @@
+drbd-utils (8.9.2~rc3-1) unstable; urgency=medium
+
+  * compile package for Proxmox VE
+
+  * change package version (fix rc-version-greater-than-expected-version)
+
+ -- Proxmox Support Team <support@proxmox.com>  Tue, 17 Mar 2015 17:00:44 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..6f9c438
--- /dev/null
@@ -0,0 +1,30 @@
+Source: drbd-utils
+Section: admin
+Priority: extra
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Build-Depends: debhelper (>= 9), flex, xsltproc, docbook-xsl
+Standards-Version: 3.9.5
+Homepage: http://www.drbd.org
+
+Package: drbd-utils
+Architecture: linux-any
+Depends: debconf (>= 0.5), ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
+Breaks: drbd8-utils (<< 2:8.9.0)
+Replaces: drbd8-utils (<< 2:8.9.0)
+Recommends: heirloom-mailx|mailx
+Description: RAID 1 over TCP/IP for Linux (user utilities)
+ DRBD is a block device which is designed to build high availability
+ clusters by providing a virtual shared device which keeps disks in
+ nodes synchronised using TCP/IP. This simulates RAID 1 but avoiding
+ the use of uncommon hardware (shared SCSI buses or Fibre Channel).
+ It is currently limited to fail-over HA clusters.
+ .
+ This package contains the programs that will control the drbd kernel
+ module provided in the Linux kernel or external drbd module source.
+
+Package: drbd8-utils
+# build process will override epoch to 2:
+Architecture: linux-any
+Depends: drbd-utils (>= 8.9.0), ${misc:Depends}
+Description: transitional dummy package
+ This is a transitional dummy package for drbd-utils. It can be removed safely.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..6744e25
--- /dev/null
@@ -0,0 +1,78 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: drbd-utils
+Source: http://git.linbit.com/drbd-utils.git/
+
+Files: *
+Copyright: Copyright (C) 2001-2014, LINBIT Information Technologies GmbH
+           Copyright (C) 2008-2014, LINBIT HA-Solutions GmbH
+           Copyright (C) 1999-2014, Philipp Reisner <philipp.reisner@linbit.com>
+           Copyright (C) 2001-2014, Lars Ellenberg <lars.ellenberg@linbit.com>
+License: GPL-2+
+ 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 2 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 package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+
+Files: user/sys_queue.h
+Copyright: Copyright (c) 1991, 1993 The Regents of the University of California
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+Files: debian/*
+Copyright: Copyright 2001 Ard van Breemen <ard@telegraafnet.nl>
+           Copyright 2002 Jan Niehusmann <jan@debian.org>
+           Copyright 2004 David Krovich <dkrovich@csee.wvu.edu>
+           Copyright 2004 Bernd Schubert <bernd-schubert@web.de>
+           Copyright 2004-2014 Lars Ellenberg <lars.ellenberg@linbit.com>
+           Copyright 2004-2014 Philipp Reisner <phil@linbit.com>
+           Copyright 2004-2006 Cyril Bouthors <cyril@bouthors.org>
+           Copyright 2007 Frederik Schüler <fs@debian.org>
+           Copyright 2009 Iustin Pop <iusty@k1024.org>
+           Copyright 2010 Alexander Reichle-Schmehl <tolimar@debian.org>
+           Copyright 2008-2010 Norbert Tretkowski <norbert@tretkowski.de>
+           Copyright 2004-2012 Philipp Hug <debian@hug.cx>
+           Copyright 2013-2014 Apollon Oikonomopoulos <apoikos@debian.org>
+           Copyright 2015 Dietmar Maurer <dietmar@proxmox.com>
+License:
+ Copying and distribution of this package, with or without
+ modification, are permitted in any medium without royalty
+ provided the copyright notice and this notice are
+ preserved.
diff --git a/debian/drbd-utils.config b/debian/drbd-utils.config
new file mode 100644 (file)
index 0000000..96de7be
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+. /usr/share/debconf/confmodule
+
+db_set drbd-utils/manpages 9.0
+db_input medium drbd-utils/manpages || true
+db_go || true
diff --git a/debian/drbd-utils.dirs b/debian/drbd-utils.dirs
new file mode 100644 (file)
index 0000000..dbec007
--- /dev/null
@@ -0,0 +1,6 @@
+etc
+etc/init.d
+etc/ha.d/resource.d
+lib/udev/rules.d
+usr/sbin
+lib/systemd/system
diff --git a/debian/drbd-utils.postinst b/debian/drbd-utils.postinst
new file mode 100644 (file)
index 0000000..cc3a652
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# dh_installinit automatically adds update-rc.d calls
+# all supported systems use udev nowadays
+
+. /usr/share/debconf/confmodule
+
+db_get drbd-utils/manpages
+MANVERSION=$RET
+db_stop
+
+# man pages
+for f in drbd drbdadm drbdmeta drbdsetup; do
+       ln -sf $f-$MANVERSION.8.gz /usr/share/man/man8/$f.8.gz
+done
+ln -sf drbd.conf-$MANVERSION.5.gz /usr/share/man/man5/drbd.conf.5.gz
+
+# compat: we used to live in /sbin/
+# there may be many hardcoded /sbin/drbd* out there,
+# including variants of our own scripts.
+# Unless /sbin is a symlink to /usr/sbin anyways.
+if ! test /sbin -ef /usr/sbin; then
+       ln -sf /usr/sbin/drbdsetup /sbin/
+       ln -sf /usr/sbin/drbdmeta /sbin/
+       ln -sf /usr/sbin/drbdadm /sbin/
+fi
+
+#DEBHELPER#
diff --git a/debian/drbd-utils.postrm b/debian/drbd-utils.postrm
new file mode 100644 (file)
index 0000000..eb6413c
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. /usr/share/debconf/confmodule
+
+case $1 in purge|remove|deconfigure)
+       # remove compat symlinks installed by .postinst
+       rm -f /sbin/drbdsetup /sbin/drbdmeta /sbin/drbdadm
+
+       # remove man page links
+       for f in drbd drbdadm drbdmeta drbdsetup; do
+               rm -f /usr/share/man/man8/$f.8.gz
+       done
+       rm -f /usr/share/man/man5/drbd.conf.5.gz
+       db_purge
+       ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/drbd-utils.prerm b/debian/drbd-utils.prerm
new file mode 100644 (file)
index 0000000..3936f7c
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# This script silently ignores the initscript return code if we remove
+# or deconfigure the package or carefully pay attention to it if we
+# upgrade the package.
+
+# Cyril Bouthors <cyril@bouthors.org>
+# Wed Feb 16 21:01:11 CET 2005
+
+set -e
+
+if [ -x "/etc/init.d/drbd" ]
+then
+    case "$1" in
+       remove|deconfigure)
+           invoke-rc.d drbd stop || true
+           ;;
+
+       upgrade|failed-upgrade)
+           invoke-rc.d drbd stop
+           ;;
+
+       *)
+           echo "prerm called with unknown argument \`$1'" >&2
+           exit 0
+           ;;
+    esac
+fi
+
+#DEBHELPER#
diff --git a/debian/drbd-utils.templates b/debian/drbd-utils.templates
new file mode 100644 (file)
index 0000000..c9cab90
--- /dev/null
@@ -0,0 +1,5 @@
+Template: drbd-utils/manpages
+Type: select
+Choices: 8.3, 8.4, 9.0
+Default: 8.4
+Description: Which version of the drbd man pages do you want to use?
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..1cbb8d8
--- /dev/null
@@ -0,0 +1,48 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+PKG_VERSION=$(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2 }')
+
+%:
+       dh $@ --with=systemd
+
+override_dh_auto_clean:
+       dh_auto_clean
+       rm -f debian/drbd-utils.drbd.init
+
+override_dh_auto_configure:
+       ./configure                                     \
+       --prefix=/usr                                   \
+       --localstatedir=/var                            \
+       --sysconfdir=/etc                               \
+       --sbindir=/usr/sbin                             \
+       --without-83support                             \
+       --without-84support                             \
+       --with-distro debian                            \
+       --with-udev                                     \
+       --with-pacemaker                                \
+       --with-bashcompletion                           \
+       --with-systemdunitdir=/lib/systemd/system       \
+       --with-initscripttype=systemd
+
+override_dh_auto_install:
+       dh_auto_install --destdir debian/drbd-utils
+
+override_dh_install:
+       dh_install --fail-missing
+
+       # Place the initscript where dh_installinit can find it
+#      mv $(CURDIR)/debian/drbd-utils/etc/init.d/drbd $(CURDIR)/debian/drbd-utils.drbd.init
+       # Place the systemd service script ...
+#      mv $(CURDIR)/debian/drbd-utils/lib/systemd/system/drbd.service $(CURDIR)/debian
+
+override_dh_installinit:
+       dh_installinit --name=drbd --no-start
+
+override_dh_gencontrol:
+       dh_gencontrol -Ndrbd8-utils
+       # Add the previous epoch to drbd8-utils
+       dh_gencontrol -pdrbd8-utils -- -v2:$(PKG_VERSION)
+
diff --git a/drbd-utils.tgz b/drbd-utils.tgz
new file mode 100644 (file)
index 0000000..39accf4
Binary files /dev/null and b/drbd-utils.tgz differ