-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5.4.1 -> 5.6.4 regenerate/delete files (this would have detected the infamous xz backdoor)
- Loading branch information
Showing
6 changed files
with
69 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <[email protected]> | ||
# SPDX-FileCopyrightText: 2025 fosslinux <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# sources note: Unfortunately, xz's xz tarballs use SHA-256 checksum, which | ||
# is not widely supported (including by xz), so we use bz2 tarball instead. | ||
|
||
src_prepare() { | ||
# Delete translation catalogs | ||
rm po/*.gmo | ||
|
||
# Delete generated documentation | ||
rm -rf po4a/man | ||
|
||
# Would have detected the xz backdoor | ||
rm tests/files/*.{x,l}z | ||
|
||
# Regenerate these c files/headers | ||
rm src/liblzma/rangecoder/price_table.c src/liblzma/lzma/fastpos_table.c \ | ||
src/liblzma/lz/lz_encoder_hash_table.h \ | ||
src/liblzma/check/crc{32,64}_table_*.h | ||
|
||
pushd src/liblzma/rangecoder | ||
gcc -std=c99 -o price_tablegen price_tablegen.c | ||
./price_tablegen > price_table.c | ||
popd | ||
|
||
pushd src/liblzma/lzma | ||
gcc -std=c99 -o fastpos_tablegen fastpos_tablegen.c | ||
./fastpos_tablegen > fastpos_table.c | ||
popd | ||
|
||
pushd src/liblzma/check | ||
gcc -std=c99 -o crc32_tablegen_le crc32_tablegen.c | ||
./crc32_tablegen_le > crc32_table_le.h | ||
gcc -std=c99 -DWORDS_BIGENDIAN -o crc32_tablegen_be crc32_tablegen.c | ||
./crc32_tablegen_be > crc32_table_be.h | ||
gcc -std=c99 -DLZ_HASH_TABLE -o crc32_tablegen_hashtable crc32_tablegen.c | ||
./crc32_tablegen_hashtable > ../lz/lz_encoder_hash_table.h | ||
|
||
gcc -std=c99 -o crc64_tablegen_le crc64_tablegen.c | ||
./crc64_tablegen_le > crc64_table_le.h | ||
gcc -std=c99 -DWORDS_BIGENDIAN -o crc64_tablegen_be crc64_tablegen.c | ||
./crc64_tablegen_be > crc64_table_be.h | ||
popd | ||
|
||
AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 AUTOCONF=autoconf-2.69 AUTOM4TE=autom4te-2.69 autoreconf-2.69 -f | ||
} | ||
|
||
src_configure() { | ||
./configure \ | ||
--prefix="${PREFIX}" \ | ||
--disable-shared \ | ||
--disable-nls \ | ||
--build=i386-unknown-linux-musl \ | ||
--libdir="${LIBDIR}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/tukaani-project/xz/releases/download/v5.6.4/xz-5.6.4.tar.bz2 176d510c30d80a23b8050bbc048f2ecaacb823ae48b6821727ed6591f0df9200 |