Subject: [alpine-aports] [PATCH] main/busybox-initscripts: consistent service naming scheme

From: Sören Tempel <[email-masked]>
Date: Fri, 14 Aug 2015 18:39:00 +0200

As noted by shafire on IRC the service naming scheme was inconsistent.
Many service where named after the corresponding binaries. The syslog
and cron services where not. This commit fixes this.
---
 main/busybox-initscripts/APKBUILD      | 32 ++++++++++++++++----------------
 main/busybox-initscripts/cron.confd    |  3 ---
 main/busybox-initscripts/cron.initd    | 11 -----------
 main/busybox-initscripts/crond.confd   |  3 +++
 main/busybox-initscripts/crond.initd   | 11 +++++++++++
 main/busybox-initscripts/syslog.confd  |  1 -
 main/busybox-initscripts/syslog.initd  | 11 -----------
 main/busybox-initscripts/syslogd.confd |  1 +
 main/busybox-initscripts/syslogd.initd | 11 +++++++++++
 9 files changed, 42 insertions(+), 42 deletions(-)
 delete mode 100644 main/busybox-initscripts/cron.confd
 delete mode 100644 main/busybox-initscripts/cron.initd
 create mode 100644 main/busybox-initscripts/crond.confd
 create mode 100644 main/busybox-initscripts/crond.initd
 delete mode 100644 main/busybox-initscripts/syslog.confd
 delete mode 100644 main/busybox-initscripts/syslog.initd
 create mode 100644 main/busybox-initscripts/syslogd.confd
 create mode 100644 main/busybox-initscripts/syslogd.initd

diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD
index d7969e6..b69cac1 100644
--- a/main/busybox-initscripts/APKBUILD
+++ b/main/busybox-initscripts/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=busybox-initscripts
 pkgver=2.3
-pkgrel=0
+pkgrel=1
 pkgdesc="Init scripts for busybox daemons"
 url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
 arch="noarch"
@@ -12,9 +12,9 @@ makedepends=
 install=$pkgname.post-install
 subpackages=
 replaces="alpine-baselayout openntpd"
-source="acpid.initd cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd 
-	mdev.initd ntpd.initd rdate.initd syslog.initd
-	watchdog.initd cron.confd klogd.confd ntpd.confd rdate.confd syslog.confd
+source="acpid.initd crond.initd dnsd.initd httpd.initd inetd.initd klogd.initd
+	mdev.initd ntpd.initd rdate.initd syslogd.initd
+	watchdog.initd crond.confd klogd.confd ntpd.confd rdate.confd syslogd.confd
 	watchdog.confd mdev.conf dvbdev ide_links usbdev usbdisk_link xvd_links
 	default.script
 	"
@@ -52,7 +52,7 @@ EOF
 }
 
 md5sums="f3a3ccbd527e8c359ec285a39a805d47  acpid.initd
-59c39d2ba5c22fc311a19750298a03f2  cron.initd
+59c39d2ba5c22fc311a19750298a03f2  crond.initd
 47f2931fdf09558a5cc0fdb1cde2f814  dnsd.initd
 bdb6830041b77db4a3de3b35ed326d5e  httpd.initd
 12fffa82b698267240acd4bdaa4861da  inetd.initd
@@ -60,13 +60,13 @@ bdb6830041b77db4a3de3b35ed326d5e  httpd.initd
 b86749a0a4167e0a6178a217b264d0f6  mdev.initd
 88ac156aa6cc3999805d526498765d07  ntpd.initd
 e70b6427fb7b52f49801bcdfb99db3a2  rdate.initd
-763ef3ade65e24d89fe980651abfc915  syslog.initd
+763ef3ade65e24d89fe980651abfc915  syslogd.initd
 4894514fb7e4485d6520290c9fa11a30  watchdog.initd
-8ddb8d040c9c7a32c63039a2c80ff496  cron.confd
+8ddb8d040c9c7a32c63039a2c80ff496  crond.confd
 60bc14cc3163d76f41bcc93dc0f9984b  klogd.confd
 779058fe16d8a476c165b6d0928408b3  ntpd.confd
 22adbf155ffc4595206ded6daad07812  rdate.confd
-77fb31a75511247bf4e3430565a276bc  syslog.confd
+77fb31a75511247bf4e3430565a276bc  syslogd.confd
 0bb55dde32f5e119111fa4938daaef3d  watchdog.confd
 8abcd27060ddaee01f1ba973c7582eb2  mdev.conf
 ad1556961294e4aa2abca6be52138b7c  dvbdev
