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 11:24:59 +0200 [thread overview]
Message-ID: <87ab3rtms4.fsf@meyering.net> (raw)
With an explicit --prefix, "make install" would install into /sbin regardless:
$ ./configure --prefix=/p/p/coro
...
$ make install
make[1]: Entering directory `/h/meyering/w/co/gfs2-utils/gfs2/mkfs'
/p/bin/install -c -d /sbin
make[1]: Nothing to be done for `install-data-am'.
/p/bin/install -c -m 755 mkfs.gfs2 /sbin
/p/bin/install: cannot create regular file `/sbin/mkfs.gfs2': Permission denied
make[1]: *** [install-exec-local] Error 1
make[1]: Leaving directory `/h/meyering/w/co/gfs2-utils/gfs2/mkfs'
make: *** [install-am] Error 2
Along the way I noticed the Makefile.am files
were using noinst_PROGRAMS and adding their own install rules.
It's easier/cleaner/etc. to use sbin_PROGRAMS.
Here's the patch:
From d794b4e7948741f5d6767970a2fde2c5fce15947 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Mon, 29 Jun 2009 11:23:09 +0200
Subject: [PATCH gfs2-utils] Use automake's sbin_PROGRAMS, rather than writing our own rules.
This also fixes a "make install" failure to honor --prefix.
* gfs2/mount/Makefile.am (sbin_PROGRAMS): Use sbin_PROGRAMS,
not noinst_PROGRAMS.
(install-exec-local, uninstall-local): Remove rules.
Automake automates this when you define sbin_PROGRAMS.
* gfs2/fsck/Makefile.am (sbin_PROGRAMS): Likewise.
(install-exec-local, uninstall-local): Remove rules.
* gfs2/mkfs/Makefile.am (sbin_PROGRAMS): Likewise.
(install-exec-local, uninstall-local): Remove rules.
(install-exec-hook, uninstall-hook): Remove unnecessary sub-shells.
---
gfs2/fsck/Makefile.am | 10 +---------
gfs2/mkfs/Makefile.am | 16 ++++------------
gfs2/mount/Makefile.am | 10 +---------
3 files changed, 6 insertions(+), 30 deletions(-)
diff --git a/gfs2/fsck/Makefile.am b/gfs2/fsck/Makefile.am
index 15a5b1d..1667df3 100644
--- a/gfs2/fsck/Makefile.am
+++ b/gfs2/fsck/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_PROGRAMS = fsck.gfs2
+sbin_PROGRAMS = fsck.gfs2
noinst_HEADERS = eattr.h fs_bits.h fsck.h fs_recovery.h hash.h \
inode_hash.h link.h lost_n_found.h metawalk.h util.h
@@ -15,11 +15,3 @@ fsck_gfs2_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \
-I$(top_srcdir)/gfs2/libgfs2
fsck_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
-
-install-exec-local:
- $(INSTALL) -d $(DESTDIR)/sbin
- $(INSTALL) -m 755 fsck.gfs2 $(DESTDIR)/sbin
-
-uninstall-local:
- cd $(DESTDIR)/sbin && \
- rm -f fsck.gfs2
diff --git a/gfs2/mkfs/Makefile.am b/gfs2/mkfs/Makefile.am
index 9f156ba..ba4f851 100644
--- a/gfs2/mkfs/Makefile.am
+++ b/gfs2/mkfs/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_PROGRAMS = mkfs.gfs2
+sbin_PROGRAMS = mkfs.gfs2
noinst_HEADERS = gfs2_mkfs.h
@@ -15,20 +15,12 @@ mkfs_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
relative_sbin = $(shell perl -MFile::Spec -le 'print File::Spec->abs2rel("/sbin", "$(sbindir)")')
-install-exec-local:
- $(INSTALL) -d $(DESTDIR)/sbin
- $(INSTALL) -m 755 mkfs.gfs2 $(DESTDIR)/sbin
-
-uninstall-local:
- cd $(DESTDIR)/sbin && \
- rm -f mkfs.gfs2
-
install-exec-hook:
$(INSTALL) -d $(DESTDIR)/$(sbindir)
- (cd $(DESTDIR)/$(sbindir) && \
+ cd $(DESTDIR)/$(sbindir) && \
rm -f gfs2_grow gfs2_jadd && \
$(LN_S) $(relative_sbin)/mkfs.gfs2 gfs2_grow && \
- $(LN_S) $(relative_sbin)/mkfs.gfs2 gfs2_jadd)
+ $(LN_S) $(relative_sbin)/mkfs.gfs2 gfs2_jadd
uninstall-hook:
- (cd $(DESTDIR)/$(sbindir) && rm -f gfs2_jadd gfs2_grow)
+ cd $(DESTDIR)/$(sbindir) && rm -f gfs2_jadd gfs2_grow
diff --git a/gfs2/mount/Makefile.am b/gfs2/mount/Makefile.am
index fd927b6..a82970e 100644
--- a/gfs2/mount/Makefile.am
+++ b/gfs2/mount/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_PROGRAMS = mount.gfs2
+sbin_PROGRAMS = mount.gfs2
noinst_HEADERS = gfs_ondisk.h util.h
@@ -12,11 +12,3 @@ mount_gfs2_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \
-I$(top_srcdir)/group/libgfscontrol
mount_gfs2_LDADD = $(top_builddir)/group/libgfscontrol/libgfscontrol.la
-
-install-exec-local:
- $(INSTALL) -d $(DESTDIR)/sbin
- $(INSTALL) -m 755 mount.gfs2 $(DESTDIR)/sbin
-
-uninstall-local:
- cd $(DESTDIR)/sbin && \
- rm -f mount.gfs2
--
1.6.3.3.420.gd4b46
next reply other threads:[~2009-06-29 9:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-29 9:24 Jim Meyering [this message]
2009-06-29 9:38 ` [Cluster-devel] gfs2-utils "make install" failure and fix 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
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=87ab3rtms4.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.