-RELEASE=3.0
+RELEASE=4.0
PACKAGE=ksm-control-daemon
# also update debian/changelog
-PKGVER=1.1
+PKGVER=1.2
PKGREL=1
KSM_DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
+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
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
-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.
--- /dev/null
+[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
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
-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
-#! /bin/sh
+#!/bin/sh
+#
+# see: dh_installdeb(1)
-# Abort if any command returns an error value
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#
#!/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
- 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
-
-# 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