All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Meyering <jim@meyering.net>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] gfs2-utils "make install" failure and fix
Date: Mon, 29 Jun 2009 17:17:45 +0200	[thread overview]
Message-ID: <87skhjqdba.fsf@meyering.net> (raw)
In-Reply-To: <1246282233.25867.47.camel@cerberus.int.fabbione.net> (Fabio M. Di Nitto's message of "Mon, 29 Jun 2009 15:30:33 +0200")

Fabio M. Di Nitto wrote:
...
>> > Handling of prefix can be better I agree, but turning them into
>> > sbin_PROGRAM doesn't work either.
>> >
>> > Clearly I am open to any better solution than the one I have in place...
>>
>> Sure.
>> There's already so much default-munging going on in configure.ac,
>> why not add a tiny bit more.
>>
>> This incremental patch does what you seem to want:
>>
>>     In case we're using the default (/usr) prefix
>>     and the default exec_prefix, and set sbindir to /sbin:
>>
>> diff --git a/configure.ac b/configure.ac
>> index a568463..ca0301e 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -38,6 +38,7 @@ fi
>>
>>  case $exec_prefix in
>>    NONE)   exec_prefix=$prefix;;
>> +          test "$prefix:$sbindir" = '/usr:${exec_prefix}/sbin' && sbindir=/sbin
>>    prefix) exec_prefix=$prefix;;
>>  esac
>
> hmmmm... wouldn't that move all sbin_PROGRAMS to /sbin (assuming we are
> doing default build)? If so that's still not ideal because except those
> 3 binaries, all the others can go (and should go) in /usr/sbin as they
> are not vital for the FS operations.

Good catch.  I see, now.

The following incremental patch finally seems to do the right thing:

  - with --prefix=P where P!=/usr: no change
  - with no --prefix option, or with --prefix=/usr, install those three
      subdirs' tools into /sbin rather than into /usr/sbin.

diff --git a/gfs2/fsck/Makefile.am b/gfs2/fsck/Makefile.am
index 1667df3..ac89524 100644
--- a/gfs2/fsck/Makefile.am
+++ b/gfs2/fsck/Makefile.am
@@ -1,5 +1,10 @@
 MAINTAINERCLEANFILES	= Makefile.in

+# install into /sbin, not /usr/sbin
+sbindir := $(shell test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
+	     && echo /sbin \
+	     || echo '$(exec_prefix)/sbin')
+
 sbin_PROGRAMS		= fsck.gfs2

 noinst_HEADERS		= eattr.h fs_bits.h fsck.h fs_recovery.h hash.h \
diff --git a/gfs2/mkfs/Makefile.am b/gfs2/mkfs/Makefile.am
index ba4f851..75466fa 100644
--- a/gfs2/mkfs/Makefile.am
+++ b/gfs2/mkfs/Makefile.am
@@ -1,5 +1,10 @@
 MAINTAINERCLEANFILES	= Makefile.in

+# install into /sbin, not /usr/sbin
+sbindir := $(shell test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
+	     && echo /sbin \
+	     || echo '$(exec_prefix)/sbin')
+
 sbin_PROGRAMS		= mkfs.gfs2

 noinst_HEADERS		= gfs2_mkfs.h
diff --git a/gfs2/mount/Makefile.am b/gfs2/mount/Makefile.am
index a82970e..0303b24 100644
--- a/gfs2/mount/Makefile.am
+++ b/gfs2/mount/Makefile.am
@@ -1,5 +1,10 @@
 MAINTAINERCLEANFILES	= Makefile.in

+# install into /sbin, not /usr/sbin
+sbindir := $(shell test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
+	     && echo /sbin \
+	     || echo '$(exec_prefix)/sbin')
+
 sbin_PROGRAMS		= mount.gfs2

 noinst_HEADERS		= gfs_ondisk.h util.h



  reply	other threads:[~2009-06-29 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29  9:24 [Cluster-devel] gfs2-utils "make install" failure and fix Jim Meyering
2009-06-29  9:38 ` Fabio M. Di Nitto
2009-06-29 13:26   ` Jim Meyering
2009-06-29 13:30     ` Fabio M. Di Nitto
2009-06-29 15:17       ` Jim Meyering [this message]
2009-06-29 16:27         ` Fabio M. Di Nitto
2009-08-05 11:55     ` [Cluster-devel] [patch] remove description for non existed option in man page Masatake YAMATO

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87skhjqdba.fsf@meyering.net \
    --to=jim@meyering.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.