[pve-devel] [PATCHV4 1/4] Upgrade to Sheepdog Version 1.0.0

Wolfgang Link w.link at proxmox.com
Mon Sep 5 11:58:50 CEST 2016


---
 Makefile                                     |  8 +++---
 debian/changelog                             |  6 ++++
 debian/copyright                             | 10 +++----
 debian/patches/cleanup-systemd-service.patch |  2 +-
 debian/postinst                              | 42 ++++++++++++++++++++++++++++
 debian/postrm                                | 40 ++++++++++++++++++++++++++
 debian/rules                                 |  1 +
 7 files changed, 99 insertions(+), 10 deletions(-)
 create mode 100644 debian/postinst
 create mode 100644 debian/postrm

diff --git a/Makefile b/Makefile
index 4a4a28d..f4eae05 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=4.1
+RELEASE=4.2
 
 PACKAGE=pve-sheepdog
 PKGREL=1
-SDVER=0.9.3
+SDVER=1.0.0
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell cat .git/refs/heads/master)
@@ -26,8 +26,8 @@ ${DEB} deb: ${SDSRC}
 .PHONY: download
 ${SDSRC} download:
 	rm -rf ${SDDIR} sheepdog.git
-	git clone git://github.com/sheepdog/sheepdog.git -b stable-0.9 sheepdog.git
-	cd sheepdog.git; git checkout -b local v${SDVER}
+	git clone git://github.com/sheepdog/sheepdog.git -b v1.0 sheepdog.git --depth 1
+	cd sheepdog.git; git checkout -b local v1.0
 	rsync -a --exclude .git --exclude .gitignore sheepdog.git/ ${SDDIR}
 	tar czf ${SDSRC}.tmp  ${SDDIR}
 	rm -rf ${SDDIR}
diff --git a/debian/changelog b/debian/changelog
index b59e5b9..14c392e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pve-sheepdog (1.0.0-1) unstable; urgency=medium
+
+  * bump to 1.0.0
+
+ -- Proxmox Support Team <support at proxmox.com>  Tue, 04 Jul 2016 12:00:30 +0200
+
 pve-sheepdog (0.9.3-1) unstable; urgency=medium
 
   * bump to 0.9.3
diff --git a/debian/copyright b/debian/copyright
index f8c8ad5..7f7681c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,7 +2,7 @@ This work was packaged for Debian by:
 
     Proxmox Support Team <support at proxmox.com>
 
-    on Mon, 09 Jul 2012 09:32:43 +0200
+    on Mon, 04 Jul 2016 09:32:43 +0200
 
 It was downloaded from:
 
@@ -10,9 +10,9 @@ It was downloaded from:
 
 Upstream Author(s):
 
-    MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
-    FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
-    MORIAI Satoshi <moriai.satoshi at lab.ntt.co.jp>
+    MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
+    FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+    MORIAI Satoshi <moriai.satoshi at lab.ntt.co.jp>
 
 Copyright:
 
@@ -29,6 +29,6 @@ License:
 
 The Debian packaging is:
 
-    Copyright (C) 2012 Proxmox Support Team <support at proxmox.com>
+    Copyright (C) 2016 Proxmox Support Team <support at proxmox.com>
 
 and is licensed under the AGPL version 3
diff --git a/debian/patches/cleanup-systemd-service.patch b/debian/patches/cleanup-systemd-service.patch
index df5524e..8934859 100644
--- a/debian/patches/cleanup-systemd-service.patch
+++ b/debian/patches/cleanup-systemd-service.patch
@@ -9,7 +9,7 @@ Index: new/script/sheepdog.service.in
 -EnvironmentFile=- at SYSCONFDIR@/conf.d/sheepdog.conf
 -EnvironmentFile=- at SYSCONFDIR@/sysconfig/sheepdog
  EnvironmentFile=- at SYSCONFDIR@/default/sheepdog
--ExecStart=/bin/sh -c '@SBINDIR@/sheep --pidfile @LOCALSTATEDIR@/run/sheep.pid $(if [ -z "$SHEEP_OPTS" ]; then echo "--cluster local --log dst=syslog --upgrade @LOCALSTATEDIR@/lib/sheepdog"; else echo $SHEEP_OPTS; fi)'
+-ExecStart=/bin/sh -c 'ulimit -n 32768; @SBINDIR@/sheep --pidfile @LOCALSTATEDIR@/run/sheep.pid $(if [ -z "$SHEEP_OPTS" ]; then echo "--cluster local --log dst=syslog --upgrade @LOCALSTATEDIR@/lib/sheepdog"; else echo $SHEEP_OPTS; fi)'
 +ExecStart=/usr/lib/sheepdog/sheepdog-start-wrapper
  PIDFile=@LOCALSTATEDIR@/run/sheep.pid
  Type=forking
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..a9a64e0
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postinst script for pve-sheepdog
+#
+
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+	ldconfig /usr/lib/
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..473c41a
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,40 @@
+#!/bin/sh
+# postrm script for pve-sheepdog
+#
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove)
+	ldconfig /usr/lib/
+    ;;
+
+    purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
index ebadc9c..35721f8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,7 @@ override_dh_auto_install:
 override_dh_installinit:
 	# just install install pve-sheepdog.sheepdog.default
 	dh_installinit --name sheepdog
+	cd debian/pve-sheepdog/usr/lib/; sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
 
 override_dh_auto_configure:
 	./autogen.sh
-- 
2.1.4




More information about the pve-devel mailing list