summaryrefslogtreecommitdiffstats
path: root/libmount/src/Makemodule.am
Commit message (Collapse)AuthorAgeFilesLines
* build-sys: remove redundant EXTRA_DIST filesRuediger Meier2018-01-221-2/+1Star
| | | | | | | The sources of AC_CONFIG_FILES (*.in) are automatically distributed. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: avoid using prog_DEPENDENCIESRuediger Meier2018-01-221-3/+1Star
| | | | | | | Use EXTRA_prog_DEPENDENCIES to have the benefit of automake's automatic prog_DEPENDENCIES. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: remove unneeded dependencies on bla.h.inRuediger Meier2018-01-221-2/+1Star
| | | | | | | | | | We have already automakes's automatic dependencies like bla.h.in -> bla.h -> foo.o -> bar.la An explicit direct dependency bla.h.in -> bar.la is redundant and useless anyways. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: automake is able to find headers in builddir ...Ruediger Meier2018-01-221-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: remove generated headers from dist tar ballRuediger Meier2018-01-221-4/+2Star
| | | | | | | | | | | | | Headers should only be listed in either *_HEADERS or *_SOURCES, especially when we want nodist_*_HEADERS. Since all the generated headers are made by configure we don't even need to use BUILT_SOURCES or other tricks. Also see automake docs 9.4.1 Built Sources Example: case "Build bindir.h from configure" Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: don't use non-existing UUID_LIBSRuediger Meier2017-07-181-1/+1
| | | | | | | We've added UUID_LIBS in f77a4d1087 but I don't see what it was good for. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: fix library order when linkingRuediger Meier2017-06-011-1/+1
| | | | | | | | | | We got some errors on Alpine Linux where $LTLIBINTL is non-empty: ./.libs/libcommon.a(libcommon_la-blkdev.o): In function `open_blkdev_or_file': lib/blkdev.c:282: undefined reference to `libintl_gettext collect2: error: ld returned 1 exit status Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: some libmount test progs are Linux onlyRuediger Meier2016-03-211-2/+4
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: use AC_PROG_MKDIR_P and remove a few gnuismsRuediger Meier2016-03-131-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: fix if..endif for *_la_LDFLAGSKarel Zak2016-03-101-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: disable unused parameter warnings for some test progsRuediger Meier2016-02-231-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: always add AM_CFLAGSRuediger Meier2016-02-231-0/+1
| | | | | | | | We were missing our nice compliler warnings for many programs and libs. See next commits how many trivial and non-trival warnings have to be fixed. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: always use global LDADDRuediger Meier2016-02-231-1/+1
| | | | | | | | This was a major showstopper when building on a system where LTLIBINTL libs are needed (e.g. OSX). Maybe there are a few test programs which wouldn't need LDADD ... never mind. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: check linker support for version scriptsRuediger Meier2016-02-181-1/+3
| | | | | | | The macro AX_CHECK_VSCRIPT was taken from gnu autoconf archive. http://www.gnu.org/software/autoconf-archive/ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libmount: consolidate btrfs stuff, make it more portableKarel Zak2016-01-261-2/+5
| | | | | | | | | - add --with-btrfs (enabled by default) - check for linux/btrfs.h - add "btrfs" to libmount features list (see mount -V) - #ifdef HAVE_BTRFS_SUPPORT for all btrfs stuff in libmount Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: handle btrfs default subvolume mountStanislav Brabec2016-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When mounting btrfs volume without subvol= and subvolid=, and the btrfs volume has default subvolume defined, mount() mounts the default subvolume and not the volume root as other filesystems do. To handle this situation correctly (for example for "mount -a"), libmount has to be capable to detect default subvolume. Add btrfs.c and btrfs.h that implement needed functions. This patch adds mnt_table_find_target_with_option() to the library API. Known problems not covered by this patch: - Use of subvolid= in fstab is not yet handled. - Use of type auto in combination with subvol= in fstab is not yet handled. - Use of btrfs in loop devices, where image file is specified in fstab is not yet handled (use of /dev/loop0 in fstab works). - If fstab uses subvol=, and subvol path changes since last "mount -a", subsequent "mount -a" will not recognize that it is already mounted, and it will attempt to mount it second time. To fix it, libmount should remember subvolid in time of mount (subvolid is unique for the subvolume, subvol is not). - mountinfo contains subvol and subvolid since kernel 4.2. Before kernel 4.2, there is no reasonable way to solve this situation. (One would create temporary mount point, mount the default, call needed ioctl() to determine what was mounted, deduce the default subvolume, compare it with subvolume of mounted volume, unmount and return result.) How to reproduce: truncate -s1G btrfs_test.img mkdir -p btrfs_mnt /sbin/mkfs.btrfs -f -d single -m single ./btrfs_test.img mount -o loop btrfs_test.img btrfs_mnt pushd . cd btrfs_mnt mkdir -p d0/dd0/ddd0 cd d0/dd0/ddd0 touch file{1..5} btrfs subvol create s1 cd s1 touch file{1..5} mkdir -p d1/dd1/ddd1 cd d1/dd1/ddd1 btrfs subvol create s2 rid=$(btrfs inspect rootid s2) echo new default $rid btrfs subvol get-default . btrfs subvol set-default $rid . popd umount btrfs_mnt losetup /dev/loop0 $PWD/btrfs_test.img echo "/dev/loop0 $PWD/btrfs_mnt btrfs defaults 0 0" >>/etc/fstab mount -a mount -a umount btrfs_mnt sed -i "/\/dev\/loop0/d" /etc/fstab losetup -d /dev/loop0 rm btrfs_test.img rmdir btrfs_mnt Current behavior: mount: /dev/loop0 is already mounted or /root/btrfs_mnt busy /dev/loop0 is already mounted on /root/btrfs_mnt Expected behavior is to ignore already mounted FS. [kzak@redhat.com: - make 'var' optional for mnt_table_find_target_with_option(), - add mnt_table_find_target_with_option() to symbols table and docs - add "btrfs" string between supported debug modes - minor coding style changes] Signed-off-by: Stanislav Brabec <sbrabec@suse.cz> Cc: David Štěrba <dsterba@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup realtime lib usageKarel Zak2015-03-061-2/+2
| | | | | | | | * check for timer_create() * define dependence on timer_create() for flock * rename CLOCKGETTIME_LIBS to REALTIME_LIBS Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add new libmnt_monitor APIKarel Zak2014-12-051-1/+8
| | | | | | | | | | | | It's usually enough to us [e]poll() to monitor kernel mount table, but there is no way how to monitor changes in userspace mount options (e.g. _netdev). The management of these mount options is completely hidden in libmount and /rub/mount/utab is private libmount file. This patch introduces new libmnt_mount API to monitor also userspace mount table. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup in libmount MakemoduleKarel Zak2014-11-261-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move all around clock_gettime() to monotonic.cKarel Zak2014-11-191-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use CLOCKGETTIME_LIBSKarel Zak2014-11-191-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: only include context on linuxAndreas Henriksson2014-09-221-4/+8
| | | | | | | | | | This is part of an attempt to make libmount buildable on non-linux. The parts that need architecture specific porting is under the context*.c files and the rest of libmount is useful/used by for example fsck. Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* libs/debug: accept human readable names for _DEBUG=Ondrej Oprala2014-08-131-1/+7
| | | | | | | | | | For example $ LIBMOUNT_DEBUG=tab,cache findmnt to debug only TAB and CACHE subsystem. Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* Only move shared libraries to /lib if they existsThomas Petazzoni2014-06-161-1/+1
| | | | | | | | | | | | | | | | | | In several Makemodule.am, there is a install-exec-hook-<library> target whose role is to move the shared library from /usr/lib to /lib, while keeping a symbolic link /usr/lib/libuuid.so -> ../../lib/<library>.so.<version>. However, when util-linux is built with --enable-static --disable-shared (as is needed on noMMU platforms that don't support shared libraries), no <library>.so is built, but the install-exec-hook-libuuid creates an invalid /usr/lib/<library>.so symbolic link, pointing to ../../lib (yes, the directory). This causes troubles later one when other libraries/programs are compiled with -l<library>, as gcc thinks a shared library is available because there's a file named /usr/lib/<library>.so. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* build-sys: fix .h.in usage in libblkid and libmountKarel Zak2014-04-071-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: don't connect _DEPENDENCIES and _LIBADDKarel Zak2014-03-051-1/+2
| | | | | | | | | The _DEPENDENCIES has to be used for dependencies on another in-tree files, but _LIBADD is to specify additional libs (including external libs). Reported-by: oleid <notifications@github.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add CFLAGS and LDFLAGS for daemons and shared libsKarel Zak2013-08-271-0/+2
| | | | | | | | This is necessary for paranoid security guys who believe that things like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the world a safer place... Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: don't compile lib{mount,blkid} tests when --disable-static specifiedKarel Zak2012-08-021-0/+3
| | | | | | The tests often depend on private (non-API) library functions. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move tests to check_PROGRAMSKarel Zak2012-07-301-1/+1
| | | | | | Thanks to Mike Frysinger. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert lib/ to libcommon.laKarel Zak2012-06-261-10/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert libmount/ to moduleKarel Zak2012-06-261-0/+143
Signed-off-by: Karel Zak <kzak@redhat.com>