diff --git a/README.md b/README.md index e478e04..e1a042e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RPM Repositories Cloning tool -1 to 1 rpm cloning tool +1 to 1 rpm repository cloning tool ## Getting Started @@ -21,10 +21,19 @@ in case of Slackware Linux everything is already shipped with single Perl package. ``` -apt install libjson-pp-perl, libfile-spec-perl, libxml-parser-perl, -libio-compress-perl, liburi-perl +# apt install libjson-pp-perl libfile-spec-perl libxml-parser-perl \ +libio-compress-perl liburi-perl ``` +A correct path to repository. You need a string after "baseurl=" in repo-file +(one that located in /etc/yum.repos.d, for example), it must end with trailng +slash. If it does not, just add it. + +To check that url is correct you can try to download part of repository xml +metadata. Put your string into browser address bar and add +"repodata/repomd.xml" (no quotes) and if you see xml text then - vua-la! - +your string is correct. + ### Installing There are no additional effort required for one-shot sync. diff --git a/TODO b/TODO index 731e257..dd1b540 100644 --- a/TODO +++ b/TODO @@ -6,9 +6,6 @@ * добавить пример debian package * добавить slackbuild * добавить ebuild -* добавить примеры crontab -* добавить man page -* добавить методики работы с https://packagecloud.io/ и сервисами подобными им (без автоиндекса) Факультативное задание :) * добавить возможность клонирования deb-репозиториев diff --git a/docs/rrclone.1 b/docs/rrclone.1 new file mode 100644 index 0000000..2578246 --- /dev/null +++ b/docs/rrclone.1 @@ -0,0 +1,41 @@ +.TH "RRCLONE" "1" "5 December 2019" +.SH "NAME" +rrclone \- RPM Repository Cloning tool +.SH "SYNOPSIS" +.B rrclone +[\fI\,OPTION\/\fR]... +SOURCE +DESTINATION +.SH "DESCRIPTION" +.PP +Copies all packages and metadata from remote repository to local folder. +To guess package list it parses metadata. For now only XML metadata is supported. +.SH "OPTIONS" +.TP +\fB\-\-help\fR +show brief help message +.TP +\fB\-\-version\fR +show version +.TP +\fB\-\-verbose\fR +more verbose output +.TP +\fB\-\-noclean\fR +do not clean packages that are missing in metadata +.TP +\fBSOURCE\fR +is http(s) url that does not include repodata part. +For example if full (index) metadata path is http://server/repo/Packages/repodata/repomd.xml +then SOURCE will be http://server/repo/Packages/ with trailing slash. +.TP +\fBDESTINATION\fR +full path to local directory, for example /var/www/repository/ with triling slash. +.SH "AUTHOR" +.TP +Sergei Fedosoff aka eleksir +.SH "COPYRIGHT" +Copyright © 2018 Sergei Fedosoff. License 2 clause BSD: +https://directory.fsf.org/wiki?title=License:FreeBSD +.SH "SEE ALSO" +.B rpm (1). diff --git a/docs/rrclone.crontab b/docs/rrclone.crontab new file mode 100644 index 0000000..c92fd64 --- /dev/null +++ b/docs/rrclone.crontab @@ -0,0 +1,2 @@ +# run every sunday at 4.30 in the night +30 4 * * 0 http://server/repo/packages/ /var/www/repo 1>/dev/null