Bug 909485 - Review Request: memstomp - checker for passing overlapping memory arguments to mem* and str* functions
Summary: Review Request: memstomp - checker for passing overlapping memory arguments t...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
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:
TreeView+ depends on / blocked
 
Reported: 2013-02-08 21:49 UTC by Jeff Law
Modified: 2013-05-14 12:21 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-05-14 12:21:41 UTC
Type: ---
Embargoed:
misc: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Jeff Law 2013-02-08 21:49:57 UTC
Spec URL: http://people.redhat.com/~law/memstomp.spec
SRPM URL: http://people.redhat.com/~law/memstomp-0.1.4-1.fc18.src.rpm
Description: 
memstomp is a simple program that can be used to identify
places in code which trigger undefined behaviour due to
overlapping memory arguments to certain library calls.

Fedora Account System Username:law

Comment 1 Michael S. 2013-02-17 09:43:14 UTC
Hi,

a few note :
- BuildRoot is no longer needed since a few rpm version, so consider dropping it

- same for %defattr(-,root,root,-) ( default in rpm since a few rpm version )
- and the rm -rf $RPM_BUILD_ROOT in %install ( again, rpm do clean by default now )

- policy requires a comment on how the tarball was generate if there is no download area, and since the url is a git repository, we need the command.
https://fedoraproject.org/wiki/Packaging:SourceURL#Using_Revision_Control


- I think this is better to have a requires on package rather than on file, because requires on file make people download a 2nd index ( ie, the file index ) which is a pain over a slow link ( even if the policy say this is not downloaded for files in /bin, My experience say the contrary, but I need to check ). Consider replace /usr/bin/getopt by "util-linux". 
See https://fedoraproject.org/wiki/Packaging:Guidelines#File_Dependencies


- since there is multiple license, could you explain the breakdown :
https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#Multiple_Licensing_Scenarios

Comment 2 Jeff Law 2013-02-18 19:45:23 UTC
Thanks Michael.  All your comments/suggestions have been incorporated.  A new spec file and RPM can be found here:

Spec URL: http://people.redhat.com/~law/memstomp.spec
SRPM URL: http://people.redhat.com/~law/memstomp-0.1.4-2.fc18.src.rpm

Comment 3 Michael S. 2013-02-22 12:21:43 UTC
Spec should be good, there is only minor issues, so approved :

Package Review
==============

Key:
[x] = Pass
[!] = Fail
[-] = Not applicable
[?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages
This one should be ok, given the file is here to be used as PRELOAD

- Spec use %global instead of %define unless justified.
Minor, should not block the review, but can you fix it ?

- memstomp.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libmemstomp.so /lib64/libz.so.1
this one should be handled upstream

- memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp.so exit
Not sure if that's a issue, I guess that's on purpose ?

- memstomp.x86_64: W: incoherent-version-in-changelog 0.1.4-38573e7d-2 ['0.1.4-2.fc18', '0.1.4-2']
I guess it would be better to fix the changelog or the version, but real fix should be upstream by having proper tarball, and release


===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: If (and only if) the source package includes the text of the license(s)
     in its own file, then that file, containing the text of the license(s)
     for the package is included in %doc.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "GPL (v2 or later) (with incorrect FSF address)", "LGPL (v3 or later)",
     "Unknown or generated". 3 files have unknown license. Detailed output of
     licensecheck in
     /home/misc/checkout/git/FedoraReview/909485-memstomp/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown must
     be documented in the spec.
[x]: Package does not own files or directories owned by other packages.

[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[-]: Package uses nothing in %doc for runtime.
[-]: Package consistently uses macros (instead of hard-coded directory names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 71680 bytes in 4 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: Spec file lacks Packager, Vendor, PreReq tags.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate file
     from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Scriptlets must be sane, if used.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define githash 38573e7d
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make.
[x]: SourceX is a working URL.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: memstomp-0.1.4-2.fc18.x86_64.rpm
memstomp.x86_64: W: spelling-error %description -l en_US behaviour -> behavior
memstomp.x86_64: W: incoherent-version-in-changelog 0.1.4-38573e7d-2 ['0.1.4-2.fc18', '0.1.4-2']
memstomp.x86_64: W: invalid-url URL git://fedorapeople.org/home/fedora/wcohen/public_git/memstomp
memstomp.x86_64: E: invalid-soname /usr/lib64/libmemstomp-backtrace-symbols.so libmemstomp-backtrace-symbols.so
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp-backtrace-symbols.so _exit.5
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp-backtrace-symbols.so exit.5
memstomp.x86_64: E: invalid-soname /usr/lib64/libmemstomp.so libmemstomp.so
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp.so exit
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp.so _exit
memstomp.x86_64: W: no-manual-page-for-binary memstomp
1 packages and 0 specfiles checked; 2 errors, 8 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint memstomp
memstomp.x86_64: W: spelling-error %description -l en_US behaviour -> behavior
memstomp.x86_64: W: incoherent-version-in-changelog 0.1.4-38573e7d-2 ['0.1.4-2.fc18', '0.1.4-2']
memstomp.x86_64: W: invalid-url URL git://fedorapeople.org/home/fedora/wcohen/public_git/memstomp
memstomp.x86_64: E: invalid-soname /usr/lib64/libmemstomp-backtrace-symbols.so libmemstomp-backtrace-symbols.so
memstomp.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libmemstomp-backtrace-symbols.so /lib64/librt.so.1
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp-backtrace-symbols.so _exit.5
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp-backtrace-symbols.so exit.5
memstomp.x86_64: E: invalid-soname /usr/lib64/libmemstomp.so libmemstomp.so
memstomp.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libmemstomp.so /lib64/librt.so.1
memstomp.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libmemstomp.so /lib64/libz.so.1
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp.so exit
memstomp.x86_64: W: shared-lib-calls-exit /usr/lib64/libmemstomp.so _exit
memstomp.x86_64: W: no-manual-page-for-binary memstomp
1 packages and 0 specfiles checked; 2 errors, 11 warnings.
# echo 'rpmlint-done:'



Requires
--------
memstomp (rpmlib, GLIBC filtered):
    /bin/bash
    /sbin/ldconfig
    libc.so.6()(64bit)
    libdl.so.2()(64bit)
    libpthread.so.0()(64bit)
    librt.so.1()(64bit)
    libz.so.1()(64bit)
    libz.so.1(ZLIB_1.2.0)(64bit)
    rtld(GNU_HASH)
    util-linux



Provides
--------
memstomp:
    libmemstomp-backtrace-symbols.so()(64bit)
    libmemstomp.so()(64bit)
    memstomp
    memstomp(x86-64)



Unversioned so-files
--------------------
memstomp: /usr/lib64/libmemstomp-backtrace-symbols.so
memstomp: /usr/lib64/libmemstomp.so

Generated by fedora-review 0.4.0 (cf29f98) last change: 2013-02-08
Buildroot used: fedora-18-x86_64
Command line :./try-fedora-review -b 909485

Comment 4 Jeff Law 2013-02-22 16:34:23 UTC
memstomp's functionality is entirely development related.  ie, it makes no sense to break out a -devel package merely as a container for an unversioned .so.  So, I agree this is OK.

I changed the %define to %global.  I wasn't aware of the distinction, I'll keep it in mind for the future.

The dependency on libz comes in via the libbfd reference as far as I can tell.  memstomp doesn't use libz directly.

The call to exit is purposeful as memstomp will intercept exit calls so that it can summarize its findings.  At least that's what the design looks like.  Right now the summary itself is just stubbed.

WRT the version #s.  Yea, it'd be best if upstream made an official release.  Arguably we should remove the git hash from the version # since it just complicates NVR comparisons.  I'd already done that locally.

I'll also fix the behaviour -> behavior warning :-)

There's a man page on the way as well which should take care of that warning.

Comment 5 Jeff Law 2013-02-22 16:40:48 UTC
New Package SCM Request
=======================
Package Name: memstomp
Short Description: Warns of memory argument overlaps to various functions
Owners: law
Branches: rawhide f19
InitialCC:

Comment 6 Gwyn Ciesla 2013-02-22 18:19:40 UTC
Git done (by process-git-requests).


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