* Package name : zig Version : 0.13.0 Upstream Contact: Andrew Kelley <andrew@ziglang.org> * URL : https://ziglang.org/ * License : MIT Programming Lang: C++ Description : Imperative programming language easily mixed with C Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software. It aims to be a better C, and interoperates very fluidly with C code. Zig is a language rapidly growing in popularity, battling it out with Rust (in a sense) for developer mindshare. It can easily subsume C repositories and supports incremental conversion. I'm using ghostty, written in Zig, and would like to package that for Debian as well. I would think a team the way to go. zigteam. Previous work attempted to package zig (#1012286, archived), but died out in the 0.10.x era. I'll be starting with 0.13.0.
i've been working on this afresh using zig 0.13.0.
here's the status:
1) zig source is signed with minisign, which is not supported
by uscan. i'm working on adding that support in #1092818.
2) i throw out all vendored code of which i'm aware. this
massively simplifies the copyright situation, and is
desirable anyway.
3) apparently we can include the binary zig1.wasm necessary
for bootstrapping 0.13.0, since we're also shipping the
sources and tools necessary to build it. such loops
are handled by e.g. gcc; there's precedent. so that means
we shouldn't need mess with zig-bootstrap at all.
4) zig 0.13.0 appears to build with llvm-20 in sid.
5) i've got the necessary infrastructure largely built up.
so i'm going to augment debian/rules using the redhat specfile
as a check. i'll pull in any copyright work done earlier that's
applicable, and hopefully there isn't much new stuff (we'll
see). this work is going on in https://salsa.debian.org/nickblack/zig
some notes/progress: (1) we are now building a zig binary deb on amd64 that passes most lintian checks, and appears to contain a working zig. most recent lintian check output:------------------------ $ lintian --suppress-tags "${SALSA_CI_LINTIAN_SUPPRESS_TAGS}" --display-info --pedantic ${SALSA_CI_LINTIAN_FAIL_ARG} --allow-root ${SALSA_CI_LINTIAN_SHOW_OVERRIDES_ARG} ${SALSA_CI_LINTIAN_ARGS} ${WORKING_DIR}/*.changes | tee lintian.output || ECODE=$? 39 W: zig source: missing-license-paragraph-in-dep5-copyright expat [debian/copyright:37] 40 W: zig: useless-whatis-entry [usr/share/man/man1/zig.1.gz] 41 I: zig source: file-contains-fixme-placeholder FIXME [debian/copyright:10] 42 I: zig source: file-contains-fixme-placeholder FIXME [debian/copyright:9] 43 I: zig: spelling-error-in-binary independant independent [usr/bin/zig] 44 I: zig: spelling-error-in-binary psuedo pseudo [usr/bin/zig] 45 I: zig: spelling-error-in-binary wTH with [usr/bin/zig] ------------------------ (2) i need to make it architecture-independent -- there are currently two hardcoded x86_64-specific paths. (3) there's a second binary file involved (beyond zig1.wasm): msdos-stub.bin. unlike the WASM, there does not appear to be any way to build this from sources available in the source package, so it will probably have to come out. it's only used in the COFF linking code, so that capability will probably be excised. i've mailed the upstream author asking for clarification here. (4) we're generating a (crappy) man page using help2man. (5) we're targeting llvm-18 currently. i'd like to target llvm-20 but it's not a pressing issue. (6) i've started on the work to support minisign in devscripts. it might be a small political battle to get this code included, but hopefully not. (7) i believe there to be a large test suite for zig, but if so, we're definitely not yet running it. i'd like to have this. (8) i had to rollback two exclusions to get things compiling: lib/include and lib/libunwind. i'd like to get rid of these if possible, but i'm unsure about libunwind (i think zig might require this specific copy? unsure). if we have to keep libunwind, i think we can still yeet lib/include via symlinks from /usr/include prior to the build step. (9) the BLHC (build log hardening check) salsa DI step is bitching at us. not yet sure if it's right in doing so. (a) jonathan carter mentioned wanting this by the end of the month; i think that's looking very doable.
good news on this front: the file is essentially ten machine code instructions. we're going to turn these into an inline constant with comment and kill the file. it's the exact same content, but the presentation is different, and IMHO this is DFSG-compatible (we'll see what ftpmasters have to say). a bug has been filed upstream by the project author, and i'm planning on implementing it this evening: https://github.com/ziglang/zig/issues/22487
i have submitted https://github.com/ziglang/zig/pull/22489 upstream to eliminate msdos-stub.bin. i'll make a quilt patch from this and we ought be good.
(1) we no longer have any lintian diagnostics beyond spelling errors ✅ (2) i've replaced these with $(DEBIAN_TARGET_HOST) ✅ (3) we no longer ship msdos-stub.bin ✅ (4) man page has been (minimally) improved ✅ (5) let's just track what upstream is doing for now (6) this is ongoing but not a blocker (7) should still probably work on the tests (8) got rid of include, but we need the vendored libunwind, restored ✅ (9) haven't looked into this (A) we ought be in NEW by the end of the week
* bartm@debian.org, 2025-01-13 00:52: As per Debian Developer's Reference §5.8.2: "You should _never_ close bugs via the bug server close command sent to control@bugs.debian.org. If you do so, the original submitter will not receive any information about why the bug was closed." https://www.debian.org/doc/manuals/developers-reference/pkgs.html#responding-to-bugs
ahhh fair enough bartm@ i had thought #995670 archived
Hi, I've uploaded a lintian-clean zig 0.15.2 package to mentors targeting experimental/non-free: https://mentors.debian.net/package/zig/ - Built against LLVM 20 (from experimental), since zig 0.15 requires it - Placed in non-free due to stage1/zig1.wasm (precompiled bootstrap binary, not source code per DFSG 2) and IETF RFC test data (BCP 78, no modifications allowed) - Includes full upstream tree (libtsan, libcxx, etc.) for cross-compilation support - help2man-generated man page Happy to coordinate with any existing efforts. Jesse