Bug 2496845 - Review Request: semacro - Explore and expand SELinux policy macros
Summary: Review Request: semacro - Explore and expand SELinux policy macros
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/pranlawate/semacro
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-03 13:21 UTC by jjanasek
Modified: 2026-08-04 11:20 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-08-04 11:20:24 UTC
Type: ---
Embargoed:
plautrba: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 10793222 to 10806676 (322 bytes, patch)
2026-08-03 08:01 UTC, Fedora Review Service
no flags Details | Diff

Description jjanasek 2026-07-03 13:21:04 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/jjanasek/semacro/srpm-builds/10678407/semacro.spec

SRPM URL: https://download.copr.fedorainfracloud.org/results/jjanasek/semacro/srpm-builds/10678407/semacro-0.2.0-2.fc44.src.rpm

Koji Scratch Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=147340327

Description: semacro parses the SELinux reference-policy macro library and provides
quick lookup, search, and recursive expansion of interfaces, templates,
and defines.  It can substitute arguments, recursively expand nested
calls into a tree of final policy rules, and output flat copy-paste-ready
rules for use in .te policy files.

Fedora Account System Username: jjanasek


Note to Reviewers: This is my first Fedora package, and I am looking for a sponsor!

My local mock build and rpmlint checks pass cleanly. There are two known false positives in the rpmlint output:

spelling-error 'te': Refers to standard SELinux .te policy files.
devel-dependency selinux-policy-devel: semacro intentionally parses macro files, so it explicitly requires the SELinux development headers to function.

Comment 1 Fedora Review Service 2026-07-03 13:24:09 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10678574
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2496845-semacro/fedora-rawhide-x86_64/10678574-semacro/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 jjanasek 2026-07-14 07:34:33 UTC
I have updated the package to address the issues flagged in the initial review and fully integrate the test suite.
Key Updates:

    Updated Source0 to point to the upstream v0.2.0-2 release tag, which contains the complete tests/ directory.

    Added BuildRequires: selinux-policy-devel to satisfy dependencies for testing SELinux contexts.

    Configured %check to run the entire Pytest test suite, which now passes completely.

    Updated %prep to %autosetup -n %{name}-%{version}-2 to properly handle the extracted directory.

    Added %dir %{_libexecdir}/semacro to the %files section to fix the unowned directory issue.

Updated Build Links:

    Spec URL: https://download.copr.fedorainfracloud.org/results/jjanasek/semacro/srpm-builds/10715715/semacro.spec

    SRPM URL: https://download.copr.fedorainfracloud.org/results/jjanasek/semacro/srpm-builds/10715715/semacro-0.2.0-2.fc44.src.rpm

    Koji Scratch Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=147787620

Comment 3 jjanasek 2026-07-30 11:47:18 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/jjanasek/semacro/srpm-builds/10793141/semacro.spec

SRPM URL: https://download.copr.fedorainfracloud.org/results/jjanasek/semacro/srpm-builds/10793141/semacro-0.2.0-1.fc44.src.rpm

Koji Scratch Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=148480886

Description: semacro parses the SELinux reference-policy macro library and provides
quick lookup, search, and recursive expansion of interfaces, templates,
and defines.  It can substitute arguments, recursively expand nested
calls into a tree of final policy rules, and output flat copy-paste-ready
rules for use in .te policy files.

Fedora Account System Username: jjanasek


My local mock build and rpmlint checks pass cleanly. There are two known false positives in the rpmlint output:

spelling-error 'te': Refers to standard SELinux .te policy files.
devel-dependency selinux-policy-devel: semacro intentionally parses macro files, so it explicitly requires the SELinux development headers to function.

Changes since last review:

Adopted %autorelease and %autochangelog (rpmautospec)
Clean upstream versioning (v%{version} without distro release number)
Direct install to %{_bindir}/semacro, dropped bash wrapper and libexecdir
Added %py3_shebang_fix with -sP flags per Python packaging guidelines
Shell completions use %{bash_completions_dir} / %{zsh_completions_dir} macros
Dropped redundant Requires: python3 >= 3.9
Added VCS tag

Comment 4 Fedora Review Service 2026-07-30 12:08:49 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10793222
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2496845-semacro/fedora-rawhide-x86_64/10793222-semacro/fedora-review/review.txt

Found issues:

- Upstream MD5sum check error, diff is in /var/lib/copr-rpmbuild/results/semacro/diff.txt
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 5 Petr Lautrbach 2026-07-31 12:07:23 UTC
Please update to 4.2.1 release https://github.com/pranlawate/semacro/releases/tag/v0.2.1

Comment 7 Fedora Review Service 2026-08-03 08:01:35 UTC
Created attachment 2153378 [details]
The .spec file difference from Copr build 10793222 to 10806676

Comment 8 Fedora Review Service 2026-08-03 08:01:37 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10806676
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2496845-semacro/fedora-rawhide-x86_64/10806676-semacro/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 9 Petr Lautrbach 2026-08-03 09:50:29 UTC
Package Review
==============

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



===== 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", "MIT License", "*No copyright* MIT
     License". 31 files have unknown license. Detailed output of
     licensecheck in /home/plautrba/2496845-semacro/licensecheck.txt
[X]: Package contains no bundled libraries or specifies bundled libraries
     with Provides: bundled(<libname>) if unbundling is not possible.
[-]: 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
[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.
[-]: 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.
[X]: Package contains systemd file(s) if in need.
[X]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 25562 bytes in 3 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]: The License field must be a valid SPDX expression.
[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 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]: 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).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: 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.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %check is present and all tests pass.
[ ]: 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]: 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:
[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: semacro-0.2.1-1.fc45.noarch.rpm
          semacro-0.2.1-1.fc45.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.8.0
configuration:
    /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmptyybyhow')]
checks: 32, packages: 2

semacro.noarch: E: spelling-error ('te', '%description -l en_US te -> Te, Tue, tea')
semacro.src: E: spelling-error ('te', '%description -l en_US te -> Te, Tue, tea')
semacro.noarch: E: devel-dependency selinux-policy-devel
 2 packages and 0 specfiles checked; 3 errors, 0 warnings, 7 filtered, 3 badness; has taken 0.3 s 




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.9.0
configuration:
    /usr/lib/python3.15/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

semacro.noarch: E: spelling-error ('te', '%description -l en_US te -> ch')
semacro.noarch: E: devel-dependency selinux-policy-devel
 1 packages and 0 specfiles checked; 2 errors, 0 warnings, 3 filtered, 2 badness; has taken 0.0 s 



Source checksums
----------------
https://github.com/pranlawate/semacro/archive/v0.2.1/semacro-0.2.1.tar.gz :
  CHECKSUM(SHA256) this package     : 34438ddf695cf6800d06af21a8cb3e8b5a6e89211d44c53761c3522ca7d5ce11
  CHECKSUM(SHA256) upstream package : 34438ddf695cf6800d06af21a8cb3e8b5a6e89211d44c53761c3522ca7d5ce11


Requires
--------
semacro (rpmlib, GLIBC filtered):
    /usr/bin/python3
    selinux-policy-devel



Provides
--------
semacro:
    semacro



Generated by fedora-review 0.11.0 (05c5b26) last change: 2025-11-29
Command line :/usr/bin/fedora-review -b 2496845
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: PHP, C/C++, SugarActivity, Java, Python, Haskell, Perl, fonts, Ocaml, R
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 10 Fedora Admin user for bugzilla script actions 2026-08-04 09:22:01 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/semacro
Monitoring:
Wasn't able to create project in Anitya. You can create it manually on: `https://release-monitoring.org`

Comment 11 Fedora Update System 2026-08-04 09:40:18 UTC
FEDORA-2026-689278b5f8 (semacro-0.2.1-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-689278b5f8

Comment 12 Fedora Update System 2026-08-04 11:20:24 UTC
FEDORA-2026-689278b5f8 (semacro-0.2.1-1.fc45) has been pushed to the Fedora 45 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.