Solved Convert a jail from upstream to poudriere packages

Hi,

I have an Owncloud jail which has the following packages installed from upstream.

Code:
#pkg query -e '%a = 0' %o
ports-mgmt/dialog4ports
databases/mysql56-server
www/nginx
www/owncloud
databases/php56-redis
ports-mgmt/pkg
security/py-letsencrypt
textproc/py-pygments
databases/redis
editors/vim-lite

I want to customize the Nginx package. So instead of mixing ports and upstream binary, I decided to build the above packages using Poudriere. What is the best way of replacing the above packages with Poudriere ones?

Thanks
 
Last edited by a moderator:
Dear trumee,
setting up devel/poudriere works as described in Thread pkg-package-repository-using-ports-mgmt-poudriere-no-zfs-required.38859 and in the handbook.
Then you have to change the repository in /usr/local/etc/pkg/repos/FreeBSD.conf to direct to the devel/poudriere repository. On my system the file is as below:
Code:
# $FreeBSD: stable/10/etc/pkg/FreeBSD.conf 263938 2014-03-30 15:29:54Z bdrewery $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#  mkdir -p /usr/local/etc/pkg/repos
#  echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

local: {
  url: "file:///usr/local/poudriere/data/packages/10amd64-local-workstation/",
  enabled: yes
}
.
After generating the packages delete the old ones and install the new packages. I think pkg upgrade -F should do that. To be 100% sure pkg delete -a followed by a few pkg install xyz should ensure that no old packages are on the system.
 
You can't. pkg(8) wouldn't be able to resolve the differences; the dependencies would be all messed up. You can, however, have multiple repositories and put a higher priority on the nginx repository.

(Or you can use ports-mgmt/synth with the prefetch option set and have one cohesive local repository)
 
Last edited by a moderator:
both of those tools imply two repositories: a custom one and an official one.
I may have misunderstood the word "replace" I was thinking he meant replace packages in a repo with new packages which would break integrity. Now I guess he means uninstall from host and reinstall with custom packages.

This is one of synth's main raison d'etre so obviously that's one option. It's also a main use of poudriere. Both work on the concept of a second repo and not individual packages.

So the answer is the same: one needs to add the second repo to pkg configuration and give it the highest priority (which synth does automatically with the synth install, synth upgrade-system commands). Poudriere repos for pkg have to be manually configured.
 
Thanks, I ended up delete all the packages in the jails. Followed that by disabling the upstream repo; enabled my local repo and re-installed the packages.
 
Back
Top