diff --git a/lib/sysgeneral.py b/lib/sysgeneral.py index 6208e2b..002b4f1 100644 --- a/lib/sysgeneral.py +++ b/lib/sysgeneral.py @@ -100,7 +100,8 @@ this script the next time") response = requests.get(url, allow_redirects=True, stream=True) if response.status_code == 200: with open(abs_file_name, 'wb') as target_file: - target_file.write(response.raw.read()) + for chunk in response.iter_content(chunk_size=None): + target_file.write(chunk) else: raise Exception("Download failed.") diff --git a/sysa.py b/sysa.py index 8859b4a..be8f401 100755 --- a/sysa.py +++ b/sysa.py @@ -260,6 +260,19 @@ class SysA(SysGeneral): # util-linux 2.19.1 self.get_file("https://mirrors.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-2.19.1.tar.gz") + # curl 7.83.0 + self.get_file("https://curl.se/download/curl-7.83.0.tar.bz2") + + # e2fsprogs 1.45.7 + self.get_file(["https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.7/e2fsprogs-1.45.7.tar.gz", + "https://www.unicode.org/Public/11.0.0/ucd/CaseFolding.txt", + "https://www.unicode.org/Public/11.0.0/ucd/DerivedAge.txt", + "https://www.unicode.org/Public/11.0.0/ucd/extracted/DerivedCombiningClass.txt", + "https://www.unicode.org/Public/11.0.0/ucd/DerivedCoreProperties.txt", + "https://www.unicode.org/Public/11.0.0/ucd/NormalizationCorrections.txt", + "https://www.unicode.org/Public/11.0.0/ucd/NormalizationTest.txt", + "https://www.unicode.org/Public/11.0.0/ucd/UnicodeData.txt"]) + # kexec-tools 2.0.22 self.get_file("https://github.com/horms/kexec-tools/archive/refs/tags/v2.0.22.tar.gz", output="kexec-tools-2.0.22.tar.gz") @@ -270,9 +283,6 @@ class SysA(SysGeneral): # make 3.82 self.get_file("https://mirrors.kernel.org/gnu/make/make-3.82.tar.gz") - # curl 7.83.0 - self.get_file("https://curl.se/download/curl-7.83.0.tar.bz2") - # linux kernel 2.6.16.62 self.get_file(["https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.10.tar.gz", "https://linux-libre.fsfla.org/pub/linux-libre/releases/old/gen6/4.9.10-gnu/deblob-4.9"]) diff --git a/sysa/SHA256SUMS.sources b/sysa/SHA256SUMS.sources index 2ab79bb..30402a9 100644 --- a/sysa/SHA256SUMS.sources +++ b/sysa/SHA256SUMS.sources @@ -1,3 +1,10 @@ +64f117a4749dd4a1b6c54277f63f6cf1e0eb45d290cbedaf777fbe71b8880885 CaseFolding.txt +eb115a5de9a32c9ad447d6ea1cddcadb53d47f6cbc2521f3fe0bebb040c39866 DerivedAge.txt +11c8bd81ecbede4d67c7b5b693a471647d5401956707c639ae053b836cc7f5da DerivedCombiningClass.txt +3406825d64564bf2a37031c36a3e0f99d708aa17595b81f8b539d0f3d1a3923f DerivedCoreProperties.txt +c9ffe32e616fa085246644c2351c525788fac363872491185dab7d5ce69fefa9 NormalizationCorrections.txt +0fdfc17093dd5482f8089cb11dcd936abdba34c4c9c324e5b8a4e5d8f943f6d3 NormalizationTest.txt +4997a3196eb79b4d0d6b8384560f6aeb46a062693f0abd5ba736abbff7976099 UnicodeData.txt 66fde474e124e80c843560041cd68820c9dce56e696f388312ba30361a814a16 autoconf-2.12.tar.gz f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz 4681bcbb9c9298c506f6405a7deb62c54fc3b339d3239a8f36a5df83daaec94f autoconf-2.52.tar.bz2 @@ -25,6 +32,8 @@ c25b36b8af6e0ad2a875daf4d6196bd0df28a62be7dd252e5f99a4d5d7288d95 coreutils-5.0. 1d013547889f20576460249c4210632d5314531c8477378a2e046b13a8ebeb7e coreutils-6.10.tar.gz af4214b851928a53ef470ed8729122b9db910a6c0769d5d46a5de0b3e96f74f3 deblob-4.9 d5f2489c4056a31528e3ada4adacc23d498532b0af1a980f2f76158162b139d6 diffutils-2.7.tar.gz +54437ae4211867de7ad55723f68b94c29cb2f08a23f431e0bbbc9f34ee384f47 dist-3.5-236.tar.gz +340e9de42a12d0c26dd7527e9ef055ac85586de5c61f6273ae19f88d04e55804 e2fsprogs-1.45.7.tar.gz 813cd9405aceec5cfecbe96400d01e90ddad7b512d3034487176ce5258ab0f78 findutils-4.2.33.tar.gz bc79b890f35ca38d66ff89a6e3758226131e51ccbd10ef78d5ff150b7bd73689 flex-2.5.11.tar.gz e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995 flex-2.6.4.tar.gz diff --git a/sysa/e2fsprogs-1.45.7/e2fsprogs-1.45.7.sh b/sysa/e2fsprogs-1.45.7/e2fsprogs-1.45.7.sh new file mode 100755 index 0000000..3d3f9e5 --- /dev/null +++ b/sysa/e2fsprogs-1.45.7/e2fsprogs-1.45.7.sh @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: 2022 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_unpack() { + default + + # Get remaining utf files + cp ${DISTFILES}/*.txt ${pkg}/ +} + +src_prepare() { + default + + # Rebuild libtool files + rm config/config.guess config/config.sub config/ltmain.sh + libtoolize -i + + autoreconf -fi + + # Remove bison parser generated + rm intl/plural.y + + # Setup for regeneratation of lib/ext2fs/utf8data.h + rm lib/ext2fs/utf8data.h + + # Fix compile_et + sed -r -i "s/ > ?outfile//" lib/et/et_c.awk lib/et/et_h.awk lib/ss/ct_c.awk + + # Disable int + sed -i "s/@LIBINTL@//" MCONFIG.in +} + +src_configure() { + ./configure --prefix="${PREFIX}" \ + --sbindir="${PREFIX}/bin" \ + with_udev_rules_dir=no \ + with_systemd_unit_dir=no +} + +src_compile() { + # Regen utf8data + make -C util mkutf8data + util/mkutf8data -o lib/ext2fs/utf8data.h + # Why does mkutf8data generate something not usable by build? + sed -i "s/nfkdi/nfdi/g" lib/ext2fs/utf8data.h + + default +} diff --git a/sysa/e2fsprogs-1.45.7/patches/gawk-fix.patch b/sysa/e2fsprogs-1.45.7/patches/gawk-fix.patch new file mode 100644 index 0000000..1bc8fe3 --- /dev/null +++ b/sysa/e2fsprogs-1.45.7/patches/gawk-fix.patch @@ -0,0 +1,30 @@ +--- lib/et/compile_et.sh.in 2022-05-18 19:26:17.182054784 +1000 ++++ lib/et/compile_et.sh.in 2022-05-18 19:30:16.489294776 +1000 +@@ -44,14 +44,14 @@ + exit 1; + fi + +-$AWK -f "${DIR}/et_h.awk" "outfile=${BASE}.h.$$" "outfn=${BASE}.h" "$ROOT.et" ++$AWK -f "${DIR}/et_h.awk" "$ROOT.et" > ${BASE}.h + if test -f ${BASE}.h && cmp -s ${BASE}.h.$$ ${BASE}.h ; then + rm -f ${BASE}.h.$$ + else + mv -f ${BASE}.h.$$ ${BASE}.h + chmod a-w ${BASE}.h + fi +-$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c.$$" "outfn=${BASE}.c" "$ROOT.et" ++$AWK -f "${DIR}/et_c.awk" "$ROOT.et" > ${BASE}.c + if test -f ${BASE}.c && cmp -s ${BASE}.c.$$ ${BASE}.c ; then + rm -f ${BASE}.c.$$ + else +--- lib/ss/mk_cmds.sh.in 2022-05-18 19:33:16.024962919 +1000 ++++ lib/ss/mk_cmds.sh.in 2022-05-18 19:33:39.650576476 +1000 +@@ -43,7 +43,7 @@ + fi + + ${SED} -f "${DIR}/ct_c.sed" "${FILE}" \ +- | ${AWK} -f "${DIR}/ct_c.awk" "rootname=${ROOT}" "outfile=${TMP}" - ++ | ${AWK} -f "${DIR}/ct_c.awk" "rootname=${ROOT}" - > "${TMP}" + + if grep "^#__ERROR_IN_FILE" "${TMP}" > /dev/null; then + rm "${TMP}" diff --git a/sysa/e2fsprogs-1.45.7/patches/remove-intl.patch b/sysa/e2fsprogs-1.45.7/patches/remove-intl.patch new file mode 100644 index 0000000..160107d --- /dev/null +++ b/sysa/e2fsprogs-1.45.7/patches/remove-intl.patch @@ -0,0 +1,76 @@ +--- configure.ac 2022-05-18 15:12:53.633061872 +1000 ++++ configure.ac 2022-05-18 19:09:13.351790066 +1000 +@@ -860,20 +860,7 @@ + dnl + MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library + AC_SUBST_FILE(MAKEFILE_LIBRARY) +-dnl +-dnl Add internationalization support, using gettext. +-dnl +-GETTEXT_PACKAGE=e2fsprogs +-PACKAGE=e2fsprogs +-VERSION="$E2FSPROGS_VERSION" +-VERSION=0.14.1 +-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package name for gettext]) +-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [version for gettext]) +-AC_SUBST(GETTEXT_PACKAGE) +-AC_SUBST(PACKAGE) +-AC_SUBST(VERSION) + +-AM_GNU_GETTEXT + dnl + dnl End of configuration options + dnl +@@ -1637,15 +1624,6 @@ + [with_udev_rules_dir=yes]) + AS_IF([test "x${with_udev_rules_dir}" != "xno"], + [ +- AS_IF([test "x${with_udev_rules_dir}" = "xyes"], +- [ +- PKG_CHECK_MODULES([udev], [udev], +- [ +- with_udev_rules_dir="$($PKG_CONFIG --variable=udevdir udev)/rules.d" +- ], [ +- with_udev_rules_dir="" +- ]) +- ]) + AC_MSG_CHECKING([for udev rules dir]) + pkg_udev_rules_dir="${with_udev_rules_dir}" + AS_IF([test -n "${pkg_udev_rules_dir}"], +@@ -1708,16 +1686,6 @@ + [with_systemd_unit_dir=yes]) + AS_IF([test "x${with_systemd_unit_dir}" != "xno"], + [ +- AS_IF([test "x${with_systemd_unit_dir}" = "xyes"], +- [ +- PKG_CHECK_MODULES([systemd], [systemd], +- [ +- with_systemd_unit_dir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)" +- ], [ +- with_systemd_unit_dir="" +- ]) +- m4_pattern_allow([^PKG_(MAJOR|MINOR|BUILD|REVISION)$]) +- ]) + AC_MSG_CHECKING([for systemd system unit dir]) + systemd_system_unit_dir="${with_systemd_unit_dir}" + AS_IF([test -n "${systemd_system_unit_dir}"], +--- Makefile.in 2022-05-18 19:41:37.596959349 +1000 ++++ Makefile.in 2022-05-18 19:41:41.109050161 +1000 +@@ -20,7 +20,7 @@ + @ALL_CMT@EXT2FS_LIB_SUBDIR= lib/ext2fs + + LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \ +- $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) intl ++ $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) + + PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \ + $(E2SCRUB_DIR) +@@ -22,7 +22,7 @@ + LIB_SUBDIRS=lib/et lib/ss $(E2P_LIB_SUBDIR) $(UUID_LIB_SUBDIR) \ + $(BLKID_LIB_SUBDIR) $(SUPPORT_LIB_SUBDIR) $(EXT2FS_LIB_SUBDIR) + +-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po \ ++PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs \ + $(E2SCRUB_DIR) + + SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests diff --git a/sysa/run.sh b/sysa/run.sh index 3a18b72..7efec06 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -228,6 +228,8 @@ build gcc-4.0.4 pass2.sh build util-linux-2.19.1 +build e2fsprogs-1.45.7 + build kbd-1.15 build make-3.82