"configure" should not change files which are under VCS control

Bug #861291 reported by Daniel Hahler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Wishlist
Dustin Kirkland 
byobu (Ubuntu)
Fix Released
Wishlist
Dustin Kirkland 

Bug Description

When you run "configure" with a custom prefix, all the "bin" files get changed as follows:
    -[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
    +[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/home/user/.dotfiles/oh-my-zsh/plugins/byobu"

A workaround for this might be to set BYOBU_PREFIX from the path of the binary itself dynamically, like with:
  readlink -f "$0"
or the more portable (?)
  $( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P )

Apart from that, a separate directory might be used to "make" (and mangle) the files therein for "make install".

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hmm, that's a lot of shell forks. I've been trying to remove shell forks from byobu, and this would introduce a lot more.

Changed in byobu:
importance: Undecided → Wishlist
status: New → Incomplete
Changed in byobu:
status: Incomplete → Fix Committed
Changed in byobu (Ubuntu):
status: New → Fix Committed
importance: Undecided → Wishlist
Changed in byobu:
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 4.43-0ubuntu1

---------------
byobu (4.43-0ubuntu1) precise; urgency=low

  [ Dustin Kirkland ]
  * usr/bin/byobu, usr/lib/byobu/ip_address, usr/share/man/man1/byobu.1:
    - support IP_EXTERNAL fetching, LP: #873736
    - put ip address in the terminal title bar, since we ran out of room
      for it in tmux
  * usr/bin/byobu-select-session: LP: #869390
    - fix select session to obey BYOBU_BACKEND
  * configure.ac, usr/bin/Makefile.am: LP: #869377
    - provide byobu-tmux and byobu-screen symlinks
  * configure.ac, README: LP: #861291
    - configure should not change files under vcs control
    - compiling users need to ensure that BYOBU_PREFIX is set in
      their environment
  * usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall:
    - LP: #861534
    - ensure launcher command removed from each file before installing
  * usr/lib/byobu/.dirs:
    - use /dev/shm for cache, LP: #872551, #869279
    - search and use a shared dir when possible
  * usr/lib/byobu/battery: LP: #851100
    - rework the battery logic to use /sys instead of /proc
  * usr/share/man/man1/byobu.1: LP: #713879
    - note too many files open ulimit error in documentation

  [ Daniel Hahler ]
  * usr/bin/byobu, usr/bin/byobu-launcher-install, usr/bin/byobu-
    launcher-uninstall: Use BYOBU_PREFIX explicitly, LP: #861302
  * debian/rules, README: LP: #854868
    - refactor autoconf into debian/rules

  [Scott Moser]
  * usr/lib/byobu/.shutil: fix rounding error in fpdiv, LP: #869282
 -- Dustin Kirkland <email address hidden> Fri, 21 Oct 2011 13:43:57 -0500

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

Thank you for fixing it for now, but can you please elaborate why building in a separate directory has been rejected as a fix to this?

Changed in byobu (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Well, it does seem non-ideal to have the build physically modify the shell scripts. If you diff'd your installed shell scripts against upstream, you'd have those path differences. Seems ugly.

Changed in byobu:
status: Fix Committed → Fix Released
Changed in byobu (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
James Spencer (james-s-spencer) wrote :

In my view this fix introduces a bug.

I appreciate that it is preferable that configure does not alter the files under version control, but the consequence is that using ./configure --prefix to install byobu to an arbitrary location now creates an install which does not work out of the box; instead I must set BYOBU_PREFIX to be the installed location in my shell. This is a pain and somewhat of a surprise considering the previous behaviour of the install process.

It is entirely reasonable to expect some changes to arise in the shell scripts if you install it to a non-standard location, so minimising the diff against upstream (and comparing diffs is surely a rare activity relative to running byobu) is not a great concern.

Changed in byobu:
status: Fix Released → Triaged
Changed in byobu (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

James, do you have a suggested solution?

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Committed revision 1802.

Changed in byobu:
status: Triaged → Fix Committed
Changed in byobu (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 4.53-0ubuntu1

---------------
byobu (4.53-0ubuntu1) precise; urgency=low

  [ Dustin Kirkland ]
  * usr/share/byobu/profiles/common: LP: #900812
    - start screen with at least a 1 second message wait
  * usr/bin/byobu, usr/bin/byobu-ctrl-a, usr/bin/byobu-disable,
    usr/bin/byobu-enable, usr/bin/byobu-export, usr/bin/byobu-janitor,
    usr/bin/byobu-launch, usr/bin/byobu-launcher, usr/bin/byobu-
    launcher-install, usr/bin/byobu-launcher-uninstall, usr/bin/byobu-
    quiet, usr/bin/byobu-reconnect-sockets, usr/bin/byobu-select-
    backend, usr/bin/byobu-select-profile, usr/bin/byobu-shell,
    usr/bin/byobu-silent, usr/bin/byobu-status, usr/bin/byobu-status-
    detail, usr/bin/byobu-ugraph, usr/bin/byobu-ulevel,
    usr/lib/byobu/include/dirs, usr/share/byobu/profiles/byoburc:
    - big changeset to solve a few bugs, LP: #897473, #861291, #897048
    - take over ~/.byoburc, and use it for storing global byobu shell
      configuration, namely BYOBU_PREFIX when necessary
      + note that some users might have previously used ~/.byoburc to
        store byobu-only screen configuration
      + these users should now use ~/.byobu/.screenrc instead (also
        because byobu now supports both screen and tmux)
    - on first run, if byobu is running outside of its normal location
      in /usr/bin/byobu, it will automatically detect and append the
      correct BYOBU_PREFIX value and store it in ~/.byoburc
    - ~/.byoburc is now read by all usr/bin/* in order to find the
      correct prefix
  * usr/lib/byobu/include/dirs: LP: #780081
    - use ~/.local/share/byobu as BYOBU_CONFIG_DIR, if it happens to exist
  * usr/lib/byobu/include/dirs: LP: #899271
    - allow explicit BYOBU_CONFIG_DIR selection in ~/.byoburc
  * usr/lib/byobu/users, usr/share/byobu/status/statusrc,
    usr/share/man/man1/byobu.1: LP: #900663
    - add support for a USERS_DISTINCT=1 status configuration setting
      to count the number of distinct users, rather than open ssh sessions

  [ Andrew McCarthy ]
  * usr/bin/byobu-status: LP: #898801
    - fix status detailing, skip include, as it's a directory
 -- Dustin Kirkland <email address hidden> Mon, 05 Dec 2011 08:59:08 -0600

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
Changed in byobu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.