-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapt-repo.8
257 lines (256 loc) · 5.93 KB
/
apt-repo.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
.\" $Id$
.\"
.\" Man page for the apt-repo program.
.\"
.\" Copyright (c) 2011-2022 Andrey Cherepanov <[email protected]>
.\" Copyright (c) 2015 Ivan Zakharyaschev <[email protected]>
.\"
.\" This software is distributed under the GNU General Public License (GPL)
.\" version 3 or later.
.\"
.Os Linux
.Dd January 2, 2022
.ds volume-operating-system Linux
.Dt apt\-repo 8
.\"
.Sh NAME
.Nm apt\-repo
.Nd Manipulate APT repository list
.\"
.Sh SYNOPSIS
.Nm apt\-repo
.Op list
.Op Fl a
.Nm apt\-repo
list
.Op task
.Ar id
.Nm apt\-repo
add
.Ar source
.Nm apt\-repo
rm
.Ar source|all
.Op Ar type
.Nm apt\-repo
set
.Ar branch
.Nm apt\-repo
clean
.Nm apt\-repo
update
.Nm apt\-repo
test
.Op task
.Ar id
.Nm apt\-repo
upgrade
.Op Ar id
.Nm apt\-repo
.Op Fl h
.Op Fl v
.\"
.Sh DESCRIPTION
The
.Nm apt\-repo
script allows to show, add, and remove
.Tn APT
repositories specified by a
.Ar source
in
.Xr sources.list 5
format, an
.Tn URL
with optional component, a branch name, or a task number.
.Pp
Since
.Nm
relies internally on
.Xr apt-config 8
to find the files which contain the repository lists,
it can be asked to manipulate arbitrary non-system APT sources.list by
setting
.Ev APT_CONFIG ,
which is a standard environment variable looked into by APT to
find its configuration.
Example:
.Pp
.Dl APT_CONFIG=~/.hasher/apt-extra.conf apt\-repo add p7
.Pp
will manipulate the repository lists in the files defined (if any) in
.Pa ~/.hasher/apt-extra.conf .
This can be useful, for example, to manipulate a user's local
.Xr hasher 7
configuration.
(Such configurations are described in more detail at https://www.altlinux.org/Hasher/Tips.)
If
.Ar --dry-run
is defined in command line changes only shown, is not performed.
.\"
.Sh OPTIONS
.Bl -tag -width Ds
.It list
Show active repositories in
.Xr sources.list 5
format. If
.Fl a
is specified, all available repositories are displayed (inactive ones are commented by
.Ql # ) .
.It list [task] Ar id
Show names of all available packages (except *-devel*, *-checkinstall and *-debuginfo) in a task repository specified by
.Ar id .
.It add Ar source
Add
.Ar source
to the list of active repositories.
.It rm Ar source [<type>]
Remove or comment
.Ar source
if it is active. Special keyword
.Ar all
removes all active sources. The
.Ar all
keyword followed by optional
.Ar <type>
removes all sources of specified type:
.Ql branch
or
.Ql branches
removes all branch sources,
.Ql task
or
.Ql tasks
removes all tasks sources,
.Ql cdrom
or
.Ql cdroms
removes all cdrom sources.
.It set Ar branch
Removes all exising sources and adds branch
.Ar branch
.It clean
Removes all cdrom and task sources.
.It update
Run
.Dl apt\-get update
to update the
.Tn APT
cache from the active repositories.
.It test [task] Ar id
Install all available packages (except *-devel*, *-checkinstall and *-debuginfo) from the task repository specified by
.Ar id .
.It test [task] Ar id Ar pkg1 Ar pkg2
Install the given packages from the task repository specified by
.Ar id .
.It test [task] Ar '' Ar pkg1 Ar pkg2
Install the given packages (without modifying APT repos).
.It upgrade Op Ar id Op Ar id
Upgrade all packages (including specified task(s) by
.Ar id
).
.It Fl h Fl \-help
Print usage information and quit.
.It Fl v Fl \-version
Print version and quit.
.El
.\"
.Sh "SOURCE FORMAT"
.Ss "APT Source"
Source can be specified in
.Xr sources.list 5
format:
.Pp
.Dl apt\-repo add \*qrpm http://git.altlinux.org/repo/39115/ i586 task\*q
.Pp
Recognized repository types: rpm, rpm-dir and rpm-src. It is allowed to
specify source as separate words. If trailing architecture and component
are missing, two lines will be added (current system architecture and
.Ql noarch )
with component
.Ql classic .
.Ss "URL"
.Tn APT
supports file://, copy://, http://, ftp://, rsync:// and cdrom:// protocols.
.Tn URL
with required protocol may be followed by an optional architecture and one or more
components. If architecture and component are missing, two lines will be added
(current system architecture and
.Ql noarch )
with component
.Ql classic .
This form is useful to add a branch on a mirror server.
.Pp
Example:
.Pp
.Dl apt\-repo add ftp://mirror.yandex.ru/altlinux/p7/branch
.Ss "Absolute Path"
Local directory beginning with
.Ql /
added as a
.Xr hasher 7
repository: with current system architecture and
.Ql hasher
component.
.Pp
.Dl apt\-repo add /opt/repo
.Ss "Branch"
Branch is a named repository consisting of two parts (current system architecture
and 'noarch'). By default, the official server is used. Full form:
.Pp
.Dl apt\-repo add branch <name of branch> [<archive_date>]
.Pp
Keyword
.Ql branch
may be omitted. Example:
.Pp
.Dl apt\-repo add p7
.Pp
Running
.Dl apt\-repo add branch
.Pp
without the name of a branch displays all available branch names.
.Ql archive_date
allows to add archive of branch. Date of archive should be in form YYYYMMDD or YYYY/MM/DD.
.Ss "Task"
Task is a small repository for one or more subtasks built in http://git.altlinux.org
infrastructure. This source is used to install software for test purposes.
Any task has a unique number. Full form:
.Pp
.Dl apt\-repo add task <number of task>
.Pp
Keyword
.Ql task
may be omitted. Example:
.Pp
.Dl apt\-repo add 39115
.\"
.Sh FILES
.Bl -tag -width -indent -compact
.It Pa /etc/apt/sources.list
The main list of repositories which APT reads. New repositiories are
added here (and, in this case, if it doesn't exist, then it is
created).
.It Pa /etc/apt/sources.list.d/*.list
The additional lists which APT reads.
.It Pa /etc/apt/apt.conf
.It Pa /etc/apt/apt.conf.d/*.conf
The system APT configuration which may override the above default
paths for sources.list(.d).
.El
.\"
.Sh ENVIRONMENT VARIABLES
.Bl -tag -width -indent -compact
.It Ev APT_CONFIG
This value overrides the default place where APT looks for apt.conf.
Setting it allows one to manipulate arbitrary user's non-system
sources.list by preparing a custom apt.conf (e.g., for hasher).
.El
.\"
.Sh "SEE ALSO"
.Xr sources.list 5 ,
.Xr apt\-cache 8 ,
.Xr apt\-get 8
.\"
.Sh AUTHORS
.An Andrey Cherepanov