Browse Source

Support building binary packages with the member data.tar.lzma compressed
with lzma.

Guillem Jover 17 years ago
parent
commit
d53793ad97
8 changed files with 36 additions and 10 deletions
  1. 7 0
      ChangeLog
  2. 2 2
      TODO
  3. 2 0
      debian/changelog
  4. 3 0
      dpkg-deb/build.c
  5. 3 1
      dpkg-deb/main.c
  6. 4 0
      lib/compression.c
  7. 5 0
      man/ChangeLog
  8. 10 7
      man/dpkg-deb.1

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2007-03-13  Guillem Jover  <guillem@debian.org>
+
+	* lib/compression.c (compress_cat): Support compress_type_lzma.
+	* dpkg-deb/build.c (do_build): Likewise.
+	* dpkg-deb/main.c (usage): Document that '-Z' now accepts lzma as well.
+	(setcompresstype): Parse 'lzma' as compress_type_lzma.
+
 2007-03-12  Guillem Jover  <guillem@debian.org>
 
 	* scripts/changelog/debian.pl: Fix call to outputclose by not passing

+ 2 - 2
TODO

@@ -26,13 +26,13 @@ lenny
    allowed or added. The main problem I'm facing with this one is and nice a
    clean implementation, the PoC and the idea how to fix it is present already.
 
- * Support lzma compression.
-
 1.14.x
 ------
 
  * Add Wig&Pen source package support.
 
+ * Support lzma and bzip2 source package compression.
+
  * Get rid of install-info.
 
  * Add multiarch support.

+ 2 - 0
debian/changelog

@@ -50,6 +50,8 @@ dpkg (1.14.0) UNRELEASED; urgency=low
     dpkg-buildpackage(1), dpkg-distaddfile(1), dpkg-genchanges(1),
     dpkg-gencontrol(1), dpkg-parsechangelog(1), dpkg-shlibdeps(1),
     deb-shlibs(5) and deb-substvars(5).
+  * Support building binary packages with the member data.tar.lzma compressed
+    with lzma.
 
   [ Updated dpkg translations ]
   * Romanian (Eddy Petrișor).

+ 3 - 0
dpkg-deb/build.c

@@ -452,6 +452,9 @@ void do_build(const char *const *argv) {
     case compress_type_bzip2:
       datamember = DATAMEMBER_BZ2;
       break;
+    case compress_type_lzma:
+      datamember = DATAMEMBER_LZMA;
+      break;
     case compress_type_cat:
       datamember = DATAMEMBER_CAT;
       break;

+ 3 - 1
dpkg-deb/main.c

@@ -90,7 +90,7 @@ static void usage(void) {
 "                                     packages).\n"
 "  -z#                              Set the compression level when building.\n"
 "  -Z<type>                         Set the compression type used when building.\n"
-"                                     Allowed values: gzip, bzip2, none.\n"
+"                                     Allowed values: gzip, bzip2, lzma, none.\n"
 "\n")) < 0) werr("stdout");
 
   if (printf(_(
@@ -186,6 +186,8 @@ static void setcompresstype(const struct cmdinfo *cip, const char *value) {
     compress_type = compress_type_gzip;
   else if (!strcmp(value, "bzip2"))
     compress_type = compress_type_bzip2;
+  else if (!strcmp(value, "lzma"))
+    compress_type = compress_type_lzma;
   else if (!strcmp(value, "none"))
     compress_type = compress_type_cat;
   else

+ 4 - 0
lib/compression.c

@@ -187,6 +187,10 @@ void compress_cat(enum compress_type type, int fd_in, int fd_out, const char *co
       combuf[1]= *compression;
       fd_fd_filter(fd_in, fd_out, BZIP2, "bzip2", combuf, v.buf);
 #endif
+    case compress_type_lzma:
+      strncpy(combuf, "-9c", sizeof(combuf));
+      combuf[1] = *compression;
+      fd_fd_filter(fd_in, fd_out, LZMA, "lzma", combuf, v.buf);
     case compress_type_cat:
       fd_fd_copy(fd_in, fd_out, -1, _("%s: compression"), v.buf);
       exit(0);

+ 5 - 0
man/ChangeLog

@@ -1,3 +1,8 @@
+2007-03-13  Guillem Jover  <guillem@debian.org>
+
+	* dpkg-deb.1: Move '-z' to it's own OPTIONS entry. Document '-Z',
+	and the new 'lzma' value.
+
 2007-03-13  Guillem Jover  <guillem@debian.org>
 
 	* po/add_de/dpkg-scanpackages.1.de.add: Copy to ...

+ 10 - 7
man/dpkg-deb.1

@@ -1,4 +1,4 @@
-.TH dpkg\-deb 1 "2003-03-06" "Debian Project" "dpkg suite"
+.TH dpkg\-deb 1 "2007-03-13" "Debian Project" "dpkg suite"
 .SH NAME
 dpkg\-deb - Debian package archive (.deb) manipulation tool
 .
@@ -39,12 +39,6 @@ appear in the binary package's filesystem archive, but instead
 the files in it will be put in the binary package's control
 information area.
 
-You can specify the compression level used by adding a
-.B \-z#
-option.
-.B dpkg\-deb
-will pass that option on to gzip.
-
 Unless you specify
 .BR \-\-nocheck ", " dpkg\-deb "
 will read
@@ -193,6 +187,15 @@ explanation of the \fB\-\-showformat\fP option in
 
 The default for this field is "${Package}\\t${Version}\\n".
 .TP
+.BI \-z compress_level
+Specify which compression level to pass to the compressor backend program,
+when building a package.
+.TP
+.BI \-Z compress_type
+Specify which compression type to use when building a package. Allowed
+values are \fIgzip\fP, \fIbzip2\fP, \fIlzma\fP, and \fInone\fP (default
+is \fIgzip\fP).
+.TP
 .BR \-\-new
 Ensures that
 .B dpkg\-deb