Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/1] dcron: new package
Date: Tue, 15 Jul 2014 20:56:33 +0200	[thread overview]
Message-ID: <20140715205633.4730fa1e@free-electrons.com> (raw)
In-Reply-To: <1404814892-28531-1-git-send-email-alvaro.gamez@hazent.com>

Dear Alvaro G. M,

On Tue,  8 Jul 2014 12:21:32 +0200, Alvaro G. M wrote:
> Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>

I've applied your patch, but had to make a few changes. Moreover, your
package does not install any init script to start crond. Maybe you
should cook a followup patch that adds an init script, no?

> diff --git a/package/Config.in b/package/Config.in
> index 95c0c8b..3f4384f 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1124,6 +1124,7 @@ menu "System tools"
>  if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
>  	source "package/bootutils/Config.in"
>  	source "package/coreutils/Config.in"
> +	source "package/dcron/Config.in"
>  endif
>  	source "package/cpuload/Config.in"

Alphabetic ordering not respected here.

>  	source "package/dsp-tools/Config.in"
> diff --git a/package/dcron/Config.in b/package/dcron/Config.in
> new file mode 100644
> index 0000000..37182de
> --- /dev/null
> +++ b/package/dcron/Config.in
> @@ -0,0 +1,19 @@
> +config BR2_PACKAGE_DCRON
> +	bool "dcron"

Missing dependency on BR2_USE_MMU, since the package uses the fork()
system call.

> +	help
> +	  dcron is a time-based job scheduler with anacron-like features.
> +	  It works as a background daemon that parses individual crontab
> +	  files and executes commands on behalf of the users in question.
> +
> +	  Upon installation, this package will enable a system level cron
> +	  daemon with hourly, daily, weekly and monthly crontabs.
> +
> +	  However, it doesn't allow non root users to create their own
> +	  crontab file. This is because /var/spool/cron/crontabs is non
> +	  user writable.
> +
> +	  Typically, a crontab group is created on the system and users
> +	  allowed to create crontab entries are added into this group, while
> +	  crontab executable is owned by root:crontab with sgid bit enabled.

Lines too long, I had to rewrap them.

> diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
> new file mode 100644
> index 0000000..20dcf23
> --- /dev/null
> +++ b/package/dcron/dcron.mk
> @@ -0,0 +1,31 @@
> +################################################################################
> +#
> +# dcron
> +#
> +################################################################################
> +
> +DCRON_VERSION = 4.5
> +DCRON_SITE = http://www.jimpryor.net/linux/releases/
> +# The source code does not specify the version of the GPL that is used.
> +DCRON_LICENSE = GPL
> +
> +ifeq ($(BR2_PACKAGE_BUSYBOX),y)

I added a short comment above this to explain why we're doing this.

> +DCRON_DEPENDENCIES = busybox
> +endif
> +
> +define DCRON_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
> +endef
> +
> +define DCRON_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin
> +	$(INSTALL) -D -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin

On both of those lines, it should have been a full path for the targets.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-07-15 18:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 10:21 [Buildroot] [PATCH v3 1/1] dcron: new package Alvaro G. M
2014-07-15 18:56 ` Thomas Petazzoni [this message]
2014-07-15 19:10   ` Alvaro G. M.
2014-07-15 19:17     ` Thomas Petazzoni
2014-07-17  9:34       ` [Buildroot] [PATCH 1/1] dcron: provide init script Alvaro G. M
2014-07-17 16:58         ` Yann E. MORIN
2014-07-17 18:35           ` Thomas Petazzoni
2014-07-17 19:00         ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140715205633.4730fa1e@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox