Installation without prompt

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Installation without prompt

Postby ObiektywNy » 23 May 2010, 20:35

Hi all
I just started with FreeBSD, so far I did many deinstallations and installations from scratch I'm wonder ( because every port installation take a long time, sometimes few days) if there some way to do for eg.
Code: Select all
portupgrade
without that prompts every port settings. I mean some ports prompts for "choose options" (those blue screens :)) and it is annoying to keep eye on that and installation process take longer because I am not all the time in front of the computer.

If there is some option to force and install everything with default settings I will be very happy.

Thank you for your help.
User avatar
ObiektywNy
Junior Member
 
Posts: 54
Joined: 05 May 2010, 16:50
Location: US

Postby crsd » 23 May 2010, 20:37

Use -DBATCH. Not sure how you would pass it with portupgrade, check its manpage.
crsd
Member
 
Posts: 420
Joined: 24 Nov 2008, 02:15
Location: Russia, Krasnodar

Postby zeiz » 24 May 2010, 01:00

If no need in configs why spend days instead of just installing packages with pkg_add?
[CMD=" "]# pkg_add -r <package1 name> <package2 name> ...<packageN name>[/CMD]
I believe that currently all the main packages are up-to-date with ports.
If something is not quite up-to-date then portupgrade makes sense:
[CMD=" "]# portupgrade -RP <package name>[/CMD]
This will install packages first and build from ports only if a package is out-of-date.
Also option "-N" allows new install with portupgrade which also can make config-recursive (all those blue screens appear all at once and then you are free).
Manpages are pure treasure:
[CMD=" "]$ man portupgrade[/CMD]
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby phoenix » 24 May 2010, 06:00

Portmaster pops up all the OPTIONS screen in the dependency checking phase. Once it starts the build, you won't see anymore OPTIONS screens popup.

Not sure if portupgrade has that feature (haven't used it in many years.)
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
User avatar
phoenix
MFC'd
 
Posts: 3349
Joined: 17 Nov 2008, 05:43
Location: Kamloops, BC, Canada

Postby zeiz » 24 May 2010, 12:32

man portupgrade
.................
-c
--config Run ``make config-conditional'' before everything for all tasks.
-C
--force-config Run ``make config'' before everything for all tasks.

Portmaster does it by default but I don't know how to suppress all the deleting (old files or backups) confirmations that portmaster asks after each task.
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby DutchDaemon » 24 May 2010, 15:05

Use the correct flags in [pman=8]portmaster[/pman], or use a [file]/usr/local/etc/portmaster.rc[/file] file (printed literally in the FILES section of portmaster(8) on a recent system) to make them permanent. Reading manuals will always be preferred to asking it here.
User avatar
DutchDaemon
Old Fart
 
Posts: 10466
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby ObiektywNy » 24 May 2010, 15:16

Thank you all for advice,

Reading manuals will always be preferred to asking it here.

As I mentioned I just started with FreeBSD and your help is very appreciated. And in some cases I have no idea wich manual I should read...

Thank you all.
User avatar
ObiektywNy
Junior Member
 
Posts: 54
Joined: 05 May 2010, 16:50
Location: US

Postby DutchDaemon » 24 May 2010, 15:27

Well, putting 'man' in front of the command is usually how it works ;)
User avatar
DutchDaemon
Old Fart
 
Posts: 10466
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby ObiektywNy » 24 May 2010, 16:00

Maybe I will ask a trivial question, what is better to use for update the ports portupgrade or portmaster, I do not want mess with the system before I will know it better, I assume that for you guys it doesn't matter but what is easier and more save to use for beginners.
User avatar
ObiektywNy
Junior Member
 
Posts: 54
Joined: 05 May 2010, 16:50
Location: US

Postby zeiz » 24 May 2010, 18:30

Long "portupgrade vs portmaster" discussion sounds to me like apple-orange one.
Doug Barton himself said that he didn't write portmaster to replace portupgrade...suum cuique.
I use both but mostly portupgrade... maybe just because I found it more comprehensive at my own start.
Personally I would install everything with pkg_add -r instead of spending days for compiling and then just update a few outdated packages with:
[CMD=" "]# portupgrade -aRC[/CMD]
even without "C"
OR
[CMD=" "]# portmaster -ad --no-confirm[/CMD]
even without --no-confirm

@DutchDaemon:
1. You provided a link (thanks) to a bit outdated manpage, in latest one -u is deprecated and -D and -d are highlighted instead:
-D no cleaning of distfiles
-d always clean distfiles

On same manpage below are samples including the following:
Update all ports that need updating, and delete stale distfiles after the update is done:
portmaster -aD
portmaster --clean-distfiles

So...what you gonna do?

2. "Here" looks exactly as a place to mostly ask and answer and sometimes "moderate in background" ;)
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby ObiektywNy » 24 May 2010, 19:49

So...what you gonna do?

I will probably stay with portmaster for now, step by step, I screwed to many times my installation, and every time I am learning something new...

I printed manuals to have a nice reading.

And one more question:

If I do install some port first time and it is fetch from ftp://... it means that it downloading the last version or I should check what version was installed and checked if I need update it?
User avatar
ObiektywNy
Junior Member
 
Posts: 54
Joined: 05 May 2010, 16:50
Location: US

Postby zeiz » 24 May 2010, 21:38

If you build (compile) from source (ports) it fetches distfile (source file) according to version in your Makefile. To have latest version of source files we regularly update our port tree, sync it with what FreeBSD currently has.
I prefer portsnap for this. Some others prefer csup.

If you use packages it depends on package version that is currently on freebsd server. The packages (binaries) are built from source as well but it's not done on daily basis. Building of packages for FreeBSD server is also depends on stability of current sources (new bugs etc). So devs usually will not build a package untill it's source becomes stable enough.
Package version also depends on "branch": RELEASE, STABLE or CURRENT. RELEASE always has same versions of packages that was new and stable at the release time but became outdated later. For example for 8.0-RELEASE version of Gnome is still 2.26 but current Gnome version is already 2.30.
That's why many people prefer to follow STABLE branch: it always has updated FreeBSD sources and newest versions for packages.
However it's possible to get last version of packages staying with RELEASE by fetching packages from STABLE branch. This could be done with setting environment for pkg_add i.e to tell it where to look for packages. For example:
[CMD=" "]# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/[/CMD]
Good luck!
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby ObiektywNy » 25 May 2010, 15:39

I did :) thanks
and so far I am using [cmd=]portmaster --force-config -ad[/cmd] command to update ports, I I met some problem during that process like "port already installed" I am using
Code: Select all
[# /usr/ports/portsgoup/portname/] make deinstall
command or [CMD=" "]pkg_delete -f portname[/CMD] to remove it and install again. I hope I am going in right direction with that.
User avatar
ObiektywNy
Junior Member
 
Posts: 54
Joined: 05 May 2010, 16:50
Location: US

Postby zeiz » 25 May 2010, 16:31

Well done!
However you may want to try dropping option --force-config which I believe is used to bring Options dialogs for ALL ports installed not only for all those you are updating.
portmaster makes config-recursive by default and if you specified -a all the ports in work will be configured. By using --force-config you are probably just confirm already done
configs also for those ports that won't be updated at the moment due to they are up-to-date.

By the way I am on 8-STABLE and just updated src and rebuilt world and kernel and I got 8.1-PRERELEASE :)
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: Windmill and 1 guest