Commit Graph

111 Commits

Author SHA1 Message Date
Filipe Brandenburger 324330aca6 build-sys: Properly order install dependencies of pylibmount
Introduce a dependency so that libmount.so is installed before
pylibmount.so, so that when libtool tries to relink it, it can find
libmount.so in the destdir.

We introduce this additional make rule through an AC_SUBST variable, to
prevent automake from trying to interpret that.  This trick has been
suggested in http://stackoverflow.com/a/8643550.

This fixes a failure of `make install DESTDIR=...` when trying to relink
pylibmount against libmount.la.  libtool will look for libmount.so under
${DESTDIR}/${libdir} in that case, but if it is not yet present there,
libtool assumes it is a system installed library and use -lmount
instead, which causes the following failure if libmount is not installed
on the base system yet:

  libtool: install: warning: relinking `pylibmount.la'
  libtool: install: (... libtool --mode=relink gcc -o pylibmount.la \
        -rpath /usr/lib/python2.7/dist-packages/libmount \
        libmount/python/*.lo libmount.la ... -lpython2.7 \
        -inst-prefix-dir /path/to/destdir)
  /usr/bin/ld: cannot find -lmount
  collect2: error: ld returned 1 exit status
  libtool: install: error: relink `pylibmount.la' ...
  make[3]: *** [install-pylibmountexecLTLIBRARIES] Error 1

This seems to be a previously encountered issue, since automake includes
a hack to insert such a dependency rule to install all libLTLIBRARIES
before attempting to install binPROGRAMS, initially introduced in the
commit below:
http://git.savannah.gnu.org/cgit/automake.git/commit/?id=bd4a1d5ad1a72fa780a8b7fd6c365a5dad2e6220

Also related bug from Ubuntu tracker:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1442076

Tested that `make install` starts working again after this commit, even
when libmount-dev is not installed on the system.  Also confirmed that
`make distcheck` is now functional.

Confirmed that the all the files expected in the Python directory (both
__init__.py and pylibmount.so) are present after an install.

Tested that parallel install works, the dependency is always respected
since it's explicit.

Inspected the generated Makefile and confirmed that the definition of
install-pylibmountexecLTLIBRARIES (generated by automake) and the
explicit dependency we introduced are both present.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2016-02-05 11:03:09 -08:00
Ruediger Meier 24147585f0 tests: skip automake's empty "Testsuite summary"
We have no automake TESTS. Let's run check-local only.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-12-10 19:05:11 +01:00
Karel Zak f63faced16 Revert "build-sys: remove static builds from make-check"
The problem should be fixed now.

This reverts commit 948b87581e.
2015-03-06 14:23:57 +01:00
Karel Zak 948b87581e build-sys: remove static builds from make-check
.. temporary, the final solution has to cleanup timer_* functions
usage. The function are unnecessary for libmount, but we use
lib/monotme.c in the library and it probably requires -lrt and *also*
-lpthread for static builds.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-05 15:34:42 +01:00
Karel Zak 791da22d0e libfdisk: add version.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-01-13 13:46:31 +01:00
Karel Zak ed79557e1d build-sys: add fdisk.pc
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-26 13:20:16 +01:00
Karel Zak 0bb4c979c6 build-sys: create a regular shared libfdisk.so
- symbols versioning
- SONAME from configure.ac
- library version to header file
- modify build-sys to compile and install shared lib

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-26 12:45:24 +01:00
Søren Holm 10e1d2e5f7 libmount: provide version as int for better compiletime test
Signed-off-by: Søren Holm <sgh@sgh.dk>
2014-10-14 12:03:54 +02:00
Michael Marineau cb52ac9847 build-sys: create parent directory for $(PATHFILES)
When building outside the source tree there is nothing to guarantee the
target directory exists before writing to it. Most of the time this just
happens to work because something else creates the directory but not
always. For example:

    $ mkdir build
    $ cd build
    $ ../configure --disable-dependency-tracking
    $ make libuuid/uuid.pc
      GEN      libuuid/uuid.pc
    /bin/sh: line 2: libuuid/uuid.pc.tmp: No such file or directory
    make: *** [libuuid/uuid.pc] Error 1
2014-09-03 09:50:24 +02:00
Karel Zak 2ad2196349 build-sys: support ./configure ADJTIME_PATH=
.. to override the default /etc/adjtime path.

Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-19 10:30:56 +02:00
Karel Zak 1469736053 build-sys: fix smartcols.pc
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-16 15:18:20 +02:00
Ruediger Meier 15b2606c4f tests: fix python tests for dist and out-of-tree builds
- add python helper scripts to the dist
- helper scripts are always in srcdir
- python libs are in builddir
- abort tests if helpers are missing

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-06-04 10:14:24 +02:00
Ruediger Meier f339d2a5c2 build-sys: restore make distcheck's configure flags
They got lost with --enable-most-builds in 08b1c219.

