All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] dcron: new package
@ 2014-03-28 10:28 Alvaro G. M
  2014-03-28 11:25 ` Alvaro Gamez
  0 siblings, 1 reply; 5+ messages in thread
From: Alvaro G. M @ 2014-03-28 10:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
---
 package/Config.in       |  1 +
 package/dcron/Config.in |  8 ++++++++
 package/dcron/dcron.mk  | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/dcron/Config.in
 create mode 100644 package/dcron/dcron.mk

diff --git a/package/Config.in b/package/Config.in
index ad75d9b..e301d9a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1067,6 +1067,7 @@ source "package/bootutils/Config.in"
 source "package/coreutils/Config.in"
 endif
 source "package/cpuload/Config.in"
+source "package/dcron/Config.in"
 source "package/dsp-tools/Config.in"
 source "package/htop/Config.in"
 source "package/keyutils/Config.in"
diff --git a/package/dcron/Config.in b/package/dcron/Config.in
new file mode 100644
index 0000000..70dadcd
--- /dev/null
+++ b/package/dcron/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_DCRON
+	bool "dcron"
+	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.
+
+	  http://www.jimpryor.net/linux/dcron.html
diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
new file mode 100644
index 0000000..cfff875
--- /dev/null
+++ b/package/dcron/dcron.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# dcron
+#
+################################################################################
+
+DCRON_VERSION = 4.5
+DCRON_SITE = http://www.jimpryor.net/linux/releases/
+DCRON_LICENSE = GPLv2
+
+DCRON_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)"
+
+define DCRON_PERMISSIONS
+/usr/sbin/crond			 f 4755	0 0 - - - - -
+/usr/bin/crontab		 f 755  0 0 - - - - -
+/etc/cron.d/system		 f 755  0 0 - - - - -
+endef
+
+define DCRON_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) $(DCRON_MAKE_OPT)
+endef
+
+define DCRON_INSTALL_TARGET_CMDS
+	$(INSTALL) -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond
+	$(INSTALL) -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab
+	$(INSTALL) -D -m0644 $(@D)/extra/root.crontab $(TARGET_DIR)/etc/cron.d/system
+	$(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
+	        $(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \
+	        $(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly
+endef
+
+define DCRON_CLEAN_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 1/1] dcron: new package
  2014-03-28 10:28 [Buildroot] [PATCH 1/1] dcron: new package Alvaro G. M
@ 2014-03-28 11:25 ` Alvaro Gamez
  0 siblings, 0 replies; 5+ messages in thread
From: Alvaro Gamez @ 2014-03-28 11:25 UTC (permalink / raw)
  To: buildroot

Oops, I am sorry. I resent this patch by mistake, I forgot I had sent it
before. Didn't mean to clutter the list since this is already in patchwork.
Sorry again.

Regards


2014-03-28 11:28 GMT+01:00 Alvaro G. M <alvaro.gamez@hazent.com>:

> Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
> ---
>  package/Config.in       |  1 +
>  package/dcron/Config.in |  8 ++++++++
>  package/dcron/dcron.mk  | 36 ++++++++++++++++++++++++++++++++++++
>  3 files changed, 45 insertions(+)
>  create mode 100644 package/dcron/Config.in
>  create mode 100644 package/dcron/dcron.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index ad75d9b..e301d9a 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1067,6 +1067,7 @@ source "package/bootutils/Config.in"
>  source "package/coreutils/Config.in"
>  endif
>  source "package/cpuload/Config.in"
> +source "package/dcron/Config.in"
>  source "package/dsp-tools/Config.in"
>  source "package/htop/Config.in"
>  source "package/keyutils/Config.in"
> diff --git a/package/dcron/Config.in b/package/dcron/Config.in
> new file mode 100644
> index 0000000..70dadcd
> --- /dev/null
> +++ b/package/dcron/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_DCRON
> +       bool "dcron"
> +       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.
> +
> +         http://www.jimpryor.net/linux/dcron.html
> diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
> new file mode 100644
> index 0000000..cfff875
> --- /dev/null
> +++ b/package/dcron/dcron.mk
> @@ -0,0 +1,36 @@
>
> +################################################################################
> +#
> +# dcron
> +#
>
> +################################################################################
> +
> +DCRON_VERSION = 4.5
> +DCRON_SITE = http://www.jimpryor.net/linux/releases/
> +DCRON_LICENSE = GPLv2
> +
> +DCRON_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)"
> +
> +define DCRON_PERMISSIONS
> +/usr/sbin/crond                         f 4755 0 0 - - - - -
> +/usr/bin/crontab                f 755  0 0 - - - - -
> +/etc/cron.d/system              f 755  0 0 - - - - -
> +endef
> +
> +define DCRON_BUILD_CMDS
> +       $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D)
> $(DCRON_MAKE_OPT)
> +endef
> +
> +define DCRON_INSTALL_TARGET_CMDS
> +       $(INSTALL) -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond
> +       $(INSTALL) -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab
> +       $(INSTALL) -D -m0644 $(@D)/extra/root.crontab
> $(TARGET_DIR)/etc/cron.d/system
> +       $(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
> +               $(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly
> \
> +               $(TARGET_DIR)/etc/cron.monthly
> $(TARGET_DIR)/etc/cron.weekly
> +endef
> +
> +define DCRON_CLEAN_CMDS
> +       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
> +endef
> +
> +$(eval $(generic-package))
> --
> 1.9.1
>
>


-- 
?lvaro G?mez Machado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140328/af291f09/attachment.html>

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

* [Buildroot] [PATCH 1/1] dcron: new package
  2014-04-18 21:42 ` Thomas Petazzoni
@ 2014-04-18 22:14   ` Alvaro Gamez
  0 siblings, 0 replies; 5+ messages in thread
From: Alvaro Gamez @ 2014-04-18 22:14 UTC (permalink / raw)
  To: buildroot

Hi, Thomas


2014-04-18 23:42 GMT+02:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:

> Have you checked that dcron really has no dependencies on toolchain
> features? Could you test building it with the following toolchain
> configurations:
>
>
> http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-arm-basic.config
>
> http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-arm-full-nothread.config
>
> http://autobuild.buildroot.org/toolchains/configs/free-electrons/bfin-uclinux.config
>

Will test this next week, I hope and make changes as needed. I will try not
to forget to do this whenever I submit a new package.


>  > +DCRON_LICENSE = GPLv2
>
> How do you know it's GPLv2 ? Unfortunately the source code isn't very
> specific about the version of the GPL license being used. The only
> information I've found is:
>
> May be distributed under the GNU General Public License
>

You're right. I think it was just an asumption on my part. It may be as
well GPLv1 licensed, since original releases were coded in 1994 or maybe
before. Truth is, the abscense of version number could be due to the fact
that it was written before there was any version to reference.


> > +
> > +DCRON_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)"
>
> You should instead use $(TARGET_CONFIGURE_OPTS), which already has all
> these definitions.
>

Will do, so I can omit simply this line.


>  > +
> > +define DCRON_PERMISSIONS
> > +/usr/sbin/crond                       f 4755 0 0 - - - - -
>
> Is it really needed to install this daemon suid-root? I don't think we
> install other daemons suid-root.
>

Nope, you're right. I don't recall why I set this. I think I extracted it
from upstream Makefile, but it's not really needed.



> > +endef
> > +
> > +define DCRON_BUILD_CMDS
> > +     $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D)
> $(DCRON_MAKE_OPT)
>
> Is DESTDIR= really needed during the build step?
>

I think it is, but I'll check it too.


> Also, use TARGET_CONFIGURE_OPTS instead of DCRON_MAKE_OPT.
>
> > +endef
> > +
> > +define DCRON_INSTALL_TARGET_CMDS
> > +     $(INSTALL) -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond
>
> Use -D
>
> > +     $(INSTALL) -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab
>
> Ditto. And why 4755 instead of 755 ?
>

Ok, this is tricky. The typical use here is really not 4755 but 2755, and
crontab should be owned by 'crontab' group, so only users belonging to this
group are able to create crontab files. We can either do this, checking all
permissions and ownerships support this, or we could just ignore this
option and let all users of the system create and edit crontab files.



> > +     $(INSTALL) -D -m0644 $(@D)/extra/root.crontab
> $(TARGET_DIR)/etc/cron.d/system
> > +     $(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
> > +             $(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly
> \
> > +             $(TARGET_DIR)/etc/cron.monthly
> $(TARGET_DIR)/etc/cron.weekly
> > +endef
> > +
> > +define DCRON_CLEAN_CMDS
> > +     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
> > +endef
>
> <pkg>_CLEAN_CMDS no longer exist, so this part should be removed.
>
> Could you take these comments into account and submit an updated
> version?
>

I'll finish testing all these next week I hope and resubmit the patch. I'm
sorry this patch arrived in such poor state. I think I even wrote it before
CLEAN_CMDS was deprecated, so that could explain some mistakes, as well as
the fact that I forgot about this and I mistakenly sent it twice because I
kept forgetting about it... definitely not my best!


> Thanks a lot!
>

Thank you for your comments and guiding!


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



-- 
?lvaro G?mez Machado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140419/667af7b9/attachment.html>

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

* [Buildroot] [PATCH 1/1] dcron: new package
  2014-03-12  8:44 Alvaro G. M
@ 2014-04-18 21:42 ` Thomas Petazzoni
  2014-04-18 22:14   ` Alvaro Gamez
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-04-18 21:42 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for your contribution. I have a few comments below.

On Wed, 12 Mar 2014 09:44:53 +0100, Alvaro G. M wrote:

> diff --git a/package/dcron/Config.in b/package/dcron/Config.in
> new file mode 100644
> index 0000000..70dadcd
> --- /dev/null
> +++ b/package/dcron/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_DCRON
> +	bool "dcron"

Have you checked that dcron really has no dependencies on toolchain
features? Could you test building it with the following toolchain
configurations:

 http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-arm-basic.config
 http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-arm-full-nothread.config
 http://autobuild.buildroot.org/toolchains/configs/free-electrons/bfin-uclinux.config


> diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
> new file mode 100644
> index 0000000..cfff875
> --- /dev/null
> +++ b/package/dcron/dcron.mk
> @@ -0,0 +1,36 @@
> +################################################################################
> +#
> +# dcron
> +#
> +################################################################################
> +
> +DCRON_VERSION = 4.5
> +DCRON_SITE = http://www.jimpryor.net/linux/releases/
> +DCRON_LICENSE = GPLv2

How do you know it's GPLv2 ? Unfortunately the source code isn't very
specific about the version of the GPL license being used. The only
information I've found is:

May be distributed under the GNU General Public License

> +
> +DCRON_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)"

You should instead use $(TARGET_CONFIGURE_OPTS), which already has all
these definitions.

> +
> +define DCRON_PERMISSIONS
> +/usr/sbin/crond			 f 4755	0 0 - - - - -

Is it really needed to install this daemon suid-root? I don't think we
install other daemons suid-root.

> +/usr/bin/crontab		 f 755  0 0 - - - - -
> +/etc/cron.d/system		 f 755  0 0 - - - - -

These are not needed, as these permissions are normal ones, that
can simply be defined by installation commands (below).

> +endef
> +
> +define DCRON_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) $(DCRON_MAKE_OPT)

