Commit local changes

This commit is contained in:
2024-04-27 12:39:04 +02:00
parent bfba355b5f
commit fdbcd09a68
14 changed files with 212 additions and 73 deletions

View File

@@ -1,18 +0,0 @@
FROM fedora:30
RUN dnf install -y 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)' findutils rsync
RUN dnf copr -y enable johnseekins/sway
RUN dnf copr -y enable @sway-sig/sway-desktop
RUN dnf copr -y enable taw/Riot
RUN dnf copr -y enable abn/throttled
RUN dnf copr -y enable dgoerger/workstation
RUN dnf copr -y enable jmiven/gajim-omemo
RUN dnf clean all
VOLUME [/data]
VOLUME [/rpmfusion]
ENV PACKAGES=""
COPY run.sh /entrypoint.sh
COPY repos/*.repo /etc/yum/repos.d/
ENTRYPOINT ["/entrypoint.sh"]

32
Dockerfile.default Normal file
View File

@@ -0,0 +1,32 @@
FROM fedora:RELEASE
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)' \
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 \
; dnf clean all && rm -rf /var/log/dnf*
ARG USER=mirror
ARG UID=1001
ARG GID=1001
RUN useradd -m ${USER} --uid=${UID}
VOLUME /data
VOLUME /rpmfusion
VOLUME /cache
ENV PACKAGES=""
COPY --chown=mirror:mirror run.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -0,0 +1,14 @@
Hoe package toevoegen
1.
- Copr repo: voeg toe aan `Dockerfile.default`
- Andere repo: zet .repo file in `repos`
2.
Voeg nodige packages toe aan `packages`
3.
Run `build.sh`
4.
Run `podman start claque-31`

View File

@@ -1,6 +1,20 @@
#!/bin/bash
docker container rm claque
docker build -t customrepo .
cd "$( dirname "${BASH_SOURCE[0]}" )"
RELEASE=(38 39 40)
for r in "${RELEASE[@]}"; do
sudo -u mirror mkdir -p /data/mirror/fedora/data/claque/releases/$r/x86_64/Packages
docker container rm claque-$r
sed "s/RELEASE/$r/" Dockerfile.default > Dockerfile
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
rm -f Dockerfile
done
docker create --name claque -e PACKAGES="$(< packages)" -v /mnt/user/Data/fedora-mirror/data/claque/releases/30/x86_64:/data -v /mnt/user/Data/fedora-mirror/data/rpmfusion:/rpmfusion customrepo

View File

@@ -1,15 +1,12 @@
code
grim
python-axolotl
python2-axolotl
python2-axolotl-curve25519
python3-axolotl
python3-axolotl-curve25519
riot
sway
swaylock
element-desktop
howdy
nodejs-electron
noisetorch
pam_python
signal-desktop
signal-libringrtc
slack
teams
teamviewer
throttled
wlroots
yarn
zotero
tldr-sharp

7
repos/element.repo Normal file
View File

@@ -0,0 +1,7 @@
[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

35
repos/rpmsphere.repo Normal file
View File

@@ -0,0 +1,35 @@
[rpmsphere]
name=RPM Sphere - Basearch
baseurl=https://github.com/rpmsphere/$basearch/raw/master/
skip_if_unavailable=True
#repo_gpgcheck=0
gpgcheck=0
#sslverify=False
enabled=1
[rpmsphere-noarch]
name=RPM Sphere - Noarch
baseurl=https://github.com/rpmsphere/noarch/raw/master/
skip_if_unavailable=True
#repo_gpgcheck=0
gpgcheck=0
#sslverify=False
enabled=1
[rpmsphere-source]
name=RPM Sphere - Source
baseurl=https://github.com/rpmsphere/source/raw/master/
skip_if_unavailable=True
#repo_gpgcheck=0
gpgcheck=0
#sslverify=False
enabled=0
[rpmsphere-caution]
name=RPM Sphere - Caution
baseurl=https://github.com/rpmsphere/caution/raw/master/
skip_if_unavailable=True
#repo_gpgcheck=0
gpgcheck=0
#sslverify=False
enabled=0

8
repos/signal.repo Normal file
View File

@@ -0,0 +1,8 @@
[network_im_signal]
name=Signal Messaging Devel Project (Fedora_$releasever)
type=rpm-md
baseurl=https://download.opensuse.org/repositories/network:/im:/signal/Fedora_$releasever/
gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/network:/im:/signal/Fedora_$releasever/repodata/repomd.xml.key
enabled=1

10
repos/slack.repo Normal file
View File

@@ -0,0 +1,10 @@
[slack]
name=Slack
baseurl=https://packagecloud.io/slacktechnologies/slack/fedora/21/$basearch
gpgcheck=1
enabled=1
gpgkey=https://slack.com/gpg/slack_pubkey_20210901.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

6
repos/teams.repo Normal file
View File

@@ -0,0 +1,6 @@
[teams]
name=teams
baseurl=https://packages.microsoft.com/yumrepos/ms-teams
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

View File

@@ -1,8 +1,8 @@
[teamviewer]
name=TeamViewer - $basearch
baseurl=http://linux.teamviewer.com/yum/stable/main/binary-$basearch/
gpgkey=http://linux.teamviewer.com/pubkey/TeamViewer2017.asc
baseurl=https://linux.teamviewer.com/yum/stable/main/binary-$basearch/
gpgkey=https://linux.teamviewer.com/pubkey/currentkey.asc
gpgcheck=1
repo_gpgcheck=1
enabled=1
type=rpm-md
failovermethod=priority

View File

@@ -1,6 +0,0 @@
[yarn]
name=Yarn Repository
baseurl=https://dl.yarnpkg.com/rpm/
enabled=1
gpgcheck=1
gpgkey=https://dl.yarnpkg.com/rpm/pubkey.gpg

47
run.sh
View File

@@ -1,39 +1,26 @@
#!/bin/bash
echo 'Cleaning up Claque...'
VERSION=30
ARCH="x86_64"
REPO_DIR=/rpmfusion
MIRROR=(
"rsync://download1.rpmfusion.org/rpmfusion/"
)
cd /data/Packages
FILES="$(rpm -qp --queryformat '%{NAME}\n' *.rpm 2> /dev/null | uniq)"
for ((i=0; i<${#MIRROR[@]}; i++)); do
rsync --progress -amH --numeric-ids --delete --delete-delay --delay-updates \
--exclude='*/drpms' \
--exclude='*/images' \
--exclude='*/Docker' \
--exclude='*/CloudImages' \
--exclude='*/debug' \
--exclude='*/iso' \
--exclude='*/development'\
--exclude='*/testing'\
--exclude='*/tainted'\
--exclude='*/rpi'\
--exclude='*/steam'\
--exclude='*/nvidia-driver'\
--include="**/${VERSION}/**${ARCH}/***" \
--include='*/' --exclude='*' \
"${MIRROR[i]}" "${REPO_DIR}"
ARCH=('x86_64' 'i686' 'noarch')
ARCHES=$(printf ",%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
done
find "${REPO_DIR}" -name "*comps-*.xml" -exec sh -c 'cp -av {} "$(dirname {})/../comps.xml"' \;
set -f
dnf download -y --skip-broken --arch "$ARCHES" --refresh --best --destdir /data/Packages/ $PACKAGES
for i in $(find "${REPO_DIR}" -type d -name 'repodata' -exec dirname '{}' \;); do
createrepo --update -g comps.xml "$i"
done
set +f
dnf download --refresh --best --destdir /data/Packages/ $PACKAGES
createrepo /data --verbose --database --deltas
createrepo -q /data --update
echo 'Finished'

53
run.sh.bak Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/bash
VERSION=30
ARCH="x86_64"
REPO_DIR=/rpmfusion
MIRROR=(
"rsync://download1.rpmfusion.org/rpmfusion/"
)
for ((i=0; i<${#MIRROR[@]}; i++)); do
rsync --progress -amH --numeric-ids --delete --delete-delay --delay-updates \
--exclude='*/drpms' \
--exclude='*/images' \
--exclude='*/Docker' \
--exclude='*/CloudImages' \
--exclude='*/debug' \
--exclude='*/iso' \
--exclude='*/development'\
--exclude='*/testing'\
--exclude='*/tainted'\
--exclude='*/rpi'\
--exclude='*/steam'\
--exclude='*/nvidia-driver'\
--include="**/${VERSION}/**${ARCH}/***" \
--include='*/' --exclude='*' \
"${MIRROR[i]}" "${REPO_DIR}"
done
find "${REPO_DIR}" -name "*comps-*.xml" -exec sh -c 'cp -av {} "$(dirname {})/../comps.xml"' \;
for i in $(find "${REPO_DIR}" -type d -name 'repodata' -exec dirname '{}' \;); do
createrepo --update --database --deltas -c /cache/rpmfusion -g comps.xml "$i"
done
echo 'Cleaning up Claque...'
cd /data/Packages
FILES="$(rpm -qp --queryformat '%{NAME}\n' *.rpm 2> /dev/null | uniq)"
ARCH=('x86_64' 'i686' 'noarch' 'i386')
for i in $FILES; do
for a in "${ARCH[@]}"; do
ls $i*$a.rpm -rv 2> /dev/null | awk 'NR>1' | xargs -d '\n' -r rm -v --
done
done
dnf download --refresh --best --destdir /data/Packages/ $PACKAGES
createrepo /data --update --verbose --database --deltas -c /cache/claque