Bug 1912706 - Review Request: ziglang - open-source programming language designed for robustness, optimality, and clarity
Summary: Review Request: ziglang - open-source programming language designed for robus...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Stephen Kitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2021-01-05 09:55 UTC by serge_sans_paille
Modified: 2021-04-11 00:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-11 00:45:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description serge_sans_paille 2021-01-05 09:55:08 UTC
Spec URL: https://sergesanspaille.fedorapeople.org/ziglang.spec
SRPM URL: https://sergesanspaille.fedorapeople.org/ziglang-0.7.1-1.src.rpm
Description: Zig is an open-source programming language designed for robustness, optimality, and clarity
Fedora Account System Username: sergesanspaille

Comment 1 Stephen Kitt 2021-01-12 13:14:06 UTC
A few initial comments:

* the description isn’t great; I think it should at least indicate that the package is a compiler, and describe the supported targets (and be line-wrapped)
* the license isn’t complete, the various library headers have a lot of different licenses which affect the resulting binary package
* the excluded arches need BZs, see https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_build_failures
* why isn’t the documentation generated?

Comment 2 serge_sans_paille 2021-01-27 15:15:31 UTC
Thanks for the review and sorry for the late answer. I've uploaded the updated .spec and .rpms
* description: done
* I've updated the license field, including the comments needed for each bundled lib
* concerning the excluded archs, I should open the BZ only once the package is accepted
* there's... no documentation to generate, unless I missed something in their code source ;-)

Comment 3 Stephen Kitt 2021-01-27 15:33:56 UTC
Regarding the docs, I was thinking of the generator in the doc/ directory. It would be worth at least filing a bug upstream to ask for it to be integrated into the build ;-).

Comment 4 serge_sans_paille 2021-01-27 20:55:26 UTC
Issue opened as https://github.com/ziglang/zig/issues/7897

Comment 5 serge_sans_paille 2021-01-29 14:00:25 UTC
Spec and rpms updated with documentation generated. I've also submitted a patch upstream to automate documentation build (see https://github.com/ziglang/zig/pull/7911)

Comment 6 Jan Drögehoff 2021-01-29 17:06:21 UTC
you can simply build documentation with 'zig build docs' using the freshly compiled zig binary

am not a fan of bundling the zig stdlib with the actual binary since the stdlib is distributed in source form making it arch independent
this would also allow the main zig package to be licensed under just MIT

The generated langref.html documentation is also a handfull so I suggest making a -doc package for it

since zig has no official manpage yet (https://github.com/ziglang/zig/issues/715) I suggest using help2man


here is the spec I have been maintaining for a copr repo for reference to my suggestions
https://pagure.io/zig-spec/blob/fedora/f/zig.spec

Comment 7 serge_sans_paille 2021-02-01 14:58:39 UTC
Thanks for all the comments. Spec file updated here

Spec URL: https://sergesanspaille.fedorapeople.org/zig.spec
SRPM URL: https://sergesanspaille.fedorapeople.org/zig-0.7.1-1.src.rpm

scratch-build: https://koji.fedoraproject.org/koji/taskinfo?taskID=61017957

Comment 8 Stephen Kitt 2021-03-11 15:08:19 UTC
We’re getting there, thanks; the remaining issues are:

* zig-doc ships langref.html in /usr/share/doc/zig instead of /usr/share/doc/zig-doc
* the zig-doc description results in a line that’s too long; it should be wrapped after “%{name}.”
* the zig-libs summary isn’t capitalised (“zig standard library”)
* /lib/ is hard-coded (“%{_prefix}/lib/%{name}”)
* “optimality” isn’t recognised as a word (but it is in at least some dictionaries)

Also, Zig 0.7.1 requires clang 11 but Rawhide now has 12.

Comment 9 Stephen Kitt 2021-03-11 17:11:24 UTC
To build with clang 11, change the cmake invocation to

%cmake \
    -DLLVM_CONFIG_EXE=%{_bindir}/llvm-config-11-%{__isa_bits} \
    -DLLVM_INCLUDE_DIRS=%{_libdir}/llvm11/include \
    -DLLVM_LIBRARIES=%{_libdir}/llvm11/lib \
    -DCLANG_INCLUDE_DIRS=%{_libdir}/include/clang \
    -DCLANG_LIBRARIES=%{_libdir}/llvm11/lib \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DZIG_PREFER_CLANG_CPP_DYLIB=ON \
    -DZIG_VERSION:STRING="%{version}"

and the build requires to

BuildRequires: llvm11-devel
BuildRequires: clang11-devel


The overall build fails because the lld11 libraries aren’t available.

Comment 10 Jan Drögehoff 2021-03-11 18:20:47 UTC
(In reply to Stephen Kitt from comment #8)
> * /lib/ is hard-coded (“%{_prefix}/lib/%{name}”)
Last I checked zig does not accept lib64 or the like and considering
the entire standard library is distributed in plain text making an
arch independent package that puts it into /lib/ seems fine to me

Comment 11 Stephen Kitt 2021-03-12 09:11:30 UTC
(In reply to Jan Drögehoff from comment #10)
> (In reply to Stephen Kitt from comment #8)
> > * /lib/ is hard-coded (“%{_prefix}/lib/%{name}”)
> Last I checked zig does not accept lib64 or the like and considering
> the entire standard library is distributed in plain text making an
> arch independent package that puts it into /lib/ seems fine to me

Thanks for the explanation, I agree that seems fine.

Comment 12 Package Review 2021-04-11 00:45:17 UTC
This is an automatic action taken by review-stats script.

The ticket submitter failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we consider this ticket as DEADREVIEW and proceed to close it.


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