@@ -76,7 +76,7 @@ daf57f3d0372f825ddc05b00973e5afe  usbdev
 826d85313ca7a4a0205d63bd58b7d01f  xvd_links
 e2d8c224cf7a300ea826bfb40e25db54  default.script"
 sha256sums="fdbe60ce1855fb65a8b3a157da454001d7db5b77aa8c5eee19840b0c3dd1ee61  acpid.initd
-d80bc50815de5cb58df53d969ccf682f3c34b62f1815830dc16e8813d7f0423c  cron.initd
+d80bc50815de5cb58df53d969ccf682f3c34b62f1815830dc16e8813d7f0423c  crond.initd
 26b7af7288089e8462db062c0644c8a66855d6bd0eaa7edd2a3a43b3655c7da8  dnsd.initd
 010542f0718fcbc42273068dfc88d3518c919a73576b9ffab4795a6d36ce3f40  httpd.initd
 53ddd392736957d6a36157c190e0428fbb0c3a27925c63df8188f3461e74410d  inetd.initd
@@ -84,13 +84,13 @@ d80bc50815de5cb58df53d969ccf682f3c34b62f1815830dc16e8813d7f0423c  cron.initd
 e08f595cb22ad4aef4d48deabb933067407a4b94be131d078ebd715fd7e380d3  mdev.initd
 4a32eea4da1e9eaf6c5ecfce20a297b55de3a1d479bc0578286d769be0114a7b  ntpd.initd
 0c6eb4dc269386472f475cf9c549ba53b73aa33f044fbfb3b6bc6dd2574bb341  rdate.initd
-36ec4261992bc72ee8b037ee1446b74f8a488e89bd23a112bc3b5b34a2c27377  syslog.initd
+36ec4261992bc72ee8b037ee1446b74f8a488e89bd23a112bc3b5b34a2c27377  syslogd.initd
 03c1a6312598aeea5d10195ff5473ecc8ee89182b8115a8b5ad529259c0ea564  watchdog.initd
-6b466c5b0e9cab7613aa56edf383e891c5c7e26ee00467e9f7913808be23a328  cron.confd
+6b466c5b0e9cab7613aa56edf383e891c5c7e26ee00467e9f7913808be23a328  crond.confd
 f6cd63d6e5f384dcb01a4906c9a0b6c5923794380235dfe0d79b48a686b03c5d  klogd.confd
 4224e5c6b5ffeb815c15f3e9f17ddaa169d4e6b7da169dbd0939fe06dbe8914d  ntpd.confd
 791d49802395861a5f788dc7436c1260ec2cd3bdea0c790952ae1b2dd518e811  rdate.confd
-8a2362d6b5b1ec1d754878726392119f2cc7416c748ee4f2ab134f731d6e6198  syslog.confd
+8a2362d6b5b1ec1d754878726392119f2cc7416c748ee4f2ab134f731d6e6198  syslogd.confd
 77f6f9069afdbb477a7e822aa2c7265d64fd22fdd9338bb3beb0cee901d202ce  watchdog.confd
 9516608efc871fead61a77923771e34288284f9055336872e77bb0202f2b3229  mdev.conf
 ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de  dvbdev
@@ -100,7 +100,7 @@ dcb0c37590019bccb4c31a5372cbf7728eae6f1174d56bf0708d7504243a5fbb  usbdev
 86ed99205050a5dcca8a27c7e8658df8c55dc85ed810db0d64b51f7c63aa140e  xvd_links
 f81b6a0f04cecd131f6372ce27fdb7d2bbb9155ce2cc333c8374dfd70537b901  default.script"
 sha512sums="8663ffab45498f9626c6a023a28be6533a74be2ecaf746e8c1fb7b8092e77d8734da60691be953b0d2298c563398e72c255372d3ca3f601fd0b28f15342bd909  acpid.initd
