Bug 1299608

Summary: Review Request: Simple-Fuzzer - A simple fuzz test-case builder
Product: [Fedora] Fedora Reporter: Aaron Conole <aconole>
Component: Package ReviewAssignee: Neil Horman <nhorman>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: aconole, nhorman, package-review
Target Milestone: ---Flags: nhorman: fedora‑review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-03 14:32:55 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 177841    

Description Aaron Conole 2016-01-18 13:28:05 EST
Spec URL: http://aaron.bytheb.org/simple-fuzzer.spec

SRPM URL: http://aaron.bytheb.org/simple-fuzzer-0.7-0.src.rpm

Description: 
Simple-Fuzzer (sfuzz) is a simplistic fuzz test case generator.
It is a generation-based fuzzer, intended to aid in fault finding.

Fedora Account System Username: aconole

Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=12594630
Comment 1 Neil Horman 2016-01-28 15:15:46 EST
Ok, lots of problems to fix, none of them particularly difficult, but they should all be addressed (either by fixing them, or explaining them, which may be the case with some of the scripts that failed rpmlint).  You can ignore the Installation errors, as I believe thats a known bug with the fedora-review utility.  What I would suggest is that you start addressing these, then use the fedora-review tool to check yourself and make sure they're correct.

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

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines
- Dist tag is present.


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[!]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Header files in -devel subpackage, if present.
[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.
[!]: 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 %license.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD (3 clause)", "Unknown or generated". 18 files have unknown
     license. Detailed output of licensecheck in
     /home/nhorman/Downloads/1299608-simple-fuzzer/licensecheck.txt
[!]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[!]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf %{buildroot} present but not required
[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).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: Package is not known to require an ExcludeArch tag.
[ ]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[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]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[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]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local


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

Generic:
[!]: Buildroot is not present
     Note: Invalid buildroot found:
     %{_tmppath}/sfuzz-%{version}.%{release}-root
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
[!]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: %clean present but not required
[-]: 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in simple-
     fuzzer-debuginfo
[x]: Package functions as described.
[x]: Latest version is packaged.
[!]: Package does not include license text files separate from upstream.
[-]: 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.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[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.

Installation errors
-------------------
INFO: mock.py version 1.2.14 starting (python version = 3.4.3)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled ccache
Mock Version: 1.2.14
INFO: Mock Version: 1.2.14
Finish: chroot init
INFO: installing package(s): /home/nhorman/Downloads/1299608-simple-fuzzer/results/simple-fuzzer-0.7-0.x86_64.rpm /home/nhorman/Downloads/1299608-simple-fuzzer/results/simple-fuzzer-debuginfo-0.7-0.x86_64.rpm /home/nhorman/Downloads/1299608-simple-fuzzer/results/simple-fuzzer-debuginfo-0.7-0.x86_64.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 24 --setopt=deltarpm=false install /home/nhorman/Downloads/1299608-simple-fuzzer/results/simple-fuzzer-0.7-0.x86_64.rpm /home/nhorman/Downloads/1299608-simple-fuzzer/results/simple-fuzzer-debuginfo-0.7-0.x86_64.rpm /home/nhorman/Downloads/1299608-simple-fuzzer/results/simple-fuzzer-debuginfo-0.7-0.x86_64.rpm --setopt=tsflags=nocontexts


Rpmlint
-------
Checking: simple-fuzzer-0.7-0.x86_64.rpm
          simple-fuzzer-debuginfo-0.7-0.x86_64.rpm
          simple-fuzzer-0.7-0.src.rpm
simple-fuzzer.x86_64: W: incoherent-version-in-changelog 0.7.0 ['0.7-0', '0.7-0']
simple-fuzzer.x86_64: E: arch-dependent-file-in-usr-share /usr/share/sfuzz-db/sfuzz-plugin-example.so
simple-fuzzer.x86_64: E: arch-dependent-file-in-usr-share /usr/share/sfuzz-db/sfuzz-server-plugin.so
simple-fuzzer.x86_64: W: no-documentation
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/http-nuke-enumeration.list
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.cvs
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.http
simple-fuzzer.x86_64: E: wrong-script-end-of-line-encoding /usr/share/sfuzz-db/basic.http
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/big-ant.0day
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/bad-nums.blocks.inc
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.cmd
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.pop3
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/twitter.cfg
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.unknown
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.rtsp
simple-fuzzer.x86_64: E: wrong-script-end-of-line-encoding /usr/share/sfuzz-db/basic.rtsp
simple-fuzzer.x86_64: W: devel-file-in-non-devel-package /usr/share/sfuzz-db/vulnerable-echo-server.c
simple-fuzzer.x86_64: W: spurious-executable-perm /usr/share/sfuzz-db/vulnerable-echo-server.c
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic-fuzz-strings.list
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.a11
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/server.basic.http
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.nuke
simple-fuzzer.x86_64: E: wrong-script-end-of-line-encoding /usr/share/sfuzz-db/basic.nuke
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/smb.0day
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/std-cmdline-exploits.list
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/server.browser-fuzz.blocks
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/php-vuln.test
simple-fuzzer.x86_64: E: wrong-script-end-of-line-encoding /usr/share/sfuzz-db/php-vuln.test
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.smtp
simple-fuzzer.x86_64: E: wrong-script-end-of-line-encoding /usr/share/sfuzz-db/basic.smtp
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/basic.http.blocks
simple-fuzzer.x86_64: E: script-without-shebang /usr/share/sfuzz-db/http-etc-enumeration.list
simple-fuzzer.x86_64: W: no-manual-page-for-binary sfo
simple-fuzzer.x86_64: W: no-manual-page-for-binary sfuzz
simple-fuzzer.src: W: spelling-error %description -l en_US sfuzz -> fuzz, s fuzz
3 packages and 0 specfiles checked; 28 errors, 7 warnings.


Requires
--------
simple-fuzzer (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libdl.so.2()(64bit)
    rtld(GNU_HASH)

simple-fuzzer-debuginfo (rpmlib, GLIBC filtered):



Provides
--------
simple-fuzzer:
    simple-fuzzer
    simple-fuzzer(x86-64)

simple-fuzzer-debuginfo:
    simple-fuzzer-debuginfo
    simple-fuzzer-debuginfo(x86-64)



Unversioned so-files
--------------------
simple-fuzzer: /usr/share/sfuzz-db/sfuzz-plugin-example.so
simple-fuzzer: /usr/share/sfuzz-db/sfuzz-server-plugin.so

Source checksums
----------------
http://aconole.brad-x.com/files/sfuzz-0.7-dist/sfuzz-0.7.0.tar.bz2 :
  CHECKSUM(SHA256) this package     : a65bb4d048c713dd9ecc4b42b98cc124516fd5c1df19deddfc664476aad7caac
  CHECKSUM(SHA256) upstream package : a65bb4d048c713dd9ecc4b42b98cc124516fd5c1df19deddfc664476aad7caac
Comment 2 Aaron Conole 2016-02-19 14:11:08 EST
So, I'm almost done with an update; there are two things

1. The .so files are plugins which get dynamically loaded based on script configuration. So:
Unversioned so-files
--------------------
simple-fuzzer: /usr/share/sfuzz-db/sfuzz-plugin-example.so
simple-fuzzer: /usr/share/sfuzz-db/sfuzz-server-plugin.so

shouldn't be considered an error, I think. If they need to go in %{_libdir}/sfuzz/ or something like that, I can make that change, but it requires a change to the configure (possibly code, too).

2. Script without shebang:
As you noted, the scripts are sfuzz scripts, not shell scripts; I can put a shebang into them to quiet the beast, but they are not errors.

3. -devel package
/usr/share/sfuzz-db/vulnerable-echo-server.c is now in a devel package for this

4. Missing manpage
I've added manpages for the sfo and sfuzz utilities in my latest version

5. Installation issues
I've fixed (I believe) the package install issues.

Here's the rpmlint output:

Rpmlint
-------
Checking: simple-fuzzer-0.7.1-1.x86_64.rpm
          simple-fuzzer-devel-0.7.1-1.x86_64.rpm
          simple-fuzzer-debuginfo-0.7.1-1.x86_64.rpm
          simple-fuzzer-0.7.1-1.src.rpm
simple-fuzzer.x86_64: E: arch-dependent-file-in-usr-share /usr/share/sfuzz-db/sfuzz-server-plugin.so
simple-fuzzer.x86_64: E: arch-dependent-file-in-usr-share /usr/share/sfuzz-db/sfuzz-plugin-example.so
simple-fuzzer-devel.x86_64: W: no-documentation
simple-fuzzer.src: W: spelling-error %description -l en_US sfuzz -> fuzz, s fuzz
4 packages and 0 specfiles checked; 2 errors, 2 warnings.




Rpmlint (debuginfo)
-------------------
Checking: simple-fuzzer-debuginfo-0.7.1-1.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
simple-fuzzer.x86_64: E: arch-dependent-file-in-usr-share /usr/share/sfuzz-db/sfuzz-server-plugin.so
simple-fuzzer.x86_64: E: arch-dependent-file-in-usr-share /usr/share/sfuzz-db/sfuzz-plugin-example.so
simple-fuzzer-devel.x86_64: W: no-documentation
3 packages and 0 specfiles checked; 2 errors, 1 warnings.



Requires
--------
simple-fuzzer (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libdl.so.2()(64bit)
    rtld(GNU_HASH)

simple-fuzzer-debuginfo (rpmlib, GLIBC filtered):

simple-fuzzer-devel (rpmlib, GLIBC filtered):
    simple-fuzzer(x86-64)



Provides
--------
simple-fuzzer:
    simple-fuzzer
    simple-fuzzer(x86-64)

simple-fuzzer-debuginfo:
    simple-fuzzer-debuginfo
    simple-fuzzer-debuginfo(x86-64)

simple-fuzzer-devel:
    simple-fuzzer-devel
    simple-fuzzer-devel(x86-64)



Unversioned so-files
--------------------
simple-fuzzer: /usr/share/sfuzz-db/sfuzz-plugin-example.so
simple-fuzzer: /usr/share/sfuzz-db/sfuzz-server-plugin.so

Source checksums
----------------
http://aaron.bytheb.org/files/sfuzz-0.7-dist/sfuzz-0.7.1.tar.bz2 :
  CHECKSUM(SHA256) this package     : bac4699bfb278bf84f3f0c925f994fccd6e448b23adb6cea8b11485e2b7bb1f7
  CHECKSUM(SHA256) upstream package : bac4699bfb278bf84f3f0c925f994fccd6e448b23adb6cea8b11485e2b7bb1f7


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -n simple-fuzzer
Buildroot used: fedora-23-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6


The links for spec, sources, and srpm:

http://aaron.bytheb.org/files/simple-fuzzer.spec
http://aaron.bytheb.org/files/sfuzz-0.7-dist/sfuzz-0.7.1.tar.bz2
http://aaron.bytheb.org/files/simple-fuzzer-0.7.1-1.src.rpm
Comment 3 Neil Horman 2016-02-23 09:18:37 EST
Aaron, I concur on all your points, the package looks good now.  I do however feel that your unversioned DSO files need to go in %{_libdir}/simple-fuzzer.  it shouldn't even require much to make the change.  Just:
1a) Modify the Makefile.in file to install the .so files to /usr/lib/simple-fuzzer
OR
1b) Modify the spec file to move the .so files from its location to /usr/lib/simple-fuzzer

then

2) Modify the spec file to add the new location to the manifest
3) Modify the sample configs to add the new path to any referenced plugins

