Local package mirror

freebsd at optiksecurite.com freebsd at optiksecurite.com
Sat Apr 5 19:21:40 UTC 2008

> Hello Lowell,
> Thank you so much for the reply. I am trying to do the build once and
> use prebuilt packages for the target boxes. However the problem I am
> facing is a bit crude.
> Lets assume I am trying to build pkgA which has dependencies of pkgB
> and pkgC. The process I am following is
> cd /usr/ports/xxx/pkgA ; make package. This makes the prebuilt package
> in /usr/ports/ packages. However it does not case about pkgB which is
> a dependency.
> On a target system when I am trying to pkg_add it, it is rightly
> complaining about a missing dependency and also saying that it cant
> find the package in the local repository and aborting.
> How can this be taken care of?
> Thanks
> Subhro


Correct me if I'm wrong but all you need to do is to "make
package-recursive" instead of "make package" for your pkgA. It will make a
package for all the dependencies of pkgA.

Good luck,


> On Sat, Apr 5, 2008 at 6:26 PM, Lowell Gilbert
> <freebsd-questions-local at be-well.ilk.org> wrote:
>> Subhro <subhro.kar at gmail.com> writes:
>> > I am trying to get a Network install working on my local network. I
>> > have been able to successfully create a NFS export of the installation
>> > disk and perform a install from there. The target machines boot over
>> > PXE and fetch "stuff" from the NFS.
>> >
>> > However I am unable to figure out how to get the packages working. I
>> > have a list of about 180 packages which needs to be installed. But I
>> > am unable to figure out how to go about it. I would like to use
>> > precompiled packages, but the CD do not contain the packages I am
>> > looking for. One of the option is to mirror the whole package
>> > directory from the freebsd mirrors, but that story involves a lot of
>> > data transfer and bandwidth. Is there something obvious I am missing?
>> >
>> > Any help would be highly appreciated.
>> There are a number of ways to do this general sort of thing.  For the
>> base system approach, with pkg_add(1), setting PACKAGEROOT (or
>> possibly PACKAGESITE depending on exactly how you configure the server
>> for network fetch, or PKG_PATH if the clients have the NFS directory
>> mounted) should be good enough.
>> On the other hand, the way I do it is to have a master server, where I
>> build everything (or fetch everything, if I don't want to build it
>> myself).  Then the other machines mount /usr/ports from the master
>> server.  I use portupgrade to do the installs from the clients, which
>> knows how to use packages when available locally and only fetch them
>> if they aren't.
>> I hope this helps.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"

More information about the freebsd-questions mailing list