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