-1499c3ad3b0d6adb49b7dab8a0d7a4d465f208ac0aedcd72845d80d1ee508a07142483d9c7eb1b4936d6557c5fc6c3b69ca356a84545bf0b71e9f6b51fac04e2  cron.initd
+1499c3ad3b0d6adb49b7dab8a0d7a4d465f208ac0aedcd72845d80d1ee508a07142483d9c7eb1b4936d6557c5fc6c3b69ca356a84545bf0b71e9f6b51fac04e2  crond.initd
 82c70082fa6e00c389982e16b0ef92f8f137941517a2b74de57150f4645d8b8b2a91abaa22d5aede8f7d08e0749ef14a07860cf16f96058b96f4246a6c39222a  dnsd.initd
 66bfd7d2a03f4e8a50f08b7057091bfef8e36001eb7c07574ec45da6d75db05a88ae37dbd51e3e3fc7b00a784bf69f8416682ce0454ca16cc072358abdf4d2ce  httpd.initd
 82fb2ed926e7fbd87f3df7aba556ccb27ddd1fbd79e823acf00aea4ac41c5c5bf58dbf9488dd10b268371b40994a3cca9e305c1177a1628f72b9a1d3ebce0702  inetd.initd
@@ -108,13 +108,13 @@ sha512sums="8663ffab45498f9626c6a023a28be6533a74be2ecaf746e8c1fb7b8092e77d8734da
 1aed59fb048f0636ee8a095a089a20554a20eda84c70485a894ae60b0f97b792b7ce8e832557457258f59a2750735c4a25e247364ccf1180e9652b292a5f9e8d  mdev.initd
 c30d3936e045c01fdc9d1e9d1c0d2cd79b6dabb453400f067bc4eefa239a41c98bbe3fcd3ae53792e0e6d8fcf4aebc727e4524ec3ccd5741d5659a0a351c1c7e  ntpd.initd
 a95d03564712803fc58c48534f2fbbf23dd8418ffd3a6a06f840e969627892eea518b4fe17f059850665fc056cedf972c26aee52c309805987fb5c59a710bd30  rdate.initd
-683fe4180dbbca2fbcf56680b0434f0783db000fda9298f48b9ec268ad20b0cf21813cfb19eaad2c52f7a7f7246e9f88e0f06dbd8d14360f5406c87bd8665b04  syslog.initd
+683fe4180dbbca2fbcf56680b0434f0783db000fda9298f48b9ec268ad20b0cf21813cfb19eaad2c52f7a7f7246e9f88e0f06dbd8d14360f5406c87bd8665b04  syslogd.initd
 0a4f989068f00dd8599433ea1fe0713c405ed871750b918e32db2d6bccefc8b870ea2e16864d1b7c3dd57d63e04b41aa0bf9c882c1a9e8108def141d12072e90  watchdog.initd
-49c4299eca93517f09c6af71dd6bf737fec4006dfbf72b696fc3ec3e39d61fdd63107cae1bd883b2539848d52e6f6b1ed494d0c871e92e50fc55669295f3585e  cron.confd
+49c4299eca93517f09c6af71dd6bf737fec4006dfbf72b696fc3ec3e39d61fdd63107cae1bd883b2539848d52e6f6b1ed494d0c871e92e50fc55669295f3585e  crond.confd
 f9bf43b72142bbb4c0665c1268a3d91586ef8a057dfe64c53b6923815d2db1f669b8080a38311ad89cda0b783a8628700fc5414d834a21d8e48515760bb910f7  klogd.confd
 b0ba67585f39d83320ed6de183d7463a0e163807b9f3dc6f0baa212236056f22aeb2c5399dfdcd54929eb5ae06a15714c2fed133b5888869ed9d9cf589cef843  ntpd.confd
 3d6c4d358e226e0c0462f2003bcf0b6787f91a53f4d6b6db5bfe7748bb0dd392d7cc454058ea8a9b649e8dd2629963a5ad1257c36af04367caeb1923f954daf7  rdate.confd
-330c6e6808dfdf05c75dcdec1048f17052f79b285e11513a64a97bf28fb60e023840966abe03a74fa146eb6b842c4e0e78df82918528e0b6e8f546f7f0a4e323  syslog.confd
+330c6e6808dfdf05c75dcdec1048f17052f79b285e11513a64a97bf28fb60e023840966abe03a74fa146eb6b842c4e0e78df82918528e0b6e8f546f7f0a4e323  syslogd.confd
 359af0a4a1841dd6557eaf3e71d39f0d7a2687bad6a8fc6ef436eccf72a40f85c6400a3b7880c7f64d8e460b6af8a0ff3dd5ffc3a4b1aa8eb0d8f7eaf99ee3e4  watchdog.confd
 82cd51655f056abb59ef33e9ad5819c22c729911995f7b27960c989a9be1fe8ef8ab36d356cb26da70ecdd881b3c201f6d6f7e191f8539b9365c7fe854413a81  mdev.conf
 ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d4e8f4294545d3a9ab6708ae2e77c5b108b5f091bbce8f94a  dvbdev
