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

This commit is contained in:
Raven 2024-02-28 14:54:46 +06:00
parent 7550b8ef73
commit 8b29ee9e88
13 changed files with 86 additions and 148 deletions

View File

@ -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 <denis@fateyev.com> - 1.0.4-2
- Rebuilt for epel7 compatibility
* Thu Jan 30 2020 Denis Fateyev <denis@fateyev.com> - 1.0.4-1
- Update to 1.0.4 release
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Aug 28 2019 Denis Fateyev <denis@fateyev.com> - 1.0.2-11
- Spec cleanup from deprecated items
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jun 04 2015 Denis Fateyev <denis@fateyev.com> - 1.0.2-1
- Update to 1.0.2 release
* Mon Feb 02 2015 Denis Fateyev <denis@fateyev.com> - 1.0.1-1
- Update to 1.0.1 release
* Sun Dec 21 2014 Denis Fateyev <denis@fateyev.com> - 1.0.0-1
- Initial Fedora RPM release

View File

@ -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 <raven@sysadmins.ws> - 6.7.1-1
* Wed Feb 28 2024 Raven <raven@sysadmins.ws> - 6.7.1-2
- fix rhel6 dependencies
* Wed Oct 4 2023 Raven <raven@sysadmins.ws> - 6.7.1-1
- Initial release

View File

@ -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 <raven@sysadmins.ws> - 1.0.0-1
- Initial release

View File

@ -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 <raven@sysadmins.ws> - 7.4.0p1-1
- update to 7.4.0p1
* Wed Oct 4 2023 Raven <raven@sysadmins.ws> - 7.3.1-1
- build with internal libtls
- update to 7.3.1