Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] testing/sword: add new package

From: Isaac Dunham <ibid.ag_at_gmail.com>
Date: Tue, 22 Jul 2014 21:01:42 -0700

On Tue, Jul 22, 2014 at 02:27:28PM +0200, Natanael Copa wrote:
> On Wed, 16 Jul 2014 14:22:49 -0700
> Isaac Dunham <ibid.ag_at_gmail.com> wrote:
> > installmgr installs "modules" to a configured location.
> > This location is set by DataPath and extended by AddDataPath in the
> > [INSTALL] section.
> > /etc/sword.conf points it at /usr/share/sword; this is not writeable.
> > I'm not aware of any way to point it at a sane default that everyone can use.
> > If there are NO config files, it will look for ~/.sword/mods.d, and install
> > into ~/.sword/modules.
> >
> > installmgr won't work right unless it can find mods.conf or a writeable
> > mods.d directory in the DataPath.
> > If it can figure out where it /should/ put modules, it will run,
> > downloading the modules to a per-repository location.
> > Then it will move them into location or silently delete them.
> >
> > Now I need to figure out what's the right fix.
> > I guess installmgr should error out if it can't write somewhere.
> > Debian's approach is to require at least one package containing a
> > SWORD module.
>
> How about using /var/lib/sword as default and have a
> 'sword' group with write permissions there?
>
> They you can just add your users to the sword group to be able to
> install the data files.
>
That should work.
One question/minor issue:

abuild warns about chown in the post-install script.

But it would seem that there's no other sane way to make sure that
/var/lib/sword belongs to the "sword" group: to make it belong to
root:sword in the package, this group must exist when the package is
built and when it is extracted.
I presume pre-install could do the latter, but manipulating groups in
a build script is insanity.

If I can ignore that warning (assuming it belongs in abuild), I have a
script ready to go.

What's the preferred approach?

Thanks,
Isaac Dunham


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Jul 22 2014 - 21:01:42 UTC