missing --transform)
Message-ID: <597ae3ab.SV0l5rWN/9yl0vRa%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 020307eb7d72e471e4bc2293df62d1bface08d13
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=020307eb7d72e4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 28 09:05:42 2017 +0200
tar: Fixed another incompatibility with old tar versions (missing --transform)
Change-Id: If2da19bf72ef58511184fdba447a6f815ace517e
---
Makefile | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 7e9da69..9233c29 100644
--- a/Makefile
+++ b/Makefile
@@ -188,7 +188,8 @@ check-version:
# Would use --exclude-vcs-ignores but that's available from tar 1.29 which
# is currently not used by most distros
-# Would also use --exclude-vcs, but this is also not available
+# Would also use --exclude-vcs, but this is also not available
+# And --transform is also missing ...
dist: mk-livestatus-$(VERSION).tar.gz
@EXCLUDES= ; \
if [ -d .git ]; then \
@@ -197,18 +198,27 @@ dist: mk-livestatus-$(VERSION).tar.gz
EXCLUDES+=" --exclude $${X%*/}" ; \
done ; \
fi ; \
- tar -cz --wildcards -f $(DIST_ARCHIVE) \
+ if [ -d check-mk-$(EDITION)-$(OMD_VERSION) ]; then \
+ rm -rf check-mk-$(EDITION)-$(OMD_VERSION) ; \
+ fi ; \
+ mkdir check-mk-$(EDITION)-$(OMD_VERSION) ; \
+ tar -c --wildcards \
+ $(TAROPTS) \
+ --exclude check-mk-$(EDITION)-$(OMD_VERSION) \
--exclude .git \
--exclude .gitignore \
--exclude .gitmodules \
--exclude .gitattributes \
--exclude $(DIST_ARCHIVE) \
$$EXCLUDES \
- --transform 's|^|check-mk-$(EDITION)-$(OMD_VERSION)/|gS' \
- * .werks .clang* ; \
+ * .werks .clang* | tar x -C check-mk-$(EDITION)-$(OMD_VERSION) ; \
if [ -f COMMIT ]; then \
rm COMMIT ; \
- fi
+ fi ; \
+ tar -cz --wildcards -f $(DIST_ARCHIVE) \
+ $(TAROPTS) \
+ check-mk-$(EDITION)-$(OMD_VERSION) ; \
+ rm -rf check-mk-$(EDITION)-$(OMD_VERSION)
# This tar file is only used by "omd/packages/check_mk/Makefile"
$(DISTNAME).tar.gz: mk-livestatus-$(VERSION).tar.gz .werks/werks $(JAVASCRIPT_MINI)
ChangeLog
@@ -219,9 +229,9 @@ $(DISTNAME).tar.gz: mk-livestatus-$(VERSION).tar.gz .werks/werks
$(JAVASCRIPT_MI
tar rf $(DISTNAME)/bin.tar $(TAROPTS) -C agents/windows/msibuild msi-update
gzip $(DISTNAME)/bin.tar
python -m compileall lib ; \
- tar czf $(DISTNAME)/lib.tar.gz $(TAROPTS) -C lib \
- --transform 's|^|cmk/|g' $$(cd lib ; ls) ; \
- rm lib/*.pyc
+ tar czf $(DISTNAME)/lib.tar.gz $(TAROPTS) \
+ cmk/* ; \
+ rm cmk/*.pyc
python -m compileall cmk_base ; \
tar czf $(DISTNAME)/base.tar.gz \
$(TAROPTS) \