Module: check_mk
Branch: master
Commit: a0e3be0b982280a356f81b1e0b66f107ce76f9ef
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a0e3be0b982280…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 10 12:20:26 2018 +0200
6340 FIX Fixed debian agent package incompatibilities
The debian agent package shipped with Check_MK (located in share/check_mk/agent/*.deb)
was
not compatible with older Debian/Ubuntu version because it used xz as compression
algorithm
for the control files.
When trying to install such a package an error like this occurred:
dpkg-deb: error: archive 'check-mk-agent_1.4.0p34-1_all.deb' contains not
understood data member control.tar.xz, giving up
We have now changed the compression of the whole package to gzip which should make the
package
compatible to such systems again.
Change-Id: If20e0de24267356c877d043dd93b02a00a03dd97
---
.werks/6340 | 20 ++++++++++++++++++++
agents/Makefile | 12 +++++++++---
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/.werks/6340 b/.werks/6340
new file mode 100644
index 0000000..05f76b0
--- /dev/null
+++ b/.werks/6340
@@ -0,0 +1,20 @@
+Title: Fixed debian agent package incompatibilities
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1531217694
+
+The debian agent package shipped with Check_MK (located in share/check_mk/agent/*.deb)
was
+not compatible with older Debian/Ubuntu version because it used xz as compression
algorithm
+for the control files.
+
+When trying to install such a package an error like this occurred:
+
+dpkg-deb: error: archive 'check-mk-agent_1.4.0p34-1_all.deb' contains not
understood data member control.tar.xz, giving up
+
+We have now changed the compression of the whole package to gzip which should make the
package
+compatible to such systems again.
diff --git a/agents/Makefile b/agents/Makefile
index 608ac7c..2e5a4ab 100644
--- a/agents/Makefile
+++ b/agents/Makefile
@@ -102,6 +102,9 @@ rpm $(RPM_PACKAGE):
rm -rf $(RPM_TOPDIR) $(RPM_BUILDROOT)
+# TODO: Replace alien usage. Debian packages should be created just like the bakery does
+# Keep in mind that we still need to use gz compression by default for the agent
+# packages.
deb $(DEB_PACKAGE): $(RPM_PACKAGE)
@echo "Sorry. Debian packages currently via alien"
rm -f *.deb
@@ -113,12 +116,15 @@ deb $(DEB_PACKAGE): $(RPM_PACKAGE)
cd deb-unpack && \
ar x ../$$DEB_PKG && \
mkdir ctrl && \
- tar xJf control.tar.xz -C ctrl && \
+ tar xf control.tar.* -C ctrl && \
sed -i -e '/^Depends:/d' \
-e 's/^Version:.*/Version: $(VERSION)-1/' \
-e 's/^Maintainer:.*/Maintainer: feedback(a)check-mk.org/' ctrl/control
&& \
- tar cJf control.tar.xz $(TAROPTS) -C ctrl . && \
- ar r ../$(DEB_PACKAGE) debian-binary control.tar.* data.tar.*
+ tar czf control.tar.gz $(TAROPTS) -C ctrl . && \
+ xz --decompress data.tar.xz && \
+ gzip data.tar && \
+ ar d ../$(DEB_PACKAGE) data.tar.xz && \
+ ar r ../$(DEB_PACKAGE) debian-binary control.tar.gz data.tar.gz
rm -rf deb-unpack
clean: