]> git.proxmox.com Git - ksm-control-daemon.git/commitdiff
updates for PVE 4.0 (Debian Jessie)
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 11 Jun 2015 07:26:03 +0000 (09:26 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 11 Jun 2015 07:26:03 +0000 (09:26 +0200)
use systemd

Makefile
debian/changelog
debian/compat
debian/control
debian/ksmtuned.service [new file with mode: 0644]
debian/postinst
debian/postrm
debian/rules

index 7574e1c48222bce98860846fd6371b9648b8d81a..dfa81d75ab246ea8e1a849f382ed70e5bd0f8176 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
-RELEASE=3.0
+RELEASE=4.0
 
 PACKAGE=ksm-control-daemon
 
 # also update debian/changelog
 
 PACKAGE=ksm-control-daemon
 
 # also update debian/changelog
-PKGVER=1.1
+PKGVER=1.2
 PKGREL=1
 
 KSM_DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
 PKGREL=1
 
 KSM_DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
index cfabf123d42af51c4584a6ca31716b8691fa8061..12dfa6da2016165ee1fd3e4b966d5f9c1a3b3436 100644 (file)
@@ -1,3 +1,11 @@
+ksm-control-daemon (1.2-1) unstable; urgency=medium
+
+  * updates for PVE 4.0
+  
+  * use systemd
+  
+ -- Proxmox Support Team <support@proxmox.com>  Thu, 11 Jun 2015 09:22:04 +0200
+
 ksm-control-daemon (1.1-1) unstable; urgency=low
 
   * first version for PVE 2.0
 ksm-control-daemon (1.1-1) unstable; urgency=low
 
   * first version for PVE 2.0
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..7f8f011eb73d6043d2e6db9d2c101195ae2801f2 100644 (file)
@@ -1 +1 @@
-5
+7
index 597c574a4a079c42d240b6266e56041169b7f030..ebc976008f7693f060a5446a75475d80c78f9582 100644 (file)
@@ -2,13 +2,13 @@ Source: ksm-control-daemon
 Section: admin
 Priority: optional
 Maintainer: Proxmox Support Team <support@proxmox.com>
 Section: admin
 Priority: optional
 Maintainer: Proxmox Support Team <support@proxmox.com>
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 7), quilt, dh-systemd (>= 1.4)
 Standards-Version: 3.7.3
 Homepage: http://pve.proxmox.com
 
 Package: ksm-control-daemon
 Architecture: all
 Standards-Version: 3.7.3
 Homepage: http://pve.proxmox.com
 
 Package: ksm-control-daemon
 Architecture: all
-Depends: bash (>= 3.2)
-Description: The KSM tuning daemon
+Depends: bash (>= 3.2), systemd
+Description: Kernel Samepage Merging (KSM) Tuning Daemon
  This package contains the KSM tuning daemon which controls whether
  ksm should ksm search duplicated pages.
  This package contains the KSM tuning daemon which controls whether
  ksm should ksm search duplicated pages.
diff --git a/debian/ksmtuned.service b/debian/ksmtuned.service
new file mode 100644 (file)
index 0000000..ffdaee1
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Kernel Samepage Merging (KSM) Tuning Daemon
+
+[Service]
+ExecStart=/usr/sbin/ksmtuned
+ExecReload=/bin/kill -USR1 $MAINPID
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
index bd1e873333d02ca0a6b561113df9fbcbeeb82992..4ef91c322bf4f66809f6e515c5543683ae1de20c 100644 (file)
@@ -13,68 +13,22 @@ set -e
 
 
 case "$1" in
 
 
 case "$1" in
-  configure)
-    # Configure this package.  If the package must prompt the user for
-    # information, do it here.
-
-    # There are three sub-cases:
-    if test "${2+set}" != set; then
-      # We're being installed by an ancient dpkg which doesn't remember
-      # which version was most recently configured, or even whether
-      # there is a most recently configured version.
-      :
-
-    elif test -z "$2" -o "$2" = "<unknown>"; then
-      # The package has not ever been configured on this system, or was
-      # purged since it was last configured.
-      :
-
-    else
-      # Version $2 is the most recently configured version of this
-      # package.
-      :
-
-    fi ;;
-  abort-upgrade)
-    # Back out of an attempt to upgrade this package FROM THIS VERSION
-    # to version $2.  Undo the effects of "prerm upgrade $2".
-    :
-
+    configure)
     ;;
     ;;
