From 8da211ed32160d2a2733030224a60d1a4e9a9660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 11 Feb 2010 15:08:00 +0000 Subject: [PATCH] Making openoffice build in chroot (where there is no root in /etc/passwd) svn path=/nixpkgs/trunk/; revision=19935 --- .../office/openoffice/default.nix | 2 +- .../office/openoffice/root-required.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/office/openoffice/root-required.patch diff --git a/pkgs/applications/office/openoffice/default.nix b/pkgs/applications/office/openoffice/default.nix index 73c046fef52..5da79f8f4c4 100644 --- a/pkgs/applications/office/openoffice/default.nix +++ b/pkgs/applications/office/openoffice/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sha256 = "95440f09f8dce616178b86b26af8e543c869d01579207aa68e8474019b59caca"; }; - patches = [ ./oo.patch ./OOo-3.1.1-HEADERFIX-1.patch ]; + patches = [ ./oo.patch ./OOo-3.1.1-HEADERFIX-1.patch ./root-required.patch ]; src_system = fetchurl { url = "http://openoffice.bouncer.osuosl.org/?product=OpenOffice.org&os=src_bzip&lang=system&version=${version}"; diff --git a/pkgs/applications/office/openoffice/root-required.patch b/pkgs/applications/office/openoffice/root-required.patch new file mode 100644 index 00000000000..b93fd22b4ab --- /dev/null +++ b/pkgs/applications/office/openoffice/root-required.patch @@ -0,0 +1,25 @@ +As nix chroot environment does not have the 'root' as owner, we have to disable +the "owner=root" tar parameters when doing these tar files. +They are built at openoffice build time. +diff --git a/sysui/desktop/slackware/makefile.mk b/sysui/desktop/slackware/makefile.mk +index 3342aca..49679b1 100644 +--- a/sysui/desktop/slackware/makefile.mk ++++ b/sysui/desktop/slackware/makefile.mk +@@ -100,7 +100,7 @@ $(MISC)/$(TARGET)/usr/share/applications/ : + + $(MISC)/$(TARGET)/empty.tar : + @$(MKDIRHIER) $(@:d)/empty +- @tar -C $(MISC)/$(TARGET)/empty --owner=root --group=root --same-owner -cf $@ . ++ @tar -C $(MISC)/$(TARGET)/empty -cf $@ . + + + # --- packaging --------------------------------------------------- +@@ -112,7 +112,7 @@ $(MENUFILES) : $(MISC)/$(TARGET)/empty.tar + -$(RM) -r $(MISC)$/$(@:b) + dmake $(MISC)$/$(@:b)$/usr/share/applications $(MISC)$/$(@:b)$/install$/slack-desc $(MISC)$/$(@:b)$/install$/doinst.sh + @$(COPY) $(MISC)/$(TARGET)$/empty.tar $@.tmp +- @tar -C $(MISC)/$(@:b) --owner=root --group=root --same-owner --exclude application.flag -rf $@.tmp install usr opt ++ @tar -C $(MISC)/$(@:b) --exclude application.flag -rf $@.tmp install usr opt + @gzip < $@.tmp > $@ + @$(RM) $@.tmp + $(RM) -r $(MISC)$/$(@:b)