Update TODO to reflect recent changes.
[rsync/rsync.git] / TODO
1 -*- indented-text -*-
2
3 BUGS ---------------------------------------------------------------
4 Fix progress indicator to not corrupt log
5 lchmod question 
6 Do not rely on having a group called "nobody"
7 Incorrect timestamps (Debian #100295)
8 Win32
9
10 FEATURES ------------------------------------------------------------
11 server-imposed bandwidth limits
12 rsyncd over ssh
13 Use chroot only if supported
14 Allow supplementary groups in rsyncd.conf                       2002/04/09
15 Handling IPv6 on old machines
16 Other IPv6 stuff:
17 Add ACL support                                                 2001/12/02
18 Lazy directory creation
19 Conditional -z for old protocols
20 proxy authentication                                            2002/01/23
21 SOCKS                                                           2002/01/23
22 FAT support
23 Allow forcing arbitrary permissions                             2002/03/12
24 --diff                                          david.e.sewell  2002/03/15
25 Add daemon --no-detach and --no-fork options
26 Create more granular verbosity                          jw      2003/05/15
27
28 DOCUMENTATION --------------------------------------------------------
29 Update README
30 Keep list of open issues and todos on the web site
31 Update web site from CVS
32 Perhaps redo manual as SGML
33
34 LOGGING --------------------------------------------------------------
35 Make dry run list all updates                                   2002/04/03
36 Memory accounting
37 Improve error messages
38 Better statistics:                                      Rasmus  2002/03/08
39 Perhaps flush stdout like syslog
40 Log deamon sessions that just list modules
41 Log child death on signal
42 Keep stderr and stdout properly separated (Debian #23626)
43 Log errors with function that reports process of origin
44 verbose output                                  David Stein     2001/12/20
45 Add reason for transfer to file logging
46 debugging of daemon                                             2002/04/08
47 internationalization
48
49 DEVELOPMENT --------------------------------------------------------
50 Handling duplicate names
51 Use generic zlib                                                2002/02/25
52 TDB:                                                            2002/03/12
53 Splint                                                          2002/03/12
54 Memory debugger
55 Create release script
56 Add machines to build farm
57
58 PERFORMANCE ----------------------------------------------------------
59 File list structure in memory
60 Traverse just one directory at a time
61 Allow skipping MD4 file_sum                                     2002/04/08
62 Accelerate MD4
63
64 TESTING --------------------------------------------------------------
65 Torture test
66 Cross-test versions                                             2001/08/22
67 Test on kernel source
68 Test large files
69 Create mutator program for testing
70 Create configure option to enable dangerous tests
71 If tests are skipped, say why.
72 Test daemon feature to disallow particular options.
73 Create pipe program for testing
74 Create test makefile target for some tests
75 Test "refuse options" works
76
77 RELATED PROJECTS -----------------------------------------------------
78 rsyncsh
79 http://rsync.samba.org/rsync-and-debian/
80 rsyncable gzip patch
81 rsyncsplit as alternative to real integration with gzip?
82 reverse rsync over HTTP Range
83
84
85
86 BUGS ---------------------------------------------------------------
87
88 Fix progress indicator to not corrupt log
89
90   Progress indicator can produce corrupt output when transferring directories:
91
92   main/binary-arm/
93   main/binary-arm/admin/
94   main/binary-arm/base/
95   main/binary-arm/comm/8.56kB/s    0:00:52
96   main/binary-arm/devel/
97   main/binary-arm/doc/
98   main/binary-arm/editors/
99   main/binary-arm/electronics/s    0:00:53
100   main/binary-arm/games/
101   main/binary-arm/graphics/
102   main/binary-arm/hamradio/
103   main/binary-arm/interpreters/
104   main/binary-arm/libs/6.61kB/s    0:00:54
105   main/binary-arm/mail/
106   main/binary-arm/math/
107   main/binary-arm/misc/
108
109                       --          --
110
111
112 lchmod question 
113
114   I don't think we handle this properly on systems that don't have the
115   call.  Are there any such?
116
117                       --          --
118
119
120 Do not rely on having a group called "nobody"
121
122   http://www.linuxbase.org/spec/refspecs/LSB_1.1.0/gLSB/usernames.html
123
124   On Debian it's "nogroup"
125
126                       --          --
127
128
129 Incorrect timestamps (Debian #100295)
130
131   A bit hard to believe, but apparently it happens.
132
133                       --          --
134
135
136 Win32
137
138   Don't detach, because this messes up --srvany.
139
140   http://sources.redhat.com/ml/cygwin/2001-08/msg00234.html
141
142
143
144                       --          --
145
146 FEATURES ------------------------------------------------------------
147
148 server-imposed bandwidth limits
149
150                       --          --
151
152
153 rsyncd over ssh
154
155   There are already some patches to do this.
156
157   BitKeeper uses a server whose login shell is set to bkd.  That's
158   probably a reasonable approach.
159
160                       --          --
161
162
163 Use chroot only if supported
164
165   If the platform doesn't support it, then don't even try.
166
167   If running as non-root, then don't fail, just give a warning.
168   (There was a thread about this a while ago?)
169
170     http://lists.samba.org/pipermail/rsync/2001-August/thread.html
171     http://lists.samba.org/pipermail/rsync/2001-September/thread.html
172
173                       --          --
174
175
176 Allow supplementary groups in rsyncd.conf                       2002/04/09
177
178   Perhaps allow supplementary groups to be specified in rsyncd.conf;
179   then make the first one the primary gid and all the rest be
180   supplementary gids.
181
182                       --          --
183
184
185 Handling IPv6 on old machines
186
187   The KAME IPv6 patch is nice in theory but has proved a bit of a
188   nightmare in practice.  The basic idea of their patch is that rsync
189   is rewritten to use the new getaddrinfo()/getnameinfo() interface,
190   rather than gethostbyname()/gethostbyaddr() as in rsync 2.4.6.
191   Systems that don't have the new interface are handled by providing
192   our own implementation in lib/, which is selectively linked in.
193
194   The problem with this is that it is really hard to get right on
195   platforms that have a half-working implementation, so redefining
196   these functions clashes with system headers, and leaving them out
197   breaks.  This affects at least OSF/1, RedHat 5, and Cobalt, which
198   are moderately improtant.
199
200   Perhaps the simplest solution would be to have two different files
201   implementing the same interface, and choose either the new or the
202   old API.  This is probably necessary for systems that e.g. have
203   IPv6, but gethostbyaddr() can't handle it.  The Linux manpage claims
204   this is currently the case.
205
206   In fact, our internal sockets interface (things like
207   open_socket_out(), etc) is much narrower than the getaddrinfo()
208   interface, and so probably simpler to get right.  In addition, the
209   old code is known to work well on old machines.
210
211   We could drop the rather large lib/getaddrinfo files.
212
213                       --          --
214
215
216 Other IPv6 stuff:
217   
218   Implement suggestions from http://www.kame.net/newsletter/19980604/
219   and ftp://ftp.iij.ad.jp/pub/RFC/rfc2553.txt
220
221   If a host has multiple addresses, then listen try to connect to all
222   in order until we get through.  (getaddrinfo may return multiple
223   addresses.)  This is kind of implemented already.
224
225   Possibly also when starting as a server we may need to listen on
226   multiple passive addresses.  This might be a bit harder, because we
227   may need to select on all of them.  Hm.
228
229   Define a syntax for IPv6 literal addresses.  Since they include
230   colons, they tend to break most naming systems, including ours.
231   Based on the HTTP IPv6 syntax, I think we should use
232  
233      rsync://[::1]/foo/bar [::1]::bar
234
235   which should just take a small change to the parser code.
236
237                       --          --
238
239
240 Add ACL support                                                 2001/12/02
241
242   Transfer ACLs.  Need to think of a standard representation.
243   Probably better not to even try to convert between NT and POSIX.
244   Possibly can share some code with Samba.
245
246                       --          --
247
248
249 Lazy directory creation
250
251   With the current common --include '*/' --exclude '*' pattern, people
252   can end up with many empty directories.  We might avoid this by
253   lazily creating such directories.
254
255                       --          --
256
257
258 Conditional -z for old protocols
259
260   After we get the @RSYNCD greeting from the server, we know it's
261   version but we have not yet sent the command line, so we could just
262   remove the -z option if the server is too old.
263
264   For ssh invocation it's not so simple, because we actually use the
265   command line to start the remote process.  However, we only actually
266   do compression in token.c, and we could therefore once we discover
267   the remote version emit an error if it's too old.  I'm not sure if
268   that's a good tradeoff or not.
269
270                       --          --
271
272
273 proxy authentication                                            2002/01/23
274
275   Allow RSYNC_PROXY to be http://user:pass@proxy.foo:3128/, and do
276   HTTP Basic Proxy-Authentication.
277
278   Multiple schemes are possible, up to and including the insanity that
279   is NTLM, but Basic probably covers most cases.
280
281                       --          --
282
283
284 SOCKS                                                           2002/01/23
285
286   Add --with-socks, and then perhaps a command-line option to put them
287   on or off.  This might be more reliable than LD_PRELOAD hacks.
288
289                       --          --
290
291
292 FAT support
293
294   rsync to a FAT partition on a Unix machine doesn't work very well at
295   the moment.  I think we get errors about invalid filenames and
296   perhaps also trying to do atomic renames.
297
298   I guess the code to do this is currently #ifdef'd on Windows;
299   perhaps we ought to intelligently fall back to it on Unix too.
300
301                       --          --
302
303
304 Allow forcing arbitrary permissions                             2002/03/12
305
306   On 12 Mar 2002, Dave Dykstra <dwd@bell-labs.com> wrote:
307   > If we would add an option to do that functionality, I
308   > would vote for one that was more general which could mask
309   > off any set of permission bits and possibly add any set of
310   > bits.  Perhaps a chmod-like syntax if it could be
311   > implemented simply.
312
313   I think that would be good too.  For example, people uploading files
314   to a web server might like to say
315
316   rsync -avzP --chmod a+rX ./ sourcefrog.net:/home/www/sourcefrog/
317
318   Ideally the patch would implement as many of the gnu chmod semantics
319   as possible.  I think the mode parser should be a separate function
320   that passes back something like (mask,set) description to the rest
321   of the program.  For bonus points there would be a test case for the
322   parser.
323
324   Possibly also --chown
325
326   (Debian #23628)
327
328                       --          --
329
330
331 --diff                                          david.e.sewell  2002/03/15
332
333   Allow people to specify the diff command.  (Might want to use wdiff,
334   gnudiff, etc.)
335
336   Just diff the temporary file with the destination file, and delete
337   the tmp file rather than moving it into place.
338
339   Interaction with --partial.
340
341   Security interactions with daemon mode?
342
343                       --          --
344
345
346 Add daemon --no-detach and --no-fork options
347
348   Very useful for debugging.  Also good when running under a
349   daemon-monitoring process that tries to restart the service when the
350   parent exits.
351
352                       --          --
353
354
355 Create more granular verbosity                          jw      2003/05/15
356
357   Control output with the --report option.
358
359   The option takes as a single argument (no whitespace) a
360   comma delimited lists of keywords.
361
362   This would separate debugging from "logging" as well as
363   fine grained selection of statistical reporting and what
364   actions are logged.
365
366   http://lists.samba.org/archive/rsync/2003-May/006059.html
367
368                       --          --
369
370 DOCUMENTATION --------------------------------------------------------
371
372 Update README
373
374                       --          --
375
376
377 Keep list of open issues and todos on the web site
378
379                       --          --
380
381
382 Update web site from CVS
383
384                       --          --
385
386
387 Perhaps redo manual as SGML
388
389   The man page is getting rather large, and there is more information
390   that ought to be added.
391
392   TexInfo source is probably a dying format.
393
394   Linuxdoc looks like the most likely contender.  I know DocBook is
395   favoured by some people, but it's so bloody verbose, even with emacs
396   support.
397
398                       --          --
399
400 LOGGING --------------------------------------------------------------
401
402 Make dry run list all updates                                   2002/04/03
403
404   --dry-run is too dry
405
406   Mark Santcroos points out that -n fails to list files which have
407   only metadata changes, though it probably should.
408
409   There may be a Debian bug about this as well.
410
411                       --          --
412
413
414 Memory accounting
415
416   At exit, show how much memory was used for the file list, etc.
417
418   Also we do a wierd exponential-growth allocation in flist.c.  I'm
419   not sure this makes sense with modern mallocs.  At any rate it will
420   make us allocate a huge amount of memory for large file lists.
421
422                       --          --
423
424
425 Improve error messages
426
427   If we hang or get SIGINT, then explain where we were up to.  Perhaps
428   have a static buffer that contains the current function name, or
429   some kind of description of what we were trying to do.  This is a
430   little easier on people than needing to run strace/truss.
431
432   "The dungeon collapses!  You are killed."  Rather than "unexpected
433   eof" give a message that is more detailed if possible and also more
434   helpful.
435
436   If we get an error writing to a socket, then we should perhaps
437   continue trying to read to see if an error message comes across
438   explaining why the socket is closed.  I'm not sure if this would
439   work, but it would certainly make our messages more helpful.
440
441   What happens if a directory is missing -x attributes.  Do we lose
442   our load?  (Debian #28416) Probably fixed now, but a test case would
443   be good.
444
445
446
447                       --          --
448
449
450 Better statistics:                                      Rasmus  2002/03/08
451
452   <Rasmus>
453       hey, how about an rsync option that just gives you the
454       summary without the list of files?  And perhaps gives
455       more information like the number of new files, number
456       of changed, deleted, etc. ?
457
458   <mbp>
459       nice idea there is --stats but at the moment it's very
460       tridge-oriented rather than user-friendly it would be
461       nice to improve it that would also work well with
462       --dryrun
463
464                       --          --
465
466
467 Perhaps flush stdout like syslog
468
469   Perhaps flush stdout after each filename, so that people trying to
470   monitor progress in a log file can do so more easily.  See
471   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=48108
472
473                       --          --
474
475
476 Log deamon sessions that just list modules
477
478   At the connections that just get a list of modules are not logged,
479   but they should be.
480
481                       --          --
482
483
484 Log child death on signal
485
486   If a child of the rsync daemon dies with a signal, we should notice
487   that when we reap it and log a message.
488
489                       --          --
490
491
492 Keep stderr and stdout properly separated (Debian #23626)
493
494                       --          --
495
496
497 Log errors with function that reports process of origin
498
499   Use a separate function for reporting errors; prefix it with
500   "rsync:" or "rsync(remote)", or perhaps even "rsync(local
501   generator): ".
502
503                       --          --
504
505
506 verbose output                                  David Stein     2001/12/20
507   
508   Indicate whether files are new, updated, or deleted
509
510   At end of transfer, show how many files were or were not transferred
511   correctly.
512
513                       --          --
514
515
516 Add reason for transfer to file logging
517
518   Explain *why* every file is transferred or not (e.g. "local mtime
519   123123 newer than 1283198")
520
521                       --          --
522
523
524 debugging of daemon                                             2002/04/08
525
526   Add an rsyncd.conf parameter to turn on debugging on the server.
527
528                       --          --
529
530
531 internationalization
532
533   Change to using gettext().  Probably need to ship this for platforms
534   that don't have it.
535
536   Solicit translations.
537
538   Does anyone care?  Before we bother modifying the code, we ought to
539   get the manual translated first, because that's possibly more useful
540   and at any rate demonstrates desire.
541
542                       --          --
543
544 DEVELOPMENT --------------------------------------------------------
545
546 Handling duplicate names
547
548   We need to be careful of duplicate names getting into the file list.
549   See clean_flist().  This could happen if multiple arguments include
550   the same file.  Bad.
551
552   I think duplicates are only a problem if they're both flowing
553   through the pipeline at the same time.  For example we might have
554   updated the first occurrence after reading the checksums for the
555   second.  So possibly we just need to make sure that we don't have
556   both in the pipeline at the same time.
557
558   Possibly if we did one directory at a time that would be sufficient.
559
560   Alternatively we could pre-process the arguments to make sure no
561   duplicates will ever be inserted.  There could be some bad cases
562   when we're collapsing symlinks.
563
564   We could have a hash table.
565
566   The root of the problem is that we do not want more than one file
567   list entry referring to the same file.  At first glance there are
568   several ways this could happen: symlinks, hardlinks, and repeated
569   names on the command line.
570
571   If names are repeated on the command line, they may be present in
572   different forms, perhaps by traversing directory paths in different
573   ways, traversing paths including symlinks.  Also we need to allow
574   for expansion of globs by rsync.
575
576   At the moment, clean_flist() requires having the entire file list in
577   memory.  Duplicate names are detected just by a string comparison.
578
579   We don't need to worry about hard links causing duplicates because
580   files are never updated in place.  Similarly for symlinks.
581
582   I think even if we're using a different symlink mode we don't need
583   to worry.
584
585   Unless we're really clever this will introduce a protocol
586   incompatibility, so we need to be able to accept the old format as
587   well.
588
589                       --          --
590
591
592 Use generic zlib                                                2002/02/25
593
594   Perhaps don't use our own zlib.
595
596   Advantages:
597    
598     - will automatically be up to date with bugfixes in zlib
599
600     - can leave it out for small rsync on e.g. recovery disks
601
602     - can use a shared library
603
604     - avoids people breaking rsync by trying to do this themselves and
605       messing up
606
607   Should we ship zlib for systems that don't have it, or require
608   people to install it separately?
609
610   Apparently this will make us incompatible with versions of rsync
611   that use the patched version of rsync.  Probably the simplest way to
612   do this is to just disable gzip (with a warning) when talking to old
613   versions.
614
615                       --          --
616
617
618 TDB:                                                            2002/03/12
619
620   Rather than storing the file list in memory, store it in a TDB.
621
622   This *might* make memory usage lower while building the file list.
623
624   Hashtable lookup will mean files are not transmitted in order,
625   though... hm.
626
627   This would neatly eliminate one of the major post-fork shared data
628   structures.
629
630                       --          --
631
632
633 Splint                                                          2002/03/12
634
635   Build rsync with SPLINT to try to find security holes.  Add
636   annotations as necessary.  Keep track of the number of warnings
637   found initially, and see how many of them are real bugs, or real
638   security bugs.  Knowing the percentage of likely hits would be
639   really interesting for other projects.
640
641                       --          --
642
643
644 Memory debugger
645
646   jra recommends Valgrind:
647
648     http://devel-home.kde.org/~sewardj/
649
650                       --          --
651
652
653 Create release script
654   
655   Script would:
656
657      Update spec files
658
659      Build tar file; upload
660
661      Send announcement to mailing list and c.o.l.a.
662   
663      Make freshmeat announcement
664
665      Update web site
666
667                       --          --
668
669
670 Add machines to build farm
671
672   Cygwin (on different versions of Win32?)
673
674   HP-UX variants (via HP?)
675
676   SCO
677
678
679
680                       --          --
681
682 PERFORMANCE ----------------------------------------------------------
683
684 File list structure in memory
685
686   Rather than one big array, perhaps have a tree in memory mirroring
687   the directory tree.
688
689   This might make sorting much faster!  (I'm not sure it's a big CPU
690   problem, mind you.)
691
692   It might also reduce memory use in storing repeated directory names
693   -- again I'm not sure this is a problem.
694
695                       --          --
696
697
698 Traverse just one directory at a time
699
700   Traverse just one directory at a time.  Tridge says it's possible.
701
702   At the moment rsync reads the whole file list into memory at the
703   start, which makes us use a lot of memory and also not pipeline
704   network access as much as we could.
705
706                       --          --
707
708
709 Allow skipping MD4 file_sum                                     2002/04/08
710
711   If we're doing a local transfer, or using -W, then perhaps don't
712   send the file checksum.  If we're doing a local transfer, then
713   calculating MD4 checksums uses 90% of CPU and is unlikely to be
714   useful.
715
716   Indeed for transfers over zlib or ssh we can also rely on the
717   transport to have quite strong protection against corruption.
718
719   Perhaps we should have an option to disable this,
720   analogous to --whole-file, although it would default to
721   disabled.  The file checksum takes up a definite space in
722   the protocol -- we can either set it to 0, or perhaps just
723   leave it out.
724
725                       --          --
726
727
728 Accelerate MD4
729
730   Perhaps borrow an assembler MD4 from someone?
731
732   Make sure we call MD4 with properly-sized blocks whenever possible
733   to avoid copying into the residue region?
734
735                       --          --
736
737 TESTING --------------------------------------------------------------
738
739 Torture test
740
741   Something that just keeps running rsync continuously over a data set
742   likely to generate problems.
743
744                       --          --
745
746
747 Cross-test versions                                             2001/08/22
748
749   Part of the regression suite should be making sure that we
750   don't break backwards compatibility: old clients vs new
751   servers and so on.  Ideally we would test both up and down
752   from the current release to all old versions.
753
754   Run current rsync versions against significant past releases.
755
756   We might need to omit broken old versions, or versions in which
757   particular functionality is broken
758
759   It might be sufficient to test downloads from well-known public
760   rsync servers running different versions of rsync.  This will give
761   some testing and also be the most common case for having different
762   versions and not being able to upgrade.
763
764   The new --protocol option may help in this.
765
766                       --          --
767
768
769 Test on kernel source
770
771   Download all versions of kernel; unpack, sync between them.  Also
772   sync between uncompressed tarballs.  Compare directories after
773   transfer.
774
775   Use local mode; ssh; daemon; --whole-file and --no-whole-file.
776
777   Use awk to pull out the 'speedup' number for each transfer.  Make
778   sure it is >= x.
779
780                       --          --
781
782
783 Test large files
784
785   Sparse and non-sparse
786
787                       --          --
788
789
790 Create mutator program for testing
791
792   Insert bytes, delete bytes, swap blocks, ...
793
794                       --          --
795
796
797 Create configure option to enable dangerous tests
798
799                       --          --
800
801
802 If tests are skipped, say why.
803
804                       --          --
805
806
807 Test daemon feature to disallow particular options.
808
809                       --          --
810
811
812 Create pipe program for testing
813
814   Create pipe program that makes slow/jerky connections for
815   testing Versions of read() and write() that corrupt the
816   stream, or abruptly fail
817
818                       --          --
819
820
821 Create test makefile target for some tests
822
823   Separate makefile target to run rough tests -- or perhaps
824   just run them every time?
825
826                       --          --
827
828
829 Test "refuse options" works
830
831   What about for --recursive?
832
833   If you specify an unrecognized option here, you should get an error.
834
835   We need a test case for this...
836
837   Was this broken when we changed to popt?
838
839                       --          --
840
841 RELATED PROJECTS -----------------------------------------------------
842
843 rsyncsh
844
845    Write a small emulation of interactive ftp as a Pythonn program
846    that calls rsync.  Commands such as "cd", "ls", "ls *.c" etc map
847    fairly directly into rsync commands: it just needs to remember the
848    current host, directory and so on.  We can probably even do
849    completion of remote filenames.
850
851                       --          --
852
853
854 http://rsync.samba.org/rsync-and-debian/
855
856
857                       --          --
858
859
860 rsyncable gzip patch
861
862   Exhaustive, tortuous testing
863
864   Cleanups?
865
866                       --          --
867
868
869 rsyncsplit as alternative to real integration with gzip?
870
871                       --          --
872
873
874 reverse rsync over HTTP Range
875
876   Goswin Brederlow suggested this on Debian; I think tridge and I
877   talked about it previous in relation to rproxy.
878
879                       --          --
880