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
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.
Taking this review.
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
> #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.
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
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.
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
> CFLAGS="%{optflags}" \ > LDFLAGS="%{__global_ldflags}" \ This should be using "%{build_cflags}" and "%{build_ldflags}" instead.
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
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,
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
> [!]: 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.
Great. What's the next step here? I haven't gone through the whole process to become a maintainer/packager yet.
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/
Actually, this is probably a better document: https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_New_Contributors/#add_package_to_source_code_management_scm_system_and_set_owner
Thanks Neal, I managed to follow the instructions and eventually landed here: https://pagure.io/releng/fedora-scm-requests/issue/39806
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/libinjection
FEDORA-EPEL-2021-8aa3e092da has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-8aa3e092da
FEDORA-EPEL-2021-8b7ad28bb1 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-8b7ad28bb1
FEDORA-EPEL-2021-38c08b23e2 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-38c08b23e2
FEDORA-2021-4f40b735bf has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-4f40b735bf
FEDORA-2021-58f29c6fee has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-58f29c6fee
Notified upstream: https://github.com/libinjection/libinjection/issues/21
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.
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.
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.
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.
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.