• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Ports update and a portmaster

svm

New Member


Messages: 3

#1
Hello!
I always installed the software from the ports through the portmaster. But on one machine software was put in a classical way - through ports (make deinstall, make reinstall clean) (without a portmaster).
Can I now install the portmaster on this machine and update it with it? This is a mail server. It is installed - postfix / dovecot / apache / mysql / postfixadmin / rundcube and more on trifles. Or continue to update through ports without a portmaster?
System FreeBSD 11.1-RELEASE # 0 r321309: amd64
 

Lamia

Active Member

Thanks: 17
Messages: 119

#4
Run "portsnap fetch update" followed by "portsnap fetch install". You may want to look at the benefits of using portsnap over portmaster, and vice versa. Portsnap may need to be installed.
 

svm

New Member


Messages: 3

#5
The thread [Guide] A closer look at Portmaster explains portmaster with detail.
portmaster(8) is also worth reading ;)
Thank you very much! At the weekend I will update.

Run "portsnap fetch update" followed by "portsnap fetch install". You may want to look at the benefits of using portsnap over portmaster, and vice versa. Portsnap may need to be installed.
I used to put software from ports through portsnap fetch update and then _port_ / make install clean.
But then I started using the portmaster.
On the machine you need to update, the software was installed (not by me) via _port_ / make install clean.
Here also I ask - whether dependences of a software after updating not not will be broken not in the classical way?
 

ShelLuser

Son of Beastie

Thanks: 1,191
Best answers: 5
Messages: 2,558

#6
I always installed the software from the ports through the portmaster. But on one machine software was put in a classical way - through ports (make deinstall, make reinstall clean) (without a portmaster).
Not a problem at all, because in the end that's also exactly what Portmaster does. The only difference is that it has the tasks automated, which makes it easier on you.

But bottom line: Portmaster doesn't do anything which you couldn't also do with the standard make commands.

Run "portsnap fetch update" followed by "portsnap fetch install". You may want to look at the benefits of using portsnap over portmaster, and vice versa. Portsnap may need to be installed.
Sorry to say but you're comparing apples and oranges here. Both programs have absolutely nothing in common with regards towards functionality.

portsnap(8) is a standard command within the FreeBSD base system (so it does not need to be installed) and it's used to update the ports collection. ports-mgmt/portmaster is a shell script provided as a port and can be used to install and/or upgrade ports. So you don't use one over the other, you normally use them together since both perform different tasks.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#7
Thanks ShellLuser for your input.I saw someone recommending portsnap over portmaster in this forum awhile back and had taken such recommendation very seriously without probing it much more further (despite reading about it on the Freebsd website).

I have not been using portmaster even though I had always expected that there should be a short-cut to install packages via port than the "make config|install clean" commands. Little did I know that the "portmaster" command is what does the trick.

Needless to say that I read about portmaster, when I started to use FreeBSD and was lost in the endless number of packages & commands to store in my Medulla Oblongata.
 

Minbari

Active Member

Thanks: 105
Messages: 217

#8
Before you run portmaster read /usr/ports/UPDATING. Always read this file first and then run portmaster. Always! Or you can get into trouble.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#9
Before you run portmaster read /usr/ports/UPDATING.
Thanks Minbari for that note. Is there any friendly tool to use read this file? It is such a long file that I have found using "less or even grep/nano" for has not been an efficient activity to always do.
 

ShelLuser

Son of Beastie

Thanks: 1,191
Best answers: 5
Messages: 2,558

#10
Before you run portmaster read /usr/ports/UPDATING. Always read this file first and then run portmaster. Always! Or you can get into trouble.
Good point.

Or you let a script handle it for you ;) This is one of the reasons I'm so content with the 'new' (it's pretty common now) packaging system, even though I also seriously enjoyed working with the Solaris tools:

(a snippet of my upgrade script):
Code:
log_new() {
        pkg version -Il\< > $WP/$ME.log
}

log_updating() {
        for a in `cat $WP/$ME.log | cut -d '-' -f1`; do
                pkg updating $ucmd $a >> $WP/$ME-updating.log;
        done
}
I think this speaks for itself. The first function gives you a list of all the ports for which there is a new version, the second checks the UPDATING database to see if one of those is relevant for your system. It's not full proof yet because in its current form this script doesn't account for ports which have more dashes in them (example: php56-gd-5.6.33_1) but that's on my todo (I always verify manually anyway).

Still.. this can always provide a good reminder.
 

drhowarddrfine

Son of Beastie

Thanks: 795
Messages: 2,578

#11
Thanks Minbari for that note. Is there any friendly tool to use read this file? It is such a long file that I have found using "less or even grep/nano" for has not been an efficient activity to always do.
I just use vi or vim. You usually only need to read the last update to see if it applies to you or a program you run.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#12
Thanks ShellLuser and drhowarddrfine:).
 

Minbari

Active Member

Thanks: 105
Messages: 217

#13
I'm using vim to check if something is changed in usr/ports/UPDATING, also after portmaster it's completed the updates I'm running pkg_libchk -qo to see if a program it's using old libraries and need to be rebuilt. If more than one is listed, I give the entire list to portmaster so it can rebuild them in the correct order.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#15

Lamia

Active Member

Thanks: 17
Messages: 119

#16
I was going to suggest that you change the status of this thread to SOLVED.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Best answers: 11
Messages: 26,762

#17
Thanks Minbari for that note. Is there any friendly tool to use read this file? It is such a long file that I have found using "less or even grep/nano" for has not been an efficient activity to always do.
You only have to read the top comments. They all start with a date stamp. So you really only have to read the things up to the date of your last updates. Anything before that should already have been done.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#19
Isn't it a bit risky to update a live system like this? Why not use ports-mgmt/synth or ports-mgmt/poudriere either locally on another machine to build and then upgrade?
I actually think it might be better off to always update a live system via portsnap/postmaster/pkg all linked to freebsd.org than from a local build/repo system. This suggestion might be valid for users with low end systems that cannot build the entire freebsd ports in at least a week.

I have been building (cross-compiling for ARMv6) llvm5 since five days ago. And I can tell you that it also takes me (on my 4 x 2core@100% VPS & another core i7) three days or more to build eight packages for AMD. How much more the entire ports?

So my philosophy is that one can rely on the global FreeBSD repo for their RELEASE upgrades/updates and their local repo for custom/test packages/etc at least if they do not have 'supercomputers'.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#21
Isn't it a bit risky to update a live system like this? Why not use ports-mgmt/synth or ports-mgmt/poudriere either locally on another machine to build and then upgrade?
Coming back to this question, how would one build all ports via poudriere? It is not bad to have one's pkg repo with an up-to-date ports tree for all install/upgrade. Would one have to list all the ports in the pkglist file in the /usr/local/etc/poudriere.d/ dir? If YES, is there a list of ALL these ports somewhere on the Internet so that one can simply copy 'n' paste?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Best answers: 11
Messages: 26,762

#22
Coming back to this question, how would one build all ports via poudriere?
You typically don't. You only build the stuff you actually need. I really don't want to wait for KDE to complete before I can update our webservers ;)

But, if you do want to build everything (all 33.000+ ports!); poudriere bulk -a:
Code:
   bulk
     These subcommands are mutually exclusive.

     -a           Build all ports in the tree.
 
Top