Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Feb 2016 01:58:30 +0100
From:      Michel Talon <talon@lpthe.jussieu.fr>
To:        freebsd-ports@freebsd.org
Subject:   Re: Moving to synth (was: Removing documentation)
Message-ID:  <56B939B6.3060101@lpthe.jussieu.fr>

next in thread | raw e-mail | index | archive | help
Greg 'groggy' Lehey wrote:

 > So how would things improve in this respect if we change to synth?
 > There we need a maintainer who understands Ada.  OK, at the moment
 > that's you.  But what happens when you relinquish maintainership for
 > whatever reason?

 > My feeling on the matter is that there's space for more than one tool,
 > as Mathias suggested.  But I think it would help synth to have
 > user-oriented documentation similar to that for portmaster or
 > portupgrade ("to achieve this, do this...").  I could see this as a
 > good addition to the handbook (4.5.3.3).  A(n objective) discussion of
 > the pros and cons of the three alternatives would also be useful.

Having been in the situation of doing such a discussion some 10 years ago,
when portupgrade and portmaster were the fashionable tools, and pkgng
did not exist, i was very interested to discover this tool synth that i 
had never heard of.

Of course unable to find it in the ports i finally found it was a 
DragonFly port very recently
ported to FreeBSD, and then that it was written in Ada. Next task find 
the Ada compiler.
Needless to say, no port named ada under lang, finally found it was 
gcc5-aux. Downloaded
the packages for gcc5-aux and ncurses the port for synth from SVN 
repository, and began compiling.
Somewhere the build broke because of unsupported
pragma Suppress (Tampering_Check);
but after removing this line i had finally a brand new synth.
Frankly one first prerequisite for having this discussion is that the 
*package* synth is ready to be downloaded
and people don't have to go through this ordeal.

Immediately i wanted to test it on a port which is not too much 
connected to other stuff
so i did after synth configure
synth status
and
synth build lang/chicken.
The first one bombed since there was a problem with the options on some 
port. I solved it as required and
synth status gave some answer.
Then the second one decided it needed to recompile 6 ports and started 
doing it. The nice curses
screen appeared, which for sure is beautiful but doesn't say much about 
what is going on.
Fortunately i discovered beautiful logs under /var/log/synth, and 
apparently the 6 builds went OK.
Then it asked me to scan the ports tree which took ages, finally to 
discover that my builds failed
"option check" and do nothing.
This prompted me to try understanding what the crap synth was doing, and 
i finally found that the
"repository" was the place under /usr/obj where synth moved all the 
packages it had compiled, that
there was a ton of mounts under /usr/obj reproducing a clean room 
freebsd system to compile the port.
That the long operation above consisted in running make -V in a lot of 
ports to discover the value
of certain variables which is usually done to compute the INDEX in 
/usr/ports, and that, due to the
above failure the corresponding packages had been removed from the 
repository.  Part of this information
i obtained by looking at the code which is surprisingly readable for 
someone who doesn't know ada.
The exact

This little story leads me to a second prerequisite, produce a more 
complete documentation describing exactly
what synth does, how to solve buggy situations etc. The argument "the 
soft can be directly used by newbies
without documentation" i don't buy.

Finally lets us target the center. I like very much the idea of using 
these mounts to compile the packages.
It is fast and simpler than jails. I also like the idea of doing several 
things simultaneously. Is it really necessary
to use thousands and thousands of lines of code to do that? Concerning 
the objection that portmaster
has no dependency while synth has dependencies i think this objection 
has no merit since it is a binary
which will run without problem, its data structures being in memory. 
This is in great contrast with portupgrade
where if you upgrade ruby when portupgrade runs, you are in a mess (or 
if you upgrade the db that
portupgrade uses). I have not seen if synth checks for circular 
dependencies, portupgrade certainly
did it.

In summary, synth seems to be a very nice work. As an exercice in shell 
writing, portmaster is
certainly a master's work, but it is a poor substitute to a real 
management tool. Portupgrade
was more ambitious, but had too many problems and was incredibly slow. 
So i think J. Marino
is right, better bite the bullet as soon as possible, polish whatever 
needs polishing, update the documentation
and go ahead.  The fact that synth is written in a relatively obscure 
language can be a deterrent,
but in fact it is very readable by non ada practitioners.








-- 
Michel Talon




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56B939B6.3060101>