summaryrefslogtreecommitdiff
path: root/repopush.1
blob: bd874db09eb5b084fcb192b1d96a4fd9ab3aa9ab (plain)
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
.\" Generated by scdoc 1.11.1
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.nh
.ad l
.\" Begin generated content:
.TH "repopush" "1" "2021-04-04"
.P
.SH NAME
.P
repopush - safely rsync a package repository to another location
.P
.SH SYNOPSIS
.P
\fBrepopush\fR \fB[-Nv]\fR \fI/path/to/local/repo\fR \fIremote\fR
.P
\fBrepopush\fR \fB[-Nv]\fR \fB[-f configfile]\fR \fB-s\fR \fIsection\fR
.P
.SH DESCRIPTION
.P
The \fBrepopush\fR tool is yet another program that helps with copying
the various package files and repository metadata from one OS package
repository to another, taking care to copy and remove files in such
a way as to never have the remote repository present an inconsistent view.\&
This is done by first copying the new package files, then copying the new
metadata files, then removing the outdated metadata files, and only then
removing the outdated package files.\&
.P
The \fBrepopush\fR tool supports APT and YUM repositories and figures out
which one to handle by analyzing the contents of the local repository.\&
This is one of the reasons why the latter must indeed be a directory on
a locally-mounted filesystem.\&
.P
The \fBrepopush\fR tool accepts the following command-line options:
.P
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.IP \(bu 4
.\}
\fB-f\fR \fIconfigfile\fR 
.br
  If the \fB-s\fR option is specified, the config file to read.\&
The default is \fI$XDG_CONFIG_HOME\fR\fB/repopush.\&conf\fR
(with a \fI$HOME\fR\fB/.\&config\fR default for \fI$XDG_CONFIG_HOME\fR).\&

.RE
.P
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.IP \(bu 4
.\}
\fB-N\fR 
.br
  No-operation mode; display what would have been done.\&

.RE
.P
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.IP \(bu 4
.\}
\fB-s\fR \fIsection\fR 
.br
  The config file section to read the \fBlocal\fR and \fBremote\fR variables from.\&

.RE
.P
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.IP \(bu 4
.\}
\fB-v\fR 
.br
  Verbose mode; display diagnostic output.\&

.RE
.P
There are two ways to specify the \fIlocal\fR and \fIremote\fR parameters:
directly on the command line or in a INI-style configuration file.\&
If the \fB-s\fR option is specified, \fBrepopush\fR will use the \fBconfget\fR tool to
read the configuration file (either the one specified by the \fB-f\fR option or
a default one in the user's home directory), look for the specified section,
and use the "local" and "remote" values from that section.\&
.P
As noted above, the \fIlocal\fR parameter should be a path to a directory.\&
The \fIremote\fR parameter can be in any format that the \fBrsync\fR tool
accepts.\&
.P
.SH FILES
.P
If the \fIlocal\fR and \fIremote\fR parameters are specified on the command line,
the operation of the \fBrepopush\fR tool is not affected by any files.\&
.P
If a configuration section is specified via the \fB-s\fR option, \fBrepopush\fR will
look for a configuration file (either one specified via the \fB-f\fR option or
a default one in the user's home directory) and treat it as an INI-style file
containing one or more sections.\&
See the documentation of the \fBconfget\fR tool for more information about
the supported format of the INI-style files.\&
.P
.SH EXAMPLES
.P
Test-run a repository update:
.P
.RS 4
repopush -Nv /var/lib/repos/infra www:/var/www/repo/infra
.P
.RE
Perform the actual update, a bit quieter:
.P
.RS 4
repopush /var/lib/repos/infra www:/var/www/repo/infra
.P
.RE
The same, but with the "to-www-infra" section specified in
the \fI$HOME\fR\fB/.\&config/repopush.\&conf\fR file:
.P
.RS 4
repopush -s to-www-infra
.P
.RE
To achieve the above result, the \fBrepopush.\&conf\fR file should contain
a section like this:
.P
.nf
.RS 4
[to-www-infra]
local=/var/lib/repos/infra
remote=www:/var/www/repo/infra
.fi
.RE
.P
.SH HISTORY
.P
The \fBrepopush\fR tool was first written by Peter Pentchev in 2020.\&
This manual page was created in 2021.\&
.P
.SH AUTHORS
.P
Peter Pentchev <roam@ringlet.\&net>