Note additionally we add --enable-gtk-doc but don't add
--with-systemd because there are still many systems where systemd
is not available.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-06-03 17:00:26 +02:00
Karel Zak ac6a37c863 build-sys: cleanup bash-completion/
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 14:29:42 +02:00
Ondrej Oprala baa3b270ec Use libsmartcols in libfdisk and cfdisk
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-04-03 12:29:18 +02:00
Ondrej Oprala 1a4d989e22 libsmartcols: add basic files
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:15 +02:00
Karel Zak 4ddd86d5d9 build-sys: ove fdisks to disk-utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 11:35:15 +01:00
Karel Zak 65acdc8734 build-sys: remove deprecated-mount/
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-05 13:19:19 +01:00
Karel Zak 15c2e011a7 build-sys: install pylibmount into
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 15:24:33 +02:00
Karel Zak d78df0ac65 build-sys: add pylibmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-19 14:57:21 +02:00
Karel Zak 20da58084a bash-completion: rename shell-completion -> bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 14:58:07 +02:00
Sami Kerola 9cc36e9fdf bash-completion: add bash completetion configure option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-03-30 10:17:49 +00:00
Karel Zak d56a7c2330 libfdisk: add basic library files
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Sami Kerola 4cf02b6510 ddate: remove from util-linux
See RedHat bug for reasons why the ddate is cleaned up.  The reference is
where to get the command in future.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=823156
References: https://github.com/bo0ts/ddate
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 16:41:49 +02:00
Karel Zak 78dd43cadc build-sys: remove --enable-gtk-doc from make check
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-10 14:10:30 +02:00
Karel Zak d4baf92e50 build-sys: expand paths at make time
autoconf docs about *dir variables (e.g bindir):

 ... A corollary is that you should not use these variables except in
 makefiles...

 ...you should not rely on AC_CONFIG_FILES to replace bindir and friends
 in your shell scripts and other files; instead, let make manage their
 replacement.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-15 02:06:53 +02:00
Karel Zak 1b03e2cd33 tests: make compatible with autotools
The command 'make check' is called from 'make distcheck' (which is
used to generate official util-linux tarballs).

It means that tests/ stuff has to be compatible with autotools and
differentiate between source and build directories.

 * remove run-nonroot.sh (merged into run.sh
 * remove commands.sh.in
 * all tests and top level run.sh accept --builddir and --srcdir
   command line options
 * functions.sh modified to use $top_builddir/tests for output files

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-03 21:24:51 +02:00
Karel Zak fc22bff04b build-sys: add run.sh to make check for non-root users
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-30 18:19:20 +02:00
Karel Zak 922e6775e0 build-sys: move tests to check_PROGRAMS
Thanks to Mike Frysinger.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-30 17:59:16 +02:00
Petr Uzel b53f8b8eff build-sys: include tools/git-version-gen in the tarball
tools/git-version-gen is called from AC_INIT. Include it
in the tarball to make it easier to autoreconf-igure the package.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-30 17:12:29 +02:00
Sami Kerola 2cd5bc5a40 ddate: russian manual missing from package
This manpage causes more trouble than its worth.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:36 +02:00
Sami Kerola 07a16b9d1e build-sys: change --localstatedir to /run
Enable user to define where run state files are wrote.  Default for
these files is /run.  See reference for rationale why /var/run is no
longer the default.

Reference: http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 12:56:46 +02:00
Karel Zak 7bce71a3f9 build-sys: support separate libintl
Addresses: https://github.com/karelzak/util-linux/pull/13
Reported-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 16:44:25 +02:00
Karel Zak fb55280aa6 build-sys: remove include-Makefile.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak 50ea679509 build-sys: rename fdisk -> fdisks/, convert to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak ac73480a34 build-sys: convert tests/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak 957bab4e91 build-sys: move partx to disk-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:18 +02:00
Karel Zak 54dbc8cf69 build-sys: convert disk-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak f9a20f0b58 build-sys: move getopt to misc-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 37b88bfcd7 build-sys: convert misc-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak c7f753901f build-sys: move hwclock to sys-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 8772f8d7ee build-sys: convert sys-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak d2feb47fb1 build-sys: convert mount/ to module, rename to mount-deprecated/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak ffeb280566 build-sys: convert login-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:46:17 +02:00
Karel Zak 22d2322eb1 build-sys: convert term-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:53:09 +02:00
Karel Zak bc94024d08 build-sys: convert libmount/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:49:37 +02:00
Karel Zak f77a4d1087 build-sys: convert libblkid/ to module
- create module
 - remove unused libblkid/src/tst_types.c test

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:44:15 +02:00
Karel Zak 3632ce21b7 build-sys: convert libuuid/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:37:37 +02:00
Karel Zak 5ed5df5d6e build-sys: convert schedutils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:25:24 +02:00
Karel Zak e0ef609e89 build-sys: convert lib/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:13:08 +02:00