]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/ctm/ctm/ctm.5
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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$
14 .\"
15 .Dd March 25, 1995
16 .Dt CTM 5
17 .Os
18 .Sh NAME
19 .Nm ctm
20 .Nd source code mirror system
21 .Sh DESCRIPTION
22 The
23 .Nm
24 transfers data in a specific file format, called a CTM delta.
25 .Pp
26 CTM deltas consist of control lines and data chunks.
27 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 is not 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.
43 The
44 .Ar version
45 field must match the program version
46 (currently 2.0).
47 .Ar Name
48 is the name and
49 .Ar number
50 the sequence number of the CTM service, it is matched against the file
51 .Pa .ctm_status
52 to see if the delta has already been applied.
53 .Ar Timestamp
54 contains the year, month, day, hour, minute, and second of the
55 time of delta creation for reference
56 (followed by the letter
57 .Sq Z
58 meaning this is a UTC timestamp).
59 The
60 .Ar prefix
61 field is currently not implemented.
62 .It _END Ar md5
63 This statement ends the CTM delta, the global
64 .Ar md5
65 checksum is matched against the MD5 checksum of the entire delta, up to
66 and including the space (0x20) character following ``_END''.
67 .It \&FM Ar name uid gid mode md5 count
68 Make the file
69 .Ar name ,
70 the original file had the uid
71 .Ar uid
72 (numerical, decimal),
73 the gid
74 .Ar gid
75 (numerical, decimal),
76 mode
77 .Ar mode
78 (numerical, octal),
79 and the MD5 checksum
80 .Ar md5 .
81 .Pp
82 The following
83 .Ar count
84 bytes data are the contents of the new file.
85 .It \&FS Ar name uid gid mode md5before md5after count
86 Substitute the contents of file
87 .Ar name ,
88 the original file had the new uid
89 .Ar uid
90 (numerical, decimal),
91 the new gid
92 .Ar gid
93 (numerical, decimal),
94 new mode
95 .Ar mode
96 (numerical, octal),
97 the old MD5 checksum
98 .Ar md5before ,
99 and the new MD5 checksum
100 .Ar md5after .
101 .Pp
102 The following
103 .Ar count
104 bytes data are the contents of the new file.
105 .Pp
106 File substitution is used if the commands to edit a file would exceed
107 the total file length, so substituting it is more efficient.
108 .It \&FN Ar name uid gid mode md5before md5after count
109 Edit the file
110 .Ar name .
111 The arguments are as above, but the data sections contains an
112 .Xr diff 1
113 -n script which should be applied to the file in question.
114 .It \&FR Ar name md5
115 Remove the file
116 .Ar name ,
117 which must match the MD5 checksum
118 .Ar md5 .
119 .It \&AS Ar name uid gid mode
120 The original file
121 .Ar name
122 changed its owner to
123 .Ar uid ,
124 its group to
125 .Ar gid ,
126 and/or its mode to
127 .Ar mode .
128 .It \&DM Ar name uid gid mode
129 The directory
130 .Ar name
131 is to be created, it had originally the owner
132 .Ar uid ,
133 group
134 .Ar gid ,
135 and mode
136 .Ar mode .
137 .It \&DR Ar name
138 The directory
139 .Ar name
140 is to be removed.
141 .El
142 .Sh EXAMPLES
143 In the following example, long lines have been folded to make them
144 printable
145 (marked by backslashes).
146 .Bd -literal
147 CTM_BEGIN 2.0 cvs-cur 485 19950324214652Z .
148 CTMFR src/sys/gnu/i386/isa/scd.c,v 5225f13aa3c7e458f9dd0d4bb637b18d
149 CTMFR src/sys/gnu/i386/isa/scdreg.h,v e5af42b8a06f2c8030b93a7d71afb223
150 CTMDM src/sys/gnu/i386/isa/Attic 0 552 775
151 CTMFS .ctm_status 545 552 664 d9ccd2a84a9dbb8db56ba85663adebf0 \\
152 e2a10c6f66428981782a0a18a789ee2e 12
153 cvs-cur 485
154
155 CTMFN CVSROOT/commitlogs/gnu 545 552 664 \\
156 5d7bc3549140d860bd9641b5782c002d 7fb04ed84b48160c9b8eea84b4c0b6e3 394
157 a6936 21
158 ache        95/03/24 09:59:50
159
160   Modified:    gnu/lib/libdialog kernel.c prgbox.c
161   Log:
162 [...]
163 CTM_END 74ddd298d76215ae45a077a4b6a74e9c
164 .Ed
165 .Sh SEE ALSO
166 .Xr ctm 1 ,
167 .Xr ctm_rmail 1 ,
168 .Xr ed 1
169 .Sh HISTORY
170 Initial trials ran during the
171 .Fx 1.1.5 ,
172 and many bugs and
173 methods were hashed out.
174 The CTM system has been made publicly available in
175 .Fx 2.1 .
176 .Sh AUTHORS
177 The CTM system has been designed and implemented by
178 .An Poul-Henning Kamp
179 .Aq phk@FreeBSD.org .
180 .Pp
181 .An Joerg Wunsch
182 .Aq joerg@FreeBSD.org
183 wrote this man-page.