caffeine
July 29th, 2003, 17:31
A few notes on the pkgsrc configuration...
1. It doesn't install from the ISO like FBSD, you have to go and download the tarball...
2. I found it helpful to change the "LOCALBASE?=" line in the /usr/pkgsrc/mk/bsd.pkg.defaults.mk file to "/usr/local/". This will put your binaries and other stuff in there with /usr/local/ as your prefix...default is /usr/pkg or something like that...being used to fbsd, I found the default to be annoying as hell.
3. When installing things that put in an rc script, say something like nessus. You may need to copy the script to /etc/rc.d from /usr/local/etc/rc.d/ and edit your rc.conf to make it work...pretty simple...ie: for nessus "nessusd=YES" you get the idea.
If anyone wants to post a how to on updating your installed packages...i thank you in advance...
:D
Caffeine
soup4you2
July 29th, 2003, 18:44
i personally like the way openbsd does it..
you put in a option in your rc.conf like
NESSUS=""
then in your rc.local you add a small script to read the var from the rc.conf. if NESSUS is true then it runs the script.. if falst it doesnt
optyk
September 7th, 2003, 13:08
I read that if you set the "LOCALBASE?=" variable to anything other than it's default then packages should not be used, only ports. The package system will always install to /usr/pkg. Might be easier to just make a /usr/local symlink pointing to /usr/pkg.
jlam
September 30th, 2003, 05:52
I read that if you set the "LOCALBASE?=" variable to anything other than it's default then packages should not be used, only ports. The package system will always install to /usr/pkg. Might be easier to just make a /usr/local symlink pointing to /usr/pkg.
It's quite safe to set LOCALBASE to your favorite path in /etc/mk.conf. pkgsrc consistently uses ${LOCALBASE} to refer to this directory throughout its Makefiles. I personally have LOCALBASE=/opt in my /etc/mk.conf. The only path that you probably should not use is /usr.
Strog
September 30th, 2003, 10:49
I was talking with some NetBSD developers and they were explaining the rationale behind the various install directories. It seems the intention was to keep pkgsrc/package installs seperate so they would be easier to maintain and still allow a standard way to compile from source non-pkgsrc apps without hosing up the file structure. The discussion went on to talk about how it is generally a "bad thing tm" to put pkgsrc/package into /usr/local. There's some potential gotchas over the long term to using it that way if you install something from source and it ends up in /usr/local too. You can be fine with /usr/local if you only use pkgsrc/packages or make sure to install compiled software in another location. Putting it in /opt like jlam suggested is considered fine since it still keeps things seperate.
/usr base install here and nothing extra
/usr/pkg package/pkgsrc installs
/usr/local apps compiled from source
Irix on my SGI machine puts all the free software in /usr/freeware and makes it easy to find the stuff I added. Just add the paths to your profile. I'm also running pkgsrc on Irix so I also have /usr/pkg on my system too. I have the Irix MIPS Pro compiler in the standard tree, GCC in /usr/freeware and the latest GCC in /usr/pkg. It would get very confusing if everything weren't compartmentalized. I love seeing pkgsrc work on non-BSD OSes. 8)
optyk
September 30th, 2003, 11:52
Here's the link to what I was referring to:
http://www.netbsd.org/Documentation/pkgsrc/using.html
There is a cautionary note at the bottom of the page that states binary packages are built with the default LOCALBASE and install, as such, in /usr/pkg. You are perfectly fine to make LOCALBASE point to where you want it, but don't pkg_add any binary packages.
jlam
October 5th, 2003, 05:42
Here's the link to what I was referring to:
http://www.netbsd.org/Documentation/pkgsrc/using.html
There is a cautionary note at the bottom of the page that states binary packages are built with the default LOCALBASE and install, as such, in /usr/pkg. You are perfectly fine to make LOCALBASE point to where you want it, but don't pkg_add any binary packages.
Just to clarify what the documentation page says, you are free to set LOCALBASE to whatever you wish if you intend to build all of your packages from pkgsrc. You are also free to create your own set of binary packages using your custom LOCALBASE setting, and pkg_add, pkg_info, pkg_delete, etc. will handle your binary packages for your system correctly. The caveat is only to warn against download the binary packages on ftp.netbsd.org as they're all built using the default LOCALBASE, and hence won't mix well with your own custom packages or package location.