diff --git a/389-ds-base.spec b/389-ds-base.spec index 9481bebe66d3796b2e5c9177146504a8442274ae..689140b278389ba042f8089484b36ccc5feb1c65 100644 --- a/389-ds-base.spec +++ b/389-ds-base.spec @@ -6,7 +6,7 @@ ExcludeArch: i686 Name: 389-ds-base Summary: Base 389 Directory Server Version: 1.4.0.31 -Release: 5 +Release: 6 License: GPLv3+ URL: https://www.port389.org Source0: https://releases.pagure.org/389-ds-base/389-ds-base-%{version}.tar.bz2 @@ -17,6 +17,7 @@ Source3: https://github.com/jemalloc/jemalloc/releases/download/5.2.0/jema Patch0: 0000-fix-compilation-failed.patch Patch1: CVE-2021-3652.patch Patch2: CVE-2021-3514.patch +Patch3: Fix-attributeError-type-object-build_manpages.patch BuildRequires: nspr-devel nss-devel >= 3.34 perl-generators openldap-devel libdb-devel cyrus-sasl-devel icu BuildRequires: libicu-devel pcre-devel cracklib-devel gcc-c++ net-snmp-devel lm_sensors-devel bzip2-devel @@ -362,6 +363,9 @@ exit 0 %{_mandir}/*/* %changelog +* Tue Feb 15 2022 xu_ping - 1.4.0.31-6 +- Fix attributeError + * Wed Sep 22 2021 liwu - 1.4.0.31-5 - fix CVE-2021-3652 CVE-2021-3514 diff --git a/Fix-attributeError-type-object-build_manpages.patch b/Fix-attributeError-type-object-build_manpages.patch new file mode 100644 index 0000000000000000000000000000000000000000..027970a2d8b0bbbf7309a87e05fd3d2c76da6931 --- /dev/null +++ b/Fix-attributeError-type-object-build_manpages.patch @@ -0,0 +1,49 @@ +From 7cee0c3184f948ff76a907cac007afc7a303169e Mon Sep 17 00:00:00 2001 +From: Viktor Ashirov +Date: Tue, 18 Jan 2022 13:24:53 +0100 +Subject: [PATCH] Issue 5115 - AttributeError: type object 'build_manpages' + has no attribute 'build_manpages' + +Bug Description: +Starting from v2.1, argparse-manpage provides methods build_manpages, +get_build_py_cmd and get_install_cmd in the top-level module. +This breaks installation of lib389 on systems with the newer version +of argparse-manpage. + +Fix Description: +Update setup.py to be aware of the module version and import methods +based on it. + +Fixes: https://github.com/389ds/389-ds-base/issues/5115 + +Reviewed by: @tbordaz, @mreynolds389 (Thanks!) +--- +src/lib389/setup.py | 8 +++++--- +1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/lib389/setup.py b/src/lib389/setup.py +index ce8b512..3f7947f 100644 +--- a/src/lib389/setup.py ++++ b/src/lib389/setup.py +@@ -14,7 +14,9 @@ + + from setuptools import setup, find_packages + from os import path +-from build_manpages import build_manpages ++import build_manpages as bm ++if bm.__version__ < '2.1': ++ from build_manpages import build_manpages as bm + from setuptools.command.build_py import build_py + from setuptools.command.install import install + +@@ -85,8 +87,8 @@ setup( + + cmdclass={ + # Dynamically build man pages for cli tools +- 'build_manpages': build_manpages.build_manpages, +- 'build_py': build_manpages.get_build_py_cmd(build_py), ++ 'build_manpages': bm.build_manpages, ++ 'build_py': bm.get_build_py_cmd(build_py), + } + + )