![]() |
|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
I'm trying to save time when building applications from the FreeBSD ports tree. OpenBSD has a ports tree setting...
/etc/mk.conf ----------------- FETCH_PACKAGES=Yes ...that will download the pre-compiled pkgs for any dependencies that it can, saving enormous amounts of time since it doesn't have to compile every single one required to build the port. Does any know if FreeBSD offers this capability as well? |
|
|||
![]()
Hi,
I do use portupgrade for ports management and there is an option --use-packages which does exactly what do you require. Note it can be overridden with USE_PORTS_ONLY from /etc/pkgtools.conf. See man page for details. Take care. |
|
|||
![]()
You may wish to make a symlink from where the new packages are stored to the traditional portupgrade package location... I recall posting it in a thread there; search 'symlink' maybe... until portupgrade is upgraded to be smarter. Or some equivalent adjustment.
__________________
FreeBSD 13-STABLE |
|
|||
![]()
Thanks, I settled on portmaster a while back but maybe I'll have to revisit that decision in light of portupgrade's --use-packages functionality.
Update: It looks like portmaster has similar switches, derp. -P|--packages use packages, but build port if not available -PP|--packages-only fail if no package is available --packages-build use packages for all build dependencies --packages-if-newer use package if newer than installed even if the package is not the latest according to the ports tree --always-fetch fetch package even if it already exists locally --local-packagedir=<path> where local packages can be found, will fall back to fetching if no local version exists --packages-local use packages from --local-packagedir only --delete-packages after installing from a package, delete it Update #2: portmaster doesn't support pkgng yet, bah. portmaster -P www/nginx ===>>> Package installation support cannot be used with pkgng yet, it will be disabled Last edited by sysfu; 23rd December 2014 at 03:17 AM. |
|
|||
![]()
I think the native FreeBSD ports make.conf option is something like
_OPTIONS_DEPENDS=FETCH I found this option by reading the Mk/bsd.options.mk file |
|
||||
![]()
If a variable starts with an underscore, it means it's for internal use. Glancing at the Makefile, this does something completely different than what you expect (it's used to keep track of a list of possible *_DEPENDS, such as RUN_DEPENDS, BUILD_DEPENDS, FETCH_DEPENDS, etc.).
As far as I know, there is no easy way to do what you want. The new pkg tools broke a lot of stuff (such as portmaster, as you've noticed). - You can get a list of all dependencies with make all-depends-list; - You can check if a package is installed by the origin name with pkg query -e '%o = sysutils/tmux' %o This should give you the basic ingredients to write a script :-)
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. |
|
|||
![]() Code:
cd /usr/ports/www/chromium make build-depends-list | gtr -s \/ "\n" | grep -v usr | grep -v ports | grep -v textproc {etc !! } | {etc !! } | grep -v "missing upstream pkgs == py-gobject3 for example" | xargs -J % pkg install % Once I got pkg working, that code-template [ too complex for actual code] ... if one runs it okay, then can run "pkg install -y" to actually do the upgrades. Coded that first within the last 48 hours ... but note the 'gtr' command (coreutils) which I had to work upon previously to strip the paths from the result, in other one-liners.
__________________
FreeBSD 13-STABLE |
|
|||
![]()
Might have found the make.conf setting(s) I was looking for in a poudriere doc
USE_PACKAGE_DEPENDS=yes BATCH=yes Will try that and see if it helps |
|
|||
![]()
I hope within a few years time portmaster and portupgrade fully support all pkgdb , -P -PP flags like they once did. Even that someone could re-write and re-import the older expired portmanager port... for instance
Code:
pkg upgrade
__________________
FreeBSD 13-STABLE |
![]() |
Tags |
fetch, pkgng, portmaster, ports, portupgrade |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenBSD, pf.conf and user IDs / names | PvSw1 | OpenBSD General | 0 | 7th February 2011 02:14 PM |
equivalent to freebsd fetch | pbd | OpenBSD General | 9 | 7th August 2009 11:45 AM |
OpenSolaris equivalent of systrace? | DraconianTimes | Solaris | 9 | 31st January 2009 05:36 AM |
Remastersys FreeBSD equivalent? | businessgeeks | FreeBSD General | 2 | 4th August 2008 01:44 PM |
FreeBSD equivalent of DOS's fdisk /mbr | Nobber | FreeBSD General | 5 | 3rd June 2008 07:19 AM |