From e2c15b119f6cec6609524e526f4e949a97e07056 Mon Sep 17 00:00:00 2001 From: Miroslav Suchý Date: Aug 06 2010 07:37:30 +0000 Subject: initial import --- diff --git a/.gitignore b/.gitignore index e69de29..913abc2 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +PyPAM-0.5.0.tar.gz diff --git a/PyPAM-dlopen.patch b/PyPAM-dlopen.patch new file mode 100644 index 0000000..8cdf93a --- /dev/null +++ b/PyPAM-dlopen.patch @@ -0,0 +1,15 @@ +diff --git a/PAMmodule.c.orig b/PAMmodule.c +index f6730f1..7276415 100644 +--- a/PAMmodule.c.orig ++++ b/PAMmodule.c +@@ -149,8 +149,8 @@ static PyObject * PyPAM_pam(PyObject *self, PyObject *args) + Py_INCREF(Py_None); + p->user_data = Py_None; + +- p->dlh1 = dlopen("libpam.so", RTLD_LAZY | RTLD_GLOBAL); +- p->dlh2 = dlopen("libpam_misc.so", RTLD_LAZY | RTLD_GLOBAL); ++ p->dlh1 = dlopen("libpam.so.0", RTLD_LAZY | RTLD_GLOBAL); ++ p->dlh2 = dlopen("libpam_misc.so.0", RTLD_LAZY | RTLD_GLOBAL); + + return (PyObject *) p; + } diff --git a/PyPAM.spec b/PyPAM.spec new file mode 100644 index 0000000..f6cf887 --- /dev/null +++ b/PyPAM.spec @@ -0,0 +1,93 @@ +%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +Summary: PAM bindings for Python +Name: PyPAM +Version: 0.5.0 +Release: 7%{?dist} +Source0: http://www.pangalactic.org/PyPAM/%{name}-%{version}.tar.gz +Url: http://www.pangalactic.org/PyPAM +Patch0: PyPAM-dlopen.patch +License: LGPLv2 +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: python2-devel pam-devel +Requires: python +%filter_provides_in %{python_sitearch}/PAMmodule.so$ +%filter_setup + +%description +PAM (Pluggable Authentication Module) bindings for Python. + +%prep +%setup -q +%patch0 -p1 -b .dlopen +# remove prebuild rpm and others binaries +rm -rf build dist + +%build +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install --root=$RPM_BUILD_ROOT +# Make sure we don't include binary files in the docs +chmod 644 examples/pamtest.py +rm -f examples/pamexample + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root, -) +%{python_sitearch}/PAMmodule.so +%{python_sitearch}/*.egg-info +%doc AUTHORS NEWS README ChangeLog COPYING INSTALL +%doc examples + +%changelog +* Thu Aug 05 2010 Miroslav Suchý 0.5.0-7 +- 612998 - PyPAM do not work with python3 (msuchy@redhat.com) + +* Thu Aug 05 2010 Miroslav Suchý 0.5.0-6 +- 612998 - fix condition for BR (msuchy@redhat.com) + +* Thu Aug 05 2010 Miroslav Suchý 0.5.0-5 +- 612998 - return back BR for python + +* Thu Aug 05 2010 Miroslav Suchý 0.5.0-4 +- 612998 - remove binaries. Just in case +- 612998 - filter provide PAMmodule.so()(64bit) +- 612998 - do not use INSTALLED_FILES feature, and enumerate files manualy +- 612998 - use %%{__python} in %%build section +- 612998 - fix buildrequires for PyPAM +- 612998 - add macros for rhel5 + +* Fri Jul 09 2010 Miroslav Suchý 0.5.0-3 +- rebuild + +* Fri Jul 09 2010 Miroslav Suchý 0.5.0-2 +- rebase PyPAM-dlopen.patch to latest source + +* Fri Jul 09 2010 Miroslav Suchý 0.5.0-1 +- rebase to PyPAM 0.5.0 + +* Fri Mar 06 2009 Devan Goodwin 0.4.2-26 +- Fix bad patch whitespace. + +* Fri Feb 27 2009 Dennis Gilmore 0.4.2-25 +- rebuild to pick up ppc ppc64 ia64 arches + +* Fri Feb 27 2009 Devan Goodwin 0.4.2-23 +- Rebuild for new rel-eng tools. + +* Fri May 16 2008 Michael Mraka 0.4.2-20 +- fixed file ownership + +* Tue Jun 22 2004 Mihai Ibanescu 0.4.2-5 +- Rebuilt + +* Fri Jul 11 2003 Mihai Ibanescu +- Adapted the original rpm to build with python 2.2 diff --git a/sources b/sources index e69de29..afb68ef 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f1e7c2c56421dda28a75ace59a3c8871 PyPAM-0.5.0.tar.gz