Compare commits
2 Commits
36a9c2e578
...
cff1367d0d
Author | SHA1 | Date | |
---|---|---|---|
cff1367d0d | |||
78f9895bce |
@@ -1,31 +1,31 @@
|
||||
FROM fedora:RELEASE
|
||||
|
||||
COPY repos/*.repo /etc/yum/repos.d/
|
||||
COPY repos/*.repo /etc/yum.repos.d/
|
||||
|
||||
|
||||
RUN dnf --setopt=tsflags=nodocs -y install createrepo \
|
||||
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
||||
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm \
|
||||
'dnf-command(copr)' \
|
||||
'dnf-command(config-manager)' \
|
||||
'dnf-command(download)' \
|
||||
dnf5 \
|
||||
dnf5-plugins \
|
||||
findutils \
|
||||
rsync \
|
||||
&& dnf config-manager --set-disabled fedora fedora-modular updates-modular updates \
|
||||
; dnf copr -y enable principis/howdy \
|
||||
; dnf copr -y enable principis/NoiseTorch \
|
||||
; dnf copr -y enable principis/tldr-sharp \
|
||||
&& dnf5 config-manager --set-disabled fedora fedora-modular updates-modular updates \
|
||||
; dnf5 copr -y enable principis/howdy \
|
||||
; dnf5 copr -y enable principis/NoiseTorch \
|
||||
; dnf5 copr -y enable principis/tldr-sharp \
|
||||
; dnf clean all && rm -rf /var/log/dnf*
|
||||
|
||||
ARG USER=mirror
|
||||
ARG UID=1001
|
||||
ARG GID=1001
|
||||
ARG UID=978
|
||||
ARG GID=978
|
||||
|
||||
RUN useradd -m ${USER} --uid=${UID}
|
||||
RUN groupadd --gid=${GID} ${USER}
|
||||
RUN useradd -m ${USER} --uid=${UID} --gid=${GID}
|
||||
|
||||
USER ${UID}:${GID}
|
||||
|
||||
VOLUME /data
|
||||
VOLUME /rpmfusion
|
||||
VOLUME /cache
|
||||
ENV PACKAGES=""
|
||||
|
||||
COPY --chown=mirror:mirror run.sh /entrypoint.sh
|
||||
|
2
build.sh
2
build.sh
@@ -13,7 +13,7 @@ for r in "${RELEASE[@]}"; do
|
||||
|
||||
docker build -t customrepo-$r .
|
||||
|
||||
docker create --name claque-$r --privileged --user 978:978 -e PACKAGES="$(< packages)" -v /data/mirror/fedora/data/claque/releases/$r/x86_64:/data customrepo-$r
|
||||
docker create --name claque-$r -e PACKAGES="$(< packages)" -v /data/mirror/fedora/data/claque/releases/$r/x86_64:/data customrepo-$r
|
||||
|
||||
rm -f Dockerfile
|
||||
done
|
||||
|
@@ -1,7 +0,0 @@
|
||||
[home_jejb1_Element]
|
||||
name=Multi Distribution builds of Element (Fedora_$releasever)
|
||||
type=rpm-md
|
||||
baseurl=https://download.opensuse.org/repositories/home:/jejb1:/Element/Fedora_$releasever/
|
||||
gpgcheck=1
|
||||
gpgkey=https://download.opensuse.org/repositories/home:/jejb1:/Element/Fedora_$releasever/repodata/repomd.xml.key
|
||||
enabled=1
|
20
run.sh
20
run.sh
@@ -2,22 +2,24 @@
|
||||
echo 'Cleaning up Claque...'
|
||||
|
||||
cd /data/Packages
|
||||
FILES="$(rpm -qp --queryformat '%{NAME}\n' *.rpm 2> /dev/null | uniq)"
|
||||
|
||||
|
||||
ARCH=('x86_64' 'i686' 'noarch')
|
||||
ARCHES=$(printf ",%s" "${ARCH[@]}")
|
||||
ARCHES=$(printf -- " --arch=%s" "${ARCH[@]}")
|
||||
ARCHES="${ARCHES:1}"
|
||||
|
||||
for i in $FILES; do
|
||||
for a in "${ARCH[@]}"; do
|
||||
ls $i[-_][0-9]*$a.rpm -rv 2> /dev/null | awk 'NR>1' | xargs -d '\n' -r rm -v --
|
||||
done
|
||||
declare -A DL_PKGS
|
||||
|
||||
for file in *.rpm; do
|
||||
pkg_info=$(rpm -qp --queryformat '%{NAME} %{ARCH}\n' "$file" 2>/dev/null)
|
||||
DL_PKGS["$pkg_info"]+="$file "
|
||||
done
|
||||
|
||||
for na in "${!DL_PKGS[@]}"; do
|
||||
echo ${DL_PKGS["$na"]} | tr ' ' '\n' | sort -V | head -n -2 | xargs -d '\n' -r rm -v --
|
||||
done
|
||||
|
||||
set -f
|
||||
|
||||
dnf download -y --skip-broken --arch "$ARCHES" --refresh --best --destdir /data/Packages/ $PACKAGES
|
||||
dnf5 download -y $ARCHES --refresh --best --destdir /data/Packages/ $PACKAGES
|
||||
|
||||
set +f
|
||||
|
||||
|
Reference in New Issue
Block a user