Synth: Introducing new custom package repository builder for FreeBSD and DragonFly

cbrace

Well-Known Member

Reaction score: 9
Messages: 280

Hi all,

Is there are recommended way to use synth to upgrade the version of php in use? My site is currently running php v7.0 and I'd need to move to v7.1 or higher.

In the past, using ports-mgmt/portmaster etc I kept running into problems doing this, ie, it took several attempts to upgrade versions of PHP and Perl. It is one of those tasks that I as a very part-time sysadmin only undertake from time to time; I forget how to do it properly and end up breaking my Joomla, Roundcube, and Nextcloud setup.

Yesterday I tried simply installing lang/php71 using synth, hoping it would update the dependencies according, but yet again I ran into problems, and had to revert to php70 to get everything working again.

Thanks for pointing me in the right direction.
 

cbrace

Well-Known Member

Reaction score: 9
Messages: 280

I've added that line to /etc/make.conf, thanks.

Reinstalling nextcloud, I'm prompted for the flavor, so I choose nextcloud@php72, obviously.

But when I try to reinstall joomla3, there are no flavors, and synth deletes all the php72 dependencies and reinstalls the php70. :( :( :(

Once again, I have reverted to php70 to run Joomla.
 

Mayhem30

Well-Known Member

Reaction score: 20
Messages: 397

When using synth, you need to add DEFAULT_VERSIONS+=php=72 in your /usr/local/etc/synth/LiveSystem-make.conf file.

That should fix your issue.
 

free-and-bsd

Aspiring Daemon

Reaction score: 75
Messages: 695

I'm also trying to understand if synth is dynamic enough to build a package for a client that requests a port to be installed or if I have to go to synth first.
My, but that would be too damn "dynamic", wouldn't you think so? I'm afraid your help will be needed for Synth to understand which particular port the client requests.

Seriously, though, the degree of the supposed "dynamism" can be imagined. For example, does it make any sense building a separate package for an unknown machine without building the dependencies? So, the dependencies WILL be needed. But then, up to what depth? What packages/versions are already installed on the target client machine?

So, you create a corresponding PROFILE and keep the needed packages in sync with the ports tree -- then you can add another package to that repository. Then you make that repository available to your client machine and then install whatever packages that machine would need. Your client's pkg command will know which dependencies from the repo it needs and which are already installed. I hope that covers it more or less.
 

Sevendogsbsd

Aspiring Daemon

Reaction score: 332
Messages: 659

So, was a bit of work, but set up a build server so I can custom build ports --> packages for my personal workstation. Initially used ports-mgmt/poudriere but I find ports-mgmt/synth to be faster at builds and easier to manage. So far so good, works like a charm! Got my repository set up and my workstation happily uses it. Only bad part was the initial set up of figuring out which packages I had used, configuring the ones I needed to, then building a file with the list so ports-mgmt/synth could build them and create the repo. Now it's just maintenance so no worries.
 

Mayhem30

Well-Known Member

Reaction score: 20
Messages: 397

When you run synth status, does the display order show what the dependencies are?

For example :
Code:
These are the ports that would be built ([N]ew, [R]ebuild, [U]pgrade):
  N => security/openssl111
  R => lang/python27
  ...
  ...
  N => security/openssl
  R => security/py-fail2ban@py36
  ...
  ...
Does the above mean that security/py-fail2ban depends on security/openssl port?

I'm curious why fail2ban won't compile using security/openssl111 instead.
 

cbrace

Well-Known Member

Reaction score: 9
Messages: 280

After updating my VPS to v12.0-RELEASE today using freebsd-update, I am trying to update the ports, but synth is choking on something:
$ sudo synth upgrade-system
Builder mounts detected; attempting to remove them automatically ...
Dismounting successful!
Regenerating flavor index: this may take a while ...

raised REPLICANT.SCENARIO_UNEXPECTED : /usr/sbin/mtree -p /usr/obj/synth-live/SL09/var -f /etc/mtree/BSD.var.dist -deqU => failed (exit code not 0)
Any ideas about what is going wrong here?
 
Top