Skip to content

Commit 6f3ac43

Browse files
authored
Merge pull request #27 from jfut/el10
2 parents eda343e + 3ca9669 commit 6f3ac43

File tree

7 files changed

+53
-47
lines changed

7 files changed

+53
-47
lines changed

.github/workflows/release.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ on:
55
tags:
66
- "v[0-9]+.[0-9]+.[0-9]+*"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
create-release:
10-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: write
1116

1217
steps:
1318
- name: Create Release
1419
id: create_release
15-
uses: actions/create-release@v1
20+
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
1621
env:
1722
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1823
with:
@@ -22,31 +27,36 @@ jobs:
2227
prerelease: false
2328

2429
release:
25-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-24.04
31+
permissions:
32+
contents: write
2633

2734
strategy:
35+
max-parallel: 20
2836
matrix:
2937
image:
30-
- centos-7
3138
- almalinux-8
3239
- almalinux-9
40+
- almalinux-10
3341

3442
env:
3543
BUILD_IMAGE: ${{ matrix.image }}
3644

3745
steps:
3846
- name: Checkout
39-
uses: actions/checkout@v2
47+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48+
4049
- name: Build RPM
4150
id: build_rpm
4251
run: |
4352
TAG_NAME=$(echo ${{ github.ref }} | sed -e 's|refs/tags/||g')
53+
echo "TAG_NAME=${TAG_NAME}" >> "$GITHUB_ENV"
4454
./redhat/build -t "${TAG_NAME}" "${BUILD_IMAGE/-/:}"
45-
echo "##[set-output name=release-tag;]${TAG_NAME}"
55+
4656
- name: Upload Assets
47-
uses: AButler/upload-release-assets@v2.0
57+
uses: AButler/upload-release-assets@3d6774fae0ed91407dc5ae29d576b166536d1777 # v3.0
4858
with:
4959
files: "redhat/rpmbuild/RPMS/x86_64/*.rpm;redhat/rpmbuild/SRPMS/*.rpm"
5060
repo-token: ${{ secrets.GITHUB_TOKEN }}
51-
release-tag: ${{ steps.build_rpm.outputs.release-tag }}
61+
release-tag: ${{ env.TAG_NAME }}
5262

.github/workflows/test.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,35 @@ on:
55
branches:
66
- "**"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
test:
10-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1114

1215
strategy:
16+
max-parallel: 20
1317
matrix:
1418
image:
15-
- centos-7
1619
- almalinux-8
1720
- almalinux-9
21+
- almalinux-10
1822

1923
env:
2024
BUILD_IMAGE: ${{ matrix.image }}
2125

2226
steps:
2327
- name: Checkout
24-
uses: actions/checkout@v2
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
2530
- name: Build RPM
2631
id: build_rpm
2732
run: |
2833
./redhat/build -t "${GITHUB_SHA}" "${BUILD_IMAGE/-/:}"
34+
2935
- name: Upload artifacts
30-
uses: actions/upload-artifact@v2
36+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3137
with:
3238
name: ${{ matrix.image }}
3339
path: redhat/rpmbuild/**/*.rpm