-  abort-remove)
-    if test "$2" != in-favour; then
-      echo "$0: undocumented call to \`postinst $*'" 1>&2
-      exit 0
-    fi
-    # Back out of an attempt to remove this package, which was due to
-    # a conflict with package $3 (version $4).  Undo the effects of
-    # "prerm remove in-favour $3 $4".
-    :
 
 
+    abort-upgrade|abort-remove|abort-deconfigure)
     ;;
     ;;
-  abort-deconfigure)
-    if test "$2" != in-favour -o "$5" != removing; then
-      echo "$0: undocumented call to \`postinst $*'" 1>&2
-      exit 0
-    fi
-    # Back out of an attempt to deconfigure this package, which was
-    # due to package $6 (version $7) which we depend on being removed
-    # to make way for package $3 (version $4).  Undo the effects of
-    # "prerm deconfigure in-favour $3 $4 removing $6 $7".
-    :
+    
+    *)
+       echo "$0: didn't understand being called with \`$1'" 1>&2
+       exit 1
 
     ;;
 
     ;;
-  *) echo "$0: didn't understand being called with \`$1'" 1>&2
-     exit 0;;
 esac
 
 esac
 
-if [ -x "/etc/init.d/ksmtuned" ]; then
-    update-rc.d ksmtuned defaults 21 >/dev/null 2>&1
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-       invoke-rc.d ksmtuned start || exit $?
-    else
-       /etc/init.d/ksmtuned start || exit $?
-    fi
-fi
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
 
 exit 0
 
 exit 0
index f44f7b29e4c8872a30dec8bfbf8ceaea5c297371..aa8f7a60a04d919f9f6efd8d1ce6f122a141dd1b 100644 (file)
@@ -1,8 +1,26 @@
-#! /bin/sh
+#!/bin/sh
+#
+# see: dh_installdeb(1)
 
 
-# Abort if any command returns an error value
 set -e
 
 set -e
 
-if [ "$1" = purge ]; then
-    update-rc.d ksmtuned remove >/dev/null 2>&1
-fi
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    purge)
+    ;;
+
+    remove|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#
index 829a3bb86174a3e6fb7fd1da32fa539bad76a86d..e9c0ac4e90fb86dd4a617344c47bf7b1d8929de6 100755 (executable)
@@ -1,97 +1,26 @@
 #!/usr/bin/make -f
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
 
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
 
 
-ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
-include /usr/share/quilt/quilt.make
-endif
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
 
 
-destdir := $(CURDIR)/debian/ksm-control-daemon
-
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       # Add here commands to configure the package.
-
-       touch configure-stamp
-
-
-build: patch build-stamp
-
-build-stamp: configure-stamp  
-       dh_testdir
-
-       # Add here commands to compile the package.
-       # nothing to do
+%:
+       dh $@  --with quilt,systemd
 
 
-       touch $@
 
 
-clean: unpatch
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
-
-       # Add here commands to clean up after the build process.
-       # nothing to do
-
-       dh_clean 
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
+destdir := $(CURDIR)/debian/ksm-control-daemon
 
 
+override_dh_auto_install:
        # Add here commands to install the package into debian/ksm-control-scripts.
        #$(MAKE) DESTDIR=$(CURDIR)/debian/ksm-control-scripts install
 
        # Add here commands to install the package into debian/ksm-control-scripts.
        #$(MAKE) DESTDIR=$(CURDIR)/debian/ksm-control-scripts install
 
-       install -D -m 0755 $(CURDIR)/ksmtuned.init $(destdir)/etc/init.d/ksmtuned
+       #install -D -m 0755 $(CURDIR)/ksmtuned.init $(destdir)/etc/init.d/ksmtuned
        install -D -m 0755 $(CURDIR)/ksmtuned $(destdir)/usr/sbin/ksmtuned
        install -D -m 0644 $(CURDIR)/debian/defaults $(destdir)/etc/default/ksmtuned
        install -D -m 0644 $(CURDIR)/ksmtuned.conf $(destdir)/etc/ksmtuned.conf
 
        install -D -m 0755 $(CURDIR)/ksmtuned $(destdir)/usr/sbin/ksmtuned
        install -D -m 0644 $(CURDIR)/debian/defaults $(destdir)/etc/default/ksmtuned
        install -D -m 0644 $(CURDIR)/ksmtuned.conf $(destdir)/etc/ksmtuned.conf
 
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs 
-       dh_installdocs
-       dh_installexamples
-#      dh_install
-#      dh_installmenu
-#      dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_python
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
-       dh_installman
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-#      dh_perl
-#      dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+override_dh_systemd_enable:
+       dh_systemd_enable --name ksmtuned