Debian Patches
Status for mit-scheme/12.1-8
| Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
|---|---|---|---|---|---|---|
| 0001-chacha.i-rm-_POSIX_C_SOURCE.patch | chacha.i rm _POSIX_C_SOURCE Drop ineffective late (re)definition of _POSIX_C_SOURCE in chacha.i chacha.i is not a translation unit of its own: it is included at the *end* of chacha8.c, chacha12.c and chacha20.c, each of which has already included <stdint.h> and hence <features.h>. Defining _POSIX_C_SOURCE in chacha.i therefore has no effect on which declarations the libc headers expose, but it does redefine a macro <features.h> has already set. That redefinition used to be benign because glibc happened to pick the same value, 200809L. Current glibc defines _POSIX_C_SOURCE as 202405L, so the values differ and gcc reports chacha.i:32:9: error: '_POSIX_C_SOURCE' redefined [-Werror] which is fatal because the microcode is built with -Werror. Nothing in chacha.i or chacha.h needs anything beyond <stdint.h>, so drop the (re)definition rather than hoisting it into the three including files. md5.c, keccak.c and blowfish.c keep theirs: those define _POSIX_C_SOURCE before any #include so it works as intended. |
"Barak A. Pearlmutter" <bap@debian.org> | no | debian | 2026-09-04 | |
| 0002-blowfish.c-stack-overflow.patch | blowfish.c stack overflow There is an 8-byte stack overflow in the self test for blowfish.c, blowfish_selftest() sets up the IV for each of the six chained-mode tests with memcpy(block, IV, 16); but both IV and block are uint8_t[8] -- Blowfish has a 64-bit block, so an 8-byte IV is what makes sense. The copy thus reads 8 bytes past the end of IV and writes 8 bytes past the end of block, into whatever follows it on the stack (in practice buf[], which is overwritten immediately afterwards, which is why this has gone unnoticed). It is still undefined behaviour, and with _FORTIFY_SOURCE it might become a runtime abort when the compiler stops being able to prove otherwise. gcc already sees it: In function 'memcpy', inlined from 'blowfish_selftest' at blowfish.c:537:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: warning: '__builtin___memcpy_chk' forming offset [8, 15] is out of the bounds [0, 8] of object 'block' with type 'uint8_t[8]' [-Warray-bounds=] Use sizeof(IV), which is what was meant. |
"Barak A. Pearlmutter" <bap@debian.org> | no | 2026-09-05 | ||
| 0003-confshared.h-ppc64.patch | confshared.h ppc64 Fix two 64-bit PowerPC problems in confshared.h on ppc64el both the __ppc__ and the __ppc64__ blocks were included, so MACHINE_TYPE and CURRENT_FASL_ARCH were each defined twice. The microcode is built with -Werror, so on ppc64el every file that includes confshared.h failed: error: 'MACHINE_TYPE' redefined [-Werror] error: 'CURRENT_FASL_ARCH' redefined [-Werror] PowerPC, but the __ppc64__ block set only MACHINE_TYPE and CURRENT_FASL_ARCH, while __x86_64__ and __aarch64__ also set HEAP_IN_LOW_MEMORY. (That was masked because of issue above which loaded the 32-bit PowerPC block which does define it.) |
"Barak A. Pearlmutter" <bap@debian.org> | no | 2026-09-11 | ||
| 0004-info-sos-rm-extra-siblings.patch | info sos rm extra siblings There is a stray sibling menu in the Introduction node of sos.texi which messes up the info structure and should be deleted. Introduction is @unnumbered, so it is a sibling of the Classes ... Printing chapters, not their parent, and the Top node's master menu already lists all seven at the same level. The extra menu at the end of Introduction claims those six chapters as its children, which contradicts the up pointers in their own @node lines: sos.texinfo:123: warning: node up pointer for `Classes' is `Top' but up is `Introduction' in menu ... and the same for Instances, Slots, Generic Procedures, Methods and Printing. Note that an identical list to the one deleted is in Top's menu one screen earlier. |
"Barak A. Pearlmutter" <bap@debian.org> | no | 2026-09-05 | ||
| 0005-texinfo-rm-setfilename.patch | texinfo rm setfilename @setfilename has not been needed since Texinfo 5.0, which takes the output name from the input file name, and giving it is now discouraged. Each of these names its output exactly as the file itself is named, so the line says nothing. |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2026-09-13 | ||
| 0006-allow-autoreconf-force.patch | allow autoreconf force autoreconf --force in src/ regenerates configure without expanding MIT_SCHEME_NATIVE_CODE, and says nothing about it: no aclocal.m4 there, and nothing tells aclocal where the macro lives. - move src/microcode/aclocal.m4 to src/microcode/mit_scheme_native_code.m4, aclocal.m4 being aclocal's own output file - name that directory with AC_CONFIG_MACRO_DIR in both configure.ac |
"Barak A. Pearlmutter" <barak+git@cs.nuim.ie> | no | 2013-07-22 | ||
| 0007-automake-doc.patch | automake doc The hand-written rules ran texi2any and texi2dvi several times over one .texinfo in one directory, so the split and unsplit HTML runs shared an intermediate directory and the PDF and PostScript runs shared the TeX aux files. info_TEXINFOS gives each output its own --build-dir, and .NOTPARALLEL goes. automake takes the info, pdf, ps and html names from the source file name, so the four top-level sources are renamed to the names they install under. The split HTML tree is the one output automake does not cover; it keeps an explicit rule, with its own --output. |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2026-09-12 | ||
| 0008-automake-microcode.patch | automake microcode The hand-written Makefile.in already imitated automake (aux_PROGRAMS, scheme_SOURCES, install-auxPROGRAMS), and carried 440 lines of hand-maintained header dependencies that automake derives itself. findprim keeps a hand-written rule: it runs during the build, so it is built with HOST_CC rather than CC, which automake cannot express. cmpauxmd keeps its m4 -> .s -> .o chain for the same reason. |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2026-09-12 | ||
| 0009-automake-src.patch | automake src Mostly scaffolding: the Scheme build is a driver that runs Scheme to compile Scheme, so the bespoke rules stay as they are and hang off all-local, install-data-local and the clean hooks. compile-<plugin>-c ran the same recursive make as compile-<plugin>, so a -j build reaching a plugin by both routes ran two makes in one directory, one relinking x11-const while the other executed it. Only the C back end uses the -c variants, so they are guarded with @IF_LIARC@ and do not exist elsewhere. automake insists `all' is the default goal, so the aggregate that was called `all' is now build-all, and --with-default-target selects it. SUBDIRS becomes SRC_SUBDIRS, being a list for Clean.sh and Tags.sh to walk rather than sub-packages to recurse into. |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2026-09-12 | ||
| 0010-src-makefile-tools.patch | src makefile tools Of Makefile.tools.in's 27 substitutions only three were live: MIT_SCHEME_EXE, HOST_COMPILER_HEAP and mit_scheme_native_code. The rest was a boilerplate block of directory and install variables nothing referenced, and srcdir, which the file sets to "." itself. Pass the three in from the makefile that invokes it and no .in is needed. It stays a separate makefile: it defines the same seventeen syntax-* and compile-* targets as Makefile.am, for the host toolchain rather than the target, and "make -f" is what keeps the two apart. |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2026-09-12 | ||
| 0011-automake-microcode-makegen.patch | automake microcode makegen makegen.scm wrote the whole Makefile.in from Makefile.in.in, plus Makefile.deps. automake derives the objects and the header dependencies itself, so all that is left to generate is the source lists: it now writes makegen/sources.am, which Makefile.am includes, and Makefile.in.in goes. configure looks for a Scheme. With one, editing a makegen/files-*.scm is enough: make refreshes the fragment while remaking its makefiles, and automake lists the fragment as a prerequisite of Makefile.in, so the change carries through to the object list. The fragment is shipped, so a build without a Scheme uses it as it stands. The fragment carries no timestamp, so regenerating it when nothing has changed leaves the file alone and starts no rebuild. |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2026-09-13 | ||
| 0012-AUXDIR_NAME-sans-arch.patch | AUXDIR_NAME sans arch Sets AUXDIR_NAME=mit-scheme for debian, so the auxiliary directory is /usr/lib/<triplet>/mit-scheme rather than upstream's mit-scheme-<arch>-<version>. This is done while allowing an override, so that a second flavour of the same version (an SVM build alongside the native one, which should be co-installable) can be given its own auxiliary directory. |
"Barak A. Pearlmutter" <barak+git@cs.nuim.ie> | no | 2013-07-03 | ||
| 0013-man-page.patch | man page Minor updates to mit-scheme(1). |
"Barak A. Pearlmutter" <barak+git@pearlmutter.net> | no | 2020-06-09 | ||
| 0014-info-dircategory.patch | info dircategory File the info manuals under "The Algorithmic Language Scheme" The MIT/GNU Scheme manuals were by themselves under "Programming Languages" in the top-level Info directory, while other Debian Scheme systems (Guile, SCM, SLIB, XlibScm) all use section "The Algorithmic Language Scheme". Use the same @dircategory as everybody else, in all seven manuals (the four in doc/ plus the three plugin manuals under src/), so that they are listed together, and update doc/info-dir -- the fallback top-level Info node, installed only when none exists -- to match. |
"Barak A. Pearlmutter" <bap@debian.org> | no | debian | 2026-09-04 |
