[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dragora-users] First try at D3 recipe
From: |
Matias Fonzo |
Subject: |
Re: [Dragora-users] First try at D3 recipe |
Date: |
Tue, 2 May 2017 21:19:14 -0300 |
On Mon, 1 May 2017 18:42:32 -0400
Alan Beadle <address@hidden> wrote:
>
> > 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).
>
The point is that I have not been able to fully understand perp yet.
I can get on with this after posting the Qi documentation update that I
am preparing. Anyway, we have the support of Wayne (the author) for
any questions.
>
> > 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.
>
Not strictly required. It is useful to know who worked on it, the year
of creation (or maintenance), and contact.
>
> > The 'install' command is valid, but this is a non-standard
> > command.
>
> I will take a note of that.
>
That reminds me that I need to change 'install' in the Makefile of
Qi. ;-)
>
> > 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.
>
OK.
>
> > 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.
When you want to provide an external custom file for the package,
${worktree}' can be used for the recipe[1]:
"‘worktree’ is the working tree where archives, patches, and recipes
are expected. This variable cannot be redefined in the recipe. Defaults
to ‘/usr/src/qi’." However, the value for '${worktree}' can be set
from the qirc config file, or a different value could be used at
runtime if you invoke Qi as: qi -W /working_tree/qi
Example from the 'devel/pkgconf' recipe:
# Include profile file
mkdir -p "${destdir}/etc/profile.d"
cat "${worktree}/archive/pkgconf/etc/profile.d/pkgconf.sh" \
> "${destdir}/etc/profile.d/pkgconf.sh"
[1] http://dragora.org/repo.fsl/doc/trunk/qi/doc/qi.html "Special
variables"
> 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.
>
Good catch...
> -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
> >>
> >> }
> >
>
pgpOCPBFLE2tJ.pgp
Description: OpenPGP digital signature
- [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, 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, 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 <=