Mentioned the zlib changes and tweaked a couple sentences.
[rsync.git] / TODO
1 -*- indented-text -*-
2
3 BUGS ---------------------------------------------------------------
4 Do not rely on having a group called "nobody"
5
6 FEATURES ------------------------------------------------------------
7 Use chroot only if supported
8 Allow supplementary groups in rsyncd.conf                       2002/04/09
9 Handling IPv6 on old machines
10 Other IPv6 stuff:
11 Add ACL support                                                 2001/12/02
12 Lazy directory creation
13 proxy authentication                                            2002/01/23
14 SOCKS                                                           2002/01/23
15 FAT support
16 Allow forcing arbitrary permissions                             2002/03/12
17 --diff                                          david.e.sewell  2002/03/15
18 Add daemon --no-fork option
19 Create more granular verbosity                          jw      2003/05/15
20
21 DOCUMENTATION --------------------------------------------------------
22 Keep list of open issues and todos on the web site
23 Perhaps redo manual as SGML
24
25 LOGGING --------------------------------------------------------------
26 Memory accounting
27 Improve error messages
28 Better statistics:                                      Rasmus  2002/03/08
29 Perhaps flush stdout like syslog
30 Log deamon sessions that just list modules
31 Log child death on signal
32 Log errors with function that reports process of origin
33 verbose output                                  David Stein     2001/12/20
34 internationalization
35
36 DEVELOPMENT --------------------------------------------------------
37 Handling duplicate names
38 Use generic zlib                                                2002/02/25
39 TDB:                                                            2002/03/12
40 Splint                                                          2002/03/12
41
42 PERFORMANCE ----------------------------------------------------------
43 File list structure in memory
44 Traverse just one directory at a time
45 Allow skipping MD4 file_sum                                     2002/04/08
46 Accelerate MD4
47
48 TESTING --------------------------------------------------------------
49 Torture test
50 Cross-test versions                                             2001/08/22
51 Test on kernel source
52 Test large files
53 Create mutator program for testing
54 Create configure option to enable dangerous tests
55 If tests are skipped, say why.
56 Test daemon feature to disallow particular options.
57 Create pipe program for testing
58 Create test makefile target for some tests
59
60 RELATED PROJECTS -----------------------------------------------------
61 rsyncsh
62 http://rsync.samba.org/rsync-and-debian/
63 rsyncable gzip patch
64 rsyncsplit as alternative to real integration with gzip?
65 reverse rsync over HTTP Range
66
67
68
69 BUGS ---------------------------------------------------------------
70
71
72 Do not rely on having a group called "nobody"
73
74   http://www.linuxbase.org/spec/refspecs/LSB_1.1.0/gLSB/usernames.html
75
76   On Debian it's "nogroup"
77
78                       --          --
79
80 FEATURES ------------------------------------------------------------
81
82
83 Use chroot only if supported
84
85   If the platform doesn't support it, then don't even try.
86
87   If running as non-root, then don't fail, just give a warning.
88   (There was a thread about this a while ago?)
89
90     http://lists.samba.org/pipermail/rsync/2001-August/thread.html
91     http://lists.samba.org/pipermail/rsync/2001-September/thread.html
92
93                       --          --
94
95
96 Allow supplementary groups in rsyncd.conf                       2002/04/09
97
98   Perhaps allow supplementary groups to be specified in rsyncd.conf;
99   then make the first one the primary gid and all the rest be
100   supplementary gids.
101
102                       --          --
103
104
105 Handling IPv6 on old machines
106
107   The KAME IPv6 patch is nice in theory but has proved a bit of a
108   nightmare in practice.  The basic idea of their patch is that rsync
109   is rewritten to use the new getaddrinfo()/getnameinfo() interface,
110   rather than gethostbyname()/gethostbyaddr() as in rsync 2.4.6.
111   Systems that don't have the new interface are handled by providing
112   our own implementation in lib/, which is selectively linked in.
113
114   The problem with this is that it is really hard to get right on
115   platforms that have a half-working implementation, so redefining
116   these functions clashes with system headers, and leaving them out
117   breaks.  This affects at least OSF/1, RedHat 5, and Cobalt, which
118   are moderately improtant.
119
120   Perhaps the simplest solution would be to have two different files
121   implementing the same interface, and choose either the new or the
122   old API.  This is probably necessary for systems that e.g. have
123   IPv6, but gethostbyaddr() can't handle it.  The Linux manpage claims
124   this is currently the case.
125
126   In fact, our internal sockets interface (things like
127   open_socket_out(), etc) is much narrower than the getaddrinfo()
128   interface, and so probably simpler to get right.  In addition, the
129   old code is known to work well on old machines.
130
131   We could drop the rather large lib/getaddrinfo files.
132
133                       --          --
134
135
136 Other IPv6 stuff:
137   
138   Implement suggestions from http://www.kame.net/newsletter/19980604/
139   and ftp://ftp.iij.ad.jp/pub/RFC/rfc2553.txt
140
141   If a host has multiple addresses, then listen try to connect to all
142   in order until we get through.  (getaddrinfo may return multiple
143   addresses.)  This is kind of implemented already.
144
145   Possibly also when starting as a server we may need to listen on
146   multiple passive addresses.  This might be a bit harder, because we
147   may need to select on all of them.  Hm.
148
149                       --          --
150
151
152 Add ACL support                                                 2001/12/02
153
154   Transfer ACLs.  Need to think of a standard representation.
155   Probably better not to even try to convert between NT and POSIX.
156   Possibly can share some code with Samba.
157   NOTE: there is a patch that implements this in the "patches" subdir.
158
159                       --          --
160
161
162 Lazy directory creation
163
164   With the current common --include '*/' --exclude '*' pattern, people
165   can end up with many empty directories.  We might avoid this by
166   lazily creating such directories.
167
168                       --          --
169
170
171 proxy authentication                                            2002/01/23
172
173   Allow RSYNC_PROXY to be http://user:pass@proxy.foo:3128/, and do
174   HTTP Basic Proxy-Authentication.
175
176   Multiple schemes are possible, up to and including the insanity that
177   is NTLM, but Basic probably covers most cases.
178
179                       --          --
180
181
182 SOCKS                                                           2002/01/23
183
184   Add --with-socks, and then perhaps a command-line option to put them
185   on or off.  This might be more reliable than LD_PRELOAD hacks.
186
187                       --          --
188
189
190 FAT support
191
192   rsync to a FAT partition on a Unix machine doesn't work very well at
193   the moment.  I think we get errors about invalid filenames and
194   perhaps also trying to do atomic renames.
195
196   I guess the code to do this is currently #ifdef'd on Windows;
197   perhaps we ought to intelligently fall back to it on Unix too.
198
199                       --          --
200
201
202 Allow forcing arbitrary permissions                             2002/03/12
203
204   On 12 Mar 2002, Dave Dykstra <dwd@bell-labs.com> wrote:
205   > If we would add an option to do that functionality, I
206   > would vote for one that was more general which could mask
207   > off any set of permission bits and possibly add any set of
208   > bits.  Perhaps a chmod-like syntax if it could be
209   > implemented simply.
210
211   I think that would be good too.  For example, people uploading files
212   to a web server might like to say
213
214   rsync -avzP --chmod a+rX ./ sourcefrog.net:/home/www/sourcefrog/
215
216   Ideally the patch would implement as many of the gnu chmod semantics
217   as possible.  I think the mode parser should be a separate function
218   that passes back something like (mask,set) description to the rest
219   of the program.  For bonus points there would be a test case for the
220   parser.
221
222   Possibly also --chown
223
224   (Debian #23628)
225
226   NOTE: there is a patch that implements this in the "patches" subdir.
227
228                       --          --
229
230
231 --diff                                          david.e.sewell  2002/03/15
232
233   Allow people to specify the diff command.  (Might want to use wdiff,
234   gnudiff, etc.)
235
236   Just diff the temporary file with the destination file, and delete
237   the tmp file rather than moving it into place.
238
239   Interaction with --partial.
240
241   Security interactions with daemon mode?
242
243                       --          --
244
245
246 Add daemon --no-fork option
247
248   Very useful for debugging.  Also good when running under a
249   daemon-monitoring process that tries to restart the service when the
250   parent exits.
251
252                       --          --
253
254
255 Create more granular verbosity                          jw      2003/05/15
256
257   Control output with the --report option.
258
259   The option takes as a single argument (no whitespace) a
260   comma delimited lists of keywords.
261
262   This would separate debugging from "logging" as well as
263   fine grained selection of statistical reporting and what
264   actions are logged.
265
266   http://lists.samba.org/archive/rsync/2003-May/006059.html
267
268                       --          --
269
270 DOCUMENTATION --------------------------------------------------------
271
272
273 Keep list of open issues and todos on the web site
274
275                       --          --
276
277
278 Perhaps redo manual as SGML
279
280   The man page is getting rather large, and there is more information
281   that ought to be added.
282
283   TexInfo source is probably a dying format.
284
285   Linuxdoc looks like the most likely contender.  I know DocBook is
286   favoured by some people, but it's so bloody verbose, even with emacs
287   support.
288
289                       --          --
290
291 LOGGING --------------------------------------------------------------
292
293
294 Memory accounting
295
296   At exit, show how much memory was used for the file list, etc.
297
298   Also we do a wierd exponential-growth allocation in flist.c.  I'm
299   not sure this makes sense with modern mallocs.  At any rate it will
300   make us allocate a huge amount of memory for large file lists.
301
302                       --          --
303
304
305 Improve error messages
306
307   If we hang or get SIGINT, then explain where we were up to.  Perhaps
308   have a static buffer that contains the current function name, or
309   some kind of description of what we were trying to do.  This is a
310   little easier on people than needing to run strace/truss.
311
312   "The dungeon collapses!  You are killed."  Rather than "unexpected
313   eof" give a message that is more detailed if possible and also more
314   helpful.
315
316   If we get an error writing to a socket, then we should perhaps
317   continue trying to read to see if an error message comes across
318   explaining why the socket is closed.  I'm not sure if this would
319   work, but it would certainly make our messages more helpful.
320
321   What happens if a directory is missing -x attributes.  Do we lose
322   our load?  (Debian #28416) Probably fixed now, but a test case would
323   be good.
324
325   When running as a daemon, some errors should both be returned to the
326   user and logged.  This will make interacting with a daemon less
327   cryptic.
328
329                       --          --
330
331
332 Better statistics:                                      Rasmus  2002/03/08
333
334   <Rasmus>
335       hey, how about an rsync option that just gives you the
336       summary without the list of files?  And perhaps gives
337       more information like the number of new files, number
338       of changed, deleted, etc. ?
339
340   <mbp>
341       nice idea there is --stats but at the moment it's very
342       tridge-oriented rather than user-friendly it would be
343       nice to improve it that would also work well with
344       --dryrun
345
346                       --          --
347
348
349 Perhaps flush stdout like syslog
350
351   Perhaps flush stdout after each filename, so that people trying to
352   monitor progress in a log file can do so more easily.  See
353   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=48108
354
355                       --          --
356
357
358 Log deamon sessions that just list modules
359
360   At the connections that just get a list of modules are not logged,
361   but they should be.
362
363                       --          --
364
365
366 Log child death on signal
367
368   If a child of the rsync daemon dies with a signal, we should notice
369   that when we reap it and log a message.
370
371                       --          --
372
373
374 Log errors with function that reports process of origin
375
376   Use a separate function for reporting errors; prefix it with
377   "rsync:" or "rsync(remote)", or perhaps even "rsync(local
378   generator): ".
379
380                       --          --
381
382
383 verbose output                                  David Stein     2001/12/20
384   
385   At end of transfer, show how many files were or were not transferred
386   correctly.
387
388                       --          --
389
390
391 internationalization
392
393   Change to using gettext().  Probably need to ship this for platforms
394   that don't have it.
395
396   Solicit translations.
397
398   Does anyone care?  Before we bother modifying the code, we ought to
399   get the manual translated first, because that's possibly more useful
400   and at any rate demonstrates desire.
401
402                       --          --
403
404 DEVELOPMENT --------------------------------------------------------
405
406 Handling duplicate names
407
408   Some folks would like rsync to be deterministic in how it handles
409   duplicate names that come from mering multiple source directories
410   into a single destination directory; e.g. the last name wins.  We
411   could do this by switching our sort algorithm to one that will
412   guarantee that the names won't be reordered.  Alternately, we could
413   assign an ever-increasing number to each item as we insert it into
414   the list and then make sure that we leave the largest number when
415   cleaning the file list (see clean_flist()).  Another solution would
416   be to add a hash table, and thus never put any duplicate names into
417   the file list (and bump the protocol to handle this).
418
419                       --          --
420
421
422 Use generic zlib                                                2002/02/25
423
424   Perhaps don't use our own zlib.
425
426   Advantages:
427    
428     - will automatically be up to date with bugfixes in zlib
429
430     - can leave it out for small rsync on e.g. recovery disks
431
432     - can use a shared library
433
434     - avoids people breaking rsync by trying to do this themselves and
435       messing up
436
437   Should we ship zlib for systems that don't have it, or require
438   people to install it separately?
439
440   Apparently this will make us incompatible with versions of rsync
441   that use the patched version of rsync.  Probably the simplest way to
442   do this is to just disable gzip (with a warning) when talking to old
443   versions.
444
445                       --          --
446
447
448 TDB:                                                            2002/03/12
449
450   Rather than storing the file list in memory, store it in a TDB.
451
452   This *might* make memory usage lower while building the file list.
453
454   Hashtable lookup will mean files are not transmitted in order,
455   though... hm.
456
457   This would neatly eliminate one of the major post-fork shared data
458   structures.
459
460                       --          --
461
462
463 Splint                                                          2002/03/12
464
465   Build rsync with SPLINT to try to find security holes.  Add
466   annotations as necessary.  Keep track of the number of warnings
467   found initially, and see how many of them are real bugs, or real
468   security bugs.  Knowing the percentage of likely hits would be
469   really interesting for other projects.
470
471                       --          --
472
473 PERFORMANCE ----------------------------------------------------------
474
475 File list structure in memory
476
477   Rather than one big array, perhaps have a tree in memory mirroring
478   the directory tree.
479
480   This might make sorting much faster!  (I'm not sure it's a big CPU
481   problem, mind you.)
482
483   It might also reduce memory use in storing repeated directory names
484   -- again I'm not sure this is a problem.
485
486                       --          --
487
488
489 Traverse just one directory at a time
490
491   Traverse just one directory at a time.  Tridge says it's possible.
492
493   At the moment rsync reads the whole file list into memory at the
494   start, which makes us use a lot of memory and also not pipeline
495   network access as much as we could.
496
497                       --          --
498
499
500 Allow skipping MD4 file_sum                                     2002/04/08
501
502   If we're doing a local transfer, or using -W, then perhaps don't
503   send the file checksum.  If we're doing a local transfer, then
504   calculating MD4 checksums uses 90% of CPU and is unlikely to be
505   useful.
506
507   We should not allow it to be disabled separately from -W, though
508   as it is the only thing that lets us know when the rsync algorithm
509   got out of sync and messed the file up (i.e. if the basis file
510   changed between checksum generation and reception).
511
512                       --          --
513
514
515 Accelerate MD4
516
517   Perhaps borrow an assembler MD4 from someone?
518
519   Make sure we call MD4 with properly-sized blocks whenever possible
520   to avoid copying into the residue region?
521
522                       --          --
523
524 TESTING --------------------------------------------------------------
525
526 Torture test
527
528   Something that just keeps running rsync continuously over a data set
529   likely to generate problems.
530
531                       --          --
532
533
534 Cross-test versions                                             2001/08/22
535
536   Part of the regression suite should be making sure that we
537   don't break backwards compatibility: old clients vs new
538   servers and so on.  Ideally we would test both up and down
539   from the current release to all old versions.
540
541   Run current rsync versions against significant past releases.
542
543   We might need to omit broken old versions, or versions in which
544   particular functionality is broken
545
546   It might be sufficient to test downloads from well-known public
547   rsync servers running different versions of rsync.  This will give
548   some testing and also be the most common case for having different
549   versions and not being able to upgrade.
550
551   The new --protocol option may help in this.
552
553                       --          --
554
555
556 Test on kernel source
557
558   Download all versions of kernel; unpack, sync between them.  Also
559   sync between uncompressed tarballs.  Compare directories after
560   transfer.
561
562   Use local mode; ssh; daemon; --whole-file and --no-whole-file.
563
564   Use awk to pull out the 'speedup' number for each transfer.  Make
565   sure it is >= x.
566
567                       --          --
568
569
570 Test large files
571
572   Sparse and non-sparse
573
574                       --          --
575
576
577 Create mutator program for testing
578
579   Insert bytes, delete bytes, swap blocks, ...
580
581                       --          --
582
583
584 Create configure option to enable dangerous tests
585
586                       --          --
587
588
589 If tests are skipped, say why.
590
591                       --          --
592
593
594 Test daemon feature to disallow particular options.
595
596                       --          --
597
598
599 Create pipe program for testing
600
601   Create pipe program that makes slow/jerky connections for
602   testing Versions of read() and write() that corrupt the
603   stream, or abruptly fail
604
605                       --          --
606
607
608 Create test makefile target for some tests
609
610   Separate makefile target to run rough tests -- or perhaps
611   just run them every time?
612
613                       --          --
614
615 RELATED PROJECTS -----------------------------------------------------
616
617 rsyncsh
618
619    Write a small emulation of interactive ftp as a Pythonn program
620    that calls rsync.  Commands such as "cd", "ls", "ls *.c" etc map
621    fairly directly into rsync commands: it just needs to remember the
622    current host, directory and so on.  We can probably even do
623    completion of remote filenames.
624
625                       --          --
626
627
628 http://rsync.samba.org/rsync-and-debian/
629
630
631                       --          --
632
633
634 rsyncable gzip patch
635
636   Exhaustive, tortuous testing
637
638   Cleanups?
639
640                       --          --
641
642
643 rsyncsplit as alternative to real integration with gzip?
644
645                       --          --
646
647
648 reverse rsync over HTTP Range
649
650   Goswin Brederlow suggested this on Debian; I think tridge and I
651   talked about it previous in relation to rproxy.
652
653   Addendum:  It looks like someone is working on a version of this:
654
655     http://zsync.moria.org.uk/
656
657                       --          --
658