Merge lp:~stewart/percona-xtrabackup/bug677279-1.6 into lp:percona-xtrabackup/1.6

Proposed by Stewart Smith
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 286
Proposed branch: lp:~stewart/percona-xtrabackup/bug677279-1.6
Merge into: lp:percona-xtrabackup/1.6
Diff against target: 274 lines (+62/-48)
1 file modified
patches/tar4ibd_libtar-1.2.11.patch (+62/-48)
To merge this branch: bzr merge lp:~stewart/percona-xtrabackup/bug677279-1.6
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+76269@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/tar4ibd_libtar-1.2.11.patch'
2--- patches/tar4ibd_libtar-1.2.11.patch 2011-07-18 09:30:58 +0000
3+++ patches/tar4ibd_libtar-1.2.11.patch 2011-09-20 17:59:38 +0000
4@@ -31,10 +31,9 @@
5 # Place, Suite 330, Boston, MA 02111-1307 USA
6 #
7 #
8-diff -ruN libtar-1.2.11.orig/lib/Makefile.in libtar-1.2.11/lib/Makefile.in
9---- libtar-1.2.11.orig/lib/Makefile.in 2011-07-14 13:27:10.000000000 +0400
10-+++ libtar-1.2.11/lib/Makefile.in 2011-07-14 13:27:37.000000000 +0400
11-@@ -29,7 +29,7 @@ CPPFLAGS = -I. \
12+--- a/lib/Makefile.in
13++++ b/lib/Makefile.in
14+@@ -29,7 +29,7 @@
15 -I${top_srcdir}/compat \
16 -I../listhash \
17 @CPPFLAGS@
18@@ -43,9 +42,8 @@
19 LDFLAGS = @LDFLAGS@
20 LIBS = @LIBS@
21 LIBOBJS = @LIBOBJS@
22-diff -ruN libtar-1.2.11.orig/lib/append.c libtar-1.2.11/lib/append.c
23---- libtar-1.2.11.orig/lib/append.c 2011-07-14 13:27:10.000000000 +0400
24-+++ libtar-1.2.11/lib/append.c 2011-07-14 18:37:57.000000000 +0400
25+--- a/lib/append.c
26++++ b/lib/append.c
27 @@ -27,6 +27,327 @@
28 # include <unistd.h>
29 #endif
30@@ -374,7 +372,7 @@
31
32 struct tar_dev
33 {
34-@@ -69,7 +390,7 @@ tar_append_file(TAR *t, char *realname,
35+@@ -69,7 +390,7 @@
36 (savename ? savename : "[NULL]"));
37 #endif
38
39@@ -383,7 +381,7 @@
40 {
41 #ifdef DEBUG
42 perror("lstat()");
43-@@ -210,11 +531,17 @@ tar_append_eof(TAR *t)
44+@@ -210,11 +531,17 @@
45 int
46 tar_append_regfile(TAR *t, char *realname)
47 {
48@@ -404,7 +402,7 @@
49 filefd = open(realname, O_RDONLY);
50 if (filefd == -1)
51 {
52-@@ -224,27 +551,93 @@ tar_append_regfile(TAR *t, char *realnam
53+@@ -224,27 +551,93 @@
54 return -1;
55 }
56
57@@ -505,10 +503,9 @@
58 return -1;
59 }
60
61-diff -ruN libtar-1.2.11.orig/lib/extract.c libtar-1.2.11/lib/extract.c
62---- libtar-1.2.11.orig/lib/extract.c 2011-07-14 13:27:10.000000000 +0400
63-+++ libtar-1.2.11/lib/extract.c 2011-07-14 13:27:37.000000000 +0400
64-@@ -158,11 +158,11 @@ int
65+--- a/lib/extract.c
66++++ b/lib/extract.c
67+@@ -158,11 +158,11 @@
68 tar_extract_regfile(TAR *t, char *realname)
69 {
70 mode_t mode;
71@@ -522,10 +519,9 @@
72 char buf[T_BLOCKSIZE];
73 char *filename;
74
75-diff -ruN libtar-1.2.11.orig/lib/libtar.h libtar-1.2.11/lib/libtar.h
76---- libtar-1.2.11.orig/lib/libtar.h 2011-07-14 13:27:10.000000000 +0400
77-+++ libtar-1.2.11/lib/libtar.h 2011-07-14 13:27:37.000000000 +0400
78-@@ -180,7 +180,7 @@ int th_write(TAR *t);
79+--- a/lib/libtar.h
80++++ b/lib/libtar.h
81+@@ -180,7 +180,7 @@
82
83 /* decode tar header info */
84 #define th_get_crc(t) oct_to_int((t)->th_buf.chksum)
85@@ -534,7 +530,7 @@
86 #define th_get_mtime(t) oct_to_int((t)->th_buf.mtime)
87 #define th_get_devmajor(t) oct_to_int((t)->th_buf.devmajor)
88 #define th_get_devminor(t) oct_to_int((t)->th_buf.devminor)
89-@@ -204,9 +204,9 @@ void th_set_user(TAR *t, uid_t uid);
90+@@ -204,9 +204,9 @@
91 void th_set_group(TAR *t, gid_t gid);
92 void th_set_mode(TAR *t, mode_t fmode);
93 #define th_set_mtime(t, fmtime) \
94@@ -546,7 +542,7 @@
95
96 /* encode everything at once (except the pathname and linkname) */
97 void th_set_from_stat(TAR *t, struct stat *s);
98-@@ -268,13 +268,16 @@ int th_crc_calc(TAR *t);
99+@@ -268,13 +268,16 @@
100
101 /* string-octal to integer conversion */
102 int oct_to_int(char *oct);
103@@ -564,10 +560,9 @@
104
105
106 /***** wrapper.c **********************************************************/
107-diff -ruN libtar-1.2.11.orig/lib/util.c libtar-1.2.11/lib/util.c
108---- libtar-1.2.11.orig/lib/util.c 2011-07-14 13:27:10.000000000 +0400
109-+++ libtar-1.2.11/lib/util.c 2011-07-14 13:27:37.000000000 +0400
110-@@ -138,6 +138,14 @@ oct_to_int(char *oct)
111+--- a/lib/util.c
112++++ b/lib/util.c
113+@@ -138,6 +138,14 @@
114 return i;
115 }
116
117@@ -582,7 +577,7 @@
118
119 /* integer to string-octal conversion, no NULL */
120 void
121-@@ -147,4 +155,46 @@ int_to_oct_nonull(int num, char *oct, si
122+@@ -147,4 +155,46 @@
123 oct[octlen - 1] = ' ';
124 }
125
126@@ -629,10 +624,9 @@
127 + }
128 + return i;
129 +}
130-diff -ruN libtar-1.2.11.orig/libtar/Makefile.in libtar-1.2.11/libtar/Makefile.in
131---- libtar-1.2.11.orig/libtar/Makefile.in 2011-07-14 13:27:10.000000000 +0400
132-+++ libtar-1.2.11/libtar/Makefile.in 2011-07-14 13:27:37.000000000 +0400
133-@@ -29,7 +29,7 @@ CPPFLAGS = -I.. \
134+--- a/libtar/Makefile.in
135++++ b/libtar/Makefile.in
136+@@ -29,7 +29,7 @@
137 -I${top_srcdir}/lib \
138 -I${top_srcdir}/compat \
139 @CPPFLAGS@
140@@ -641,7 +635,7 @@
141 LDFLAGS = @LDFLAGS@
142 LIBS = @LIBS@
143 LIBOBJS = @LIBOBJS@
144-@@ -46,15 +46,15 @@ LIBTAR_HDRS = ../config.h \
145+@@ -46,15 +46,15 @@
146 ${top_srcdir}/lib/libtar.h \
147 ../listhash/libtar_listhash.h
148 LIBTAR_LIBS = ../lib/libtar.a
149@@ -660,16 +654,15 @@
150
151 ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
152
153-@@ -69,5 +69,5 @@ distclean: clean
154+@@ -69,5 +69,5 @@
155
156 install: ${ALL}
157 ${MKDIR} ${DESTDIR}${bindir}
158 - ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
159 + ${INSTALL_PROGRAM} tar4ibd ${DESTDIR}${bindir}
160
161-diff -ruN libtar-1.2.11.orig/libtar/libtar.c libtar-1.2.11/libtar/libtar.c
162---- libtar-1.2.11.orig/libtar/libtar.c 2011-07-14 13:27:10.000000000 +0400
163-+++ libtar-1.2.11/libtar/libtar.c 2011-07-14 17:22:13.000000000 +0400
164+--- a/libtar/libtar.c
165++++ b/libtar/libtar.c
166 @@ -14,6 +14,7 @@
167 #include <libtar.h>
168
169@@ -686,7 +679,7 @@
170
171 #ifdef DEBUG
172 void
173-@@ -109,7 +111,7 @@ create(char *tarfile, char *rootdir, lib
174+@@ -109,7 +111,7 @@
175 char buf[MAXPATHLEN];
176 libtar_listptr_t lp;
177
178@@ -695,7 +688,7 @@
179 #ifdef HAVE_LIBZ
180 (use_zlib ? &gztype : NULL),
181 #else
182-@@ -164,7 +166,7 @@ list(char *tarfile)
183+@@ -164,7 +166,7 @@
184 TAR *t;
185 int i;
186
187@@ -704,7 +697,7 @@
188 #ifdef HAVE_LIBZ
189 (use_zlib ? &gztype : NULL),
190 #else
191-@@ -225,7 +227,7 @@ extract(char *tarfile, char *rootdir)
192+@@ -225,7 +227,7 @@
193 #ifdef DEBUG
194 puts("opening tarfile...");
195 #endif
196@@ -713,19 +706,18 @@
197 #ifdef HAVE_LIBZ
198 (use_zlib ? &gztype : NULL),
199 #else
200-@@ -264,9 +266,9 @@ extract(char *tarfile, char *rootdir)
201+@@ -264,9 +266,7 @@
202 void
203 usage()
204 {
205 - printf("Usage: %s [-C rootdir] [-g] [-z] -x|-t filename.tar\n",
206-+ printf("Usage: %s [-C rootdir] [-g] [-z] -x|-t < filename.tar\n",
207- progname);
208+- progname);
209 - printf(" %s [-C rootdir] [-g] [-z] -c filename.tar ...\n",
210-+ printf(" %s [-C rootdir] [-g] [-z] [-d] -c ... > filename.tar\n",
211++ printf("Usage: %s [-C rootdir] [-d] -c ... > filename.tar\n",
212 progname);
213 exit(-1);
214 }
215-@@ -287,7 +289,7 @@ main(int argc, char *argv[])
216+@@ -287,7 +287,7 @@
217
218 progname = basename(argv[0]);
219
220@@ -734,10 +726,31 @@
221 switch (c)
222 {
223 case 'V':
224-@@ -323,11 +325,21 @@ main(int argc, char *argv[])
225- use_zlib = 1;
226- break;
227- #endif /* HAVE_LIBZ */
228+@@ -300,34 +300,26 @@
229+ case 'v':
230+ verbose = 1;
231+ break;
232+- case 'g':
233+- use_gnu = 1;
234+- break;
235+ case 'c':
236+ if (mode)
237+ usage();
238+ mode = MODE_CREATE;
239+ break;
240+- case 'x':
241+- if (mode)
242+- usage();
243+- mode = MODE_EXTRACT;
244+- break;
245+- case 't':
246+- if (mode)
247+- usage();
248+- mode = MODE_LIST;
249+- break;
250+-#ifdef HAVE_LIBZ
251+- case 'z':
252+- use_zlib = 1;
253 + case 'd':
254 +#if !defined(O_DIRECT)
255 + fprintf(stderr, "tar4ibd: O_DIRECT is not available.\n");
256@@ -745,7 +758,8 @@
257 +#else
258 + fprintf(stderr, "tar4ibd: using O_DIRECT for the input file.\n");
259 + use_direct = 1;
260-+ break;
261+ break;
262+-#endif /* HAVE_LIBZ */
263 +#endif
264 +
265 default:
266@@ -757,7 +771,7 @@
267 {
268 #ifdef DEBUG
269 printf("argc - optind == %d\tmode == %d\n", argc - optind,
270-@@ -343,15 +355,14 @@ main(int argc, char *argv[])
271+@@ -343,15 +335,14 @@
272 switch (mode)
273 {
274 case MODE_EXTRACT:

Subscribers

People subscribed via source and target branches