mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
add rocky 8.6 support
This commit is contained in:
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -36,3 +36,4 @@ jobs:
|
||||
${{github.workspace}}/build/mscp_${{env.VERSION}}-ubuntu-20.04-x86_64.deb
|
||||
${{github.workspace}}/build/mscp_${{env.VERSION}}-ubuntu-22.04-x86_64.deb
|
||||
${{github.workspace}}/build/mscp_${{env.VERSION}}-centos-8-x86_64.rpm
|
||||
${{github.workspace}}/build/mscp_${{env.VERSION}}-rocky-8.6-x86_64.rpm
|
||||
|
||||
@@ -105,12 +105,23 @@ if(BUILD_PKG)
|
||||
COMMAND docker run --rm -v ${CMAKE_BINARY_DIR}:/out mscp-centos:8
|
||||
cp /mscp/build/mscp_${PROJECT_VERSION}-centos-8-${ARCH}.rpm /out/)
|
||||
|
||||
# Rocky 8.6
|
||||
add_custom_target(package-rocky-8.6-in-docker
|
||||
COMMENT "Build mscp in rocky 8.6 docker container"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND docker build -t mscp-rocky:8.6 -f docker/rocky-8.6.Dockerfile .
|
||||
COMMAND docker run --init --rm mscp-rocky:8.6
|
||||
/mscp/scripts/test-in-container.sh
|
||||
COMMAND docker run --rm -v ${CMAKE_BINARY_DIR}:/out mscp-rocky:8.6
|
||||
cp /mscp/build/mscp_${PROJECT_VERSION}-rocky-8.6-${ARCH}.rpm /out/)
|
||||
|
||||
# build on all conatiners
|
||||
add_custom_target(package-all-in-docker
|
||||
COMMENT "Build mscp in all docker containers"
|
||||
DEPENDS package-ubuntu-20.04-in-docker
|
||||
DEPENDS package-ubuntu-22.04-in-docker
|
||||
DEPENDS package-centos-8-in-docker)
|
||||
DEPENDS package-centos-8-in-docker
|
||||
DEPENDS package-rocky-8.6-in-docker)
|
||||
|
||||
endif() # BUILD_PKG
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ 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-centos:8 -f docker/centos-8.Dockerfile .
|
||||
|
||||
docker build -t mscp-rocky:8.6 -f docker/rocky-8.6.Dockerfile .
|
||||
```
|
||||
|
||||
Test `mscp` in the containers.
|
||||
@@ -19,6 +21,8 @@ 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-centos:8 /mscp/scripts/test-in-container.sh
|
||||
|
||||
docker run --init --rm mscp-rocky:8.6 /mscp/scripts/test-in-container.sh
|
||||
```
|
||||
|
||||
Retrieve deb/rpm packages.
|
||||
@@ -32,6 +36,9 @@ docker run --rm -v (pwd):/out mscp-ubuntu:22.04 \
|
||||
|
||||
docker run --rm -v (pwd):/out mscp-centos:8 \
|
||||
cp /mscp/build/mscp_0.0.0-centos-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.
|
||||
30
docker/rocky-8.6.Dockerfile
Normal file
30
docker/rocky-8.6.Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM rockylinux:8.6
|
||||
|
||||
ARG mscpdir="/mscp"
|
||||
|
||||
COPY . ${mscpdir}
|
||||
|
||||
# install numpy and pytest, sshd for test, and rpm-build
|
||||
RUN set -ex && yum -y update && yum -y install \
|
||||
python3 python3-pip openssh openssh-server openssh-clients rpm-build
|
||||
|
||||
RUN python3 -m pip install numpy pytest
|
||||
|
||||
|
||||
# preparation for sshd
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& ssh-keygen -A \
|
||||
&& ssh-keygen -f /root/.ssh/id_rsa -N "" \
|
||||
&& mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
# install build dependency
|
||||
RUN ${mscpdir}/scripts/install-build-deps.sh
|
||||
|
||||
# build
|
||||
RUN cd ${mscpdir} \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build -DBUILD_PKG=1 \
|
||||
&& cd ${mscpdir}/build \
|
||||
&& make \
|
||||
&& cpack -G RPM CPackConfig.cmake
|
||||
|
||||
@@ -9,8 +9,8 @@ case $ID in
|
||||
ubuntu*)
|
||||
apt-get install -y gcc make cmake libssh-dev
|
||||
;;
|
||||
centos* | rhel*)
|
||||
dnf install -y gcc make cmake libssh-devel rpm-build
|
||||
centos* | rhel* | rocky*)
|
||||
yum install -y gcc make cmake libssh-devel rpm-build
|
||||
;;
|
||||
*)
|
||||
echo "unsupported dependency install: $ID"
|
||||
|
||||
@@ -17,7 +17,7 @@ case $ID in
|
||||
pkg=mscp_${project_version}-${ID}-${VERSION_ID}-${arch}.deb
|
||||
dpkg -i ../build/$pkg
|
||||
;;
|
||||
centos* | rhel*)
|
||||
centos* | rhel* | rocky*)
|
||||
pkg=mscp_${project_version}-${ID}-${VERSION_ID}-${arch}.rpm
|
||||
rpm -iv ../build/$pkg
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user