[Dev] libretools 20131007 release announcment.

Luke T. Shumaker lukeshu at sbcglobal.net
Tue Oct 8 03:12:15 GMT 2013

I just pushed libretools 20131007 to [libre].  You may generally
regard it as a bugfix release.

Exciting: There are now man-pages for all of librelib.

I thought that this would be a short bugfix release, but bugs in
systemd-nspawn made things a *lot* more complicated.

Changes from 20130930 to 20131007:
 - librerelease: Add `-u` flag for upload-only; don't run db-update
 - conf.sh: {get,set}_conf_makepkg was generalized to {get,set}_var
 - added man-pages for all of librelib
 - librerelease: The total upload size displayed before the upload was
   an error message, instead of a number.
 - libremakepkg: Do a better job of post-processing the output so that
   it isn't line-buffered, and carriage returns work correctly.
 - a couple of fixes in unit tests
 - chcleanup: don't search in $PATH for the PKGBUILD
 - librechroot: clean-pkgs now looks at /startdir/PKGBUILD instead of
Chroot TTY stuff:
  It turns out that systemd-nspawn's TTY/IO handling is buggy as
  hell.  In general, if stdout/stdin aren't TTYs, it does the wrong
  thing.  I've mitigated this by adding a (partial) work-around for
  when stdout isn't a TTY, and having it print a warning when stdin
  isn't a TTY.

  I could better mitigate this by writing a PTY wrapper/condom (in C)
  to stop systemd-nspawn from f---ing up the TTY, but I don't want to
  distribute an architecture-dependent program with libretools, and I
  think it would be more productive to fix systemd-nspawn.  Hopefully
  I will be sending them a patch soon. (Also, the wrapper program that
  I am writing anyway is unfinished.)

  So, the bugs:
    - If stdin isn't a TTY, it does not correctly handle SIGINT, and
      instead immediately dies without doing anything with it's child
      processes. Which means that without system-nspawn proxying their
      stdout to actual stdout, their I/O will block forever, and you
      will have to `kill(1)` them.
    - If stdout isn't a TTY, it *mostly* ignores the user.  Not all
      the way but mostly, which is even more confusing.
       - It still prints output to stdout (instead of, say /dev/tty).
       - But it sets the characteristics (namely size) of the emulated
         stdout TTY on stdin (assuming stdin is a TTY).  WHY ARE YOU
       - It also will perform `ioctl(3)s` meant for stdout on stdin.
         WHAT. THE. HELL.
  The correct thing to do, would *obviously* be to have stdout in the
  chroot reflect stdout outside of it.

  Like I've said, I've mitigated this the best I can in librechroot,
  but until systemd-nspawn is fixed, the output of libremakepkg will
  be a little buggy.

Happy hacking,
~ Luke Shumaker

More information about the Dev mailing list