From 8b29ee9e886fafa146f66b74d95cbdab822c59bd Mon Sep 17 00:00:00 2001 From: Raven Date: Wed, 28 Feb 2024 14:54:46 +0600 Subject: [PATCH] opensmtpd: update to 7.4.0p1; put the directory structure in order; add opensmtpd-filter-spfgreylist package; move libasr to rhel6 repo due to epel --- base/opensmtpd/libasr.spec | 123 ------------------ .../libopensmtpd-fix-libdir.patch | 0 .../{ => libopensmtpd}/libopensmtpd.spec | 0 .../opensmtpd-extras.spec | 26 ++-- .../opensmtpd-filter-dkimsign.spec | 0 ...tpd-filter-rspamd-fix-go-sys-version.patch | 0 .../opensmtpd-filter-rspamd.spec | 0 .../opensmtpd-filter-senderscore.spec | 0 .../opensmtpd-filter-spfgreylist.spec | 60 +++++++++ base/opensmtpd/{ => opensmtpd}/opensmtpd.init | 0 base/opensmtpd/{ => opensmtpd}/opensmtpd.pam | 0 .../{ => opensmtpd}/opensmtpd.service | 0 base/opensmtpd/{ => opensmtpd}/opensmtpd.spec | 25 ++-- 13 files changed, 86 insertions(+), 148 deletions(-) delete mode 100644 base/opensmtpd/libasr.spec rename base/opensmtpd/{ => libopensmtpd}/libopensmtpd-fix-libdir.patch (100%) rename base/opensmtpd/{ => libopensmtpd}/libopensmtpd.spec (100%) rename base/opensmtpd/{ => opensmtpd-extras}/opensmtpd-extras.spec (85%) rename base/opensmtpd/{ => opensmtpd-filter-dkimsign}/opensmtpd-filter-dkimsign.spec (100%) rename base/opensmtpd/{ => opensmtpd-filter-rspamd}/opensmtpd-filter-rspamd-fix-go-sys-version.patch (100%) rename base/opensmtpd/{ => opensmtpd-filter-rspamd}/opensmtpd-filter-rspamd.spec (100%) rename base/opensmtpd/{ => opensmtpd-filter-senderscore}/opensmtpd-filter-senderscore.spec (100%) create mode 100644 base/opensmtpd/opensmtpd-filter-spfgreylist/opensmtpd-filter-spfgreylist.spec rename base/opensmtpd/{ => opensmtpd}/opensmtpd.init (100%) rename base/opensmtpd/{ => opensmtpd}/opensmtpd.pam (100%) rename base/opensmtpd/{ => opensmtpd}/opensmtpd.service (100%) rename base/opensmtpd/{ => opensmtpd}/opensmtpd.spec (98%) diff --git a/base/opensmtpd/libasr.spec b/base/opensmtpd/libasr.spec deleted file mode 100644 index 739a930..0000000 --- a/base/opensmtpd/libasr.spec +++ /dev/null @@ -1,123 +0,0 @@ - -## global prerelease 201412181500 - -Summary: Free, simple and portable asynchronous resolver library -Name: libasr -Version: 1.0.4 -Release: 2%{?prerelease:.%{prerelease}}%{?dist} - -License: BSD -URL: https://github.com/OpenSMTPD/libasr - -%if 0%{?prerelease} -Source0: http://www.opensmtpd.org/archives/%{name}-%{prerelease}.tar.gz -%else -Source0: http://www.opensmtpd.org/archives/%{name}-%{version}.tar.gz -%endif - -BuildRequires: gcc -BuildRequires: libevent-devel -%if 0%{?rhel} < 7 -BuildRequires: openssl3-devel -%else -BuildRequires: openssl-devel -%endif - -%description -Libasr allows to run DNS queries and perform hostname resolutions in a fully -asynchronous fashion. The implementation is thread-less, fork-less, and does not -make use of signals or other "tricks" that might get in the developer's way. -The API was initially developed for the OpenBSD operating system, where it is -natively supported. - -This library is intended to bring this interface to other systems. It is -originally provided as a support library for the portable version of the -OpenSMTPD daemon, but it can be used in any other contexts. - - -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -This package contains the header files and libraries for developing -with %{name}. - - -%prep -%setup -q %{?prerelease: -n %{name}-%{prerelease}} - -%build -%configure \ - --enable-shared \ - --disable-static \ - --with-mantype=man - -make %{?_smp_mflags} - -%install -make install DESTDIR=%{buildroot} -chmod 0755 %{buildroot}%{_libdir}/libasr.so.* -rm -f %{buildroot}%{_libdir}/*.la - -%ldconfig_scriptlets - - -%files -%doc ChangeLog README.md LICENCE -%{_libdir}/libasr.so.* - - -%files devel -%{_includedir}/asr.h -%{_libdir}/libasr.so - - -%changelog -* Fri Apr 10 2020 Denis Fateyev - 1.0.4-2 -- Rebuilt for epel7 compatibility - -* Thu Jan 30 2020 Denis Fateyev - 1.0.4-1 -- Update to 1.0.4 release - -* Wed Jan 29 2020 Fedora Release Engineering - 1.0.2-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Aug 28 2019 Denis Fateyev - 1.0.2-11 -- Spec cleanup from deprecated items - -* Thu Jul 25 2019 Fedora Release Engineering - 1.0.2-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 1.0.2-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.0.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 1.0.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 1.0.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.0.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.0.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Feb 04 2016 Fedora Release Engineering - 1.0.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 1.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Jun 04 2015 Denis Fateyev - 1.0.2-1 -- Update to 1.0.2 release - -* Mon Feb 02 2015 Denis Fateyev - 1.0.1-1 -- Update to 1.0.1 release - -* Sun Dec 21 2014 Denis Fateyev - 1.0.0-1 -- Initial Fedora RPM release diff --git a/base/opensmtpd/libopensmtpd-fix-libdir.patch b/base/opensmtpd/libopensmtpd/libopensmtpd-fix-libdir.patch similarity index 100% rename from base/opensmtpd/libopensmtpd-fix-libdir.patch rename to base/opensmtpd/libopensmtpd/libopensmtpd-fix-libdir.patch diff --git a/base/opensmtpd/libopensmtpd.spec b/base/opensmtpd/libopensmtpd/libopensmtpd.spec similarity index 100% rename from base/opensmtpd/libopensmtpd.spec rename to base/opensmtpd/libopensmtpd/libopensmtpd.spec diff --git a/base/opensmtpd/opensmtpd-extras.spec b/base/opensmtpd/opensmtpd-extras/opensmtpd-extras.spec similarity index 85% rename from base/opensmtpd/opensmtpd-extras.spec rename to base/opensmtpd/opensmtpd-extras/opensmtpd-extras.spec index ec9ea05..8d5132e 100644 --- a/base/opensmtpd/opensmtpd-extras.spec +++ b/base/opensmtpd/opensmtpd-extras/opensmtpd-extras.spec @@ -3,7 +3,7 @@ Summary: addons for the OpenSMTPD SMTP server Name: opensmtpd-extras Version: 6.7.1 -Release: 1%{?dist} +Release: 2%{?dist} License: ISC URL: http://www.opensmtpd.org/ @@ -28,17 +28,14 @@ BuildRequires: libevent-devel BuildRequires: python3-devel %global __py_name python3 %else -BuildRequires: automake1.16 autoconf2.69 m4_next +BuildRequires: automake1.16 autoconf2.69 m4 BuildRequires: libevent2-devel -BuildRequires: python38-devel -%global __py_name python3.8 +BuildRequires: python3.11-devel +%global __py_name python3.11 %endif -%if 0%{?rhel} < 9 -BuildRequires: openssl3-devel -%else -BuildRequires: openssl-devel -%endif +BuildRequires: pkgconfig(openssl) >= 3.0 + %if %{with luajit} BuildRequires: luajit-devel @@ -67,12 +64,6 @@ dependencies. %build export REDIS_CPPFLAGS='-I /usr/include/hiredis' -%if 0%{?rhel} == 6 -. /etc/profile.d/modules.sh -module load automake -module load autoconf -module load m4 -%endif %if 0%{?rhel} < 9 export CFLAGS="-I%{_includedir}/openssl3 -fPIC $CFLAGS" @@ -118,5 +109,8 @@ make install DESTDIR=%{buildroot} %changelog -* Wed Oct 4 2023 Raven - 6.7.1-1 +* Wed Feb 28 2024 Raven - 6.7.1-2 +- fix rhel6 dependencies + +* Wed Oct 4 2023 Raven - 6.7.1-1 - Initial release diff --git a/base/opensmtpd/opensmtpd-filter-dkimsign.spec b/base/opensmtpd/opensmtpd-filter-dkimsign/opensmtpd-filter-dkimsign.spec similarity index 100% rename from base/opensmtpd/opensmtpd-filter-dkimsign.spec rename to base/opensmtpd/opensmtpd-filter-dkimsign/opensmtpd-filter-dkimsign.spec diff --git a/base/opensmtpd/opensmtpd-filter-rspamd-fix-go-sys-version.patch b/base/opensmtpd/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd-fix-go-sys-version.patch similarity index 100% rename from base/opensmtpd/opensmtpd-filter-rspamd-fix-go-sys-version.patch rename to base/opensmtpd/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd-fix-go-sys-version.patch diff --git a/base/opensmtpd/opensmtpd-filter-rspamd.spec b/base/opensmtpd/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd.spec similarity index 100% rename from base/opensmtpd/opensmtpd-filter-rspamd.spec rename to base/opensmtpd/opensmtpd-filter-rspamd/opensmtpd-filter-rspamd.spec diff --git a/base/opensmtpd/opensmtpd-filter-senderscore.spec b/base/opensmtpd/opensmtpd-filter-senderscore/opensmtpd-filter-senderscore.spec similarity index 100% rename from base/opensmtpd/opensmtpd-filter-senderscore.spec rename to base/opensmtpd/opensmtpd-filter-senderscore/opensmtpd-filter-senderscore.spec diff --git a/base/opensmtpd/opensmtpd-filter-spfgreylist/opensmtpd-filter-spfgreylist.spec b/base/opensmtpd/opensmtpd-filter-spfgreylist/opensmtpd-filter-spfgreylist.spec new file mode 100644 index 0000000..2326c98 --- /dev/null +++ b/base/opensmtpd/opensmtpd-filter-spfgreylist/opensmtpd-filter-spfgreylist.spec @@ -0,0 +1,60 @@ +%global real_name filter-spfgreylist +%global debug_package %{nil} + +Summary: OpenSMTPD SPF-aware greylisting filter +Name: opensmtpd-%{real_name} +Version: 1.0.0 +Release: 1%{?dist} + +License: ISC +URL: https://github.com/poolpOrg/filter-spfgreylist + +Source0: https://github.com/poolpOrg/filter-spfgreylist/archive/refs/tags/v%{version}.tar.gz#/%{real_name}-%{version}.tar.gz + + + +BuildRequires: golang >= 1.17 +Requires: opensmtpd >= 6.6 +Provides: bundled(golang(blitiri.com.ar/go/spf)) = 1.5.1 + +%description +This filter implements greylisting, allowing OpenSMTPD to temporarily reject +sessions of clients it has not seen before. Unlike many implementations, +this one is SPF-aware so it will properly handle greylisting for domains +doing relaying through multiple MX, as long as they publish a valid SPF record. + + + +%prep +%autosetup -p1 -n %{real_name}-%{version} + +%build + +export CGO_CPPFLAGS="${CPPFLAGS}" +export CGO_CFLAGS="${CFLAGS}" +export CGO_CXXFLAGS="${CXXFLAGS}" +export CGO_LDFLAGS="${LDFLAGS}" +export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" +export GOPATH="`pwd`/.godeps" +#go env -w GO111MODULE=off +go build -o %{real_name} + + +%install +mkdir -p %{buildroot}/{%{_libexecdir}/opensmtpd,%{_mandir}/man8} +install -D %{real_name} -t %{buildroot}/%{_libexecdir}/opensmtpd + + +%files +%doc README.md +%if 0%{?rhel} >= 8 +%license LICENSE +%else +%doc LICENSE +%endif +%{_libexecdir}/opensmtpd/%{real_name} + + +%changelog +* Wed Feb 28 2024 Raven - 1.0.0-1 +- Initial release diff --git a/base/opensmtpd/opensmtpd.init b/base/opensmtpd/opensmtpd/opensmtpd.init similarity index 100% rename from base/opensmtpd/opensmtpd.init rename to base/opensmtpd/opensmtpd/opensmtpd.init diff --git a/base/opensmtpd/opensmtpd.pam b/base/opensmtpd/opensmtpd/opensmtpd.pam similarity index 100% rename from base/opensmtpd/opensmtpd.pam rename to base/opensmtpd/opensmtpd/opensmtpd.pam diff --git a/base/opensmtpd/opensmtpd.service b/base/opensmtpd/opensmtpd/opensmtpd.service similarity index 100% rename from base/opensmtpd/opensmtpd.service rename to base/opensmtpd/opensmtpd/opensmtpd.service diff --git a/base/opensmtpd/opensmtpd.spec b/base/opensmtpd/opensmtpd/opensmtpd.spec similarity index 98% rename from base/opensmtpd/opensmtpd.spec rename to base/opensmtpd/opensmtpd/opensmtpd.spec index 9f07904..20263ee 100644 --- a/base/opensmtpd/opensmtpd.spec +++ b/base/opensmtpd/opensmtpd/opensmtpd.spec @@ -10,7 +10,7 @@ Summary: Free implementation of the server-side SMTP protocol as defined by RFC 5321 Name: opensmtpd -Version: 7.3.0p2 +Version: 7.4.0p1 Release: 1%{?prerelease:.%{prerelease}}%{?dist} License: ISC @@ -95,23 +95,23 @@ back to Sendmail as a default mail daemon. export add_flags='' %if %{without libressl} && 0%{?rhel} < 9 -export add_flags="-I%{_includedir}/openssl3 " +export add_flags="-I%{_includedir}/openssl3" %endif + export CFLAGS="$add_flags %{optflags}" +%if 0%{?rhel} < 7 +export LDFLAGS="$LDFLAGS -lrt" +%endif %configure \ --sysconfdir=%{_sysconfdir}/opensmtpd \ --with-path-CAfile=%{_sysconfdir}/pki/tls/cert.pem \ - --with-mantype=man \ - %if 0%{?_with_pam} +%if 0%{?_with_pam} --with-auth-pam=smtp \ - %endif - %if 0%{?_with_bdb} +%endif +%if 0%{?_with_bdb} --with-table-db \ - %endif -%if %{without libressl} - --with-bundled-libtls \ %endif --with-user-smtpd=smtpd \ --with-user-queue=smtpq \ @@ -119,6 +119,10 @@ export CFLAGS="$add_flags %{optflags}" --with-path-mbox=%{_localstatedir}/spool/mail \ --with-path-empty=%{_localstatedir}/empty/smtpd \ --with-path-socket=%{_localstatedir}/run \ +%if %{with libressl} + --with-libssl=%{_includedir}/libressl \ +%endif + --without-libbsd \ --without-rpath make %{?_smp_mflags} @@ -318,6 +322,9 @@ exit 0 %changelog +* Wed Feb 28 2024 Raven - 7.4.0p1-1 +- update to 7.4.0p1 + * Wed Oct 4 2023 Raven - 7.3.1-1 - build with internal libtls - update to 7.3.1