DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th May 2008
chris chris is offline
Port Guard
 
Join Date: May 2008
Location: United Kingdom
Posts: 35
Default HOWTO: Always install an up-to-date port

I know I should, but I very rarely have the latest ports tree on my system and it's for that reason I always make sure that a port I'm about to install is up to date.

So, this isn't a very lengthy or complex howto but next time your about to install a port and are unsure weather it's the latest skeleton version or not run this command first;

Code:
cvsup -i ports/CATAGORY/YOUR-PORT -g /location/of/your/ports-supfile
for example, if i wanted to install libtorrent-devel and my ports sup file was in the root DIR I'd run the following command

Code:
cvsup -i ports/net-p2p/libtorrent-devel -g /root/ports-supfile && cd /usr/ports/net-p2p/libtorrent-devel && make install clean
That's it! But remember it's still important to keep your ports tree up to date as some ports may install other dependencies which you had not accounted for.

If you haven't edited your ports-supfile yet you must do so beforehand, a typical user will only need to edit the *default host= variable and to help you find the fastest cvsup host a tool called fastest-cvsup has been developed, you can find it here;

Code:
/usr/ports/sysutils/fastest_cvsup
An example supfile can be found here;

Code:
/usr/share/examples/cvsup/ports-supfile

Last edited by chris; 26th May 2008 at 06:34 PM.
Reply With Quote
  #2   (View Single Post)  
Old 26th May 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It should be pointed out that this is FreeBSD specific.

OpenBSD, notably, requires kernel, userland, and ports to remain in sync, per FAQ 15.4.1.
Reply With Quote
  #3   (View Single Post)  
Old 26th May 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Very nice howto mate, about dependencies you mentioned you can parse a port Makefile to get dependencies and also update them before building the port:

for example /usr/ports/www/lighttpd/Makefile
Code:
LIB_DEPENDS=    pcre.0:${PORTSDIR}/devel/pcre
LIB_DEPENDS+=           fam:${PORTSDIR}/devel/fam
LIB_DEPENDS+=           gdbm:${PORTSDIR}/databases/gdbm
BUILD_DEPENDS+=         valgrind:${PORTSDIR}/devel/valgrind
RUN_DEPENDS+=           valgrind:${PORTSDIR}/devel/valgrind
                        sqlite3.8:${PORTSDIR}/databases/sqlite3
A simple script will do the job, the only "problem" may be parsing the multiline *_DEPENDS lines.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #4   (View Single Post)  
Old 26th May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

% make depends-list
Recursive and pretty formatting

This is a nice tip, I always use(d) "cvs co" if I only need to update a single port, this is much easier.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #5   (View Single Post)  
Old 26th May 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by Carpetsmoker View Post
% make depends-list
Recursive and pretty formatting
I think I need more sleep if I forgot about such basics, thanks mate.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #6   (View Single Post)  
Old 27th May 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

Good stuff. Another tip: You can forgo editing the cvsup file if you use the '-h' option to cvsup. Here's a fully automated command:

cvsup -h `fastest_cvsup -qc tld` /usr/share/cvsup/ports-supfile

However, beware: I have stopped using that, because for a while here in australia (I used -c au) there was one cvsup server that was out of date, and, because no one was using it, it was always the fastest! Caveat Downlodeur.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
  #7   (View Single Post)  
Old 28th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Thanks for the nice post, I usually don't update my ports tree until I have to build something (or every few months).

Writing a script to handle the depends is worth not having to wait on cvsup/csup to finish the *usual way* !!


Quote:
Originally Posted by Carpetsmoker View Post
% make depends-list
Recursive and pretty formatting

This is a nice tip, I always use(d) "cvs co" if I only need to update a single port, this is much easier.
I don't suppose there is an equivalent for viewing a ports build options (make config) is there?

I remember working on a program that needed me to dig up a target ports Makefile, locate OPTIONS and generate a custom QDialog for setting the ones desired, including handling <ports-db>/portname/options where necessary -- it was not fun dealing with the makefile part!


And actually now that I try using zsh's tab completion with make and the ports I used for field testing that module:

Code:
Terry@dixie$ cd /usr/ports/net/samba3/                                     7:51
Terry@dixie$ make depends-list                                             7:51
make: don't know how to make depends-list. Stop
Terry@dixie$ make show-options                                             7:51
make: don't know how to make show-options. Stop
Terry@dixie$ cd /usr/ports/editors/vim                                     7:51
Terry@dixie$ make depends-list                                             7:51
make: don't know how to make depends-list. Stop
Terry@dixie$ make show-options                                             7:51
===> The following configuration options are available for vim-7.1.282:
     PERL=off (default) "Enable Perl interpreter"
     PYTHON=off (default) "Enable Python interpreter"
     RUBY=off (default) "Enable Ruby interpreter"
     CSCOPE=off (default) "Enable cscope"
     EXUBERANT_CTAGS=off (default) "Use exctags instead of ctags"
     ATHENA=off (default) "Athena GUI"
     GTK2=off (default) "GTK2 GUI"
     GNOME=off (default) "Gnome1 GUI"
     MOTIF=off (default) "Motif GUI"
     XTERM_SAVE=off (default) ""
===> Use 'make config' to modify these settings
Terry@dixie$                                                               7:51

Just peachy :\
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #8   (View Single Post)  
Old 28th May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
I don't suppose there is an equivalent for viewing a ports build options (make config) is there?
# make showconfig It's all in /usr/ports/Mk/bsd.ports.mk

The show-options target is _ONLY_ for vim, look at the Makefile:
Code:
show-options:
        @${MAKE} -DWITH_OPTIONS showconfig
It's more complicated if the port doesn't use OPTIONS but just knobs, you'll have to grep the various knobs...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #9   (View Single Post)  
Old 28th May 2008
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 303
Default

/lsknobs/
/portsopt/
each I think in /ports-mgmt/
I use the latter daily
__________________
FreeBSD 13-STABLE
Reply With Quote
Reply

Tags
cvsup, freebsd, ports-supfile, update port, update uninstalled port, upgrade port

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
Opera Port - conflicting pkgs in "make install" IronForge OpenBSD Packages and Ports 5 29th October 2009 05:10 AM
HOWTO: Install and configure NVIDIA drivers on FreeBSD tangram Guides 2 29th March 2009 08:23 PM
HOWTO: Install and setup MLDonkey on FreeBSD tangram Guides 0 7th January 2009 05:13 PM
Using Date variable? cwhitmore FreeBSD General 9 13th August 2008 07:16 AM
Unable to make install on Subversion port Fuitad FreeBSD Ports and Packages 2 28th July 2008 04:49 PM


All times are GMT. The time now is 08:42 AM.


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