# upgrade 12.0 to 12.1 - poudriere question



## cm-vdp (Jan 23, 2020)

Hello,
I am still not familiar with poudriere.
I want to upgrade all my freebsd servers to 12.1. I am using poudriere .
According the documentation I need to create a new jail or upgrade the existing one.  But what is the next step ? Rebuilding the ports  (poudriere options , poudriere bulk) ?
I looked at the documentaion but it's not still clear for me.
Thanks in advance.


----------



## SirDice (Jan 23, 2020)

With a major or minor upgrade I always create a new jail. For patch updates I just update the existing jail. With the new jail I do the options then a bulk build. You can also copy the entire *-options directory. But I still do a regular option run every now and then as options tend to change over time.


----------



## cm-vdp (Jan 23, 2020)

Ok thanks for your support. I have another question.
The first time I build the ports I used the -f option. Is there a way to build the ports without the -f  option. Because after the build  I added  new ports without updating the package list.
Or can I create a new package list on basis of the existing ports  ?


----------



## SirDice (Jan 23, 2020)

I have different versions of FreeBSD running and have different package lists for each. I've created a small script that runs everything:

```
#!/bin/sh

POUDRIERE=/usr/local/bin/poudriere

BASEDIR=/usr/local/etc/poudriere.d

${POUDRIERE} ports -u -p desktop
${POUDRIERE} ports -u -p server

for j in 12-stable 121-release; do
  ${POUDRIERE} bulk -j ${j} -p server -f ${BASEDIR}/${j}-server-package.lst
done

for j in 12-stable; do
  ${POUDRIERE} bulk -j ${j} -p desktop -f ${BASEDIR}/${j}-desktop-package.lst
done
```
The desktop loop is a bit useless at the moment (there's only one entry), that's because I recently upgraded a bunch of machines and got rid of all 11.x versions I had.


----------



## cm-vdp (Jan 23, 2020)

But how do you build/update/maintain your  ${j}-server-package.lst ?


----------



## SirDice (Jan 23, 2020)

I just add what I need. Nothing special. 

Here's my 121-release-server-package.lst:

```
% cat 121-release-server-package.lst
ports-mgmt/portlint
databases/couchdb2
sysutils/beats
security/heimdal
multimedia/plexmediaserver
devel/rubygem-pdk
www/rubygem-rails5
devel/phabricator
www/npm
mail/exim
mail/dovecot
mail/dovecot-pigeonhole
mail/roundcube
mail/roundcube-contextmenu
mail/roundcube-markasjunk2
mail/roundcube-sauserprefs
mail/roundcube-sieverules
games/mvdsv
security/clamav
security/sshguard
sysutils/goaccess
irc/irssi
irc/irssi-scripts
net/mtr
net/haproxy
sysutils/ezjail
security/acme-client
security/acme.sh
misc/mc
security/sudo
net/openntpd
devel/arcanist
devel/git
databases/puppetdb-terminus6
databases/postgresql11-contrib
databases/postgresql11-server
databases/postgresql96-server
databases/puppetdb6
sysutils/puppet6
sysutils/puppetserver6
www/py-puppetboard03
www/rubygem-passenger
sysutils/rubygem-r10k
sysutils/ipmitool
dns/bind-tools
sysutils/tmux
editors/vim-console
www/apache24
www/nginx
security/strongswan
security/nmap
www/mod_php72
www/webtrees
databases/mariadb102-server
databases/mysqltuner
net-mgmt/zabbix4-agent
net-mgmt/zabbix42-agent
net-mgmt/zabbix42-frontend
net-mgmt/zabbix42-server
net-mgmt/zabbix42-java
textproc/p5-YAML-Tiny
sysutils/tree
games/crossfire-server
devel/jenkins-lts
textproc/elasticsearch6
textproc/kibana6
sysutils/logstash6
sysutils/logstash7
www/grafana5
devel/subversion
sysutils/puppet-lint
www/gitlab-ce
devel/gitlab-runner
net/samba410
archivers/unrar
archivers/unzip
ftp/wget
archivers/par2cmdline
archivers/p7zip
sysutils/smartmontools
```


----------



## cm-vdp (Jan 23, 2020)

I'm a linux sysadmin, since 2019 I also work with freebsd. I see the benefits of freebsd and package management. But according to me the update/upgrade mechanism with poudriere is a complex and time consuming operation.  We have 20 freebsd servers  (web, database,proxy ...) all managed by poudriere.  The first time I build the ports I have to do an inventory of all the installed  packages (without the dependencies,pkg query) merge the output of all the servers.
After the build I installed new packages with poudriere without  updating the packagelist. I know this is my fault, but at this moment the packagelist is not complete.  Now I have to look what packages I'm missing and add them to the packagelist.  I would be easy if I can build the packagelist based on the builded ports at the poudriere server.


----------



## SirDice (Jan 23, 2020)

cm-vdp said:


> I would be easy if I can build the packagelist based on the builded ports at the poudriere server.


Start with the output from `pkg leaf`. Once you have a good, complete list try to work the other way around. Add it to the package list first, then let it run a build. This new build should only build the things that are missing. Run a regular `pkg version -vRL=` and watch for orphans (they'll show up with a question mark).


----------



## cm-vdp (Jan 23, 2020)

OK thanks !! you're great


----------

