Bug 1641386 - Review Request: pam-python - allows PAM modules to be written in Python
Summary: Review Request: pam-python - allows PAM modules to be written in Python
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2018-10-21 22:19 UTC by Alexander Naumov
Modified: 2020-05-01 23:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)

Description Alexander Naumov 2018-10-21 22:19:04 UTC
Spec URL: http://paste.opensuse.org/93133426
SRPM URL: https://download.opensuse.org/repositories/home:/Alexander_Naumov:/DEV-pam-accesscontrol/Fedora_28/src/pam-python-1.0.6-4.1.src.rpm
Description:pam_python is a PAM module that runs the Python interpreter, and so allows PAM modules to be written in Python.
Fedora Account System Username: anaumov

Hello,
my name is Alexander Naumov. I'm a pam-python maintainer for openSUSE/SUSE system, and I would like to (start) contribute to Fedoara/RedHat. This is my first experience with the Fedora build system.

This is my first package, and I'm seeking a sponsor.

https://copr.fedorainfracloud.org/coprs/anaumov/pam-python/

Cheers,
Alex

Comment 1 Robert-André Mauchin 🐧 2018-10-23 13:44:31 UTC
Hi and welcome to Fedora.

First problem:

 - Python 2 is deprecated in Fedora 30, would it be possible to build it with Python 3 instead? Otherwise this package won't be accepted as is. We don't accept anything Python 2 related anymore.


Your SPEC is rot really in line with the Guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/

I will go over the issues:

 - Group is not used in Fedora, neither is Buildroot: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections

 - Please add a comment for each patch explaining why they are needed:

Patch0:         not_null_argument_for_strcmp.patch
Patch1:         werror.patch

 - AGPL-3.0 is not a valid shorthand. See the list here: https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#SoftwareLicenses

License:        AGPLv3

 - Release is missing its dist tag:

Release:        1%{?dist}

 - %setup -q -n %{name}-%{version}
 
%patch0 -p1
%patch1 -p1

You could use %autosetup -p1

 - make -C src → %make_build

Although, reading the Makefile, I wonder if it would not be better to do

pushd src/
%py2_build
popd

That way it would respect Fedora build flags.

 - The install location is wrong, it should use %{_libdir}:

mkdir -p %{buildroot}/%{_libdir}/security

   And:

%{_libdir}/security/pam_python.so

 - make -C src install LIBDIR=%{buildroot}/%{_lib}/security → %make_install -C src LIBDIR=%{_libdir}/security

 - Not needed: %defattr(-,root,root)

 - The license must be installed with %license, not %doc

%license agpl-3.0.txt

 - Add the examples in %doc

%doc examples

 - Build the doc/ with Sphinx and add them to %doc

%doc doc/html

 - Add your %changelog entry

%changelog
* Tue Oct 23 2018 Alexander Naumov <posix.ru@gmail.com> - 1.0.6-1
- Initial release

 - Source0 is 404. It should be:

Source:         https://sourceforge.net/projects/%{name}/files/%{name}-%{version}-1/%{name}-%{version}.tar.gz

Comment 2 Robert-André Mauchin 🐧 2018-10-23 13:49:03 UTC
 - Also you're missing: 

BuildRequires:  gcc

Comment 3 Alexander Naumov 2018-10-26 21:54:09 UTC
Hi Robert,
thanks a lot for your review.
Unfortunately, it seems that at the moment it can't work without python2. Migration to python3 is "in progress", but it's not done right now.
https://sourceforge.net/p/pam-python/tickets/5/#f4bb

If it can't be accepted with python2 dependency, we should wait...

Thanks again.

Cheers,
Alex


Note You need to log in before you can comment on or make changes to this bug.