redhat/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ Usage:
1818
Options:
1919
-d Debug mode.
2020
-t Build target tag (default: latest)
21-
e.g.: v1.0.0, SHA_HASH
21+
e.g.: v1.0.0, v1.0.0-1, SHA_HASH
22+
23+
Build for RHEL/AlmaLinux/Rocky Linux 10:
24+
build -t vx.y.z almalinux:10
2225
2326
Build for RHEL/AlmaLinux/Rocky Linux 9:
2427
build -t vx.y.z almalinux:9
2528
2629
Build for RHEL/AlmaLinux/Rocky Linux 8:
2730
build -t vx.y.z almalinux:8
28-
29-
Build for RHEL/CentOS 7:
30-
build -t vx.y.z centos:7
3131
```
3232

3333
## Build RPM Packages with Docker

redhat/build

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ Usage:
2424
Options:
2525
-d Debug mode.
2626
-t Build target tag (default: latest)
27-
e.g.: v1.0.0, SHA_HASH
27+
e.g.: v1.0.0, v1.0.0-1, SHA_HASH
28+
29+
Build for RHEL/AlmaLinux/Rocky Linux 10:
30+
${PACKAGER} -t vx.y.z almalinux:10
2831
2932
Build for RHEL/AlmaLinux/Rocky Linux 9:
3033
${PACKAGER} -t vx.y.z almalinux:9
3134
3235
Build for RHEL/AlmaLinux/Rocky Linux 8:
3336
${PACKAGER} -t vx.y.z almalinux:8
34-
35-
Build for RHEL/CentOS 7:
36-
${PACKAGER} -t vx.y.z centos:7
3737
_EOF_
3838
}
3939

@@ -43,28 +43,26 @@ setup() {
4343
echo "# Build environment"
4444
local PACKAGE_NAME="$(basename ${GITHUB_REPOSITORY})"
4545
# Fix for release tag
46-
# 1.0.0
46+
# v1.0.0
4747
# -> PACKAGE_DIR_VERSION: 1.0.0
4848
# -> PACKAGE_VERSION: 1.0.0
49-
# -> PACKAGE_RELEASE: 1
50-
# v1.0.0-beta1-a
51-
# -> PACKAGE_DIR_VERSION: 1.0.0-beta1-a
52-
# -> PACKAGE_VERSION: 1.0.0.beta1.a
53-
# -> PACKAGE_RELEASE: 1
49+
# -> PACKAGE_RELEASE: 1 (default)
50+
# v1.0.1-2
51+
# -> PACKAGE_DIR_VERSION: 1.0.1
52+
# -> PACKAGE_VERSION: 1.0.1
53+
# -> PACKAGE_RELEASE: 2
5454
local PACKAGE_DIR_VERSION="$(echo ${BUILD_TAG} | sed 's/^v//')"
55-
local PACKAGE_VERSION="${PACKAGE_DIR_VERSION/-/.}"
56-
local PACKAGE_RELEASE="1"
55+
local PACKAGE_VERSION="$(echo "${PACKAGE_DIR_VERSION}" | sed 's/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')"
56+
local PACKAGE_RELEASE="$(echo "${PACKAGE_DIR_VERSION}" | sed 's/.*-\([0-9]\+\)$/\1/; t; s/.*/1/')"
5757
local PACKAGE_URL="https://github.com/${GITHUB_REPOSITORY}"
5858
local PACKAGE_SOURCE="${PACKAGE_URL}/archive/${BUILD_TAG}.tar.gz"
59-
local PACKAGE_CHANGELOG="* $(date "+%a %h %d %Y") GitHub Actions <${PACKAGE_NAME}@noreply.github.com> - ${PACKAGE_VERSION}-${PACKAGE_RELEASE}\n- Update to version ${PACKAGE_DIR_VERSION}"
6059

6160
echo "PACKAGE_NAME: ${PACKAGE_NAME}"
6261
echo "PACKAGE_DIR_VERSION: ${PACKAGE_DIR_VERSION}"
6362
echo "PACKAGE_VERSION: ${PACKAGE_VERSION}"
6463
echo "PACKAGE_RELEASE: ${PACKAGE_RELEASE}"
6564
echo "PACKAGE_URL: ${PACKAGE_URL}"
6665
echo "PACKAGE_SOURCE: ${PACKAGE_SOURCE}"
67-
echo "PACKAGE_CHANGELOG: ${PACKAGE_CHANGELOG}"
6866

6967
# Setup spec file
7068
echo "# Setup ${SPEC_FILE_NAME}"
@@ -76,7 +74,6 @@ setup() {
7674
sed -i -e "s|@PACKAGE_RELEASE@|${PACKAGE_RELEASE}|g" "${SPEC_FILE}"
7775
sed -i -e "s|@PACKAGE_URL@|${PACKAGE_URL}|g" "${SPEC_FILE}"
7876
sed -i -e "s|@PACKAGE_SOURCE@|${PACKAGE_SOURCE}|g" "${SPEC_FILE}"
79-
sed -i -e "s|@PACKAGE_CHANGELOG@|${PACKAGE_CHANGELOG}|g" "${SPEC_FILE}"
8077
}
8178

8279
build() {

redhat/build-rpm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ pushd "${RPMBUILD_DIR}"
2222
# RPM macros
2323
RPM_MACROS=/usr/lib/rpm/macros.d/macros.dist
2424
if [[ -f /etc/rpm/macros.dist ]]; then
25-
# el7 and el8
25+
# el8
2626
RPM_MACROS=/etc/rpm/macros.dist
2727
fi
28-
RPM_DIST=.$(egrep -o "^%el[0-9]*" "${RPM_MACROS}" | tr -d '%')
28+
RPM_DIST=.$(grep -E -o "^%el[0-9]*" "${RPM_MACROS}" | tr -d '%')
2929
echo "RPM_DIST: ${RPM_DIST} (${RPM_MACROS})"
3030

3131
# install dependencies
@@ -68,12 +68,12 @@ if [[ ! -d SOURCES ]]; then
6868
mkdir SOURCES
6969
fi
7070

71-
if [[ "${RPM_DIST}" = ".el9" ]]; then
71+
if [[ "${RPM_DIST}" = ".el8" ]]; then
72+
# el8
73+
spectool -g -A "SPECS/${SPEC_FILE_NAME}" -C SOURCES/
74+
else
7275
# el9 or later
7376
spectool -g -a "SPECS/${SPEC_FILE_NAME}" -C SOURCES/
74-
else
75-
# el7 or el8
76-
spectool -g -A "SPECS/${SPEC_FILE_NAME}" -C SOURCES/
7777
fi
7878

7979
echo "Building RPM:"

redhat/rpmbuild/SOURCES/mod_process_security.conf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
# This module requires MPM prefork and single thread mode
22

3-
# Red Hat Enterprise Linux 7 / CentOS 7
4-
#
5-
# Use prefork module
6-
#
7-
# - /etc/httpd/conf.modules.d/00-mpm.conf
8-
# LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
9-
10-
# Red Hat Enterprise Linux 8 / CentOS 8
11-
#
123
# Disable modules that requires multi-threaded mode
134
#
145
# - /etc/httpd/conf.modules.d/00-mpm.conf

redhat/rpmbuild/SPECS/mod_process_security.spec.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ rm -rf %{buildroot}
4747
%{_httpd_moddir}/mod_process_security.so
4848

4949
%changelog
50-
@PACKAGE_CHANGELOG@
50+
* Mon Jun 2 2025 Jun Futagawa <[email protected]> - 1.2.0-2
51+
- Drop RHEL/CentOS 7 support
52+
- Add support for RHEL/AlmaLinux/Rocky Linux 10
5153

5254
* Thu Jun 25 2020 Jun Futagawa <[email protected]> - 1.2.0-1
5355
- Update to version 1.2.0

0 commit comments

Comments
 (0)