1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-07 17:24:07 +02:00

Compare commits

...

73 Commits

Author SHA1 Message Date
Nicolas Graves 9f752f9c47 gnu: libarchive: Reference libraries absolutely via configure flags.
* gnu/packages/backup.scm (libarchive)
[#:configure-flags]: Add 'LIBS' flag.
[#:phases] {add--L-in-libarchive-pc}: Delete phase.

Change-Id: I85f623043e98b82e46b9afe18c0be53cc7961d4b
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
Modified-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-11-20 14:37:54 +09:00
Maxim Cournoyer f8654d777e gnu: libarchive: Update to 3.8.3.
A flaky test was encountered in the previous 3.7.7. version.  Built
successfully 10 times.

* gnu/packages/backup.scm (libarchive): Update to 3.8.3.
[#:phases] {patch-pwd}: Rename to...
{patch-commands}: ... this, and patch /bin/sh in test_main.c.
{check}: Build tests in parallel. Set SKIP_OPEN_FD_ERR_TEST and
IGNORE_TRAVERSALS_TEST4 environment variables.

Change-Id: I479357d6bdcd907e6893095da91f215ce0f1aa14
2025-11-20 14:20:03 +09:00
Maxim Cournoyer df4cac9a52 gnu: strace: Reinstate parallel tests.
The test suite takes a long time otherwise, and we're a couple major versions
after the original issue was opened many years ago.  Built 10 times without
issue with 32 cores.

* gnu/packages/linux.scm (strace) [#:parallel-tests?]: Delete argument.

Change-Id: I15e327fc9e41918c73af3c8e398f9174a30f3156
2025-11-20 14:00:22 +09:00
Maxim Cournoyer 851058946f gnu: binutils-mesboot1: Increase max-silent-time property value.
* gnu/packages/commencement.scm (binutils-mesboot1)
[properties]: New field.

Change-Id: I9f9ef628336c6f8f9f76c800d30944aee4894ee2
2025-11-20 11:44:20 +09:00
Yelninei 0ca613b92b gnu: zstd: Fix linking to pthread on the Hurd.
* gnu/packages/compression.scm (zstd) <#:make-flags> [hurd]: Add
"PCMTLIB=-pthread".

Change-Id: I0fb3ff872d223197ea86831917924e185ef2591c
2025-11-19 09:42:50 +09:00
Yelninei 8b04fe8dd4 gnu: zstd: Update to 1.5.7.
* gnu/packages/compression.scm (zstd): Update to 1.5.7.
(zstd-1.5.7): Delete variable.
(pzstd): Inherit from zstd.
* gnu/packages/emulators.scm (pcsx2) [inputs]: Replace zstd-1.5.7 with zstd.

Change-Id: I6be3ce52de37d1377b20aff957ad6d0a5a6ff763
Co-authored-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-11-19 09:42:50 +09:00
Maxim Cournoyer 40a339d762 system/install: Adjust for the new Info Zstd extension.
* gnu/system/install.scm (log-to-info): Adjust to use the .zst file extension.

Change-Id: I2dfc0cc762da04ede7b9c6096edcd6b80989dc85
2025-11-19 09:42:50 +09:00
Maxim Cournoyer 1b5f5b6876 gnu: u-boot-documentation: Adjust to use Zstd file extension.
* gnu/packages/bootloaders.scm (u-boot-documentation)
[#:phases] {install}: Replace .gz with .zst.

Change-Id: If45a1024bea9329837d3ec7d2868bad8e54c82a7
2025-11-19 09:42:14 +09:00
Maxim Cournoyer 9be207ffbd gnu: emacs-graphviz-dot-mode: Adjust to use Zstd file extension.
* gnu/packages/emacs-xyz.scm (emacs-graphviz-dot-mode)
[#:phases] {install-info}: Replace .gz with .zst.

Change-Id: I3811c7c8882caaa9d9ca9788a112cd590a09039f
2025-11-19 09:42:14 +09:00
Maxim Cournoyer ce55a6471e gnu: linux-libre-documentation: Adjust to use Zstd file extension.
* gnu/packages/linux.scm (linux-libre-documentation):
[#:phases] {install}: Use the .zst file extension.

Change-Id: Ia9df97e9461fc307c51ae374bedf205ce8e4c0e9
2025-11-19 09:42:14 +09:00
Maxim Cournoyer f5bb4d7d24 profiles: Handle Zstd-compressed Info files in the profile hook.
* guix/profiles.scm (info-dir-file): Register the .info.zst file extension.
Remove gzip from the environment; both gzip and unzstd are captured directly
by texinfo.

Change-Id: Ie150507de5b5865612a6205d2aeb83a940272a87
2025-11-19 09:42:14 +09:00
Maxim Cournoyer 8498a2b274 gnu: emacs-minimal: Add Zstd support.
* gnu/packages/emacs.scm (emacs-minimal) [#:phases]
{wrap-emacs-paths}: Add $zstd/bin to PATH environment variable in wrapper.
[inputs]: Add zstd.

Change-Id: I235c218af96297f509278a247195c874b4e4548b
2025-11-19 09:42:13 +09:00
Maxim Cournoyer 9c8fa8e68a gnu: info-reader: Add Zstd support.
* gnu/packages/texinfo.scm (info-reader)
[#:phases] {absolute-binary-path}: Patch file name of unzstd command.
{keep-only-info-reader}: Delete trailing #t.
[inputs]: Add zstd.

Change-Id: I9f5ed3260c890d87ea8ced59736311ad72422359
2025-11-19 09:42:13 +09:00
Maxim Cournoyer 93177e35e3 build/gnu-build-system: Zstd compress Texinfo files.
* guix/build/gnu-build-system.scm (compress-documentation)
<info-compressor, info-compressor-flags>
<info-compressor-file-extension>: Default to zstd if available.

Change-Id: I837c6e2eda6db8dd963dee39af251b2619e8bce8
2025-11-19 09:42:13 +09:00
Maxim Cournoyer 6c270f46bb gnu: texinfo-7: Update to 7.2.
* gnu/packages/texinfo.scm (texinfo-7): Update to 7.2.

Change-Id: Ia8244fa931d4696463a70efdd3281c502f4c8ee1
2025-11-19 09:42:13 +09:00
Maxim Cournoyer bb81a40b22 Revert "utils: Set $0 to basename of command in `wrap-program'."
This reverts commit df94888eca.  This was
working around a problem in cling, which should be addressed in cling -- the
wrapper should be as transparent as possible.

Fixes: #1674
Change-Id: Ib4e5d62c5eb65c92ece8a99a10979a1f0173d49c
2025-11-19 09:42:13 +09:00
Maxim Cournoyer aeb3e89699 gnu: texlive-bin: Patch to fix non-deterministic test.
* gnu/packages/patches/texlive-bin-luaoutputdir-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/tex.scm (texlive-bin): Apply it.

Fixes: #1628
Change-Id: I3d99a033c123c35f562879ea1cccca87a7267574
2025-11-19 09:42:13 +09:00
Maxim Cournoyer b9cc5eede9 gnu: pstoedit: Update to 4.02.
* gnu/packages/graphics.scm (pstoedit): Update to 4.0.2.
[source]: Remove pstoedit-fix-plainC.patch.
* gnu/packages/patches/pstoedit-fix-plainC.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register it.

Change-Id: I885722d147b40742feffd134eb9c17d9ea54a791
2025-11-19 09:42:13 +09:00
Maxim Cournoyer 411a383b63 gnu: python-uvicorn: Update to 0.38.0.
* gnu/packages/python-web.scm (python-uvicorn): Update to 0.38.0.
[#:test-flags]: Add "-W" "ignore::DeprecationWarning" and "-W"
"ignore::ResourceWarning". Always skip the
`test_send_binary_data_to_server_bigger_than_default_on_websockets' test.
[native-inputs]: Add python-pytest-xdist.

Change-Id: I3de70d764311350866e1820d52dd20b3442738da
2025-11-19 09:42:13 +09:00
Maxim Cournoyer d003358249 gnu: python-a2wsgi: Update to 1.10.10.
* gnu/packages/python-web.scm (python-a2wsgi): Update to 1.10.10.

Change-Id: I665b063d9511cb894a2c96826b4c4ebc218a3140
2025-11-19 09:42:13 +09:00
Maxim Cournoyer 4499f13dd4 gnu: python-cryptography: Update to 44.0.3.
* gnu/packages/python-crypto.scm (python-cryptography): Update to 44.0.3.

Change-Id: I5dae6026161bbf2743001c6f57a0412a2ee91bf5
2025-11-19 09:42:13 +09:00
Maxim Cournoyer a295e083d3 gnu: python-cryptography-vectors: Update to 44.0.3.
* gnu/packages/python-crypto.scm (python-cryptography-vectors): Update to 44.0.3.

Change-Id: Ia89b7df21be4b959c8985d5ef2ec5d564dbcbb6e
2025-11-19 09:42:13 +09:00
Maxim Cournoyer edf449a995 gnu: python-pexpect: Run tests in parallel.
* gnu/packages/python-xyz.scm (python-pexpect) [#:test-flags]: Add "-n"
argument.  Ignore test_socket.py and test_socket_fd.py.
[native-inputs]: Add python-pytest-xdist.

Change-Id: I17492104517579da3d63a130eab51e96ec8efa53
2025-11-19 09:42:13 +09:00
Maxim Cournoyer b92b51c65a gnu: python-arrow: Update to 1.4.0.
* gnu/packages/time.scm (python-arrow): Update to 1.4.0.
[propagated-inputs]: Add python-tzdata.

Change-Id: I9e6449b99242d09019d8d0715ad405d2b514c11d
2025-11-19 09:42:13 +09:00
Maxim Cournoyer c0b3d143d9 gnu: libinput: Update to 1.29.901.
* gnu/packages/freedesktop.scm (libinput): Update to 1.29.901.
[arguments]: Use gexps.
<#:phases>: Delete field.

Change-Id: I84a40cb03bb2e44c92797a42a87b01324b5b3362
2025-11-19 09:42:12 +09:00
Maxim Cournoyer b5a9486ffa gnu: python-coverage: Update to 7.11.0.
Hopefully resolving spurious test failures.

* gnu/packages/check.scm (python-coverage): Update to 7.11.0.
[#:test-flags]: Ignore tests/test_core.py and tests/test_api.py test files.
Disable test_good_needs_scrubs test.

Change-Id: Ibc3cd793ccc9cfe6ad6a151c208e321c89a4474b
2025-11-19 09:42:12 +09:00
Maxim Cournoyer d206df153a gnu: tzdata: Fix indentation.
* gnu/packages/base.scm (tzdata): Fix indentation.

Change-Id: If1e059faf8ca92860a4737ae2dc25dc6c053651a
2025-11-19 09:42:12 +09:00
Maxim Cournoyer e92f831862 gnu: tzdata: Install leap-seconds.list file.
* gnu/packages/base.scm (tzdata/leap-seconds): Delete variable.
(tzdata) [#:phases] {post-install}: Install leap-seconds.list.

Change-Id: I86cefd027e945281fd7ab5d966c770163d69b484
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 8df2317617 gnu: python-pytz: Update to 2025.2.
* gnu/packages/time.scm (python-pytz): Update to 2025.2.

Change-Id: I9a38a80b0c41b51a9315ab56caaec385085ac11c
2025-11-19 09:42:12 +09:00
Maxim Cournoyer f23aeb3814 gnu: python-tzdata: Update to 2025.2.
* gnu/packages/time.scm (python-tzdata): Update to 2025.2.

Change-Id: I43ca468057f1ec0569f38843842adb9f23e477c3
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 6f3c44b45b gnu: tzdata: Update to 2025b.
* gnu/packages/base.scm (tzdata): Update to 2025b.

Change-Id: I11265546a4613d1e8a6a7263178db146f299f550
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 1ac216d21a gnu: python-markdown: Update to 3.10.
The previous version sometimes failed its test suite.

* gnu/packages/python-xyz.scm (python-markdown): Update to 3.10.

Change-Id: I7851c70e95cd927edfa0ea05c82e3effb409c24b
2025-11-19 09:42:12 +09:00
Maxim Cournoyer e25131fd05 gnu: gtk+: Update to 3.24.49, absorbing graft.
* gnu/packages/gtk.scm (gtk): Update to 3.24.49.
[replacement]: Delete field.
(gtk+/fixed): Delete variable.

Change-Id: I5161544444c47b2ed2df0e9e54d8b7905a5cc91d
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 615c9b2cee gnu: gtk+: Fix indentation.
* gnu/packages/gtk.scm (gtk+): Fix indentation.

Change-Id: I3020e33537bee428958fe5a92db88aec082f301e
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 32e3c68892 gnu: python: Update to 3.11.14, absorbing graft.
* gnu/packages/python.scm (python-3.11/fixed): Delete variable.
(python-3.11): Update to 3.11.14.

Change-Id: I764c47b1a78f0663e5ec2780da8b186f6092bdb6
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 2a065c5838 gnu: libpng-apng: Update to 1.6.50, absorbing libpng-apng-next.
* gnu/packages/image.scm (libpng-apng): Update to 1.6.50.
[arguments]: Use gexps.
[inputs]: Update libpng-apng hash.
(libpng-apng-next): Delete variable.
* gnu/packages/gnuzilla.scm (icecat-minimal): Replace libpng-apng-next
with libpng-apng.
* gnu/packages/librewolf.scm (librewolf) [inputs]: Likewise.

Change-Id: I464188e4c08e9d076ce9deff8811f7ca0b753433
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 1766f0a40c gnu: plotutils: Unbundle libxmi and apply other Gentoo patches.
* gnu/packages/patches/plotutils-c23.patch
* gnu/packages/patches/plotutils-configure-c99.patch
* gnu/packages/patches/plotutils-cxx17-fix.patch
* gnu/packages/patches/plotutils-format-security.patch
* gnu/packages/patches/plotutils-libxmi.patch
* gnu/packages/patches/plotutils-makefile.patch
* gnu/packages/patches/plotutils-rangecheck.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register them.
* gnu/packages/plotutils.scm (plotutils) [source]: Delete bundled libxmi and
apply patches.
[#:configure-flags]: Add --disable-static.
[#:phases]: Add force-bootstrap phase.
[native-inputs]: Add autoconf, automake and libtool.
[inputs]: Add libxmi.

Change-Id: Ib6c5e6a1e3d70222c94a97ebe19e9d75e7b7b64d
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 90ce7d84e6 gnu: libxmi: Update to 1.3.
* gnu/packages/graphics.scm (libxmi): Update to 1.3 and apply Gentoo patches.
* gnu/packages/patches/libxmi-gcc15.patch: New file.
* gnu/packages/patches/libxmi-implicit.patch: New file.
* gnu/local.mk: Register them.

Change-Id: I73afe29743ebb99a5d2146f65ad76ec9a18c2466
2025-11-19 09:42:12 +09:00
Maxim Cournoyer 1fd565b7e3 gnu: Add libxmi.
* gnu/packages/graphics.scm (libxmi): New variable.

Change-Id: Ied70b93ca5dee3c02e42bad0de5cd1d4299445ea
2025-11-19 09:42:12 +09:00
Maxim Cournoyer bed3a5ff37 gnu: hello: Add debug output.
* gnu/packages/base.scm (hello) [outputs]: New field.

Change-Id: I92f28fbc2a00f62626afe269bf86aecee004612b
2025-11-19 09:42:11 +09:00
Maxim Cournoyer f248ea111f gnu: gcc-mesboot: Raise default timeout via property.
It was found to time out in the CI after 21600 seconds.

* gnu/packages/commencement.scm (gcc-mesboot) [properties]: New field.

Change-Id: Idec8a668f4f15e9ed3712d505b82704260b4295d
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 1029981e70 elf: Remove bundled Guile source.
This module has been included in Guile as (system vm elf) since around version
2.1.

* guix/elf.scm: Delete file.
* CODEOWNERS: De-register module.
* Makefile.am (MODULES): Likewise.
* etc/teams.scm (core): Likewise.
* gnu/build/linux-modules.scm: Adjust imports.
* gnu/packages/gnuzilla.scm (icecat-minimal) [modules]: Likewise.
* gnu/packages/librewolf.scm (librewolf): Likewise.
* gnu/packages/sequoia.scm (sequoia): Likewise.
* gnu/packages/tor-browsers.scm (make-torbrowser): Likewise.
* gnu/packages/version-control.scm (hg-commitsigs): Likewise.
* guix/build/debug-link.scm: Likewise.
* guix/build/meson-build-system.scm: Likewise.
* guix/grafts.scm (graft-derivation/shallow): Likewise.
* guix/scripts/pack.scm (wrapped-package): Likewise.
* tests/debug-link.scm: ("elf-debuglink", "set-debuglink-crc"): Likewise.
* tests/gremlin.scm: Likewise.
* guix/build/syscalls.scm (has-access-to-libc-shared-library?): New procedure.
* guix/build-system/gnu.scm (%default-gnu-imported-modules): Remove (guix elf).
* guix/build/gnu-build-system.scm: Lazily load (system vm elf).
(has-elf-editing-support?): New variable.
(strip) [!has-elf-editing-support?] <guile-bytecode?>: Do not check ELF
section.
(compress-debug-info): [!has-elf-editing-support?]: Skip phase.
(validate-runpath): Likewise.
(make-dynamic-linker-cache): Likewise.
* guix/build/gremlin.scm: Lazily load (system vm elf).

Change-Id: I86ac4237fdd820a6b54dc0fe7a7d10403a290ef9
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 9f8a93b955 Use mmap for the elf parser, reducing memory usage.
The `file->bytevector' new procedure uses a memory mapped bytevector, so
parsing the ELF file reads only the sections needed, not the whole file.

* guix/scripts/pack.scm (wrapped-package): Use file->bytevector.
* guix/build/gnu-build-system.scm (strip, compress-debug-info): Likewise.
(validate-runpath): Update doc.
* guix/build/gremlin.scm (file-dynamic-info): Use file->bytevector.
(validate-needed-in-runpath): Likewise.
(strip-runpath): Likewise, and write to bytevector directly, avoiding a port.
(set-file-runpath): Likewise.
* tests/gremlin.scm (read-elf): Delete procedure.
("elf-dynamic-info-needed, executable"): Use file-dynamic-info.
("strip-runpath"): Likewise.
("elf-dynamic-info-soname"): Likewise.
("strip-runpath", "set-file-runpath + file-runpath"): Do not execute file,
which can now lead to a ETXTBSY (text file busy) error.
* guix/build/debug-link.scm (set-debuglink-crc): Use file->bytevector.
* tests/debug-link.scm (read-elf): Delete procedure.
("elf-debuglink"): Rename to...
("elf-debuglink, no .gnu_debuglink section"): ... this.
("elf-debuglink", "set-debuglink-crc"): Use external store, and adjust to use
file->bytevector.
* gnu/packages/gnuzilla.scm (icecat-minimal) [#:phases]
{build-sandbox-whitelist}: Use `file-runpath'.
* gnu/packages/librewolf.scm (librewolf): Likewise.
* guix/build-system/gnu.scm (%default-gnu-imported-modules): Add transitive
dependencies of (guix build gremlin).

Fixes: <https://issues.guix.gnu.org/59365>
Fixes: #1262
Fixes: #3974
Change-Id: I43b77ed0cdc38994ea89d3d401e0d136aa6b187a
2025-11-19 09:42:11 +09:00
Maxim Cournoyer fdc13e85a6 syscalls: Add mmap support.
* guix/build/syscalls.scm (protection, protection-set, mmap-flag)
(mmap-flag-set, %mmap-guardian, %unmapped-bytevectors): New variables.
(hurd?, protection-symbol->value, protection-set->value)
(mmap-flag-symbol->value, mmap-flag-set->value, pump-mmap-guardian)
(%map-failed, %mmap, mmap, %munmap, munmap, %msync, msync): New procedures.
* guix/build/io.scm: New file.
* Makefile.am: Register it.
* tests/syscalls.scm: ("mmap", "file->bytevector, reading")
("file->bytevector, writing"): New tests.

Change-Id: I19ec687899eda635559e91200dd8d98669b0e35f
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 0368fbf205 gnu: hunspell: Update to 1.7.2.
* gnu/packages/hunspell.scm (hunspell): Update to 1.7.2.
[native-inputs]: Add gettext-minimal.

Change-Id: Ibdc4378c90a1a1fbad0134f6d7744fad2aac3d86
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 7141acb4a3 gnu: autoconf: Update to 2.72.
* gnu/packages/autotools.scm (autoconf): Point to autoconf-2.72.
* gnu/packages/dbm.scm (bdb-4.8) [native-inputs]: Replace autoconf with
autoconf-2.69.

Change-Id: Ifa0fdd7bab21aa585e729f4e6ccf8ab15b0f73f3
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 15405dc8e5 gnu: help2man: Update to 1.49.3.
* gnu/packages/man.scm (help2man): Update to 1.49.3.

Change-Id: I9fc62620e89ca1f66b5ec402b19c639425ee5ecb
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 3ac1fba670 gnu: gettext-minimal: Update to 0.26.
* gnu/packages/gettext.scm (gettext-minimal): Update to 0.26.

Change-Id: I7d594b6a89a7e12a5e0ed2da7875407800e33415
2025-11-19 09:42:11 +09:00
Maxim Cournoyer b37223a555 gnu: acl: Update to 2.3.2.
* gnu/packages/acl.scm (acl): Update to 2.3.2.

Change-Id: I379bc4428abbb951f5befa1d8da5fbac4dfbeeb8
2025-11-19 09:42:11 +09:00
Maxim Cournoyer bd1ad1e164 gnu: libtool: Update to 2.5.4.
* gnu/packages/autotools.scm (libtool): Update to 2.5.4.
[source]: Delete patches.
[#:phases] {skip-some-tests-on-extra-archs}: New phases.
* gnu/packages/patches/libtool-grep-compat.patch: Delete file.
* gnu/packages/patches/libtool-skip-tests2.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.

Change-Id: I6f16e7edd996c5b577acdbbd4905ec63d27b3655
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 2a2d1806b0 gnu: flex: Move bison-for-tests input to native inputs.
If it's truly for tests, it ought to be a native inputs.

* gnu/packages/flex.scm (flex) [inputs]: Delete field, moving bison-for-tests...
[native-inputs]: ... here.

Change-Id: I7fa30de00b1a6386d495403a619f412daa9d1ab5
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 4ac304d333 gnu: flex: Apply a patch fixing a non-deterministic build failure.
* gnu/packages/patches/flex-fix-make-dependencies.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/flex.scm (flex) [source]: Apply it, wrapping the origin in a
bootstrap-origin call to avoid a circular dependency problem.

Change-Id: I7b9994a9239bdafa5c7768b9f954870716c76ad7
2025-11-19 09:42:11 +09:00
Maxim Cournoyer e07d5c2492 gnu: m4: Update to 1.4.20.
* gnu/packages/m4.scm (m4): Update to 1.4.20.

Change-Id: I8c1d352f8bb7142e196d301254e19c322a9c498a
2025-11-19 09:42:11 +09:00
Maxim Cournoyer d62d392b4f gnu: ed: Update to 1.22.2.
* gnu/packages/text-editors.scm (ed): Update to 1.22.2.

Change-Id: Ib2a2fa6c5a5171337849f56edc609db1b506350b
2025-11-19 09:42:11 +09:00
Maxim Cournoyer f0011f3623 gnu: bash: Update to 5.3.
* gnu/packages/bash.scm (patch-url): Update URL.
(%patch-series-5.2): Rename to...
(%patch-series-5.3): ... this, and update patch series.
(bash): Update to 5.3.  Adjust for the above accordingly.

Change-Id: Iac8ad192ba8246d500d995382fe46e4cd368eecc
2025-11-19 09:42:11 +09:00
Maxim Cournoyer 50158584d1 gnu: readline: Update to 8.3.
* gnu/packages/readline.scm (%patch-series-8.2): Rename to...
(%patch-series-8.3): ... this, and update.
(readline): Update to 8.3.  Adjust for the above.

Change-Id: I9109153748f65650e82f5fcf27e926b888476dd8
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 3294f22540 gnu: xz: Update to 5.8.1.
* gnu/packages/compression.scm (xz): Update to 5.8.1.

Change-Id: I34bd64c5e18ea331e4bfe91d79dd419486296fe3
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 7d9124e119 build/gnu: Add a compress-debug-info phase.
This new phase reduces the debug output of large C++ packages such as
qtdeclarative by about 20%.

* guix/build/gnu-build-system.scm (compress-debug-info): New procedure.
(%standard-phases): Register it.

Relates-to: #3617
Change-Id: I9463f1299d97c20eee5d6f685a2f1abbb05545f0
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 4a2a87cac6 build/gnu: Do not attempt to strip Guile byte-compiled files.
This fails and produces noise and spurious debug files.

* guix/build/gnu-build-system.scm (strip) <guile-bytecode?>: New predicate.
Use it to filter out .go files from the files to be stripped.

Change-Id: I3063083a7d04d903d85d28d9526fdec079914fce
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 19a07eb0b9 gnu %final-inputs: Add dwz-final.
* gnu/packages/commencement.scm (%final-inputs): Register dwz-final.

Change-Id: Iff6842cbf691d3ea38bdfecc7d3816b0806d6f0d
2025-11-19 09:42:10 +09:00
Maxim Cournoyer a18097b4f2 gnu: Add dwz-final.
* gnu/packages/commencement.scm (dwz-final): New variable.

Change-Id: I2a0453fbca2184e3f31c9b92190dfd7259c5541a
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 014b4e2a09 gnu: Add xxhash-final.
* gnu/packages/commencement.scm (xxhash-final): New variable.

Change-Id: Ib3839b2233026527c8bf942db9cd9904eb079c5f
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 8206161036 gnu: Add elfutils-final.
Thanks to Yelninei for testing on the Hurd.

* gnu/packages/commencement.scm (elfutils-final): New variable.

Change-Id: Ibcd0cdf2ba2d90232f097ea6599548e30aeb20d8
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 08024902ff gnu: Add dwz.
* gnu/packages/elf.scm (dwz): New variable.

Co-authored-by: Danny Milosavljevic <dannym@friendly-machines.com>
Change-Id: I6d328109c246ee098680a14eed556d29b890a057
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 8f29e41d4e gnu: binutils: Use zstd compression level 19.
* gnu/packages/base.scm (binutils) [#:phases]
{use-zstd-compression-level-19}: New phase.
(binutils-gold) [#:phases]
{use-zstd-compression-level-19-for-gold}: New phase.

Change-Id: I0e75329bb231dba39db61a880eb306c58c0acc11
2025-11-19 09:42:10 +09:00
Maxim Cournoyer bc357f8f37 gnu: binutils-boot0: Refactor arguments.
When the inherited binutils package had a #:phases argument, it would replace
that fo binutils-boot0 (being appended), and causing breakage.

* gnu/packages/commencement.scm (binutils-boot0): Do not append the inherited
binutils arguments; modify them with a chained ensure-keyword-arguments and
substitute-keyword-arguments.

Suggested-by: Rutherther <rutherther@ditigal.xyz>
Change-Id: If1245556e363b9a1da2e2bb65c83e3b3aa4ff6de
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 0741aaad59 gnu: binutils: Enable zstd compression.
* gnu/packages/base.scm (binutils) [native-inputs]: Add pkg-config.
[inputs]: Add zstd:lib.
(binutils-gold) [#:phases] {set-LD_LIBRARY_PATH}: New phase.

Change-Id: I344242724b5978c98dd20d8309de02702e78cf9a
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 77af0a799c gnu: binutils: Do not compress debug sections.
This is in preparation to a new phase which will deduplicate debug symbols
with dwz (and compress them after via objcopy).

* gnu/packages/base.scm (binutils) [#:configure-flags]: Remove
--enable-compressed-debug-sections=all.

Change-Id: I992bc680f3e5f7bb6b7aae81e9311352745402cf
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 7bca596364 gnu: binutils: Fix indentation.
* gnu/packages/base.scm (binutils): Fix indentation.

Change-Id: Icd8d298e00ae6c826aaef5f4e59688b6d8374b9e
2025-11-19 09:42:10 +09:00
Maxim Cournoyer a9a9e25e7a gnu: binutils-final: Enable zstd support.
* gnu/packages/commencement.scm (binutils-final)
[#:allowed-references]: Add zstd-final:lib.
[native-inputs]: Add pkg-config-final.
[inputs]: Add zstd-final:lib.

Change-Id: I2c57f376f79ab866bce4456a41e752fcfa5c9826
2025-11-19 09:42:10 +09:00
Maxim Cournoyer 49f26dbc54 gnu: Add pkg-config-final.
* gnu/packages/commencement.scm (pkg-config-final): New package.
(make-gnu-make-final): Use it.

Change-Id: I1452a09e765de863ac9725ac7924a0a97d3010ca
2025-11-19 09:42:10 +09:00
Maxim Cournoyer ac94110f7b gnu: %final-inputs: Use zstd-final.
* gnu/packages/commencement.scm (%final-inputs): Use zstd-final instead of
computing it, now that there's a binding for it.

Change-Id: I3d28538b56f2480397d827cd4dac1275f0d27d66
2025-11-19 09:42:10 +09:00
Maxim Cournoyer b248fbf63c gnu: Add zstd-final.
* gnu/packages/commencement.scm (zstd-final): New variable.

Change-Id: Ic6bef892f35a4bca809ff80dd279190b0f4902bd
2025-11-19 09:42:10 +09:00
74 changed files with 1647 additions and 1985 deletions
-1
View File
@@ -54,7 +54,6 @@ guix/diagnostics\.scm @guix/core
guix/discovery\.scm @guix/core
guix/docker\.scm @guix/core
guix/download\.scm @guix/core
guix/elf\.scm @guix/core
guix/ftp-client\.scm @guix/core
guix/gexp\.scm @guix/core
guix/git-authenticate\.scm @guix/core
+1 -1
View File
@@ -202,7 +202,6 @@ MODULES = \
guix/ftp-client.scm \
guix/http-client.scm \
guix/gnupg.scm \
guix/elf.scm \
guix/profiling.scm \
guix/store.scm \
guix/cvs-download.scm \
@@ -267,6 +266,7 @@ MODULES = \
guix/build/kconfig.scm \
guix/build/linux-module-build-system.scm \
guix/build/store-copy.scm \
guix/build/io.scm \
guix/build/json.scm \
guix/build/pack.scm \
guix/build/utils.scm \
-1
View File
@@ -525,7 +525,6 @@ of Rebar and Mix build systems and Hex.pm importer."
"guix/discovery.scm"
"guix/docker.scm"
"guix/download.scm"
"guix/elf.scm"
"guix/ftp-client.scm"
"guix/gexp.scm"
"guix/git-authenticate.scm"
+1 -1
View File
@@ -21,7 +21,6 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu build linux-modules)
#:use-module (guix elf)
#:use-module (guix glob)
#:use-module (guix build syscalls)
#:use-module ((guix build utils) #:select (find-files invoke))
@@ -39,6 +38,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 rdelim)
#:autoload (ice-9 pretty-print) (pretty-print)
#:use-module (system vm elf)
#:export (dot-ko
ensure-dot-ko
module-formal-name
+11 -3
View File
@@ -1293,6 +1293,7 @@ dist_patch_DATA = \
%D%/packages/patches/flatpak-fix-fonts-icons.patch \
%D%/packages/patches/flatpak-fix-icon-validation.patch \
%D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \
%D%/packages/patches/flex-fix-make-dependencies.patch \
%D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \
%D%/packages/patches/fluxbox-1.3.7-gcc.patch \
%D%/packages/patches/fmt-9-overspecified-tests.patch \
@@ -1760,6 +1761,13 @@ dist_patch_DATA = \
%D%/packages/patches/libmpeg2-global-symbol-test.patch \
%D%/packages/patches/liblinphone-jsoncpp.patch \
%D%/packages/patches/libphonenumber-reproducible-build.patch \
%D%/packages/patches/plotutils-c23.patch \
%D%/packages/patches/plotutils-configure-c99.patch \
%D%/packages/patches/plotutils-cxx17-fix.patch \
%D%/packages/patches/plotutils-format-security.patch \
%D%/packages/patches/plotutils-libxmi.patch \
%D%/packages/patches/plotutils-makefile.patch \
%D%/packages/patches/plotutils-rangecheck.patch \
%D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \
%D%/packages/patches/libquicktime-ffmpeg.patch \
%D%/packages/patches/libsecret-fix-test-paths.patch \
@@ -1775,8 +1783,6 @@ dist_patch_DATA = \
%D%/packages/patches/libtiff-CVE-2022-34526.patch \
%D%/packages/patches/libtirpc-CVE-2021-46828.patch \
%D%/packages/patches/libtirpc-hurd.patch \
%D%/packages/patches/libtool-grep-compat.patch \
%D%/packages/patches/libtool-skip-tests2.patch \
%D%/packages/patches/libtree-fix-check-non-x86.patch \
%D%/packages/patches/libusb-0.1-disable-tests.patch \
%D%/packages/patches/libusb-for-axoloti.patch \
@@ -1785,6 +1791,8 @@ dist_patch_DATA = \
%D%/packages/patches/libvdpau-va-gl-unbundle.patch \
%D%/packages/patches/libvpx-CVE-2016-2818.patch \
%D%/packages/patches/libxcb-path-max.patch \
%D%/packages/patches/libxmi-gcc15.patch \
%D%/packages/patches/libxmi-implicit.patch \
%D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch \
%D%/packages/patches/libwpd-gcc-compat.patch \
%D%/packages/patches/libxt-guix-search-paths.patch \
@@ -2132,7 +2140,6 @@ dist_patch_DATA = \
%D%/packages/patches/psm-ldflags.patch \
%D%/packages/patches/psm-repro.patch \
%D%/packages/patches/pstoedit-fix-gcc12.patch \
%D%/packages/patches/pstoedit-fix-plainC.patch \
%D%/packages/patches/pstoedit-pkglibdir.patch \
%D%/packages/patches/pulseaudio-fix-mult-test.patch \
%D%/packages/patches/pulseaudio-longer-test-timeout.patch \
@@ -2359,6 +2366,7 @@ dist_patch_DATA = \
%D%/packages/patches/texi2html-document-encoding.patch \
%D%/packages/patches/texi2html-i18n.patch \
%D%/packages/patches/texmacs-wayland-hidpi.patch \
%D%/packages/patches/texlive-bin-luaoutputdir-test.patch \
%D%/packages/patches/thefuck-test-environ.patch \
%D%/packages/patches/thefuck-remove-broken-tests.patch \
%D%/packages/patches/tidy-CVE-2015-5522+5523.patch \
+2 -2
View File
@@ -40,7 +40,7 @@
(define-public acl
(package
(name "acl")
(version "2.3.1")
(version "2.3.2")
(source
(origin
(method url-fetch)
@@ -48,7 +48,7 @@
version ".tar.gz"))
(sha256
(base32
"1bqi7hj0xkpivwg7lx5cv3yvs9ks1i6azvpgbvfpzcq1i736233n"))))
"0z1gi82zc2xcbchfagd7apn2s7camaagj8y6hmysl1wpcanxnasz"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((ice-9 ftw)
+11 -7
View File
@@ -157,7 +157,7 @@ know anything about Autoconf or M4.")
(base32
"0niz4852fgyavfh3gr4h4kzalk01nk70v6vfsja6r3ap349mr25s"))))))
(define-public autoconf autoconf-2.69)
(define-public autoconf autoconf-2.72)
(define-public autoconf-2.68
(package (inherit autoconf)
@@ -438,14 +438,14 @@ Makefile, simplifying the entire process for the developer.")
(define-public automake
(package/inherit automake-1.16.5
(name "automake")
(version "1.17")
(version "1.18.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/automake/automake-"
version ".tar.xz"))
(sha256
(base32
"146rkdcwri2dkwn3pjrjs9v0wm4xyav9vvq4yw5vj4qy87yc2849"))
"11v8ckqx7z8hv4mq9dnhg58cwnssaa7l9136yndbhlc34xis72hn"))
(patches
(search-patches "automake-skip-amhello-tests.patch"))))
(arguments
@@ -483,16 +483,14 @@ Makefile, simplifying the entire process for the developer.")
(define-public libtool
(package
(name "libtool")
(version "2.4.7")
(version "2.5.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/libtool/libtool-"
version ".tar.xz"))
(sha256
(base32
"0pb3l4x37k6fj1lwnpzws55gi3pxl0hx56jm4bzmbrkw0mzj2zsg"))
(patches (search-patches "libtool-skip-tests2.patch"
"libtool-grep-compat.patch"))))
"0xb64rhambx6mhxwr613xgyad7ybs5hgmpmd9gccf2vbcrh5h7zq"))))
(build-system gnu-build-system)
(propagated-inputs (list m4))
(native-inputs
@@ -518,6 +516,12 @@ Makefile, simplifying the entire process for the developer.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-some-tests-on-extra-archs
(lambda _
(with-directory-excursion "tests"
(substitute* '("demo.at" "testsuite")
(("hppa\\*\\|amd64\\*\\|x86_64\\*\\|s390\\*" all)
(string-append all "|arm*|mips*|riscv*"))))))
(add-before 'check 'pre-check
(lambda* (#:key inputs native-inputs parallel-tests? #:allow-other-keys)
;; Run the test suite in parallel, if possible.
+36 -47
View File
@@ -21,10 +21,10 @@
;;; Copyright © 2021 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2022, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2022 Feng Shu <tumashu@163.com>
;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2023-2024 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2024 jgart <jgart@dismail.de>
;;; Copyright © 2025 Kjartan Oli Agustsson <kjartanoli@outlook.com>
;;; Copyright © 2025 mstenek <mstenek@disroot.org>
@@ -54,7 +54,6 @@
#:use-module (guix build-system qt)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -109,7 +108,8 @@
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages xml))
#:use-module (gnu packages xml)
#:use-module (ice-9 format))
(define-public duplicity
(package
@@ -264,7 +264,7 @@ backups (called chunks) to allow easy burning to CD/DVD.")
(define-public libarchive
(package
(name "libarchive")
(version "3.7.7")
(version "3.8.3")
(source
(origin
(method url-fetch)
@@ -275,7 +275,7 @@ backups (called chunks) to allow easy burning to CD/DVD.")
version ".tar.xz")))
(sha256
(base32
"1vps57mrpqmrk4zayh5g5amqfq7031s5zzkkxsm7r71rqf1wv6l7"))))
"124pp4w6n8xqdwjswc5d4d6kkrgxv67f9xlhgg7934zii4mizqlh"))))
(build-system gnu-build-system)
(inputs
(list bzip2
@@ -287,63 +287,52 @@ backups (called chunks) to allow easy burning to CD/DVD.")
`(,zstd "lib")))
(arguments
(list
;; Embed absolute references to inputs to avoid propagation.
#:configure-flags
#~'("--disable-static"
;; Because of the circular dependency, we cannot use openssl here.
;; Explicitly disable openssl to avoid unnecessary dependencies in the
;; pc file.
"--without-openssl")
#~(list "--disable-static"
(format #f "LIBS=~{-L~a/lib~^ ~}"
'#$(map (lambda (x)
(this-package-input (car x)))
(package-inputs this-package)))
;; Because of the circular dependency, we cannot use openssl here.
;; Explicitly disable openssl to avoid unnecessary dependencies in the
;; pc file.
"--without-openssl")
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'patch-pwd
(add-before 'build 'patch-commands
(lambda _
(substitute* "Makefile"
(("/bin/pwd") (which "pwd")))))
(("/bin/pwd") (which "pwd")))
(substitute* "test_utils/test_main.c"
(("/bin/sh") (which "sh")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(lambda* (#:key parallel-build? tests? #:allow-other-keys)
(if tests?
;; XXX: The test_owner_parse, test_read_disk, and
;; test_write_disk_lookup tests expect user 'root' to
;; exist, but the chroot's /etc/passwd doesn't have
;; it. Turn off those tests.
(begin
;; The tests allow one to disable tests matching a globbing pattern.
(invoke "make"
;; These environment variables are taken from
;; <https://raw.githubusercontent.com/libarchive/libarchive/refs/heads/master/.github/workflows/ci.yml>
(setenv "SKIP_OPEN_FD_ERR_TEST" "1")
(setenv "IGNORE_TRAVERSALS_TEST4" "1")
;; XXX: The test_owner_parse, test_read_disk, and
;; test_write_disk_lookup tests expect user 'root' to
;; exist, but the chroot's /etc/passwd doesn't have it
;; (see:
;; <https://github.com/libarchive/libarchive/issues/2794>).
(invoke "make" "-j" (number->string
(if parallel-build?
(parallel-job-count)
1))
"libarchive_test"
"bsdcpio_test"
"bsdtar_test")
;; XXX: This glob disables too much.
(invoke "./libarchive_test" "^test_*_disk*")
(invoke "./bsdcpio_test" "^test_owner_parse")
(invoke "./bsdtar_test"))
;; Tests may be disabled if cross-compiling.
(format #t "Test suite not run.~%"))))
(add-after 'install 'add--L-in-libarchive-pc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out #$output)
(lib (string-append out "/lib"))
(nettle (assoc-ref inputs "nettle"))
(libxml2 (assoc-ref inputs "libxml2"))
(xz (assoc-ref inputs "xz"))
(zlib (assoc-ref inputs "zlib"))
(zstd (assoc-ref inputs "zstd"))
(bzip2 (assoc-ref inputs "bzip2")))
;; Embed absolute references to these inputs to avoid propagation.
(substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
(string-append lib "/libarchive.la"))
(("-lnettle")
(string-append "-L" nettle "/lib -lnettle"))
(("-lxml2")
(string-append "-L" libxml2 "/lib -lxml2"))
(("-llzma")
(string-append "-L" xz "/lib -llzma"))
(("-lz")
(string-append "-L" zlib "/lib -lz"))
(("-lzstd")
(string-append "-L" zstd "/lib -lzstd"))
(("-lbz2")
(string-append "-L" bzip2 "/lib -lbz2")))))))))
(format #t "Test suite not run.~%")))))))
(home-page "https://libarchive.org/")
(synopsis "Multi-format archive and compression library")
(description
+83 -69
View File
@@ -107,6 +107,7 @@
(sha256
(base32
"1aqq1379syjckf0wdn9vs6wfbapnj9zfikhiykf29k4jq9nrk6js"))))
(outputs (list "out" "debug"))
(build-system gnu-build-system)
(synopsis "Example GNU package")
(description
@@ -694,62 +695,75 @@ change. GNU make offers many powerful extensions over the standard utility.")
(define-public binutils
(package
(name "binutils")
(version "2.44")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
(base32 "0fnwaasfglbphqzvz5n25js9gl695p7pjbmb1z81g8gsc6k90qzn"))
(patches (search-patches
"binutils-2.41-fix-cross.patch"
"binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
(arguments
(list #:out-of-source? #t ;recommended in the README
#:configure-flags #~'(;; Add `-static-libgcc' to not retain a dependency
;; on GCC when bootstrapping.
"LDFLAGS=-static-libgcc"
(name "binutils")
(version "2.44")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
(base32 "0fnwaasfglbphqzvz5n25js9gl695p7pjbmb1z81g8gsc6k90qzn"))
(patches (search-patches
"binutils-2.41-fix-cross.patch"
"binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
(arguments
(list #:out-of-source? #t ;recommended in the README
#:configure-flags
#~'( ;; Add `-static-libgcc' to not retain a dependency
;; on GCC when bootstrapping.
"LDFLAGS=-static-libgcc"
;; Turn on --enable-new-dtags by default to make the
;; linker set RUNPATH instead of RPATH on binaries.
;; This is important because RUNPATH can be overriden
;; using LD_LIBRARY_PATH at runtime.
"--enable-new-dtags"
;; Turn on --enable-new-dtags by default to make the
;; linker set RUNPATH instead of RPATH on binaries.
;; This is important because RUNPATH can be overriden
;; using LD_LIBRARY_PATH at runtime.
"--enable-new-dtags"
;; Don't search under /usr/lib & co.
"--with-lib-path=/no-ld-lib-path"
;; Don't search under /usr/lib & co.
"--with-lib-path=/no-ld-lib-path"
;; Install BFD. It ends up in a hidden directory,
;; but it's here.
"--enable-install-libbfd"
;; Install BFD. It ends up in a hidden directory,
;; but it's here.
"--enable-install-libbfd"
;; Make sure 'ar' and 'ranlib' produce archives in a
;; deterministic fashion.
"--enable-deterministic-archives"
;; Make sure 'ar' and 'ranlib' produce archives in a
;; deterministic fashion.
"--enable-deterministic-archives"
"--enable-64-bit-bfd"
"--enable-compressed-debug-sections=all"
"--enable-lto"
"--enable-separate-code"
"--enable-threads")
"--enable-64-bit-bfd"
;; Note: Do not enable compression here, as dwz cannot process
;; compressed debug sections.
"--enable-lto"
"--enable-separate-code"
"--enable-threads")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'use-zstd-compression-level-19
(lambda _
;; The default level (3) is hard-coded. Use a higher level to
;; compact debug sections as much as possible.
(substitute* "bfd/compress.c"
(("ZSTD_CLEVEL_DEFAULT") "19")))))
;; For some reason, the build machinery insists on rebuilding .info
;; files, even though they're already provided by the tarball.
#:make-flags #~'("MAKEINFO=true")))
(native-inputs (list bison)) ;needed to build 'gprofng'
(synopsis "Binary utilities: bfd gas gprof ld")
(description
"GNU Binutils is a collection of tools for working with binary files.
;; For some reason, the build machinery insists on rebuilding .info
;; files, even though they're already provided by the tarball.
#:make-flags #~'("MAKEINFO=true")))
(native-inputs
(list bison ;needed to build 'gprofng'
pkg-config))
(inputs (list `(,zstd "lib")))
(synopsis "Binary utilities: bfd gas gprof ld")
(description
"GNU Binutils is a collection of tools for working with binary files.
Perhaps the most notable are \"ld\", a linker, and \"as\", an assembler.
Other tools include programs to display binary profiling information, list
the strings in a binary file, and utilities for working with archives. The
\"bfd\" library for working with executable and object formats is also
included.")
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
@@ -791,10 +805,22 @@ included.")
(delete "LDFLAGS=-static-libgcc" #$flags)))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
(add-after 'unpack 'use-zstd-compression-level-19-for-gold
(lambda _
;; The default level (3) is hard-coded. Use a higher level to
;; compact debug sections as much as possible.
(substitute* "gold/compressed_output.cc"
(("ZSTD_CLEVEL_DEFAULT") "19"))))
(add-after 'patch-source-shebangs 'patch-more-shebangs
(lambda _
(substitute* "gold/Makefile.in"
(("/bin/sh") (which "sh")))))
(add-before 'check 'set-LD_LIBRARY_PATH
(lambda* (#:key inputs #:allow-other-keys)
;; Some test binaries are linked with gold, which lack RUNPATH
;; info due to not being linked with our ld-wrapper script.
(setenv "LD_LIBRARY_PATH"
(dirname (search-input-file inputs "lib/libzstd.so")))))
;; Multiple failing tests on some architectures in the gold testsuite.
#$@(if (or (target-arm?)
(target-ppc32?))
@@ -1640,15 +1666,15 @@ command.")
(name "tzdata")
;; This package should be kept in sync with python-pytz and python-tzdata
;; in (gnu packages time).
(version "2025a")
(version "2025b")
(source (origin
(method url-fetch)
(uri (string-append
"https://data.iana.org/time-zones/releases/tzdata"
version ".tar.gz"))
(sha256
(base32
"1l7hnlgc4wgy2gmaj5zmswpzbyq23h7vsndnw2zhwibw5k3wnpsd"))))
(method url-fetch)
(uri (string-append
"https://data.iana.org/time-zones/releases/tzdata"
version ".tar.gz"))
(sha256
(base32
"0x0lswl5v3q3ml8ig4djc76p9zc593xajzp22x881isz6h9h908i"))))
(build-system gnu-build-system)
(arguments
(list #:tests? #f
@@ -1707,7 +1733,9 @@ command.")
(copy-recursively (string-append out "/share/zoneinfo-leaps")
(string-append out "/share/zoneinfo/right"))
(delete-file-recursively
(string-append out "/share/zoneinfo-leaps")))))
(string-append out "/share/zoneinfo-leaps"))
(install-file "leap-seconds.list"
(string-append out "/share/zoneinfo")))))
(delete 'configure))))
(inputs (list (origin
(method url-fetch)
@@ -1716,7 +1744,7 @@ command.")
version ".tar.gz"))
(sha256
(base32
"0qahpwp1zlyvi7qrlm4r74pmj3c7sx3jlg9xw2siwj3nkzapk5hi")))))
"1v1mw6599afdcmf5dal7zvjbl3caibkzmlw7kka71vi56pdzxy05")))))
(home-page "https://www.iana.org/time-zones")
(synopsis "Database of current and historical time zones")
(description "The Time Zone Database (often called tz or zoneinfo)
@@ -1736,20 +1764,6 @@ and daylight-saving rules.")
;;; package.
(define-public tzdata-for-tests tzdata)
;;; TODO: Move the 'install-leap-seconds' phase into the main package's
;;; 'post-install' phase on the next rebuild cycle.
(define-public tzdata/leap-seconds
(hidden-package
(package/inherit tzdata
(arguments
(substitute-keyword-arguments (package-arguments tzdata)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'post-install 'install-leap-seconds
(lambda _
(install-file "leap-seconds.list"
(string-append #$output "/share/zoneinfo")))))))))))
(define-public libiconv
(package
(name "libiconv")
+10 -44
View File
@@ -66,7 +66,7 @@
(define (patch-url seqno)
"Return the URL of Bash patch number SEQNO."
(format #f "mirror://gnu/bash/bash-5.2-patches/bash52-~3,'0d" seqno))
(format #f "mirror://gnu/bash/bash-5.3-patches/bash53-~3,'0d" seqno))
(define (bash-patch seqno sha256-bv)
"Return the origin of Bash patch SEQNO, with expected hash SHA256-BV."
@@ -79,47 +79,13 @@
(list (bash-patch seqno (base32 hash))
...))
(define %patch-series-5.2
;; This is the current patches series for 5.2, generated using
(define %patch-series-5.3
;; This is the current patches series for 5.3, generated using
;; 'download-patches' below.
(patch-series
(1 "02iibpd3jq8p1bhdzgik8ps6gi1145vr463a82gj1hivjbp2ybzl")
(2 "1f6p1z85qh1lavdp3xikgp0bfv0vqhvgpgwmdzlywl35hwdmxk25")
(3 "1zxsi869jd90hksx3nyypgyqwrxhw2ws3r6hmk76yc1lsgdhq2ba")
(4 "04i5liw5cg6dqkdxfgazqc2jrw40bmclx3dx45bwy259pcj7g0iq")
(5 "0mykflv9qnbx3jz71l4f7isadiw9knm4qimqkwsv9cv88dafpq7c")
(6 "13265akl8w6zyrg0l7f0x6arjgqjhllcwl6lk46rl53x4mm5dq6i")
(7 "146lrwkn5wgxzs6vx34wl47g69zsxdy032k40qzi626b47ya6015")
(8 "1s5i8hcayrv25lc8fxcr431v634yx5sii53b8fmip789s0pxjjvb")
(9 "1kfk25151ka9wkmk1myf12irgcmvhsd8b0nfifvhrszah9w82npr")
(10 "1kf1jrwm30js0v3d1r2rk4x09s1pyjp70wnd1qqhf9bmkw15ww67")
(11 "1x5nkvbj6hci7gx42q7qa72hg2a9wwxh85dk79gn521ypwjmy6w3")
(12 "0b6lcwzm7v5bzjiwaz2c8n5aj77w8ckhp2vwk4v3zsdq3z70gc9g")
(13 "1rkwpibd6j2ghppfhqsva2jm4kdni6b7jpdsxdps52643gc4yjq9")
(14 "09766vqqw4ffnmysm725v35qkhp1g9j4qgqag941xvq655pj9y9y")
(15 "12im449abnq5gaqjmdxr5i38kmp02fa8l8wffad3jryvd58r0wzg")
(16 "05arb0hzmng03cr357lf6p8af0x2a1pznsd3psll03nibfy56n0m")
(17 "129cvx4gfz8n23iw1lhbknbw86fyw6vh60jqj1wj3d5pr75wwj0w")
(18 "105am94qxjc27gga4a8asvsi01090xwjfim3s16lafwjvm4xsha6")
(19 "10njgv5mrc5rhsp5lvxcbm0pnzn59a8spi2nhdasifyl1a32cp1j")
(20 "07f0wlmqjdfarp44w3gj9gdqbqm5x20rvlhpn34ngklmxcm2bz5n")
(21 "1kahfqqalcwi4m73pg3ssz6lh0kcqsqax09myac7a15d2y0vhd43")
(22 "0w74aym0g1fh48864a3qxh89f26iaq7wsbg7244c6kjr94527dbq")
(23 "1lywjqbc36j5pdzfcvnz1zy30j76aqmsm190p888av0hw815b45g")
(24 "1hq23djqbr7s9y2324jq9mxr5bwdkmgizn3zgpchbsqp054k85cp")
(25 "0x9hc4silzl4d3zw4p43i5dm7w86k50j47f87lracwfgwy3z8f2i")
(26 "1b1fhm1dsi67r8ip17s0xvx2qq31fsxc1g9n3r931dd0k9a1zvln")
(27 "0fdbhvs9dkf4knncifh98a76q4gylhyvfrffq5p9q3ag5q58jap1")
(28 "1hdacd6sssjshmry1sscdnxxfb2r51bvdyghlfjaqgc9l85phhk0")
(29 "11wrlb20w6v89b96krg0gwxipwhvrda6rq1y9f972m32gsrsqp0j")
(30 "13v9fqgim082dmvkslsr0hs793yzhsij2s91mjswsfhj1qip7zy3")
(31 "15d7rddj6spwc1fy997lxx6zvzq0zbxgf2h20mhi4wgp5nzbglf2")
(32 "05ia6yf32hjprmyyxqawhgckxs3684ikfx8xg08zfgx9xkd7g73v")
(33 "1qm2aad9mf2xah6xwchga7s5pk3v308mrv9lgh50d65d236ccgh1")
(34 "0bi38dhkkwpm2qrzp8zpykglq6gibvv2n9f8m59gwj406cxvp7w9")
(35 "1r8k34y82v02yfkgws17j7i53ybb74dqnwl2jjiv0av9z93hl6l2")
(36 "0mwhr9hfbh2czf8klbxg6nbd2g9xl9kygvgk061vird56r4kzj8m")
(37 "156sbi3srzkyxajkmhb7iigq0j4nvwnpsbw88xdsxn95a4xiqb4a")))
(1 "0zr8wgg1gb67vxn7ws971n1znrdinczymc688ndnpy2a6qs88q0z")
(2 "009051z55plsy4jmmjdb3ys7li2jraynz99qg7n6a1qk025591g3")
(3 "1vb0gnrkmz49rcfpxjcxy0v0k5278wrlkljk9gc20nizvk3xjigj")))
(define (download-patches store count)
"Download COUNT Bash patches into store. Return a list of
@@ -157,7 +123,7 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
" -Wl,-rpath -Wl,"
(assoc-ref %build-inputs "ncurses")
"/lib")))
(version "5.2"))
(version "5.3"))
(package
(name "bash")
(source (origin
@@ -166,11 +132,11 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
"mirror://gnu/bash/bash-" version ".tar.gz"))
(sha256
(base32
"1yrjmf0mqg2q8pqphjlark0mcmgf88b0acq7bqf4gx3zvxkc2fd1"))
"1fii1xaxbng9x0klxmxkm0xhmycngfz72jsgyrna4sgqcmlxhp0d"))
(patch-flags '("-p0"))
(patches (cons (search-patch "bash-linux-pgrp-pipe.patch")
%patch-series-5.2))))
(version (string-append version "." (number->string (length %patch-series-5.2))))
%patch-series-5.3))))
(version (string-append version "." (number->string (length %patch-series-5.3))))
(build-system gnu-build-system)
(outputs '("out"
+1 -1
View File
@@ -907,7 +907,7 @@ also initializes the boards (RAM etc).")
(lambda* (#:key make-flags #:allow-other-keys)
(let* ((info-dir (string-append #$output "/share/info"))
(info (string-append info-dir
"/DasUBoot.info.gz")))
"/DasUBoot.info.zst")))
(with-directory-excursion "doc/output"
(apply invoke "make" "-C" "texinfo" "install-info"
(string-append "infodir=" info-dir)
+9 -3
View File
@@ -2394,14 +2394,14 @@ since the last commit or what tests are currently failing.")
(define-public python-coverage
(package
(name "python-coverage")
(version "7.9.2")
(version "7.11.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "coverage" version))
(sha256
(base32
"12qcm2j4bnc2gp6sci9brly2k406gp4jwjfpzxj04ag3a7x28w4r"))))
"0l403f6d59q8rik9vvzb6982qad0zrfj87dqydzsz8hwmh2dayqn"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -2417,6 +2417,7 @@ since the last commit or what tests are currently failing.")
"--ignore=tests/test_venv.py"
"--ignore=tests/test_plugins.py"
"--ignore=tests/test_debug.py"
"--ignore=tests/test_core.py"
;; XXX: Unclear why these fail.
"--ignore=tests/test_python.py"
"--deselect=tests/test_concurrency.py\
@@ -2445,7 +2446,12 @@ since the last commit or what tests are currently failing.")
#$@(if (equal? (%current-system) "riscv64-linux")
'("--deselect=tests/test_numbits.py::NumbitsOpTest::test_union"
"--deselect=tests/test_numbits.py::NumbitsOpTest::test_any_intersection")
'()))
'())
;; Fails some "'p1c' not in 'Name" assertions (see:
;; <https://github.com/nedbat/coveragepy/issues/2050#issuecomment-3489704251>).
"--ignore=tests/test_api.py"
;; This tests fails due to missing file tests/actual/testing/getty.
"-k" "not test_good_needs_scrubs")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-pyproject
+143 -61
View File
@@ -9,7 +9,7 @@
;;; Copyright © 2019-2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -38,6 +38,8 @@
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages c)
#:use-module (gnu packages digest)
#:use-module (gnu packages elf)
#:use-module (gnu packages gcc)
#:use-module (gnu packages m4)
#:use-module (gnu packages gawk)
@@ -1239,7 +1241,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
"--with-sysroot=/"
,(string-append "--prefix=" out))))))))
,(string-append "--prefix=" out))))))
(properties '((max-silent-time . 7200)))))
(define gnu-make-mesboot
(package
@@ -1837,7 +1840,8 @@ exec " gcc "/bin/" program
(format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
(format (current-error-port) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
(format (current-error-port) "LIBRARY_PATH=~a\n"
(getenv "LIBRARY_PATH"))))))))))))
(getenv "LIBRARY_PATH"))))))))))
(properties '((timeout . 72000))))) ;20 hours
(define gcc-mesboot-wrapper
;; We need this so gcc-mesboot can be used to create shared binaries that
@@ -2248,40 +2252,40 @@ exec " gcc "/bin/" program
(source (bootstrap-origin (package-source binutils)))
(name "binutils-cross-boot0")
(arguments
(append (list #:guile %bootstrap-guile
#:implicit-inputs? #f
(ensure-keyword-arguments
(substitute-keyword-arguments (package-arguments binutils)
((#:modules modules '((guix build gnu-build-system)
(guix build utils)))
(cons '(ice-9 ftw) modules))
((#:configure-flags cf ''())
#~(append (list #$(string-append "--target="
(boot-triplet))
"--disable-gprofng") ;requires Bison
#$cf))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
(add-after 'install 'add-symlinks
(lambda* (#:key outputs #:allow-other-keys)
;; The cross-gcc invokes 'as', 'ld', etc, without the
;; triplet prefix, so add symlinks.
(let ((out (assoc-ref outputs "out"))
(triplet-prefix (string-append #$(boot-triplet)
"-")))
(define (has-triplet-prefix? name)
(string-prefix? triplet-prefix name))
(define (remove-triplet-prefix name)
(substring name
(string-length triplet-prefix)))
#:modules '((guix build gnu-build-system)
(guix build utils)
(ice-9 ftw)) ; for 'scandir'
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'add-symlinks
(lambda* (#:key outputs #:allow-other-keys)
;; The cross-gcc invokes 'as', 'ld', etc, without the
;; triplet prefix, so add symlinks.
(let ((out (assoc-ref outputs "out"))
(triplet-prefix (string-append #$(boot-triplet)
"-")))
(define (has-triplet-prefix? name)
(string-prefix? triplet-prefix name))
(define (remove-triplet-prefix name)
(substring name
(string-length triplet-prefix)))
(with-directory-excursion (string-append out "/bin")
(for-each (lambda (name)
(symlink name
(remove-triplet-prefix name)))
(scandir "."
has-triplet-prefix?))))))))
(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
#~(append (list #$(string-append "--target="
(boot-triplet))
"--disable-gprofng") ;requires Bison
#$cf)))))
(native-inputs '()) ;no Bison
(with-directory-excursion (string-append out "/bin")
(for-each (lambda (name)
(symlink name
(remove-triplet-prefix name)))
(scandir "."
has-triplet-prefix?)))))))))
(list #:guile %bootstrap-guile
#:implicit-inputs? #f)))
(native-inputs '()) ;no Bison
(inputs (%boot0-inputs))))
(define libstdc++-boot0
@@ -3241,7 +3245,8 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
"libstdc++")
,@(if (target-powerpc? (%current-system))
(list static-bash-for-glibc)
'())))
'())
,(gexp-input zstd-final "lib")))
(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags flags #~'())
;; For gprofng, tell the build system where to look for libstdc++.
@@ -3251,13 +3256,58 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
"libstdc++")
"/lib")))))))
(native-inputs (list bison-boot0
pkg-config-final ;to detect zstd
libstdc++)) ;for gprofng
(inputs
(match (%current-system)
((? target-powerpc?)
`(("bash" ,static-bash-for-glibc)
,@(%boot2-inputs)))
(_ (%boot2-inputs))))))
(modify-inputs (match (%current-system)
((? target-powerpc?)
`(("bash" ,static-bash-for-glibc)
,@(%boot2-inputs)))
(_ (%boot2-inputs)))
(append `(,zstd-final "lib"))))))
(define dwz-final
(package
(inherit dwz)
(source (bootstrap-origin (package-source dwz)))
(arguments
(ensure-keyword-arguments
(package-arguments dwz)
(list #:guile %bootstrap-guile
#:implicit-inputs? #f
#:tests? #f
#:allowed-references (list "out" glibc-final
elfutils-final
(gexp-input gcc-final "lib")
xxhash-final
xz-final
zlib-final))))
(native-inputs (list pkg-config-final)) ;without test inputs
(inputs (modify-inputs (%boot6-inputs)
(append elfutils-final
xxhash-final)))))
(define elfutils-final
(package
(inherit elfutils)
(source (bootstrap-origin (package-source elfutils)))
(arguments
(ensure-keyword-arguments
(package-arguments elfutils)
(list #:guile %bootstrap-guile
#:implicit-inputs? #f
;; There is no bunzip2 in the Hurd bootstrap binaries.
#:tests? (not (target-hurd?))
#:allowed-references (list "out" "bin"
bash-final
(gexp-input gcc-final "lib")
glibc-final
xz-final
zlib-final))))
(native-inputs (list m4-boot0))
(inputs (modify-inputs (%boot6-inputs)
(append xz-final
zlib-final)))))
(define zlib-final
;; Zlib used by GCC-FINAL.
@@ -3271,6 +3321,32 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
,@(package-arguments zlib)))
(inputs (%boot2-inputs))))
(define zstd-final
;; Zstd used by BINUTILS-FINAL.
(package
(inherit zstd)
(source (bootstrap-origin (package-source zstd)))
(arguments
(substitute-keyword-arguments
(ensure-keyword-arguments
(package-arguments zstd)
(list #:guile %bootstrap-guile
#:implicit-inputs? #f
#:allowed-references (list "out" "lib" glibc-final)))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
;; Avoid retaining references to bash & grep in the zstdless
;; script.
(delete 'patch-command-file-names)
(add-after 'install 'unpatch-bash-shebangs
(lambda _
(with-directory-excursion (string-append #$output "/bin")
(substitute* '("zstdgrep" "zstdless")
(("#!/gnu/store/.*/bin/sh")
"#!/bin/sh")))))
(delete 'patch-shebangs)))))
(inputs (%boot2-inputs))))
(define/system-dependent ld-wrapper-boot3
;; A linker wrapper that uses the bootstrap Guile.
(make-ld-wrapper "ld-wrapper-boot3"
@@ -3485,24 +3561,26 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define %boot5-inputs %boot4-inputs)
(define with-boot5 with-boot4)
(define pkg-config-final
(package
(inherit %pkg-config) ;the native pkg-config
(arguments
(ensure-keyword-arguments
(package-arguments %pkg-config)
(list #:implicit-inputs? #f
#:guile %bootstrap-guile)))
(inputs (%boot2-inputs))))
(define (make-gnu-make-final)
"Compute the final GNU Make, which uses the final Guile."
(let ((pkg-config (package
(inherit %pkg-config) ;the native pkg-config
(inputs `(("guile" ,guile-final)
,@(%boot5-inputs)))
(arguments
`(#:implicit-inputs? #f
,@(package-arguments %pkg-config))))))
(package
(inherit (package-with-bootstrap-guile gnu-make))
(inputs `(("guile" ,guile-final)
,@(%boot5-inputs)))
(native-inputs `(("pkg-config" ,pkg-config)))
(arguments
`(#:implicit-inputs? #f
,@(package-arguments gnu-make))))))
(package
(inherit (package-with-bootstrap-guile gnu-make))
(inputs `(("guile" ,guile-final)
,@(%boot5-inputs)))
(native-inputs `(("pkg-config" ,pkg-config-final)))
(arguments
`(#:implicit-inputs? #f
,@(package-arguments gnu-make)))))
(define coreutils-final
;; The final Coreutils. Treat them specially because some packages, such as
@@ -3549,6 +3627,9 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(let ((sed (with-boot6 (package-with-bootstrap-guile sed))))
(package/inherit sed (native-inputs `(("perl" ,perl-boot0))))))
(define xxhash-final
((compose with-boot6 package-with-bootstrap-guile) xxhash))
(define-public %final-inputs
;; The 'glibc-final' package is not the same depending on what system is
;; targeted, so this whole list must be parameterized.
@@ -3574,19 +3655,20 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(native-inputs
(list (if (target-hurd?)
glibc-utf8-locales-final/hurd
glibc-utf8-locales-final)))))
("zstd" ,zstd)))
glibc-utf8-locales-final)))))))
("sed" ,sed-final)
("grep" ,grep-final)
("xz" ,xz-final)
("coreutils" ,coreutils-final)
("dwz" ,dwz-final)
("make" ,(make-gnu-make-final))
("bash" ,bash-final)
("ld-wrapper" ,ld-wrapper)
("binutils" ,binutils-final)
("gcc" ,gcc-final)
("libc" ,glibc-final)
("libc:static" ,glibc-final "static"))))))
("libc:static" ,glibc-final "static")
("zstd" ,zstd-final))))))
(define-public canonical-package
(let ((name->package (mlambda (system)
+9 -19
View File
@@ -551,7 +551,7 @@ formats, including zstd, xz, gzip, and bgzf.")
(define-public xz
(package
(name "xz")
(version "5.4.5")
(version "5.8.1")
(source (origin
(method url-fetch)
(uri (list (string-append "http://tukaani.org/xz/xz-" version
@@ -560,7 +560,7 @@ formats, including zstd, xz, gzip, and bgzf.")
version ".tar.gz")))
(sha256
(base32
"1mmpwl4kg1vs6n653gkaldyn43dpbjh8gpk7sk0gps5f6jwr0p0k"))))
"0hsmg58a27jd1vq0lc6yp405978c1nfhqwndl7f10v1mk6sjay2h"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -1776,14 +1776,14 @@ or junctions, and always follows hard links.")
(define-public zstd
(package
(name "zstd")
(version "1.5.6")
(version "1.5.7")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/facebook/zstd/releases/download/"
"v" version "/zstd-" version ".tar.gz"))
(sha256
(base32 "1h83si7s70jy7mcy0mv1c9mbkz66qqpawxs0zkmc3b1ayinf0acc"))))
(base32 "18vgkvh7w6zw4jn2aj1mp0yv98m4fk52ay6da0wh4pm194gyaczb"))))
(build-system gnu-build-system)
(outputs '("out" ;1.5MiB executables and documentation
"lib" ;1.2MiB shared library and headers
@@ -1850,6 +1850,10 @@ or junctions, and always follows hard links.")
;; This isn't picked up correctly in the Makefiles.
"EXT=.exe")
'())
#$@(if (target-hurd?)
;; Uses symbols from pthread.
`("PCMTLIB=-pthread")
'())
;; Auto-detection is over-engineered and buggy.
"PCLIBDIR=lib"
"PCINCDIR=include"
@@ -1877,22 +1881,8 @@ speed.")
license:public-domain ; zlibWrapper/examples/fitblk*
license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
(define-public zstd-1.5.7
(package
(inherit zstd)
;; Don't hide this package from the UI.
(properties '())
(version "1.5.7")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/facebook/zstd/releases/download/"
"v" version "/zstd-" version ".tar.gz"))
(sha256
(base32 "18vgkvh7w6zw4jn2aj1mp0yv98m4fk52ay6da0wh4pm194gyaczb"))))))
(define-public pzstd
(package/inherit zstd-1.5.7
(package/inherit zstd
(name "pzstd")
(outputs '("out"))
(inputs
+1 -1
View File
@@ -148,7 +148,7 @@
(("rm (.*) configure") "")
(("chmod (.*) config.guess(.*)$") ""))
(invoke "sh" "s_config"))))))
(native-inputs (list autoconf automake-1.16.5 libtool))
(native-inputs (list autoconf-2.69 automake-1.16.5 libtool))
(synopsis "Berkeley database")
(description
"Berkeley DB is an embeddable database allowing developers the choice of
+40
View File
@@ -15,6 +15,7 @@
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2025 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
@@ -43,13 +44,17 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages digest)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages gawk)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gdb)
#:use-module (gnu packages m4)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -81,6 +86,41 @@ dynamic library load path (RPATH and RUNPATH) of compiled programs and
libraries.")
(license license:gpl2+)))
(define-public dwz
(package
(name "dwz")
(version "0.16")
(source (origin
(method url-fetch)
(uri (string-append "https://sourceware.org/ftp"
"/" name "/releases/" name "-"
version ".tar.gz"))
(sha256
(base32
"03nm4yz2sd23zmw65ingphg5gk619xx9r40a5p6dhvlynkhm6n27"))))
(build-system gnu-build-system)
(arguments
(list
#:make-flags #~(list (string-append "CC=" #$(cc-for-target))
(string-append "CXX=" #$(cxx-for-target))
(string-append "prefix=" #$output))))
(native-inputs
(list
;; XXX: binutils-gold is a complete package that not only
;; provides 'gold' but also 'ld', which shadows the
;; regular 'ld' (ld-wrapper), causing breakage.
(make-ld-wrapper "ld-wrapper" #:binutils binutils)
binutils-gold
dejagnu
`(,elfutils "bin") ;for eu-strip
gdb/pinned
pkg-config))
(inputs (list elfutils xxhash))
(synopsis "DWARF optimizer")
(description "DWZ is a DWARF optimization and duplicate removal tool.")
(home-page "https://sourceware.org/dwz")
(license license:gpl2+)))
(define-public elfutils
(package
(name "elfutils")
+3 -5
View File
@@ -6931,12 +6931,10 @@ returns multiple locations, a list is displayed to choose from.")
(add-after 'install 'install-info
(lambda _
(let ((info (string-append #$output "/share/info")))
(install-file "texinfo/graphviz-dot-mode.info.gz" info)))))))
(native-inputs
(list gzip texinfo))
(install-file "texinfo/graphviz-dot-mode.info.zst" info)))))))
(native-inputs (list gzip texinfo))
(inputs (list graphviz))
(propagated-inputs
(list emacs-company))
(propagated-inputs (list emacs-company))
(home-page "http://ppareit.github.com/graphviz-dot-mode")
(synopsis "Major mode for editing Graphviz DOT files")
(description
+4 -3
View File
@@ -9,7 +9,7 @@
;;; Copyright © 2016 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2019, 2020, 2023, 2024 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2017, 2019, 2020, 2023-2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2023, 2024, 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
@@ -384,7 +384,8 @@
,(map dirname
(list (search-input-file inputs "/bin/gzip")
;; for coreutils
(search-input-file inputs "/bin/yes"))))
(search-input-file inputs "/bin/yes")
(search-input-file inputs "/bin/zstd"))))
`("EMACSLOADPATH" suffix ,lisp-dirs)))
(find-files (string-append out "/bin")
;; Matches versioned and unversioned emacs binaries.
@@ -402,7 +403,7 @@
(copy-file
(car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$"))
"bin/emacs")))))))
(inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed))
(inputs (list bash-minimal coreutils findutils gawk gzip ncurses sed zstd))
(native-inputs (list autoconf libfaketime pkg-config texinfo))
(home-page "https://www.gnu.org/software/emacs/")
(synopsis "The extensible text editor (minimal build for byte-compilation)")
+1 -1
View File
@@ -3683,7 +3683,7 @@ de-interlacing patches for use with PCSX2.")
(string-append #$output "/share/resources")))))))
(inputs (list (module-ref
(resolve-interface '(gnu packages debug)) 'libbacktrace)
`(,zstd-1.5.7 "lib")
`(,zstd "lib")
curl
dbus
eudev
+21 -20
View File
@@ -26,6 +26,7 @@
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages m4)
#:use-module (gnu packages man)
#:use-module (gnu packages bison)
@@ -35,26 +36,18 @@
(package
(name "flex")
(version "2.6.4")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/westes/flex"
"/releases/download/v" version "/"
"flex-" version ".tar.gz"))
(sha256
(base32
"15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8"))))
(source (bootstrap-origin ;avoid a circular dependency
(origin
(method url-fetch)
(uri (string-append
"https://github.com/westes/flex"
"/releases/download/v" version "/"
"flex-" version ".tar.gz"))
(sha256
(base32
"15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8"))
(patches (search-patches "flex-fix-make-dependencies.patch")))))
(build-system gnu-build-system)
(inputs
(let ((bison-for-tests
(package
(inherit bison)
(arguments
;; Disable tests, since they require flex.
(substitute-keyword-arguments (package-arguments bison)
((#:tests? _ #f) #f)))
(inputs (alist-delete "flex" (package-inputs bison))))))
`(("bison" ,bison-for-tests))))
(arguments
(if (or (target-hurd64?) (%current-target-system))
(list #:configure-flags
@@ -67,7 +60,15 @@
'()))
;; m4 is not present in PATH when cross-building
(native-inputs
(list help2man m4))
(let ((bison-for-tests
(package
(inherit bison)
(arguments
;; Disable tests, since they require flex.
(substitute-keyword-arguments (package-arguments bison)
((#:tests? _ #f) #f)))
(inputs (alist-delete "flex" (package-inputs bison))))))
(list bison-for-tests help2man m4)))
(propagated-inputs (list m4))
(home-page "https://github.com/westes/flex")
(synopsis "Fast lexical analyser generator")
+12 -21
View File
@@ -594,7 +594,7 @@ freedesktop.org project.")
;; Updating this will rebuild over 700 packages through libinput-minimal.
(package
(name "libinput")
(version "1.29.1")
(version "1.29.901")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -603,24 +603,15 @@ freedesktop.org project.")
(file-name (git-file-name name version))
(sha256
(base32
"11n2vqkdz40vbqdjwm19i7rv2lzqf4i7anlla0havf7h0glqin60"))))
"0lzkns9k6zfa04d8y76fgca4i7ag92w33yrdnnnmgfdv5lng5psn"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags '("-Ddocumentation=false")
;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
;; hangs, and the comments around it suggests that we should be using this
;; Meson target anyway.
#:build-type "release"
#:phases
,@(if (target-64bit?)
`(%standard-phases)
`((modify-phases %standard-phases
;; Backported from a commit after the 1.29.0 release.
(add-after 'unpack 'correct-value-type-in-atou64_test
(lambda _
(substitute* "test/test-utils.c"
(("unsigned long val") "uint64_t val")))))))))
(list
#:configure-flags '(list "-Ddocumentation=false")
;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
;; hangs, and the comments around it suggests that we should be using this
;; Meson target anyway.
#:build-type "release"))
(native-inputs
(append (list check pkg-config python-minimal-wrapper python-pytest)
(if (%current-target-system)
@@ -654,10 +645,10 @@ other applications that need to directly deal with input devices.")
'("cairo" "glib" "gtk+" "libwacom")))
(arguments
(substitute-keyword-arguments (package-arguments libinput)
((#:configure-flags flags ''())
`(cons* "-Dlibwacom=false"
"-Ddebug-gui=false" ;requires gtk+@3
,flags))))))
((#:configure-flags flags ''())
#~(cons* "-Dlibwacom=false"
"-Ddebug-gui=false" ;requires gtk+@3
#$flags))))))
(define-public libei
(package
+2 -2
View File
@@ -55,14 +55,14 @@
(define-public gettext-minimal
(package
(name "gettext-minimal")
(version "0.23.1")
(version "0.26")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gettext/gettext-"
version ".tar.gz"))
(sha256
(base32
"0j8fijicvg8jkrisgsqbpnbmfb2mz3gx2p6pcwip82731yb7i9aj"))))
"0zqxpdc6xxf7rz69xfxiv7z32djvrsm64m80c05i36qy6yqg9b1r"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;9 MiB of HTML
+3 -9
View File
@@ -791,7 +791,7 @@ preferences/advanced-scripts.dtd"
libcanberra
libgnome
libjpeg-turbo
libpng-apng-next
libpng-apng
;; UNBUNDLE-ME! libogg
;; UNBUNDLE-ME! libtheora ; wants theora-1.2, not yet released
;; UNBUNDLE-ME! libvorbis
@@ -932,7 +932,7 @@ preferences/advanced-scripts.dtd"
(srfi srfi-26)
(rnrs bytevectors)
(rnrs io ports)
(guix elf)
(system vm elf)
(guix build gremlin)
,@%default-gnu-modules)
#:phases
@@ -1004,16 +1004,10 @@ preferences/advanced-scripts.dtd"
(search-input-file inputs "lib/libavcodec.so")))))
(add-after 'fix-ffmpeg-runtime-linker 'build-sandbox-whitelist
(lambda* (#:key inputs #:allow-other-keys)
(define (runpath-of lib)
(call-with-input-file lib
(compose elf-dynamic-info-runpath
elf-dynamic-info
parse-elf
get-bytevector-all)))
(define (runpaths-of-input label)
(let* ((dir (string-append (assoc-ref inputs label) "/lib"))
(libs (find-files dir "\\.so$")))
(append-map runpath-of libs)))
(append-map file-runpath libs)))
;; Populate the sandbox read-path whitelist as needed by ffmpeg.
(let* ((whitelist
(map (cut string-append <> "/")
+35 -5
View File
@@ -1230,6 +1230,39 @@ basic geometries.")
;; https://gitlab.com/inkscape/inkscape/issues/784).
(license license:gpl3+)))
(define-public libxmi
(package
(name "libxmi")
(version "1.3") ;version bundled in plotutils
(source (origin
(method url-fetch)
;; XXX: Use this Gentoo-maintained fork, which is the more
;; up-to-date 1.3 version bundled with plotutils.
(uri (string-append "http://gentoo.osuosl.org/distfiles/65/"
name "-" version ".tar.xz"))
(sha256
(base32
"04npjh8k2ipmpwflfivqchga5r2qw7qbhbyk9n6kgccsm3aaxwl6"))
(patches (search-patches "libxmi-gcc15.patch"
"libxmi-implicit.patch"))))
(build-system gnu-build-system)
(arguments (list #:configure-flags #~(list "--disable-static")
#:phases #~(modify-phases %standard-phases
(add-before 'bootstrap 'force-bootstrap
(lambda _
(delete-file "configure"))))))
(native-inputs (list autoconf automake libtool))
(home-page "https://www.gnu.org/software/libxmi/libxmi.html")
(synopsis "Library for rasterizing 2-d vector graphics")
(description "GNU libxmi is a library for rasterizing 2D vector graphics for C and
C++. It supports drawing 2D primitives into a user-supplied matrix of pixels.
It also supports the specification of sophisticated line styles such as
multi-colored dashed patterns. Filling and texturing polygons is also
supported.")
;; For the combined work, with some files (mi_*.c and mi_*.h) under X11
;; and X11-style licenses.
(license license:gpl2+)))
(define-public python-booleanoperations
(package
(name "python-booleanoperations")
@@ -1285,19 +1318,16 @@ Angus Johnson}.")
(define-public pstoedit
(package
(name "pstoedit")
;; Do not yet upgrade to 4.0.0, as its include file fails to compile for C
;; project (see: https://github.com/reviczky/pstoedit/issues/2).
(version "4.00")
(version "4.02")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
version "/pstoedit-" version ".tar.gz"))
(sha256
(base32
"1sk2mhrjgnlz4a1650p3qxrv6av6qc66ibmy48ckspx7mfp7snh7"))
"0bzpknndsf2cvsh1z90j6cx9mzqkb3m1ajdl52cavcn6s8rb922m"))
(patches
(search-patches "pstoedit-fix-gcc12.patch"
"pstoedit-fix-plainC.patch"
"pstoedit-pkglibdir.patch"))))
(build-system gnu-build-system)
(arguments
+20 -38
View File
@@ -1009,9 +1009,8 @@ application suites.")
(define-public gtk+
(package
(inherit gtk+-2)
(replacement gtk+/fixed)
(name "gtk+")
(version "3.24.49")
(version "3.24.51")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1020,7 +1019,7 @@ application suites.")
(file-name (git-file-name name version))
(sha256
(base32
"0flsnh3f0l9v3y2hmnxz1h15nw1l12ixmiwcpiy1ywplrlgq4j00"))
"07vw0rani9d65px36fzzj7sprv5r48shyjdgzipkihzqaldd98yh"))
(patches (search-patches
"gtk3-respect-GUIX_GTK3_PATH.patch"
"gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
@@ -1099,22 +1098,22 @@ application suites.")
#~(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-tests
(lambda _
;; These tests fail only in the containerized environment, for
;; unknown reasons.
(substitute* "testsuite/gtk/meson.build"
((".*\\['defaultvalue'],.*") "")
((".*\\['objects-finalize',.*") ""))
;; The 'flipping-icons.ui' and 'gtk-icontheme-sizing.ui' tests
;; fail for unknown reasons (see:
;; <https://gitlab.gnome.org/GNOME/gtk/-/issues/7679>).
(substitute* "testsuite/reftests/meson.build"
((" 'flipping-icons.ui',.*") "")
((" 'gtk-icontheme-sizing.ui',.*") ""))
;; This test fails just on i686-linux, for unknown reasons.
#$@(if (target-x86-32?)
#~((substitute* "testsuite/reftests/meson.build"
((" 'linear-gradient.ui',.*") "")))
#~())))
;; These tests fail only in the containerized environment, for
;; unknown reasons.
(substitute* "testsuite/gtk/meson.build"
((".*\\['defaultvalue'],.*") "")
((".*\\['objects-finalize',.*") ""))
;; The 'flipping-icons.ui' and 'gtk-icontheme-sizing.ui' tests
;; fail for unknown reasons (see:
;; <https://gitlab.gnome.org/GNOME/gtk/-/issues/7679>).
(substitute* "testsuite/reftests/meson.build"
((" 'flipping-icons.ui',.*") "")
((" 'gtk-icontheme-sizing.ui',.*") ""))
;; This test fails just on i686-linux, for unknown reasons.
#$@(if (target-x86-32?)
#~((substitute* "testsuite/reftests/meson.build"
((" 'linear-gradient.ui',.*") "")))
#~())))
(add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
(assoc-ref glib-or-gtk:%standard-phases
'generate-gdk-pixbuf-loaders-cache-file))
@@ -1138,25 +1137,8 @@ application suites.")
"/share/applications")))))))
(native-search-paths
(list (search-path-specification
(variable "GUIX_GTK3_PATH")
(files '("lib/gtk-3.0")))))))
(define-public gtk+/fixed
(let* ((base gtk+)
(source (package-source base)))
(package
(inherit base)
(version "3.24.51")
(source
(origin
(inherit source)
(uri (git-reference
(inherit (origin-uri source))
(commit version)))
(file-name (git-file-name (package-name base) version))
(sha256
(base32
"07vw0rani9d65px36fzzj7sprv5r48shyjdgzipkihzqaldd98yh")))))))
(variable "GUIX_GTK3_PATH")
(files '("lib/gtk-3.0")))))))
(define-public gtk
(package
+4 -3
View File
@@ -30,6 +30,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages gettext)
#:use-module (gnu packages m4)
#:use-module (gnu packages perl)
#:use-module (gnu packages textutils))
@@ -37,7 +38,7 @@
(define-public hunspell
(package
(name "hunspell")
(version "1.7.0")
(version "1.7.2")
(source
(origin
(method git-fetch)
@@ -47,10 +48,10 @@
(file-name (git-file-name name version))
(sha256
(base32
"0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
"03rlc00l0qwpwwcnz6gpzw35fxq247vp4421zpwwgaj8fp35fqf7"))))
(build-system gnu-build-system)
(native-inputs
(list autoconf automake libtool))
(list autoconf automake gettext-minimal libtool))
(inputs
(list perl))
(native-search-paths (list (search-path-specification
+43 -75
View File
@@ -25,7 +25,7 @@
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;; Copyright © 2020, 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020, 2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020, 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@posteo.net>
@@ -292,70 +292,6 @@ library. It supports almost all PNG features and is extensible.")
;; The APNG patch is maintained separately and may lag behind upstream libpng.
(package
(name "libpng-apng")
(version "1.6.39")
(source
(origin
(method url-fetch)
(uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
version "/libpng-" version ".tar.xz")
(string-append
"ftp://ftp.simplesystems.org/pub/libpng/png/src"
"/libpng16/libpng-" version ".tar.xz")
(string-append
"ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
"/libpng16/libpng-" version ".tar.xz")))
(sha256
(base32 "0dv90dxvmqpk7mbywyjbz8lh08cv4b0ksqp1y62mzvmlf379cihz"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-apng
(lambda* (#:key inputs #:allow-other-keys)
(define (apply-patch file)
(invoke "patch" "-p1" "--force"
"--input" file))
(let ((apng.gz (assoc-ref inputs "apng")))
(format #t "Applying APNG patch '~a'...~%"
apng.gz)
(invoke "sh" "-c"
(string-append "gunzip < " apng.gz " > the-patch"))
(apply-patch "the-patch"))))
(add-before 'configure 'no-checks
(lambda _
(substitute* "Makefile.in"
(("^scripts/symbols.chk") "")
(("check: scripts/symbols.chk") "")))))))
(inputs
`(("apng" ,(origin
(method url-fetch)
(uri
(string-append "mirror://sourceforge/libpng-apng/libpng16/"
version "/libpng-" version "-apng.patch.gz"))
(sha256
(base32
"1z8cx011a2c7vagwgi92rbmky1wi8awmrdldqh9f5k80pbmbdi2a"))))))
(native-inputs
(list libtool))
;; libpng.la says "-lz", so propagate it.
(propagated-inputs
(list zlib))
(synopsis "APNG patch for libpng")
(description
"APNG (Animated Portable Network Graphics) is an unofficial
extension of the APNG (Portable Network Graphics) format.
APNG patch provides APNG support to libpng.")
(home-page "https://sourceforge.net/projects/libpng-apng/")
(license license:zlib)))
;; Temporary, until 76798 merges into core-packages-team, and that merges into
;; master.
(define-public libpng-apng-next
(package
(inherit libpng-apng)
(version "1.6.50")
(source
(origin
@@ -371,17 +307,49 @@ APNG patch provides APNG support to libpng.")
(sha256
(base32
"01r34c31gq136jwshdfira44wbl6nb8qfgj4a4vam9r0hr8rdwsd"))))
(build-system gnu-build-system)
(arguments
(list
#:modules '((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-apng
(lambda* (#:key inputs #:allow-other-keys)
(define (apply-patch file)
(invoke "patch" "-p1" "--force"
"--input" file))
(let ((apng.gz (assoc-ref inputs "apng")))
(format #t "Applying APNG patch '~a'...~%"
apng.gz)
(invoke "sh" "-c"
(string-append "gunzip < " apng.gz " > the-patch"))
(apply-patch "the-patch"))))
(add-before 'configure 'no-checks
(lambda _
(substitute* "Makefile.in"
(("^scripts/symbols.chk") "")
(("check: scripts/symbols.chk") "")))))))
(inputs
(modify-inputs (package-inputs libpng-apng)
(replace "apng"
(origin
(method url-fetch)
(uri
(string-append "mirror://sourceforge/libpng-apng/libpng16/"
version "/libpng-" version "-apng.patch.gz"))
(sha256
(base32
"0r811izi40qzy69jmhz0xlkpqlsjj89bang1b3ma6a5igh6dqzb8"))))))))
`(("apng" ,(origin
(method url-fetch)
(uri
(string-append "mirror://sourceforge/libpng-apng/libpng16/"
version "/libpng-" version "-apng.patch.gz"))
(sha256
(base32
"0r811izi40qzy69jmhz0xlkpqlsjj89bang1b3ma6a5igh6dqzb8"))))))
(native-inputs (list libtool))
;; libpng.la says "-lz", so propagate it.
(propagated-inputs (list zlib))
(synopsis "APNG patch for libpng")
(description
"APNG (Animated Portable Network Graphics) is an unofficial
extension of the APNG (Portable Network Graphics) format.
APNG patch provides APNG support to libpng.")
(home-page "https://sourceforge.net/projects/libpng-apng/")
(license license:zlib)))
(define-public pngcrush
(package
+3 -7
View File
@@ -282,7 +282,7 @@
(srfi srfi-26)
(rnrs bytevectors)
(rnrs io ports)
(guix elf)
(system vm elf)
(guix build gremlin)
,@%default-gnu-imported-modules)
#:phases
@@ -530,15 +530,11 @@
;; The following two functions are from Guix's icecat package in
;; (gnu packages gnuzilla). See commit
;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b.
(define (runpath-of lib)
(call-with-input-file lib
(compose elf-dynamic-info-runpath elf-dynamic-info
parse-elf get-bytevector-all)))
(define (runpaths-of-input label)
(let* ((dir (string-append (assoc-ref inputs label)
"/lib"))
(libs (find-files dir "\\.so$")))
(append-map runpath-of libs)))
(append-map file-runpath libs)))
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(libs (map
@@ -641,7 +637,7 @@
libjpeg-turbo
libnotify
libpciaccess
libpng-apng-next
libpng-apng
libva
libvpx
libwebp
+3 -5
View File
@@ -3333,13 +3333,13 @@ GnuPG-based password manager like @code{pass}.")
(lambda _
(let* ((info-dir (string-append #$output "/share/info"))
(info (string-append info-dir
"/TheLinuxKernel.info.gz")))
"/TheLinuxKernel.info.zst")))
(with-directory-excursion "Documentation/output"
(invoke "make" "-C" "texinfo" "install-info"
(string-append "infodir=" info-dir)))
;; Create a symlink, for convenience.
(symlink info (string-append info-dir
"/linux.info.gz"))))))))
"/linux.info.zst"))))))))
(native-inputs
(list graphviz
perl
@@ -4215,9 +4215,7 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
''("--with-libunwind"
;; Don't fail if the architecture doesn't support different
;; personalities.
"--enable-mpers=check")
;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
#:parallel-tests? #f)) ; undeterministic failures
"--enable-mpers=check")))
(inputs (list libunwind))
(native-inputs
(list autoconf
+2 -2
View File
@@ -30,14 +30,14 @@
(define-public m4
(package
(name "m4")
(version "1.4.19")
(version "1.4.20")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/m4/m4-"
version ".tar.xz"))
(sha256
(base32
"15mghcksh11saylpm86h1zkz4in0rbi0pk8i6nqxkdikdmfdxbk3"))))
"0axgilr6n88br7msm3ls8m4zlwgk4q3vcjqw1cknqpyg3hxfldp2"))))
(build-system gnu-build-system)
(arguments
`(;; Explicitly disable tests when cross-compiling, otherwise 'make check'
+2 -2
View File
@@ -402,7 +402,7 @@ on any distribution, and the nroff source is included."))))
;; input "locales" contain the original (English) text.
(package
(name "help2man")
(version "1.49.2")
(version "1.49.3")
(source
(origin
(method url-fetch)
@@ -410,7 +410,7 @@ on any distribution, and the nroff source is included."))))
version ".tar.xz"))
(sha256
(base32
"0dnxx96lbcb8ab8yrdkqll14cl5n0bch8qpd9qj3c2ky78hhwbly"))))
"0kzxla1w0w4z5la255lg9q51wy3qx8f1b0i6gbhaz9pcybg4yzjd"))))
(build-system gnu-build-system)
(arguments
(list
@@ -0,0 +1,54 @@
Retrieved from Poky:
https://git.enea.com/cgit/linux/poky.git/plain/meta/recipes-devtools/flex/flex/0001-build-tests-add-missing-parser-scanner-dependencies.patch?id=bf94ea1cc4e966fa2cf55206389f9c34fbd5419d
From 47e3916842ffefd7def84ae85758fdcceeb77839 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Thu, 20 Mar 2025 12:16:50 +0000
Subject: [PATCH] build(tests): add missing parser->scanner dependencies
With sufficient parallelism and `make --shuffle` to reorder builds the
test suite occasionally fails to build with errors like this:
tests/bison_yylval_parser.y:36:10: fatal error: bison_yylval_scanner.h: No such file or directory
36 | #include "bison_yylval_scanner.h"
Solve this by adding the missing dependencies to the *_parser.o targets
on the _scanner.h files.
Upstream-Status: Submitted [https://github.com/westes/flex/pull/702]
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
tests/Makefile.am | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2cb51df..d0c199d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -343,6 +343,7 @@ FLEX = $(top_builddir)/src/flex
bison_nr_main.$(OBJEXT): bison_nr_parser.h bison_nr_scanner.h
bison_nr_scanner.$(OBJEXT): bison_nr_parser.h
+bison_nr_parser.$(OBJEXT): bison_nr_scanner.h
bison_nr_scanner.h: bison_nr_scanner.c
@if test ! -f $@; then rm -f $<; else :; fi
@@ -350,6 +351,7 @@ bison_nr_scanner.h: bison_nr_scanner.c
bison_yylloc_main.$(OBJEXT): bison_yylloc_parser.h bison_yylloc_scanner.h
bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h
+bison_yylloc_parser.$(OBJEXT): bison_yylloc_scanner.h
bison_yylloc_scanner.h: bison_yylloc_scanner.c
@if test ! -f $@; then rm -f $<; else :; fi
@@ -357,6 +359,7 @@ bison_yylloc_scanner.h: bison_yylloc_scanner.c
bison_yylval_main.$(OBJEXT): bison_yylval_parser.h bison_yylval_scanner.h
bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h
+bison_yylval_parser.$(OBJEXT): bison_yylval_scanner.h
bison_yylval_scanner.h: bison_yylval_scanner.c
@if test ! -f $@; then rm -f $<; else :; fi
--
2.43.0
@@ -1,51 +0,0 @@
Don't escape forward slashes to prevent a warning from grep 3.8.
diff --git a/tests/link-order.at b/tests/link-order.at
--- a/tests/link-order.at
+++ b/tests/link-order.at
@@ -99,12 +99,12 @@ aix* | interix*) ;; # These systems have different path syntax
case $hardcode_direct$hardcode_direct_absolute in
yesno)
AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
+ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
;;
*)
AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
;;
esac
diff --git a/tests/testsuite b/tests/testsuite
--- a/tests/testsuite
+++ b/tests/testsuite
@@ -20611,11 +20611,11 @@ aix* | interix*) ;; # These systems have different path syntax
yesno)
{ set +x
$as_echo "$at_srcdir/link-order.at:101: if \$EGREP relinking stderr; then
- \$EGREP \" .*\\/new\\/lib/libb\$shared_ext .*\\/old\\/lib/libcee\$shared_ext\" stdout
+ \$EGREP \" .*/new/lib/libb\$shared_ext .*/old/lib/libcee\$shared_ext\" stdout
else :; fi"
at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:101"
( $at_check_trace; if $EGREP relinking stderr; then
- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
+ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
else :; fi
) >>"$at_stdout" 2>>"$at_stderr" 5>&-
at_status=$? at_failed=false
@@ -20633,11 +20633,11 @@ $at_traceon; }
*)
{ set +x
$as_echo "$at_srcdir/link-order.at:106: if \$EGREP relinking stderr; then
- \$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout
+ \$EGREP \" -L.*/new\\/lib -lb -L.*/old/lib -lcee\" stdout
else :; fi"
at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:106"
( $at_check_trace; if $EGREP relinking stderr; then
- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
else :; fi
) >>"$at_stdout" 2>>"$at_stderr" 5>&-
at_status=$? at_failed=false
@@ -1,33 +0,0 @@
Skip the nopic test on ARM, MIPS and RISC-V systems.
--- libtool-2.4.6/tests/demo.at.orig 2015-01-16 13:52:04.000000000 -0500
+++ libtool-2.4.6/tests/demo.at 2015-02-16 10:48:51.435851966 -0500
@@ -510,7 +510,7 @@
AT_SETUP([force non-PIC objects])
AT_CHECK([case $host in
-hppa*|x86_64*|s390*)
+hppa*|x86_64*|s390*|arm*|mips*|riscv*)
# These hosts cannot use non-PIC shared libs
exit 77 ;;
*-solaris*|*-sunos*)
--- libtool-2.4.6/tests/testsuite.orig 2015-02-15 11:15:25.000000000 -0500
+++ libtool-2.4.6/tests/testsuite 2015-02-16 10:50:58.736483216 -0500
@@ -8741,7 +8741,7 @@
{ set +x
$as_echo "$at_srcdir/demo.at:513: case \$host in
-hppa*|x86_64*|s390*)
+hppa*|x86_64*|s390*|arm*|mips*|riscv*)
# These hosts cannot use non-PIC shared libs
exit 77 ;;
*-solaris*|*-sunos*)
@@ -8766,7 +8766,7 @@
"
at_fn_check_prepare_notrace 'a `...` command substitution' "demo.at:513"
( $at_check_trace; case $host in
-hppa*|x86_64*|s390*)
+hppa*|x86_64*|s390*|arm*|mips*|riscv*)
# These hosts cannot use non-PIC shared libs
exit 77 ;;
*-solaris*|*-sunos*)
+25
View File
@@ -0,0 +1,25 @@
Retrieved from: https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/libxmi/files/libxmi-1.3-gcc15.patch
https://bugs.gentoo.org/944450
--- a/sys-defines.h
+++ b/sys-defines.h
@@ -166,17 +166,7 @@ extern __C_LINKAGE void free (void * ptr);
/* Support the `bool' datatype, which our code uses extensively. */
/**************************************************************************/
-#ifndef __cplusplus
-#ifndef HAVE_BOOL_IN_CC
-#ifdef __STDC__
-typedef enum { false = 0, true = 1 } bool;
-#else /* not __STDC__, do things the old-fashioned way */
-typedef int bool;
-#define false 0
-#define true 1
-#endif
-#endif /* not HAVE_BOOL_IN_CC */
-#endif /* not __cplusplus */
+#include <stdbool.h>
/**************************************************************************/
/* Define numerical constants (unofficial, so may not be in math.h). */
@@ -0,0 +1,15 @@
Retrieved from: https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/libxmi/files/libxmi-1.3-gcc15.patch
https://bugs.gentoo.org/899832
--- a/configure.in
+++ b/configure.in
@@ -77,7 +77,7 @@ int main()
int i;
for (i=0; i < B; i++)
Array[[i]] = i - 3;
- exit (Array[[1]] != -2);
+ return (Array[[1]] != -2);
}],
ac_cv_c_gcc_strength_bug="no",
ac_cv_c_gcc_strength_bug="yes",
+27
View File
@@ -0,0 +1,27 @@
Retrieved from https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/plotutils/files/plotutils-2.6-c23.patch
https://bugs.gentoo.org/946332
https://build.opensuse.org/projects/openSUSE:Factory/packages/plotutils/files/plotutils-gcc15.patch?expand=1
--- a/include/sys-defines.h
+++ b/include/sys-defines.h
@@ -255,7 +255,7 @@ extern __C_LINKAGE void free (void * ptr
#ifndef __cplusplus
#ifdef __STDC__
-typedef enum { false = 0, true = 1 } bool;
+# include <stdbool.h>
#else /* not __STDC__, do things the old-fashioned way */
typedef int bool;
#define false 0
--- a/libxmi/sys-defines.h
+++ b/libxmi/sys-defines.h
@@ -169,7 +169,7 @@ extern __C_LINKAGE void free (void * ptr
#ifndef __cplusplus
#ifndef HAVE_BOOL_IN_CC
#ifdef __STDC__
-typedef enum { false = 0, true = 1 } bool;
+# include <stdbool.h>
#else /* not __STDC__, do things the old-fashioned way */
typedef int bool;
#define false 0
@@ -0,0 +1,56 @@
Retrieved from: https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/plotutils/files/plotutils-2.6-configure-c99.patch
Do not call the undeclared exit function. This avoids build problems
with future compilers which do not support implicit function
declarations.
diff --git a/configure b/configure
index 229ccd453ae4487f..fdf3785ad4c5175f 100755
--- a/configure
+++ b/configure
@@ -19537,9 +19537,9 @@ int main()
|| fflush ((FILE *)0) < 0
|| (fpr = fopen ("conftest0", "r")) == (FILE *)0
|| fread (test_array, 1, 7, fpr) != 7)
- exit (1);
+ return 1;
else
- exit(0); }
+ return 0; }
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
@@ -24022,7 +24022,7 @@ int main()
int i;
for (i=0; i < B; i++)
Array[i] = i - 3;
- exit (Array[1] != -2);
+ return Array[1] != -2;
}
_ACEOF
rm -f conftest$ac_exeext
diff --git a/configure.ac b/configure.ac
index 8fb7b640864eb4a8..d1f6d7e08c6946d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,9 +88,9 @@ int main()
|| fflush ((FILE *)0) < 0
|| (fpr = fopen ("conftest0", "r")) == (FILE *)0
|| fread (test_array, 1, 7, fpr) != 7)
- exit (1);
+ return 1;
else
- exit(0); }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
+ return 0; }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
# Checks for header files: ANSI C, POSIX, and nonstandard Unix headers.
AC_HEADER_STDC
@@ -383,7 +383,7 @@ int main()
int i;
for (i=0; i < B; i++)
Array[[i]] = i - 3;
- exit (Array[[1]] != -2);
+ return Array[[1]] != -2;
}]])],
[ac_cv_c_gcc_strength_bug="no"],[ac_cv_c_gcc_strength_bug="yes"],[ac_cv_c_gcc_strength_bug="yes"]) )
if test "$ac_cv_c_gcc_strength_bug" = "yes"
@@ -0,0 +1,46 @@
https://github.com/NixOS/nixpkgs/commit/92d99c521b2c02fa645b3b993ac4bbaf49e43ddd
diff -ur a/pic2plot/gram.cc b/pic2plot/gram.cc
--- a/pic2plot/gram.cc 2000-06-28 00:23:21.000000000 -0400
+++ b/pic2plot/gram.cc 2023-09-07 22:59:47.004460065 -0400
@@ -1229,9 +1229,9 @@
char *from;
unsigned int count;
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ char *f = from;
+ char *t = to;
+ int i = count;
while (i-- > 0)
*t++ = *f++;
@@ -1244,9 +1244,9 @@
static void
__yy_memcpy (char *to, char *from, unsigned int count)
{
- register char *t = to;
- register char *f = from;
- register int i = count;
+ char *t = to;
+ char *f = from;
+ int i = count;
while (i-- > 0)
*t++ = *f++;
@@ -1289,10 +1289,10 @@
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
+ int yystate;
+ int yyn;
+ short *yyssp;
+ YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
@@ -0,0 +1,18 @@
Description: Fix build error with -Werror=format-security.
Forwarded: https://lists.gnu.org/archive/html/bug-plotutils/2016-01/msg00000.html
Author: Stanislav Ochotnicky <sochotnicky@redhat.com>
Origin: http://pkgs.fedoraproject.org/cgit/plotutils.git
diff --git a/pic2plot/gram.yy b/pic2plot/gram.yy
index d11320b..1bcce46 100644
--- a/pic2plot/gram.yy
+++ b/pic2plot/gram.yy
@@ -1833,7 +1833,7 @@ do_sprintf(const char *form, const double *v, int nv)
{
one_format += *form++;
one_format += '\0';
- sprintf(sprintf_buf, one_format.contents());
+ sprintf(sprintf_buf, "%s", one_format.contents());
}
else
{
+118
View File
@@ -0,0 +1,118 @@
Gentoo patch to unbundle libxmi.
Retrieved from: https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/plotutils/files/plotutils-2.6-libxmi.patch
Makefile.am | 2 +-
configure.ac | 2 +-
libplot/Makefile.am | 5 +++--
libplot/extern.h | 4 ++--
libplotter/Makefile.am | 6 ++++--
5 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index b506d17..09d3eda 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ endif
if NO_LIBXMI
ADD_LIBXMI =
else
-ADD_LIBXMI = libxmi
+ADD_LIBXMI =
endif
SUBDIRS = lib spline double ode ode-examples libplot $(ADD_LIBXMI) plot tek2plot plotfont graph hersheydemo $(ADD_LIBPLOTTER) include info doc fonts test
diff --git a/configure.ac b/configure.ac
index 8fb7b64..4ea0fc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,5 +392,5 @@ int main()
fi
fi
-AC_CONFIG_FILES([Makefile double/Makefile graph/Makefile hersheydemo/Makefile pic2plot/Makefile pic2plot/doc/Makefile pic2plot/libgroff/Makefile pic2plot/include/Makefile info/Makefile lib/Makefile libplot/Makefile libplotter/Makefile libxmi/Makefile libxmi/info/Makefile plot/Makefile tek2plot/Makefile tek2plot/teksamples/Makefile plotfont/Makefile spline/Makefile ode/Makefile ode-examples/Makefile include/Makefile doc/Makefile fonts/Makefile fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile test/Makefile])
+AC_CONFIG_FILES([Makefile double/Makefile graph/Makefile hersheydemo/Makefile pic2plot/Makefile pic2plot/doc/Makefile pic2plot/libgroff/Makefile pic2plot/include/Makefile info/Makefile lib/Makefile libplot/Makefile libplotter/Makefile plot/Makefile tek2plot/Makefile tek2plot/teksamples/Makefile plotfont/Makefile spline/Makefile ode/Makefile ode-examples/Makefile include/Makefile doc/Makefile fonts/Makefile fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile test/Makefile])
AC_OUTPUT
diff --git a/libplot/Makefile.am b/libplot/Makefile.am
index 356cbef..a0cb2ff 100644
--- a/libplot/Makefile.am
+++ b/libplot/Makefile.am
@@ -8,7 +8,7 @@ libplot_la_LDFLAGS = -version-info 4:4:2
INCLUDES = $(X_CFLAGS) -I$(srcdir)/../include -DLIBPLOT
-MISRC = mi_alloc.c mi_api.c mi_arc.c mi_canvas.c mi_fllarc.c mi_fllrct.c \
+_MISRC = mi_alloc.c mi_api.c mi_arc.c mi_canvas.c mi_fllarc.c mi_fllrct.c \
mi_fplycon.c mi_gc.c mi_ply.c mi_plycon.c mi_plygen.c mi_plypnt.c \
mi_plyutil.c mi_spans.c mi_widelin.c mi_zerarc.c mi_zerolin.c mi_version.c
@@ -87,7 +87,7 @@ x_savestate.c x_text.c y_closepl.c y_defplot.c y_erase.c y_openpl.c
libplot_la_SOURCES = apinewc.c apioldc.c apioldcc.c $(ALLSRC)
-MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
+_MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
mi_ply.h mi_scanfill.h mi_spans.h mi_widelin.h mi_zerarc.h
noinst_HEADERS = extern.h g_arc.h g_colorname.h g_control.h g_cntrlify.h \
@@ -110,6 +110,7 @@ libplot_la_LIBADD = $(X_LIBS) $(X_TOOLKIT_LIBS) $(X_PRE_LIBS) $(X_BASIC_LIBS) $(
endif
endif
+libplot_la_LIBADD += -lxmi
## execute the following command in ../libxmi to produce the commands
## that follow
diff --git a/libplot/extern.h b/libplot/extern.h
index 39a6f8c..87a05f1 100644
--- a/libplot/extern.h
+++ b/libplot/extern.h
@@ -1262,7 +1262,7 @@ extern void _delete_color_name_cache (plColorNameCache *color_cache);
and a separate version of libxmi. */
/* libxmi API functions */
-
+/*
#define miClearPaintedSet _pl_miClearPaintedSet
#define miCopyCanvas _pl_miCopyCanvas
#define miCopyGC _pl_miCopyGC
@@ -1291,7 +1291,7 @@ extern void _delete_color_name_cache (plColorNameCache *color_cache);
#define miSetGCPixels _pl_miSetGCPixels
#define miSetPixelMerge2 _pl_miSetPixelMerge2
#define miSetPixelMerge3 _pl_miSetPixelMerge3
-
+*/
/* an external libxmi symbol */
#define mi_libxmi_ver _pl_mi_libxmi_ver
diff --git a/libplotter/Makefile.am b/libplotter/Makefile.am
index 9b478d6..11466ad 100644
--- a/libplotter/Makefile.am
+++ b/libplotter/Makefile.am
@@ -6,7 +6,7 @@ libplotter_la_LDFLAGS = -version-info 4:4:2
INCLUDES = $(X_CFLAGS) -I$(srcdir)/../include -DLIBPLOT -DLIBPLOTTER
-MISRC = mi_alloc.cc mi_api.cc mi_arc.cc mi_canvas.cc mi_fllarc.cc \
+_MISRC = mi_alloc.cc mi_api.cc mi_arc.cc mi_canvas.cc mi_fllarc.cc \
mi_fllrct.cc mi_fplycon.cc mi_gc.cc mi_ply.cc mi_plycon.cc mi_plygen.cc \
mi_plypnt.cc mi_plyutil.cc mi_spans.cc mi_widelin.cc mi_zerarc.cc \
mi_zerolin.cc mi_version.cc
@@ -84,7 +84,7 @@ endif
endif
-MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
+_MIHEADERS = xmi.h mi_api.h mi_arc.h mi_fllarc.h mi_fply.h mi_gc.h mi_line.h \
mi_ply.h mi_scanfill.h mi_spans.h mi_widelin.h mi_zerarc.h
ALLHEADERS = extern.h g_arc.h g_colorname.h g_control.h g_cntrlify.h \
@@ -111,6 +111,8 @@ libplotter_la_LIBADD = $(X_LIBS) $(X_TOOLKIT_LIBS) $(X_PRE_LIBS) $(X_BASIC_LIBS)
endif
endif
+libplotter_la_LIBADD += -lxmi
+
## execute the following command in ../libplot to produce the commands
## that follow
## (for i in ?_*.c; do echo "$i"c: "\$(top_srcdir)/libplot/$i"; echo " rm -f $i"c" ; if \$(LN_S) \$(top_srcdir)/libplot/$i $i"c" ; then true ; else cp -p \$(top_srcdir)/libplot/$i $i"c" ; fi"; echo; done)
@@ -0,0 +1,75 @@
Retrieved from: https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/plotutils/files/plotutils-2.6-makefile.patch
--- plotutils-2.6.orig/configure.ac 2009-07-29 20:14:09.000000000 -0700
+++ plotutils-2.6/configure.ac 2010-10-18 01:46:57.328444564 -0700
@@ -65,6 +65,8 @@
# SCO OpenServer 5 (i.e. *-*-sco3.2v5*), "-belf" is added.
AC_PROG_LIBTOOL
+AC_PROG_CXX
+
# Determine extension (e.g. ".exe") on executables, if any.
AC_EXEEXT
--- plotutils-2.6.orig/doc/Makefile.am 2009-07-30 08:49:46.000000000 -0700
+++ plotutils-2.6/doc/Makefile.am 2010-10-18 01:57:50.525852285 -0700
@@ -3,11 +3,3 @@
# files with nonstandard names in this directory
EXTRA_DIST = colors.txt h-fonts.txt h-glyphs.txt hershey.bib kana.txt kanji.txt
-
-# remove documentation files installed by previous versions of the package,
-# with obsolete names
-
-OBSOLETEDOC = hershey-demo.c hershey-fonts hershey-number hershey.doc h-fonts.doc h-glyphs.doc kana.doc kanji.doc demo-page h-demo.c
-
-install-data-hook:
- -for f in $(OBSOLETEDOC) ; do rm -f $(datadir)/libplot/$$f; done
--- plotutils-2.6.orig/graph/Makefile.am 2005-11-25 20:40:13.000000000 -0800
+++ plotutils-2.6/graph/Makefile.am 2010-10-18 01:23:07.194720342 -0700
@@ -10,15 +10,5 @@
CLEANFILES = fontlist.c
-# remove executables installed by previous versions of the package, and
-# remove obsolete library versions too
-
-OBSOLETEBINS = graph-tek graph-hpgl graph-fig graph-ps graph-X
-OBSOLETELIBS = libplottek.a libplothpgl.a libplotfig.a libplotps.a libplotX.a
-
-install-exec-hook:
- -for f in $(OBSOLETEBINS) ; do rm -f $(bindir)/$$f; done
- -for f in $(OBSOLETELIBS) ; do rm -f $(libdir)/$$f; done
-
fontlist.c: $(top_srcdir)/lib/fontlist.c
@rm -f fontlist.c ; if $(LN_S) $(top_srcdir)/lib/fontlist.c fontlist.c ; then true ; else cp -p $(top_srcdir)/lib/fontlist.c fontlist.c ; fi
--- plotutils-2.6.orig/plot/Makefile.am 2005-11-25 20:40:13.000000000 -0800
+++ plotutils-2.6/plot/Makefile.am 2010-10-18 01:23:37.714971379 -0700
@@ -9,12 +9,5 @@
CLEANFILES = fontlist.c
-# remove executables installed by previous versions of the package
-
-OBSOLETEBINS = plot2plot plot2tek plot2hpgl plot2fig plot2ps plot2X
-
-install-exec-hook:
- -for f in $(OBSOLETEBINS) ; do rm -f $(bindir)/$$f; done
-
fontlist.c: $(top_srcdir)/lib/fontlist.c
@rm -f fontlist.c ; if $(LN_S) $(top_srcdir)/lib/fontlist.c fontlist.c ; then true ; else cp -p $(top_srcdir)/lib/fontlist.c fontlist.c ; fi
--- plotutils-2.6.orig/tek2plot/Makefile.am 2005-11-25 20:40:13.000000000 -0800
+++ plotutils-2.6/tek2plot/Makefile.am 2010-10-18 01:23:48.011056089 -0700
@@ -12,12 +12,5 @@
SUBDIRS = teksamples
-# remove executables installed by previous versions of the package
-
-OBSOLETEBINS = tek2tek tek2hpgl tek2fig tek2ps tek2X
-
-install-exec-hook:
- -for f in $(OBSOLETEBINS) ; do rm -f $(bindir)/$$f; done
-
fontlist.c: $(top_srcdir)/lib/fontlist.c
@rm -f fontlist.c ; if $(LN_S) $(top_srcdir)/lib/fontlist.c fontlist.c ; then true ; else cp -p $(top_srcdir)/lib/fontlist.c fontlist.c ; fi
@@ -0,0 +1,16 @@
Retrieved from https://raw.githubusercontent.com/gentoo/gentoo/refs/heads/master/media-libs/plotutils/files/plotutils-2.5.1-rangecheck.patch
Source: Steve Tell (http://lists.gnu.org/archive/html/bug-gnu-utils/2003-12/msg00023.html)
Upstream: Sent in 2003, not applied yet.
Reason: Gentoo bug #47688
--- plotutils-2.5.1.orig/graph/plotter.c 2008-09-26 23:48:15.000000000 +0200
+++ plotutils-2.5.1/graph/plotter.c 2008-11-08 13:10:14.000000000 +0100
@@ -1011,7 +1011,7 @@
multigrapher->x_trans.output_min = 0.0;
multigrapher->x_trans.output_max = (double)PLOT_SIZE;
multigrapher->x_trans.output_range = multigrapher->x_trans.output_max - multigrapher->x_trans.output_min;
- multigrapher->x_trans.output_min = 0.0;
+ multigrapher->y_trans.output_min = 0.0;
multigrapher->y_trans.output_max = (double)PLOT_SIZE;
multigrapher->y_trans.output_range = multigrapher->y_trans.output_max - multigrapher->y_trans.output_min;
@@ -1,47 +0,0 @@
Retrieved from Fedora: https://src.fedoraproject.org/rpms/pstoedit/tree
diff --git a/src/pstoedit.cpp b/src/pstoedit.cpp
index a718f37..ac0df37 100755
--- a/src/pstoedit.cpp
+++ b/src/pstoedit.cpp
@@ -327,6 +327,11 @@ extern FILE *yyin; // used by lexer
// otherwise we could declare it locally where it is used
+extern "C" DLLEXPORT void loadpstoeditplugins_plainC(const char *progname, int verbose)
+{
+ return loadpstoeditplugins(progname, cerr, (bool) verbose);
+}
+
static void usage(ostream & outstream, bool forTeX, bool withdetails, bool withcategories )
{
if (withcategories) {
diff --git a/src/pstoedit.h b/src/pstoedit.h
index 294b3c2..74ebf2a 100755
--- a/src/pstoedit.h
+++ b/src/pstoedit.h
@@ -100,8 +100,13 @@ void clearPstoeditDriverInfo_plainC(struct DriverDescription_S * ptr);
#ifdef __cplusplus
extern "C" DLLEXPORT
-#endif
void loadpstoeditplugins(const char* progname, std::ostream & errstream, bool verbose);
+#endif
+
+#ifdef __cplusplus
+extern "C" DLLEXPORT
+#endif
+void loadpstoeditplugins_plainC(const char* progname, int verbose);
#ifdef __cplusplus
extern "C" DLLEXPORT
--- a/src/pstoedit.orig.h 2023-07-22 19:27:43.691166652 +0200
+++ b/src/pstoedit.h 2023-07-22 19:31:18.897952130 +0200
@@ -37,6 +37,7 @@
#endif
#include "pstoedll.h"
+#include <stdbool.h>
typedef int (*execute_interpreter_function)(int argc, const char * const argv[]);
@@ -0,0 +1,10 @@
Retrieved from: <https://tug.org/pipermail/tex-live/2025-September/051785.html>
--- a/texk/web2c/luatexdir/luaoutputdir.test (revision 76261)
+++ b/texk/web2c/luatexdir/luaoutputdir.test (working copy)
@@ -14,4 +14,5 @@
outdir=tests/outdirlua
outfile=outfileLUA.tex
rm -rf $outdir # don't let previous runs interfere
+test -d tests || mkdir -p tests # ensure subdir exists
mkdir $outdir || exit 1
+33 -17
View File
@@ -3,7 +3,7 @@
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016-2025 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
;;;
@@ -45,6 +45,7 @@
#:use-module (gnu packages flex)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages graphics)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
@@ -375,17 +376,27 @@ colors, styles, options and details.")
(substitute* "libplot/z_write.c"
(("png_ptr->jmpbuf")
"png_jmpbuf (png_ptr)"))
#t))
;; Unbundle libxmi.
(delete-file-recursively "libxmi")))
(patches
;; The test suite fails on some architectures such as i686 (see:
;; https://lists.gnu.org/archive/html/bug-plotutils/2016-04/msg00002.html).
;; The following Debian patch works around it.
(search-patches "plotutils-spline-test.patch"))))
(search-patches
"plotutils-c23.patch"
"plotutils-configure-c99.patch"
"plotutils-cxx17-fix.patch"
"plotutils-format-security.patch"
"plotutils-libxmi.patch"
"plotutils-makefile.patch"
"plotutils-rangecheck.patch"
;; The test suite fails on some architectures such as i686
;; (see:
;; https://lists.gnu.org/archive/html/bug-plotutils/2016-04/msg00002.html).
;; The following Debian patch works around it.
"plotutils-spline-test.patch"))))
(build-system gnu-build-system)
(arguments
(list #:configure-flags
#~(list "--enable-libplotter"
"--disable-static"
;; On i686 some tests fail due to excess floating point
;; precision; work around it. However, libplotter is C++
;; and thus unaffected by CFLAGS, but '-fexcess-precision'
@@ -395,16 +406,21 @@ colors, styles, options and details.")
#~()))
#:phases
(if (target-x86-32?)
#~(modify-phases %standard-phases
(add-before 'check 'skip-sloppy-test
(lambda _
;; This test reveals a slight difference in the SVG
;; output due to floating point inequalities. Skip it.
(substitute* "test/plot2svg.test"
(("^exit .*") "exit 77")))))
#~%standard-phases)))
(inputs (list libpng libx11 libxt libxaw))
#~(modify-phases %standard-phases
(add-after 'unpack 'force-bootstrap
(lambda _
(delete-file "configure")))
#$@(if (target-x86-32?)
#~((add-before 'check 'skip-sloppy-test
(lambda _
;; This test reveals a slight difference in the
;; SVG output due to floating point inequalities.
;; Skip it.
(substitute* "test/plot2svg.test"
(("^exit .*") "exit 77")))))
#~()))))
(native-inputs (list autoconf automake libtool))
(inputs (list libpng libx11 libxaw libxmi libxt))
(home-page "https://www.gnu.org/software/plotutils/")
(synopsis "Plotting utilities and library")
(description
+4 -4
View File
@@ -512,14 +512,14 @@ is used by the Requests library to verify HTTPS requests.")
(define-public python-cryptography-vectors
(package
(name "python-cryptography-vectors")
(version "44.0.0")
(version "44.0.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cryptography_vectors" version))
(sha256
(base32
"1aw06msy65rs27yxfp4xlwfq432ny1af5cx8s7zsbfa5div2hqhh"))))
"0jrska8814y6m0jcnpmhh40f3r2qmfsbya61pq5ims6vsw6pj3il"))))
(build-system pyproject-build-system)
(arguments (list #:tests? #f)) ; No tests included.
(native-inputs
@@ -534,14 +534,14 @@ is used by the Requests library to verify HTTPS requests.")
(define-public python-cryptography
(package
(name "python-cryptography")
(version "44.0.0")
(version "44.0.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cryptography" version))
(sha256
(base32
"00is2nzcl2pyhr90llga5mnbw3rvakn75rq10x1r6hhb6i7q6knd"))
"0lrhbl0zwqkv86l9jigmbmn1p0s11a42hcqkm0j1ma9nanydh6gy"))
(snippet
#~(begin (use-modules (guix build utils))
(for-each delete-file
+27 -17
View File
@@ -28,7 +28,7 @@
;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
;;; Copyright © 2018, 2019, 2021, 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018, 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2018, 2020-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2018 swedebugia <swedebugia@riseup.net>
;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2019, 2023 Brendan Tildesley <mail@brendan.scot>
@@ -2451,13 +2451,13 @@ ASGI server.")
(define-public python-a2wsgi
(package
(name "python-a2wsgi")
(version "1.10.7")
(version "1.10.10")
(source (origin
(method url-fetch)
(uri (pypi-uri "a2wsgi" version))
(sha256
(base32
"13ikyfmkx7hlrbg5rpcdm6kw4wcsy00giil3f72hpb6sw7vjyinf"))))
"0i8zzq4zijvpp91r6f2278pdj6gqqr7qi6jy1pgkkfl142szzg55"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -9395,7 +9395,7 @@ cython_always = true"))))))))
(define-public python-uvicorn
(package
(name "python-uvicorn")
(version "0.34.0")
(version "0.38.0")
(source
(origin
;; PyPI tarball has no tests.
@@ -9405,24 +9405,33 @@ cython_always = true"))))))))
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "05lkxnpzmr0kik81kdcvavjvvc4d1lgmw88mr4vbwsqk147wgqbc"))))
(base32 "0bfib7wsbg0h48y5wipk93gn3sgv7jkxvdxzvxd0xfnf1wa2jih3"))))
(build-system pyproject-build-system)
(arguments
(list
#:test-flags
#~(list "-o" "asyncio_mode=auto"
;; For some reason tests stacked in infinity re-invocation loop:
;; AssertionError where is_alive =
;; <uvicorn.supervisors.multiprocess.Process object at
;; 0x7ffff39b6110>.is_alive.
;; Maybe this <https://github.com/encode/uvicorn/issues/2466>.
"--ignore=tests/supervisors/test_multiprocess.py"
#~(list
"-o" "asyncio_mode=auto"
;; For some reason tests stacked in infinity re-invocation loop:
;; AssertionError where is_alive =
;; <uvicorn.supervisors.multiprocess.Process object at
;; 0x7ffff39b6110>.is_alive.
;; Maybe this <https://github.com/encode/uvicorn/issues/2466>.
"--ignore=tests/supervisors/test_multiprocess.py"
#$@(cond
((or (target-aarch64?)
(target-riscv64?))
'("-k not test_send_binary_data_to_server_bigger_than_default_on_websockets"))
(#t '())))))
;; There are websockets related deprecation warnings breaking
;; the test suite (see:
;; <https://github.com/Kludex/uvicorn/discussions/2755>).
"-W" "ignore::DeprecationWarning"
;; The test_ssl_config test fails due to the following warning:
;; "ResourceWarning: unclosed <socket.socket fd=13, family=1, type=1,
;; proto=0>".
"-W" "ignore::ResourceWarning"
;; This test does not raise a ConnectionClosedError exception as
;; expected (see:
;; <https://github.com/Kludex/uvicorn/discussions/2755#discussioncomment-14918784>).
"-k not test_send_binary_data_to_server_bigger_than_default_on_websockets")))
(native-inputs
(list nss-certs-for-test
python-a2wsgi
@@ -9431,6 +9440,7 @@ cython_always = true"))))))))
python-pytest
python-pytest-asyncio-0.26
python-pytest-mock
python-pytest-xdist
python-requests
python-trustme
python-wsproto))
+10 -4
View File
@@ -13731,7 +13731,12 @@ wraps Python's standard library threading and multiprocessing objects.")
(arguments
(list
#:test-flags
#~(list "-k" (string-join
#~(list "-n" (number->string (parallel-job-count))
;; The socket tests fail when run in parallel with xdist (see:
;; <https://github.com/pexpect/pexpect/issues/809>).
"--ignore=tests/test_socket.py"
"--ignore=tests/test_socket_fd.py"
"-k" (string-join
(list
;; Disable failing test, see
;; <https://github.com/pexpect/pexpect/issues/568>.
@@ -13763,9 +13768,10 @@ wraps Python's standard library threading and multiprocessing objects.")
;; and unlikely to change.
(("/bin'") "/dev'")))))))
(native-inputs
(list bash ;full Bash for 'test_replwrap.py'
(list bash ;full Bash for 'test_replwrap.py'
man-db
python-pytest
python-pytest-xdist
python-setuptools
python-wheel
which))
@@ -16369,14 +16375,14 @@ Python.")
(define-public python-markdown
(package
(name "python-markdown")
(version "3.8.2")
(version "3.10")
(source
(origin
(method url-fetch)
(uri (pypi-uri "markdown" version))
(sha256
(base32
"0ibw4didlgfffpzc807rak96df3mwqijbrhw8dkpzqhjvmq9lyr4"))))
"03lcnvr39pmfiids6jdr1iwwr0hg62m0zf7g5arvdcm4597js1ip"))))
(build-system pyproject-build-system)
(native-inputs
(list python-pyyaml
+5 -17
View File
@@ -677,20 +677,18 @@ def contents() -> str:
(package
(inherit python-3.10)
(name "python")
(version "3.11.11")
(replacement python-3.11/fixed)
(version "3.11.14")
(source (origin
(method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
(uri (string-append "https://www.python.org/ftp/python/" version
"/Python-" version ".tar.xz"))
(patches (search-patches
"python-3-deterministic-build-info.patch"
"python-3.11-fix-tests.patch"
"python-3-hurd-configure.patch"
"python-3-search-paths.patch"))
(sha256
(base32
"1qrvsxg5g0b0pgz2iigxic2j3g6b2c59iva46vins8ydl33j169a"))
(sha256 (base32
"0y4v42qm66nvizjxbnixh59283a54nki51jmbrgwkhc8bkndhgld"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -1081,16 +1079,6 @@ def contents() -> str:
(variable "PYTHONTZPATH")
(files (list "share/zoneinfo")))))))
(define-public python-3.11/fixed
(package/inherit python-3.11
(version "3.11.14")
(source (origin
(inherit (package-source python-3.11))
(uri (string-append "https://www.python.org/ftp/python/" version
"/Python-" version ".tar.xz"))
(sha256 (base32
"0y4v42qm66nvizjxbnixh59283a54nki51jmbrgwkhc8bkndhgld"))))))
(define-public python-3.12
(package
(name "python-next")
+8 -19
View File
@@ -4,6 +4,7 @@
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,22 +50,10 @@
(list (readline-patch version seqno (base32 hash))
...))
(define %patch-series-8.2
(define %patch-series-8.3
(patch-series
"8.2"
(1 "1xxgfgr6hn3ads8m8xsrdi1kbx1f3s69k0danpd9x4haqhg7zydv")
(2 "0ly0siy6qy3l7hv12847adpfa34yq1w4qz9qkw6vrxv25j106rg0")
(3 "1c5cwvvkx9mfmpaapymq9cavmzh4fnagkjlchsqx4vml8sx8gx94")
(4 "1b15sndx9v5vj3x1f3h73099nlagknx4rbfpd5ldrbw2xgm2wmvr")
(5 "16ac25jz1a1mgkpfp1sydqf6qpsfh0s0dcmrnjpqbhg5va3s6av2")
(6 "18gmh6y3klh0vv28cyqz4is3rlb32pl7f1kf5r482kfjq3w5zd67")
(7 "1xmnpahs983n4w0gn3j0wr8nh1dpva33yj7fvfmhm46ph2wsa4ar")
(8 "0smjjzhwxi2ibpdisnk53lh1pzgka6rhlqyh3662xy69v34ysxx1")
(9 "05m1fwbs7mbs3pz3pg87gbbayandrrcgaqawzliqb6g1jbk8b61x")
(10 "0k3vyrjs2g6y2cfs03l2gp37fhxgqpiwvxb1c7z4q88cbb32x3km")
(11 "1msdahvz56l9m5m69a87zp2c7qrfv0dxwd09rj1697isgy83s0g0")
(12 "1lybzig73pqpcbw79im0kn6299lkcbnh24yigygn5jm2sj7dz2kc")
(13 "1a48lyrhvn6nbj5qhradfpbbs3md5maz7wb32yvaghvfgnak990y")))
"8.3"
(1 "1pl4midx7kc56bw4ansrdpdjpanv1vmp0p6jghrrgrnv0qqs1w11")))
(define %patch-series-7.0
(patch-series
@@ -78,16 +67,16 @@
(define-public readline
(package
(name "readline")
(version (string-append "8.2."
(number->string (length %patch-series-8.2))))
(version (string-append "8.3."
(number->string (length %patch-series-8.3))))
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/readline/readline-"
(version-major+minor version) ".tar.gz"))
(sha256
(base32
"0dbw02ai0z8x6d9s14pl0hnaa2g1kdxnv8qqra1fx13ay5qp3srz"))
(patches (append %patch-series-8.2
"1k31j1prf9zn86hccay2i49vlzks0cy1v3gfjpa8r0k78hh86lzy"))
(patches (append %patch-series-8.3
(search-patches "readline-link-ncurses.patch")))
(patch-flags '("-p0"))))
(build-system gnu-build-system)
+1 -1
View File
@@ -318,7 +318,7 @@ This Guix package is built to use the nettle cryptographic library.")
(guix build union)
(guix build gnu-build-system)
(guix build gremlin)
(guix elf))
(system vm elf))
#:builder
#~(begin
(use-modules (guix build utils)
+2 -1
View File
@@ -826,7 +826,8 @@ and should be preferred to it whenever a package would otherwise depend on
(for-each
delete-file-recursively
(scandir "." (lambda (f)
(not (member f '("." ".." "texmf.cnf")))))))))))
(not (member f '("." ".." "texmf.cnf")))))))))
(patches (search-patches "texlive-bin-luaoutputdir-test.patch"))))
(build-system gnu-build-system)
(arguments
(list
+8 -7
View File
@@ -10,6 +10,7 @@
;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -111,14 +112,14 @@ is on expressing the content semantically, avoiding physical markup commands.")
(define-public texinfo-7
(package
(inherit texinfo)
(version "7.1.1")
(version "7.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/texinfo/texinfo-"
version ".tar.xz"))
(sha256
(base32
"10kcdb3pf7yakniccvv0krchs2fh3vh1rvhvnqr98ll3cbj3gbii"))))
"19k38dqmsk4p03h6yr7p1p7498wpl6f8i06bhbx17wdyixwdfa83"))))
(inputs (modify-inputs (package-inputs texinfo)
(append perl-archive-zip ;needed for 'tex2any --epub3'
perl-unicode-eastasianwidth perl-text-unidecode
@@ -233,8 +234,9 @@ is on expressing the content semantically, avoiding physical markup commands.")
(add-after 'unpack 'absolute-binary-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "info/filesys.c"
(("gunzip") (search-input-file inputs "/bin/gunzip"))
(("gzip") (search-input-file inputs "/bin/gzip")))))
(("gunzip") (search-input-file inputs "bin/gunzip"))
(("gzip") (search-input-file inputs "bin/gzip"))
(("unzstd") (search-input-file inputs "bin/unzstd")))))
(add-after 'install 'keep-only-info-reader
(lambda* (#:key outputs #:allow-other-keys)
;; Remove everything but 'bin/info' and associated
@@ -252,14 +254,13 @@ is on expressing the content semantically, avoiding physical markup commands.")
(with-directory-excursion (string-append out "/share")
(for-each delete-file-recursively
(fold delete (files)
'("info" "locale"))))
#t))))))
'("info" "locale"))))))))))
#:disallowed-references ,(list (this-package-input "perl"))
#:modules ((ice-9 ftw) (srfi srfi-1)
,@%default-gnu-modules)))
(synopsis "Standalone Info documentation reader")
(inputs (modify-inputs (package-inputs texinfo)
(prepend gzip)))))
(prepend gzip zstd)))))
(define-public texi2html
(package
+2 -2
View File
@@ -136,14 +136,14 @@
(define-public ed
(package
(name "ed")
(version "1.21")
(version "1.22.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/ed/ed-"
version ".tar.lz"))
(sha256
(base32
"0xddpcdsdhf1cx7izk9l5dmf8vakjx5ncm1cy1f3libxfac4kqk0"))))
"1qzzjhvxir0mq68yzaxhbhnjmylhv1h4rwqkdzvmmqan40j1b3gm"))))
(build-system gnu-build-system)
(native-inputs (list lzip))
(arguments
+8 -7
View File
@@ -220,13 +220,13 @@ applications, and several support tools.")
(package
(name "python-tzdata")
;; This package should be kept in sync with tzdata in (gnu packages base).
(version "2025.1")
(version "2025.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tzdata" version))
(sha256
(base32 "156nh5d0fagghgyz54ymbd4cnr6z05w8iiin2syjinwcx04lk294"))
(base32 "1fgjsrmwx6z718l6dpy46qpyrg867pjmf3zyhbgzmbqdrj7n62mn"))
(modules '((guix build utils)))
(snippet #~(delete-file-recursively "src/tzdata/zoneinfo"))))
(build-system pyproject-build-system)
@@ -281,14 +281,14 @@ you will remove support for the pytz-specific interface.")
(package
(name "python-pytz")
;; This package should be kept in sync with tzdata in (gnu packages base).
(version "2025.1")
(version "2025.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytz" version))
(sha256
(base32
"13hpf2my8mgqkr38ch7s3rym9zz60m6pq87rcn7b46155az45ny2"))))
"1hw1drs4cdc1cp3j92dk93h46dj5zg3hj66n3b10k8j9pcyrw2rn"))))
(build-system pyproject-build-system)
(arguments
(list #:test-backend #~'unittest
@@ -723,13 +723,13 @@ timestamps.")
(define-public python-arrow
(package
(name "python-arrow")
(version "1.3.0")
(version "1.4.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "arrow" version))
(sha256
(base32
"11bssv25jix57igvfmvg2v8dmwk55b4dh6hgffazidccchbhcm6l"))))
"1mr6wlbd289bb1asc147x2bwajlc16q63m44krvvh0c0x58c037d"))))
(build-system pyproject-build-system)
;; Tests: 1837 passed, 2 xpassed.
(native-inputs
@@ -742,7 +742,8 @@ timestamps.")
python-simplejson))
(propagated-inputs
(list python-dateutil
python-types-python-dateutil))
python-types-python-dateutil
python-tzdata))
(home-page "https://github.com/arrow-py/arrow")
(synopsis "Dates and times for Python")
(description
+1 -1
View File
@@ -362,7 +362,7 @@ Browser.")
(srfi srfi-26)
(rnrs bytevectors)
(rnrs io ports)
(guix elf)
(system vm elf)
(guix build gremlin)
,@%default-gnu-imported-modules)
#:phases
+1 -1
View File
@@ -2959,7 +2959,7 @@ history. It implements the changeset evolution concept for Mercurial.")
(guix build utils)
(guix build gremlin)
(ice-9 ftw)
(guix elf))
(system vm elf))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
+2 -2
View File
@@ -123,12 +123,12 @@ manual."
(infodir "/run/current-system/profile/share/info")
(per-lang (lambda (code)
(string-append infodir "/guix." code
".info.gz")))
".info.zst")))
(file ((@ (srfi srfi-1) find) file-exists?
(list (per-lang with-region)
(per-lang language)
(string-append infodir
"/guix.info.gz"))))
"/guix.info.zst"))))
(node (or (assoc-ref '#$%installation-node-names
with-region)
(assoc-ref '#$%installation-node-names
+2 -1
View File
@@ -56,7 +56,8 @@
'((guix build gnu-build-system)
(guix build utils)
(guix build gremlin)
(guix elf)))
(guix build io) ;used by gremlin
(guix build syscalls))) ;used by io
(define-deprecated/public-alias %gnu-build-system-modules
%default-gnu-imported-modules)
+8 -10
View File
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,13 +18,14 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build debug-link)
#:use-module (guix elf)
#:use-module (guix build io)
#:use-module ((guix build utils)
#:select (find-files elf-file? make-file-writable))
#:use-module (rnrs bytevectors)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
#:use-module (system foreign)
#:use-module (system vm elf)
#:use-module (ice-9 match)
#:export (debuglink-crc32
elf-debuglink
@@ -147,16 +149,12 @@ Return #f for both if ELF lacks a '.gnu_debuglink' section."
(define (set-debuglink-crc file debug-file)
"Compute the CRC of DEBUG-FILE and set it as the '.gnu_debuglink' CRC in
FILE."
(let* ((elf (parse-elf (call-with-input-file file get-bytevector-all)))
(let* ((bv (file->bytevector file #:protections (protection-set read write)))
(elf (parse-elf bv))
(offset (elf-debuglink-crc-offset elf)))
(and offset
(let* ((crc (call-with-input-file debug-file debuglink-crc32))
(bv (make-bytevector 4)))
(bytevector-u32-set! bv 0 crc (elf-byte-order elf))
(let ((port (open file O_RDWR)))
(set-port-position! port offset)
(put-bytevector port bv)
(close-port port))))))
(when offset
(let ((crc (call-with-input-file debug-file debuglink-crc32)))
(bytevector-u32-set! bv offset crc (elf-byte-order elf))))))
;;;
+103 -20
View File
@@ -2,7 +2,7 @@
;;; Copyright © 2012-2021, 2025 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021, 2022, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,12 +22,15 @@
(define-module (guix build gnu-build-system)
#:use-module (guix build utils)
#:use-module (guix build gremlin)
#:use-module (guix elf)
#:use-module (guix build io)
#:use-module ((guix build syscalls) #:select
(has-access-to-libc-shared-library?))
#:use-module (ice-9 ftw)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
#:use-module (ice-9 ftw)
#:use-module (ice-9 popen)
#:use-module (ice-9 threads)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
@@ -49,6 +52,21 @@
;;
;; Code:
;;; This is a lazy module loading hack that is necessary until our
;;; %bootstrap-guile package is new enough (>= 2.1.0) to have (system vm elf).
(define has-system-vm-elf-module? #t)
(catch 'misc-error
(lambda ()
(module-use! (current-module) (resolve-interface '(system vm elf))))
(lambda args
(set! has-system-vm-elf-module? #f)
(format (current-warning-port)
"lacking (system vm elf) module; some phases will be skipped~%")))
(define has-elf-editing-support?
(and has-system-vm-elf-module?
(has-access-to-libc-shared-library?)))
(cond-expand
(guile-2.2
;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
@@ -518,6 +536,13 @@ makefiles."
(debug-file file))
file))
(define (guile-bytecode? file)
(and (string-suffix? ".go" file)
(if has-elf-editing-support?
(elf-section-by-name (parse-elf (file->bytevector file))
".guile.procprops")
#t)))
(define (strip-dir dir)
(format #t "stripping binaries in ~s with ~s and flags ~s~%"
dir strip-command strip-flags)
@@ -526,7 +551,11 @@ makefiles."
debug-output objcopy-command))
(for-each (lambda (file)
(when (or (elf-file? file) (ar-file? file))
(when (and (or (elf-file? file) (ar-file? file))
;; XXX: 'strip' (and 'objdump') choke on the Guile
;; byte-compiled objects, with errors like "Unable
;; to recognise the format of the input file".
(not (guile-bytecode? file)))
;; If an error occurs while processing a file, issue a
;; warning and continue to the next file.
(guard (c ((invoke-error? c)
@@ -567,16 +596,70 @@ makefiles."
strip-directories)))
outputs))))
(define* (compress-debug-info
#:key parallel-build? target outputs
(objcopy-command (if target
(string-append target "-objcopy")
"objcopy"))
(dwz-command (which "dwz"))
#:allow-other-keys)
(define debug-output (assoc-ref outputs "debug"))
(when (and has-elf-editing-support? debug-output)
(let* ((common-file (string-append debug-output
"/lib/debug/" (assoc-ref outputs "out")
"/common.debug"))
(shared-object-file?
(lambda (file)
(and (elf-file? file)
(member ((compose elf-type parse-elf file->bytevector) file)
(list ET_EXEC ET_DYN)))))
(objcopy-can-compress?
(let* ((input-pipe (open-pipe* OPEN_READ "objcopy" "--help"))
(output (get-string-all input-pipe)))
(close-pipe input-pipe)
(string-contains output "--compress-debug-sections")))
(debug-files (find-files debug-output
(lambda (f st)
;; Ignore symlinks.
(eq? 'regular (stat:type st)))
#:stat lstat))
(debug-files-count (length debug-files)))
(unless (zero? debug-files-count)
(when (> debug-files-count 1)
(mkdir-p (dirname common-file)))
;; Deduplicate debug symbols with DWZ.
(when dwz-command ;not available during early bootstrap
(apply invoke dwz-command
"-j" (number->string (if parallel-build?
(parallel-job-count)
1))
`(,@(if (> debug-files-count 1)
`("--multifile" ,common-file)
'())
;; DWZ only operates on ELF shared object files.
,@(filter shared-object-file? debug-files))))
;; Compress the debug sections with Zstd
(when objcopy-can-compress? ;not available during early bootstrap
;; It's safe to use multiple threads as objcopy produces no output.
(n-par-for-each (if parallel-build?
(parallel-job-count)
1)
(lambda (f)
(make-file-writable f)
(or (false-if-exception
(invoke objcopy-command
"--compress-debug-sections=zstd" f))
(invoke objcopy-command
"--compress-debug-sections=zlib" f)))
debug-files))))))
(define* (validate-runpath #:key
(validate-runpath? #t)
(elf-directories '("lib" "lib64" "libexec"
"bin" "sbin"))
outputs #:allow-other-keys)
"When VALIDATE-RUNPATH? is true, validate that all the ELF files in
ELF-DIRECTORIES have their dependencies found in their 'RUNPATH'.
Since the ELF parser needs to have a copy of files in memory, better run this
phase after stripping."
ELF-DIRECTORIES have their dependencies found in their 'RUNPATH'."
(define (sub-directory parent)
(lambda (directory)
(let ((directory (string-append parent "/" directory)))
@@ -598,7 +681,7 @@ phase after stripping."
(length files) directory)
(every* validate-needed-in-runpath files)))
(if validate-runpath?
(if (and has-elf-editing-support? validate-runpath?)
(let ((dirs (append-map (match-lambda
(("debug" . _)
;; The "debug" output is full of ELF files
@@ -653,23 +736,23 @@ and 'man/'. This phase moves directories to the right place if needed."
(define* (compress-documentation #:key
outputs
(compress-documentation? #t)
(info-compressor "gzip")
(info-compressor (if (which "zstd")
"zstd"
"gzip"))
(info-compressor-flags
'("--best" "--no-name"))
(info-compressor-file-extension ".gz")
(man-compressor (if (which "zstd")
"zstd"
info-compressor))
(man-compressor-flags
(if (which "zstd")
(list "-19" "--rm"
"--threads" (number->string
(parallel-job-count)))
info-compressor-flags))
(man-compressor-file-extension
'("--best" "--no-name")))
(info-compressor-file-extension
(if (which "zstd")
".zst"
info-compressor-file-extension))
".gz"))
(man-compressor info-compressor)
(man-compressor-flags info-compressor-flags)
(man-compressor-file-extension
info-compressor-file-extension)
#:allow-other-keys)
"When COMPRESS-INFO-MANUALS? is true, compress Info files found in OUTPUTS
using INFO-COMPRESSOR, called with INFO-COMPRESSOR-FLAGS. Similarly, when
@@ -860,7 +943,7 @@ that traversing all the RUNPATH entries entails."
(format #t "created '~a' from ~a library search path entries~%"
cache-file (length library-path)))))
(if make-dynamic-linker-cache?
(if (and has-elf-editing-support? make-dynamic-linker-cache?)
(match outputs
(((_ . directories) ...)
(for-each make-cache-for-output directories)))
@@ -941,7 +1024,7 @@ that traversing all the RUNPATH entries entails."
patch-usr-bin-file
patch-source-shebangs configure patch-generated-file-shebangs
build check install
patch-shebangs strip
patch-shebangs strip compress-debug-info
validate-runpath
validate-documentation-location
delete-info-dir-file
+62 -69
View File
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,7 +18,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build gremlin)
#:use-module (guix elf)
#:use-module (guix build io)
#:use-module ((guix build utils) #:select (store-file-name?))
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
@@ -62,6 +63,17 @@
;;;
;;; Code:
;;; This is a lazy module loading hack that is necessary until our
;;; %bootstrap-guile package is new enough (>= 2.1.0) to have (system vm elf).
(define has-system-vm-elf-module? #t)
(catch 'misc-error
(lambda ()
(module-use! (current-module) (resolve-interface '(system vm elf))))
(lambda args
(set! has-system-vm-elf-module? #f)
(format (current-warning-port)
"no (system vm elf) module; (guix build gremlin) unusable~%")))
(define-condition-type &elf-error &error
elf-error?
(elf elf-error-elf))
@@ -248,9 +260,7 @@ string table if the type is a string."
(define (file-dynamic-info file)
"Return the <elf-dynamic-info> record of FILE, or #f if FILE lacks dynamic
info."
(call-with-input-file file
(lambda (port)
(elf-dynamic-info (parse-elf (get-bytevector-all port))))))
(elf-dynamic-info (parse-elf (file->bytevector file))))
(define (file-runpath file)
"Return the DT_RUNPATH dynamic entry of FILE as a list of strings, or #f if
@@ -362,8 +372,7 @@ exceeds total size~%"
(elf-segment-type segment))
#f)))
(let* ((elf (call-with-input-file file
(compose parse-elf get-bytevector-all)))
(let* ((elf (parse-elf (file->bytevector file)))
(expand (cute expand-origin <> (dirname file)))
(dyninfo (elf-dynamic-info elf)))
(when dyninfo
@@ -402,38 +411,32 @@ according to DT_NEEDED."
needed)))
runpath))
(define port
(open-file file "r+b"))
(catch #t
(lambda ()
(let* ((elf (parse-elf (get-bytevector-all port)))
(entries (dynamic-entries elf (dynamic-link-segment elf)))
(needed (filter-map (lambda (entry)
(and (= (dynamic-entry-type entry)
DT_NEEDED)
(dynamic-entry-value entry)))
entries))
(runpath (find (lambda (entry)
(= DT_RUNPATH (dynamic-entry-type entry)))
entries))
(old (search-path->list
(dynamic-entry-value runpath)))
(new (minimal-runpath needed old)))
(unless (equal? old new)
(format (current-error-port)
"~a: stripping RUNPATH to ~s (removed ~s)~%"
file new
(lset-difference string=? old new))
(seek port (dynamic-entry-offset runpath) SEEK_SET)
(put-bytevector port (string->utf8 (string-join new ":")))
(put-u8 port 0))
(close-port port)
new))
(lambda (key . args)
(false-if-exception (close-port port))
(apply throw key args))))
(let* ((bv (file->bytevector file #:protections
(protection-set read write)))
(elf (parse-elf bv))
(entries (dynamic-entries elf (dynamic-link-segment elf)))
(needed (filter-map (lambda (entry)
(and (= (dynamic-entry-type entry)
DT_NEEDED)
(dynamic-entry-value entry)))
entries))
(runpath (find (lambda (entry)
(= DT_RUNPATH (dynamic-entry-type entry)))
entries))
(old (search-path->list
(dynamic-entry-value runpath)))
(new (minimal-runpath needed old)))
(unless (equal? old new)
(format (current-error-port)
"~a: stripping RUNPATH to ~s (removed ~s)~%"
file new
(lset-difference string=? old new))
;; Write to bytevector directly.
(let ((src (string->utf8 (string-append (string-join new ":")
"\0"))))
(bytevector-copy! src 0 bv (dynamic-entry-offset runpath)
(bytevector-length src))))
new))
(define-condition-type &missing-runpath-error &elf-error
missing-runpath-error?
@@ -447,36 +450,26 @@ according to DT_NEEDED."
"Set the value of the DT_RUNPATH dynamic entry of FILE, which must name an
ELF file, to PATH, a list of strings. Raise a &missing-runpath-error or
&runpath-too-long-error when appropriate."
(define (call-with-input+output-file file proc)
(let ((port (open-file file "r+b")))
(guard (c (#t (close-port port) (raise c)))
(proc port)
(close-port port))))
(let* ((bv (file->bytevector file #:protections
(protection-set read write)))
(elf (parse-elf bv))
(entries (dynamic-entries elf (dynamic-link-segment elf)))
(runpath (find (lambda (entry)
(= DT_RUNPATH (dynamic-entry-type entry)))
entries))
(path (string->utf8 (string-append (string-join path ":")
"\0"))))
(unless runpath
(raise (condition (&missing-runpath-error (elf elf)
(file file)))))
(call-with-input+output-file file
(lambda (port)
(let* ((elf (parse-elf (get-bytevector-all port)))
(entries (dynamic-entries elf (dynamic-link-segment elf)))
(runpath (find (lambda (entry)
(= DT_RUNPATH (dynamic-entry-type entry)))
entries))
(path (string->utf8 (string-join path ":"))))
(unless runpath
(raise (condition (&missing-runpath-error (elf elf)
(file file)))))
;; There might be padding left beyond RUNPATH in the string table, but
;; we don't know, so assume there's no padding.
(unless (<= (bytevector-length path)
(bytevector-length
(string->utf8 (dynamic-entry-value runpath))))
(raise (condition (&runpath-too-long-error (elf #f #;elf)
(file file)))))
;; There might be padding left beyond RUNPATH in the string table, but
;; we don't know, so assume there's no padding.
(unless (<= (bytevector-length path)
(bytevector-length
(string->utf8 (dynamic-entry-value runpath))))
(raise (condition (&runpath-too-long-error (elf #f #;elf)
(file file)))))
(seek port (dynamic-entry-offset runpath) SEEK_SET)
(put-bytevector port path)
(put-u8 port 0)))))
;;; Local Variables:
;;; eval: (put 'call-with-input+output-file 'scheme-indent-function 1)
;;; End:
(bytevector-copy! path 0 bv (dynamic-entry-offset runpath)
(bytevector-length path))))
+56
View File
@@ -0,0 +1,56 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build io)
#:use-module (guix build syscalls)
#:use-module (ice-9 format)
#:use-module (rnrs bytevectors)
#:use-module (rnrs enums)
#:use-module (rnrs io ports)
#:use-module (system foreign)
#:export (file->bytevector)
;; For convenience.
#:re-export (protection
protection-set
mmap-flag
mmap-flag-set))
;;;
;;; Memory mapped files.
;;;
(define* (file->bytevector file #:key
(protections (protection-set read))
(flags (if (enum-set-member? (protection write)
protections)
(mmap-flag-set shared)
(mmap-flag-set private)))
(offset 0))
"Return a bytevector object that is backed by a memory mapped FILE. This
avoids eagerly copying the full file contents into memory, instead letting the
kernel lazily page it in on demand. The underlying memory map is
automatically unmapped when the bytevector is no longer referenced. Refer to
the documentation of `mmap' for details about the accepted arguments."
(let* ((mode (format #f "rb~:[~;+~]"
(and (enum-set-member? (protection write) protections)
(enum-set-member? (mmap-flag shared) flags))))
(port (open-file file mode)))
(call-with-port port
(lambda (port)
(mmap (fileno port) (- (stat:size (stat file)) offset)
#:protections protections #:flags flags #:offset offset)))))
+1 -1
View File
@@ -24,10 +24,10 @@
#:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
#:use-module (guix build utils)
#:use-module (guix build gremlin)
#:use-module (guix elf)
#:use-module (ice-9 match)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
#:use-module (system vm elf)
#:export (%standard-phases
meson-build))
+157 -2
View File
@@ -31,6 +31,7 @@
#:use-module (system foreign)
#:use-module (system base target)
#:use-module (rnrs bytevectors)
#:use-module (rnrs enums)
#:autoload (ice-9 binary-ports) (get-bytevector-n)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
@@ -42,8 +43,20 @@
#:use-module (ice-9 regex)
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
#:use-module (ice-9 threads)
#:export (MS_RDONLY
#:export (has-access-to-libc-shared-library?
protection
protection-set
mmap-flag
mmap-flag-set
mmap
MS_ASYNC
MS_INVALIDATE
MS_SYNC
msync
MS_RDONLY
MS_NOSUID
MS_NODEV
MS_NOEXEC
@@ -246,6 +259,9 @@
;;;
;;; Code:
(define (has-access-to-libc-shared-library?)
(false-if-exception (dynamic-link "libc.so.6")))
;;;
;;; Packed structures.
@@ -1106,6 +1122,145 @@ backend device."
(list file key value (strerror err))
(list err)))))))
;;;
;;; Memory maps.
;;;
;;; Constants from <sys/mman.h>. Enums are used given the actual values vary
;;; between Linux and the Hurd, hence must be lazily resolved at the time of
;;; use (runtime).
(define-enumeration protection
(none ;page can not be accessed
read ;page can be read
write ;page can be written
exec) ;page can be executed
protection-set)
(define-enumeration mmap-flag
(shared ;share changes with other processes
private) ;private copy-on-write mapping
mmap-flag-set)
(define (hurd?)
(string=? "GNU" (utsname:sysname (uname))))
(define (protection-symbol->value s)
;; The values for the Hurd are taken from glibc's bits/mman.h, while those
;; for Linux from include/uapi/asm-generic/mman-common.h.
(let ((hurd? (hurd?)))
(cond
((eq? (protection none) s)
#x0)
((eq? (protection read) s)
(if hurd? #x4 #x1))
((eq? (protection write) s)
#x2)
((eq? (protection exec) s)
(if hurd? #x1 #x4))
(else (error "unexpected protection symbol" s)))))
(define (protection-set->value protections)
"Take PROTECTIONS, a set of protection set, and compute the platform-specific
value for use with `mmap'."
(unless (enum-set-subset? protections (enum-set-universe (protection-set)))
(error "invalid mmap protection value; expected a protection enum set"
protections))
(apply logior (map protection-symbol->value (enum-set->list protections))))
(define (mmap-flag-symbol->value s)
;; The values for the Hurd are taken from glibc's bits/mman.h, while those
;; for Linux from include/uapi/linux/mman.h.
(let ((hurd? (hurd?)))
(cond
((eq? (mmap-flag private) s)
(if hurd? #x0 #x2))
((eq? (mmap-flag shared) s)
(if hurd? #x10 #x1))
(else (error "unexpected mmap-flag symbol" s)))))
(define (mmap-flag-set->value flags)
(unless (enum-set-subset? flags (enum-set-universe (mmap-flag-set)))
(error "invalid mmap flags value; expected a mmap-flag enum set"
flags))
(apply logior (map mmap-flag-symbol->value (enum-set->list flags))))
(define (%map-failed) ;mmap failure sentinel
(if (= 8 (sizeof '*))
#xffffffffffffffff ;64-bit
#xffffffff)) ;32-bit
(define %mmap
(syscall->procedure '* "mmap" (list '* size_t int int int long)))
(define %mmap-guardian
(make-guardian))
(define (pump-mmap-guardian)
(let ((bv (%mmap-guardian)))
(when bv
(munmap bv)
(pump-mmap-guardian))))
(add-hook! after-gc-hook pump-mmap-guardian)
(define* (mmap fd len #:key
(protections (protection-set read))
(flags (if (enum-set-member? (protection write) protections)
(mmap-flag-set shared)
(mmap-flag-set private)))
(offset 0))
"Return a bytevector to a memory-mapped region of length LEN bytes
for the open file descriptor FD. The mapping is created with the given memory
PROTECTIONS and FLAGS, which are PROTECTION and MMAP-FLAGS enum sets,
respectively. These values are internally converted to the correct values and
bitwise OR'd, and determine whether updates are visible to other processes
and/or carried through to the underlying file. Raise a 'system-error'
exception on error. The memory is automatically unmapped with `munmap' when
the bytevector object is no longer referenced."
(let*-values (((protections*) (protection-set->value protections))
((flags*) (mmap-flag-set->value flags))
((ptr err) (%mmap %null-pointer len protections* flags*
fd offset)))
(when (= (%map-failed) (pointer-address ptr))
(throw 'system-error "mmap" "mmap ~S with len ~S: ~A"
(list fd len (strerror err))
(list err)))
(let ((bv (pointer->bytevector ptr len)))
(%mmap-guardian bv)
bv)))
(define %munmap
(syscall->procedure int "munmap" (list '* size_t)))
(define (munmap bv)
"Unmap the memory region described by BV, a bytevector object."
(let*-values (((ptr) (bytevector->pointer bv))
((len) (bytevector-length bv))
((ret err) (%munmap ptr len)))
(unless (zero? ret)
(throw 'system-error "munmap" "munmap ~S with len ~S: ~A"
(list ptr len (strerror err))
(list err)))))
(define MS_ASYNC 1) ;sync memory asynchronously
(define MS_INVALIDATE 2) ;invalidate the caches
(define MS_SYNC 4) ;synchronous memory sync
(define %msync
(syscall->procedure int "msync" (list '* size_t int)))
(define* (msync bv #:key (flags MS_SYNC))
"Flush changes made to the in-core copy of a file that was mapped into memory
using `mmap' back to the file system."
(let*-values (((ptr) (bytevector->pointer bv))
((len) (bytevector-length bv))
((ret err) (%msync ptr len flags)))
(unless (zero? ret)
(throw 'system-error "msync" "msync ~S with len ~S: ~A"
(list ptr len (strerror err))
(list err)))))
;;;
;;; Random.
+2 -2
View File
@@ -1355,7 +1355,7 @@ contents:
#!location/of/bin/bash
export PATH=\"/gnu/.../bar/bin\"
export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/gnu/.../baz/certs:/qux/certs\"
exec -a \"${0##*/}\" location/of/.foo-real \"$@\"
exec -a $0 location/of/.foo-real \"$@\"
This is useful for scripts that expect particular programs to be in $PATH, for
programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
@@ -1432,7 +1432,7 @@ with definitions for VARS. If it is not, SH will be used as interpreter."
(call-with-output-file prog-tmp
(lambda (port)
(format port
"#!~a~%~a~%exec -a \"${0##*/}\" \"~a\" \"$@\"~%"
"#!~a~%~a~%exec -a \"$0\" \"~a\" \"$@\"~%"
sh
(string-join (map export-variable vars/filtered) "\n")
(canonicalize-path wrapped-file))))
-1046
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -118,12 +118,12 @@ are not recursively applied to dependencies of DRV."
(define build
(with-imported-modules '((guix build graft)
(guix build utils)
(guix build debug-link)
(guix elf))
(guix build debug-link))
#~(begin
(use-modules (guix build graft)
(guix build utils)
(ice-9 match))
(ice-9 match)
(system vm elf))
(define %outputs
(ungexp (outputs->gexp outputs)))
+12 -11
View File
@@ -7,7 +7,7 @@
;;; Copyright © 2016, 2017, 2018, 2019, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
;;; Copyright © 2017, 2021, 2024 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2017, 2021, 2024-2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
@@ -1006,11 +1006,9 @@ if not found."
(define* (info-dir-file manifest #:optional system)
"Return a derivation that builds the 'dir' file for all the entries of
MANIFEST."
(define texinfo ;lazy reference
(define texinfo ;lazy reference
(module-ref (resolve-interface '(gnu packages texinfo)) 'texinfo))
(define gzip ;lazy reference
(module-ref (resolve-interface '(gnu packages compression)) 'gzip))
(define libc-utf8-locales-for-target ;lazy reference
(define libc-utf8-locales-for-target ;lazy reference
(module-ref (resolve-interface '(gnu packages base))
'libc-utf8-locales-for-target))
@@ -1022,8 +1020,9 @@ MANIFEST."
(ice-9 ftw))
(define (info-file? file)
(or (string-suffix? ".info" file)
(string-suffix? ".info.gz" file)))
(or (string-suffix? ".info.zst" file)
(string-suffix? ".info.gz" file)
(string-suffix? ".info" file)))
(define (info-files top)
(let ((infodir (string-append top "/share/info")))
@@ -1031,9 +1030,12 @@ MANIFEST."
(or (scandir infodir info-file?) '()))))
(define (info-file-language file)
(let* ((base (if (string-suffix? ".gz" file)
(basename file ".info.gz")
(basename file ".info")))
(let* ((base (cond ((string-suffix? ".zst" file)
(basename file ".info.zst"))
((string-suffix? ".gz" file)
(basename file ".info.gz"))
(else
(basename file ".info"))))
(dot (string-rindex base #\.)))
(if dot
(string-drop base (+ 1 dot))
@@ -1052,7 +1054,6 @@ MANIFEST."
'("")
`("." ,language)))))))
(setenv "PATH" (string-append #+gzip "/bin")) ;for info.gz files
(setenv "GUIX_LOCPATH"
#+(file-append (libc-utf8-locales-for-target system)
"/lib/locale"))
+10 -10
View File
@@ -5,7 +5,7 @@
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2022 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2023 Graham James Addis <graham@addis.org.uk>
@@ -1221,21 +1221,22 @@ libfakechroot.so and related ld.so machinery as a fallback."
(define build
(with-imported-modules (source-module-closure
'((guix build utils)
'((guix build io)
(guix build utils)
(guix build union)
(guix build gremlin)
(guix elf)))
(guix build gremlin)))
#~(begin
(use-modules (guix build utils)
(use-modules (guix build io)
(guix build utils)
((guix build union) #:select (symlink-relative))
(guix elf)
(guix build gremlin)
(ice-9 binary-ports)
(ice-9 ftw)
(ice-9 match)
(ice-9 receive)
(srfi srfi-1)
(rnrs bytevectors))
(rnrs bytevectors)
(system vm elf))
(define input
;; The OUTPUT* output of PACKAGE.
@@ -1260,7 +1261,7 @@ libfakechroot.so and related ld.so machinery as a fallback."
(match (find (lambda (segment)
(= (elf-segment-type segment) PT_INTERP))
(elf-segments elf))
(#f #f) ;maybe a .so
(#f #f) ;maybe a .so
(segment
(let ((bv (make-bytevector (- (elf-segment-memsz segment) 1))))
(bytevector-copy! (elf-bytes elf)
@@ -1280,8 +1281,7 @@ libfakechroot.so and related ld.so machinery as a fallback."
#$(if fakechroot?
;; TODO: Handle scripts by wrapping their interpreter.
#~(if (elf-file? program)
(let* ((bv (call-with-input-file program
get-bytevector-all))
(let* ((bv (file->bytevector program))
(elf (parse-elf bv))
(interp (elf-interpreter elf))
(gconv (and interp
+98 -91
View File
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,18 +18,21 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (test-debug-link)
#:use-module (guix elf)
#:use-module (guix build utils)
#:use-module (guix build debug-link)
#:use-module (guix build io)
#:use-module (guix gexp)
#:use-module (guix modules)
#:use-module (guix store)
#:use-module (guix tests)
#:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (gnu packages bootstrap)
#:use-module ((gnu packages guile) #:select (guile-3.0))
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-64)
#:use-module (system vm elf)
#:use-module (rnrs io ports)
#:use-module (ice-9 match))
@@ -40,15 +44,12 @@
(_
#f)))
(define read-elf
(compose parse-elf get-bytevector-all))
(test-begin "debug-link")
(unless %guile-executable (test-skip 1))
(test-assert "elf-debuglink"
(let ((elf (call-with-input-file %guile-executable read-elf)))
(test-assert "elf-debuglink, no .gnu_debuglink section"
(let ((elf (parse-elf (file->bytevector %guile-executable))))
(match (call-with-values (lambda () (elf-debuglink elf)) list)
((#f #f) ;no '.gnu_debuglink' section
(pk 'no-debuglink #t))
@@ -56,95 +57,101 @@
(string-suffix? ".debug" file)))))
;; Since we need %BOOTSTRAP-GCC and co., we have to skip the following tests
;; when networking is unreachable because we'd fail to download it.
(unless (network-reachable?) (test-skip 1))
(test-assertm "elf-debuglink"
;; Check whether we can compute the CRC just like objcopy, and whether we
;; can retrieve it.
(let* ((code (plain-file "test.c" "int main () { return 42; }"))
(exp (with-imported-modules '((guix build utils)
(guix build debug-link)
(guix elf))
#~(begin
(use-modules (guix build utils)
(guix build debug-link)
(guix elf)
(rnrs io ports))
;; when networking is unreachable because we'd fail to download it. Since
;; using mmap to load ELF more efficiently, we also need the regular Guile
;; package, as guile-bootstrap cannot resolve dynamic symbols.
(with-external-store store
(unless (and (network-reachable?) store) (test-skip 1))
(test-expect-fail 1) ;FIXME: guile-bootstrap cannot use mmap
(test-assertm "elf-debuglink"
;; Check whether we can compute the CRC just like objcopy, and whether we
;; can retrieve it.
(let* ((code (plain-file "test.c" "int main () { return 42; }"))
(exp (with-imported-modules (source-module-closure
'((guix build io)
(guix build utils)
(guix build debug-link)))
#~(begin
(use-modules (guix build io)
(guix build utils)
(guix build debug-link)
(system vm elf)
(rnrs io ports))
(define read-elf
(compose parse-elf get-bytevector-all))
(define read-elf
(compose parse-elf file->bytevector))
(setenv "PATH" (string-join '(#$%bootstrap-gcc
#$%bootstrap-binutils)
"/bin:" 'suffix))
(invoke "gcc" "-O0" "-g" #$code "-o" "exe")
(copy-file "exe" "exe.debug")
(invoke "strip" "--only-keep-debug" "exe.debug")
(invoke "strip" "--strip-debug" "exe")
(invoke "objcopy" "--add-gnu-debuglink=exe.debug"
"exe")
(call-with-values (lambda ()
(elf-debuglink
(call-with-input-file "exe"
read-elf)))
(lambda (file crc)
(call-with-output-file #$output
(lambda (port)
(let ((expected (call-with-input-file "exe.debug"
debuglink-crc32)))
(write (list file (= crc expected))
port))))))))))
(mlet* %store-monad ((drv (gexp->derivation "debuglink" exp))
(x (built-derivations (list drv))))
(call-with-input-file (derivation->output-path drv)
(lambda (port)
(return (match (read port)
(("exe.debug" #t) #t)
(x (pk 'fail x #f)))))))))
(setenv "PATH" (string-join '(#$%bootstrap-gcc
#$%bootstrap-binutils)
"/bin:" 'suffix))
(invoke "gcc" "-O0" "-g" #$code "-o" "exe")
(copy-file "exe" "exe.debug")
(invoke "strip" "--only-keep-debug" "exe.debug")
(invoke "strip" "--strip-debug" "exe")
(invoke "objcopy" "--add-gnu-debuglink=exe.debug"
"exe")
(call-with-values (lambda ()
(elf-debuglink (read-elf "exe")))
(lambda (file crc)
(call-with-output-file #$output
(lambda (port)
(let ((expected (call-with-input-file "exe.debug"
debuglink-crc32)))
(write (list file (= crc expected))
port))))))))))
(mlet* %store-monad ((drv (gexp->derivation "debuglink" exp))
(x (built-derivations (list drv))))
(call-with-input-file (derivation->output-path drv)
(lambda (port)
(return (match (read port)
(("exe.debug" #t) #t)
(x (pk 'fail x #f)))))))))
(unless (network-reachable?) (test-skip 1))
(test-assertm "set-debuglink-crc"
;; Check whether 'set-debuglink-crc' successfully updates the CRC.
(let* ((code (plain-file "test.c" "int main () { return 42; }"))
(debug (plain-file "exe.debug" "a"))
(exp (with-imported-modules '((guix build utils)
(guix build debug-link)
(guix elf))
#~(begin
(use-modules (guix build utils)
(guix build debug-link)
(guix elf)
(rnrs io ports))
(unless (and (network-reachable?) store) (test-skip 1))
(test-expect-fail 1) ;FIXME: guile-bootstrap cannot use mmap
(test-assertm "set-debuglink-crc"
;; Check whether 'set-debuglink-crc' successfully updates the CRC.
(let* ((code (plain-file "test.c" "int main () { return 42; }"))
(debug (plain-file "exe.debug" "a"))
(exp (with-imported-modules (source-module-closure
'((guix build io)
(guix build utils)
(guix build debug-link)))
#~(begin
(use-modules (guix build io)
(guix build utils)
(guix build debug-link)
(system vm elf)
(rnrs io ports))
(define read-elf
(compose parse-elf get-bytevector-all))
(define read-elf
(compose parse-elf file->bytevector))
(setenv "PATH" (string-join '(#$%bootstrap-gcc
#$%bootstrap-binutils)
"/bin:" 'suffix))
(invoke "gcc" "-O0" "-g" #$code "-o" "exe")
(copy-file "exe" "exe.debug")
(invoke "strip" "--only-keep-debug" "exe.debug")
(invoke "strip" "--strip-debug" "exe")
(invoke "objcopy" "--add-gnu-debuglink=exe.debug"
"exe")
(set-debuglink-crc "exe" #$debug)
(call-with-values (lambda ()
(elf-debuglink
(call-with-input-file "exe"
read-elf)))
(lambda (file crc)
(call-with-output-file #$output
(lambda (port)
(write (list file crc) port)))))))))
(mlet* %store-monad ((drv (gexp->derivation "debuglink" exp))
(x (built-derivations (list drv))))
(call-with-input-file (derivation->output-path drv)
(lambda (port)
(return (match (read port)
(("exe.debug" crc)
(= crc (debuglink-crc32 (open-input-string "a"))))
(x
(pk 'fail x #f)))))))))
(setenv "PATH" (string-join '(#$%bootstrap-gcc
#$%bootstrap-binutils)
"/bin:" 'suffix))
(invoke "gcc" "-O0" "-g" #$code "-o" "exe")
(copy-file "exe" "exe.debug")
(invoke "strip" "--only-keep-debug" "exe.debug")
(invoke "strip" "--strip-debug" "exe")
(invoke "objcopy" "--add-gnu-debuglink=exe.debug"
"exe")
(set-debuglink-crc "exe" #$debug)
(call-with-values (lambda ()
(elf-debuglink
(read-elf "exe")))
(lambda (file crc)
(call-with-output-file #$output
(lambda (port)
(write (list file crc) port)))))))))
(mlet* %store-monad ((drv (gexp->derivation "debuglink" exp))
(x (built-derivations (list drv))))
(call-with-input-file (derivation->output-path drv)
(lambda (port)
(return (match (read port)
(("exe.debug" crc)
(= crc (debuglink-crc32 (open-input-string "a"))))
(x
(pk 'fail x #f))))))))))
(test-end "debug-link")
+10 -28
View File
@@ -19,10 +19,10 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (test-gremlin)
#:use-module (guix elf)
#:use-module (guix tests)
#:use-module ((guix utils) #:select (call-with-temporary-directory
target-aarch64?))
#:use-module (guix build io)
#:use-module (guix build utils)
#:use-module (guix build gremlin)
#:use-module (gnu packages bootstrap)
@@ -30,6 +30,7 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-64)
#:use-module (system vm elf)
#:use-module (rnrs io ports)
#:use-module (ice-9 popen)
#:use-module (ice-9 rdelim)
@@ -44,9 +45,6 @@
(_
#f)))
(define read-elf
(compose parse-elf get-bytevector-all))
(define c-compiler
(or (which "gcc") (which "cc") (which "g++")))
@@ -55,8 +53,7 @@
(unless %guile-executable (test-skip 1))
(test-assert "elf-dynamic-info-needed, executable"
(let* ((elf (call-with-input-file %guile-executable read-elf))
(dyninfo (elf-dynamic-info elf)))
(let ((dyninfo (file-dynamic-info %guile-executable)))
(or (not dyninfo) ;static executable
(lset<= string=?
(list (string-append "libguile-" (effective-version))
@@ -129,8 +126,7 @@
(unless c-compiler
(test-skip 1))
(test-equal "strip-runpath"
"hello\n"
(test-assert "strip-runpath"
(call-with-temporary-directory
(lambda (directory)
(with-directory-excursion directory
@@ -140,9 +136,7 @@
(display "int main () { puts(\"hello\"); }" port)))
(invoke c-compiler "t.c"
"-Wl,--enable-new-dtags" "-Wl,-rpath=/foo" "-Wl,-rpath=/bar")
(let* ((dyninfo (elf-dynamic-info
(parse-elf (call-with-input-file "a.out"
get-bytevector-all))))
(let* ((dyninfo (file-dynamic-info "a.out"))
(old (elf-dynamic-info-runpath dyninfo))
(new (strip-runpath "a.out"))
(new* (strip-runpath "a.out")))
@@ -150,16 +144,11 @@
(and (member "/foo" old) (member "/bar" old)
(not (member "/foo" new))
(not (member "/bar" new))
(equal? new* new)
(let* ((pipe (open-input-pipe "./a.out"))
(str (get-string-all pipe)))
(close-pipe pipe)
str)))))))
(equal? new* new)))))))
(unless c-compiler
(test-skip 1))
(test-equal "set-file-runpath + file-runpath"
"hello\n"
(test-assert "set-file-runpath + file-runpath"
(call-with-temporary-directory
(lambda (directory)
(with-directory-excursion directory
@@ -178,11 +167,7 @@
(set-file-runpath "a.out" (list (make-string 777 #\y))))
(let ((runpath (delete "/xxxxxxxxx" original-runpath)))
(set-file-runpath "a.out" runpath)
(equal? runpath (file-runpath "a.out")))
(let* ((pipe (open-input-pipe "./a.out"))
(str (get-string-all pipe)))
(close-pipe pipe)
str)))))))
(equal? runpath (file-runpath "a.out")))))))))
(unless c-compiler
(test-skip 1))
@@ -196,10 +181,7 @@
(display "// empty file" port)))
(invoke c-compiler "t.c"
"-shared" "-Wl,-soname,libfoo.so.2")
(let* ((dyninfo (elf-dynamic-info
(parse-elf (call-with-input-file "a.out"
get-bytevector-all))))
(soname (elf-dynamic-info-soname dyninfo)))
soname)))))
(let ((dyninfo (file-dynamic-info "a.out")))
(elf-dynamic-info-soname dyninfo))))))
(test-end "gremlin")
+35 -1
View File
@@ -22,8 +22,11 @@
(define-module (test-syscalls)
#:use-module (guix utils)
#:use-module (guix build io)
#:use-module (guix build syscalls)
#:use-module (guix build utils)
#:use-module (gnu build linux-container)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-64)
@@ -31,7 +34,7 @@
#:use-module (system foreign)
#:use-module ((ice-9 ftw) #:select (scandir))
#:use-module (ice-9 match)
#:use-module (ice-9 threads))
#:use-module (ice-9 textual-ports))
;; Test the (guix build syscalls) module, although there's not much that can
;; actually be tested without being root.
@@ -735,6 +738,37 @@
(member (system-error-errno args)
(list EPERM ENOSYS)))))
(test-assert "mmap"
(begin
(call-with-output-file temp-file
(lambda (p)
(display "abcdefghij")))
(mmap (open-fdes temp-file O_RDONLY) 5)))
(test-equal "file->bytevector, reading"
#\6
(begin
(call-with-output-file temp-file
(lambda (p)
(display "0123456789\n" p)))
(sync)
(integer->char
(bytevector-u8-ref (file->bytevector temp-file) 6))))
(test-equal "file->bytevector, writing"
"0000000700"
(begin
(call-with-output-file temp-file
(lambda (p)
(display "0000000000" p)))
(sync)
(let ((bv (file->bytevector temp-file
#:protections (protection-set write))))
(bytevector-u8-set! bv 7 (char->integer #\7))
(msync bv)) ;ensure the file gets written
(call-with-input-file temp-file get-string-all)))
(test-end)
(false-if-exception (delete-file temp-file))