Bug 2029308 - Review Request: libinjection - SQL / SQLI tokenizer parser analyzer library
Summary: Review Request: libinjection - SQL / SQLI tokenizer parser analyzer library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-06 08:15 UTC by Oden Eriksson
Modified: 2021-12-18 01:35 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-12-18 00:46:33 UTC
Type: Bug
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)

Description Oden Eriksson 2021-12-06 08:15:00 UTC
Spec URL: https://nux.se/repo/libinjection/libinjection.spec
SRPM URL: https://nux.se/repo/libinjection/libinjection-3.10.0-0.el8.src.rpm
Description: SQL / SQLI tokenizer parser analyzer library
Fedora Account System Username: oden

Comment 1 Oden Eriksson 2021-12-06 08:19:17 UTC
Note. This isn't pretty but at least a first step to unbundle the code from mod_security and naxsi and possible other projects.

This is due to https://github.com/libinjection/libinjection/issues/2 to make it easier to provide the needed (upcoming?) security fixes in just one place.

Comment 2 Neal Gompa 2021-12-06 13:59:47 UTC
Taking this review.

Comment 3 Oden Eriksson 2021-12-10 05:46:04 UTC
I spent a little time with nginx-mod-naxsi this morning and it was not that hard to fix this:

https://nux.se/repo/libinjection/nginx-mod-naxsi.spec
https://nux.se/repo/libinjection/naxsi-1.3-external_libinjection.diff

Comment 4 Neal Gompa 2021-12-10 10:20:18 UTC
> #Source0: https://github.com/libinjection/libinjection/archive/refs/tags/v%%{version}.tar.gz
> Source0: %{name}-%{version}.tar.gz

The following works for me with rpmdev-spectool:

Source0: https://github.com/libinjection/libinjection/archive/v%{version}/%{name}-%{version}.tar.gz

> %{!?_licensedir:%global license %%doc}

We don't need these anymore, as all Fedora and EPEL platforms support %license properly.

Comment 5 Oden Eriksson 2021-12-10 11:21:26 UTC
Thanks Neal,

Fixed files at the same location.

Spec URL: https://nux.se/repo/libinjection/libinjection.spec
SRPM URL: https://nux.se/repo/libinjection/libinjection-3.10.0-1.el8.src.rpm

Hopefully

Comment 6 Neal Gompa 2021-12-10 12:05:34 UTC
You're missing "BuildRequires: gcc", as it fails to build in mock for me locally without it.

As as a suggestion, you might want to write a Makefile for orchestrating this build, rather than encoding it in the spec file like that. If you choose to do so, add "BuildRequires: make" too.

Comment 7 Oden Eriksson 2021-12-10 14:09:18 UTC
Ok. I fixed this the almost proper way. Upstream should do it something like this but with either autopoo or cmake.

Spec URL: https://nux.se/repo/libinjection/libinjection.spec
SRPM URL: https://nux.se/repo/libinjection/libinjection-3.10.0-2.el8.src.rpm

Comment 8 Neal Gompa 2021-12-12 01:51:07 UTC
>      CFLAGS="%{optflags}" \
>     LDFLAGS="%{__global_ldflags}" \

This should be using "%{build_cflags}" and "%{build_ldflags}" instead.

Comment 9 Oden Eriksson 2021-12-12 09:11:31 UTC
Ok. I fixed this and some other stuff (including some security fixes from upstream). Passes build with mock under RHEL/CentOS/Rocky 8 so all should be fine now.

Spec URL: https://nux.se/repo/libinjection/libinjection.spec
SRPM URL: https://nux.se/repo/libinjection/libinjection-3.10.0-3.el8.src.rpm

Comment 10 Oden Eriksson 2021-12-12 09:59:54 UTC
I also spent a little time with mod_security this morning and it was not that hard to fix:

Spec URL: https://nux.se/repo/libinjection/mod_security.spec
SRPM URL: https://nux.se/repo/libinjection/mod_security-2.9.4-2.el8.src.rpm
Patch: https://nux.se/repo/libinjection/modsecurity-2.9.2-external_libinjection.patch

So, that's it. I'm currently unaware if the libinjection library is embedded elsewhere, but I would assume so.

The mod_security maintainer should take a look at this and perhaps make some conditional autopoo magic, and send that upstream.

Cheers,

Comment 11 Neal Gompa 2021-12-12 14:16:28 UTC
Package Review
==============

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



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 3-Clause License", "X11 License
     [generated file]". 625 files have unknown license. Detailed output of
     licensecheck in /home/ngompa/2029308-libinjection/licensecheck.txt
[x]: 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.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
     Note: %makeinstall used in %install section
[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. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 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]: 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]: 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]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[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]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[x]: 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.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: 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]: 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]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 25886720 bytes in /usr/share
     libinjection-tests-3.10.0-2.fc36.x86_64.rpm:25876480
     See:
     https://fedoraproject.org/wiki/Packaging:ReviewGuidelines#Package_Review_Guidelines
