Solved Installing packages both form FreeBSD and Synth repository?

Greetings all,

I am using packages about 99+% of the time, but I am trying to experiment with using the audio packages for a cross-over. Thus, I need to build some of the packages with different options. Since this will represent minor number of packages I have set up ports-mgmt/synth instead of ports-mgmt/poudriere.

I have been following T-Aoki's recommendation here https://forums.freebsd.org/threads/how-to-use-ports-and-packages-system-together.97877/#post-701922, so it seems to work well, but I have some concerns:

1. If I do not install a package immediately upon its build, how do I cause ports-mgmt/pkg to install from the Synth repository for the built packages and from the FreeBSD repository for the other packages? I read the pkg.conf(), but I did not find away of configuring this.
2. How do I prevent pkg upgrade to overwrite the Synth-built packages. Locking these packages does not seem like a smart idea, I would rather re-build them before upgrading. Can I somehow list the packages to be upgraded and compare them to my list?
3. Based on what I read about ports-mgmt/poudriere, it does not seem like it would solve my problem, apart, of course, of building every package, which I do not want to do.

Kindest regards,

M
 
1. If I do not install a package immediately upon its build, how do I cause ports-mgmt/pkg to install from the Synth repository for the built packages and from the FreeBSD repository for the other packages? I read the pkg.conf(), but I did not find away of configuring this.
You have to use the pkg-install(8) -r option to specify the "Synth" repository. E.g.:
Code:
# pkg install -r Synth <package_name>
# pkg install -r FreeBSD-ports <package_name>
  • "Synth" = default name of the local synth repository, automatically created by ports-mgmt/synth (/usr/local/etc/pkg/repos/00_synth.conf)
  • "FreeBSD-ports" = default remote "quarterly" repository (/etc/pkg/FreeBSD.conf)


2. How do I prevent pkg upgrade to overwrite the Synth-built packages. Locking these packages does not seem like a smart idea, I would rather re-build them before upgrading. Can I somehow list the packages to be upgraded and compare them to my list?
Perhaps something like:

Get a list of synth installed packages:
Code:
# pkg query '%o=%R' | grep =Synth | cut -d = -f 1 > synthbuild.list
This creates a "origin/name" (e.g.: shells/bash) list of "Synth" repository installed packages in a file, which can be used by synth.

Upgrade synth installed packages:
Code:
# synth build synthbuild.list
Answer "yes" for rebuilding local repository,
answer "yes" to upgrade synth installed packages.

Packages which don't need upgrading are not built.


3. ports-mgmt/poudriere shouldn't be much different than with ports-mgmt/synth. To install new or to upgrad packages one must use pkg-install(8) and pkg-upgrade(8) -r <poudriere_repo> option.
 
Hi T-Daemon,

thank you for the reply.

You have to use the pkg-install(8) -r option to specify the "Synth" repository.
Ha, ha, yes, I discovered that by reading the pkg() after having failed to find an answer in pkg.conf(). BTW, how does one put the number into the ()?

Get a list of synth installed packages:
I have actually found a list of all the synth-built packages in /var/synth/packages/, either ALL or Latest. I was then thinking that I will attempt to re-build all such packages before attempting pkg upgrade. My understanding is that as long as I have the package and ports repository synchronized, the package version, whether form synth or FreeBSD repository should be the same.

Since I will be building very few packages, I doubt that configuring ports-mgmt/poudriere provides any benefit.

Kindest regards,

M
 
Back
Top