diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-05-24 13:29:31 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-05-24 13:29:31 +0400 |
commit | 77bff16c5fef03f34141c669e687ec0fbb1dde6c (patch) | |
tree | 7ab5187def592fba93aa19c3de4b9f8a0e3cb9a5 | |
parent | f0656425c833b1cead11bae34caea06c3fbeba06 (diff) | |
download | pkg-cron-77bff16c5fef03f34141c669e687ec0fbb1dde6c.tar.gz |
Imported Dyson changes
-rw-r--r-- | debian/changelog | 18 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | debian/cron.smf/manifest/system/cron.xml | 42 | ||||
-rw-r--r-- | debian/cron.smf/method/cron | 34 | ||||
-rw-r--r--[-rwxr-xr-x] | debian/examples/cron-stats.pl | 0 | ||||
-rwxr-xr-x | debian/rules | 2 |
6 files changed, 98 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 954b5ce..62aee04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +cron (3.0pl1-124+dyson2) unstable; urgency=low + + * Use dh_smf + + -- Igor Pashev <pashev.igor@gmail.com> Tue, 30 Jul 2013 22:27:53 +0400 + +cron (3.0pl1-124+dyson1) unstable; urgency=low + + * Package for Dyson + * Added -D__GLIBC__ to CFLAGS in debian/rules to avoid a lot of + compatibility functions which are present in illumos libc + * export CFLAGS in debian/rules, so this variable really makes effect + * Added SMF service + * Added illumos specific scripts to manage cron SMF service and thus: + * Pre-Depends: smf-tools (>= 2.10-4) [illumos-any kopensolaris-any] + + -- Igor Pashev <pashev.igor@gmail.com> Sun, 12 May 2013 00:14:19 +0400 + cron (3.0pl1-124) unstable; urgency=medium [ Release targeted to Wheezy including fixes for critical/important bugs ] diff --git a/debian/control b/debian/control index f9180e6..5221823 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Standards-Version: 3.9.3 Build-Depends: debhelper (>= 9), libpam0g-dev, + dh-smf [illumos-any kopensolaris-any], libselinux1-dev [linux-any], libaudit-dev [linux-any] Homepage: http://ftp.isc.org/isc/cron/ @@ -16,7 +17,8 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-cron/pkg-cron.git Package: cron Architecture: any Pre-Depends: - dpkg (>= 1.15.7.2) + dpkg (>= 1.15.7.2), + smf-tools (>= 2.10-4) [illumos-any kopensolaris-any] Depends: ${shlibs:Depends}, ${misc:Depends}, diff --git a/debian/cron.smf/manifest/system/cron.xml b/debian/cron.smf/manifest/system/cron.xml new file mode 100644 index 0000000..33f741d --- /dev/null +++ b/debian/cron.smf/manifest/system/cron.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/xml/schema/smf/service_bundle.dtd.1"> +<service_bundle type="manifest" name="cron"> + <service name="system/cron" type="service" version="1"> + <single_instance/> + <dependency name="usr" type="service" grouping="require_all" restart_on="none"> + <service_fmri value="svc:/system/filesystem/local"/> + </dependency> + <dependency name="ns" type="service" grouping="require_all" restart_on="none"> + <service_fmri value="svc:/milestone/name-services"/> + </dependency> + <dependent name="cron_multi-user" grouping="optional_all" restart_on="none"> + <service_fmri value="svc:/milestone/multi-user"/> + </dependent> + <exec_method type="method" name="start" exec="/lib/svc/method/cron" timeout_seconds="20"> + <method_context> + <method_credential user="root" group="root"/> + </method_context> + </exec_method> + <exec_method type="method" name="stop" exec=":kill" timeout_seconds="20"> + </exec_method> + <property_group name="startd" type="framework"> + <propval name="ignore_error" type="astring" value="core,signal"/> + </property_group> + <property_group name="general" type="framework"> + <propval name="action_authorization" type="astring" value="solaris.smf.manage.cron"/> + </property_group> + <instance name="default" enabled="true"/> + <stability value="Unstable"/> + <template> + <common_name> + <loctext xml:lang="C"> + process scheduling daemon + </loctext> + </common_name> + <documentation> + <manpage title="cron" section="8"/> + <manpage title="crontab" section="1"/> + </documentation> + </template> + </service> +</service_bundle> diff --git a/debian/cron.smf/method/cron b/debian/cron.smf/method/cron new file mode 100644 index 0000000..44de5fb --- /dev/null +++ b/debian/cron.smf/method/cron @@ -0,0 +1,34 @@ +#!/bin/sh + +# This script only starts cron +# For stopping use :kill + +[ -r /etc/default/cron ] && . /etc/default/cron + +# Read the system's locale and set cron's locale. This is only used for +# setting the charset of mails generated by cron. To provide locale +# information to tasks running under cron, see /etc/pam.d/cron. +parse_environment () +{ + ENV_FILE=/etc/default/locale + [ -r "$ENV_FILE" ] || continue + [ -s "$ENV_FILE" ] || continue + + for var in LANG LANGUAGE LC_ALL LC_CTYPE; do + value=`egrep "^${var}=" "$ENV_FILE" | tail -n1 | cut -d= -f2` + [ -n "$value" ] && eval export $var=$value + done + + # Get the timezone set. + if [ -z "$TZ" -a -e /etc/timezone ]; then + TZ=`cat /etc/timezone` + fi +} + +# Parse the system's environment +if [ "$READ_ENV" = "yes" ] ; then + parse_environment +fi + +exec /usr/sbin/cron + diff --git a/debian/examples/cron-stats.pl b/debian/examples/cron-stats.pl index 7b47e95..7b47e95 100755..100644 --- a/debian/examples/cron-stats.pl +++ b/debian/examples/cron-stats.pl diff --git a/debian/rules b/debian/rules index c140b0d..671cd5b 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,7 @@ export CC=$(DEB_HOST_GNU_TYPE)-gcc endif # Standard compiler flags -CFLAGS += -Wall -Wno-unused -Wno-comment +export CFLAGS += -Wall -Wno-unused -Wno-comment -D__GLIBC__ # debug is disabled by default ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |