Bug 2325026 - Review Request: chibicc - A small C compiler
Summary: Review Request: chibicc - A small C compiler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Simone Caronni
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/rui314/chibicc
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-11-10 19:03 UTC by Benson Muite
Modified: 2025-01-11 01:41 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-01-11 01:25:23 UTC
Type: ---
Embargoed:
negativo17: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 8239729 to 8240712 (651 bytes, patch)
2024-11-11 10:18 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 8240712 to 8455875 (1.59 KB, patch)
2024-12-30 20:37 UTC, Fedora Review Service
no flags Details | Diff

Description Benson Muite 2024-11-10 19:03:11 UTC
spec: https://download.copr.fedorainfracloud.org/results/fed500/chibicc/fedora-rawhide-x86_64/08239727-chibicc/chibicc.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/chibicc/fedora-rawhide-x86_64/08239727-chibicc/chibicc-0.0%5E20201207.90d1f7f-1.fc42.src.rpm

description:
chibicc is yet another small C compiler that implements most C11 features.
Even though it still probably falls into the "toy compilers" category just
like other small compilers do, chibicc can compile several real-world
programs, including Git, SQLite, libpng and chibicc itself, without making
modifications to the compiled programs. Generated executables of these
programs pass their corresponding test suites. So, chibicc actually supports
a wide variety of C11 features and is able to compile hundreds of thousands
of lines of real-world C code correctly.

If you like this project, please consider purchasing a copy of the book when
it becomes available! I publish the source code here to give people early
access to it, because I was planing to do that anyway with a permissive
open-source license after publishing the book. If I don't charge for the source
code, it doesn't make much sense to me to keep it private.

fas: fed500

Reproducible: Always

Comment 1 Fedora Review Service 2024-11-10 19:09:16 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8239729
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325026-chibicc/fedora-rawhide-x86_64/08239729-chibicc/fedora-review/review.txt

Found issues:

- chibicc : /usr/include/chibicc.h chibicc : /usr/include/chibicc/float.h chibicc : /usr/include/chibicc/stdalign.h chibicc : /usr/include/chibicc/stdarg.h chibicc : /usr/include/chibicc/stdatomic.h chibicc : /usr/include/chibicc/stdbool.h chibicc : /usr/include/chibicc/stddef.h chibicc : /usr/include/chibicc/stdnoreturn.h 
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages

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 3 Fedora Review Service 2024-11-11 10:18:23 UTC
Created attachment 2057009 [details]
The .spec file difference from Copr build 8239729 to 8240712

Comment 4 Fedora Review Service 2024-11-11 10:18:25 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8240712
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325026-chibicc/fedora-rawhide-x86_64/08240712-chibicc/fedora-review/review.txt

Found issues:

- chibicc : /usr/include/chibicc.h chibicc : /usr/include/chibicc/float.h chibicc : /usr/include/chibicc/stdalign.h chibicc : /usr/include/chibicc/stdarg.h chibicc : /usr/include/chibicc/stdatomic.h chibicc : /usr/include/chibicc/stdbool.h chibicc : /usr/include/chibicc/stddef.h chibicc : /usr/include/chibicc/stdnoreturn.h 
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages

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 Simone Caronni 2024-12-28 11:40:56 UTC
A couple of issues.

1) Delete the block at the top, it's not needed at all:

## START: Set by rpmautospec
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

2) For the Version field, since you are declaring the %shortcommit macro above, please use in the Version field:

Version:        0.0^20201207.%{shortcommit}

Personally, I would do it like the following:

%global commit 90d1f7f199cc55b13c7fdb5839d1409806633fdb
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global date 20201207
Name:           chibicc
Version:        0.0^%{date}.%{shortcommit}

3) In the install section, whenever you are using the install command, please also pass "-p" to preserve timestamps:

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_timestamps

4) In the %changelog section, remove everything and just use %autochangelog to have the changelog automatically populated with git commit messages:

%changelog
%autochangelog

Comment 6 Simone Caronni 2024-12-28 11:42:06 UTC
btw, just out of curiosity, why are you trying to package what it looks like an unfinished compiler which was last updated more than 4 years ago?

Comment 7 Benson Muite 2024-12-30 20:35:20 UTC
(In reply to Simone Caronni from comment #6)
> btw, just out of curiosity, why are you trying to package what it looks like
> an unfinished compiler which was last updated more than 4 years ago?

It is helpful to have a number of small C compilers to use when building other projects where
clang or gcc would produce output that is more difficult to understand.

Fixed other issues.

spec: https://fed500.fedorapeople.org/chibicc.spec
srpm: https://fed500.fedorapeople.org/chibicc-0.0^20201207.90d1f7f-1.fc42.src.rpm

Comment 8 Fedora Review Service 2024-12-30 20:37:02 UTC
Created attachment 2064307 [details]
The .spec file difference from Copr build 8240712 to 8455875

Comment 9 Fedora Review Service 2024-12-30 20:37:04 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8455875
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325026-chibicc/fedora-rawhide-x86_64/08455875-chibicc/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
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 10 Simone Caronni 2025-01-01 11:11:32 UTC
Package approved.

Comment 11 Fedora Admin user for bugzilla script actions 2025-01-02 11:06:42 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/chibicc

Comment 12 Fedora Update System 2025-01-02 12:49:25 UTC
FEDORA-2025-a105d85122 (chibicc-0.0^20201207.90d1f7f-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-a105d85122

Comment 13 Fedora Update System 2025-01-02 12:49:54 UTC
FEDORA-2025-b3dbacb6d2 (chibicc-0.0^20201207.90d1f7f-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b3dbacb6d2

Comment 14 Benson Muite 2025-01-02 12:57:24 UTC
Thanks for the review.

Comment 15 Fedora Update System 2025-01-03 03:57:58 UTC
FEDORA-2025-a105d85122 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-a105d85122 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-a105d85122

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2025-01-03 05:03:49 UTC
FEDORA-2025-b3dbacb6d2 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-b3dbacb6d2 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-b3dbacb6d2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2025-01-11 01:25:23 UTC
FEDORA-2025-a105d85122 (chibicc-0.0^20201207.90d1f7f-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2025-01-11 01:41:58 UTC
FEDORA-2025-b3dbacb6d2 (chibicc-0.0^20201207.90d1f7f-2.fc41) has been pushed to the Fedora 41 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.