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

Build the repository and then use pkg(8) commands.
Whenever you talk about installed package, you're actually taking about pkg(8). Synth just builds them.
 
Last edited by a moderator:
I'm stuck getting to compile the new pecl-redis port to compile against PHP 7.
I'm trying to build it in a master where no PHP is installed.
But in my LiveSystem-make.conf I have
Code:
DEFAULT_VERSIONS+= php=7.1
But when I try to install the build in one of my jails which has PHP installed, png pkg wants to uninstall PHP7 extensions and install pecl-redis together with php56.

What am I missing?
 
Chris_H
This is my /etc/make.conf ind the jail:
Code:
WRKDIRPREFIX=        /var/ports
DISTDIR=        /var/ports/distfiles
PACKAGES=        /var/ports/packages
INDEXDIR=        /var/ports
WITH_OPENSSL_PORT=      yes

DEFAULT_VERSIONS= php=7.1
DEFAULT_VERSIONS+= mysql=10.1m

This is /usr/local/etc/synth/LiveSystem-make.conf in the base system:
Code:
#MAKE_JOBS_UNSAFE=yes
DEFAULT_VERSIONS= mysql=10.1m
DEFAULT_VERSIONS+= ssl=libressl
DEFAULT_VERSIONS+= php=7.1
DEFAULT_VERSIONS+= python3=3.6
 
It's a dependency factor then. I have found that Synth is quite pedantic about this. Which frustrated me at first,
but have now become quite grateful for it. I have no idea what you're building against. So I can only assume
that something in the list either includes php5x, or, perhaps more likely; that you already have the php5x-extensions
installed, and since png was built against it previously, it will call upon it again. Have you looked at whether the php5x
extensions asked for png? Or was png built with a php5x-extension option? I know this much, looking at php56-extensions;
IGNORE_WITH_PHP= 70 is defined -- meaning; if you already have the lang/php56-extentions installed,
and you ask Synth to build php7, which wants any extensions. Synth will rightfully bail. Based on the evidence
in the php56-extensions Makefile.
My suggestion;
pkg delete lang/php56-extensions
Also possibly lang/php56, if it's already installed. It doesn't look to me like they'll both
live in harmony (php56 && php7x).
Then attempt this process again. Which may require re-building your pkg(8) repo.

HTH

--Chris
 
Chris_H :
I just realized that autocorrect made "png" out of "pkg". Sorry for the misunderstanding – I corrected it in my post.

As I said I don't have any PHP versions installed on the base system synth is running in.
But in my list of packages I build for all my jails, there also is php56 and php70 (and their extensions)…
 
Chris_H :
I just realized that autocorrect made "png" out of "pkg". Sorry for the misunderstanding – I corrected it in my post.
Ahh. Thanks.
As I said I don't have any PHP versions installed on the base system synth is running in.
But in my list of packages I build for all my jails, there also is php56 and php70 (and their extensions)…
IMHO I think this will simply be an exersize in foot shooting. Meaning; Synth will dutifully attempt to grant your request.
But will likely find during the build session, that both php56 && php7x can't be fully satisfied, and will
simply fail on some of your list entries. I think you have to make a choice between php56, or php7x.
That's what I would do, if I were in your situation. :)

Good luck!

--Chris
 
Ahh. Thanks.

IMHO I think this will simply be an exersize in foot shooting. Meaning; Synth will dutifully attempt to grant your request.
But will likely find during the build session, that both php56 && php7x can't be fully satisfied, and will
simply fail on some of your list entries. I think you have to make a choice between php56, or php7x.
That's what I would do, if I were in your situation. :)

Good luck!

--Chris
Thanks for the input!
I thought adding php to make.conf would be plenty enough.
I'll try this tomorrow (removing all but one php version from my list) and come back to report.
 
Chris_H
You were right!
The make.conf and the order of the ports in the list doesn't make any difference in this case.
I removed all but one php version in the list and then it worked.
Thanks!
 