diff --git a/main/busybox-initscripts/cron.confd b/main/busybox-initscripts/cron.confd
deleted file mode 100644
index 2f2eb7b..0000000
--- a/main/busybox-initscripts/cron.confd
+++ /dev/null
@@ -1,3 +0,0 @@
-# enter the cron options
-CRON_OPTS="-c /etc/crontabs"
-
diff --git a/main/busybox-initscripts/cron.initd b/main/busybox-initscripts/cron.initd
deleted file mode 100644
index 5afb168..0000000
--- a/main/busybox-initscripts/cron.initd
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/sbin/openrc-run
-
-name="busybox cron"
-command="/usr/sbin/crond"
-pidfile="/var/run/crond.pid"
-command_args="$CRON_OPTS"
-
-depend() {
-	need localmount
-	need logger
-}
diff --git a/main/busybox-initscripts/crond.confd b/main/busybox-initscripts/crond.confd
new file mode 100644
index 0000000..2f2eb7b
--- /dev/null
+++ b/main/busybox-initscripts/crond.confd
@@ -0,0 +1,3 @@
+# enter the cron options
+CRON_OPTS="-c /etc/crontabs"
+
diff --git a/main/busybox-initscripts/crond.initd b/main/busybox-initscripts/crond.initd
new file mode 100644
index 0000000..5afb168
--- /dev/null
+++ b/main/busybox-initscripts/crond.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+
+name="busybox cron"
+command="/usr/sbin/crond"
+pidfile="/var/run/crond.pid"
+command_args="$CRON_OPTS"
+
+depend() {
+	need localmount
+	need logger
+}
diff --git a/main/busybox-initscripts/syslog.confd b/main/busybox-initscripts/syslog.confd
deleted file mode 100644
index 5f23b81..0000000
--- a/main/busybox-initscripts/syslog.confd
+++ /dev/null
@@ -1 +0,0 @@
-SYSLOGD_OPTS=""
diff --git a/main/busybox-initscripts/syslog.initd b/main/busybox-initscripts/syslog.initd
deleted file mode 100644
index f4590e3..0000000
--- a/main/busybox-initscripts/syslog.initd
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/sbin/openrc-run
-
-name="busybox syslog"
-command="/sbin/syslogd"
-command_args="${SYSLOGD_OPTS}"
-pidfile="/var/run/syslogd.pid"
-
-depend() {
-	need clock hostname klogd localmount
-	provide logger
-}
diff --git a/main/busybox-initscripts/syslogd.confd b/main/busybox-initscripts/syslogd.confd
new file mode 100644
index 0000000..5f23b81
--- /dev/null
+++ b/main/busybox-initscripts/syslogd.confd
@@ -0,0 +1 @@
+SYSLOGD_OPTS=""
diff --git a/main/busybox-initscripts/syslogd.initd b/main/busybox-initscripts/syslogd.initd
new file mode 100644
index 0000000..f4590e3
--- /dev/null
+++ b/main/busybox-initscripts/syslogd.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+
+name="busybox syslog"
+command="/sbin/syslogd"
+command_args="${SYSLOGD_OPTS}"
+pidfile="/var/run/syslogd.pid"
+
+depend() {
+	need clock hostname klogd localmount
+	provide logger
+}
-- 
2.5.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 17 Aug 2015 11:32:58 +0200

On Fri, 14 Aug 2015 18:39:00 +0200

> and cron services where not. This commit fixes this.

While i think consistency is a good thing, I think in the syslog/cron
case, this change will cause more damage than benefit.

There are various install scripts that will try start or enable cron or
syslog. For example setup-disk, setup-alpine and lxc template
lxc-alpine. There are probably more scripts out there that we dont have
control over (puppet, chef scripts? docker scripts?)

So if we do think that this is so important that we want turn the world
upside down for this, then we need support both names for a while. We
need to have both cron and crond, where cron is a dummy service that
will only pull in the crond as dependency and add a deprecation warning
"This service is deprecated. please use crond instead" or similar. Same
with syslogd.

We also need to check that there are no other package providing a
'crond' or 'syslogd' file that will cause conflict.

After that we will have to make setup-disk to check whether it should
use 'syslogd' or 'syslog', setup-alpine needs to check if it should use
'cron' or 'crond' and upstream lxc's lxc-alpine needs to check the
same. They all need support both variants of cron/crond and
syslog/syslogd for a migration period.

We will also be prepared to spend time on the extra support this will
generate.

I don't it is worth it in this case.

-nc

---