Richard W.M. Jones
2016-Sep-28 10:08 UTC
[Libguestfs] [PATCH] daemon: Choose /usr/sbin first for the daemon (debian bug 838995).
Debian is also doing a UsrMove/UsrMerge: https://wiki.debian.org/UsrMerge However it is not finalized that Debian will actually make this change. Since some Debian systems have /sbin as a symlink and other have /sbin as a real directory, and we should avoid choosing a symlinked directory for the daemon, the easiest fix is simply to probe /usr/sbin before /sbin since under all scenarios (and Fedora too) /usr/sbin is a real directory. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838995 --- m4/guestfs_daemon.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/guestfs_daemon.m4 b/m4/guestfs_daemon.m4 index 192583b..12123df 100644 --- a/m4/guestfs_daemon.m4 +++ b/m4/guestfs_daemon.m4 @@ -42,7 +42,7 @@ if test "x$enable_daemon" = "xyes"; then dnl install directory for libguestfs live. Since Fedora 17 dnl /sbin is a symlink to /usr/sbin. We have to put the dnl daemon into a real (non-symlink) directory. - dirs="/sbin /usr/sbin /bin /usr/bin" + dirs="/usr/sbin /sbin /usr/bin /bin" AC_MSG_CHECKING([which of $dirs is a real directory]) for dir in $dirs; do parent=`dirname $dir` -- 2.9.3
Richard W.M. Jones
2016-Sep-28 14:22 UTC
Re: [Libguestfs] [PATCH] daemon: Choose /usr/sbin first for the daemon (debian bug 838995).
On Wed, Sep 28, 2016 at 11:08:59AM +0100, Richard W.M. Jones wrote:> Debian is also doing a UsrMove/UsrMerge: > https://wiki.debian.org/UsrMerge > > However it is not finalized that Debian will actually make this > change. > > Since some Debian systems have /sbin as a symlink and other have /sbin > as a real directory, and we should avoid choosing a symlinked > directory for the daemon, the easiest fix is simply to probe /usr/sbin > before /sbin since under all scenarios (and Fedora too) /usr/sbin is a > real directory. > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838995 > --- > m4/guestfs_daemon.m4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/m4/guestfs_daemon.m4 b/m4/guestfs_daemon.m4 > index 192583b..12123df 100644 > --- a/m4/guestfs_daemon.m4 > +++ b/m4/guestfs_daemon.m4 > @@ -42,7 +42,7 @@ if test "x$enable_daemon" = "xyes"; then > dnl install directory for libguestfs live. Since Fedora 17 > dnl /sbin is a symlink to /usr/sbin. We have to put the > dnl daemon into a real (non-symlink) directory. > - dirs="/sbin /usr/sbin /bin /usr/bin" > + dirs="/usr/sbin /sbin /usr/bin /bin" > AC_MSG_CHECKING([which of $dirs is a real directory]) > for dir in $dirs; do > parent=`dirname $dir` > -- > 2.9.3This was tested by the bug reporter so I'm going to push it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Reasonably Related Threads
- [PATCH] inspect: improve UsrMove detection (RHBZ#1186935)
- [PATCH] appliance: Exclude /usr/lib/modules as well as /lib/modules.
- [PATCH 1/6] appliance: add libyara dependency
- [PATCH v2 1/6] appliance: add yara dependency
- [PATCH v3 1/6] appliance: add yara dependency