# Lock port version.



## Ove_ (Oct 16, 2016)

Hi everyone. I am planning on setting up a package repository. But for purposes such as production stability etc I want to lock the versions of a certain software being compiled or used in ports. I am not looking to do a pkg lock. I want to do this in ports already. 

I've previously used poudriere to build custom packages - which we require. But I havent had the requirements of locking versions of a piece of software. And I couldn't find a way to do what I want to do.

Is this possible with poudriere - or with a tool of similar purpose? I am open to try new stuff.


----------



## marino (Oct 16, 2016)

As long as you maintain a custom ports tree, it's possible with both ports-mgmt/poudriere and ports-mgmt/synth.

I want to stress that it means you keep a port at a specific version MANUALLY, which basically means you'll be maintaining your own tree.

Maybe you'd be better off using a Quarterly branch of ports which don't get changed much in a 3-month period, usually only security and bug fixes get in, not new versions.


----------



## kpa (Oct 16, 2016)

You could create your own custom local branch using GIT and pull in new updates selectively from the head branch.


----------



## Ove_ (Oct 17, 2016)

marino@ said:


> Maybe you'd be better off using a Quarterly branch of ports which don't get changed much in a 3-month period, usually only security and bug fixes get in, not new versions.


Probably this would be the better option over maintaining ports manually.

But what I would really want to be able to do is to pkg upgrade on all servers except for a few packages. The packages that I want to use is however not in production, they're only used to build releases of software to use in production.

I could accomplish this by using two poudriere repo's also. I will continue thinking about this one for a while.


----------



## SirDice (Oct 17, 2016)

Ove_ said:


> But what I would really want to be able to do is to pkg upgrade on all servers except for a few packages. The packages that I want to use is however not in production, they're only used to build releases of software to use in production.


Set up your own repository. Besides having more control over packages you also  don't get build dependencies installed on production servers.


----------



## marino (Oct 17, 2016)

Ove_ said:


> But what I would really want to be able to do is to pkg upgrade on all servers except for a few packages. The packages that I want to use is however not in production, they're only used to build releases of software to use in production.



This is a standard option on ports-mgmt/synth ([N] Fetch prebuilt packages).
It works fine, but I've seen it get checksum failures that can't be passed until you delete /usr/local/etc/pkg/repos/00_synth.conf.  That means pkg(8) is searching the synth repository as well as the FreeBSD repository, so that's a minor bug that needs to be fixed.

However, I personally don't recommend the option.  There should be time and resources to build everything.  However, people wanted the option to have the feature and thus it exists.


----------

