Commit Graph

23 Commits (62c0666378eb70285b6a3052bf4144d2132a5891)

Author SHA1 Message Date
Jeff Mahoney 62c0666378 btrfs-progs: udev: add rules for dm devices
Systemd's btrfs rule runs btrfs dev ready on each device
as it's discovered.  The btrfs command is executed as a builtin
command via an IMPORT{builtin} rule, which means it gets
executed at rule evaluation time, not rule execution time.  That
means that the device mapper links haven't been setup yet and the only
nodes that can be depended upon are /dev/dm-#.  That we see
/dev/mapper/name names in /proc/mounts is only because we replace the
device name we have cached with the one passed in via mount.  If
we have a multi-device file system and the primary device is removed,
the remaining devices will show /dev/dm-#.  In addition, if the
udev rule is executed again by someone generating a change event (e.g.
partprobe), the names are also replaced by the /dev/dm-# names.

This patch adds a new rule that adds a run rule that calls btrfs dev
ready again using the device mapper links once they're created.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
Qu Wenruo ec4f8776fd btrfs-progs: Restrict e2fsprogs version for convert
We want to support version 1.41 due to longterm and enterprise distros,
make the check explicit.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-02 14:45:00 +02:00
Mike Gilbert 17e204bb5e btrfs-progs: Use AC_CHECK_TOOL to find AR
AC_CHECK_TOOL takes the --host option into account for cross-compiling.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-14 11:46:59 +01:00
David Sterba f25142f2d0 btrfs-progs: install to /usr/local by default again
The conversion to autotools changed the default prefix to /usr. There's
no reason to diverge. Distributions builds set prefix the /usr path and
local builds are supposed to go to /usr/local .

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=108571
Reported-by: Karl Richter <krichter722@aol.de>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-04 11:28:24 +01:00
David Sterba 083c196c2e btrfs-progs: configure: fix typo in summary
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-22 01:13:48 +02:00
Mike Gilbert a526cc5b22 btrfs-progs: Fix autoconf handling of --enable-convert
AC_ARG_ENABLE(convert) sets $enable_convert, not $enable_btrfsconvert.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-03-25 02:52:48 +01:00
David Sterba fef4f9e50b btrfs-progs: autoconf: define package url manually if not set
The PACKAGE_URL is set from optional parameter of AC_INIT starting in
autoconf 2.64. There are enterprise distros with version 2.63, we can
make the build work there easily as well.

Fixes build failure:

mkfs.c: In function ?main?:
mkfs.c:1492: error: ?PACKAGE_URL? undeclared (first use in this function)

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-13 14:39:43 +01:00
David Sterba dfbbe312ad btrfs-progs: autoconf: do not force fortify flags
Make it default, but let the user override it.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-05 15:11:40 +01:00
David Sterba 005526d065 btrfs-progs: autoconf: move custom CFLAGS from makefile
Keep only flags that are required to build properly, current fine
tunings are moved to the optional defaults in configure and can be
overriden by the user.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-05 15:05:21 +01:00
David Sterba 9143fda114 btrfs-progs: autoconf: set CFLAGS conditionally
The expected way to define custom CFLAGS is

  $ export CFLAGS=...
  $ ./configure ...

the build will use them. No not override the make variables directly
from now on.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-05 14:33:36 +01:00
David Sterba 99c53e440e btrfs-progs: autoconf: check btrfs-convert dependencies
Use the standard pkg-config checks.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-03 17:13:57 +01:00
David Sterba 8fa3fed3a4 btrfs-progs: autoconf: check if backtrace is really supported
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-03 17:13:57 +01:00
David Sterba 93e0bd4703 btrfs-progs: autoconf: print summary about features
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-03 17:13:57 +01:00
David Sterba 1275c4fc1b btrfs-progs: autoconf: make btrfs-convert build optional
Proposed at https://github.com/kdave/btrfs-progs/pull/6, I've added the
configure options.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-03 17:13:55 +01:00
David Sterba e1f0d9d446 btrfs-progs: autoconf: detect tools to build docs
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-03 16:06:52 +01:00
David Sterba d90978c9cc btrfs-progs: autoconf: generate documentation makefile as well
This is plain move to .in.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-02-03 15:42:34 +01:00
David Sterba 58f92c7caf btrfs-progs: build, use autoconf to detect RM
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 19:03:23 +01:00
Karel Zak badb4a15af btrfs-progs: autoconf: add --disable-documentation
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 18:01:00 +01:00
Karel Zak a22c3a0dcf btrfs-progs: autoconf: add --disable-backtrace
It's better to use ./configure than manually edit Makefile.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 18:01:00 +01:00
Karel Zak 2c2e6c4e12 btrfs-progs: autoconf: cleanup compilation flags usage
- define basic default CFLAGS in configure.ac, because:

   * autoconf default is -g -O2, but btrfs uses -g -O1

   * it's better to follow autoconf; standard way to modify
     CFLAGS is to call:  CFLAGS="foo bar" ./configure

- move all flags to one place in Makefile.in

- don't use AM_CFLAGS, the CFLAGS and STATIC_CFLAGS are enough

- don't mix objects and flags in $LIBS, it's more readable to
  add $(libs) to make rules

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 18:01:00 +01:00
Karel Zak 27a807277b btrfs-progs: autoconf: check for build programs in ./configure
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 18:01:00 +01:00
Karel Zak 04743d0043 btrfs-progs: autoconf: use ./configure to generate version.h
The original homemade solution is unnecessary, autotools provides better
infrastructure to generate files.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 18:00:59 +01:00
Karel Zak 48e728d112 btrfs-progs: autoconf: add ./configure script
- add ./autogen.sh script (necessary after git clean/clone)
- add ./configure.ac
- copy autotool helper scripts from automake
- modify version.sh to be usable from the configure script
- rename Makefile to Makefile.in and use basic variables from configure.ac

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-01-28 17:55:36 +01:00