Hi,

With 8.3.5 source tarball I could just do 'make; make install' and everything would be fine. I would get sane defaults, files in expected locations (config in /etc, libs in /usr/lib/drbd, man pages in /usr/share/man, local state in /var/lib/drbd etc.).

With 8.3.6 however you'll need to run the configure script. Doing this it's really hard to get the defaults of before back and just running './configure' will forget or not create certain directories.

Attached is the output for just running ./configure without any options and the config.log that belongs to that.

I am running Debian Lenny and I don't have enough of an idea how other distributions handle installations and the location of certain files so I can only speak for myself and my own experience when talking about expecting files at a certain location. Please keep that in mind if you read through my comments.


It seems to me that some default install actions in Makefile.in and consequently Makefile are wrong. The ones i can find that actually break things are:

running 'make -C user install':
mkdir -p //usr/local/var/lib/drbd

So this creates the directory /usr/local/var/lib/drbd, but the directory /var/lib/drbd is mentioned specifically here:
drbd-8.3.6# grep -r 'var/lib/drbd' *
drbd/Makefile:# install -d $(DESTDIR)/var/lib/drbd
Binary file user/drbdmeta matches
Binary file user/drbdadm matches
Binary file user/drbdadm_usage_cnt.o matches
user/drbdadm_main.c: /* if set, use the "cache" in /var/lib/drbd to figure out
user/drbdadm_minor_table.c:#define MINOR_TABLE_DIR "/var/lib/drbd/"
Binary file user/drbdadm_minor_table.o matches
Binary file user/drbdmeta.o matches
user/drbdadm_usage_cnt.c:#define DRBD_LIB_DIR "/var/lib/drbd"
user/drbdmeta.c: * /var/lib/drbd/md-toc plain file, and some magic block on every device
user/drbdmeta.c:        if (asprintf(&e, "/var/lib/drbd/drbd%lu", minor) <= 18) 
{

And the make install doesn't create that directory.


running 'make -C scripts install':
mkdir -p //usr/local/lib/ocf/resource.d/linbit

While the correct directory seems to be /usr/lib/ocf/resource.d/ (at least on my system).


Furthermore, the default for creating a kernel module, WITH_KM, is set to no by configure. I'm not sure if having kernel module not compiled by default is something users would expect from drbd source.

Ultimately, i'm not a fan of installing to /usr/local/etc et.al because i don't believe many tools will be able to use them correctly? Debian init script fixer update-rc.d for instance won't find the drbd init script in /usr/local/etc/init.d/drbd. I would think the defaults for this would rather be just normal /etc and /etc/init.d.

Best regards,
Eelco Jepkema
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by DRBD configure 8.3.6, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = testhost
uname -m = i686
uname -r = 2.6.18.8.xs5.0.0.13.442
uname -s = Linux
uname -v = #1 SMP Fri May 8 22:23:32 UTC 2009

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1911: checking for gcc
configure:1927: found /usr/bin/gcc
configure:1938: result: gcc
configure:2167: checking for C compiler version
configure:2176: gcc --version >&5
gcc (Debian 4.3.2-1.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2187: $? = 0
configure:2176: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 
configure:2187: $? = 0
configure:2176: gcc -V >&5
gcc: '-V' option must have argument
configure:2187: $? = 1
configure:2176: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:2187: $? = 1
configure:2209: checking for C compiler default output file name
configure:2231: gcc    conftest.c  >&5
configure:2235: $? = 0
configure:2272: result: a.out
configure:2288: checking whether the C compiler works
configure:2297: ./a.out
configure:2301: $? = 0
configure:2316: result: yes
configure:2323: checking whether we are cross compiling
configure:2325: result: no
configure:2328: checking for suffix of executables
configure:2335: gcc -o conftest    conftest.c  >&5
configure:2339: $? = 0
configure:2361: result: 
configure:2367: checking for suffix of object files
configure:2389: gcc -c   conftest.c >&5
configure:2393: $? = 0
configure:2414: result: o
configure:2418: checking whether we are using the GNU C compiler
configure:2437: gcc -c   conftest.c >&5
configure:2437: $? = 0
configure:2446: result: yes
configure:2455: checking whether gcc accepts -g
configure:2475: gcc -c -g  conftest.c >&5
configure:2475: $? = 0
configure:2516: result: yes
configure:2533: checking for gcc option to accept ISO C89
configure:2597: gcc  -c -g -O2  conftest.c >&5
configure:2597: $? = 0
configure:2610: result: none needed
configure:2630: checking whether ln -s works
configure:2634: result: yes
configure:2643: checking for sed
configure:2661: found /bin/sed
configure:2673: result: /bin/sed
configure:2683: checking for grep
configure:2701: found /bin/grep
configure:2713: result: /bin/grep
configure:2723: checking for flex
configure:2741: found /usr/bin/flex
configure:2753: result: /usr/bin/flex
configure:2763: checking for rpmbuild
configure:2796: result: no
configure:2803: checking for xsltproc
configure:2836: result: no
configure:2843: checking for tar
configure:2861: found /bin/tar
configure:2873: result: /bin/tar
configure:2883: checking for git
configure:2916: result: no
configure:2923: checking for dpkg-buildpackage
configure:2941: found /usr/bin/dpkg-buildpackage
configure:2953: result: /usr/bin/dpkg-buildpackage
configure:2963: checking for udevadm
configure:2981: found /sbin/udevadm
configure:2993: result: /sbin/udevadm
configure:3003: checking for udevinfo
configure:3021: found /usr/bin/udevinfo
configure:3033: result: /usr/bin/udevinfo
configure:3058: WARNING: No rpmbuild found, building RPM packages is disabled.
configure:3068: WARNING: Cannot build man pages without xsltproc. You may safely ignore this warning when building from a tarball.
configure:3073: WARNING: Cannot update buildtag without git. You may safely ignore this warning when building from a tarball.
configure:3127: checking for /etc/gentoo-release
configure:3140: result: no
configure:3146: checking for /etc/redhat-release
configure:3159: result: no
configure:3165: checking for /etc/slackware-version
configure:3178: result: no
configure:3184: checking for /etc/debian_version
configure:3197: result: yes
configure:3203: checking for /etc/SuSErelease
configure:3216: result: no
configure:3243: configured for Debian (includes Ubuntu).
configure:3432: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by DRBD config.status 8.3.6, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on testhost

config.status:754: creating Makefile
config.status:754: creating user/Makefile
config.status:754: creating scripts/Makefile
config.status:754: creating documentation/Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_file__etc_SuSErelease=no
ac_cv_file__etc_debian_version=yes
ac_cv_file__etc_gentoo_release=no
ac_cv_file__etc_redhat_release=no
ac_cv_file__etc_slackware_version=no
ac_cv_objext=o
ac_cv_path_DPKG_BUILDPACKAGE=/usr/bin/dpkg-buildpackage
ac_cv_path_FLEX=/usr/bin/flex
ac_cv_path_GREP=/bin/grep
ac_cv_path_SED=/bin/sed
ac_cv_path_TAR=/bin/tar
ac_cv_path_UDEVADM=/sbin/udevadm
ac_cv_path_UDEVINFO=/usr/bin/udevinfo
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

BASH_COMPLETION_SUFFIX=''
CC='gcc'
CFLAGS='-g -O2'
CPPFLAGS=''
DEFS='-DPACKAGE_NAME=\"DRBD\" -DPACKAGE_TARNAME=\"drbd\" -DPACKAGE_VERSION=\"8.3.6\" -DPACKAGE_STRING=\"DRBD\ 8.3.6\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\"'
DISTRO='debian'
DPKG_BUILDPACKAGE='/usr/bin/dpkg-buildpackage'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
FLEX='/usr/bin/flex'
GIT=''
GREP='/bin/grep'
INITDIR='${prefix}/etc/init.d'
INITSCRIPT_SYMLINK=''
KDIR=''
KVER=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LN_S='ln -s'
LTLIBOBJS=''
OBJEXT='o'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='DRBD'
PACKAGE_STRING='DRBD 8.3.6'
PACKAGE_TARNAME='drbd'
PACKAGE_URL=''
PACKAGE_VERSION='8.3.6'
PATH_SEPARATOR=':'
RPMBUILD=''
RPM_BUILDREQ_DEFAULT='gcc flex glibc-devel make'
RPM_BUILDREQ_KM=''
RPM_CONFLICTS_KM=''
RPM_DIST_TAG=''
RPM_SUBPACKAGE_NOARCH=''
SED='/bin/sed'
SHELL='/bin/sh'
TAR='/bin/tar'
UDEVADM='/sbin/udevadm'
UDEVINFO='/usr/bin/udevinfo'
UDEV_RULE_SUFFIX=''
WITH_BASHCOMPLETION='yes'
WITH_HEARTBEAT='yes'
WITH_KM='no'
WITH_PACEMAKER='yes'
WITH_RGMANAGER='no'
WITH_UDEV='yes'
WITH_UTILS='yes'
WITH_XEN='yes'
XSLTPROC=''
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "DRBD"
#define PACKAGE_TARNAME "drbd"
#define PACKAGE_VERSION "8.3.6"
#define PACKAGE_STRING "DRBD 8.3.6"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""

configure: exit 0
drbd-8.3.6# ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking for sed... /bin/sed
checking for grep... /bin/grep
checking for flex... /usr/bin/flex
checking for rpmbuild... no
checking for xsltproc... no
checking for tar... /bin/tar
checking for git... no
checking for dpkg-buildpackage... /usr/bin/dpkg-buildpackage
checking for udevadm... /sbin/udevadm
checking for udevinfo... /usr/bin/udevinfo
configure: WARNING: No rpmbuild found, building RPM packages is disabled.
configure: WARNING: Cannot build man pages without xsltproc. You may safely 
ignore this warning when building from a tarball.
configure: WARNING: Cannot update buildtag without git. You may safely ignore 
this warning when building from a tarball.
checking for /etc/gentoo-release... no
checking for /etc/redhat-release... no
checking for /etc/slackware-version... no
checking for /etc/debian_version... yes
checking for /etc/SuSErelease... no
configure: configured for Debian (includes Ubuntu).
configure: creating ./config.status
config.status: creating Makefile
config.status: creating user/Makefile
config.status: creating scripts/Makefile
config.status: creating documentation/Makefile
# make install
make[1]: Entering directory `/usr/src/drbd-8.3.6/user'
install -d //sbin/
if getent group haclient > /dev/null 2> /dev/null ; then        \
                install -g haclient -m 4750 drbdsetup //sbin/ ; \
                install -g haclient -m 4750 drbdmeta //sbin/ ;  \
                install -m 755 drbdadm //sbin/ ;                \
        else                                                            \
                install -m 755 drbdsetup //sbin/ ;              \
                install -m 755 drbdmeta //sbin/ ;               \
                install -m 755 drbdadm //sbin/ ;                \
        fi
mkdir -p //usr/local/var/lib/drbd
make[1]: Leaving directory `/usr/src/drbd-8.3.6/user'
make[1]: Entering directory `/usr/src/drbd-8.3.6/scripts'
install -d //usr/local/etc/init.d
install -m 755 drbd //usr/local/etc/init.d/
install -d //usr/local/lib/drbd
install -m 755 outdate-peer.sh //usr/local/lib/drbd
install -m 755 snapshot-resync-target-lvm.sh //usr/local/lib/drbd
install -m 755 notify.sh //usr/local/lib/drbd
( set -e ; cd //usr/local/lib/drbd ;\
          ln -s -f snapshot-resync-target-lvm.sh 
unsnapshot-resync-target-lvm.sh ;\
          ln -s -f notify.sh notify-split-brain.sh ;\
          ln -s -f notify.sh notify-io-error.sh ;\
          ln -s -f notify.sh notify-pri-on-incon-degr.sh ;\
          ln -s -f notify.sh notify-pri-lost.sh ;\
          ln -s -f notify.sh notify-pri-lost-after-sb.sh ;\
          ln -s -f notify.sh notify-emergency-reboot.sh ;\
          ln -s -f notify.sh notify-emergency-shutdown.sh ;\
          ln -s -f notify.sh notify-out-of-sync.sh; )
install -d //usr/local/sbin
install -m 755 drbd-overview.pl //usr/local/sbin/drbd-overview
Don't forget to run update-rc.d
mkdir -p //usr/local/etc/udev/rules.d
install -m 644 drbd.rules //usr/local/etc/udev/rules.d/65-drbd.rules
mkdir -p //usr/local/etc/xen/scripts
install -m 755 block-drbd //usr/local/etc/xen/scripts
mkdir -p //usr/local/etc/ha.d/resource.d
install -m 755 drbddisk //usr/local/etc/ha.d/resource.d
install -m 755 drbdupper //usr/local/etc/ha.d/resource.d
install -d //usr/local/lib/drbd
install -m 755 crm-fence-peer.sh //usr/local/lib/drbd
( set -e ; cd //usr/local/lib/drbd ;\
          ln -s -f crm-fence-peer.sh crm-unfence-peer.sh ; )
mkdir -p //usr/local/lib/ocf/resource.d/linbit
install -m 755 drbd.ocf //usr/local/lib/ocf/resource.d/linbit/drbd
mkdir -p //usr/local/etc/bash_completion.d
install -m 644 drbdadm.bash_completion //usr/local/etc/bash_completion.d/drbdadm
make[1]: Leaving directory `/usr/src/drbd-8.3.6/scripts'
make[1]: Entering directory `/usr/src/drbd-8.3.6/documentation'
set -e; for f in drbdsetup.8 drbd.conf.5 drbd.8 drbdadm.8 drbdmeta.8 drbddisk.8 
; do \
                s=${f##*.}; \
                install -v -D -m 644 $f //usr/local/share/man/man$s/$f ; \
        done
install: creating directory `//usr/local/share/man/man8'
`drbdsetup.8' -> `//usr/local/share/man/man8/drbdsetup.8'
install: creating directory `//usr/local/share/man/man5'
`drbd.conf.5' -> `//usr/local/share/man/man5/drbd.conf.5'
`drbd.8' -> `//usr/local/share/man/man8/drbd.8'
`drbdadm.8' -> `//usr/local/share/man/man8/drbdadm.8'
`drbdmeta.8' -> `//usr/local/share/man/man8/drbdmeta.8'
`drbddisk.8' -> `//usr/local/share/man/man8/drbddisk.8'
make[1]: Leaving directory `/usr/src/drbd-8.3.6/documentation'
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to