Skip to content

Commit 1bbb090

Browse files
committed
Merge branch 'develop'
2 parents 40f2088 + def8c08 commit 1bbb090

File tree

4 files changed

+81
-60
lines changed

4 files changed

+81
-60
lines changed

.github/workflows/rpm-build.yaml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@ jobs:
1616
arch:
1717
- amd64
1818
target:
19-
- "rockylinux:8"
20-
- "rockylinux:9"
19+
- almalinux:8.9
20+
- almalinux:8.10
21+
- almalinux:9.4
22+
- almalinux:9.5
23+
- almalinux:9.6
2124

2225
steps:
26+
- name: Extract RHEL release
27+
run: |
28+
MINOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:[89]\.)\d+')
29+
MAJOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:)[89]')
30+
echo "RHEL_RELEASE=.el${MAJOR}_${MINOR}" >> $GITHUB_ENV
2331
- name: Checkout repo
2432
uses: actions/checkout@v4
2533
- name: Install prereq packages
@@ -49,12 +57,19 @@ jobs:
4957
arch:
5058
- amd64
5159
target:
52-
- "rockylinux:8"
53-
- "rockylinux:9"
60+
- almalinux:8.9
61+
- almalinux:8.10
62+
- almalinux:9.4
63+
- almalinux:9.5
64+
- almalinux:9.6
5465
needs: build
5566
steps:
5667
- name: Set environment variables for download
5768
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
69+
- name: Extract RHEL release
70+
run: |
71+
MAJOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:)[89]')
72+
echo "MAJOR=${MAJOR}" >> $GITHUB_ENV
5873
- name: Download artifact
5974
uses: actions/download-artifact@v4
6075
with:
@@ -65,10 +80,12 @@ jobs:
6580
run: |
6681
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.rpm.sh' | bash
6782
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.rpm.sh' | bash
68-
if [[ "${TARGET}" =~ rocky* ]]; then
69-
dnf install -y dnf-plugins-core epel-release || true
70-
dnf config-manager --set-enabled powertools || true
71-
/usr/bin/crb enable || true
83+
if [[ "${MAJOR}" == "8" ]]; then
84+
dnf config-manager --enable powertools || true
85+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || true
86+
elif [[ "${MAJOR}" == "9" ]]; then
87+
dnf config-manager --enable crb || true
88+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm || true
7289
fi
7390
- name: Test package install
7491
run: |
@@ -82,9 +99,8 @@ jobs:
8299
rpm -e libpacketdump4
83100
rpm -e libtrace4
84101
85-
86102
publish:
87-
runs-on: ubuntu-latest
103+
runs-on: ubuntu-22.04
88104
container:
89105
image: ${{ matrix.target }}
90106
strategy:
@@ -93,10 +109,18 @@ jobs:
93109
arch:
94110
- amd64
95111
target:
96-
- "rockylinux:8"
97-
- "rockylinux:9"
112+
- almalinux:8.9
113+
- almalinux:8.10
114+
- almalinux:9.4
115+
- almalinux:9.5
116+
- almalinux:9.6
98117
needs: test
99118
steps:
119+
- name: Set RHEL version number
120+
run: |
121+
MINOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:[89]\.)\d+')
122+
MAJOR=$(echo "${{ matrix.target }}" | grep -oP '(?<=almalinux:)[89]')
123+
echo "MAJOR={MAJOR}" >> $GITHUB_ENV
100124
- name: Set environment variables for download
101125
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
102126
- name: Download artifact
@@ -117,4 +141,3 @@ jobs:
117141
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
118142

119143

120-

rpm/libtrace4.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: libtrace4
22
Version: 4.0.28
3-
Release: 1%{?dist}
3+
Release: 2%{?rhel_release}
44
Summary: C Library for capturing and analysing network packets
55

66
License: LGPLv3
@@ -127,6 +127,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
127127

128128

129129
%changelog
130+
* Fri Jun 6 2025 Shane Alcock <shane@alcock.co.nz> - 4.0.28-2
131+
- Rebuild packages to be compatible with newer DPDK
132+
130133
* Mon Feb 17 2025 Shane Alcock <shane@alcock.co.nz> - 4.0.28-1
131134
- Updated for 4.0.28 release
132135

rpmpkg-build.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ set -x -e -o pipefail
55
export QA_RPATHS=$[ 0x0001 ]
66
SOURCENAME=`echo ${GITHUB_REF##*/} | cut -d '-' -f 1`
77

