pkgsrc-Users archive

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

Re: pkgsrc on Solaris - coexisting with already installed software



Hi Mikhail,

On Mon, Nov 23, 2009 at 05:53:47PM -0500, Mikhail T. wrote:
> First of all, I'd like to express my gratitude for making pkgsrc work on
> other OSes -- such as Solaris. The amount of porting must've been quite
> substantial...

Actually, pkgsrc itself was ported to Solaris in 1999.  It took a
couple of elapsed months of work, but there were a lot of other things
happening at that time.
 
> That said, I'm wondering, if it is possible for the pkgsrc-built
> software to use the bits and pieces already present on the system --
> such as those installed via regular (manual) builds or coming from the
> OS vendor. For example, I just finished building www/apache22 and that
> pulled in things like OpenSSL, perl, zlib, that were already present --
> if outside /usr/pkg.
>
> And it was not only the LIB_DEPENDS stuff -- gmake, that was already
> available under /usr/local/bin, was rebuilt and installed under
> /usr/pkg/bin as well only to build a dependency...
> 
> Can this be avoided?

In the past, we've shied away from that kind of thing.  Yes, the
software is there, but it may have config files which are not managed
in the way pkgsrc expects, patches needed for pkgsrc use, dependencies
which pkgsrc expects, or user addition in the same manner.  So we
usually find it much easier to install our own version, managed by
pkgsrc.
 
> Next question is package-generation -- I can see, that `bmake package'
> creates BSD-style packages (.tgz), which are quite familiar to me as a
> FreeBSD-user. Has anyone played with making pkgsrc create native
> packages, installable by pkgadd on SunOS and rpm on Linux? Using
> devel/epm -- which is what I'm manually doing right now -- could help
> with that...

Check out pkgsrc/pkgtools/gensolpkg, and pkgsrc/pkgtools/genrpm. Although
I'm not sure if time has been kind to either of them.
 
> And, finally, how can I make use of ksu instead of su, when it comes to
> install-ing stuff, that I'm building as non-root? Simply adding SU=ksu
> or even ROOT_CMD=... is not working, because the command-line syntax is
> different... Has anyone done that?

See section 9.12 of the pkgsrc guide:

        9.12. Using 'sudo' with pkgsrc

        When installing packages as non-root user and using the just-in-time 
su(1)
        feature of pkgsrc, it can become annoying to type in the root password 
for each
        required package installed. To avoid this, the sudo package can be 
used, which
        does password caching over a limited time. To use it, install sudo 
(either as  
        binary package or from security/sudo) and then put the following into 
your
        mk.conf, somewhere after the definition of the LOCALBASE variable:

        .if exists(${LOCALBASE}/bin/sudo)
        SU_CMD=        ${LOCALBASE}/bin/sudo /bin/sh -c
        .endif

Regards,
Alistair


Home | Main Index | Thread Index | Old Index