Dear synth developer, could you please make synth finally be a replacement for portmaster by making it first scan through make configs of the ports to be built and if there is either no saved config or saved config is outdated (new options appeared, some options got obsoleted) - it would run a series of make config prompts prior to starting the building queue.
I guess that would need to be run recursively, since checking new options may increase the build queue and thus the new port-dependencies need to also be scanned for make config first and they also may increase the build queue... and so on.
Unfortunately, I still have to use portmaster from time to time because synth is just not capable of that.
 
Also, synth failed to build graphics/dri for me:
Code:
In file included from buffer.c:36:
In file included from ./va_private.h:35:
/usr/local/include/va/va_backend.h:33:10: fatal error: 'linux/videodev2.h' file not found
#include <linux/videodev2.h>
^
In file included from config.c:35:
In file included from ./va_private.h:35:
/usr/local/include/va/va_backend.h:33:10: fatal error: 'linux/videodev2.h' file not found
#include <linux/videodev2.h>
^
In file included from context.c:37:
In file included from ./va_private.h:35:
/usr/local/include/va/va_backend.h:33:10: fatal error: 'linux/videodev2.h' file not found
#include <linux/videodev2.h>
^
1 error generated.
gmake[5]: *** [Makefile:689: buffer.lo] Error 1
gmake[5]: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
gmake[5]: *** [Makefile:689: context.lo] Error 1
gmake[5]: *** [Makefile:689: config.lo] Error 1
gmake[5]: Leaving directory '/construction/xports/graphics/dri/work/mesa-17.0.3/src/gallium/state_trackers/va'
gmake[4]: *** [Makefile:606: all-recursive] Error 1
gmake[4]: Leaving directory '/construction/xports/graphics/dri/work/mesa-17.0.3/src/gallium'
gmake[3]: *** [Makefile:860: all-recursive] Error 1
gmake[3]: Leaving directory '/construction/xports/graphics/dri/work/mesa-17.0.3/src'
gmake[2]: *** [Makefile:651: all] Error 2
gmake[2]: Leaving directory '/construction/xports/graphics/dri/work/mesa-17.0.3/src'
gmake[1]: *** [Makefile:648: all-recursive] Error 1
gmake[1]: Leaving directory '/construction/xports/graphics/dri/work/mesa-17.0.3'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Stop.
make: stopped in /xports/graphics/dri
While portmaster built it just fine for me.
 
Following the PR I could successful compile it with poudriere
if I add
Code:
VAAPI_BUILD_DEPENDS=    ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
to the Makefile.
(But no guarantee. I am not clear about the VAAPI_LDFLAGS question in the PR).
 
I'm having two problems:

www/nginx-devel fails for me, I don't know why:

Code:
[…]

 /usr/local/include/luajit-2.0  -I objs  -I src/http  -I src/http/modules  -I src/http/v2  -I /construction/xports/www/nginx-devel/work/ngx_devel_kit-0.3.0/src  -I /construction/xports/www/nginx-devel/work/ngx_devel_kit-0.3.0/src  -I /construction/xports/www/nginx-devel/work/ngx_devel_kit-0.3.0/objs  -I objs/addon/ndk  -o objs/addon/src/ngx_http_lua_ssl_ocsp.o  /construction/xports/www/nginx-devel/work/lua-nginx-module-0.10.8/src/ngx_http_lua_ssl_ocsp.c
/construction/xports/www/nginx-devel/work/lua-nginx-module-0.10.8/src/ngx_http_lua_ssl_ocsp.c:493:15: error: no member named 'tlsext_status_expected' in 'struct ssl_st'; did you mean 'tlsext_status_type'?
    ssl_conn->tlsext_status_expected = 1;
              ^~~~~~~~~~~~~~~~~~~~~~
              tlsext_status_type
/usr/local/include/openssl/ssl.h:864:6: note: 'tlsext_status_type' declared here
        int tlsext_status_type;
            ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /construction/xports/www/nginx-devel/work/nginx-1.12.0
*** Error code 1