[x]: Rpmlint is run on debuginfo package(s).
     Note: There are rpmlint messages (see attachment).
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Cannot parse rpmlint output:


Rpmlint (debuginfo)
-------------------
Cannot parse rpmlint output:



Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/libinjection/libinjection/archive/v3.10.0/libinjection-3.10.0.tar.gz :
  CHECKSUM(SHA256) this package     : 9dd7ae68a21a3c50f705c383b1b714c77fd4093b0a561a5400f0cb0ad79b1ae7
  CHECKSUM(SHA256) upstream package : 9dd7ae68a21a3c50f705c383b1b714c77fd4093b0a561a5400f0cb0ad79b1ae7


Requires
--------
libinjection (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libinjection.so.0()(64bit)
    rtld(GNU_HASH)

libinjection-tests (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libinjection(x86-64)
    libinjection.so.0()(64bit)
    rtld(GNU_HASH)

libinjection-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    libinjection(x86-64)
    libinjection.so.0()(64bit)

libinjection-debuginfo (rpmlib, GLIBC filtered):

libinjection-debugsource (rpmlib, GLIBC filtered):



Provides
--------
libinjection:
    libinjection
    libinjection(x86-64)
    libinjection.so.0()(64bit)

libinjection-tests:
    libinjection-tests
    libinjection-tests(x86-64)

libinjection-devel:
    libinjection-devel
    libinjection-devel(x86-64)
    pkgconfig(libinjection)

libinjection-debuginfo:
    debuginfo(build-id)
    libinjection-debuginfo
    libinjection-debuginfo(x86-64)
    libinjection.so.0.0.0-3.10.0-2.fc36.x86_64.debug()(64bit)

libinjection-debugsource:
    libinjection-debugsource
    libinjection-debugsource(x86-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2029308 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: Java, Python, PHP, fonts, SugarActivity, R, Ocaml, Haskell, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 12 Neal Gompa 2021-12-12 14:17:38 UTC
> [!]: Large data in /usr/share should live in a noarch subpackage if package
>      is arched.
>      Note: Arch-ed rpms have a total of 25886720 bytes in /usr/share
>      libinjection-tests-3.10.0-2.fc36.x86_64.rpm:25876480
>      See:
>      https://fedoraproject.org/wiki/Packaging:ReviewGuidelines#Package_Review_Guidelines

This is fine, since it's test data.

PACKAGE APPROVED.

Comment 13 Oden Eriksson 2021-12-12 20:02:33 UTC
Great. What's the next step here? I haven't gone through the whole process to become a maintainer/packager yet.

Comment 14 Neal Gompa 2021-12-12 21:13:24 UTC
You'll need to request the package repo and branches for F34, F35, and EPEL9.

$ fedpkg request-repo libinjection 2029308
$ fedpkg request-branch --repo libinjection f35
$ fedpkg request-branch --repo libinjection f34
$ fedpkg request-branch --repo libinjection epel9


More details about the whole process: https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_Existing_Contributors/

Comment 16 Oden Eriksson 2021-12-17 09:05:26 UTC
Thanks Neal,

I managed to follow the instructions and eventually landed here: https://pagure.io/releng/fedora-scm-requests/issue/39806

Comment 17 Tomas Hrcka 2021-12-17 12:28:00 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/libinjection

Comment 18 Fedora Update System 2021-12-17 14:56:00 UTC
FEDORA-EPEL-2021-8aa3e092da has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-8aa3e092da

Comment 19 Fedora Update System 2021-12-17 14:56:43 UTC
FEDORA-EPEL-2021-8b7ad28bb1 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-8b7ad28bb1

Comment 20 Fedora Update System 2021-12-17 14:56:58 UTC
FEDORA-EPEL-2021-38c08b23e2 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-38c08b23e2

Comment 21 Fedora Update System 2021-12-17 14:57:12 UTC
FEDORA-2021-4f40b735bf has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-4f40b735bf

Comment 22 Fedora Update System 2021-12-17 14:57:22 UTC
FEDORA-2021-58f29c6fee has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-58f29c6fee

Comment 23 Oden Eriksson 2021-12-17 16:21:38 UTC
Notified upstream: https://github.com/libinjection/libinjection/issues/21

Comment 24 Fedora Update System 2021-12-18 00:46:33 UTC
FEDORA-EPEL-2021-8b7ad28bb1 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2021-12-18 01:10:41 UTC
FEDORA-2021-4f40b735bf has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2021-12-18 01:12:36 UTC
FEDORA-EPEL-2021-8aa3e092da has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 27 Fedora Update System 2021-12-18 01:21:55 UTC
FEDORA-2021-58f29c6fee has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 28 Fedora Update System 2021-12-18 01:35:15 UTC
FEDORA-EPEL-2021-38c08b23e2 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.


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