DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th May 2014
sysfu's Avatar
sysfu sysfu is offline
Port Guard
 
Join Date: Jun 2008
Posts: 35
Thanked 0 Times in 0 Posts
Default FreeBSD equivalent to OpenBSD mk.conf FETCH_PACKAGES=Yes

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?
Reply With Quote
  #2   (View Single Post)  
Old 13th December 2014
dunric29a dunric29a is offline
New User
 
Join Date: Dec 2014
Posts: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #3   (View Single Post)  
Old 14th December 2014
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 219
Thanked 5 Times in 5 Posts
Default

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 10.1-STABLE
Reply With Quote
  #4   (View Single Post)  
Old 23rd December 2014
sysfu's Avatar
sysfu sysfu is offline
Port Guard
 
Join Date: Jun 2008
Posts: 35
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #5   (View Single Post)  
Old 23rd December 2014
cynwulf cynwulf is offline
Fdisk Soldier
 
Join Date: Mar 2014
Posts: 74
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by sysfu View Post
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.
I learnt something new - very useful thanks.
Reply With Quote
  #6   (View Single Post)  
Old 24th December 2014
sysfu's Avatar
sysfu sysfu is offline
Port Guard
 
Join Date: Jun 2008
Posts: 35
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #7   (View Single Post)  
Old 30th December 2014
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,108
Thanked 198 Times in 156 Posts
Default

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.
Reply With Quote
  #8   (View Single Post)  
Old 31st December 2014
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 219
Thanked 5 Times in 5 Posts
Default

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 10.1-STABLE
Reply With Quote
  #9   (View Single Post)  
Old 4 Weeks Ago
sysfu's Avatar
sysfu sysfu is offline
Port Guard
 
Join Date: Jun 2008
Posts: 35
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
Old 4 Weeks Ago
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
VPN Cryptographer
 
Join Date: Apr 2008
Location: NYC
Posts: 396
Thanked 31 Times in 25 Posts
Default

The portmaster command also has a flag to use packages when available. I'm not in FreeBSD right now, and am too lazy to google, but I think it's -PP.
Reply With Quote
Old 4 Weeks Ago
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 219
Thanked 5 Times in 5 Posts
Default

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
[can > used to ] be crafted, with portmaster instead, to exclude upgrading a port, by package, that brings in a slew of qt4-5 dependencies. And pkg upgrade may eventually include a flag to show which of the list it produces brings in new dependencies, and which ones.
__________________
FreeBSD 10.1-STABLE
Reply With Quote
Reply

Tags
fetch, pkgng, portmaster, ports, portupgrade

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT. The time now is 08:49 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick