Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.sbin / ctm / ctm / ctm.5
1 .\"----------------------------------------------------------------------------
2 .\""THE BEER-WARE LICENSE" (Revision 42):
3 .\"<joerg@FreeBSD.org> wrote this file.  As long as you retain this notice you
4 .\"can do whatever you want with this stuff. If we meet some day, and you think
5 .\"this stuff is worth it, you can buy me a beer in return.       Joerg Wunsch
6 .\"----------------------------------------------------------------------------
7 .\"
8 .\" This manual page is partially obtained from Poul-Hennings CTM README
9 .\" file.
10 .\"
11 .\" CTM and ctm(1) by <phk@FreeBSD.org>
12 .\"
13 .\" $FreeBSD: src/usr.sbin/ctm/ctm/ctm.5,v 1.9.2.5 2003/03/12 22:08:14 trhodes Exp $
14 .\" $DragonFly: src/usr.sbin/ctm/ctm/Attic/ctm.5,v 1.2 2003/06/17 04:29:53 dillon Exp $
15 .\"
16 .Dd March 25, 1995
17 .Os
18 .Dt CTM 5
19 .Sh NAME
20 .Nm ctm
21 .Nd source code mirror system
22 .Sh DESCRIPTION
23 The
24 .Nm
25 transfers data in a specific file format, called a CTM delta.
26 .Pp
27 CTM deltas consist of control lines and data chunks.  Each control
28 line starts with the letters
29 .Dq CTM ,
30 followed by a CTM statement and control data, and ends with a '\en'
31 character.
32 .Pp
33 Data chunks always belong to the preceding control line, and the
34 last field on that control line is the number of bytes in the data
35 chunk.
36 A trailing newline '\en' character follows each data chunk, this
37 newline is not part of the chunk and isn't included in the count.
38 .Pp
39 The CTM statements are as follows.
40 .Bl -tag -width indent
41 .It _BEGIN Ar version name number timestamp prefix
42 This is the overall begin of a CTM delta file.  The
43 .Ar version
44 field must match the program version
45 (currently 2.0).
46 .Ar Name
47 is the name and
48 .Ar number
49 the sequence number of the CTM service, it is matched against the file
50 .Pa .ctm_status
51 to see if the delta has already been applied.
52 .Ar Timestamp
53 contains the year, month, day, hour, minute, and second of the
54 time of delta creation for reference
55 (followed by the letter
56 .Sq Z
57 meaning this is a UTC timestamp).
58 The
59 .Ar prefix
60 field is currently not implemented.
61 .It _END Ar md5
62 This statement ends the CTM delta, the global
63 .Ar md5
64 checksum is matched against the MD5 checksum of the entire delta, up to
65 and including the space (0x20) character following ``_END''.
66 .It \&FM Ar name uid gid mode md5 count
67 Make the file
68 .Ar name ,
69 the original file had the uid
70 .Ar uid
71 (numerical, decimal),
72 the gid
73 .Ar gid
74 (numerical, decimal),
75 mode
76 .Ar mode
77 (numerical, octal),
78 and the MD5 checksum
79 .Ar md5 .
80 .Pp
81 The following
82 .Ar count
83 bytes data are the contents of the new file.
84 .It \&FS Ar name uid gid mode md5before md5after count
85 Substitute the contents of file
86 .Ar name ,
87 the original file had the new uid
88 .Ar uid
89 (numerical, decimal),
90 the new gid
91 .Ar gid
92 (numerical, decimal),
93 new mode
94 .Ar mode
95 (numerical, octal),
96 the old MD5 checksum
97 .Ar md5before ,
98 and the new MD5 checksum
99 .Ar md5after .
100 .Pp
101 The following
102 .Ar count
103 bytes data are the contents of the new file.
104 .Pp
105 File substitution is used if the commands to edit a file would exceed
106 the total file length, so substituting it is more efficient.
107 .It \&FN Ar name uid gid mode md5before md5after count
108 Edit the file
109 .Ar name .
110 The arguments are as above, but the data sections contains an
111 .Xr diff 1
112 -n script which should be applied to the file in question.
113 .It \&FR Ar name md5
114 Remove the file
115 .Ar name ,
116 which must match the MD5 checksum
117 .Ar md5 .
118 .It \&AS Ar name uid gid mode
119 The original file
120 .Ar name
121 changed its owner to
122 .Ar uid ,
123 its group to
124 .Ar gid ,
125 and/or its mode to
126 .Ar mode .
127 .It \&DM Ar name uid gid mode
128 The directory
129 .Ar name
130 is to be created, it had originally the owner
131 .Ar uid ,
132 group
133 .Ar gid ,
134 and mode
135 .Ar mode .
136 .It \&DR Ar name
137 The directory
138 .Ar name
139 is to be removed.
140 .El
141 .Sh EXAMPLES
142 In the following example, long lines have been folded to make them
143 printable
144 (marked by backslashes).
145 .Bd -literal
146 CTM_BEGIN 2.0 cvs-cur 485 19950324214652Z .
147 CTMFR src/sys/gnu/i386/isa/scd.c,v 5225f13aa3c7e458f9dd0d4bb637b18d
148 CTMFR src/sys/gnu/i386/isa/scdreg.h,v e5af42b8a06f2c8030b93a7d71afb223
149 CTMDM src/sys/gnu/i386/isa/Attic 0 552 775
150 CTMFS .ctm_status 545 552 664 d9ccd2a84a9dbb8db56ba85663adebf0 \\
151 e2a10c6f66428981782a0a18a789ee2e 12
152 cvs-cur 485
153
154 CTMFN CVSROOT/commitlogs/gnu 545 552 664 \\
155 5d7bc3549140d860bd9641b5782c002d 7fb04ed84b48160c9b8eea84b4c0b6e3 394
156 a6936 21
157 ache        95/03/24 09:59:50
158
159   Modified:    gnu/lib/libdialog kernel.c prgbox.c
160   Log:
161 [...]
162 CTM_END 74ddd298d76215ae45a077a4b6a74e9c
163 .Ed
164 .Sh SEE ALSO
165 .Xr ctm 1 ,
166 .Xr ctm_rmail 1 ,
167 .Xr ed 1
168 .Sh HISTORY
169 Initial trials ran during the
170 .Fx 1.1.5 ,
171 and many bugs and
172 methods were hashed out.
173 The CTM system has been made publicly available in
174 .Fx 2.1 .
175 .Sh AUTHORS
176 The CTM system has been designed and implemented by
177 .An Poul-Henning Kamp
178 .Aq phk@FreeBSD.org .
179 .Pp
180 .An Joerg Wunsch
181 .Aq joerg@FreeBSD.org
182 wrote this man-page.