Subpackage python2-libuser has been removed
This commit is contained in:
parent
d3584f0e80
commit
b7b3dd1120
89
libuser.spec
89
libuser.spec
@ -1,19 +1,28 @@
|
||||
Name: libuser
|
||||
Version: 0.62
|
||||
Release: 22%{?dist}
|
||||
Release: 23%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: https://pagure.io/libuser
|
||||
Source: http://releases.pagure.org/libuser/libuser-%{version}.tar.xz
|
||||
BuildRequires: glib2-devel, linuxdoc-tools, pam-devel, popt-devel, python2-devel
|
||||
BuildRequires: cyrus-sasl-devel, libselinux-devel, openldap-devel, python3-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: linuxdoc-tools
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: popt-devel
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: openldap-devel
|
||||
BuildRequires: python3-devel
|
||||
# To make sure the configure script can find it
|
||||
BuildRequires: nscd
|
||||
BuildRequires: gcc
|
||||
# For %%check
|
||||
BuildRequires: fakeroot, openldap-clients, openldap-servers, openssl
|
||||
BuildRequires: fakeroot
|
||||
BuildRequires: openldap-clients
|
||||
BuildRequires: openldap-servers
|
||||
BuildRequires: openssl
|
||||
Summary: A user and group account administration library
|
||||
|
||||
%global __provides_exclude_from ^(%{_libdir}/%{name}|%{python2_sitearch}|%{python3_sitearch})/.*$
|
||||
%global __provides_exclude_from ^(%{_libdir}/%{name}|%{python3_sitearch})/.*$
|
||||
|
||||
# Patch to address format-security.
|
||||
# Submitted upstream at https://pagure.io/libuser/pull-request/17
|
||||
@ -36,23 +45,12 @@ Requires: glib2-devel%{?_isa}
|
||||
The libuser-devel package contains header files, static libraries, and other
|
||||
files useful for developing applications with libuser.
|
||||
|
||||
%package -n python2-libuser
|
||||
%{?python_provide:%python_provide python2-libuser}
|
||||
# Remove before F30
|
||||
Provides: %{name}-python = %{version}-%{release}
|
||||
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-python < %{version}-%{release}
|
||||
Summary: Python 2 bindings for the libuser library
|
||||
Requires: libuser%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python2-libuser
|
||||
The libuser-python package contains the Python 2 bindings for
|
||||
the libuser library, which provides a Python 2 API for manipulating and
|
||||
administering user and group accounts.
|
||||
|
||||
%package python3
|
||||
Summary: Python 3 bindings for the libuser library
|
||||
Requires: libuser%{?_isa} = %{version}-%{release}
|
||||
Provides: python3-libuser = %{version}-%{release}
|
||||
Provides: python3-libuser%{?_isa} = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-libuser}
|
||||
|
||||
%description python3
|
||||
The libuser-python3 package contains the Python bindings for
|
||||
@ -60,57 +58,29 @@ the libuser library, which provides a Python 3 API for manipulating and
|
||||
administering user and group accounts.
|
||||
|
||||
%prep
|
||||
%setup -qc
|
||||
|
||||
pushd libuser-%{version}
|
||||
%setup -qn libuser-%{version}
|
||||
%patch1 -p1
|
||||
popd
|
||||
|
||||
mv libuser-%{version} python2
|
||||
cp -a python2 python3
|
||||
|
||||
pushd python2
|
||||
cp -pr COPYING AUTHORS NEWS README TODO docs ..
|
||||
popd
|
||||
|
||||
|
||||
%build
|
||||
pushd python2
|
||||
%configure --with-selinux --with-ldap --with-html-dir=%{_datadir}/gtk-doc/html \
|
||||
PYTHON=/usr/bin/python2
|
||||
PYTHON=%{python3}
|
||||
make
|
||||
popd
|
||||
|
||||
pushd python3
|
||||
%configure --with-selinux --with-ldap --with-html-dir=%{_datadir}/gtk-doc/html \
|
||||
PYTHON=/usr/bin/python3
|
||||
make
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
# There should not be any Python dependencies in the common files; install the
|
||||
# python2 version second, just to be sure.
|
||||
make -C python3 install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
||||
make -C python2 install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
|
||||
make -C python2 check || { cat python2/test-suite.log; false; }
|
||||
# The Python 3 module only supports UTF-8
|
||||
LC_ALL=C.UTF-8 make -C python3 check \
|
||||
|| { cat python3/test-suite.log; false; }
|
||||
make check || { cat test-suite.log; false; }
|
||||
|
||||
# Verify that all python modules load, just in case.
|
||||
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}:${LD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH
|
||||
cd $RPM_BUILD_ROOT/%{python2_sitearch}
|
||||
python2 -c "import libuser"
|
||||
cd $RPM_BUILD_ROOT/%{python3_sitearch}
|
||||
# The Python 3 module only supports UTF-8
|
||||
LC_ALL=C.UTF-8 python3 -c "import libuser"
|
||||
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}
|
||||
export PYTHONPATH
|
||||
%{python3} -c "import libuser"
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
@ -132,13 +102,8 @@ LC_ALL=C.UTF-8 python3 -c "import libuser"
|
||||
%exclude %{_libdir}/*.la
|
||||
%exclude %{_libdir}/%{name}/*.la
|
||||
|
||||
%files -n python2-libuser
|
||||
%doc python2/python/modules.txt
|
||||
%{python2_sitearch}/*.so
|
||||
%exclude %{python2_sitearch}/*.la
|
||||
|
||||
%files python3
|
||||
%doc python3/python/modules.txt
|
||||
%doc python/modules.txt
|
||||
%{python3_sitearch}/*.so
|
||||
%exclude %{python3_sitearch}/*.la
|
||||
|
||||
@ -149,6 +114,10 @@ LC_ALL=C.UTF-8 python3 -c "import libuser"
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0.62-23
|
||||
- Subpackage python2-libuser has been removed
|
||||
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.62-22
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user