Drop libdb for RHEL>9
Related: rhbz#1781181
This commit is contained in:
parent
6be7a657b2
commit
53d4a00810
@ -91,10 +91,9 @@ index 59dc0de..9ba8752 100644
|
|||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
aliases(5), sendmail(8)
|
aliases(5), sendmail(8)
|
||||||
diff --git a/sendmail/sendmail.0 b/sendmail/sendmail.0
|
diff --git a/sendmail/sendmail.0 b/sendmail/sendmail.0
|
||||||
index 4227d16..2cb177d 100644
|
|
||||||
--- a/sendmail/sendmail.0
|
--- a/sendmail/sendmail.0
|
||||||
+++ b/sendmail/sendmail.0
|
+++ b/sendmail/sendmail.0
|
||||||
@@ -433,10 +433,10 @@ SENDMAIL(8) System Manager's Manual SENDMAIL(8)
|
@@ -433,10 +433,11 @@ SENDMAIL(8) System Manager's Manual SENDMAIL(8)
|
||||||
names are all specified in [4m/etc/mail/sendmail.cf[24m. Thus, these values
|
names are all specified in [4m/etc/mail/sendmail.cf[24m. Thus, these values
|
||||||
are only approximations.
|
are only approximations.
|
||||||
|
|
||||||
@ -104,14 +103,14 @@ index 4227d16..2cb177d 100644
|
|||||||
|
|
||||||
- /etc/mail/aliases.db
|
- /etc/mail/aliases.db
|
||||||
+ /etc/aliases.db
|
+ /etc/aliases.db
|
||||||
|
+ /etc/aliases.cdb
|
||||||
data base of alias names
|
data base of alias names
|
||||||
|
|
||||||
/etc/mail/sendmail.cf
|
/etc/mail/sendmail.cf
|
||||||
diff --git a/sendmail/sendmail.8 b/sendmail/sendmail.8
|
diff --git a/sendmail/sendmail.8 b/sendmail/sendmail.8
|
||||||
index 26685d0..60e7b64 100644
|
|
||||||
--- a/sendmail/sendmail.8
|
--- a/sendmail/sendmail.8
|
||||||
+++ b/sendmail/sendmail.8
|
+++ b/sendmail/sendmail.8
|
||||||
@@ -716,10 +716,10 @@ Thus,
|
@@ -716,10 +716,11 @@ Thus,
|
||||||
these values are only approximations.
|
these values are only approximations.
|
||||||
.PP
|
.PP
|
||||||
.TP
|
.TP
|
||||||
@ -121,6 +120,7 @@ index 26685d0..60e7b64 100644
|
|||||||
.TP
|
.TP
|
||||||
- /etc/mail/aliases.db
|
- /etc/mail/aliases.db
|
||||||
+ /etc/aliases.db
|
+ /etc/aliases.db
|
||||||
|
+ /etc/aliases.cdb
|
||||||
data base of alias names
|
data base of alias names
|
||||||
.TP
|
.TP
|
||||||
/etc/mail/sendmail.cf
|
/etc/mail/sendmail.cf
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
# The "mailer table" can be used to override routing for particular domains
|
# The "mailer table" can be used to override routing for particular domains
|
||||||
# (which are not in class {w}, i.e. local host names).
|
# (which are not in class {w}, i.e. local host names). Uncomment either
|
||||||
|
# "hash" or "cdb". The "hash" requires libdb. If there is no libdb, use "cdb".
|
||||||
#
|
#
|
||||||
# hash /etc/mail/mailertable
|
# hash /etc/mail/mailertable
|
||||||
|
# cdb /etc/mail/mailertable
|
||||||
#
|
#
|
||||||
# Keys in this database are fully qualified domain names or partial domains
|
# Keys in this database are fully qualified domain names or partial domains
|
||||||
# preceded by a dot -- for example, "vangogh.CS.Berkeley.EDU" or
|
# preceded by a dot -- for example, "vangogh.CS.Berkeley.EDU" or
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Generate db and cf files if necessary. This used to be handled by
|
# Generate db/cdb and cf files if necessary. This used to be handled by
|
||||||
# /etc/mail/Makefile.
|
# /etc/mail/Makefile.
|
||||||
|
|
||||||
teste() {
|
teste() {
|
||||||
@ -10,16 +10,16 @@ teste() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makedb() {
|
makedb() {
|
||||||
teste "${1%.db}"
|
teste "${1%.${DB_SUFFIX}}"
|
||||||
|
|
||||||
if [ -z "$SM_FORCE_DBREBUILD" ]; then
|
if [ -z "$SM_FORCE_DBREBUILD" ]; then
|
||||||
test "${1%.db}" -nt "$1" || return 0
|
test "${1%.${DB_SUFFIX}}" -nt "$1" || return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = userdb.db ]; then
|
if [ "$1" = userdb.db ]; then
|
||||||
makemap btree "$1" < "${1%.db}"
|
makemap btree "$1" < "${1%.db}"
|
||||||
else
|
else
|
||||||
makemap hash "$1" < "${1%.db}"
|
makemap "$DB_MAP" "$1" < "${1%.${DB_SUFFIX}}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,11 +34,11 @@ makealiasesdb() {
|
|||||||
if [ "$a" = /etc/aliases ]; then
|
if [ "$a" = /etc/aliases ]; then
|
||||||
# /etc/aliases.db may be used by other MTA, make sure nothing
|
# /etc/aliases.db may be used by other MTA, make sure nothing
|
||||||
# has touched it since our last newaliases call
|
# has touched it since our last newaliases call
|
||||||
test "$a" -nt "${a}.db" ||
|
test "$a" -nt "${a}.${DB_SUFFIX}" ||
|
||||||
test aliasesdb-stamp -nt "${a}.db" ||
|
test aliasesdb-stamp -nt "${a}.${DB_SUFFIX}" ||
|
||||||
test aliasesdb-stamp -ot "${a}.db" || continue
|
test aliasesdb-stamp -ot "${a}.${DB_SUFFIX}" || continue
|
||||||
else
|
else
|
||||||
test "$a" -nt "${a}.db" || continue
|
test "$a" -nt "${a}.${DB_SUFFIX}" || continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
uptodate=0
|
uptodate=0
|
||||||
@ -54,7 +54,7 @@ makealiasesdb() {
|
|||||||
if [ "$(readlink -e /usr/bin/newaliases)" = /usr/sbin/sendmail.sendmail ]
|
if [ "$(readlink -e /usr/bin/newaliases)" = /usr/sbin/sendmail.sendmail ]
|
||||||
then
|
then
|
||||||
/usr/bin/newaliases > /dev/null
|
/usr/bin/newaliases > /dev/null
|
||||||
touch -r /etc/aliases.db aliasesdb-stamp 2> /dev/null
|
touch -r /etc/aliases.$DB_SUFFIX aliasesdb-stamp 2> /dev/null
|
||||||
else
|
else
|
||||||
rm -f aliasesdb-stamp
|
rm -f aliasesdb-stamp
|
||||||
fi
|
fi
|
||||||
@ -83,16 +83,16 @@ makeall() {
|
|||||||
# These could be used by sendmail, but are not part of the default install.
|
# These could be used by sendmail, but are not part of the default install.
|
||||||
# To use them you will have to generate your own sendmail.cf with
|
# To use them you will have to generate your own sendmail.cf with
|
||||||
# FEATURE('whatever')
|
# FEATURE('whatever')
|
||||||
test -f bitdomain && makedb bitdomain.db
|
test -f bitdomain && makedb bitdomain.$DB_SUFFIX
|
||||||
test -f uudomain && makedb uudomain.db
|
test -f uudomain && makedb uudomain.$DB_SUFFIX
|
||||||
test -f genericstable && makedb genericstable.db
|
test -f genericstable && makedb genericstable.$DB_SUFFIX
|
||||||
test -f userdb && makedb userdb.db
|
test -f userdb && makedb userdb.$DB_SUFFIX
|
||||||
test -f authinfo && makedb authinfo.db
|
test -f authinfo && makedb authinfo.$DB_SUFFIX
|
||||||
|
|
||||||
makedb virtusertable.db
|
makedb virtusertable.$DB_SUFFIX
|
||||||
makedb access.db
|
makedb access.$DB_SUFFIX
|
||||||
makedb domaintable.db
|
makedb domaintable.$DB_SUFFIX
|
||||||
makedb mailertable.db
|
makedb mailertable.$DB_SUFFIX
|
||||||
|
|
||||||
makecf sendmail.cf
|
makecf sendmail.cf
|
||||||
makecf submit.cf
|
makecf submit.cf
|
||||||
@ -100,11 +100,20 @@ makeall() {
|
|||||||
|
|
||||||
cd /etc/mail || exit 1
|
cd /etc/mail || exit 1
|
||||||
|
|
||||||
|
if /usr/bin/makemap -l | grep -q hash
|
||||||
|
then
|
||||||
|
DB_MAP="hash"
|
||||||
|
DB_SUFFIX="db"
|
||||||
|
else
|
||||||
|
DB_MAP="cdb"
|
||||||
|
DB_SUFFIX="cdb"
|
||||||
|
fi
|
||||||
|
|
||||||
[ $# -eq 0 ] && makeall
|
[ $# -eq 0 ] && makeall
|
||||||
|
|
||||||
for target; do
|
for target; do
|
||||||
case "$target" in
|
case "$target" in
|
||||||
*.db)
|
*.db|*.cdb)
|
||||||
makedb "$target"
|
makedb "$target"
|
||||||
;;
|
;;
|
||||||
*.cf)
|
*.cf)
|
||||||
@ -117,7 +126,7 @@ for target; do
|
|||||||
makealiasesdb
|
makealiasesdb
|
||||||
;;
|
;;
|
||||||
clean)
|
clean)
|
||||||
rm -f *.db *~ aliasesdb-stamp
|
rm -f *.db *.cdb *~ aliasesdb-stamp
|
||||||
;;
|
;;
|
||||||
start|stop|restart)
|
start|stop|restart)
|
||||||
service sendmail "$target"
|
service sendmail "$target"
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
%if 0%{?rhel} < 10
|
||||||
|
%bcond_without db
|
||||||
|
%else
|
||||||
|
%bcond_with db
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with db}
|
||||||
|
%global db_suffix db
|
||||||
|
%else
|
||||||
|
%global db_suffix cdb
|
||||||
|
%endif
|
||||||
|
|
||||||
# package options
|
# package options
|
||||||
%global with_tls yes
|
%global with_tls yes
|
||||||
%global with_sasl2 yes
|
%global with_sasl2 yes
|
||||||
@ -29,7 +41,7 @@
|
|||||||
Summary: A widely used Mail Transport Agent (MTA)
|
Summary: A widely used Mail Transport Agent (MTA)
|
||||||
Name: sendmail
|
Name: sendmail
|
||||||
Version: 8.17.2
|
Version: 8.17.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: Sendmail
|
License: Sendmail
|
||||||
URL: http://www.sendmail.org/
|
URL: http://www.sendmail.org/
|
||||||
|
|
||||||
@ -96,7 +108,7 @@ Patch25: sendmail-8.17.2-qos.patch
|
|||||||
Patch26: sendmail-8.17.1-libmilter-socket-activation.patch
|
Patch26: sendmail-8.17.1-libmilter-socket-activation.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: libdb-devel
|
%{?with_db:BuildRequires: libdb-devel}
|
||||||
%if "%{with_nis}" == "yes"
|
%if "%{with_nis}" == "yes"
|
||||||
BuildRequires: libnsl2-devel
|
BuildRequires: libnsl2-devel
|
||||||
%endif
|
%endif
|
||||||
@ -119,11 +131,13 @@ BuildRequires: setup >= 2.5.31-1
|
|||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
%endif
|
%endif
|
||||||
%if "%{with_sasl2}" == "yes"
|
%if "%{with_sasl2}" == "yes"
|
||||||
BuildRequires: cyrus-sasl-devel openssl-devel
|
BuildRequires: cyrus-sasl-devel
|
||||||
|
BuildRequires: openssl-devel
|
||||||
Requires: %{_sbindir}/saslauthd
|
Requires: %{_sbindir}/saslauthd
|
||||||
%endif
|
%endif
|
||||||
%if "%{with_ldap}" == "yes"
|
%if "%{with_ldap}" == "yes"
|
||||||
BuildRequires: openldap-devel openssl-devel
|
BuildRequires: openldap-devel
|
||||||
|
BuildRequires: openssl-devel
|
||||||
%endif
|
%endif
|
||||||
# Old NetworkManager expects the dispatcher scripts in a different place
|
# Old NetworkManager expects the dispatcher scripts in a different place
|
||||||
Conflicts: NetworkManager < 1.20
|
Conflicts: NetworkManager < 1.20
|
||||||
@ -216,11 +230,11 @@ sed -i 's|/usr/local/bin/perl|%{_bindir}/perl|' contrib/*.pl
|
|||||||
%set_build_flags
|
%set_build_flags
|
||||||
# generate redhat config file
|
# generate redhat config file
|
||||||
cat > redhat.config.m4 << EOF
|
cat > redhat.config.m4 << EOF
|
||||||
define(\`confMAPDEF', \`-DNEWDB -DCDB %{?nis_cflags} -DMAP_REGEX -DSOCKETMAP -DNAMED_BIND=1')
|
define(\`confMAPDEF', \`%{?with_db:-DNEWDB }-DCDB %{?nis_cflags} -DMAP_REGEX -DSOCKETMAP -DNAMED_BIND=1')
|
||||||
define(\`confOPTIMIZE', \`\`\`\`${CFLAGS}'''')
|
define(\`confOPTIMIZE', \`\`\`\`${CFLAGS}'''')
|
||||||
define(\`confENVDEF', \`-I%{_includedir}/libdb -I%{_prefix}/kerberos/include -Wall -DXDEBUG=0 -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_LINUX_MHNL -D_FFR_QOS -D_FILE_OFFSET_BITS=64 -DHAS_GETHOSTBYNAME2 -DHASFLOCK')
|
define(\`confENVDEF', \`%{?with_db:-I%{_includedir}/libdb }-I%{_prefix}/kerberos/include -Wall -DXDEBUG=0 -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_LINUX_MHNL -D_FFR_QOS -D_FILE_OFFSET_BITS=64 -DHAS_GETHOSTBYNAME2 -DHASFLOCK')
|
||||||
define(\`confLIBDIRS', \`-L%{_prefix}/kerberos/%{_lib}')
|
define(\`confLIBDIRS', \`-L%{_prefix}/kerberos/%{_lib}')
|
||||||
define(\`confLIBS', \`%{?nis_ldadd} -lcrypt -ldb -lcdb -lresolv')
|
define(\`confLIBS', \`%{?nis_ldadd} -lcrypt %{?with_db:-ldb }-lcdb -lresolv')
|
||||||
%{?_hardened_build:define(\`confLDOPTS', \`${LDFLAGS}')}
|
%{?_hardened_build:define(\`confLDOPTS', \`${LDFLAGS}')}
|
||||||
define(\`confMANOWN', \`root')
|
define(\`confMANOWN', \`root')
|
||||||
define(\`confMANGRP', \`root')
|
define(\`confMANGRP', \`root')
|
||||||
@ -230,7 +244,7 @@ define(\`confMAN5SRC', \`5')
|
|||||||
define(\`confMAN8SRC', \`8')
|
define(\`confMAN8SRC', \`8')
|
||||||
define(\`confSTDIR', \`%{stdir}')
|
define(\`confSTDIR', \`%{stdir}')
|
||||||
define(\`STATUS_FILE', \`%{stdir}/statistics')
|
define(\`STATUS_FILE', \`%{stdir}/statistics')
|
||||||
define(\`confLIBSEARCH', \`db resolv 44bsd')
|
define(\`confLIBSEARCH', \`%{?with_db:db }cdb resolv 44bsd')
|
||||||
define(\`confCC', \`${CC}')
|
define(\`confCC', \`${CC}')
|
||||||
EOF
|
EOF
|
||||||
#'
|
#'
|
||||||
@ -383,6 +397,9 @@ rm -f %{buildroot}%{sendmailcf}/cf/README
|
|||||||
|
|
||||||
# install sendmail.mc with proper paths
|
# install sendmail.mc with proper paths
|
||||||
install -m 644 %{SOURCE6} %{buildroot}%{maildir}/sendmail.mc
|
install -m 644 %{SOURCE6} %{buildroot}%{maildir}/sendmail.mc
|
||||||
|
%if %{without db}
|
||||||
|
sed -i 's/\bhash\b/cdb/g;s/\.db\b/.%{db_suffix}/g' %{buildroot}%{maildir}/sendmail.mc
|
||||||
|
%endif
|
||||||
sed -i -e 's|@@PATH@@|%{sendmailcf}|' %{buildroot}%{maildir}/sendmail.mc
|
sed -i -e 's|@@PATH@@|%{sendmailcf}|' %{buildroot}%{maildir}/sendmail.mc
|
||||||
touch -r %{SOURCE6} %{buildroot}%{maildir}/sendmail.mc
|
touch -r %{SOURCE6} %{buildroot}%{maildir}/sendmail.mc
|
||||||
|
|
||||||
@ -409,8 +426,8 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{maildir}/virtusertable
|
|||||||
|
|
||||||
# create db ghosts
|
# create db ghosts
|
||||||
for map in virtusertable access domaintable mailertable ; do
|
for map in virtusertable access domaintable mailertable ; do
|
||||||
touch %{buildroot}%{maildir}/${map}.db
|
touch %{buildroot}%{maildir}/${map}.%{db_suffix}
|
||||||
chmod 0644 %{buildroot}%{maildir}/${map}.db
|
chmod 0644 %{buildroot}%{maildir}/${map}.%{db_suffix}
|
||||||
done
|
done
|
||||||
|
|
||||||
touch %{buildroot}%{maildir}/aliasesdb-stamp
|
touch %{buildroot}%{maildir}/aliasesdb-stamp
|
||||||
@ -530,9 +547,9 @@ exit 0
|
|||||||
|
|
||||||
# Rebuild maps.
|
# Rebuild maps.
|
||||||
{
|
{
|
||||||
chown root %{_sysconfdir}/aliases.db %{maildir}/access.db \
|
chown root %{_sysconfdir}/aliases.%{db_suffix} %{maildir}/access.%{db_suffix} \
|
||||||
%{maildir}/mailertable.db %{maildir}/domaintable.db \
|
%{maildir}/mailertable.%{db_suffix} %{maildir}/domaintable.%{db_suffix} \
|
||||||
%{maildir}/virtusertable.db
|
%{maildir}/virtusertable.%{db_suffix}
|
||||||
SM_FORCE_DBREBUILD=1 %{maildir}/make
|
SM_FORCE_DBREBUILD=1 %{maildir}/make
|
||||||
SM_FORCE_DBREBUILD=1 %{maildir}/make aliases
|
SM_FORCE_DBREBUILD=1 %{maildir}/make aliases
|
||||||
} > /dev/null 2>&1
|
} > /dev/null 2>&1
|
||||||
@ -654,10 +671,10 @@ exit 0
|
|||||||
%config(noreplace) %{maildir}/virtusertable
|
%config(noreplace) %{maildir}/virtusertable
|
||||||
|
|
||||||
%ghost %{maildir}/aliasesdb-stamp
|
%ghost %{maildir}/aliasesdb-stamp
|
||||||
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/virtusertable.db
|
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/virtusertable.%{db_suffix}
|
||||||
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/access.db
|
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/access.%{db_suffix}
|
||||||
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/domaintable.db
|
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/domaintable.%{db_suffix}
|
||||||
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/mailertable.db
|
%ghost %attr(0640, root,root) %verify(not md5 size mtime) %{maildir}/mailertable.%{db_suffix}
|
||||||
|
|
||||||
%ghost %attr(0660, smmsp, smmsp) %verify(not md5 size mtime) %{spooldir}/clientmqueue/sm-client.st
|
%ghost %attr(0660, smmsp, smmsp) %verify(not md5 size mtime) %{spooldir}/clientmqueue/sm-client.st
|
||||||
|
|
||||||
@ -708,6 +725,10 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 2 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 8.17.2-4
|
||||||
|
- Drop libdb for RHEL>9
|
||||||
|
Related: rhbz#1781181
|
||||||
|
|
||||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.17.2-3
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.17.2-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user