8+
rm -rf ~/rpmbuild/BUILD/*
9+
rm -rf ~/rpmbuild/RPMS/*
10+
811
./bootstrap.sh && ./configure && make dist
912
cp libtrace-*.tar.gz ~/rpmbuild/SOURCES/${SOURCENAME}.tar.gz
1013
cp rpm/libtrace4.spec ~/rpmbuild/SPECS/
11-
#cp rpm/libtrace4-dag.spec ~/rpmbuild/SPECS/
1214

13-
cd ~/rpmbuild && rpmbuild -bb --define "debug_package %{nil}" SPECS/libtrace4.spec
15+
if [[ -z "${RHEL_RELEASE:-}" ]]; then
16+
cd ~/rpmbuild && rpmbuild -bb --define "debug_package %{nil}" SPECS/libtrace4.spec
17+
else
18+
cd ~/rpmbuild && rpmbuild -bb --define "debug_package %{nil}" --define "rhel_release ${RHEL_RELEASE}" SPECS/libtrace4.spec
19+
fi
1420

15-
#if [[ "$1" =~ centos* ]]; then
16-
# cd ~/rpmbuild && rpmbuild -bb --define "debug_package %{nil}" SPECS/libtrace4-dag.spec
17-
#fi
1821

rpmpkg-setup.sh

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,39 @@
11
#!/bin/bash
22
set -x -e -o pipefail
33

4+
TARGET=$1
5+
6+
MAJOR=$(echo "${TARGET}" | grep -oP '(?<=almalinux:)[89]')
7+
MINOR=$(echo "${TARGET}" | grep -oP '(?<=almalinux:[89]\.)\d+')
8+
9+
if [[ "${MAJOR}" == "8" ]]; then
10+
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
11+
elif [[ "${MAJOR}" == "9" ]]; then
12+
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-9
13+
fi
414

515
mkdir -p /run/user/${UID}
616
chmod 0700 /run/user/${UID}
7-
yum install -y wget make gcc clang
17+
dnf install -y wget make gcc clang
18+
19+
dnf install -y dnf-plugins-core
20+
# Disable all repos first to avoid conflicts
21+
dnf config-manager --disable '*'
22+
23+
# Enable base AlmaLinux repos for the specific minor release
24+
dnf config-manager --enable baseos
25+
dnf config-manager --enable appstream
26+
27+
if [[ "$MAJOR" == "8" ]]; then
28+
dnf config-manager --enable powertools || true
29+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
30+
elif [[ "$MAJOR" == "9" ]]; then
31+
dnf config-manager --enable crb || true
32+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
33+
fi
34+
35+
dnf group install -y "Development Tools"
36+
dnf config-manager --set-enabled epel
837

938
curl -1sLf \
1039
'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.rpm.sh' \
@@ -14,46 +43,9 @@ curl -1sLf \
1443
'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.rpm.sh' \
1544
| bash
1645

17-
yum update -y
18-
19-
if [[ "$1" =~ rocky* ]]; then
20-
dnf install -y dnf-plugins-core epel-release || true
21-
dnf config-manager --set-enabled powertools || true
22-
if [ -x /usr/bin/crb ]; then
23-
/usr/bin/crb enable || true
24-
fi
25-
fi
46+
dnf makecache
2647

27-
if [[ "$1" =~ alma* ]]; then
28-
dnf install -y dnf-plugins-core epel-release || true
29-
dnf config-manager --set-enabled powertools || true
30-
if [ -x /usr/bin/crb ]; then
31-
/usr/bin/crb enable || true
32-
fi
33-
fi
34-
35-
36-
if [ "$1" = "centos:8" ]; then
37-
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || true
38-
dnf install -y 'dnf-command(config-manager)' || true
39-
yum config-manager --set-enabled PowerTools || true
40-
yum config-manager --set-enabled powertools || true
41-
fi
42-
43-
if [ "$1" = "centos:7" ]; then
44-
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm || true
45-
sed -i '/libfl-static/d' rpm/libtrace4.spec
46-
fi
47-
48-
if [[ "$1" =~ fedora* ]]; then
49-
dnf install -y rpm-build rpmdevtools 'dnf-command(builddep)' which
50-
dnf group install -y development-tools
51-
dnf builddep -y rpm/libtrace4.spec
52-
else
53-
yum install -y rpm-build yum-utils rpmdevtools which
54-
yum groupinstall -y 'Development Tools'
55-
yum-builddep -y rpm/libtrace4.spec
56-
#yum-builddep -y rpm/libtrace4-dag.spec
57-
fi
48+
dnf install -y rpm-build rpmdevtools 'dnf-command(builddep)' which
49+
dnf builddep -y rpm/libtrace4.spec
5850

5951
rpmdev-setuptree

0 commit comments

Comments
 (0)