diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2018-02-13 20:29:10 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-02-18 02:24:09 +0100 |
commit | 2b266a338718ccd994a4cef05f128eb0c1b9fdc7 (patch) | |
tree | d03ccc39f59f4736678de70d22b32725fd5d4982 /configure.ac | |
parent | bcc5790554f02d65b03eebcc47fb8859fcf44643 (diff) |
tdf#115554: Create tar archives using 'fakeroot'
'tar' must be run as root or faked to be run as root,
to make sure that file ownerships and permissions inside
the created tar archives are as desired (root:root).
Have fakeroot take care about creating an appropriate
environment rather than using the custom "libgetuid",
to no longer have to care about tar internals by ourselves.
This fixes the problem that file ownerships are incorrect
when tar version >= 1.24 is used for
* tar archives holding all the generated deb/rpm packages
(created in 'download.pm')
* tar archives created by using the
'--with-pacakage-format=archive' autogen option
(created in 'simplepackage.pm')
Change-Id: Id20ccce4d002ff95c75292eda8080ca299eee3a5
Reviewed-on: https://gerrit.libreoffice.org/49682
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 74a0a4e6844b..c40f61b3f1c7 100644 --- a/configure.ac +++ b/configure.ac @@ -4359,6 +4359,15 @@ msi - Windows .msi ;; esac done + # fakeroot is needed to ensure correct file ownerships/permissions + # inside deb packages and tar archives created on Linux and Solaris. + if test "$OS" = "LINUX" || test "$OS" = "SOLARIS"; then + AC_PATH_PROG(FAKEROOT, fakeroot, no) + if test "$FAKEROOT" = "no"; then + AC_MSG_ERROR( + [--with-package-format='$with_package_format' requires fakeroot. Install fakeroot.]) + fi + fi PKGFORMAT="$with_package_format" AC_MSG_RESULT([$PKGFORMAT]) else @@ -7296,10 +7305,6 @@ if test "$enable_epm" = "yes"; then if test "$DPKG" = "no"; then AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) fi - AC_PATH_PROG(FAKEROOT, fakeroot, no) - if test "$FAKEROOT" = "no"; then - AC_MSG_ERROR([fakeroot needed for deb creation. Install fakeroot.]) - fi fi if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then |