1 diff -ur orig/tar-1.25/src/common.h tar-1.25/src/common.h
2 --- orig/tar-1.25/src/common.h 2010-11-10 18:41:01.000000000 -0400
3 +++ tar-1.25/src/common.h 2010-11-11 20:28:06.000000000 -0400
7 extern void (*fatal_exit_hook) (void);
9 +GLOBAL int debian_longlink_hack;
10 diff -ur orig/tar-1.25/src/create.c tar-1.25/src/create.c
11 --- orig/tar-1.25/src/create.c 2010-11-10 18:41:01.000000000 -0400
12 +++ tar-1.25/src/create.c 2010-11-11 20:30:44.000000000 -0400
17 +extern int debian_longlink_hack;
19 /* Error number to use when an impostor is discovered.
20 Pretend the impostor isn't there. */
21 enum { IMPOSTOR_ERRNO = ENOENT };
23 return write_short_name (st);
25 else if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT)
26 - < strlen (st->file_name))
27 + < strlen (st->file_name) + debian_longlink_hack)
28 return write_long_name (st);
30 return write_short_name (st);
32 block_ordinal = current_block_ordinal ();
33 assign_string (&st->link_name, link_name);
34 if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT)
35 - < strlen (link_name))
36 + < strlen (link_name) + debian_longlink_hack)
40 diff -ur orig/tar-1.25/src/tar.c tar-1.25/src/tar.c
41 --- orig/tar-1.25/src/tar.c 2010-11-10 18:41:01.000000000 -0400
42 +++ tar-1.25/src/tar.c 2010-11-11 20:28:59.000000000 -0400
43 @@ -2566,6 +2566,16 @@
44 report_textual_dates (&args);
47 +/* Debian specific environment variable used by pristine-tar to enable use of
48 + * longlinks for filenames exactly 100 bytes long. */
49 +void debian_longlink_hack_init () {
50 + char *s=getenv ("TAR_LONGLINK_100");
51 + if (s && strcmp(s, "1") == 0)
52 + debian_longlink_hack=1;
54 + debian_longlink_hack=0;
61 filename_terminator = '\n';
62 set_quoting_style (0, DEFAULT_QUOTING_STYLE);
64 + debian_longlink_hack_init ();
66 /* Make sure we have first three descriptors available */