mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/boypt/openssh-rpms.git
synced 2026-09-20 08:03:38 +08:00
* Add support for Amazon Linux and Docker (#13) * Modify OpenSSL version to 3.0.8 Version `3.0.0` and `3.0.8` is recommanded by the official, which are FIPS validated. See more: [[ Downloads ] - /source/index.html](https://www.openssl.org/source/) * Use OpenSSH 9.6p1 official file Update the baseline file to 9.6p1 Add some comments * Update README.md Add a desc for CentOS 7 to install packages * Update spec file - Sync spec file to latest(9.6p1) * Update requirement src - Add Perl for CentOS 5 * Add support for Amazon Linux and Docker! - Add support for Amazon Linux 1 / Amazon Linux 2 / Amazon Linux 2023 - Add Dockerfile for CentOS and Amazon Linux - Fix compile.sh error for using CentOS 5 * only download perl5 when necessary * only check perl 5 source on el5 * perl not need install in el5 * bump openssl verion * add notes in pullsrc.sh when download fails * fix: perl install inside build dir --------- Co-authored-by: ChowRex <zrx879582094@gmail.com>
51 lines
1.7 KiB
Bash
51 lines
1.7 KiB
Bash
#!/bin/bash
|
|
|
|
# Author: Rex Chow
|
|
# Modified: 2024/2/5 08:49
|
|
# Description: This script will modify yum repositories to Tsinghua University mirror.
|
|
# Copyright: Copyright © 2024 Rex Zhou. All rights reserved.
|
|
|
|
RELEASE_VER=$(rpm --eval '%{?dist}')
|
|
[ -z "$RELEASE_VER" ] && RELEASE_VER=".el5"
|
|
MIRROR_URL="https://mirrors.tuna.tsinghua.edu.cn"
|
|
AWS_REGION="cn-northwest-1"
|
|
|
|
case $RELEASE_VER in
|
|
.el7)
|
|
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
|
|
-e "s|^#baseurl=http://mirror.centos.org/centos|baseurl=${MIRROR_URL}/centos|g" \
|
|
-i.bak /etc/yum.repos.d/CentOS-*.repo && \
|
|
rm -rf /var/cache/yum/ && \
|
|
yum makecache fast
|
|
;;
|
|
.el6)
|
|
sed -e "s|^mirrorlist=|#mirrorlist=|g" \
|
|
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=${MIRROR_URL}/centos-vault/6.10|g" \
|
|
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl=${MIRROR_URL}/centos-vault/6.10|g" \
|
|
-i.bak \
|
|
/etc/yum.repos.d/CentOS-*.repo && \
|
|
rm -rf /var/cache/yum/ && \
|
|
yum makecache fast
|
|
;;
|
|
.el5)
|
|
sed -e "s|^mirrorlist=|#mirrorlist=|g" \
|
|
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=${MIRROR_URL}/centos-vault/5.11|g" \
|
|
-e "s|^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever|baseurl=${MIRROR_URL}/centos-vault/5.11|g" \
|
|
-i.bak \
|
|
/etc/yum.repos.d/*.repo && \
|
|
rm -rf /var/cache/yum/ && \
|
|
yum makecache fast
|
|
;;
|
|
.amzn1)
|
|
echo "amazonaws.com.cn" > /etc/yum/vars/awsdomain
|
|
echo "$AWS_REGION" > /etc/yum/vars/awsregion
|
|
;;
|
|
.amzn2)
|
|
echo "amazonaws.com.cn" > /etc/yum/vars/awsdomain
|
|
echo "$AWS_REGION" > /etc/yum/vars/awsregion
|
|
;;
|
|
*)
|
|
echo "rpm dist undefined, please specify: el5 el6 el7"
|
|
exit 1
|
|
;;
|
|
esac |