Is DESTDIR= really needed during the build step?

Also, use TARGET_CONFIGURE_OPTS instead of DCRON_MAKE_OPT.

> +endef
> +
> +define DCRON_INSTALL_TARGET_CMDS
> +	$(INSTALL) -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond

Use -D

> +	$(INSTALL) -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab

Ditto. And why 4755 instead of 755 ?

> +	$(INSTALL) -D -m0644 $(@D)/extra/root.crontab $(TARGET_DIR)/etc/cron.d/system
> +	$(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
> +	        $(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \
> +	        $(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly
> +endef
> +
> +define DCRON_CLEAN_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
> +endef

<pkg>_CLEAN_CMDS no longer exist, so this part should be removed.

Could you take these comments into account and submit an updated
version?

Thanks a lot!

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

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

* [Buildroot] [PATCH 1/1] dcron: new package
@ 2014-03-12  8:44 Alvaro G. M
  2014-04-18 21:42 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Alvaro G. M @ 2014-03-12  8:44 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
---
 package/Config.in       |  1 +
 package/dcron/Config.in |  8 ++++++++
 package/dcron/dcron.mk  | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/dcron/Config.in
 create mode 100644 package/dcron/dcron.mk

diff --git a/package/Config.in b/package/Config.in
index c0a3f20..d9c5a77 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1053,6 +1058,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/coreutils/Config.in"
 endif
 source "package/cpuload/Config.in"
+source "package/dcron/Config.in"
 source "package/dsp-tools/Config.in"
 source "package/htop/Config.in"
 source "package/keyutils/Config.in"
diff --git a/package/dcron/Config.in b/package/dcron/Config.in
new file mode 100644
index 0000000..70dadcd
--- /dev/null
+++ b/package/dcron/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_DCRON
+	bool "dcron"
+	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.
+
+	  http://www.jimpryor.net/linux/dcron.html
diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk
new file mode 100644
index 0000000..cfff875
--- /dev/null
+++ b/package/dcron/dcron.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# dcron
+#
+################################################################################
+
+DCRON_VERSION = 4.5
+DCRON_SITE = http://www.jimpryor.net/linux/releases/
+DCRON_LICENSE = GPLv2
+
+DCRON_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)"
+
+define DCRON_PERMISSIONS
+/usr/sbin/crond			 f 4755	0 0 - - - - -
+/usr/bin/crontab		 f 755  0 0 - - - - -
+/etc/cron.d/system		 f 755  0 0 - - - - -
+endef
+
+define DCRON_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) $(DCRON_MAKE_OPT)
+endef
+
+define DCRON_INSTALL_TARGET_CMDS
+	$(INSTALL) -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond
+	$(INSTALL) -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab
+	$(INSTALL) -D -m0644 $(@D)/extra/root.crontab $(TARGET_DIR)/etc/cron.d/system
+	$(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \
+	        $(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \
+	        $(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly
+endef
+
+define DCRON_CLEAN_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
-- 
1.9.0.rc3

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

end of thread, other threads:[~2014-04-18 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 10:28 [Buildroot] [PATCH 1/1] dcron: new package Alvaro G. M
2014-03-28 11:25 ` Alvaro Gamez
  -- strict thread matches above, loose matches on Subject: below --
2014-03-12  8:44 Alvaro G. M
2014-04-18 21:42 ` Thomas Petazzoni
2014-04-18 22:14   ` Alvaro Gamez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.