[Pkg-erlang-commits] r1660 - in erlang/trunk/debian: . patterns
sgolovan at alioth.debian.org
sgolovan at alioth.debian.org
Thu Aug 14 09:24:50 UTC 2014
Author: sgolovan
Date: 2014-08-14 09:24:50 +0000 (Thu, 14 Aug 2014)
New Revision: 1660
Added:
erlang/trunk/debian/epmd.service
erlang/trunk/debian/epmd.socket
erlang/trunk/debian/erlang-base-hipe.postrm
erlang/trunk/debian/erlang-base.postrm
Modified:
erlang/trunk/debian/changelog
erlang/trunk/debian/control
erlang/trunk/debian/erlang-base-hipe.postinst
erlang/trunk/debian/erlang-base-hipe.prerm
erlang/trunk/debian/erlang-base.postinst
erlang/trunk/debian/erlang-base.prerm
erlang/trunk/debian/patterns/erlang-base-hipe.patterns
erlang/trunk/debian/patterns/erlang-base.patterns
erlang/trunk/debian/rules
Log:
[erlang]
* Enabled systemd support in epmd. The epmd unit is not enabled by default
though.
* Fixed SVN URL in the source package debian/control Vcs field.
Modified: erlang/trunk/debian/changelog
===================================================================
--- erlang/trunk/debian/changelog 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/changelog 2014-08-14 09:24:50 UTC (rev 1660)
@@ -1,8 +1,10 @@
-erlang (1:17.1-dfsg-5) UNRELEASED; urgency=medium
+erlang (1:17.1-dfsg-5) unstable; urgency=medium
- * NOT RELEASED YET
+ * Enabled systemd support in epmd. The epmd unit is not enabled by default
+ though.
+ * Fixed SVN URL in the source package debian/control Vcs field.
- -- Sergei Golovan <sgolovan at debian.org> Mon, 14 Jul 2014 14:11:31 +0400
+ -- Sergei Golovan <sgolovan at debian.org> Thu, 14 Aug 2014 13:24:07 +0400
erlang (1:17.1-dfsg-4) unstable; urgency=medium
Modified: erlang/trunk/debian/control
===================================================================
--- erlang/trunk/debian/control 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/control 2014-08-14 09:24:50 UTC (rev 1660)
@@ -8,12 +8,12 @@
libncurses5-dev, autotools-dev, unixodbc-dev, bison, flex, ed,
libwxgtk3.0-dev, dctrl-tools, xsltproc,
libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev,
- libsctp-dev [linux-any]
+ libsctp-dev [linux-any], libsystemd-daemon-dev [linux-any], dh-systemd
Build-Depends-Indep: fop, default-jdk | sun-java6-jdk
Build-Conflicts: autoconf2.13, libwxgtk2.4-dev, libwxgtk2.6-dev, libwxgtk2.8-dev
Homepage: http://www.erlang.org/
-Vcs-Svn: svn://svn.debian.org/svn/pkg-erlang/erlang/trunk/
-Vcs-Browser: http://svn.debian.org/wsvn/pkg-erlang/erlang/trunk/
+Vcs-Svn: svn://anonscm.debian.org/pkg-erlang/erlang/trunk/
+Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-erlang/erlang/trunk/
Package: erlang-base
Architecture: any
Added: erlang/trunk/debian/epmd.service
===================================================================
--- erlang/trunk/debian/epmd.service (rev 0)
+++ erlang/trunk/debian/epmd.service 2014-08-14 09:24:50 UTC (rev 1660)
@@ -0,0 +1,16 @@
+[Unit]
+Description=Erlang Port Mapper Daemon
+After=network.target
+Requires=epmd.socket
+
+[Service]
+ExecStart=/usr/bin/epmd -systemd
+Type=simple
+StandardOutput=journal
+StandardError=journal
+User=epmd
+Group=epmd
+
+[Install]
+Also=epmd.socket
+WantedBy=multi-user.target
Added: erlang/trunk/debian/epmd.socket
===================================================================
--- erlang/trunk/debian/epmd.socket (rev 0)
+++ erlang/trunk/debian/epmd.socket 2014-08-14 09:24:50 UTC (rev 1660)
@@ -0,0 +1,10 @@
+[Unit]
+Description=Erlang Port Mapper Daemon Activation Socket
+
+[Socket]
+ListenStream=4369
+BindIPv6Only=both
+Accept=false
+
+[Install]
+WantedBy=sockets.target
Modified: erlang/trunk/debian/erlang-base-hipe.postinst
===================================================================
--- erlang/trunk/debian/erlang-base-hipe.postinst 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/erlang-base-hipe.postinst 2014-08-14 09:24:50 UTC (rev 1660)
@@ -26,6 +26,23 @@
;;
configure)
+ # Create epmd user
+ adduser --quiet --system --group epmd
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+ configure)
if [ -z "$2" ] || dpkg --compare-versions "$2" ge-nl "1:10.b.10-3" ; then
echo -n "Searching for services which depend on erlang and should be started..."
# find all init scripts and packages they belong
@@ -70,7 +87,7 @@
if [ -n "$failed" ] ; then
echo "The following services failed to start: $failed."
echo
- echo "You will need to start them manually by running \`/etc/init.d/<service> start'"
+ echo "You will need to start them manually by running \`invoke-rc.d <service> start'"
echo "If the service still fails to start, you may need to file a bug on"
echo "\`erlang' package or the service involved."
else
@@ -79,17 +96,7 @@
fi
fi
;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 0
- ;;
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
exit 0
Added: erlang/trunk/debian/erlang-base-hipe.postrm
===================================================================
--- erlang/trunk/debian/erlang-base-hipe.postrm (rev 0)
+++ erlang/trunk/debian/erlang-base-hipe.postrm 2014-08-14 09:24:50 UTC (rev 1660)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postrm script for erlang-base-hipe
+#
+# see: dh_installdeb(1)
+
+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' <r>overwrit>r> <new-version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ purge)
+ # Remove epmd user
+ userdel --force --remove epmd 2>/dev/null || true
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
Modified: erlang/trunk/debian/erlang-base-hipe.prerm
===================================================================
--- erlang/trunk/debian/erlang-base-hipe.prerm 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/erlang-base-hipe.prerm 2014-08-14 09:24:50 UTC (rev 1660)
@@ -62,7 +62,24 @@
echo "Services stopped successfully."
fi
fi
+ ;;
+ failed-upgrade|deconfigure)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+ remove|upgrade)
echo -n "Killing epmd..."
if which pgrep >/dev/null ; then
pid=$(pgrep epmd | head -1)
@@ -83,20 +100,7 @@
fi
fi
;;
-
- failed-upgrade|deconfigure)
- ;;
-
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 0
- ;;
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
exit 0
Modified: erlang/trunk/debian/erlang-base.postinst
===================================================================
--- erlang/trunk/debian/erlang-base.postinst 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/erlang-base.postinst 2014-08-14 09:24:50 UTC (rev 1660)
@@ -26,6 +26,23 @@
;;
configure)
+ # Create epmd user
+ adduser --quiet --system --group epmd
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+ configure)
if [ -z "$2" ] || dpkg --compare-versions "$2" ge-nl "1:10.b.10-3" ; then
echo -n "Searching for services which depend on erlang and should be started..."
# find all init scripts and packages they belong
@@ -70,7 +87,7 @@
if [ -n "$failed" ] ; then
echo "The following services failed to start: $failed."
echo
- echo "You will need to start them manually by running \`/etc/init.d/<service> start'"
+ echo "You will need to start them manually by running \`invoke-rc.d <service> start'"
echo "If the service still fails to start, you may need to file a bug on"
echo "\`erlang' package or the service involved."
else
@@ -79,17 +96,7 @@
fi
fi
;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 0
- ;;
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
exit 0
Added: erlang/trunk/debian/erlang-base.postrm
===================================================================
--- erlang/trunk/debian/erlang-base.postrm (rev 0)
+++ erlang/trunk/debian/erlang-base.postrm 2014-08-14 09:24:50 UTC (rev 1660)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postrm script for erlang-base
+#
+# see: dh_installdeb(1)
+
+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' <r>overwrit>r> <new-version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ purge)
+ # Remove epmd user
+ userdel --force --remove epmd 2>/dev/null || true
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
Modified: erlang/trunk/debian/erlang-base.prerm
===================================================================
--- erlang/trunk/debian/erlang-base.prerm 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/erlang-base.prerm 2014-08-14 09:24:50 UTC (rev 1660)
@@ -62,7 +62,24 @@
echo "Services stopped successfully."
fi
fi
+ ;;
+ failed-upgrade|deconfigure)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+ remove|upgrade)
echo -n "Killing epmd..."
if which pgrep >/dev/null ; then
pid=$(pgrep epmd | head -1)
@@ -83,20 +100,7 @@
fi
fi
;;
-
- failed-upgrade|deconfigure)
- ;;
-
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 0
- ;;
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
exit 0
Modified: erlang/trunk/debian/patterns/erlang-base-hipe.patterns
===================================================================
--- erlang/trunk/debian/patterns/erlang-base-hipe.patterns 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/patterns/erlang-base-hipe.patterns 2014-08-14 09:24:50 UTC (rev 1660)
@@ -16,3 +16,4 @@
./usr/lib/erlang/lib/sasl-.*/ebin/
./usr/lib/erlang/lib/stdlib-.*/ebin/
./usr/lib/erlang/lib/stdlib-.*/include/
+./lib/systemd/
Modified: erlang/trunk/debian/patterns/erlang-base.patterns
===================================================================
--- erlang/trunk/debian/patterns/erlang-base.patterns 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/patterns/erlang-base.patterns 2014-08-14 09:24:50 UTC (rev 1660)
@@ -16,3 +16,4 @@
./usr/lib/erlang/lib/sasl-.*/ebin/
./usr/lib/erlang/lib/stdlib-.*/ebin/
./usr/lib/erlang/lib/stdlib-.*/include/
+./lib/systemd/
Modified: erlang/trunk/debian/rules
===================================================================
--- erlang/trunk/debian/rules 2014-07-25 17:19:57 UTC (rev 1659)
+++ erlang/trunk/debian/rules 2014-08-14 09:24:50 UTC (rev 1660)
@@ -51,8 +51,10 @@
USE_CLOCK_GETTIME := $(shell echo ${DEB_HOST_ARCH} | egrep -c "bsd|hurd" | sed -es/1/no/ -es/0/yes/)
ifeq ($(USE_CLOCK_GETTIME), no)
CLOCK_GETTIME_OPT=
+SYSTEMD_OPT=
else
CLOCK_GETTIME_OPT=--enable-clock-gettime
+SYSTEMD_OPT=--enable-systemd
endif
# Temporary (until #475459 is fixed) disabling threads for sparc architecture
@@ -188,6 +190,7 @@
$(THREAD_OPTS) \
--enable-hipe \
$(KERNEL_POLL_OPT) \
+ $(SYSTEMD_OPT) \
--enable-sctp \
$(CLOCK_GETTIME_OPT) \
--enable-dynamic-ssl-lib \
@@ -217,6 +220,7 @@
$(THREAD_OPTS) \
--disable-hipe \
$(KERNEL_POLL_OPT) \
+ $(SYSTEMD_OPT) \
--enable-sctp \
$(CLOCK_GETTIME_OPT) \
--enable-dynamic-ssl-lib \
@@ -280,6 +284,13 @@
$(INSTALL_DIR)/usr/lib/erlang/lib/hipe-$(HIPE_VSN)/$${subdir} ; \
fi ; \
done
+
+ # Install systemd units for epmd
+ if [ "$(USE_CLOCK_GETTIME)" = "yes" ] ; then \
+ install -m 755 -d $(INSTALL_DIR)/lib/systemd/system ; \
+ install -m 644 debian/epmd.service $(INSTALL_DIR)/lib/systemd/system ; \
+ install -m 644 debian/epmd.socket $(INSTALL_DIR)/lib/systemd/system ; \
+ fi
endef
# manpages builds section 1 manual pages
@@ -444,6 +455,8 @@
dh_installman -a -Nerlang-base-hipe
dh_installmenu -a -Nerlang-base-hipe
dh_link -a -Nerlang-base-hipe
+ dh_systemd_enable -a -Nerlang-base-hipe --no-enable
+ dh_systemd_start -a -Nerlang-base-hipe --no-start
dh_strip -a -Nerlang-base-hipe --dbg-package=erlang-dbg
dh_compress -a -Nerlang-base-hipe
dh_fixperms -a -Nerlang-base-hipe
@@ -476,6 +489,8 @@
dh_installman -perlang-base-hipe
dh_installmenu -perlang-base-hipe
dh_link -perlang-base-hipe
+ dh_systemd_enable -perlang-base-hipe --no-enable
+ dh_systemd_start -perlang-base-hipe --no-start
dh_strip -perlang-base-hipe
dh_compress -perlang-base-hipe
dh_fixperms -perlang-base-hipe
More information about the Pkg-erlang-commits
mailing list