pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgtools/rc.subr doesn't honour the RCD_SCRIPTS_DIR option



On 11 January 2018 at 11:59, Ottavio Caruso <ottavio2006-degen%yahoo.com@localhost> wrote:
> On a LMDE2 system with pkgsrc bootstrapped as --unprivileged (maybe
> that is the reason?) I want the package to be installed in
> /home/oc/pkg/etc/rc.d, not the canonical /etc/rc.cd
>
> So:
>
>
> $ ~/pkgsrc-current/pkgtools/rc.subr $
> RCD_SCRIPTS_DIR=/home/oc/pkg/etc/rc.d bmake install
>
> ===> Skipping vulnerability checks.
> WARNING: No /home/oc/pkg/pkgdb/pkg-vulnerabilities file found.
> WARNING: To fix run: `/home/oc/pkg/sbin/pkg_admin -K
> /home/oc/pkg/pkgdb fetch-pkg-vulnerabilities'.
> ===> Installing dependencies for rc.subr-20171024
> ==========================================================================
> The following variables will affect the build process of this package,
> rc.subr-20171024.  Their current value is shown below:
>
>         * RCD_SCRIPTS_DIR = /home/oc/pkg/etc/rc.d
>
> You may want to abort the process now with CTRL-C and change their value
> before continuing.  Be sure to run `/home/oc/pkg/bin/bmake clean' after
> the changes.
> ==========================================================================
> => Build dependency cwrappers>=20150314: found cwrappers-20171108
> ===> Overriding tools for rc.subr-20171024
> ===> Extracting for rc.subr-20171024
> /bin/cp -R /home/oc/pkgsrc-current/pkgtools/rc.subr/files
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024
> ===> Patching for rc.subr-20171024
> ===> Creating toolchain wrappers for rc.subr-20171024
> ===> Installing for rc.subr-20171024
> => Creating installation directories
> /usr/bin/install -c -o oc -g oc -m 644
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024/rc.conf.example
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.destdir/etc/rc.conf.example
> /usr/bin/install -c -o oc -g oc -m 644
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024/rc.subr
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.destdir/etc/rc.subr
> /usr/bin/install -c -o oc -g oc -m 755
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024/rc.d/DAEMON
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.destdir//home/oc/pkg/etc/rc.d
> /usr/bin/install -c -o oc -g oc -m 755
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024/rc.d/LOGIN
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.destdir//home/oc/pkg/etc/rc.d
> /usr/bin/install -c -o oc -g oc -m 755
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024/rc.d/NETWORKING
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.destdir//home/oc/pkg/etc/rc.d
> /usr/bin/install -c -o oc -g oc -m 755
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/rc.subr-20171024/rc.d/SERVERS
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.destdir//home/oc/pkg/etc/rc.d
> => Automatic manual page handling
> => Creating binary package
> /home/oc/pkgsrc-current/pkgtools/rc.subr/work/.packages/rc.subr-20171024.tgz
> ===> Building binary package for rc.subr-20171024
> => Creating binary package
> /home/oc/pkgsrc-current/packages/All/rc.subr-20171024.tgz
> ===> Installing binary package of rc.subr-20171024
> pkg_add: Failed to write etc/rc.conf.example for rc.subr-20171024:
> Can't create 'etc/rc.conf.example'
> pkg_add: Couldn't remove //etc/rc.conf.example
> pkg_add: Couldn't remove //etc/rc.subr
> pkg_add: Couldn't remove //home/oc/pkg/etc/rc.d/DAEMON
> pkg_add: Couldn't remove //home/oc/pkg/etc/rc.d/LOGIN
> pkg_add: Couldn't remove //home/oc/pkg/etc/rc.d/NETWORKING
> pkg_add: Couldn't remove //home/oc/pkg/etc/rc.d/SERVERS
> Executing `/bin/rmdir '/'/home/oc/pkg/etc/rc.d 2> /dev/null || true'
> pkg_add: 1 package addition failed
> *** Error code 1
>
> Stop.
> bmake[2]: stopped in /home/oc/pkgsrc-current/pkgtools/rc.subr
> *** Error code 1
>
> Stop.
> bmake[1]: stopped in /home/oc/pkgsrc-current/pkgtools/rc.subr
> *** Error code 1
>
> Stop.
> bmake: stopped in /home/oc/pkgsrc-current/pkgtools/rc.subr
>
> Premaking the directory /home/oc/pkg/etc/rc.d doesn't seem to make a difference.
>
> I guess I could try using "sudo bmake install" but that would not cure
> the issue. Or maybe I have misunderstood the meaning of the above
> mentioned option.
>
> I got the ideal from this article:
> https://github.com/agjohnson/ohess-blog/blob/master/pub/using-pkgsrc-on-debian-squeeze.rst
>

I think I get where [my] problem is:

$ ~/pkgsrc-current/pkgtools/rc.subr $ cat PLIST
@comment $NetBSD: PLIST,v 1.4 2008/06/04 13:34:46 sketch Exp $
etc/rc.conf.example
etc/rc.subr
${RCD_SCRIPTS_DIR}/DAEMON
${RCD_SCRIPTS_DIR}/LOGIN
${RCD_SCRIPTS_DIR}/NETWORKING
${RCD_SCRIPTS_DIR}/SERVERS
@unexec ${RMDIR} %D/${RCD_SCRIPTS_DIR} 2> /dev/null || ${TRUE}


Look at the first two lines. They are unaffected by
${RCD_SCRIPTS_DIR}. The script wants to write to
"etc/rc.conf.example", but where is it?

And by the way, the email <sbd%NetBSD.org@localhost> bounces on me.


-- 
Ottavio Caruso


Home | Main Index | Thread Index | Old Index