The following commit has been merged in the master branch:
commit 68a1f4682bb8876168168770a200aaf389b562a7
Author: Guillem Jover <[email protected]>
Date: Fri May 18 04:19:49 2012 +0200
build: Allow changing the default dpkg-deb compressor on configure
This will allow downstreams to choose something better than gzip as
their default compressor, for example xz. Or when xz becomes the
default to revert back to something else.
diff --git a/configure.ac b/configure.ac
index 767c4d6..74e379d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,9 @@ DPKG_WITH_DIR([admindir],
[${localstatedir}/lib/${PACKAGE_NAME}],
DPKG_WITH_DIR([logdir], [${localstatedir}/log],
[system logging directory [LOCALSTATEDIR/log]])
+# Set default dpkg-deb compressor
+DPKG_DEB_COMPRESSOR([gzip])
+
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
diff --git a/debian/changelog b/debian/changelog
index d3faa2c..116e402 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -121,6 +121,8 @@ dpkg (1.17.0) UNRELEASED; urgency=low
* Add support for mipsn32(el) and mips64(el) to arch tables.
Thanks to YunQiang Su <[email protected]>. Closes: #685096, #707323
* Document --file and --label parser options in dpkg-parsechangelog(1).
+ * Add a new configure --with-dpkg-deb-compressor option to allow selecting
+ the default dpkg-deb compressor, mainly for downstreams.
[ Updated programs translations ]
* Fix typo in Spanish translation of update-alternatives.
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index cac9834..9c5bf8b 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -180,7 +180,7 @@ set_deb_new(const struct cmdinfo *cip, const char *value)
}
struct compress_params compress_params = {
- .type = compressor_type_gzip,
+ .type = DPKG_DEB_DEFAULT_COMPRESSOR,
.strategy = compressor_strategy_none,
.level = -1,
};
diff --git a/m4/dpkg-build.m4 b/m4/dpkg-build.m4
index 1c259f2..bf35163 100644
--- a/m4/dpkg-build.m4
+++ b/m4/dpkg-build.m4
@@ -35,6 +35,23 @@ AC_DEFUN([DPKG_WITH_DIR], [
AC_MSG_NOTICE([using directory $1 = '$$1'])
])# DPKG_WITH_DIR
+# DPKG_DEB_COMPRESSOR(COMP)
+# -------------------
+# Change default «dpkg-deb --build» compressor.
+AC_DEFUN([DPKG_DEB_COMPRESSOR], [
+ AC_ARG_WITH([dpkg-deb-compressor],
+ [AS_HELP_STRING([--with-dpkg-deb-compressor=COMP],
+ [change default dpkg-deb build compressor])],
+ [with_dpkg_deb_compressor=$withval], [with_dpkg_deb_compressor=$1])
+ AS_CASE([$with_dpkg_deb_compressor],
+ [gzip|xz|bzip2], [:],
+ [AC_MSG_ERROR([unsupported default compressor $with_dpkg_deb_compressor])])
+ AC_DEFINE_UNQUOTED([DPKG_DEB_DEFAULT_COMPRESSOR],
+ [compressor_type_${with_dpkg_deb_compressor}],
+ [default dpkg-deb build compressor])
+ AC_MSG_NOTICE([using default dpkg-deb compressor =
$with_dpkg_deb_compressor])
+]) # DPKG_DEB_COMPRESSOR
+
# DPKG_DIST_CHECK(COND, ERROR)
# ---------------
# Check if the condition is fulfilled when preparing a distribution tarball.
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]