If you take care of that, I think we will be ready to go.  Thanks!
Comment 4 Aaron Conole 2016-02-23 17:13:16 EST
Done; the files are all re-uploaded (same names and versions are applied). The .so files are moved to %{_libdir} and loadable.
Comment 5 Neil Horman 2016-02-24 09:11:21 EST
Awesome, thanks! Then I see that this package passes all the package review requirements and am approving it.  Given that I'm sponsoring you as a maintainer, I've also gone ahead and sponsored/approved you in the fedora account system. 

You should now follow the rest of the new package process to import the rpm to our git repository and start maintaining the package.  Please let me know if you have any questions.

Nice work, and welcome aboard!
Comment 6 Gwyn Ciesla 2016-02-24 12:06:38 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/Simple-Fuzzer
Comment 7 Aaron Conole 2016-03-09 10:44:36 EST
Clearing this - I've added and done the fedpkg build and have a build made from master branch. I believe this means I am set, and the package will appear as part of Fedora 25?
Comment 8 Neil Horman 2016-03-09 10:51:34 EST
It will appear the next time Fedora is forked from rawhide, yes, though if you want it in the current f24, you should request that branch, and file a new pacakge request in bodhi (or whatever the latest package release interface is)
Comment 9 Neil Horman 2016-03-09 10:55:06 EST
and then you can close this bz
Comment 10 Aaron Conole 2017-02-03 14:32:55 EST
Verified this with Fedora 25.  Sorry it has taken so long to close out.