Skip to content

Commit

Permalink
2.2.15
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Jul 22, 2024
1 parent 3ece144 commit 29cca8f
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 4 deletions.
156 changes: 153 additions & 3 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,148 @@ jobs:
path: /tmp/linupdate-test-build-${{ env.VERSION }}.noarch.rpm
retention-days: 1

# Try to install packages on CentOS 7
install-centos7:
name: Install on CentOS 7
needs:
build-rpm
runs-on: ubuntu-latest
container:
image: centos:7
options: --user root
env:
# Force to use node16 (for actions/checkout@v3)
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get linupdate version
run: echo "VERSION=$(cat ${GITHUB_WORKSPACE}/version)" >> $GITHUB_ENV

- name: Install CentOS7 archive repositories
run: |
rm /etc/yum.repos.d/* -f
echo "[os]
name=os repo
baseurl=https://vault.centos.org/7.9.2009/os/x86_64/
enabled=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
gpgcheck=1" > /etc/yum.repos.d/os.repo
echo "[extras]
name=extras repo
baseurl=https://vault.centos.org/7.9.2009/extras/x86_64/
enabled=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
gpgcheck=1" > /etc/yum.repos.d/extras.repo
echo "[updates]
name=updates repo
baseurl=https://vault.centos.org/7.9.2009/updates/x86_64/
enabled=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
gpgcheck=1" > /etc/yum.repos.d/updates.repo
echo "[epel]
name=epel repo
baseurl=https://dl.fedoraproject.org/pub/epel/7/x86_64/
enabled=1
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
gpgcheck=1" > /etc/yum.repos.d/epel.repo
yum clean all
# Download builded deb package artifact
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Install package
run: yum --nogpgcheck localinstall -y ./linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Test some params
run: |
/opt/linupdate/linupdate --help
/opt/linupdate/linupdate --version
/opt/linupdate/linupdate --check-updates
/opt/linupdate/linupdate --profile container
/opt/linupdate/linupdate --env test
# Try to install packages on RockyLinux 8
install-rockylinux8:
name: Install on RockyLinux 8
needs:
build-rpm
runs-on: ubuntu-latest
container:
image: rockylinux/rockylinux:8
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get linupdate version
run: echo "VERSION=$(cat ${GITHUB_WORKSPACE}/version)" >> $GITHUB_ENV

- name: Install EPEL repository
run: dnf install epel-release glibc-langpack-en -y

# Download builded deb package artifact
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Install package
run: yum --nogpgcheck localinstall -y ./linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Test some params
run: |
/opt/linupdate/linupdate --help
/opt/linupdate/linupdate --version
/opt/linupdate/linupdate --check-updates
/opt/linupdate/linupdate --profile container
/opt/linupdate/linupdate --env test
# Try to install packages on RockyLinux 9
install-rockylinux9:
name: Install on RockyLinux 9
needs:
build-rpm
runs-on: ubuntu-latest
container:
image: rockylinux/rockylinux:9
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get linupdate version
run: echo "VERSION=$(cat ${GITHUB_WORKSPACE}/version)" >> $GITHUB_ENV

- name: Install EPEL repository
run: dnf install epel-release glibc-langpack-en -y

# Download builded deb package artifact
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Install package
run: yum --nogpgcheck localinstall -y ./linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Test some params
run: |
/opt/linupdate/linupdate --help
/opt/linupdate/linupdate --version
/opt/linupdate/linupdate --check-updates
/opt/linupdate/linupdate --profile container
/opt/linupdate/linupdate --env test
# Try to install packages on latest Fedora
install-fedora:
Expand All @@ -118,14 +260,22 @@ jobs:
- name: Get linupdate version
run: echo "VERSION=$(cat ${GITHUB_WORKSPACE}/version)" >> $GITHUB_ENV

- name: Install dependencies packages
run: dnf install glibc-langpack-en -y

# Download builded deb package artifact
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Install package
run: dnf --nogpgcheck localinstall -y ./linupdate-test-build-${{ env.VERSION }}.noarch.rpm

- name: Test some params
run: |
dnf update -y
dnf clean all
dnf --nogpgcheck localinstall -y ./linupdate-test-build-${{ env.VERSION }}.noarch.rpm
/opt/linupdate/linupdate --help
/opt/linupdate/linupdate --version
/opt/linupdate/linupdate --check-updates
/opt/linupdate/linupdate --profile container
/opt/linupdate/linupdate --env test
6 changes: 5 additions & 1 deletion mods-available/reposerver.mod
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,11 @@ function send_available_packages_status
# Cas Redhat
if [ "$OS_FAMILY" == "Redhat" ];then
# Récupération des paquets disponibles pour mise à jour
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --pkgnarrow=updates > "$AVAILABLE_PACKAGES_TMP"
if [ -f "/usr/bin/dnf" ];then
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --upgrades >> "$CHECK_UPDATE_TMP"
else
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --pkgnarrow=updates > "$CHECK_UPDATE_TMP"
fi
fi
# Cas Debian
if [ "$OS_FAMILY" == "Debian" ];then
Expand Down

0 comments on commit 29cca8f

Please sign in to comment.