Compare commits
2 Commits
36a9c2e578
...
cff1367d0d
Author | SHA1 | Date | |
---|---|---|---|
cff1367d0d | |||
78f9895bce |
@@ -1,31 +1,31 @@
|
|||||||
FROM fedora:RELEASE
|
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 \
|
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/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
|
||||||
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm \
|
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm \
|
||||||
'dnf-command(copr)' \
|
dnf5 \
|
||||||
'dnf-command(config-manager)' \
|
dnf5-plugins \
|
||||||
'dnf-command(download)' \
|
|
||||||
findutils \
|
findutils \
|
||||||
rsync \
|
rsync \
|
||||||
&& dnf config-manager --set-disabled fedora fedora-modular updates-modular updates \
|
&& dnf5 config-manager --set-disabled fedora fedora-modular updates-modular updates \
|
||||||
; dnf copr -y enable principis/howdy \
|
; dnf5 copr -y enable principis/howdy \
|
||||||
; dnf copr -y enable principis/NoiseTorch \
|
; dnf5 copr -y enable principis/NoiseTorch \
|
||||||
; dnf copr -y enable principis/tldr-sharp \
|
; dnf5 copr -y enable principis/tldr-sharp \
|
||||||
; dnf clean all && rm -rf /var/log/dnf*
|
; dnf clean all && rm -rf /var/log/dnf*
|
||||||
|
|
||||||
ARG USER=mirror
|
ARG USER=mirror
|
||||||
ARG UID=1001
|
ARG UID=978
|
||||||
ARG GID=1001
|
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 /data
|
||||||
VOLUME /rpmfusion
|
|
||||||
VOLUME /cache
|
|
||||||
ENV PACKAGES=""
|
ENV PACKAGES=""
|
||||||
|
|
||||||
COPY --chown=mirror:mirror run.sh /entrypoint.sh
|
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 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
|
rm -f Dockerfile
|
||||||
done
|
done
|
||||||
|
1
packages
1
packages
@@ -1,6 +1,5 @@
|
|||||||
code
|
code
|
||||||
codium
|
codium
|
||||||
element-desktop
|
|
||||||
howdy
|
howdy
|
||||||
libsignal
|
libsignal
|
||||||
nodejs-electron
|
nodejs-electron
|
||||||
|
@@ -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
|
|
18
run.sh
18
run.sh
@@ -2,22 +2,24 @@
|
|||||||
echo 'Cleaning up Claque...'
|
echo 'Cleaning up Claque...'
|
||||||
|
|
||||||
cd /data/Packages
|
cd /data/Packages
|
||||||
FILES="$(rpm -qp --queryformat '%{NAME}\n' *.rpm 2> /dev/null | uniq)"
|
|
||||||
|
|
||||||
|
|
||||||
ARCH=('x86_64' 'i686' 'noarch')
|
ARCH=('x86_64' 'i686' 'noarch')
|
||||||
ARCHES=$(printf ",%s" "${ARCH[@]}")
|
ARCHES=$(printf -- " --arch=%s" "${ARCH[@]}")
|
||||||
ARCHES="${ARCHES:1}"
|
ARCHES="${ARCHES:1}"
|
||||||
|
|
||||||
for i in $FILES; do
|
declare -A DL_PKGS
|
||||||
for a in "${ARCH[@]}"; do
|
|
||||||
ls $i[-_][0-9]*$a.rpm -rv 2> /dev/null | awk 'NR>1' | xargs -d '\n' -r rm -v --
|
for file in *.rpm; do
|
||||||
|
pkg_info=$(rpm -qp --queryformat '%{NAME} %{ARCH}\n' "$file" 2>/dev/null)
|
||||||
|
DL_PKGS["$pkg_info"]+="$file "
|
||||||
done
|
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
|
done
|
||||||
|
|
||||||
set -f
|
set -f
|
||||||
|
dnf5 download -y $ARCHES --refresh --best --destdir /data/Packages/ $PACKAGES
|
||||||
dnf download -y --skip-broken --arch "$ARCHES" --refresh --best --destdir /data/Packages/ $PACKAGES
|
|
||||||
|
|
||||||
set +f
|
set +f
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user