add first LFS build

This commit is contained in:
aimran96 2023-11-14 18:47:30 -05:00
parent adc9de99aa
commit a4779f980d
116 changed files with 34180 additions and 0 deletions

5226
.config Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
SRC_ARCHIVE/bc-6.7.2.tar.xz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,42 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2007-01-31
Initial Package Version: 1.0.4
Upstream Status: Not submitted
Origin: Randy McMurchy & Steve Crosby
Description: Installs pre-formatted documentation
diff -Naur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile
--- bzip2-1.0.4.orig/Makefile 2007-01-03 03:49:21.000000000 +0000
+++ bzip2-1.0.4/Makefile 2007-01-26 20:00:01.000000000 +0000
@@ -25,7 +25,7 @@
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
-
+DOCDIR=share/doc/$(DISTNAME)
OBJS= blocksort.o \
huffman.o \
@@ -74,6 +74,7 @@
if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+ if ( test ! -d $(PREFIX)/$(DOCDIR) ) ; then mkdir -p $(PREFIX)/$(DOCDIR); fi
if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
cp -f bzip2 $(PREFIX)/bin/bzip2
cp -f bzip2 $(PREFIX)/bin/bunzip2
@@ -107,6 +108,14 @@
echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f manual.html $(PREFIX)/$(DOCDIR)
+ cp -f manual.pdf $(PREFIX)/$(DOCDIR)
+ cp -f manual.ps $(PREFIX)/$(DOCDIR)
+ cp -f bzip2.txt $(PREFIX)/$(DOCDIR)
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.html
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.pdf
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.ps
+ chmod a+r $(PREFIX)/$(DOCDIR)/bzip2.txt
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,39 @@
Submitted By: Bruce Dubbs <bdubbs at linuxfromscratch dot org>
Date: 2018-01-01
Initial Package Version: 1.78.1
Upstream Status: Unsure
Origin: Peter De Wachter <pdewacht@gmail.com>
Description: use EXSLT "replace" function when available
A recursive implementation of string.subst is problematic,
long strings with many matches will cause stack overflows.
Author: Peter De Wachter <pdewacht@gmail.com>
Bug-Debian: https://bugs.debian.org/750593
Rediffed for 1.79.2 by Bruce Dubbs
diff -Naur docbook-xsl-1.79.2.orig/lib/lib.xsl docbook-xsl-1.79.2/lib/lib.xsl
--- docbook-xsl-1.79.2.orig/lib/lib.xsl 2016-12-09 16:41:39.000000000 -0600
+++ docbook-xsl-1.79.2/lib/lib.xsl 2018-01-01 12:54:52.507332514 -0600
@@ -6,7 +6,11 @@
This module implements DTD-independent functions
- ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ ******************************************************************** -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:str="http://exslt.org/strings"
+ exclude-result-prefixes="str"
+ version="1.0">
<xsl:template name="dot.count">
<!-- Returns the number of "." characters in a string -->
@@ -52,6 +56,9 @@
<xsl:param name="replacement"/>
<xsl:choose>
+ <xsl:when test="function-available('str:replace')">
+ <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
+ </xsl:when>
<xsl:when test="contains($string, $target)">
<xsl:variable name="rest">
<xsl:call-template name="string.subst">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,72 @@
Submitted By: Armin K. <krejzi at email dot com>
Date: 2013-02-11
Initial Package Version: 2.17
Upstream Status: Not Applicable
Origin: Self
Description: This patch removes references to /var/db directory which is not part
of FHS and replaces them with more suitable directories in /var
hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
--- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100
+++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100
@@ -250,7 +250,7 @@
# Directory for the database files and Makefile for nss_db.
ifndef vardbdir
-vardbdir = $(localstatedir)/db
+vardbdir = $(localstatedir)/lib/nss_db
endif
inst_vardbdir = $(install_root)$(vardbdir)
--- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100
+++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100
@@ -112,11 +112,11 @@
/* Paths of the file for the persistent storage. */
-#define _PATH_NSCD_PASSWD_DB "/var/db/nscd/passwd"
-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group"
-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts"
-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services"
-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup"
+#define _PATH_NSCD_PASSWD_DB "/var/cache/nscd/passwd"
+#define _PATH_NSCD_GROUP_DB "/var/cache/nscd/group"
+#define _PATH_NSCD_HOSTS_DB "/var/cache/nscd/hosts"
+#define _PATH_NSCD_SERVICES_DB "/var/cache/nscd/services"
+#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup"
/* Path used when not using persistent storage. */
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
--- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100
+++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100
@@ -22,7 +22,7 @@
/etc/rpc /etc/services /etc/shadow /etc/gshadow \
/etc/netgroup)
-VAR_DB = /var/db
+VAR_DB = /var/lib/nss_db
AWK = awk
MAKEDB = makedb --quiet
--- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100
+++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/nss_db/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
--- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100
+++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/nss_db/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"

View File

@ -0,0 +1,774 @@
Submitted By: Xi Ruoyao <xry111 at xry111.site>
Date: 2023-10-03
Initial Package Version: 2.38
Upstream Status: Applied
Origin: Upstream & Self
- 1/8: https://sourceware.org/git/?p=glibc.git;a=patch;h=542b11058525
- 2/8: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
- 3/8: Trivial unused code removal
- 4/8: https://sourceware.org/pipermail/libc-alpha/2023-September/151522.html
- 5/8: https://sourceware.org/pipermail/libc-alpha/2023-September/151548.html
- 6/8: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ec6b95c3303c
- 7/8: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=73e3fcd1a552
- 8/8: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=750a45a78390
Description: Fixes a regression causing posix_memalign()
very slow in certain conditions to avoid
breaking ffmpeg-based applications;
fixes three security vulnerabilities:
CVE-2023-4527, CVE-2023-4806, and CVE-2023-4911.
(There is also a fix for CVE-2023-5156, but this
CVE is actually a memory leak introduced by the
CVE-2023-4806 fix so I'll not say "fixed it for
Glibc-2.38".)
From fc01478d06658ace8d57e5328c1e717275acfe84 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 11 Aug 2023 11:18:17 +0200
Subject: [PATCH 1/3] malloc: Enable merging of remainders in memalign (bug
30723)
Previously, calling _int_free from _int_memalign could put remainders
into the tcache or into fastbins, where they are invisible to the
low-level allocator. This results in missed merge opportunities
because once these freed chunks become available to the low-level
allocator, further memalign allocations (even of the same size are)
likely obstructing merges.
Furthermore, during forwards merging in _int_memalign, do not
completely give up when the remainder is too small to serve as a
chunk on its own. We can still give it back if it can be merged
with the following unused chunk. This makes it more likely that
memalign calls in a loop achieve a compact memory layout,
independently of initial heap layout.
Drop some useless (unsigned long) casts along the way, and tweak
the style to more closely match GNU on changed lines.
Reviewed-by: DJ Delorie <dj@redhat.com>
(cherry picked from commit 542b1105852568c3ebc712225ae78b8c8ba31a78)
---
malloc/malloc.c | 197 +++++++++++++++++++++++++++++-------------------
1 file changed, 121 insertions(+), 76 deletions(-)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index e2f1a615a4..948f9759af 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1086,6 +1086,11 @@ typedef struct malloc_chunk* mchunkptr;
static void* _int_malloc(mstate, size_t);
static void _int_free(mstate, mchunkptr, int);
+static void _int_free_merge_chunk (mstate, mchunkptr, INTERNAL_SIZE_T);
+static INTERNAL_SIZE_T _int_free_create_chunk (mstate,
+ mchunkptr, INTERNAL_SIZE_T,
+ mchunkptr, INTERNAL_SIZE_T);
+static void _int_free_maybe_consolidate (mstate, INTERNAL_SIZE_T);
static void* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
INTERNAL_SIZE_T);
static void* _int_memalign(mstate, size_t, size_t);
@@ -4637,31 +4642,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
if (!have_lock)
__libc_lock_lock (av->mutex);
- nextchunk = chunk_at_offset(p, size);
-
- /* Lightweight tests: check whether the block is already the
- top block. */
- if (__glibc_unlikely (p == av->top))
- malloc_printerr ("double free or corruption (top)");
- /* Or whether the next chunk is beyond the boundaries of the arena. */
- if (__builtin_expect (contiguous (av)
- && (char *) nextchunk
- >= ((char *) av->top + chunksize(av->top)), 0))
- malloc_printerr ("double free or corruption (out)");
- /* Or whether the block is actually not marked used. */
- if (__glibc_unlikely (!prev_inuse(nextchunk)))
- malloc_printerr ("double free or corruption (!prev)");
-
- nextsize = chunksize(nextchunk);
- if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
- || __builtin_expect (nextsize >= av->system_mem, 0))
- malloc_printerr ("free(): invalid next size (normal)");
+ _int_free_merge_chunk (av, p, size);
- free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
+ if (!have_lock)
+ __libc_lock_unlock (av->mutex);
+ }
+ /*
+ If the chunk was allocated via mmap, release via munmap().
+ */
+
+ else {
+ munmap_chunk (p);
+ }
+}
+
+/* Try to merge chunk P of SIZE bytes with its neighbors. Put the
+ resulting chunk on the appropriate bin list. P must not be on a
+ bin list yet, and it can be in use. */
+static void
+_int_free_merge_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size)
+{
+ mchunkptr nextchunk = chunk_at_offset(p, size);
+
+ /* Lightweight tests: check whether the block is already the
+ top block. */
+ if (__glibc_unlikely (p == av->top))
+ malloc_printerr ("double free or corruption (top)");
+ /* Or whether the next chunk is beyond the boundaries of the arena. */
+ if (__builtin_expect (contiguous (av)
+ && (char *) nextchunk
+ >= ((char *) av->top + chunksize(av->top)), 0))
+ malloc_printerr ("double free or corruption (out)");
+ /* Or whether the block is actually not marked used. */
+ if (__glibc_unlikely (!prev_inuse(nextchunk)))
+ malloc_printerr ("double free or corruption (!prev)");
+
+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
+ if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
+ || __builtin_expect (nextsize >= av->system_mem, 0))
+ malloc_printerr ("free(): invalid next size (normal)");
+
+ free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
- /* consolidate backward */
- if (!prev_inuse(p)) {
- prevsize = prev_size (p);
+ /* Consolidate backward. */
+ if (!prev_inuse(p))
+ {
+ INTERNAL_SIZE_T prevsize = prev_size (p);
size += prevsize;
p = chunk_at_offset(p, -((long) prevsize));
if (__glibc_unlikely (chunksize(p) != prevsize))
@@ -4669,9 +4695,25 @@ _int_free (mstate av, mchunkptr p, int have_lock)
unlink_chunk (av, p);
}
- if (nextchunk != av->top) {
+ /* Write the chunk header, maybe after merging with the following chunk. */
+ size = _int_free_create_chunk (av, p, size, nextchunk, nextsize);
+ _int_free_maybe_consolidate (av, size);
+}
+
+/* Create a chunk at P of SIZE bytes, with SIZE potentially increased
+ to cover the immediately following chunk NEXTCHUNK of NEXTSIZE
+ bytes (if NEXTCHUNK is unused). The chunk at P is not actually
+ read and does not have to be initialized. After creation, it is
+ placed on the appropriate bin list. The function returns the size
+ of the new chunk. */
+static INTERNAL_SIZE_T
+_int_free_create_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size,
+ mchunkptr nextchunk, INTERNAL_SIZE_T nextsize)
+{
+ if (nextchunk != av->top)
+ {
/* get and clear inuse bit */
- nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
+ bool nextinuse = inuse_bit_at_offset (nextchunk, nextsize);
/* consolidate forward */
if (!nextinuse) {
@@ -4686,8 +4728,8 @@ _int_free (mstate av, mchunkptr p, int have_lock)
been given one chance to be used in malloc.
*/
- bck = unsorted_chunks(av);
- fwd = bck->fd;
+ mchunkptr bck = unsorted_chunks (av);
+ mchunkptr fwd = bck->fd;
if (__glibc_unlikely (fwd->bk != bck))
malloc_printerr ("free(): corrupted unsorted chunks");
p->fd = fwd;
@@ -4706,61 +4748,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
check_free_chunk(av, p);
}
- /*
- If the chunk borders the current high end of memory,
- consolidate into top
- */
-
- else {
+ else
+ {
+ /* If the chunk borders the current high end of memory,
+ consolidate into top. */
size += nextsize;
set_head(p, size | PREV_INUSE);
av->top = p;
check_chunk(av, p);
}
- /*
- If freeing a large space, consolidate possibly-surrounding
- chunks. Then, if the total unused topmost memory exceeds trim
- threshold, ask malloc_trim to reduce top.
-
- Unless max_fast is 0, we don't know if there are fastbins
- bordering top, so we cannot tell for sure whether threshold
- has been reached unless fastbins are consolidated. But we
- don't want to consolidate on each free. As a compromise,
- consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD
- is reached.
- */
+ return size;
+}
- if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {
+/* If freeing a large space, consolidate possibly-surrounding
+ chunks. Then, if the total unused topmost memory exceeds trim
+ threshold, ask malloc_trim to reduce top. */
+static void
+_int_free_maybe_consolidate (mstate av, INTERNAL_SIZE_T size)
+{
+ /* Unless max_fast is 0, we don't know if there are fastbins
+ bordering top, so we cannot tell for sure whether threshold has
+ been reached unless fastbins are consolidated. But we don't want
+ to consolidate on each free. As a compromise, consolidation is
+ performed if FASTBIN_CONSOLIDATION_THRESHOLD is reached. */
+ if (size >= FASTBIN_CONSOLIDATION_THRESHOLD)
+ {
if (atomic_load_relaxed (&av->have_fastchunks))
malloc_consolidate(av);
- if (av == &main_arena) {
+ if (av == &main_arena)
+ {
#ifndef MORECORE_CANNOT_TRIM
- if ((unsigned long)(chunksize(av->top)) >=
- (unsigned long)(mp_.trim_threshold))
- systrim(mp_.top_pad, av);
+ if (chunksize (av->top) >= mp_.trim_threshold)
+ systrim (mp_.top_pad, av);
#endif
- } else {
- /* Always try heap_trim(), even if the top chunk is not
- large, because the corresponding heap might go away. */
- heap_info *heap = heap_for_ptr(top(av));
+ }
+ else
+ {
+ /* Always try heap_trim, even if the top chunk is not large,
+ because the corresponding heap might go away. */
+ heap_info *heap = heap_for_ptr (top (av));
- assert(heap->ar_ptr == av);
- heap_trim(heap, mp_.top_pad);
- }
+ assert (heap->ar_ptr == av);
+ heap_trim (heap, mp_.top_pad);
+ }
}
-
- if (!have_lock)
- __libc_lock_unlock (av->mutex);
- }
- /*
- If the chunk was allocated via mmap, release via munmap().
- */
-
- else {
- munmap_chunk (p);
- }
}
/*
@@ -5221,7 +5254,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
(av != &main_arena ? NON_MAIN_ARENA : 0));
set_inuse_bit_at_offset (newp, newsize);
set_head_size (p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
- _int_free (av, p, 1);
+ _int_free_merge_chunk (av, p, leadsize);
p = newp;
assert (newsize >= nb &&
@@ -5232,15 +5265,27 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
if (!chunk_is_mmapped (p))
{
size = chunksize (p);
- if ((unsigned long) (size) > (unsigned long) (nb + MINSIZE))
+ mchunkptr nextchunk = chunk_at_offset(p, size);
+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
+ if (size > nb)
{
remainder_size = size - nb;
- remainder = chunk_at_offset (p, nb);
- set_head (remainder, remainder_size | PREV_INUSE |
- (av != &main_arena ? NON_MAIN_ARENA : 0));
- set_head_size (p, nb);
- _int_free (av, remainder, 1);
- }
+ if (remainder_size >= MINSIZE
+ || nextchunk == av->top
+ || !inuse_bit_at_offset (nextchunk, nextsize))
+ {
+ /* We can only give back the tail if it is larger than
+ MINSIZE, or if the following chunk is unused (top
+ chunk or unused in-heap chunk). Otherwise we would
+ create a chunk that is smaller than MINSIZE. */
+ remainder = chunk_at_offset (p, nb);
+ set_head_size (p, nb);
+ remainder_size = _int_free_create_chunk (av, remainder,
+ remainder_size,
+ nextchunk, nextsize);
+ _int_free_maybe_consolidate (av, remainder_size);
+ }
+ }
}
check_inuse_chunk (av, p);
--
2.41.0
From b37e836b7cc2dba672e1de1cc7e076ba1c712614 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 11 Aug 2023 17:48:13 +0200
Subject: [PATCH 2/3] malloc: Remove bin scanning from memalign (bug 30723)
On the test workload (mpv --cache=yes with VP9 video decoding), the
bin scanning has a very poor success rate (less than 2%). The tcache
scanning has about 50% success rate, so keep that.
Update comments in malloc/tst-memalign-2 to indicate the purpose
of the tests. Even with the scanning removed, the additional
merging opportunities since commit 542b1105852568c3ebc712225ae78b
("malloc: Enable merging of remainders in memalign (bug 30723)")
are sufficient to pass the existing large bins test.
Link: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
---
malloc/malloc.c | 127 ++--------------------------------------
malloc/tst-memalign-2.c | 7 ++-
2 files changed, 10 insertions(+), 124 deletions(-)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 948f9759af..9c2cab7a59 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5082,7 +5082,6 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
mchunkptr remainder; /* spare room at end to split off */
unsigned long remainder_size; /* its size */
INTERNAL_SIZE_T size;
- mchunkptr victim;
nb = checked_request2size (bytes);
if (nb == 0)
@@ -5101,129 +5100,13 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
we don't find anything in those bins, the common malloc code will
scan starting at 2x. */
- /* This will be set if we found a candidate chunk. */
- victim = NULL;
+ /* Call malloc with worst case padding to hit alignment. */
+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
- /* Fast bins are singly-linked, hard to remove a chunk from the middle
- and unlikely to meet our alignment requirements. We have not done
- any experimentation with searching for aligned fastbins. */
+ if (m == 0)
+ return 0; /* propagate failure */
- if (av != NULL)
- {
- int first_bin_index;
- int first_largebin_index;
- int last_bin_index;
-
- if (in_smallbin_range (nb))
- first_bin_index = smallbin_index (nb);
- else
- first_bin_index = largebin_index (nb);
-
- if (in_smallbin_range (nb * 2))
- last_bin_index = smallbin_index (nb * 2);
- else
- last_bin_index = largebin_index (nb * 2);
-
- first_largebin_index = largebin_index (MIN_LARGE_SIZE);
-
- int victim_index; /* its bin index */
-
- for (victim_index = first_bin_index;
- victim_index < last_bin_index;
- victim_index ++)
- {
- victim = NULL;
-
- if (victim_index < first_largebin_index)
- {
- /* Check small bins. Small bin chunks are doubly-linked despite
- being the same size. */
-
- mchunkptr fwd; /* misc temp for linking */
- mchunkptr bck; /* misc temp for linking */
-
- bck = bin_at (av, victim_index);
- fwd = bck->fd;
- while (fwd != bck)
- {
- if (chunk_ok_for_memalign (fwd, alignment, nb) > 0)
- {
- victim = fwd;
-
- /* Unlink it */
- victim->fd->bk = victim->bk;
- victim->bk->fd = victim->fd;
- break;
- }
-
- fwd = fwd->fd;
- }
- }
- else
- {
- /* Check large bins. */
- mchunkptr fwd; /* misc temp for linking */
- mchunkptr bck; /* misc temp for linking */
- mchunkptr best = NULL;
- size_t best_size = 0;
-
- bck = bin_at (av, victim_index);
- fwd = bck->fd;
-
- while (fwd != bck)
- {
- int extra;
-
- if (chunksize (fwd) < nb)
- break;
- extra = chunk_ok_for_memalign (fwd, alignment, nb);
- if (extra > 0
- && (extra <= best_size || best == NULL))
- {
- best = fwd;
- best_size = extra;
- }
-
- fwd = fwd->fd;
- }
- victim = best;
-
- if (victim != NULL)
- {
- unlink_chunk (av, victim);
- break;
- }
- }
-
- if (victim != NULL)
- break;
- }
- }
-
- /* Strategy: find a spot within that chunk that meets the alignment
- request, and then possibly free the leading and trailing space.
- This strategy is incredibly costly and can lead to external
- fragmentation if header and footer chunks are unused. */
-
- if (victim != NULL)
- {
- p = victim;
- m = chunk2mem (p);
- set_inuse (p);
- if (av != &main_arena)
- set_non_main_arena (p);
- }
- else
- {
- /* Call malloc with worst case padding to hit alignment. */
-
- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
-
- if (m == 0)
- return 0; /* propagate failure */
-
- p = mem2chunk (m);
- }
+ p = mem2chunk (m);
if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
{
diff --git a/malloc/tst-memalign-2.c b/malloc/tst-memalign-2.c
index f229283dbf..ecd6fa249e 100644
--- a/malloc/tst-memalign-2.c
+++ b/malloc/tst-memalign-2.c
@@ -86,7 +86,8 @@ do_test (void)
TEST_VERIFY (tcache_allocs[i].ptr1 == tcache_allocs[i].ptr2);
}
- /* Test for non-head tcache hits. */
+ /* Test for non-head tcache hits. This exercises the memalign
+ scanning code to find matching allocations. */
for (i = 0; i < array_length (ptr); ++ i)
{
if (i == 4)
@@ -113,7 +114,9 @@ do_test (void)
free (p);
TEST_VERIFY (count > 0);
- /* Large bins test. */
+ /* Large bins test. This verifies that the over-allocated parts
+ that memalign releases for future allocations can be reused by
+ memalign itself at least in some cases. */
for (i = 0; i < LN; ++ i)
{
--
2.41.0
From 26973f7b09c33e67f6bcbc79371796c8dd334528 Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <xry111@xry111.site>
Date: Mon, 14 Aug 2023 11:05:18 +0800
Subject: [PATCH 3/3] malloc: Remove unused functions and variables
Remove unused chunk_ok_for_memalign function and unused local variables
in _int_free.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
malloc/malloc.c | 42 ------------------------------------------
1 file changed, 42 deletions(-)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 9c2cab7a59..d0bbbf3710 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4488,12 +4488,6 @@ _int_free (mstate av, mchunkptr p, int have_lock)
{
INTERNAL_SIZE_T size; /* its size */
mfastbinptr *fb; /* associated fastbin */
- mchunkptr nextchunk; /* next contiguous chunk */
- INTERNAL_SIZE_T nextsize; /* its size */
- int nextinuse; /* true if nextchunk is used */
- INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
- mchunkptr bck; /* misc temp for linking */
- mchunkptr fwd; /* misc temp for linking */
size = chunksize (p);
@@ -5032,42 +5026,6 @@ _int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
------------------------------ memalign ------------------------------
*/
-/* Returns 0 if the chunk is not and does not contain the requested
- aligned sub-chunk, else returns the amount of "waste" from
- trimming. NB is the *chunk* byte size, not the user byte
- size. */
-static size_t
-chunk_ok_for_memalign (mchunkptr p, size_t alignment, size_t nb)
-{
- void *m = chunk2mem (p);
- INTERNAL_SIZE_T size = chunksize (p);
- void *aligned_m = m;
-
- if (__glibc_unlikely (misaligned_chunk (p)))
- malloc_printerr ("_int_memalign(): unaligned chunk detected");
-
- aligned_m = PTR_ALIGN_UP (m, alignment);
-
- INTERNAL_SIZE_T front_extra = (intptr_t) aligned_m - (intptr_t) m;
-
- /* We can't trim off the front as it's too small. */
- if (front_extra > 0 && front_extra < MINSIZE)
- return 0;
-
- /* If it's a perfect fit, it's an exception to the return value rule
- (we would return zero waste, which looks like "not usable"), so
- handle it here by returning a small non-zero value instead. */
- if (size == nb && front_extra == 0)
- return 1;
-
- /* If the block we need fits in the chunk, calculate total waste. */
- if (size > nb + front_extra)
- return size - nb;
-
- /* Can't use this chunk. */
- return 0;
-}
-
/* BYTES is user requested bytes, not requested chunksize bytes. */
static void *
_int_memalign (mstate av, size_t alignment, size_t bytes)
--
2.41.0
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index c8b77bbc35..119dc9f00f 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -427,7 +427,7 @@ _nss_dns_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
{
n = __res_context_search (ctx, name, C_IN, T_A,
dns_packet_buffer, sizeof (dns_packet_buffer),
- NULL, NULL, NULL, NULL, NULL);
+ &alt_dns_packet_buffer, NULL, NULL, NULL, NULL);
if (n >= 0)
status = gaih_getanswer_noaaaa (alt_dns_packet_buffer, n,
&abuf, pat, errnop, herrnop, ttlp);
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 6ae6744fe4..eb5ba59dac 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -120,6 +120,7 @@ struct gaih_result
{
struct gaih_addrtuple *at;
char *canon;
+ char *hname;
bool free_at;
bool got_ipv6;
};
@@ -165,6 +166,7 @@ gaih_result_reset (struct gaih_result *res)
if (res->free_at)
free (res->at);
free (res->canon);
+ free (res->hname);
memset (res, 0, sizeof (*res));
}
@@ -203,9 +205,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
return 0;
}
-/* Convert struct hostent to a list of struct gaih_addrtuple objects. h_name
- is not copied, and the struct hostent object must not be deallocated
- prematurely. The new addresses are appended to the tuple array in RES. */
+/* Convert struct hostent to a list of struct gaih_addrtuple objects. The new
+ addresses are appended to the tuple array in RES. */
static bool
convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
struct hostent *h, struct gaih_result *res)
@@ -238,6 +239,15 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
res->at = array;
res->free_at = true;
+ /* Duplicate h_name because it may get reclaimed when the underlying storage
+ is freed. */
+ if (res->hname == NULL)
+ {
+ res->hname = __strdup (h->h_name);
+ if (res->hname == NULL)
+ return false;
+ }
+
/* Update the next pointers on reallocation. */
for (size_t i = 0; i < old; i++)
array[i].next = array + i + 1;
@@ -262,7 +272,6 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
}
array[i].next = array + i + 1;
}
- array[0].name = h->h_name;
array[count - 1].next = NULL;
return true;
@@ -324,15 +333,15 @@ gethosts (nss_gethostbyname3_r fct, int family, const char *name,
memory allocation failure. The returned string is allocated on the
heap; the caller has to free it. */
static char *
-getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name)
+getcanonname (nss_action_list nip, const char *hname, const char *name)
{
nss_getcanonname_r *cfct = __nss_lookup_function (nip, "getcanonname_r");
char *s = (char *) name;
if (cfct != NULL)
{
char buf[256];
- if (DL_CALL_FCT (cfct, (at->name ?: name, buf, sizeof (buf),
- &s, &errno, &h_errno)) != NSS_STATUS_SUCCESS)
+ if (DL_CALL_FCT (cfct, (hname ?: name, buf, sizeof (buf), &s, &errno,
+ &h_errno)) != NSS_STATUS_SUCCESS)
/* If the canonical name cannot be determined, use the passed
string. */
s = (char *) name;
@@ -740,6 +749,7 @@ get_nss_addresses (const char *name, const struct addrinfo *req,
}
no_inet6_data = no_data;
inet6_status = status;
+
}
if (req->ai_family == AF_INET
|| req->ai_family == AF_UNSPEC
@@ -771,7 +781,7 @@ get_nss_addresses (const char *name, const struct addrinfo *req,
if ((req->ai_flags & AI_CANONNAME) != 0
&& res->canon == NULL)
{
- char *canonbuf = getcanonname (nip, res->at, name);
+ char *canonbuf = getcanonname (nip, res->hname, name);
if (canonbuf == NULL)
{
__resolv_context_put (res_ctx);
X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=blobdiff_plain;f=sysdeps%2Fposix%2Fgetaddrinfo.c;h=531124958d037733ccee13bf59f97ab4a36ffdd4;hp=47f421fddf7e1aff732763ea333b2469f241091a;hb=ec6b95c3303c700eb89eebeda2d7264cc184a796;hpb=5d00c201b9a2da768a79ea8d5311f257871c0b43
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 47f421fddf..531124958d 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1196,9 +1196,7 @@ free_and_return:
if (malloc_name)
free ((char *) name);
free (addrmem);
- if (res.free_at)
- free (res.at);
- free (res.canon);
+ gaih_result_reset (&res);
return result;
}
X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=blobdiff_plain;f=sysdeps%2Fgeneric%2Funsecvars.h;h=8278c50a84ffda18e28c178d390f1899d8306e26;hp=81397fb90ba48d7e0e4c2ba99c8efb5daf1d6c5b;hb=73e3fcd1a552783e66ff1f65c5f322e2f17a81d1;hpb=f6445dc94da185b3d1ee283f0ca0a34c4e1986cc
diff --git a/sysdeps/generic/unsecvars.h b/sysdeps/generic/unsecvars.h
index 81397fb90b..8278c50a84 100644
--- a/sysdeps/generic/unsecvars.h
+++ b/sysdeps/generic/unsecvars.h
@@ -4,7 +4,6 @@
#define UNSECURE_ENVVARS \
"GCONV_PATH\0" \
"GETCONF_DIR\0" \
- "GLIBC_TUNABLES\0" \
"HOSTALIASES\0" \
"LD_AUDIT\0" \
"LD_DEBUG\0" \
X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=blobdiff_plain;f=elf%2Fdl-tunables.c;h=cae67efa0aacb9984c49874dcb95f170ecd1d86d;hp=62b7332d95b61ce3428040522271f6e93e9d53ed;hb=750a45a783906a19591fb8ff6b7841470f1f5701;hpb=73e3fcd1a552783e66ff1f65c5f322e2f17a81d1
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
index 62b7332d95..cae67efa0a 100644
--- a/elf/dl-tunables.c
+++ b/elf/dl-tunables.c
@@ -180,11 +180,7 @@ parse_tunables (char *tunestr, char *valstring)
/* If we reach the end of the string before getting a valid name-value
pair, bail out. */
if (p[len] == '\0')
- {
- if (__libc_enable_secure)
- tunestr[off] = '\0';
- return;
- }
+ break;
/* We did not find a valid name-value pair before encountering the
colon. */
@@ -244,9 +240,16 @@ parse_tunables (char *tunestr, char *valstring)
}
}
- if (p[len] != '\0')
- p += len + 1;
+ /* We reached the end while processing the tunable string. */
+ if (p[len] == '\0')
+ break;
+
+ p += len + 1;
}
+
+ /* Terminate tunestr before we leave. */
+ if (__libc_enable_secure)
+ tunestr[off] = '\0';
}
/* Enable the glibc.malloc.check tunable in SETUID/SETGID programs only when

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,135 @@
Submitted By: Xi Ruoyao <xry111 AT xry111 DOT site>
Date: 2023-02-18
Initial Package Version: 2.06
Upstream Status: Committed
Origin: Upstream git repository, commit SHA follows:
7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763
2e9fa73a040462b81bfbfe56c0bc7ad2d30b446b
Description: Recognize ext2/3/4 filesystem features
metdata_csum_seed and large_dir; ignore them as
they are not used by GRUB and can be safely
ignored, instead of treat these unrecognized
features as hard errors. Particularly, the
metadata_csum_seed feature is enabled by
e2fsprogs >= 1.47.0, so failing to recognize it
will cause grub-install failure if the /boot
partition (or /, when /boot is not a separate
partition) is created by a recent mkfs.ext4.
From 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Fri, 11 Jun 2021 21:36:16 +0200
Subject: [PATCH] fs/ext2: Ignore checksum seed incompat feature
This incompat feature is used to denote that the filesystem stored its
metadata checksum seed in the superblock. This is used to allow tune2fs
changing the UUID on a mounted metdata_csum filesystem without having
to rewrite all the disk metadata. However, the GRUB doesn't use the
metadata checksum at all. So, it can just ignore this feature if it
is enabled. This is consistent with the GRUB filesystem code in general
which just does a best effort to access the filesystem's data.
The checksum seed incompat feature has to be removed from the ignore
list if the support for metadata checksum verification is added to the
GRUB ext2 driver later.
Suggested-by: Eric Sandeen <esandeen@redhat.com>
Suggested-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/fs/ext2.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
index e7dd78e66..4953a1591 100644
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
+#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
/* The set of back-incompatible features this driver DOES support. Add (OR)
@@ -123,10 +124,15 @@ GRUB_MOD_LICENSE ("GPLv3+");
* mmp: Not really back-incompatible - was added as such to
* avoid multiple read-write mounts. Safe to ignore for this
* RO driver.
+ * checksum seed: Not really back-incompatible - was added to allow tools
+ * such as tune2fs to change the UUID on a mounted metadata
+ * checksummed filesystem. Safe to ignore for now since the
+ * driver doesn't support checksum verification. However, it
+ * has to be removed from this list if the support is added later.
*/
#define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
- | EXT4_FEATURE_INCOMPAT_MMP)
-
+ | EXT4_FEATURE_INCOMPAT_MMP \
+ | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
#define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
--
2.39.2
From 2e9fa73a040462b81bfbfe56c0bc7ad2d30b446b Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Tue, 30 Aug 2022 22:41:59 -0400
Subject: [PATCH] fs/ext2: Ignore the large_dir incompat feature
Recently, ext4 added the large_dir feature, which adds support for
a 3 level htree directory support.
The GRUB supports existing file systems with htree directories by
ignoring their existence, and since the index nodes for the hash tree
look like deleted directory entries (by design), the GRUB can simply do
a brute force O(n) linear search of directories. The same is true for
3 level deep htrees indicated by large_dir feature flag.
Hence, it is safe for the GRUB to ignore the large_dir incompat feature.
Fixes: https://savannah.gnu.org/bugs/?61606
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/fs/ext2.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
index 0989e26e1..e1cc5e62a 100644
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -104,6 +104,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
+#define EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000 /* >2GB or 3 level htree */
#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
/* The set of back-incompatible features this driver DOES support. Add (OR)
@@ -129,10 +130,17 @@ GRUB_MOD_LICENSE ("GPLv3+");
* checksummed filesystem. Safe to ignore for now since the
* driver doesn't support checksum verification. However, it
* has to be removed from this list if the support is added later.
+ * large_dir: Not back-incompatible given that the GRUB ext2 driver does
+ * not implement EXT2_FEATURE_COMPAT_DIR_INDEX. If the GRUB
+ * eventually supports the htree feature (aka dir_index)
+ * it should support 3 level htrees and then move
+ * EXT4_FEATURE_INCOMPAT_LARGEDIR to
+ * EXT2_DRIVER_SUPPORTED_INCOMPAT.
*/
#define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
| EXT4_FEATURE_INCOMPAT_MMP \
- | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
+ | EXT4_FEATURE_INCOMPAT_CSUM_SEED \
+ | EXT4_FEATURE_INCOMPAT_LARGEDIR)
#define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
--
2.39.2

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,250 @@
Submitted By: Matt Burgess
Date: 2008-12-06
Initial Package Version: 1.15
Upstream Status: Not submitted, possibly incomplete
Description: Makes Backspace and Delete keys consistent in all i386 keymaps.
Makes the Backspace key send character code 127, and Delete send a well known
escape sequence. Obsoletes the /etc/kbd/bs-sends-del file for i386.
Original patch for 1.12 by Alexander Patrakov.
Updated for 1.13 (drop ru.map, the change is upstream, and add ru_win.map,
ru-cp1251.map) by Ken Moffat <ken at linuxfromscratch dot org>.
Re-diffed against 1.15 by Matt Burgess <matthew at linuxfromscratch.org>.
diff -Naur kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-l.map kbd-1.15/data/keymaps/i386/dvorak/dvorak-l.map
--- kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-l.map 2008-06-20 12:36:01.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/dvorak/dvorak-l.map 2008-12-03 22:27:55.000000000 +0000
@@ -43,7 +43,7 @@
keycode 11 = three numbersign
keycode 12 = two at
keycode 13 = one exclam
- keycode 14 = BackSpace Delete
+ keycode 14 = Delete Delete
! --------------------------------------------------------------------------
! Row 3
! --------------------------------------------------------------------------
diff -Naur kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-r.map kbd-1.15/data/keymaps/i386/dvorak/dvorak-r.map
--- kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-r.map 2008-06-20 12:36:01.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/dvorak/dvorak-r.map 2008-12-03 22:28:13.000000000 +0000
@@ -43,7 +43,7 @@
keycode 11 = slash question
keycode 12 = bracketleft braceleft
keycode 13 = bracketright braceright
- keycode 14 = BackSpace Delete
+ keycode 14 = Delete Delete
! --------------------------------------------------------------------------
! Row 3
! --------------------------------------------------------------------------
diff -Naur kbd-1.15.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map kbd-1.15/data/keymaps/i386/fgGIod/tr_f-latin5.map
--- kbd-1.15.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map 2008-10-23 20:03:58.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/fgGIod/tr_f-latin5.map 2008-12-03 22:40:32.000000000 +0000
@@ -51,7 +51,7 @@
alt keycode 12 = Meta_minus
keycode 13 = minus underscore
alt keycode 13 = Meta_equal
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Meta_Tab
alt keycode 15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/lt.l4.map kbd-1.15/data/keymaps/i386/qwerty/lt.l4.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/lt.l4.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/lt.l4.map 2008-12-03 22:42:14.000000000 +0000
@@ -205,7 +205,7 @@
# edit this if you want the key above <Enter> to delete symbols above
# cursor, not before.
keycode 14 = \
- BackSpace BackSpace BackSpace BackSpace \
+ Delete Delete Delete Delete \
Delete Delete Delete Delete \
Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete
@@ -506,7 +506,7 @@
# Edit this if you want strict VT100 emulation.
string F111 = "\033[3$"
-keycode 111 = Delete F111 Delete F111 \
+keycode 111 = Remove F111 Remove F111 \
Remove Remove Remove Remove \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
Boot Boot Boot Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/lt.map kbd-1.15/data/keymaps/i386/qwerty/lt.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/lt.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/lt.map 2008-12-03 22:42:58.000000000 +0000
@@ -204,7 +204,7 @@
# edit this if you want the key above <Enter> to delete symbols above
# cursor, not before.
keycode 14 = \
- BackSpace BackSpace BackSpace BackSpace \
+ Delete Delete Delete Delete \
Delete Delete Delete Delete \
Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete
@@ -505,7 +505,7 @@
# Edit this if you want strict VT100 emulation.
string F111 = "\033[3$"
-keycode 111 = Delete F111 Delete F111 \
+keycode 111 = Remove F111 Remove F111 \
Remove Remove Remove Remove \
Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
Boot Boot Boot Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/no-latin1.map kbd-1.15/data/keymaps/i386/qwerty/no-latin1.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/no-latin1.map 2008-06-20 12:36:00.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/no-latin1.map 2008-12-03 22:44:25.000000000 +0000
@@ -3,7 +3,7 @@
# Send comments to Kjetil T. Homme <kjetilho@ifi.uio.no>
include "linux-with-alt-and-altgr"
plain keycode 83 = KP_Comma
- plain keycode 111 = Delete # "Remove" originally, weird...
+ plain keycode 111 = Remove
strings as usual
keycode 1 = Escape
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru1.map kbd-1.15/data/keymaps/i386/qwerty/ru1.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru1.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru1.map 2008-12-03 22:45:32.000000000 +0000
@@ -143,8 +143,8 @@
# The keycode "0xFF" is too dangerous for many programs (including emacs).
# So let it be bracket instead of Hard Sign.
-# altgr keycode 27 = +0xDF
-# altgr shift keycode 27 = +0xFF
+altgr keycode 27 = +0xDF
+altgr shift keycode 27 = +0xFF
control keycode 27 = Control_bracketright
altgr control keycode 27 = Control_bracketright
alt keycode 27 = Meta_bracketright
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru2.map kbd-1.15/data/keymaps/i386/qwerty/ru2.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru2.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru2.map 2008-12-03 22:46:15.000000000 +0000
@@ -46,7 +46,7 @@
alt keycode 12 = Meta_minus
keycode 13 = equal plus equal plus
alt keycode 13 = Meta_equal
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
+ keycode 14 = Delete Delete Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab Tab Tab
alt keycode 15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru-cp1251.map kbd-1.15/data/keymaps/i386/qwerty/ru-cp1251.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru-cp1251.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru-cp1251.map 2008-12-03 22:47:12.000000000 +0000
@@ -39,7 +39,7 @@
alt keycode 12 = Meta_minus
keycode 13 = equal plus equal plus
alt keycode 13 = Meta_equal
- keycode 14 = BackSpace
+ keycode 14 = Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab
alt keycode 15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru-ms.map kbd-1.15/data/keymaps/i386/qwerty/ru-ms.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru-ms.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru-ms.map 2008-12-03 22:48:10.000000000 +0000
@@ -89,8 +89,8 @@
altgr alt keycode 13 = Meta_equal
shift alt keycode 13 = Meta_plus
altgr shift alt keycode 13 = Meta_plus
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
-# keycode 14 = Delete Delete Delete Delete
+# keycode 14 = BackSpace BackSpace BackSpace BackSpace
+ keycode 14 = Delete Delete Delete Delete
alt keycode 14 = Meta_Delete
altgr alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab Tab Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru_win.map kbd-1.15/data/keymaps/i386/qwerty/ru_win.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru_win.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru_win.map 2008-12-03 22:49:17.000000000 +0000
@@ -42,7 +42,7 @@
alt keycode 12 = Meta_minus
keycode 13 = equal plus equal plus
alt keycode 13 = Meta_equal
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
+ keycode 14 = Delete Delete Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Tab Tab Tab
alt keycode 15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/se-ir209.map kbd-1.15/data/keymaps/i386/qwerty/se-ir209.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/se-ir209.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/se-ir209.map 2008-12-03 22:50:18.000000000 +0000
@@ -345,7 +345,7 @@
keycode 109 = Next Scroll_Forward
keycode 110 = Insert
- keycode 111 = Delete # "Remove" originally, weird...
+ keycode 111 = Remove
control alt keycode 111 = Boot
control altgr keycode 111 = Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/se-lat6.map kbd-1.15/data/keymaps/i386/qwerty/se-lat6.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/se-lat6.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/se-lat6.map 2008-12-03 22:50:44.000000000 +0000
@@ -374,6 +374,6 @@
keycode 109 = Next Scroll_Forward
keycode 110 = Insert
- keycode 111 = Delete # "Remove" originally, weird...
+ keycode 111 = Remove
control alt keycode 111 = Boot
control altgr keycode 111 = Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/tr_q-latin5.map kbd-1.15/data/keymaps/i386/qwerty/tr_q-latin5.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/tr_q-latin5.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/tr_q-latin5.map 2008-12-03 22:52:09.000000000 +0000
@@ -49,7 +49,7 @@
alt keycode 12 = Meta_minus
keycode 13 = minus underscore
alt keycode 13 = Meta_equal
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
alt keycode 14 = Meta_Delete
keycode 15 = Tab Meta_Tab
alt keycode 15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua.map kbd-1.15/data/keymaps/i386/qwerty/ua.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua.map 2008-12-03 22:52:52.000000000 +0000
@@ -249,7 +249,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf.map kbd-1.15/data/keymaps/i386/qwerty/ua-utf.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua-utf.map 2008-12-03 22:53:36.000000000 +0000
@@ -250,7 +250,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf-ws.map kbd-1.15/data/keymaps/i386/qwerty/ua-utf-ws.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf-ws.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua-utf-ws.map 2008-12-03 22:54:06.000000000 +0000
@@ -260,7 +260,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-ws.map kbd-1.15/data/keymaps/i386/qwerty/ua-ws.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-ws.map 2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua-ws.map 2008-12-03 22:54:23.000000000 +0000
@@ -260,7 +260,7 @@
shift ctrll ctrlr keycode 13 = plus
alt ctrll ctrlr keycode 13 = Meta_equal
shift alt ctrll ctrlr keycode 13 = Meta_plus
-keycode 14 = BackSpace Delete
+keycode 14 = Delete Delete
control keycode 14 = BackSpace
alt keycode 14 = Meta_Delete
ctrlr keycode 14 = BackSpace

Binary file not shown.

BIN
SRC_ARCHIVE/kmod-31.tar.xz Normal file

Binary file not shown.

BIN
SRC_ARCHIVE/less-643.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,43 @@
Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
Date: 2021-12-18
Initial Package Version: 2.8.9rel.1
Upstream Status: Applied
Origin: Arch Linux (https://github.com/archlinux/svntogit-packages/blob/packages/lynx/trunk/CVE-2021-38165.diff)
Description: Fixes CVE-2021-38165 in Lynx, which allows for
usernames and passwords to be transmitted in cleartext
anytime an HTTPS connection is used.
diff -Naurp lynx2.8.9rel.1.orig/WWW/Library/Implementation/HTTP.c lynx2.8.9rel.1/WWW/Library/Implementation/HTTP.c
--- lynx2.8.9rel.1.orig/WWW/Library/Implementation/HTTP.c 2018-05-04 15:07:43.000000000 -0500
+++ lynx2.8.9rel.1/WWW/Library/Implementation/HTTP.c 2021-12-18 14:12:57.503796366 -0600
@@ -761,6 +761,22 @@ static char *StripIpv6Brackets(char *hos
return host;
}
#endif
+/*
+ * Remove user/password, if any, from the given host-string.
+ */
+#ifdef USE_SSL
+static char *StripUserAuthents(char *host)
+{
+ char *p = strchr(host, '@');
+
+ if (p != NULL) {
+ char *q = host;
+
+ while ((*q++ = *++p) != '\0') ;
+ }
+ return host;
+}
+#endif
/* Load Document from HTTP Server HTLoadHTTP()
* ==============================
@@ -957,6 +973,7 @@ static int HTLoadHTTP(const char *arg,
/* get host we're connecting to */
ssl_host = HTParse(url, "", PARSE_HOST);
ssl_host = StripIpv6Brackets(ssl_host);
+ ssl_host = StripUserAuthents(ssl_host);
#if defined(USE_GNUTLS_FUNCS)
ret = gnutls_server_name_set(handle->gnutls_state,
GNUTLS_NAME_DNS,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,31 @@
Submitted By: Bruce Dubbs <bdubbs@linuxfromscratch.org>
Date: 2021-10-12
Initial Package Version: 8.2
Upstream Status: Applied
Origin: Upstream release repository
Starting a readline applications with an invalid locale
specification for LC_ALL/LANG/LC_CTYPE can cause the shell
to crash.
diff -Naur readline-8.2-orig/nls.c readline-8.2/nls.c
--- readline-8.2-orig/nls.c 2022-08-15 08:38:51.000000000 -0500
+++ readline-8.2/nls.c 2022-10-12 19:51:35.881738300 -0500
@@ -141,6 +141,10 @@
if (lspec == 0)
lspec = "";
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
+ if (ret == 0 || *ret == 0)
+ ret = setlocale (LC_CTYPE, (char *)NULL);
+ if (ret == 0 || *ret == 0)
+ ret = RL_DEFAULT_LOCALE;
#else
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
#endif
diff -Naur readline-8.2-orig/patchlevel readline-8.2/patchlevel
--- readline-8.2-orig/patchlevel 2020-05-21 13:22:40.000000000 -0500
+++ readline-8.2/patchlevel 2022-10-12 19:51:35.881738300 -0500
@@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch
-0
+1

Binary file not shown.

BIN
SRC_ARCHIVE/sed-4.9.tar.xz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
Submitted By: Thomas Pegg <lnxfreak123 at insightbb dot com>
Date: 2003-11-18
Initial Package Version: 0.6.3
Origin: Thomas Pegg
Description: Fixes syntax of Makefile.am for installation of man pages,
for use with current automake versions 1.7.8 and higher.
diff -Naur sgml-common-0.6.3.orig/doc/man/Makefile.am sgml-common-0.6.3/doc/man/Makefile.am
--- sgml-common-0.6.3.orig/doc/man/Makefile.am 2001-01-30 14:42:22.000000000 +0000
+++ sgml-common-0.6.3/doc/man/Makefile.am 2003-11-18 16:48:47.000000000 +0000
@@ -1,2 +1 @@
-man8dir = $(mandir)/man8
-man8_DATA = *.8
+man_MANS = install-catalog.8

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,73 @@
Submitted By: Bruce Dubbs <bdubbs at linuxfromscratch dot org>
Date: 2018-03-30
Initial Package Version: 2.89
Upstream Status: Not Submitted
Origin: Self
Description: Remove programs superceeded by other packages: wall, mountpoint,
last, lastb, logsave, mesg, sulogin, and utmpdump.
Rediffed for version 3.06.
diff -urNa a/src/Makefile b/src/Makefile
--- a/src/Makefile 2022-12-16 18:07:55.000000000 +0100
+++ b/src/Makefile 2022-12-17 15:32:29.687817248 +0100
@@ -23,19 +23,22 @@
# For some known distributions we do not build all programs, otherwise we do.
BIN =
-SBIN = init halt shutdown runlevel killall5 fstab-decode logsave
-USRBIN = last mesg readbootlog
+SBIN = init halt shutdown runlevel killall5 fstab-decode
+#USRBIN = last mesg readbootlog
-MAN1 = last.1 lastb.1 mesg.1 readbootlog.1
+#MAN1 = last.1 lastb.1 mesg.1 readbootlog.1
MAN5 = initscript.5 inittab.5 initctl.5
-MAN8 = halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8
-MAN8 += shutdown.8 telinit.8 fstab-decode.8 logsave.8
+#MAN8 = halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8
+MAN8 = halt.8 init.8 killall5.8 poweroff.8 reboot.8 runlevel.8
+MAN8 += shutdown.8 telinit.8 fstab-decode.8
ifeq ($(DISTRO),)
-SBIN += sulogin bootlogd
-USRBIN += utmpdump wall
-MAN1 += utmpdump.1 wall.1
-MAN8 += sulogin.8 bootlogd.8
+#SBIN += sulogin bootlogd
+SBIN += bootlogd
+#USRBIN += utmpdump wall
+#MAN1 += utmpdump.1 wall.1
+#MAN8 += sulogin.8 bootlogd.8
+MAN8 += bootlogd.8
endif
ifeq ($(DISTRO),Debian)
@@ -213,10 +216,10 @@
ln -sf halt $(ROOT)/sbin/reboot
ln -sf halt $(ROOT)/sbin/poweroff
ln -sf init $(ROOT)/sbin/telinit
- ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
- ln -sf last $(ROOT)/usr/bin/lastb; \
- fi
+ #ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
+ #if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
+ # ln -sf last $(ROOT)/usr/bin/lastb; \
+ #fi
$(INSTALL_DIR) $(ROOT)/usr/include/
$(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
for man in $(MANPAGES) ; do \
@@ -229,8 +232,8 @@
#
# This part is skipped on Debian systems, the
# debian.preinst script takes care of it.
- @if [ ! -p /run/initctl ]; then \
- echo "Creating /run/initctl"; \
- rm -f /run/initctl; \
- mknod -m 600 /run/initctl p; fi
+ #@if [ ! -p /run/initctl ]; then \
+ #echo "Creating /run/initctl"; \
+ #rm -f /run/initctl; \
+ #mknod -m 600 /run/initctl p; fi
endif

Binary file not shown.

BIN
SRC_ARCHIVE/tar-1.35.tar.xz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More