diff --git a/steps-guix/guile-2.2.4/pass1.sh b/steps-guix/guile-2.0.9/pass1.sh similarity index 92% rename from steps-guix/guile-2.2.4/pass1.sh rename to steps-guix/guile-2.0.9/pass1.sh index 94cda9e1..7fad35e0 100644 --- a/steps-guix/guile-2.2.4/pass1.sh +++ b/steps-guix/guile-2.0.9/pass1.sh @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later -SEED_PREFIX="/bootstrap-seeds/guile-2.2.4" +SEED_PREFIX="/bootstrap-seeds/guile-2.0.9" src_prepare() { default @@ -24,6 +24,7 @@ src_configure() { PKG_CONFIG_LIBDIR="${pkg_config_path}" \ PKG_CONFIG_PATH="${pkg_config_path}" \ + CFLAGS="${CFLAGS:-} -std=gnu89" \ LIBFFI_CFLAGS="${libffi_cflags}" \ LIBFFI_LIBS="${libffi_libs}" \ LDFLAGS="-ldl" \ @@ -42,5 +43,5 @@ src_install() { stage="${DESTDIR}${SEED_PREFIX}" make DESTDIR="${DESTDIR}" install - seed_make_repro_tar_xz "${stage}" "${DISTFILES}/guile-static-stripped-2.2.4-i686-linux.tar.xz" + seed_make_repro_tar_xz "${stage}" "${DISTFILES}/guile-static-stripped-2.0.9-i686-linux.tar.xz" } diff --git a/steps-guix/guile-2.2.4/patches/define-missing-posix-constants.patch b/steps-guix/guile-2.0.9/patches/define-missing-posix-constants.patch similarity index 91% rename from steps-guix/guile-2.2.4/patches/define-missing-posix-constants.patch rename to steps-guix/guile-2.0.9/patches/define-missing-posix-constants.patch index 96db7c44..9a606912 100644 --- a/steps-guix/guile-2.2.4/patches/define-missing-posix-constants.patch +++ b/steps-guix/guile-2.0.9/patches/define-missing-posix-constants.patch @@ -1,6 +1,6 @@ ---- guile-2.2.4/libguile/posix.c -+++ guile-2.2.4/libguile/posix.c -@@ -2356,6 +2356,8 @@ +--- guile-2.0.9/libguile/posix.c ++++ guile-2.0.9/libguile/posix.c +@@ -2254,6 +2254,8 @@ #endif #ifdef WAIT_ANY scm_c_define ("WAIT_ANY", scm_from_int (WAIT_ANY)); @@ -9,7 +9,7 @@ #endif #ifdef WAIT_MYPGRP scm_c_define ("WAIT_MYPGRP", scm_from_int (WAIT_MYPGRP)); -@@ -2390,21 +2392,33 @@ +@@ -2288,21 +2290,33 @@ #endif #ifdef LC_PAPER scm_c_define ("LC_PAPER", scm_from_int (LC_PAPER)); diff --git a/steps-guix/guile-2.2.4/patches/fix-sendfile-offset-pointer-type.patch b/steps-guix/guile-2.0.9/patches/fix-sendfile-offset-pointer-type.patch similarity index 53% rename from steps-guix/guile-2.2.4/patches/fix-sendfile-offset-pointer-type.patch rename to steps-guix/guile-2.0.9/patches/fix-sendfile-offset-pointer-type.patch index be1d7d76..402d2ab9 100644 --- a/steps-guix/guile-2.2.4/patches/fix-sendfile-offset-pointer-type.patch +++ b/steps-guix/guile-2.0.9/patches/fix-sendfile-offset-pointer-type.patch @@ -1,7 +1,7 @@ -diff -ru guile-2.2.4/libguile/filesys.c guile-2.2.4/libguile/filesys.c ---- guile-2.2.4/libguile/filesys.c -+++ guile-2.2.4/libguile/filesys.c -@@ -1135,7 +1135,7 @@ +diff -ru guile-2.0.9/libguile/filesys.c guile-2.0.9/libguile/filesys.c +--- guile-2.0.9/libguile/filesys.c ++++ guile-2.0.9/libguile/filesys.c +@@ -1130,7 +1130,7 @@ ssize_t result SCM_UNUSED; size_t c_count, total = 0; diff --git a/steps-guix/guile-2.0.9/patches/guile-default-utf8.patch b/steps-guix/guile-2.0.9/patches/guile-default-utf8.patch new file mode 100644 index 00000000..16d918dc --- /dev/null +++ b/steps-guix/guile-2.0.9/patches/guile-default-utf8.patch @@ -0,0 +1,122 @@ +This hack makes Guile default to UTF-8. This avoids calls to +`iconv_open'; `iconv_open' tries to open shared objects that aren't +available during bootstrap, so using UTF-8 avoids that (and UTF-8 has +built-in conversions in glibc, too.) + +diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c +index cf41f2f..facfb91 100644 +--- guile-2.0.9/libguile/bytevectors.c ++++ guile-2.0.9/libguile/bytevectors.c +@@ -1887,7 +1887,7 @@ utf_encoding_name (char *name, size_t utf_width, SCM endianness) + if (scm_i_is_narrow_string (str)) \ + { \ + err = mem_iconveh (scm_i_string_chars (str), c_strlen, \ +- "ISO-8859-1", c_utf_name, \ ++ "UTF-8", c_utf_name, \ + iconveh_question_mark, NULL, \ + &c_utf, &c_utf_len); \ + if (SCM_UNLIKELY (err)) \ +diff --git a/libguile/ports.c b/libguile/ports.c +index 301bc44..b0ea2e6 100644 +--- guile-2.0.9/libguile/ports.c ++++ guile-2.0.9/libguile/ports.c +@@ -1750,7 +1750,7 @@ scm_ungetc (scm_t_wchar c, SCM port) + if (pt->encoding != NULL) + encoding = pt->encoding; + else +- encoding = "ISO-8859-1"; ++ encoding = "UTF-8"; + + len = sizeof (result_buf); + result = u32_conv_to_encoding (encoding, +@@ -2212,7 +2212,7 @@ scm_i_set_port_encoding_x (SCM port, const char *encoding) + pt = SCM_PTAB_ENTRY (port); + + if (encoding == NULL) +- encoding = "ISO-8859-1"; ++ encoding = "UTF-8"; + + if (pt->encoding != encoding) + pt->encoding = scm_gc_strdup (encoding, "port"); +diff --git a/libguile/posix.c b/libguile/posix.c +index 4f8b8ac..fea7f74 100644 +--- guile-2.0.9/libguile/posix.c ++++ guile-2.0.9/libguile/posix.c +@@ -1740,7 +1740,7 @@ SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0, + SCM_SYSERROR; + } + +- enc = locale_charset (); ++ enc = "UTF-8"; + + /* Set the default encoding for new ports. */ + scm_i_set_default_port_encoding (enc); +diff --git a/libguile/script.c b/libguile/script.c +index 83daf8a..083891e 100644 +--- guile-2.0.9/libguile/script.c ++++ guile-2.0.9/libguile/script.c +@@ -387,7 +387,7 @@ locale_arguments_to_string_list (int argc, char **const argv) + SCM lst; + const char *encoding; + +- encoding = environ_locale_charset (); ++ encoding = "UTF-8"; + for (i = argc - 1, lst = SCM_EOL; + i >= 0; + i--) +diff --git a/libguile/strings.c b/libguile/strings.c +index 5d0db23..8266247 100644 +--- guile-2.0.9/libguile/strings.c ++++ guile-2.0.9/libguile/strings.c +@@ -1576,7 +1576,7 @@ scm_from_locale_string (const char *str) + SCM + scm_from_locale_stringn (const char *str, size_t len) + { +- return scm_from_stringn (str, len, locale_charset (), ++ return scm_from_stringn (str, len, "UTF-8", + scm_i_default_port_conversion_handler ()); + } + +@@ -1803,7 +1803,7 @@ char * + scm_to_locale_stringn (SCM str, size_t *lenp) + { + return scm_to_stringn (str, lenp, +- locale_charset (), ++ "UTF-8", + scm_i_default_port_conversion_handler ()); + } + +@@ -2054,7 +2054,7 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, + "string contains #\\nul character: ~S", + scm_list_1 (str)); + +- if (scm_i_is_narrow_string (str) && (encoding == NULL)) ++ if (scm_i_is_narrow_string (str)) + { + /* If using native Latin-1 encoding, just copy the string + contents. */ +@@ -2079,11 +2079,11 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, + len = 0; + enc = encoding; + if (enc == NULL) +- enc = "ISO-8859-1"; ++ enc = "UTF-8"; + if (scm_i_is_narrow_string (str)) + { + ret = mem_iconveh (scm_i_string_chars (str), ilen, +- "ISO-8859-1", enc, ++ "UTF-8", enc, + (enum iconv_ilseq_handler) handler, NULL, + &buf, &len); + +--- guile-2.0.9/libguile/ports.c 2013-08-21 11:08:50.000000000 +0200 ++++ guile-2.0.9/libguile/ports.c 2013-08-21 11:09:47.000000000 +0200 +@@ -2512,7 +2512,7 @@ scm_i_port_iconv_descriptors (SCM port, + const char *precise_encoding; + + if (!pt->encoding) +- pt->encoding = "ISO-8859-1"; ++ pt->encoding = "UTF-8"; + + /* If the specified encoding is UTF-16 or UTF-32, then make + that more precise by deciding what byte order to use. */ diff --git a/steps-guix/guile-2.0.9/patches/guile-linux-syscalls.patch b/steps-guix/guile-2.0.9/patches/guile-linux-syscalls.patch new file mode 100644 index 00000000..a17ebdf3 --- /dev/null +++ b/steps-guix/guile-2.0.9/patches/guile-linux-syscalls.patch @@ -0,0 +1,377 @@ +This patch adds bindings to Linux syscalls for which glibc has symbols. + +Using the FFI would have been nice, but that's not an option when using +a statically-linked Guile in an initrd that doesn't have libc.so around. + +diff --git a/libguile/posix.c b/libguile/posix.c +index b0fcad5fd..1343186e3 100644 +--- guile-2.0.9/libguile/posix.c ++++ guile-2.0.9/libguile/posix.c +@@ -2341,6 +2341,367 @@ scm_init_popen (void) + } + #endif /* HAVE_START_CHILD */ + ++ ++/* Linux! */ ++#ifdef __linux__ ++ ++#include ++#include ++ ++#include "libguile/foreign.h" ++#include "libguile/bytevectors.h" ++ ++SCM_DEFINE (scm_mount, "mount", 3, 2, 0, ++ (SCM source, SCM target, SCM type, SCM flags, SCM data), ++ "Mount file system of @var{type} specified by @var{source} " ++ "on @var{target}.") ++#define FUNC_NAME s_scm_mount ++{ ++ int err; ++ char *c_source, *c_target, *c_type, *c_data; ++ unsigned long c_flags; ++ ++ c_source = scm_to_locale_string (source); ++ c_target = scm_to_locale_string (target); ++ c_type = scm_to_locale_string (type); ++ c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_ulong (flags); ++ ++ if (SCM_UNBNDP (data) || scm_is_false (data)) ++ c_data = NULL; ++ else ++ c_data = scm_to_locale_string (data); ++ ++ err = mount (c_source, c_target, c_type, c_flags, c_data); ++ if (err != 0) ++ err = errno; ++ ++ free (c_source); ++ free (c_target); ++ free (c_type); ++ ++ if (c_data != NULL) ++ free (c_data); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_umount, "umount", 1, 0, 0, ++ (SCM target), ++ "Unmount the file system on @var{target}.") ++#define FUNC_NAME s_scm_umount ++{ ++ int err; ++ char *c_target; ++ ++ c_target = scm_to_locale_string (target); ++ ++ err = umount (c_target); ++ if (err != 0) ++ err = errno; ++ ++ free (c_target); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++/* Linux's module installation syscall. See `kernel/module.c' in Linux; ++ the function itself is part of the GNU libc. ++ ++ Load the LEN bytes at MODULE as a kernel module, with arguments from ++ ARGS, a space-separated list of options. */ ++extern long init_module (void *module, unsigned long len, const char *args); ++ ++/* Load a kernel module from FD. FLAGS must be a bitwise or of ++ MODULE_INIT_* constants. The GNU libc doesn't provide a wrapper for ++ this one so we use 'syscall'. */ ++static int ++finit_module (int fd, const char *args, int flags) ++{ ++ return syscall (SYS_finit_module, fd, args, flags); ++} ++ ++ ++SCM_DEFINE (scm_load_linux_module, "load-linux-module", 1, 1, 0, ++ (SCM data, SCM options), ++ "Load the Linux kernel module whose contents are in bytevector " ++ "DATA (the contents of a @code{.ko} file), with the arguments " ++ "from the OPTIONS string.") ++#define FUNC_NAME s_scm_load_linux_module ++{ ++ long err; ++ void *c_data; ++ unsigned long c_len; ++ char *c_options; ++ ++ SCM_VALIDATE_BYTEVECTOR (SCM_ARG1, data); ++ ++ c_data = SCM_BYTEVECTOR_CONTENTS (data); ++ c_len = SCM_BYTEVECTOR_LENGTH (data); ++ c_options = ++ scm_to_locale_string (SCM_UNBNDP (options) ? scm_nullstr : options); ++ ++ err = init_module (c_data, c_len, c_options); ++ ++ free (c_options); ++ ++ if (err != 0) ++ SCM_SYSERROR; ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_load_linux_module_fd, "load-linux-module/fd", 1, 2, 0, ++ (SCM fd, SCM options, SCM flags), ++ "Load the Linux kernel module from the file at FD, " ++ "with the arguments from the OPTIONS string, and " ++ "optionally the given FLAGS.") ++#define FUNC_NAME s_scm_load_linux_module_fd ++{ ++ long err; ++ int c_fd, c_flags; ++ char *c_options; ++ ++ c_fd = scm_to_int (fd); ++ c_options = ++ scm_to_locale_string (SCM_UNBNDP (options) ? scm_nullstr : options); ++ c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_int (flags); ++ ++ err = finit_module (c_fd, c_options, c_flags); ++ ++ free (c_options); ++ ++ if (err != 0) ++ SCM_SYSERROR; ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++ ++/* Rebooting, halting, and all that. */ ++ ++#include ++ ++SCM_VARIABLE_INIT (flag_RB_AUTOBOOT, "RB_AUTOBOOT", ++ scm_from_int (RB_AUTOBOOT)); ++SCM_VARIABLE_INIT (flag_RB_HALT_SYSTEM, "RB_HALT_SYSTEM", ++ scm_from_int (RB_HALT_SYSTEM)); ++SCM_VARIABLE_INIT (flag_RB_ENABLE_CAD, "RB_ENABLE_CAD", ++ scm_from_int (RB_ENABLE_CAD)); ++SCM_VARIABLE_INIT (flag_RB_DISABLE_CAD, "RB_DISABLE_CAD", ++ scm_from_int (RB_DISABLE_CAD)); ++SCM_VARIABLE_INIT (flag_RB_POWER_OFF, "RB_POWER_OFF", ++ scm_from_int (RB_POWER_OFF)); ++SCM_VARIABLE_INIT (flag_RB_SW_SUSPEND, "RB_SW_SUSPEND", ++ scm_from_int (RB_SW_SUSPEND)); ++SCM_VARIABLE_INIT (flag_RB_KEXEC, "RB_KEXEC", ++ scm_from_int (RB_KEXEC)); ++ ++SCM_DEFINE (scm_reboot, "reboot", 0, 1, 0, ++ (SCM command), ++ "Reboot the system. @var{command} must be one of the @code{RB_} " ++ "constants; if omitted, @var{RB_AUTOBOOT} is used, thus " ++ "performing a hard reset.") ++#define FUNC_NAME s_scm_reboot ++{ ++ int c_command; ++ ++ if (SCM_UNBNDP (command)) ++ c_command = RB_AUTOBOOT; ++ else ++ c_command = scm_to_int (command); ++ ++ reboot (c_command); ++ ++ return SCM_UNSPECIFIED; /* likely unreached */ ++} ++#undef FUNC_NAME ++ ++/* Linux network interfaces. See . */ ++ ++#include ++#include ++#include "libguile/socket.h" ++ ++SCM_VARIABLE_INIT (flag_IFF_UP, "IFF_UP", ++ scm_from_int (IFF_UP)); ++SCM_VARIABLE_INIT (flag_IFF_BROADCAST, "IFF_BROADCAST", ++ scm_from_int (IFF_BROADCAST)); ++SCM_VARIABLE_INIT (flag_IFF_DEBUG, "IFF_DEBUG", ++ scm_from_int (IFF_DEBUG)); ++SCM_VARIABLE_INIT (flag_IFF_LOOPBACK, "IFF_LOOPBACK", ++ scm_from_int (IFF_LOOPBACK)); ++SCM_VARIABLE_INIT (flag_IFF_POINTOPOINT, "IFF_POINTOPOINT", ++ scm_from_int (IFF_POINTOPOINT)); ++SCM_VARIABLE_INIT (flag_IFF_NOTRAILERS, "IFF_NOTRAILERS", ++ scm_from_int (IFF_NOTRAILERS)); ++SCM_VARIABLE_INIT (flag_IFF_RUNNING, "IFF_RUNNING", ++ scm_from_int (IFF_RUNNING)); ++SCM_VARIABLE_INIT (flag_IFF_NOARP, "IFF_NOARP", ++ scm_from_int (IFF_NOARP)); ++SCM_VARIABLE_INIT (flag_IFF_PROMISC, "IFF_PROMISC", ++ scm_from_int (IFF_PROMISC)); ++SCM_VARIABLE_INIT (flag_IFF_ALLMULTI, "IFF_ALLMULTI", ++ scm_from_int (IFF_ALLMULTI)); ++ ++SCM_DEFINE (scm_set_network_interface_address, "set-network-interface-address", ++ 3, 0, 0, ++ (SCM socket, SCM name, SCM address), ++ "Configure network interface @var{name}.") ++#define FUNC_NAME s_scm_set_network_interface_address ++{ ++ char *c_name; ++ struct ifreq ifr; ++ struct sockaddr *c_address; ++ size_t sa_len; ++ int fd, err; ++ ++ socket = SCM_COERCE_OUTPORT (socket); ++ SCM_VALIDATE_OPFPORT (1, socket); ++ fd = SCM_FPORT_FDES (socket); ++ ++ memset (&ifr, 0, sizeof ifr); ++ c_name = scm_to_locale_string (name); ++ c_address = scm_to_sockaddr (address, &sa_len); ++ ++ strncpy (ifr.ifr_name, c_name, sizeof ifr.ifr_name - 1); ++ memcpy (&ifr.ifr_addr, c_address, sa_len); ++ ++ err = ioctl (fd, SIOCSIFADDR, &ifr); ++ if (err != 0) ++ err = errno; ++ ++ free (c_name); ++ free (c_address); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_set_network_interface_flags, "set-network-interface-flags", ++ 3, 0, 0, ++ (SCM socket, SCM name, SCM flags), ++ "Change the flags of network interface @var{name} to " ++ "@var{flags}.") ++#define FUNC_NAME s_scm_set_network_interface_flags ++{ ++ struct ifreq ifr; ++ char *c_name; ++ int fd, err; ++ ++ socket = SCM_COERCE_OUTPORT (socket); ++ SCM_VALIDATE_OPFPORT (1, socket); ++ fd = SCM_FPORT_FDES (socket); ++ ++ memset (&ifr, 0, sizeof ifr); ++ c_name = scm_to_locale_string (name); ++ strncpy (ifr.ifr_name, c_name, sizeof ifr.ifr_name - 1); ++ ifr.ifr_flags = scm_to_short (flags); ++ ++ err = ioctl (fd, SIOCSIFFLAGS, &ifr); ++ if (err != 0) ++ err = errno; ++ ++ free (c_name); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_network_interface_flags, "network-interface-flags", ++ 2, 0, 0, ++ (SCM socket, SCM name), ++ "Return the flags of network interface @var{name}.") ++#define FUNC_NAME s_scm_network_interface_flags ++{ ++ struct ifreq ifr; ++ char *c_name; ++ int fd, err; ++ ++ socket = SCM_COERCE_OUTPORT (socket); ++ SCM_VALIDATE_OPFPORT (1, socket); ++ fd = SCM_FPORT_FDES (socket); ++ ++ memset (&ifr, 0, sizeof ifr); ++ c_name = scm_to_locale_string (name); ++ strncpy (ifr.ifr_name, c_name, sizeof ifr.ifr_name - 1); ++ ++ err = ioctl (fd, SIOCGIFFLAGS, &ifr); ++ if (err != 0) ++ err = errno; ++ ++ free (c_name); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return scm_from_short (ifr.ifr_flags); ++} ++#undef FUNC_NAME ++#endif ++ ++#include ++ ++SCM_DEFINE (scm_statfs_raw, "statfs-raw", 1, 0, 0, ++ (SCM filesystem), ++ "Return a bytevector describing @var{filesystem}") ++#define FUNC_NAME s_scm_statfs_raw ++{ ++ int err; ++ char *c_filesystem; ++ SCM bv; ++ ++ c_filesystem = scm_to_locale_string (filesystem); ++ ++ bv = scm_c_make_bytevector (sizeof (struct statfs)); ++ struct statfs *bv_pointer = scm_to_pointer (scm_bytevector_to_pointer (bv, scm_from_int (0))); ++ ++ err = statfs (c_filesystem, bv_pointer); ++ if (err != 0) ++ err = errno; ++ ++ free (c_filesystem); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return bv; ++} ++#undef FUNC_NAME ++ + void + scm_init_posix () + { diff --git a/steps-guix/guile-2.0.9/patches/guile-relocatable.patch b/steps-guix/guile-2.0.9/patches/guile-relocatable.patch new file mode 100644 index 00000000..630bbfe6 --- /dev/null +++ b/steps-guix/guile-2.0.9/patches/guile-relocatable.patch @@ -0,0 +1,67 @@ +--- guile-2.0.9/libguile/load.c ++++ guile-2.0.9/libguile/load.c +@@ -26,6 +26,7 @@ + + #include + #include ++#include + + #include "libguile/_scm.h" + #include "libguile/private-gc.h" /* scm_getenv_int */ +@@ -297,6 +298,32 @@ + SCM cpath = SCM_EOL; + + #ifdef SCM_LIBRARY_DIR ++ char *program, *bin_dir, *prefix, *module_dir, *ccache_dir; ++ ++ /* Determine the source and compiled module directories at run-time, ++ relative to the executable's location. ++ ++ Note: Use /proc/self/exe instead of argv[0] because the latter is ++ not necessarily an absolute, nor a valid file name. */ ++ ++ program = scm_gc_malloc_pointerless (256, "string"); ++ readlink ("/proc/self/exe", program, 256); ++ ++ bin_dir = dirname (strdupa (program)); ++ ++ prefix = scm_gc_malloc_pointerless (strlen (bin_dir) + 4, "string"); ++ strcpy (prefix, bin_dir); ++ strcat (prefix, "/.."); ++ prefix = canonicalize_file_name (prefix); ++ ++ module_dir = scm_gc_malloc_pointerless (strlen (prefix) + 50, "string"); ++ strcpy (module_dir, prefix); ++ strcat (module_dir, "/share/guile/" SCM_EFFECTIVE_VERSION); ++ ++ ccache_dir = scm_gc_malloc_pointerless (strlen (prefix) + 50, "string"); ++ strcpy (ccache_dir, prefix); ++ strcat (ccache_dir, "/lib/guile/" SCM_EFFECTIVE_VERSION "/ccache"); ++ + env = getenv ("GUILE_SYSTEM_PATH"); + if (env && strcmp (env, "") == 0) + /* special-case interpret system-path=="" as meaning no system path instead +@@ -305,10 +332,7 @@ + else if (env) + path = scm_parse_path (scm_from_locale_string (env), path); + else +- path = scm_list_4 (scm_from_locale_string (SCM_LIBRARY_DIR), +- scm_from_locale_string (SCM_SITE_DIR), +- scm_from_locale_string (SCM_GLOBAL_SITE_DIR), +- scm_from_locale_string (SCM_PKGDATA_DIR)); ++ path = scm_list_1 (scm_from_locale_string (module_dir)); + + env = getenv ("GUILE_SYSTEM_COMPILED_PATH"); + if (env && strcmp (env, "") == 0) +@@ -317,10 +341,7 @@ + else if (env) + cpath = scm_parse_path (scm_from_locale_string (env), cpath); + else +- { +- cpath = scm_list_2 (scm_from_locale_string (SCM_CCACHE_DIR), +- scm_from_locale_string (SCM_SITE_CCACHE_DIR)); +- } ++ cpath = scm_list_1 (scm_from_locale_string (ccache_dir)); + + #endif /* SCM_LIBRARY_DIR */ + diff --git a/steps-guix/guile-2.2.4/patches/use-execvp-sh-in-scm-system.patch b/steps-guix/guile-2.0.9/patches/use-execvp-sh-in-scm-system.patch similarity index 85% rename from steps-guix/guile-2.2.4/patches/use-execvp-sh-in-scm-system.patch rename to steps-guix/guile-2.0.9/patches/use-execvp-sh-in-scm-system.patch index 0f241716..ac6a4bb9 100644 --- a/steps-guix/guile-2.2.4/patches/use-execvp-sh-in-scm-system.patch +++ b/steps-guix/guile-2.0.9/patches/use-execvp-sh-in-scm-system.patch @@ -1,18 +1,18 @@ ---- guile-2.2.4/libguile/simpos.c -+++ guile-2.2.4/libguile/simpos.c -@@ -24,7 +24,10 @@ +--- guile-2.0.9/libguile/simpos.c ++++ guile-2.0.9/libguile/simpos.c +@@ -24,9 +24,11 @@ #endif #include --#include /* for getenv, system, exit, free */ +#include -+#include /* for getenv, exit, free */ + #include /* for SIG constants */ + #include /* for getenv */ + #include +#include -+#include - #include /* for _exit */ #include "libguile/_scm.h" -@@ -48,7 +51,11 @@ + +@@ -66,7 +68,11 @@ "indicating whether the command processor is available.") #define FUNC_NAME s_scm_system { @@ -25,7 +25,7 @@ char *c_cmd; if (SCM_UNBNDP (cmd)) -@@ -59,11 +66,78 @@ +@@ -77,11 +83,79 @@ SCM_VALIDATE_STRING (1, cmd); errno = 0; c_cmd = scm_to_locale_string (cmd); @@ -34,10 +34,11 @@ - if (rv == -1 || (rv == 127 && errno != 0)) - SCM_SYSERROR; - return scm_from_int (rv); -+ + if (pipe (errpipe) < 0) + { -+ eno = errno; free (c_cmd); errno = eno; ++ eno = errno; ++ free (c_cmd); ++ errno = eno; + SCM_SYSERROR; + } + diff --git a/steps-guix/guile-2.0.9/sources b/steps-guix/guile-2.0.9/sources new file mode 100644 index 00000000..d7ab9bf0 --- /dev/null +++ b/steps-guix/guile-2.0.9/sources @@ -0,0 +1 @@ +f http://ftp.gnu.org/pub/gnu/guile/guile-2.0.9.tar.xz f70a38c8d9751f442679bfe61852bba8545af4d4355d037630997c2f37f2895b diff --git a/steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch b/steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch deleted file mode 100644 index e6999210..00000000 --- a/steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- guile-2.2.4/module/rnrs/arithmetic/fixnums.scm -+++ guile-2.2.4/module/rnrs/arithmetic/fixnums.scm -@@ -242,50 +242,34 @@ - - (define (fxcopy-bit fx1 fx2 fx3) - (assert-fixnum fx1 fx2 fx3) -- (unless (and (<= 0 fx2) (< fx2 (fixnum-width))) -- (raise (make-assertion-violation))) - (bitwise-copy-bit fx1 fx2 fx3)) - - (define (fxbit-field fx1 fx2 fx3) - (assert-fixnum fx1 fx2 fx3) -- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width))) -- (raise (make-assertion-violation))) - (bitwise-bit-field fx1 fx2 fx3)) - - (define (fxcopy-bit-field fx1 fx2 fx3 fx4) - (assert-fixnum fx1 fx2 fx3 fx4) -- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width))) -- (raise (make-assertion-violation))) - (bitwise-copy-bit-field fx1 fx2 fx3 fx4)) - - (define (fxarithmetic-shift fx1 fx2) - (assert-fixnum fx1 fx2) -- (unless (< (abs fx2) (fixnum-width)) -- (raise (make-assertion-violation))) - (ash fx1 fx2)) - - (define (fxarithmetic-shift-left fx1 fx2) - (assert-fixnum fx1 fx2) -- (unless (and (<= 0 fx2) (< fx2 (fixnum-width))) -- (raise (make-assertion-violation))) - (ash fx1 fx2)) - - (define (fxarithmetic-shift-right fx1 fx2) - (assert-fixnum fx1 fx2) -- (unless (and (<= 0 fx2) (< fx2 (fixnum-width))) -- (raise (make-assertion-violation))) - (ash fx1 (- fx2))) - - (define (fxrotate-bit-field fx1 fx2 fx3 fx4) - (assert-fixnum fx1 fx2 fx3 fx4) -- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width)) (< fx4 (- fx3 fx2))) -- (raise (make-assertion-violation))) - (bitwise-rotate-bit-field fx1 fx2 fx3 fx4)) - - (define (fxreverse-bit-field fx1 fx2 fx3) - (assert-fixnum fx1 fx2 fx3) -- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width))) -- (raise (make-assertion-violation))) - (bitwise-reverse-bit-field fx1 fx2 fx3)) - - ) diff --git a/steps-guix/guile-2.2.4/sources b/steps-guix/guile-2.2.4/sources deleted file mode 100644 index cc64c07f..00000000 --- a/steps-guix/guile-2.2.4/sources +++ /dev/null @@ -1 +0,0 @@ -f https://mirrors.kernel.org/gnu/guile/guile-2.2.4.tar.xz d9e8b94af7b206fcf52bec6501b921bd7d0bd7a31fb7e896a35ba8253678e31e diff --git a/steps-guix/guix-1.5.0/patches/bootstrap-local-seeds.patch.in b/steps-guix/guix-1.5.0/patches/bootstrap-local-seeds.patch.in index 42169f42..d1a05fca 100644 --- a/steps-guix/guix-1.5.0/patches/bootstrap-local-seeds.patch.in +++ b/steps-guix/guix-1.5.0/patches/bootstrap-local-seeds.patch.in @@ -41,7 +41,7 @@ "/20210725/guile-3.0.2.tar.xz") (_ - "/20131110/guile-2.0.9.tar.xz")))) -+ "/guile-static-stripped-2.2.4-i686-linux.tar.xz")))) ++ "/guile-static-stripped-2.0.9-i686-linux.tar.xz")))) (define (bootstrap-guile-hash system) "Return the SHA256 hash of the Guile bootstrap tarball for SYSTEM." @@ -55,31 +55,9 @@ ("mips64el-linux" (base32 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")) ("armhf-linux" -@@ -458,8 +455,8 @@ - (lambda (p) - (format p "\ - #!~a --export GUILE_SYSTEM_PATH=~a/share/guile/2.0 --export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache -+export GUILE_SYSTEM_PATH=~a/share/guile/2.2 -+export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.2/ccache - exec -a \"~a0\" ~a \"~a@\"\n" - bash out out dollar guile-real dollar))) - (chmod guile #o555) -@@ -480,8 +477,8 @@ - ~a -dc < $GUILE_TARBALL | ~a xv - - # Use the bootstrap guile to create its own wrapper to set the load path. --GUILE_SYSTEM_PATH=$out/share/guile/2.0 \ --GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.0/ccache \ -+GUILE_SYSTEM_PATH=$out/share/guile/2.2 \ -+GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.2/ccache \ - $out/bin/guile -c ~s $out ~a - - # Sanity check. @@ -625,16 +622,16 @@ - ("riscv64-linux" - "/20210725/static-binaries.tar.xz") + ("riscv64-linux" + "/20210725/static-binaries.tar.xz") (_ - "/20131110/static-binaries.tar.xz"))) + "/static-binaries-0-i686-linux.tar.xz"))) diff --git a/steps-guix/improve/guix-1.5.0.sh b/steps-guix/improve/guix-1.5.0.sh index 80fbf299..70b94426 100755 --- a/steps-guix/improve/guix-1.5.0.sh +++ b/steps-guix/improve/guix-1.5.0.sh @@ -8,7 +8,7 @@ env_out="/tmp/guix-bootstrap-seeds.env" required_files=" ${dist}/static-binaries-0-i686-linux.tar.xz -${dist}/guile-static-stripped-2.2.4-i686-linux.tar.xz +${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz ${dist}/mes-minimal-stripped-0.19-i686-linux.tar.xz ${dist}/mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz ${dist}/bootstrap-exec-bash-i686-linux @@ -35,10 +35,10 @@ cp -f "${dist}/static-binaries-0-i686-linux.tar.xz" \ "${dist}/i686-linux/static-binaries-0-i686-linux.tar.xz" cp -f "${dist}/static-binaries-0-i686-linux.tar.xz" \ "${dist}/x86_64-linux/static-binaries-0-i686-linux.tar.xz" -cp -f "${dist}/guile-static-stripped-2.2.4-i686-linux.tar.xz" \ - "${dist}/i686-linux/guile-static-stripped-2.2.4-i686-linux.tar.xz" -cp -f "${dist}/guile-static-stripped-2.2.4-i686-linux.tar.xz" \ - "${dist}/x86_64-linux/guile-static-stripped-2.2.4-i686-linux.tar.xz" +cp -f "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz" \ + "${dist}/i686-linux/guile-static-stripped-2.0.9-i686-linux.tar.xz" +cp -f "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz" \ + "${dist}/x86_64-linux/guile-static-stripped-2.0.9-i686-linux.tar.xz" cp -f "${dist}/bootstrap-exec-bash-i686-linux" \ "${dist}/i686-linux/bootstrap-exec-bash-i686-linux" cp -f "${dist}/bootstrap-exec-mkdir-i686-linux" \ @@ -49,7 +49,7 @@ cp -f "${dist}/bootstrap-exec-xz-i686-linux" \ "${dist}/i686-linux/bootstrap-exec-xz-i686-linux" static_binaries_hash="$(/usr/bin/guix-hash-compat "${dist}/static-binaries-0-i686-linux.tar.xz")" -guile_seed_hash="$(/usr/bin/guix-hash-compat "${dist}/guile-static-stripped-2.2.4-i686-linux.tar.xz")" +guile_seed_hash="$(/usr/bin/guix-hash-compat "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz")" mes_minimal_hash="$(/usr/bin/guix-hash-compat "${dist}/mes-minimal-stripped-0.19-i686-linux.tar.xz")" mescc_tools_hash="$(/usr/bin/guix-hash-compat "${dist}/mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")" exec_bash_hash="$(/usr/bin/guix-hash-compat -r "${dist}/bootstrap-exec-bash-i686-linux")" @@ -61,7 +61,7 @@ cat > "${env_out}" <