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