Stop.
make[1]: stopped in /construction/xports/www/nginx-devel/work/nginx-1.12.0
*** Error code 1

Stop.
make: stopped in /xports/www/nginx-devel



--------------------------------------------------
--  Termination
--------------------------------------------------

EDIT

It was Lua – I removed it from the ports options and now it works…

---

And:

I'm trying to automate this command with cron:

portsnap cron update && synth just-build /usr/local/etc/synth/jail_ports.txt && synth prepare-system && ezjail-admin update -P


This is my /usr/local/etc/synth/LiveSystem-environment:
Code:
TERM=dumb
I also tried TERM=xterm

But in the email following the cron execution I still always get:
Code:
[…]

Building new INDEX files... done.
Please define TERM in environment first and retry.
Please define TERM in environment first and retry.

[…]

---

UPDATE

I'm now also having a problem with developing/pecl-judy being ignored:

Code:
[…]

--------------------------------------------------------------------------------
--  Phase: package
--------------------------------------------------------------------------------
===>  Building package for pecl-judy-1.0.2_1
pkg-static: Warning: @exec is deprecated, please use @[pre|post][un]exec
file sizes/checksums    [10]: . done
packing files           [10]: . done
packing directories      [0]: . done



--------------------------------------------------
--  Termination
--------------------------------------------------
 
Dear synth developer, could you please make synth finally be a replacement for portmaster by making it first scan through make configs of the ports to be built and if there is either no saved config or saved config is outdated (new options appeared, some options got obsoleted) - it would run a series of make config prompts prior to starting the building queue.
I guess that would need to be run recursively, since checking new options may increase the build queue and thus the new port-dependencies need to also be scanned for make config first and they also may increase the build queue... and so on.
Unfortunately, I still have to use portmaster from time to time because synth is just not capable of that.
I asked him before. The answer was about my 'outdated portmaster thinking', so I use portmaster as well
 
The error with devel/pecl-judy is a little
bit strange cause there is no pkg-plist and the Makefile contains no @exec.
It installs with port and poudriere but throws the same warning.
I guess this is a portlint error.
I opened PR 218695.
Edit: seems it is caused by /usr/ports/Mk/Uses/php.mk (line 278-284) and seems misinterpreted by synth..
 
This may be a general question. If @unexec and @exec
in the pkg-plist files and Makefiles throws an error, more ports may affected.
~200 ports uses still this keywords (among them x11-toolkits/gtk20, x11/gdm, security/tripwire, www/nginx, security/rkhunter. some of the mod_* ports). Also bsd.tex.mk, bsd.qt.mk and php.mk.
At least in the *.mk files it should changed (if failure or not, it
is deprecated)..
I don't use synth, but this is a question to all synth users, if there are more failures like this.
 
The error with devel/pecl-judy is a little
bit strange cause there is no pkg-plist and the Makefile contains no @exec.
It installs with port and poudriere but throws the same warning.
I guess this is a portlint error.
I opened PR 218695.
Edit: seems it is caused by /usr/ports/Mk/Uses/php.mk (line 278-284) and seems misinterpreted by synth..
Turns out it doesn't build because it only builds with php56. I have only php70 in my list.
Code:
~ # ❯❯❯ cat /var/log/synth/03_ignored_list.log
00:00:13 devel/pecl-judy: cannot be installed: doesn't work with lang/php70 port (doesn't support PHP 7.0 7.1)

But I still don't understand the problem with TERM not being defined…
 
But I still don't understand the problem with TERM not being defined…

The error is about the host environment, not the jail environment.
In other words, add "env TERM=xterm" to the command.

But given the cron command above, the entire thing looks wrong.
Create a dedicated "cron" profile, once that doesn't have ncurses enabled, and use "env SYNTHPROFILE=newprofile". See the man page for environment variables that are used.

If you're still seeing that TERM is required even with a profile that doesn't use ncurses, that may be a recently introduced bug. But lots of people use synth with cron and nobody else complained of a recent bug involving TERM.
 
Back
Top