Skip to content

Commit 564f408

Browse files
authored
Merge pull request syslog-ng#5227 from HofiOne/fix-fedora-rawhide-packaging
Fix fedora rawhide packaging
2 parents 6cad7f4 + bacc0c6 commit 564f408

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

dbld/packages.manifest

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dh-autoreconf [debian, ubuntu]
3434
dh-exec [debian, ubuntu]
3535
dpkg-dev [debian, ubuntu]
3636
equivs [debian, ubuntu]
37+
gperf [fedora]
3738
libdistro-info-perl [debian, ubuntu]
3839
make [centos, almalinux, fedora]
3940
rpm-build [centos, almalinux, fedora]

dbld/rpm

+17
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,25 @@ function copy_rpm_packaging_src_files_to_build_folder() {
1717
find /build/syslog-ng-${VERSION}/packaging/rhel/ -type f | grep --invert-match '\.spec$' | xargs -i cp {} /build/
1818
}
1919

20+
function patch_source()
21+
{
22+
# fedora-rawhide latest has a new gcc 15, the old bison headers are not compatible with it
23+
if [[ "${IMAGE_PLATFORM}" == "fedora-rawhide" ]]; then
24+
echo "Pathing ${IMAGE_PLATFORM} sources..."
25+
pushd /build/syslog-ng-${VERSION}
26+
# Consider adding a reusable, proper patching mechanism in the future, e.g.
27+
#patch -p1 < /build/syslog-ng-${VERSION}/packaging/rhel/syslog-ng-3.35.1-bison-3.8.patch
28+
sudo sed -i '/#define BSON_NORETURN/{N;/#endif/a\
29+
#undef BSON_NORETURN\
30+
#define BSON_NORETURN
31+
}' /usr/include/libbson-1.0/bson/bson-macros.h
32+
popd
33+
fi
34+
}
35+
2036
function prepare_source() {
2137
copy_rpm_packaging_src_files_to_build_folder
38+
patch_source
2239
cp syslog-ng-${VERSION}.tar.gz $RPMBUILD_SOURCES
2340
}
2441

packaging/rhel/syslog-ng.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Summary: Next-generation syslog server
55

66
Group: System Environment/Daemons
77
License: GPLv2+
8-
URL: http://www.balabit.com/network-security/syslog-ng
8+
URL: http://syslog-ng.com
99
Source0: https://github.com/syslog-ng/syslog-ng/releases/download/syslog-ng-%{version}/%{name}-%{version}.tar.gz
1010
Source1: syslog-ng.conf
1111
Source2: syslog-ng.logrotate

0 commit comments

Comments
 (0)