Synth v1.00 has been released

I'm pleased to finally issue the first release of Synth. There were some
significant changes since the last release candidate:
Code:
* Rework piped command handling to fix command parsing
  Synth was using ada-util to execute external commands and receive the
  output.  Unfortunately, this implementation currently can not handle
  either extra whitespace nor can it support quoted values.  The author
  is going to fix this soon using popen and pclose for Unix, but I just
  implemented the functionality by binding to those functions myself.
* This was the only use of ada-util (I originally expected to use more
  of this library's functionality) so it's been dropped as a dependency.
  This reduces the stripped executable size by about 30%.
* The environment was prepopulated with UNAME_[x] variables.  This is
  required for Synth to support building packages for different releases
  or even architectures (e.g. building 10.2 packages on 11.0-CURRENT).
* Define OSREL in the builder's /etc/make.conf.  This seemed to be
  required for emulators/virtio-kmod which uses <pre> although it's not
  clear defining OSREL is necessary.
* Fix graceful shutdown handling in text mode.
  When the graceful shutdown key was changed from Escape to Control-Q, it
  stopped working in text mode (i.e. when it wasn't in curses).  I believe
  that's because the curses display uses the "raw" tty mode and lets all
  control characters through.  In text mode, Control-Q has a flow control
  functionality.  I wrote a routine to disable that flow control and give
  Synth access to control-Q keypress in all cases.
* The same routine disables TTY echoes when they are unwanted
* Fix "status-everything" dry-run issue where a graceful shutdown resulted
  in an unwanted "sorry" message.
* In test mode file system violation check, mark changes to /var/run
  during building to be excluded from checks.
* Add a guard that checks if Synth is launched when the current directory
  is <sysroot>/usr/local (or a subdirectory of it).  Synth will fail
  to mount everything in this case, so now it stops and tells the user
  to change directories and try again.

For background, see the original Thread 54690
 
I have had more systems in production shredded by portmaster than I can count since portmanager was killed off that I just stopped trying to use a package management system.

Thank you for creating Synth, it is a game changer!

synth_standby.JPG


Websters says it is "Standby".

;)

I like how it provides direction on what to fix:
A preliminary scan has revealed the cached options of 2 ports are
obsolete. Please update or remove the saved options and try again.
e.g. make -C /usr/ports/devel/gettext-tools config
e.g. make -C /usr/ports/devel/gettext-tools rmconfig

nice.
 

Attachments

  • synth_standby.JPG
    synth_standby.JPG
    28 KB · Views: 307
This new version has now broken terminal output whenever synth exits. Anything I type in the terminal isn't echoed back to me until I type reset to reset the terminal. This was not an issue in 0.99. My $TERM is screen-256color running in tmux and PuTTY in windows. I see you have altered terminal echos in the release notes above.
 
xtaz is it fixed if you add
Code:
Unix.cone_of_silence (deploy => False);
after
Code:
PIL.destroy_pidfile;
(line 341 of [wrkdir]/synth.adb) ?

So you'd make deinstall ; make clean ; make patch ; edit that file; make install to check

edit: you'd still see it if you use control-c though.
I don't see this effect though. (I would have noticed right?)
 
Last edited by a moderator:
If you press control-c then you can always expect some weirdness! Adding that line of code hasn't changed the behavior I'm afraid. I still lose terminal echo after running something like synth status. Also, tell you what, now I have gcc6-aux in my synth repo it makes recompiling synth for tests like this *so* much easier!
 
bummer. you're going to have to help me here then. I'm not seeing it in syscons or my vtty.

Deploying the cone of silence :) does two things: It masks the echo bit and it masks the flow control bit (so that control-Q/S pass).
Removing it does the opposite: sets the echo bit and control flag.

It should have worked. What command did you test it on? Maybe that command didn't get to the pid removal line.
 
Tried it on status and rebuild-repository. Does it on both. Don't know. All I can say is it worked fine on 0.99 and now it doesn't on 1.0 :(
 
okay, I think I need more data (more people to see this problem).
In the mean time, you can modify file src/unix_core.c and comment out the lines with ECHO in them. (2, one per function)
 
Last edited by a moderator:
xtaz try changing
Code:
  tp.c_lflag &= ECHO;
to
Code:
  tp.c_lflag |= ECHO;

try with and without the other line you already added.
 
Last edited by a moderator:
FYI, this is not a tmux problem. I've just tried it with a brand new shell outside of tmux set to $TERM=xterm-256color and that also breaks local echo. Maybe it's a PuTTY thing?

Removing the cone of silence line completely and changing & to | in the two ECHO lines makes local echo work normally, *but* it shows a warning:

Code:
The complete build list can also be found at:
/tmp/synth_status_results.txt
readline: warning: turning off output flushing

With both the cone of silence line and the ECHO set to | exactly the same, local echo is working normally, but the warning still shows up.
 
Oops! OK, the 2nd echo in the file, the &= one. If I only change that one to | then there is no warning now, but local echo is broken again. If I add the cone of silence then local echo works. So it looks like it needs both.
 
thanks xtaz!
Code:
ports-mgmt/synth: Upgrade version 1.00 => 1.01 (echo fixed)

The echo and control-flow flags weren't being restored correctly in
general, and they weren't being restored at program exit.  The result
on PuTTY was that nothing would echo to the terminal after Synth
exited, but the new version fixes it.
 
Code:
ports-mgmt/synth: Upgrade version 1.01 => 1.02 (tty checked)

Any attempt to alter echo and control flags when the standard input
stream is not connected to a tty will fail.  Fix the resulting nuisance
messages by skipping these steps if a tty is not present.
 
This could be another small bug I've just uncovered. gnupg 2.1.11 just failed to build because it had a size mismatch issue with fetching the distfile. As a result this happened:

Code:
The task is complete.  Final tally:
Initial queue size: 6
  packages built: 0
  ignored: 0
  skipped: 5
  failed: 1

Duration: 00:01:09
The build logs can be found at: /var/log/synth
Scanning entire ports tree.
Removed: gnupg-2.1.8.txz

The old version gnupg-2.1.8 package shouldn't have been deleted in that scenario should it? This was with an upgrade-system command.
 
It's not synth's responsibility, it's a ports framework thing. If the fetch command fails, it's the framework's fault.
Run "make checksum" manually on the port, and remove the distfile manually if you have to. Sometimes it misfetches and the resulting fail fails the checksum.

It could also be that the error is real and the fetched file really doesn't match the check and that would be the case for everyone.
 
I'm not asking why the port failed to fetch. I'm suggesting that synth shouldn't delete the old
gnupg-2.1.8.txz package file if a new package fails to build should it? As then neither the old or new version is available in the repository any longer until the port is fixed.
 
it has to, the package is invalid according to the ports specifications. You can't mix invalid packages with good packages; it would destroy the integrity (basically you would be in portmaster territory with mismatching packages)
 
plus it doesn't matter. the old package isn't removed from the system. we are only affecting the repository.
 
Back
Top