[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#397786: developers-reference: Please describe easy ways to add binary files in the diff.gz

Package: developers-reference
Version: 3.3.7
Severity: wishlist
Tags: patch

Section " Changing binary files in diff.gz" currently describes
how to add binary files by uuencoding them.  Most people use uudecode
for that purpose, and thus add a Build-Dependency on sharutils.
Actually the essential perl can also do it, and I think this should be
documented.  Here's a patch:

--- developers-reference.sgml	17 Jul 2006 21:07:28 -0000	1.291
+++ developers-reference.sgml	9 Nov 2006 14:25:17 -0000
@@ -4941,7 +4941,19 @@
 The file should have a name that makes it clear which binary file it
 encodes. Usually, some postfix indicating the encoding should be
-appended to the original filename.
+appended to the original filename.  Note that you don't need to
+depend on <package>sharutils</package> to get
+the <prgn>uudecode</prgn> program if you
+use <prgn>perl</prgn>'s <tt>pack</tt> function.  The code could look
+    perl -ne 'print pack "u", $$_;' $(file) > $(file).uuencoded
+    perl -ne 'print unpack "u", $$_;' $(file).uuencoded > $(file)
 The file would then be decoded and copied to its place during the
 build process. Thus the change will be visible quite easy.

Regards, Frank

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (99, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.17-2-686
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

-- no debconf information

Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)

Reply to: