Bug 1012681 - Review Request: python-sgutils - Python wrapper for libsgutils
Review Request: python-sgutils - Python wrapper for libsgutils
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Meng
Fedora Extras Quality Assurance
Depends On:
Blocks: DebugInfo
  Show dependency treegraph
Reported: 2013-09-26 17:08 EDT by Andy Grover
Modified: 2013-10-18 02:34 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-18 02:34:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
i: fedora‑review+
limburgher: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Andy Grover 2013-09-26 17:08:24 EDT
Spec URL: http://fedorapeople.org/~grover/new/python-sgutils.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-sgutils-0.2.1-1.el6.src.rpm
Description: A Python module to wrap libsgutils
Fedora Account System Username: grover

Hi! This Python module wraps libsgutils, a C library that makes it easier for programs to send SCSI commands to attached SCSI devices and parse their response. I'm planning on making use of this in the SCSI target support, so I'd like to get the ball rolling and get the package reviewed. (I am the upstream developer of python-sgutils, but not libsgutils.)
Comment 1 Christopher Meng 2013-09-26 19:41:22 EDT
First question before review, will you have intention to support EL5?
Comment 2 Andy Grover 2013-09-26 20:02:54 EDT
Not my area of interest, but I don't see why not.
Comment 3 Christopher Meng 2013-09-26 22:01:09 EDT

You can drop support for EL5 as if it doesn't work well with 1.25 version.

So if you don't need to support EL5(I didn't mean EL6), remove:

BuildRoot tag;
rm -rf %{buildroot} in %install section;
Whole %clean section;
%defattr(-,root,root,-) in %files section.


Source:         %{name}-%{version}.tar.gz

Well, I think you should know pypi, if you think handling this is not perfect, release it to pypi.


BuildRequires:  python-devel

is deprecated and should use BuildRequires:  python2-devel now.


If you ONLY want to support Fedora ;) , please note that you should also(include above python-devel change):

%{__python} --> %{__python2}
%{python_sitearch} --> %{python2_sitearch}
Comment 4 Andy Grover 2013-09-27 15:55:14 EDT
Revised to 0.2.1-2:

Spec URL: http://fedorapeople.org/~grover/new/python-sgutils.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-sgutils-0.2.1-2.el6.src.rpm

Going to play it safe and keep EL6 compatibility for now.

w.r.t. Source, I decided to just host tarballs on fedorahosted.org, so that makes everything easy. May also post to pypi in the future, yes.
Comment 5 Christopher Meng 2013-09-28 11:31:21 EDT
Rpmlint (installed packages)
# rpmlint python-sgutils
python-sgutils.i686: E: explicit-lib-dependency sg3_utils-libs
python-sgutils.i686: E: non-standard-executable-perm /usr/lib/python2.7/site-packages/sgutils.so 0775L
1 packages and 0 specfiles checked; 2 errors, 2 warnings.

Let's see:

python-sgutils (rpmlib, GLIBC filtered):

So libsgutils2.so.2 is already included, please remove that dep in SPEC.

775 is weird, please contact with upstream and use chmod to fix it in SPEC.
Comment 6 Andy Grover 2013-09-30 14:02:06 EDT
Revised to 0.2.1-3:

Spec URL: http://fedorapeople.org/~grover/new/python-sgutils.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-sgutils-0.2.1-3.el6.src.rpm

* Removed explicit lib dependency
* chmod sgutils.so to 644
Comment 7 Christopher Meng 2013-09-30 19:05:08 EDT
Comment 8 Andy Grover 2013-09-30 19:48:42 EDT
New Package SCM Request
Package Name: python-sgutils
Short Description: Python support for sg3_utils
Owners: grover
Branches: f18 f19 f20 el6
Comment 9 Gwyn Ciesla 2013-10-01 08:16:23 EDT
Git done (by process-git-requests).
Comment 10 Ville Skyttä 2013-10-03 11:22:15 EDT
Please use rpmlint when packaging and reviewing.

python-sgutils.x86_64: W: unstripped-binary-or-object /usr/lib64/python2.7/site-packages/sgutils.so
python-sgutils-debuginfo.x86_64: E: empty-debuginfo-package

One way to fix it: just remove the "chmod a-x" line from %install.
Comment 11 Ville Skyttä 2013-10-03 11:24:33 EDT
(In reply to Christopher Meng from comment #5)
> 775 is weird, please contact with upstream and use chmod to fix it in SPEC.

I suppose something in Rawhide makes *.so 775, in F-19 they end up as 755 as they should. Anyway the fix is not to remove executable bits.
Comment 12 Christopher Meng 2013-10-17 23:45:11 EDT
Hi, have you fixed the problem raised by Ville?
Comment 13 Andy Grover 2013-10-18 01:42:16 EDT
building updates now, 0.2.1-4.

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