pkgsrc-Users archive

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

Re: Running bootstrap as standard user but without --unprivileged” flag?



On 12/01/17 08:37, Ottavio Caruso wrote:
On 1 December 2017 at 14:10, Jason Bacon <bacon4000%gmail.com@localhost> wrote:
On 12/01/17 07:45, Sevan Janiyan wrote:

On 1 Dec 2017, at 12:14, Ottavio Caruso <ottavio2006-degen%yahoo.com@localhost>
wrote:

Is it possible to run the intitial bootstrap as standard user but
being able to write to /usr without being root?

In other words, I'm fine with running bootstrap as root but I'd like
to keep the pkgsrc directory with my own user's permission.
Use bootstrap with a prefix specified.
./bootstrap --prefix /home/foo

Sevan

If I'm reading the question correctly, and you really want to install in
/usr, you could probably premake the directories:

mkdir /usr/pkg /usr/pkgsrc

chown yourlogin /usr/pkg /usr/pkgsrc

/bootstrap --unprivileged ...
I thought about doing that; in which case I assume I don't need the
--unprivileged flag. Correct if I'm wrong.

In other words I'd like bootstrap to ask me to be root only when
necessary, a bit like just-in-time su when running "make install".

I think once I tried to run  "bootstrap --unprivileged" but it
wouldn't accept other flags.


If you want to build packages as a non-root user, you want --unprivileged.

auto-pkgsrc-setup (http://acadix.biz/pkgsrc.php, http://uwm.edu/hpc/software-management/) uses this when the invoking user is not root:

        ./bootstrap \
            ${abi_flags} \
            --unprivileged \
            --prefix ${install_prefix} \
            --pkgdbdir ${sys_prefix}/pkgdb \
            --sysconfdir ${sys_prefix}/etc \
            --varbase ${sys_prefix}/var \
            --workdir ${sys_prefix}/work 2>&1 | tee bootstrap$dist_suffix.log

Have a look at the script to see what the variables mean...

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index