Bug 1968139

Summary: Review Request: zig - Programming language for maintaining robust, optimal, and reusable software
Product: [Fedora] Fedora Reporter: Jan Drögehoff <sentrycraft123>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <zebob.m>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, zebob.m
Target Milestone: ---Flags: zebob.m: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-16 20:48:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Drögehoff 2021-06-05 21:31:44 UTC
Spec URL: https://pagure.io/zig-spec/raw/fedora2/f/zig.spec
SRPM URL: https://releases.pagure.org/zig-spec/zig-0.8.0-1.fc34.src.rpm
Description: Zig is an open-source programming language designed for robustness, optimality, and clarity.
Fedora Account System Username: sentry

Things to note:
- failing to build documentation is ignored because it requires a supported glibc version which Rawhide doesn't have. If there is a better way to check for rawhide without chasing the version please note
- tests aren't run because of an LLVM bug on Fedora 34 and because of an unsupported glibc version on rawhide

Comment 1 Robert-André Mauchin 🐧 2021-06-06 17:54:05 UTC
 - Can't this be unbundled?

# NCSA
Provides: bundled(compiler-rt) = 12.0.0
# LGPLv2+, LGPLv2+ with exceptions, GPLv2+, GPLv2+ with exceptions, BSD, Inner-Net, ISC, Public Domain and GFDL
Provides: bundled(glibc) = 2.33
# NCSA
Provides: bundled(libcxx) = 12.0.0
# NCSA
Provides: bundled(libcxxabi) = 12.0.0
# NCSA
Provides: bundled(libunwind) = 12.0.0
# BSD, LGPG, ZPL
Provides: bundled(mingw) = 8.0.0
# MIT
Provides: bundled(musl) = 1.2.2

 - Use ExclusiveArch instead

# lld not available on that arch
ExcludeArch: s390x

# minimal support, not worth building
# https://ziglang.org/download/0.8.0/release-notes.html#Support-Table
ExcludeArch: ppc64le


 - I would recommend creating a RPM macro file with a zig_arches macro to use in future zig package. Maybe also a zig_build and zig_install if necessary.

 - Where are the tests:

# for testing
BuildRequires:  elfutils-libelf-devel
BuildRequires:  libstdc++-static

 - The man pages extension shouldn't be globbed as the compression may change:

%{_mandir}/man1/%{name}.1.*

Comment 2 Jan Drögehoff 2021-06-07 12:26:18 UTC
(In reply to Robert-André Mauchin 🐧 from comment #1)
>  - Can't this be unbundled?

Zig includes parts of these projects for itself, its standard library and cross compilation support

Here is a breakdown on where what is used:

- compiler-rt is used within the standard library and has been ported to zig
  https://github.com/ziglang/zig/tree/masterlib/std/special/compiler_rt

- glibc, mingw and musl have their header files bundled for cross compilation
  and in the case for glibc it also keeps track of ABI changes and functions
  https://github.com/ziglang/zig/tree/master/lib/libc/

- libcxx is included for C++ cross compilation
  https://github.com/ziglang/zig/tree/master/lib/libcxx

- libunwind is included for debugging
  https://github.com/ziglang/zig/blob/master/lib/libunwind

>  - Use ExclusiveArch instead

I had initially followed https://fedoraproject.org/wiki/Architectures#ExcludeArch_.26_ExclusiveArch
but considering zig has a well defined list of supported systems that is probably for the better

>  - I would recommend creating a RPM macro file with a zig_arches macro to use in future zig package. Maybe also a zig_build and zig_install if necessary.

Zigs build system is rather ambigious but I went and made one anyways
it didn't allow specifying the lib suffix so I went and created a patch that allows specifying absolute paths to the lib dir, bin dir and include dir that are in the process of being upstreamed

https://github.com/ziglang/zig/pull/9020

>  - Where are the tests:

Test were removed but in retrospect it would have probably been better to comment them out with a reason why

Right now the non rawhide tests are affected by
https://bugs.llvm.org/show_bug.cgi?id=49401
https://github.com/ziglang/zig/issues/8130

and the rawhide builds don't compile because of an unsupported glibc version

>  - The man pages extension shouldn't be globbed as the compression may
> change:

Fair point, changed

Spec URL: https://pagure.io/zig-spec/blob/fedora2/f/zig.spec
SRPM URL: https://releases.pagure.org/zig-spec/zig-0.8.0-1.fc34.src1.rpm

Comment 3 Robert-André Mauchin 🐧 2021-06-07 15:50:52 UTC
Package approved.

Comment 4 Gwyn Ciesla 2021-06-07 18:32:31 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/zig

Comment 5 Fedora Update System 2021-06-07 21:28:29 UTC
FEDORA-2021-d2b8b465c9 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d2b8b465c9

Comment 6 Fedora Update System 2021-06-09 01:17:11 UTC
FEDORA-2021-d2b8b465c9 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-d2b8b465c9 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d2b8b465c9

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

Comment 7 Fedora Update System 2021-06-16 20:48:48 UTC
FEDORA-2021-d2b8b465c9 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.