# Single package repo (...or how to stop building chromium)



## einsibjani (Feb 24, 2022)

We have a poudriere server that builds all the packages we need on our servers.
The port that gives us the most headaches is chromium. We use it with www/selenium to do automated web functionality tests.

We've basically given up on maintaining the build, it can take hours to build, even with ccache, and sometimes breaks for strange reasons, while still building for the official repo.

What we want to do is keep FreeBSD repo disabled, but still install chromium from there.
I thought `pkg install --repository FreeBSD chromium` would allow us to do it, but apparantly the docs for pkg-info are wrong, setting --repository does *not* enable an otherwise disabled repository.

Is there a simple way to have the FreeBSD repsitory configured, but ensure it's only used to install chromium? I don't want to use priorities, unless there is a priority that says "Never install from this repo, unless explicitly selected" because I just know that future me will start using a new package and forget to add it to poudriere, and I won't notice because the server will just fetch it from upstream and I'm none the wiser.

Any ideas?


----------



## zirias@ (Feb 24, 2022)

IMHO better approach: pull the binary package into your repository. ports-mgmt/poudriere-devel automates that, just add this to your poudriere.conf:

```
PACKAGE_FETCH_BRANCH=latest
PACKAGE_FETCH_WHITELIST="chromium"
```
If you leave out the whitelist, it will use _any_ binary package with matching/default options and dependencies.


----------



## SirDice (Feb 24, 2022)

einsibjani said:


> We have a poudriere server that builds all the packages we need on our servers.
> The port that gives us the most headaches is chromium. We use it with www/selenium to do automated web functionality tests.


ports-mgmt/poudriere-devel has the option to pull packages from the official repositories. That might be a good solution for you in this case.

Edit: Zirias and I seem to have the same idea


----------



## astyle (Feb 24, 2022)

This may be going off on a tangent, but I think you guys should stay away from Chromium because it's got issues with offline disk cache size management - and that setting is not only difficult to find, it keeps drifting in and out of different versions, adding to the nightmare. A long time ago, I once worked around that on Windows by installing Chrome to a VHD that has hard limits on size - that led me to ditching Chrome/Chromium altogether. And to this day, I still don't see that the issue was ever properly resolved.


----------



## einsibjani (Feb 24, 2022)

Zirias said:


> IMHO better approach: pull the binary package into your repository. ports-mgmt/poudriere-devel automates that, just add this to your poudriere.conf:
> 
> ```
> PACKAGE_FETCH_BRANCH=latest
> ...


This sounds like exactly what I want, but I've only ever used ports-mgmt/poudriere
How stable is ports-mgmt/poudriere-devel?


----------



## SirDice (Feb 24, 2022)

einsibjani said:


> How stable is ports-mgmt/poudriere-devel?


I've been running -devel for a really long time now, you might get the odd bug every now and then but for the most part it just does what it's supposed to do.


----------



## astyle (Feb 24, 2022)

Funny, I still have an unresolved issue about getting updates to show up:









						'poudriere bulk' not finding updates to the tree
					

Discussion:  I set up a tree at /usr/ports/poudriere_tree.  Just setting everything up for the first time, everything worked fine.   # poudriere ports -l default   null   2021-11-23 17:10:39 /usr/ports/poudriere_tree  When I was compiling packages for the first time, Plasma was at v. 5.21.5, and...




					forums.freebsd.org


----------



## zirias@ (Feb 25, 2022)

On a quick glance, this looks like you're doing "funny" things with your tree to only contain some ports or whatever ... poudriere needs a complete tree to work correctly. You typically tell it what to build with the `-f` option.


----------



## astyle (Feb 25, 2022)

Zirias said:


> On a quick glance, this looks like you're doing "funny" things with your tree to only contain some ports or whatever ... poudriere needs a complete tree to work correctly. You typically tell it what to build with the `-f` option.


Yeah, that was a quick glance. I take the complete tree, and _update_ a subset of ports in there.


----------



## einsibjani (Feb 27, 2022)

Zirias said:


> IMHO better approach: pull the binary package into your repository. ports-mgmt/poudriere-devel automates that, just add this to your poudriere.conf:


I installed poudriere-devel, but it doesn't help me at the moment, because the official 122amd64 builders can't build the chromium version in the latest port tree either, so poudriere continues to try to build. It doesn't care that there is a binary pkg for an earlier version in the repo.


----------



## grahamperrin@ (Feb 28, 2022)

einsibjani said:


> … It doesn't care that there is a binary pkg for an earlier version in the repo.



That seems weird. What was your command for the bulk run?


----------



## einsibjani (Feb 28, 2022)

grahamperrin said:


> That seems weird. What was your command for the bulk run?


poudriere bulk -b latest -j 12amd64 -z default -p 12amd64_default

PACKAGE_FETCH_BRANCH=latest
PACKAGE_FETCH_WHITELIST="chromium"

Just tried now and it worked! I guess the package got build upstream


----------



## einsibjani (Mar 2, 2022)

einsibjani said:


> poudriere bulk -b latest -j 12amd64 -z default -p 12amd64_default
> 
> PACKAGE_FETCH_BRANCH=latest
> PACKAGE_FETCH_WHITELIST="chromium"
> ...


... and now it doesn't work.
"deps wanted" and "deps remote" don't match. I guess a port like chromium with the number of deps it has will have a hard time. Every time a dep port is upgraded poudriere will check for an upstream pkg and when it doesn't exist (because it takes forever to build) it will try to build it itself.


----------



## zirias@ (Mar 2, 2022)

einsibjani said:


> ... and now it doesn't work.
> "deps wanted" and "deps remote" don't match. I guess a port like chromium with the number of deps it has will have a hard time. Every time a dep port is upgraded poudriere will check for an upstream pkg and when it doesn't exist (because it takes forever to build) it will try to build it itself.


Your interpretation isn't correct. Un upgraded lib won't trigger this, as long as it isn't a breaking change (which would require a new "minimum version" for the dependency, or in case of a lib dependency, depend on a new "`SONAME`"). What you see here is a _changed list of dependencies_ as a result of a change to chromium itself:


			https://cgit.freebsd.org/ports/commit/?id=bfedd5f1f016c174f3fe18cd38c8517ece7b1e9b
		

The dependency changes are obvious from the commit message.

Yes, it will take the official builders a while (probably a few days) to have a package for that new version. Either wait for it or just build it yourself this time.


----------



## einsibjani (Mar 2, 2022)

Zirias said:


> Yes, it will take the official builders a while (probably a few days) to have a package for that new version. Either wait for it or just build it yourself this time.


The reason I started this thread is because chromium fails to build, and has been failing for a few weeks.

I started a new thread about it, since it's unrelated to this issue.








						www/chromium fails to build
					

www/chromium fails to build for me. The error in the log is:  [ 99% 49143/49382] python3 "../../build/toolchain/gcc_link_wrapper.py" --output="./mksnapshot" -- c++ -pie -fuse-ld=lld -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics...




					forums.freebsd.org


----------



## zirias@ (Mar 3, 2022)

As a workaround, you could add a `BROKEN=` line to the chromium port Makefile (e.g. in a local git branch that's automatically rebased onto main when updating) and also set this in poudriere.conf:
`COMMIT_PACKAGES_ON_FAILURE=no`

This way, your own repository will only be updated when chromium could be fetched successfully.


----------

