Enable more tools in config.maemo
[busybox4maemo] / debian / patches / 03tar.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 99-unnamed.dpatch by Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: No description.
6
7 @DPATCH@
8 diff --git a/archival/Config.in b/archival/Config.in
9 index 8d31ec7..a3ff732 100644
10 --- a/archival/Config.in
11 +++ b/archival/Config.in
12 @@ -239,6 +239,13 @@ config FEATURE_TAR_LONG_OPTIONS
13         help
14                 Enable use of long options, increases size by about 400 Bytes
15  
16 +config FEATURE_TAR_TOUCH
17 +       bool "Enable ignoring touch option"
18 +       default n
19 +       depends on TAR
20 +       help
21 +         Allows compatibility with -m / --touch command line option.
22
23  config UNCOMPRESS
24         bool "uncompress"
25         default n
26 diff --git a/archival/tar.c b/archival/tar.c
27 index 5b19093..9e9cff6 100644
28 --- a/archival/tar.c
29 +++ b/archival/tar.c
30 @@ -713,6 +713,7 @@ enum {
31         USE_FEATURE_TAR_COMPRESS(OPTBIT_COMPRESS    ,)
32         OPTBIT_NOPRESERVE_OWN,
33         OPTBIT_NOPRESERVE_PERM,
34 +       USE_FEATURE_TAR_TOUCH(   OPTBIT_TOUCH       ,)
35         OPT_TEST         = 1 << 0, // t
36         OPT_EXTRACT      = 1 << 1, // x
37         OPT_BASEDIR      = 1 << 2, // C
38 @@ -731,6 +732,7 @@ enum {
39         OPT_COMPRESS     = USE_FEATURE_TAR_COMPRESS((1<<OPTBIT_COMPRESS    )) + 0, // Z
40         OPT_NOPRESERVE_OWN  = 1 << OPTBIT_NOPRESERVE_OWN , // no-same-owner
41         OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions
42 +       OPT_TOUCH        = USE_FEATURE_TAR_TOUCH(   (1<<OPTBIT_TOUCH       )) + 0, // m
43  };
44  #if ENABLE_FEATURE_TAR_LONG_OPTIONS
45  static const char tar_longopts[] ALIGN1 =
46 @@ -770,6 +772,9 @@ static const char tar_longopts[] ALIGN1 =
47  # if ENABLE_FEATURE_TAR_FROM
48         "exclude\0"             Required_argument "\xff"
49  # endif
50 +# if ENABLE_FEATURE_TAR_TOUCH
51 +       "touch\0"               No_argument       "m"
52 +# endif
53         ;
54  #endif
55  
56 @@ -814,6 +819,7 @@ int tar_main(int argc, char **argv)
57                 USE_FEATURE_TAR_FROM(    "T:X:")
58                 USE_FEATURE_TAR_GZIP(    "z"   )
59                 USE_FEATURE_TAR_COMPRESS("Z"   )
60 +               USE_FEATURE_TAR_TOUCH(   "m"   )
61                 , &base_dir // -C dir
62                 , &tar_filename // -f filename
63                 USE_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T