Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] main/backuppc: Added initd script, small fixes and cleaned up

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Wed, 26 Nov 2014 13:13:58 +0100

On Wed, 26 Nov 2014 09:01:05 +0400
k0r10n <k0r10n.dev_at_gmail.com> wrote:

> ---
> main/backuppc/APKBUILD | 38 ++++++++++++++++++++++++-------------
> main/backuppc/backuppc.initd | 4 ++++
> main/backuppc/backuppc.post-install | 4 ++--
> main/backuppc/configure.pl.patch | 4 ++--
> 4 files changed, 33 insertions(+), 17 deletions(-)
>

I have a few questions below.

...

> --- a/main/backuppc/backuppc.post-install
> +++ b/main/backuppc/backuppc.post-install
> _at_@ -1,7 +1,7 @@
> #!/bin/sh
> -for dir in /etc /var/log /var/lib
> +for dir in /etc /var/log /var/lib /usr/lib
> do
> chown -R backuppc.backuppc ${dir}/BackupPC &>/dev/null
> done

permissions of files should be set in the .apk itself and not in
post-install. Only exception is /var/run and /run which should be set
from init.d script with 'checkpath'

Other question is, why does /usr/lib/BackupPC be owned by backuppc
user? /usr should generally be considered as read-only area.


>
> -ln -s /var/www/htdocs/BackupPC/index.cgi /var/www/cgi-bin/BackupPC_Admin &>/dev/null
> +ln -s /var/www/cgi-bin/BackupPC_Admin /var/www/htdocs/BackupPC/index.cgi &>/dev/null

Symlinks should generally be created in .apk and not in post-install.

Is it possible to get rid of the post-install script?


-nc


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Nov 26 2014 - 13:13:58 GMT