[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dragora-users] First try at D3 recipe
From: |
Alan Beadle |
Subject: |
Re: [Dragora-users] First try at D3 recipe |
Date: |
Mon, 1 May 2017 19:58:03 -0400 |
Ok, I made a new version with all requested changes. I also fixed my
mistake with the naming of the cron.hourly, daily, weekly, monthly
directories. Full text is pasted below.
Another question. Suppose a package needs some custom configuration
files that need to be installed. How would Dragora ship those?
-Alan
# Build recipe for dcron.
#
# Copyright (C) 2017 Alan Beadle, address@hidden
#
# This recipe is free software: you have unlimited permission
# to copy, distribute and modify it.
program=dcron
version=4.5
release=1
tarname=${program}-${version}.tar.gz
# Remote source(s)
fetch=http://www.jimpryor.net/linux/releases/$tarname
description="
A minimalist cron daemon.
This lightweight cron daemon aims to be simple and secure, with just enough
features to stay useful. It was written from scratch by Matt Dillon in 1994.
It's now developed and maintained by Jim Pryor.
"
homepage=http://www.jimpryor.net/linux/dcron.html
license="GPL, any version"
# Source documentation
docs="CHANGELOG CHANGELOG.working README"
docsdir="${docdir}/${program}-${version}"
build()
{
set -e
unpack "${tardir}/$tarname"
cd "$srcdir"
make PREFIX=/usr
make DESTDIR="$destdir" CRONTAB_GROUP=users install
make -j${jobs} V=1
make -j${jobs} DESTDIR="$destdir" install
cp extra/root.crontab $destdir/var/spool/cron/crontabs/root
chmod 600 $destdir/var/spool/cron/crontabs/root
cp extra/run-cron $destdir/usr/sbin/run-cron
chmod 755 $destdir/usr/sbin/run-cron
ln -s ../var/spool/cron/crontabs/root $destdir/etc/crontab
mkdir -p $destdir/etc/cron.hourly
mkdir -p $destdir/etc/cron.daily
mkdir -p $destdir/etc/cron.weekly
mkdir -p $destdir/etc/cron.monthly
# Compress man pages
lzip -9 "${destdir}/${mandir}"/man?/*
# Copy documentation
mkdir -p "${destdir}${docsdir}"
for file in $docs
do
cp -p $file "${destdir}${docsdir}"
done
}
On Mon, May 1, 2017 at 6:42 PM, Alan Beadle <address@hidden> wrote:
> Matías,
>
>> The init/service script must be done using the rules for perp[1].
>
> I will look into that, but it would still be nice to have some
> examples for style. I suppose if I get around to it I'll write a
> script and send it to the list for critique (Or if you write one, I'll
> use it as an example for future ones that I write).
>
>
>> You are the author of the recipe, use Copyright year/name/email.
>
> I was meaning to ask about that. Some projects request that
> contributions to certain components be placed under copyright of the
> chief maintainer for logistical reasons.
>
>
>> The 'install' command is valid, but this is a non-standard command.
>
> I will take a note of that.
>
>
>> Are you sure that the CRONTAB group must be part of the "users" group?.
>
> This option defines which users are allowed to edit their own
> crontabs. This seems like a reasonable default.
>
>
>> Question, the installation (result) includes the "run-parts" script?.
>
> Yes. This is used to run everything in a directory. It can be useful,
> and it is provided in the "extra" directory of the tarball as
> "run-cron". It seems reasonable to include it in the package since it
> is used by the default crontab to run the hourly/daily/weekly/monthly
> tasks. I also just noticed that I messed up the directory names for
> those directories. I will send a corrected version later when I get
> around to it, hopefully tonight.
>
> -Alan
>
> On Mon, May 1, 2017 at 3:46 PM, Matias Fonzo <address@hidden> wrote:
>> Hi Alan,
>>
>> On Sun, 30 Apr 2017 19:05:28 -0400
>> Alan Beadle <address@hidden> wrote:
>>
>>>
>>> I made a recipe for dcron. I'm pasting it below. This is my first try
>>> at writing one of these. Please let me know if you have suggestions
>>> about style or notice a problem.
>>
>> At first glance, it looks good.
>>
>>> This recipe is missing anything having to do with init scripts for now
>>> since there is more work to do in that area.
>>
>> The init/service script must be done using the rules for perp[1].
>>
>> [1] http://b0llix.net/perp/
>>
>> Other details about the recipe/package are:
>>
>> - Don't use my name for the recipe. You are the author of the recipe,
>> use Copyright year/name/email.
>>
>> - The 'install' command is valid, but this is a non-standard command.
>> We prefer, here in Dragora v3 (especially) to match commands and
>> options belonging to the POSIX standard.
>>
>> - Are you sure that the CRONTAB group must be part of the "users"
>> group?.
>>
>> - Question, the installation (result) includes the "run-parts"
>> script?.
>>
>>
>> Thanks,
>> Matías
>>
>>>
>>>
>>> # Build recipe for dcron.
>>> #
>>> # Copyright (C) 2016-2017 Matias A. Fonzo, address@hidden
>>> #
>>> # This recipe is free software: you have unlimited permission
>>> # to copy, distribute and modify it.
>>>
>>> program=dcron
>>> version=4.5
>>> release=1
>>>
>>> tarname=${program}-${version}.tar.gz
>>>
>>> # Remote source(s)
>>> fetch=http://www.jimpryor.net/linux/releases/$tarname
>>>
>>> description="
>>> A minimalist cron daemon.
>>>
>>> This lightweight cron daemon aims to be simple and secure, with just
>>> enough features to stay useful. It was written from scratch by Matt
>>> Dillon in 1994. It's now developed and maintained by Jim Pryor.
>>> "
>>>
>>> homepage=http://www.jimpryor.net/linux/dcron.html
>>> license="GPL, any version"
>>>
>>> # Source documentation
>>> docs="CHANGELOG CHANGELOG.working README"
>>> docsdir="${docdir}/${program}-${version}"
>>>
>>> build()
>>> {
>>> set -e
>>>
>>> unpack "${tardir}/$tarname"
>>>
>>> cd "$srcdir"
>>>
>>>
>>> make PREFIX=/usr
>>> make DESTDIR="$destdir" CRONTAB_GROUP=users install
>>>
>>> make -j${jobs} V=1
>>> make -j${jobs} DESTDIR="$destdir" install
>>>
>>> install -m 600 extra/root.crontab
>>> $destdir/var/spool/cron/crontabs/root ln
>>> -s ../var/spool/cron/crontabs/root $destdir/etc/crontab #install -D
>>> -m 755 extra/crond.rc $destdir/etc/rc.d/crond install -D -m 755
>>> extra/run-cron $destdir/usr/sbin/run-cron install -d
>>> $destdir/etc/cron/hourly install -d $destdir/etc/cron/daily
>>> install -d $destdir/etc/cron/weekly
>>> install -d $destdir/etc/cron/monthly
>>>
>>> # Compress man pages
>>> lzip -9 "${destdir}/${mandir}"/man?/*
>>>
>>> # Copy documentation
>>> mkdir -p "${destdir}${docsdir}"
>>>
>>> for file in $docs
>>> do
>>> cp -p $file "${destdir}${docsdir}"
>>> done
>>>
>>> }
>>
- [Dragora-users] First try at D3 recipe, Alan Beadle, 2017/05/01
- Re: [Dragora-users] First try at D3 recipe, Matias Fonzo, 2017/05/01
- Re: [Dragora-users] First try at D3 recipe, Alan Beadle, 2017/05/02
- Re: [Dragora-users] First try at D3 recipe,
Alan Beadle <=
- Re: [Dragora-users] First try at D3 recipe, Matias Fonzo, 2017/05/02
- Re: [Dragora-users] First try at D3 recipe, Alan Beadle, 2017/05/02
- Re: [Dragora-users] First try at D3 recipe, Matias Fonzo, 2017/05/02
- Re: [Dragora-users] First try at D3 recipe, Alan Beadle, 2017/05/02
- Re: [Dragora-users] First try at D3 recipe, Alan Beadle, 2017/05/04
- Re: [Dragora-users] First try at D3 recipe, Matias Fonzo, 2017/05/04
- Re: [Dragora-users] First try at D3 recipe, Matias Fonzo, 2017/05/02