Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/dcron: create /var/spool/cron/cronstamps in installation
@ 2019-07-20 18:39 unixmania at gmail.com
  2019-07-20 20:58 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: unixmania at gmail.com @ 2019-07-20 18:39 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <unixmania@gmail.com>

The directory is required by dcron at run-time.

On systems with busybox and sysvinit startup /var/spool is a symlink to
/tmp (see package/skeleton-init-sysv/skeleton/) so the directories will
vanish after mounting /tmp, which by default is a tmpfs. In order to
really solve the problem we must also change skeleton-init-sysv to make
/var/spool persistent across rebuilds.

Fixes: https://bugs.busybox.net/show_bug.cgi?id=12011 (partially)

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
 package/dcron/dcron.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
index 2ee0709af5..4a3994cd1a 100644
--- a/package/dcron/dcron.mk
+++ b/package/dcron/dcron.mk
@@ -20,6 +20,7 @@ define DCRON_INSTALL_TARGET_CMDS
 	# Busybox provides run-parts, so there is no need to use nor install provided run-cron
 	$(SED) 's#/usr/sbin/run-cron#/bin/run-parts#g' $(TARGET_DIR)/etc/cron.d/system
 	$(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
+		$(TARGET_DIR)/var/spool/cron/cronstamps \
 		$(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \
 		$(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly
 endef
-- 
2.18.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] package/dcron: create /var/spool/cron/cronstamps in installation
  2019-07-20 18:39 [Buildroot] [PATCH] package/dcron: create /var/spool/cron/cronstamps in installation unixmania at gmail.com
@ 2019-07-20 20:58 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2019-07-20 20:58 UTC (permalink / raw)
  To: buildroot

Carlos, All,

On 2019-07-20 15:39 -0300, unixmania at gmail.com spake thusly:
> From: Carlos Santos <unixmania@gmail.com>
> 
> The directory is required by dcron at run-time.
> 
> On systems with busybox and sysvinit startup /var/spool is a symlink to
> /tmp (see package/skeleton-init-sysv/skeleton/) so the directories will
> vanish after mounting /tmp, which by default is a tmpfs. In order to
> really solve the problem we must also change skeleton-init-sysv to make
> /var/spool persistent across rebuilds.

How do you make that happen for read-only filesystems, like squashfs?

Getting a presistent storage, and customisations of the directory layout
to use those persistent locations, can not be done in a generic way. It
can only be handled locally, as each one will need to adapt to their own
constraints.

> Fixes: https://bugs.busybox.net/show_bug.cgi?id=12011 (partially)
> 
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
>  package/dcron/dcron.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
> index 2ee0709af5..4a3994cd1a 100644
> --- a/package/dcron/dcron.mk
> +++ b/package/dcron/dcron.mk
> @@ -20,6 +20,7 @@ define DCRON_INSTALL_TARGET_CMDS
>  	# Busybox provides run-parts, so there is no need to use nor install provided run-cron
>  	$(SED) 's#/usr/sbin/run-cron#/bin/run-parts#g' $(TARGET_DIR)/etc/cron.d/system
>  	$(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
> +		$(TARGET_DIR)/var/spool/cron/cronstamps \

If this directory is required at runtime, then it should be created by
the startup script, systemd unit, or any other startup mechanism.

Regards,
Yann E. MORIN.

>  		$(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \
>  		$(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly
>  endef
> -- 
> 2.18.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-20 20:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-20 18:39 [Buildroot] [PATCH] package/dcron: create /var/spool/cron/cronstamps in installation unixmania at gmail.com
2019-07-20 20:58 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox