summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-10-17 12:06:26 -0700
committerSage Weil <sage@inktank.com>2013-10-17 12:06:49 -0700
commitd3f0c0b2a6b28de0632645bf99442183a4e6237d (patch)
treec4ecbaac84f91025766e92d22d3cbfc14971a644
parent15ec5332ba4154930a0447e2bcf1acec02691e97 (diff)
downloadceph-d3f0c0b2a6b28de0632645bf99442183a4e6237d.tar.gz
Makefile: fix /sbin vs /usr/sbin behavior
Instead of telling configure to put things in /sbin, explicitly put the two important items (mkcephfs and mount.fuse.ceph) in /sbin via an automake rule. This unbreaks FreeBSD 9.1 and probably others. Based on patches originally from Alan Somers <asomers@gmail.com>, modified for the current Makefile structure and applied to the specfile too. Fixes: #6456 Signed-off-by: Sage Weil <sage@inktank.com> Tested-by: Alan Somers <asomers@gmail.com>
-rw-r--r--ceph.spec.in1
-rwxr-xr-xdebian/rules2
-rw-r--r--src/Makefile-env.am7
-rw-r--r--src/Makefile.am6
4 files changed, 10 insertions, 6 deletions
diff --git a/ceph.spec.in b/ceph.spec.in
index ee4b84ef090..1c65957b42d 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -269,7 +269,6 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
%{configure} CPPFLAGS="$java_inc" \
--prefix=/usr \
- --sbindir=/sbin \
--localstatedir=/var \
--sysconfdir=/etc \
--docdir=%{_docdir}/ceph \
diff --git a/debian/rules b/debian/rules
index c32c3e280b3..f35e6c2601c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,7 +34,7 @@ configure: configure-stamp
configure-stamp:
dh_testdir
./autogen.sh
- ./configure --prefix=/usr --sbindir=/sbin --localstatedir=/var \
+ ./configure --prefix=/usr --localstatedir=/var \
--sysconfdir=/etc $(extraopts) $(confflags) \
$(CEPH_EXTRA_CONFIGURE_ARGS)
touch $@
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
index 6a4e09512a2..9bc6ee74db3 100644
--- a/src/Makefile-env.am
+++ b/src/Makefile-env.am
@@ -12,6 +12,8 @@ noinst_PROGRAMS =
bin_SCRIPTS =
sbin_PROGRAMS =
sbin_SCRIPTS =
+su_sbin_PROGRAMS =
+su_sbin_SCRIPTS =
dist_bin_SCRIPTS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -22,7 +24,10 @@ radoslib_LTLIBRARIES =
bin_DEBUGPROGRAMS =
# like sbin_SCRIPTS but can be used to install to e.g. /usr/sbin
-ceph_sbindir = $(exec_prefix)$(sbindir)
+ceph_sbindir = $(sbindir)
+
+# certain things go straight into /sbin, though!
+su_sbindir = /sbin
# C/C++ tests to build will be appended to this
check_PROGRAMS =
diff --git a/src/Makefile.am b/src/Makefile.am
index 280b268479e..d9189bde9ca 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,9 +58,9 @@ bin_PROGRAMS += ceph-mds
mount_ceph_SOURCES = mount/mount.ceph.c
mount_ceph_LDADD = $(LIBCOMMON)
if LINUX
-sbin_PROGRAMS += mount.ceph
+su_sbin_PROGRAMS += mount.ceph
endif # LINUX
-sbin_SCRIPTS += mount.fuse.ceph
+su_sbin_SCRIPTS += mount.fuse.ceph
cephfs_SOURCES = cephfs.cc
cephfs_LDADD = $(LIBCOMMON)
@@ -239,7 +239,7 @@ bin_SCRIPTS += \
ceph-post-file
BUILT_SOURCES += init-ceph
-sbin_SCRIPTS += mkcephfs
+su_sbin_SCRIPTS += mkcephfs
shell_scripts += init-ceph mkcephfs