Skip to content

Commit

Permalink
main/xz: switch to autogenerated git tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Mar 29, 2024
1 parent e56ca82 commit 2abe81c
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 27 deletions.
61 changes: 61 additions & 0 deletions main/xz/patches/no-gettext.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
commit 3af9e549128c3bdbf2737424990c5ef29181ee90
Author: q66 <q66@chimera-linux.org>
Date: Sat Mar 30 00:42:08 2024 +0100

patch out NLS support

We need this to break the early bootstrap cycle, as xz would
depend on gettext which depends on libxml2 which depends on xz.

We can figure out a better way later.

diff --git a/Makefile.am b/Makefile.am
index 56ecf7d..71882cf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,14 +4,14 @@
# Use -n to prevent gzip from adding a timestamp to the .gz headers.
GZIP_ENV = -9n

-DIST_SUBDIRS = lib src po tests debug
+DIST_SUBDIRS = lib src tests debug
SUBDIRS =

if COND_GNULIB
SUBDIRS += lib
endif

-SUBDIRS += src po tests
+SUBDIRS += src tests

if COND_DOC
dist_doc_DATA = \
diff --git a/configure.ac b/configure.ac
index 075567f..3ed7dd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -775,16 +775,6 @@ AM_CONDITIONAL([COND_SYMVERS_GENERIC],
# Checks for libraries.
###############################################################################

-dnl Support for _REQUIRE_VERSION was added in gettext 0.19.6. If both
-dnl _REQUIRE_VERSION and _VERSION are present, the _VERSION is ignored.
-dnl We use both for compatibility with other programs in the Autotools family.
-echo
-echo "Initializing gettext:"
-AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
-AM_GNU_GETTEXT_VERSION([0.19.6])
-AM_GNU_GETTEXT([external])
-
-
###############################################################################
# Checks for header files.
###############################################################################
@@ -1343,7 +1333,6 @@ AC_SUBST([xz])

AC_CONFIG_FILES([
Makefile
- po/Makefile.in
lib/Makefile
src/Makefile
src/liblzma/Makefile
34 changes: 12 additions & 22 deletions main/xz/patches/sanitize.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
commit 985c6cd070772cf6ae89cb47eeb516d8003dc04e
Author: q66 <q66@chimera-linux.org>
Date: Fri Mar 8 13:06:01 2024 +0100

remove bullshit logic preventing landlock with fsanitize

We use pure trapping sanitizers only, which does not interefere
with landlock in any way. The logic here is pure nonsense.

diff --git a/configure b/configure
index c43d63f..b37819b 100755
--- a/configure
+++ b/configure
@@ -22512,10 +22512,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1199,11 +1199,6 @@ AS_CASE([$enable_sandbox],
}
]])], [
enable_sandbox=found

case $CFLAGS in #(
- *-fsanitize=*) :
- as_fn_error $? "
-
- AS_CASE([$CFLAGS], [*-fsanitize=*], [AC_MSG_ERROR([
- CFLAGS contains '-fsanitize=' which is incompatible with the Landlock
- sandboxing. Use --disable-sandbox when using '-fsanitize'." "$LINENO" 5 ;; #(
*) :
;;
esac
- sandboxing. Use --disable-sandbox when using '-fsanitize'.])])
-
AC_DEFINE([HAVE_LINUX_LANDLOCK], [1],
[Define to 1 if Linux Landlock is supported.
See configure.ac for details.])
15 changes: 10 additions & 5 deletions main/xz/template.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
pkgname = "xz"
pkgver = "5.6.1"
pkgrel = 0
pkgrel = 1
build_style = "gnu_configure"
configure_gen = []
hostmakedepends = ["pkgconf"]
hostmakedepends = ["automake", "libtool", "pkgconf"]
makedepends = []
provides = [f"liblzma={pkgver}-r{pkgrel}"]
pkgdesc = "XZ compression utilities"
maintainer = "q66 <q66@chimera-linux.org>"
license = "0BSD"
url = "https://tukaani.org/xz"
source = f"https://github.com/tukaani-project/xz/releases/download/v{pkgver}/xz-{pkgver}.tar.bz2"
sha256 = "d300422649a0124b1121630be559c890ceedf32667d7064b8128933166c217c8"
# backdoored release tarball; use github generated tarball instead
# if the checksum changes, be extremely careful as it may mean the
# source has been re-tagged (this checksum is known safe)
# commit fd1b975b7851e081ed6e5cf63df946cd5cbdbb94
source = (
f"https://github.com/tukaani-project/xz/archive/refs/tags/v{pkgver}.tar.gz"
)
sha256 = "237284fae40e5f8e9908f0a977e7d0b9a5c7c1c10a41b8e6ed0fb40e930467c8"
options = ["bootstrap"]


Expand Down

0 comments on commit 2abe81c

Please sign in to comment.