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