Bug 1609257 - Review Request: mysql-selinux - MySQL independent SELinux policy
Summary: Review Request: mysql-selinux - MySQL independent SELinux policy
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-27 12:12 UTC by Jakub Jančo
Modified: 2019-01-23 14:41 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-01-23 14:41:36 UTC
Type: Bug
Embargoed:
lvrabec: fedora-review+


Attachments (Terms of Use)

Description Jakub Jančo 2018-07-27 12:12:40 UTC
Spec URL: https://raw.githubusercontent.com/kubco2/mysql-selinux-rpm/master/mysql-selinux.spec
SRPM URL: https://github.com/kubco2/mysql-selinux-rpm/raw/master/mysql-selinux-1.0.0-2.fc29.src.rpm
Description: This package brings selinux policy for mysql and mariadb servers and allows database packagers and selinux team work more independently.
Fedora Account System Username: jjanco

Comment 1 Lukas Vrabec 2018-07-27 21:57:03 UTC
Package Review
==============

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



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

Generic:
[!]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[-]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated". 5 files have unknown license. Detailed
     output of licensecheck in /home/lvrabec/review-mysql-
     selinux/licensecheck.txt
[-]: Package requires other packages for directories it uses.
     Note: No known owner of /var/lib/selinux/targeted,
     /var/lib/selinux/targeted/active/modules/200
[-]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /var/lib/selinux/targeted/active/modules/200
[X]: Package contains no bundled libraries without FPC exception.
[X]: Changelog in prescribed format.
[X]: Sources contain only permissible code or content.
[X]: Each %files section contains %defattr if rpm < 4.4
     Note: %defattr present but not needed
[-]: 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 is named according to the Package Naming Guidelines.
[X]: Package does not generate any conflict.
[X]: Package obeys FHS, except libexecdir and /usr/target.
[X]: 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]: Package is not known to require an ExcludeArch tag.
[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 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]: 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 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:
[!]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[X]: Package functions as described.
[X]: Latest version is packaged.
[-]: Package does not include license text files separate from upstream.
[-]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[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:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: mysql-selinux-1.0.0-2.fc29.noarch.rpm
          mysql-selinux-1.0.0-2.fc29.src.rpm
mysql-selinux.noarch: E: explicit-lib-dependency libselinux-utils
mysql-selinux.noarch: W: incoherent-version-in-changelog 1.0.0-1 ['1.0.0-2.fc29', '1.0.0-2']
mysql-selinux.noarch: W: no-documentation
mysql-selinux.noarch: E: non-readable /var/lib/selinux/targeted/active/modules/200/mysql 0
mysql-selinux.noarch: W: dangerous-command-in-%pre cp
mysql-selinux.noarch: W: dangerous-command-in-%posttrans rm
mysql-selinux.src: W: invalid-url Source0: mysql-selinux.tar.gz
2 packages and 0 specfiles checked; 2 errors, 5 warnings.


Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
mysql-selinux.noarch: E: explicit-lib-dependency libselinux-utils
mysql-selinux.noarch: W: incoherent-version-in-changelog 1.0.0-1 ['1.0.0-2.fc29', '1.0.0-2']
mysql-selinux.noarch: W: invalid-url URL: https://github.com/kubco2/mysql-selinux <urlopen error [Errno -2] Name or service not known>
mysql-selinux.noarch: W: no-documentation
mysql-selinux.noarch: E: non-readable /var/lib/selinux/targeted/active/modules/200/mysql 0
mysql-selinux.noarch: W: dangerous-command-in-%pre cp
mysql-selinux.noarch: W: dangerous-command-in-%posttrans rm
1 packages and 0 specfiles checked; 2 errors, 5 warnings.


All what is missing to me here is License file. I created pull request to your repo with adding GPL v3. 
https://github.com/kubco2/mysql-selinux-rpm/pull/2

From SELinux POV, loading SELinux security module mysql with 200 prio is working. 

Thanks,
Lukas.

Comment 2 Jakub Jančo 2018-07-28 11:48:54 UTC
Thank you Lukas, license added.

Comment 3 Lukas Vrabec 2018-07-28 14:45:43 UTC
Package Review
==============

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



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

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". 5 files have unknown license. Detailed
     output of licensecheck in /home/lvrabec/review-mysql-
     selinux/licensecheck.txt
[-]: Package requires other packages for directories it uses.
     Note: No known owner of /var/lib/selinux/targeted,
     /var/lib/selinux/targeted/active/modules/200
[-]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /var/lib/selinux/targeted/active/modules/200
[X]: Package contains no bundled libraries without FPC exception.
[X]: Changelog in prescribed format.
[X]: Sources contain only permissible code or content.
[X]: Each %files section contains %defattr if rpm < 4.4
     Note: %defattr present but not needed
[-]: 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 is named according to the Package Naming Guidelines.
[X]: Package does not generate any conflict.
[X]: Package obeys FHS, except libexecdir and /usr/target.
[X]: 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]: Package is not known to require an ExcludeArch tag.
[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 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]: 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 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:
[!]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[X]: Package functions as described.
[X]: Latest version is packaged.
[-]: Package does not include license text files separate from upstream.
[-]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

Rpmlint
-------
Checking: mysql-selinux-1.0.0-2.fc29.noarch.rpm
          mysql-selinux-1.0.0-2.fc29.src.rpm
mysql-selinux.noarch: E: explicit-lib-dependency libselinux-utils
mysql-selinux.noarch: W: no-documentation
mysql-selinux.noarch: E: non-readable /var/lib/selinux/targeted/active/modules/200/mysql 0
mysql-selinux.noarch: W: dangerous-command-in-%pre cp
mysql-selinux.noarch: W: dangerous-command-in-%posttrans rm
mysql-selinux.src: W: invalid-url Source0: mysql-selinux.tar.gz
2 packages and 0 specfiles checked; 2 errors, 4 warnings.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.



Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
mysql-selinux.noarch: E: explicit-lib-dependency libselinux-utils
mysql-selinux.noarch: W: invalid-url URL: https://github.com/kubco2/mysql-selinux <urlopen error [Errno -2] Name or service not known>
mysql-selinux.noarch: W: no-documentation
mysql-selinux.noarch: E: non-readable /var/lib/selinux/targeted/active/modules/200/mysql 0
mysql-selinux.noarch: W: dangerous-command-in-%pre cp
mysql-selinux.noarch: W: dangerous-command-in-%posttrans rm
1 packages and 0 specfiles checked; 2 errors, 4 warnings.

I tested latest updates in repo. License is part of the package now. Adding fedora-review + ack.

Comment 4 Igor Raits 2018-08-02 11:49:14 UTC
Why not to make it part of mysql package?

Comment 5 Gwyn Ciesla 2018-08-02 13:42:36 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/mysql-selinux

Comment 6 Pavel Raiskup 2018-08-30 05:43:31 UTC
Why not a mariadb-selinux name?

Comment 7 Jakub Jančo 2018-08-30 07:31:39 UTC
SELinux module is named mysql. Mysql was first. It works for both mysql and mariadb. And no one was against this name.


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