summaryrefslogtreecommitdiff
path: root/sysui
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2018-02-12 12:35:47 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-02-18 02:23:19 +0100
commitbcc5790554f02d65b03eebcc47fb8859fcf44643 (patch)
treef46fee86652882c0cd3882c79e0a4b5afbbb2b25 /sysui
parent10496770a6c4ba870787f20a4f0948c30e3d59cd (diff)
tdf#115554: Use 'fakeroot' to build Debian packages
The command to create Debian packages must be run as root or faked to be run as root. The 'fakeroot' makes sure the command is run in an environment faking root privileges for file manipulation. This makes sure that file ownerships and permissions inside the created deb packages are correct. Using fakeroot instead of the custom "libgetuid" makes it unnecessary to care about internals of the underlying tools (like tar) and changes in those by ourselves. Change-Id: I2cbb203ab84f740377e535c1051c2b879779b164 Reviewed-on: https://gerrit.libreoffice.org/49597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sysui')
-rw-r--r--sysui/CustomTarget_deb.mk5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysui/CustomTarget_deb.mk b/sysui/CustomTarget_deb.mk
index 8a48894177aa..dd75ee913c62 100644
--- a/sysui/CustomTarget_deb.mk
+++ b/sysui/CustomTarget_deb.mk
@@ -60,13 +60,12 @@ $(deb_WORKDIR)/%/DEBIAN/control: $(deb_SRCDIR)/control $(call gb_CustomTarget_ge
echo "Version: $(PKGVERSION)-$(LIBO_VERSION_PATCH)" >>$@
du -k -s $(deb_WORKDIR)/$* | $(gb_AWK) -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >>$@
-$(deb_WORKDIR)/%$(PKGVERSIONSHORT)-debian-menus_$(PKGVERSION)-$(LIBO_VERSION_PATCH)_all.deb: $(deb_WORKDIR)/%/DEBIAN/postrm $(deb_WORKDIR)/%/DEBIAN/postinst $(deb_WORKDIR)/%/DEBIAN/prerm $(deb_WORKDIR)/%/DEBIAN/control $(call gb_Library_get_target,getuid)
+$(deb_WORKDIR)/%$(PKGVERSIONSHORT)-debian-menus_$(PKGVERSION)-$(LIBO_VERSION_PATCH)_all.deb: $(deb_WORKDIR)/%/DEBIAN/postrm $(deb_WORKDIR)/%/DEBIAN/postinst $(deb_WORKDIR)/%/DEBIAN/prerm $(deb_WORKDIR)/%/DEBIAN/control
chmod -R g-w $(deb_WORKDIR)/$*
chmod a+rx $(deb_WORKDIR)/$*/DEBIAN \
$(deb_WORKDIR)/$*/DEBIAN/pre* $(deb_WORKDIR)/$*/DEBIAN/post*
chmod g-s $(deb_WORKDIR)/$*/DEBIAN
- LD_PRELOAD=$(call gb_Library_get_target,getuid) \
- dpkg-deb --build $(deb_WORKDIR)/$* $@
+ fakeroot dpkg-deb --build $(deb_WORKDIR)/$* $@
# vim: set noet sw=4 ts=4: