mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
drop centos8, add almalinux 8.8, update rocky to 8.8
And cleanup Docker files
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -45,8 +45,8 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
${{github.workspace}}/build/mscp_ubuntu-20.04-x86_64.deb
|
${{github.workspace}}/build/mscp_ubuntu-20.04-x86_64.deb
|
||||||
${{github.workspace}}/build/mscp_ubuntu-22.04-x86_64.deb
|
${{github.workspace}}/build/mscp_ubuntu-22.04-x86_64.deb
|
||||||
${{github.workspace}}/build/mscp_centos-8-x86_64.rpm
|
${{github.workspace}}/build/mscp_rocky-8.8-x86_64.rpm
|
||||||
${{github.workspace}}/build/mscp_rocky-8.6-x86_64.rpm
|
${{github.workspace}}/build/mscp_almalinux-8.8-x86_64.rpm
|
||||||
${{github.workspace}}/build/mscp_alpine-3.17-x86_64.static
|
${{github.workspace}}/build/mscp_alpine-3.17-x86_64.static
|
||||||
${{github.workspace}}/build/mscp.linux.x86.static
|
${{github.workspace}}/build/mscp.linux.x86.static
|
||||||
|
|
||||||
|
|||||||
@@ -121,9 +121,8 @@ enable_testing()
|
|||||||
|
|
||||||
|
|
||||||
# CPACK Rules
|
# CPACK Rules
|
||||||
set(CPACK_SET_DESTDIR true)
|
#set(CPACK_SET_DESTDIR true)
|
||||||
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
||||||
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
|
||||||
set(CPACK_PACKAGE_CONTACT "Ryo Nakamura <upa@haeena.net>")
|
set(CPACK_PACKAGE_CONTACT "Ryo Nakamura <upa@haeena.net>")
|
||||||
set(CPACK_PACKAGE_DESCRIPTION
|
set(CPACK_PACKAGE_DESCRIPTION
|
||||||
"mscp, copy files over multiple ssh connections")
|
"mscp, copy files over multiple ssh connections")
|
||||||
@@ -153,6 +152,7 @@ if(UNIX AND NOT APPLE) # on linux
|
|||||||
set(CPACK_RPM_PACKAGE_REQUIRES ${DIST_DEP})
|
set(CPACK_RPM_PACKAGE_REQUIRES ${DIST_DEP})
|
||||||
set(CPACK_RPM_PACKAGE_HOMEPAGE "https://github.com/upa/mscp")
|
set(CPACK_RPM_PACKAGE_HOMEPAGE "https://github.com/upa/mscp")
|
||||||
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
||||||
|
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
|
||||||
endif() # on linux
|
endif() # on linux
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
@@ -162,9 +162,9 @@ include(CPack)
|
|||||||
# Custom targets to build and test mscp in docker containers.
|
# Custom targets to build and test mscp in docker containers.
|
||||||
# foreach(IN ZIP_LISTS) (cmake >= 3.17) can shorten the following lists.
|
# foreach(IN ZIP_LISTS) (cmake >= 3.17) can shorten the following lists.
|
||||||
# However, ubuntu 20.04 has cmake 3.16.3. So this is a roundabout trick.
|
# However, ubuntu 20.04 has cmake 3.16.3. So this is a roundabout trick.
|
||||||
list(APPEND DIST_NAMES ubuntu ubuntu centos rocky alpine)
|
list(APPEND DIST_NAMES ubuntu ubuntu rocky almalinux alpine)
|
||||||
list(APPEND DIST_VERS 20.04 22.04 8 8.6 3.17)
|
list(APPEND DIST_VERS 20.04 22.04 8.8 8.8 3.17)
|
||||||
list(APPEND DIST_PKGS deb deb rpm rpm static)
|
list(APPEND DIST_PKGS deb deb rpm rpm static)
|
||||||
|
|
||||||
list(LENGTH DIST_NAMES _DIST_LISTLEN)
|
list(LENGTH DIST_NAMES _DIST_LISTLEN)
|
||||||
math(EXPR DIST_LISTLEN "${_DIST_LISTLEN} - 1")
|
math(EXPR DIST_LISTLEN "${_DIST_LISTLEN} - 1")
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ patch introduces asynchronous SFTP Write, which is derived from
|
|||||||
https://github.com/limes-datentechnik-gmbh/libssh (see [Re: SFTP Write
|
https://github.com/limes-datentechnik-gmbh/libssh (see [Re: SFTP Write
|
||||||
async](https://archive.libssh.org/libssh/2020-06/0000004.html)).
|
async](https://archive.libssh.org/libssh/2020-06/0000004.html)).
|
||||||
|
|
||||||
Currently macOS and Linux (Ubuntu, CentOS, Rocky) are supported.
|
Currently macOS and Linux (Ubuntu, Rocky, Alma) are supported.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
# clone this repository
|
# clone this repository
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ docker build -t mscp-ubuntu:20.04 -f docker/ubuntu-20.04.Dockerfile .
|
|||||||
|
|
||||||
docker build -t mscp-ubuntu:22.04 -f docker/ubuntu-22.04.Dockerfile .
|
docker build -t mscp-ubuntu:22.04 -f docker/ubuntu-22.04.Dockerfile .
|
||||||
|
|
||||||
docker build -t mscp-centos:8 -f docker/centos-8.Dockerfile .
|
docker build -t mscp-rocky:8.8 -f docker/rocky-8.Dockerfile .
|
||||||
|
|
||||||
docker build -t mscp-rocky:8.6 -f docker/rocky-8.6.Dockerfile .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Test `mscp` in the containers.
|
Test `mscp` in the containers.
|
||||||
@@ -20,25 +18,20 @@ docker run --init --rm mscp-ubuntu:20.04 /mscp/scripts/test-in-container.sh
|
|||||||
|
|
||||||
docker run --init --rm mscp-ubuntu:22.04 /mscp/scripts/test-in-container.sh
|
docker run --init --rm mscp-ubuntu:22.04 /mscp/scripts/test-in-container.sh
|
||||||
|
|
||||||
docker run --init --rm mscp-centos:8 /mscp/scripts/test-in-container.sh
|
docker run --init --rm mscp-rocky:8.9 /mscp/scripts/test-in-container.sh
|
||||||
|
|
||||||
docker run --init --rm mscp-rocky:8.6 /mscp/scripts/test-in-container.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Retrieve deb/rpm packages.
|
Retrieve deb/rpm packages.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
docker run --rm -v (pwd):/out mscp-ubuntu:20.04 \
|
docker run --rm -v (pwd):/out mscp-ubuntu:20.04 \
|
||||||
cp /mscp/build/mscp_0.0.0-ubuntu-20.04-x86_64.deb /out/
|
cp /mscp/build/mscp_ubuntu-20.04-x86_64.deb /out/
|
||||||
|
|
||||||
docker run --rm -v (pwd):/out mscp-ubuntu:22.04 \
|
docker run --rm -v (pwd):/out mscp-ubuntu:22.04 \
|
||||||
cp /mscp/build/mscp_0.0.0-ubuntu-22.04-x86_64.deb /out/
|
cp /mscp/build/mscp_ubuntu-22.04-x86_64.deb /out/
|
||||||
|
|
||||||
docker run --rm -v (pwd):/out mscp-centos:8 \
|
docker run --rm -v (pwd):/out mscp-rocky:8.8 \
|
||||||
cp /mscp/build/mscp_0.0.0-centos-8-x86_64.rpm /out/
|
cp /mscp/build/mscp_rocky-8.8-x86_64.rpm /out/
|
||||||
|
|
||||||
docker run --rm -v (pwd):/out mscp-rocky:8.6 \
|
|
||||||
cp /mscp/build/mscp_0.0.0-rocky-8.6-x86_64.rpm /out/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
I don't know whether these are good way.
|
I don't know whether these are good way.
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
FROM rockylinux:8.6
|
FROM almalinux:8.8
|
||||||
|
|
||||||
ARG mscpdir="/mscp"
|
|
||||||
|
|
||||||
COPY . ${mscpdir}
|
|
||||||
|
|
||||||
# install pytest, sshd for test, and rpm-build
|
# install pytest, sshd for test, and rpm-build
|
||||||
RUN set -ex && yum -y install \
|
RUN set -ex && yum -y install \
|
||||||
@@ -17,6 +13,11 @@ RUN mkdir /var/run/sshd \
|
|||||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
|
||||||
|
ARG mscpdir="/mscp"
|
||||||
|
|
||||||
|
COPY . ${mscpdir}
|
||||||
|
|
||||||
# install build dependency
|
# install build dependency
|
||||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||||
|
|
||||||
@@ -2,18 +2,26 @@ FROM alpine:3.17
|
|||||||
|
|
||||||
# Build mscp with conan to create single binary mscp
|
# Build mscp with conan to create single binary mscp
|
||||||
|
|
||||||
ARG mscpdir="/mscp"
|
|
||||||
|
|
||||||
COPY . ${mscpdir}
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
gcc make cmake python3 py3-pip perl linux-headers libc-dev \
|
gcc make cmake python3 py3-pip perl linux-headers libc-dev \
|
||||||
openssh bash python3-dev g++
|
openssh bash python3-dev g++
|
||||||
|
|
||||||
RUN pip3 install conan pytest
|
RUN pip3 install conan pytest
|
||||||
|
|
||||||
|
# preparation for sshd
|
||||||
|
RUN ssh-keygen -A
|
||||||
|
RUN mkdir /var/run/sshd \
|
||||||
|
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||||
|
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
|
||||||
# Build mscp as a single binary
|
# Build mscp as a single binary
|
||||||
RUN conan profile detect --force
|
RUN conan profile detect --force
|
||||||
|
|
||||||
|
ARG mscpdir="/mscp"
|
||||||
|
|
||||||
|
COPY . ${mscpdir}
|
||||||
|
|
||||||
RUN cd ${mscpdir} \
|
RUN cd ${mscpdir} \
|
||||||
&& rm -rf build \
|
&& rm -rf build \
|
||||||
&& conan install . --output-folder=build --build=missing \
|
&& conan install . --output-folder=build --build=missing \
|
||||||
@@ -25,15 +33,8 @@ RUN cd ${mscpdir} \
|
|||||||
&& make \
|
&& make \
|
||||||
&& cp mscp /usr/bin/ \
|
&& cp mscp /usr/bin/ \
|
||||||
&& cp mscp /mscp/build/mscp_alpine-3.17-x86_64.static
|
&& cp mscp /mscp/build/mscp_alpine-3.17-x86_64.static
|
||||||
|
|
||||||
# copy mscp to PKG FILE NAME because this build doesn't use CPACK
|
# copy mscp to PKG FILE NAME because this build doesn't use CPACK
|
||||||
|
|
||||||
# preparation for sshd
|
|
||||||
RUN ssh-keygen -A
|
|
||||||
RUN mkdir /var/run/sshd \
|
|
||||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
|
||||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
|
||||||
|
|
||||||
# install mscp python module
|
# install mscp python module
|
||||||
RUN cd ${mscpdir} \
|
RUN cd ${mscpdir} \
|
||||||
&& python3 setup.py install --user
|
&& python3 setup.py install --user
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
FROM centos:8
|
FROM rockylinux:8.8
|
||||||
|
|
||||||
ARG mscpdir="/mscp"
|
|
||||||
|
|
||||||
COPY . ${mscpdir}
|
|
||||||
|
|
||||||
# from https://stackoverflow.com/questions/70963985/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal
|
|
||||||
RUN cd /etc/yum.repos.d/
|
|
||||||
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
|
|
||||||
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
|
|
||||||
|
|
||||||
# install pytest, sshd for test, and rpm-build
|
# install pytest, sshd for test, and rpm-build
|
||||||
RUN set -ex && yum -y update && yum -y install \
|
RUN set -ex && yum -y install \
|
||||||
python3 python3-pip python3-devel openssh openssh-server openssh-clients rpm-build
|
python3 python3-pip python3-devel openssh openssh-server openssh-clients rpm-build
|
||||||
|
|
||||||
RUN python3 -m pip install pytest
|
RUN python3 -m pip install pytest
|
||||||
@@ -22,13 +13,17 @@ RUN mkdir /var/run/sshd \
|
|||||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
ARG mscpdir="/mscp"
|
||||||
|
|
||||||
|
COPY . ${mscpdir}
|
||||||
|
|
||||||
# install build dependency
|
# install build dependency
|
||||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||||
|
|
||||||
# build
|
# build
|
||||||
RUN cd ${mscpdir} \
|
RUN cd ${mscpdir} \
|
||||||
&& rm -rf build \
|
&& rm -rf build \
|
||||||
&& cmake -B build \
|
&& cmake -B build \
|
||||||
&& cd ${mscpdir}/build \
|
&& cd ${mscpdir}/build \
|
||||||
&& make \
|
&& make \
|
||||||
&& cpack -G RPM CPackConfig.cmake \
|
&& cpack -G RPM CPackConfig.cmake \
|
||||||
@@ -37,3 +32,4 @@ RUN cd ${mscpdir} \
|
|||||||
# install mscp python module
|
# install mscp python module
|
||||||
RUN cd ${mscpdir} \
|
RUN cd ${mscpdir} \
|
||||||
&& python3 setup.py install --user
|
&& python3 setup.py install --user
|
||||||
|
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ARG mscpdir="/mscp"
|
|
||||||
|
|
||||||
COPY . ${mscpdir}
|
|
||||||
|
|
||||||
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
|
|
||||||
@@ -21,6 +17,10 @@ RUN mkdir /var/run/sshd \
|
|||||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
|
||||||
|
ARG mscpdir="/mscp"
|
||||||
|
|
||||||
|
COPY . ${mscpdir}
|
||||||
|
|
||||||
# install build dependency
|
# install build dependency
|
||||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ARG mscpdir="/mscp"
|
|
||||||
|
|
||||||
COPY . ${mscpdir}
|
|
||||||
|
|
||||||
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
|
|
||||||
@@ -20,6 +16,9 @@ RUN mkdir /var/run/sshd \
|
|||||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||||
|
|
||||||
|
ARG mscpdir="/mscp"
|
||||||
|
|
||||||
|
COPY . ${mscpdir}
|
||||||
|
|
||||||
# install build dependency
|
# install build dependency
|
||||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ case $platform in
|
|||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
gcc make cmake zlib1g-dev libssl-dev libkrb5-dev
|
gcc make cmake zlib1g-dev libssl-dev libkrb5-dev
|
||||||
;;
|
;;
|
||||||
Linux-centos* | Linux-rhel* | Linux-rocky*)
|
Linux-centos* | Linux-rhel* | Linux-rocky* | Linux-almalinux)
|
||||||
yum install -y \
|
yum install -y \
|
||||||
gcc make cmake zlib-devel openssl-devel rpm-build
|
gcc make cmake zlib-devel openssl-devel rpm-build
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ case $release in
|
|||||||
ubuntu-22.04*)
|
ubuntu-22.04*)
|
||||||
echo "libc6 (>= 2.33), libgssapi-krb5-2 (>= 1.17), libssl3 (>= 3.0.0~~alpha1), zlib1g (>= 1:1.1.4)"
|
echo "libc6 (>= 2.33), libgssapi-krb5-2 (>= 1.17), libssl3 (>= 3.0.0~~alpha1), zlib1g (>= 1:1.1.4)"
|
||||||
;;
|
;;
|
||||||
centos* | rhel* | rocky*)
|
centos* | rhel* | rocky* | almalinux*)
|
||||||
echo "glibc crypto-policies krb5-libs openssl-libs libcom_err"
|
echo "glibc crypto-policies krb5-libs openssl-libs libcom_err"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "unsupported install dependency: $release"
|
echo "$(basename $0): unsupported install dependency: $release"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user