diff --git a/.gitignore b/.gitignore index 60baa9c..0c2eb55 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -data/* +data/rpm/* +data/deb/* diff --git a/Dockerfile.deb b/Dockerfile.deb index 4d05ebe..8d59f67 100644 --- a/Dockerfile.deb +++ b/Dockerfile.deb @@ -3,7 +3,7 @@ FROM debian:10.5-slim COPY config/deb/entrypoint.sh /opt/entrypoint.sh RUN apt-get update -q \ && \ - apt install -y -qq apt-mirror \ + apt install -y -qq apt-mirror apt-transport-https software-properties-common wget \ && \ apt-get autoremove \ && \ diff --git a/config/deb/entrypoint.sh b/config/deb/entrypoint.sh index d23390d..041e255 100755 --- a/config/deb/entrypoint.sh +++ b/config/deb/entrypoint.sh @@ -1,3 +1,4 @@ #!/bin/bash +wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key apt-mirror diff --git a/config/deb/mirror.list b/config/deb/mirror.list index 279e876..e110598 100644 --- a/config/deb/mirror.list +++ b/config/deb/mirror.list @@ -30,4 +30,7 @@ deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4 deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse +deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main +deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com beta main + clean http://archive.ubuntu.com/ubuntu diff --git a/config/rpm/entrypoint.sh b/config/rpm/entrypoint.sh index 154bc0a..117dfa5 100755 --- a/config/rpm/entrypoint.sh +++ b/config/rpm/entrypoint.sh @@ -10,9 +10,9 @@ done # rpm --import /tmp/gpg_keys/$gpg_key # done -for cent_release in 6 7 8 +for cent_release in 6 7 8 9 do - for mongo_release in 4.4 5.0 6.0 + for mongo_release in 4.2 4.4 5.0 6.0 do reposync --delete \ --remote-time \ @@ -21,3 +21,13 @@ do --repoid mongodb-org-$mongo_release-c$cent_release done done + + +# rpm --import https://rpm.grafana.com/gpg.key +reposync --delete \ + --arch=x86_64 \ + --remote-time \ + --download-metadata \ + -p /data/ \ + --repoid grafana + diff --git a/config/rpm/repo_files/grafana.repo b/config/rpm/repo_files/grafana.repo new file mode 100644 index 0000000..55620d6 --- /dev/null +++ b/config/rpm/repo_files/grafana.repo @@ -0,0 +1,9 @@ +[grafana] +name=grafana +baseurl=https://rpm.grafana.com +#repo_gpgcheck=1 +enabled=1 +#gpgcheck=1 +#gpgkey=https://rpm.grafana.com/gpg.key +sslverify=1 +sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/config/rpm/repo_files/mongodb.repo b/config/rpm/repo_files/mongodb.repo index c4235b6..c924086 100644 --- a/config/rpm/repo_files/mongodb.repo +++ b/config/rpm/repo_files/mongodb.repo @@ -1,6 +1,13 @@ # # centos 6 # +[mongodb-org-4.2-c6] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/6/mongodb-org/4.2/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc + [mongodb-org-4.4-c6] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/6/mongodb-org/4.4/x86_64/ @@ -25,6 +32,13 @@ gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc # # centos 7 # +[mongodb-org-4.2-c7] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.2/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc + [mongodb-org-4.4-c7] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.4/x86_64/ @@ -49,6 +63,13 @@ gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc # # centos 8 # +[mongodb-org-4.2-c8] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.2/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc + [mongodb-org-4.4-c8] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/ @@ -70,3 +91,34 @@ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc +# +# centos 9 +# +[mongodb-org-4.2-c9] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/9/mongodb-org/4.2/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc + +[mongodb-org-4.4-c9] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc + +[mongodb-org-5.0-c9] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/5.0/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-5.0.asc + +[mongodb-org-6.0-c9] +name=MongoDB Repository +baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/6.0/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc + diff --git a/data/web/mirrors/grafana/rpm b/data/web/mirrors/grafana/rpm new file mode 120000 index 0000000..9fc829d --- /dev/null +++ b/data/web/mirrors/grafana/rpm @@ -0,0 +1 @@ +../../../rpm/grafana \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/deb b/data/web/mirrors/repo.mongodb.org/deb new file mode 120000 index 0000000..3501313 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/deb @@ -0,0 +1 @@ +../../../../data/deb/mirror/repo.mongodb.org/apt \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/4.2/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/4.2/x86_64 new file mode 120000 index 0000000..74ff8bc --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/4.2/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.2-c6 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/4.4/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/4.4/x86_64 new file mode 120000 index 0000000..d8e52a8 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/4.4/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.4-c6 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/5.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/5.0/x86_64 new file mode 120000 index 0000000..8ca5568 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/5.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-5.0-c6 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/6.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/6.0/x86_64 new file mode 120000 index 0000000..dbe0ea9 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/6/mongodb-org/6.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-6.0-c6 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/4.2/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/4.2/x86_64 new file mode 120000 index 0000000..dcf93d1 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/4.2/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.2-c7 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/4.4/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/4.4/x86_64 new file mode 120000 index 0000000..ead3438 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/4.4/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.4-c7 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/5.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/5.0/x86_64 new file mode 120000 index 0000000..8af8096 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/5.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-5.0-c7 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/6.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/6.0/x86_64 new file mode 120000 index 0000000..532f971 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/7/mongodb-org/6.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-6.0-c7 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/4.2/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/4.2/x86_64 new file mode 120000 index 0000000..a71beea --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/4.2/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.2-c8 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/4.4/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/4.4/x86_64 new file mode 120000 index 0000000..36a6284 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/4.4/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.4-c8 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/5.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/5.0/x86_64 new file mode 120000 index 0000000..6360f63 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/5.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-5.0-c8 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/6.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/6.0/x86_64 new file mode 120000 index 0000000..afb7217 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/8/mongodb-org/6.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-6.0-c8 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/4.2/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/4.2/x86_64 new file mode 120000 index 0000000..df018c0 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/4.2/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.2-c9 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/4.4/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/4.4/x86_64 new file mode 120000 index 0000000..9416ef1 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/4.4/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-4.4-c9 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/5.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/5.0/x86_64 new file mode 120000 index 0000000..5f84b73 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/5.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-5.0-c9 \ No newline at end of file diff --git a/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/6.0/x86_64 b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/6.0/x86_64 new file mode 120000 index 0000000..ab48a39 --- /dev/null +++ b/data/web/mirrors/repo.mongodb.org/rpm/redhat/9/mongodb-org/6.0/x86_64 @@ -0,0 +1 @@ +../../../../../../../../rpm/mongodb-org-6.0-c9 \ No newline at end of file diff --git a/deb-mirror.sh b/deb-mirror.sh new file mode 100755 index 0000000..bb28a7f --- /dev/null +++ b/deb-mirror.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +docker build -t debmirror:latest -f Dockerfile.deb . +docker run -v "$(pwd)/data/deb":/data debmirror:latest + diff --git a/rpm-mirror.sh b/rpm-mirror.sh new file mode 100755 index 0000000..da95fb3 --- /dev/null +++ b/rpm-mirror.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +docker build -t rpmmirror:latest -f Dockerfile.rpm . +docker run -v "$(pwd)/data/rpm":/data rpmmirror:latest +