diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-31 15:12:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-31 15:12:39 +0100 |
commit | 2cfae1fadeca2d0c51a301318c96c2cf5073eb6f (patch) | |
tree | 711cd9c9044cc9edd306df0c2c17f06558024a29 /sys-fs | |
parent | 100ce16c6fb75a4911f388aa77f860324607c869 (diff) |
gentoo auto-resync : 31:07:2022 - 15:12:39
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/Manifest.gz | bin | 21882 -> 21880 bytes | |||
-rw-r--r-- | sys-fs/genext2fs/Manifest | 2 | ||||
-rw-r--r-- | sys-fs/genext2fs/files/backport-pr-32.patch | 94 | ||||
-rw-r--r-- | sys-fs/genext2fs/genext2fs-1.5.0-r1.ebuild | 21 |
4 files changed, 117 insertions, 0 deletions
diff --git a/sys-fs/Manifest.gz b/sys-fs/Manifest.gz Binary files differindex 3cbbcc6de4e5..2dbe5808fcff 100644 --- a/sys-fs/Manifest.gz +++ b/sys-fs/Manifest.gz diff --git a/sys-fs/genext2fs/Manifest b/sys-fs/genext2fs/Manifest index d88f5e618d95..eeb9163b3559 100644 --- a/sys-fs/genext2fs/Manifest +++ b/sys-fs/genext2fs/Manifest @@ -1,5 +1,7 @@ +AUX backport-pr-32.patch 3485 BLAKE2B 304139d742f2deaaaae54736045f9227b8b841e703b92195726fb05407788b6ecf72254bfc04bf5fa286ee47de511ac55aa4f0b8d9fb58303f6337e165902a2e SHA512 efc038f4c39ab21d50e5cc88f5c7a84696be5feedfefebd6c8c48657a6f992c06e20a2d80742f1a1f8a8e897134c2058cc4098dbda84dd91f17b7740872fd105 DIST genext2fs-1.4.1.tar.gz 103283 BLAKE2B cacb6e5e5e69f9fbb8550e2b9d79e41d4dd58e2bcc5516a79476918203e5b8ebee0d12a6a6463ff4ec659249a6647881b2728a8d6936fadc298a1e0e68833bdc SHA512 1b9ec7044014423345ae6b09862ba6903f5b3e0f68fb8bbcf97daf2705471cc1633a9fdbc5e00afe1b191e1af7bed87bde2e538bc7365469218f2a00b062845c DIST genext2fs-1.5.0.tar.gz 47848 BLAKE2B 63d65033166356e561bb2ba1a2ff2d10feaab8397bff8d081271b0cdd4c1955949e84c856ff92e7cc3c09f8c913ed6d3672c08a2e07dfa1b71b359ae41abf6a6 SHA512 628994f4f5f6d534a42e16db5322e36addb227d0e0ee589ebebbbb6beda9c53774186a932d04fcb978fde1cbe534b8335fdbfea256aecd2d873c03bc5892a8ce EBUILD genext2fs-1.4.1.ebuild 337 BLAKE2B 96ca8d9974d5a81f2b960db36fce577d14f1c425e0841ea12b797628cfb1f34572361d4716e718f1cc9dc99bd79ced370212872fa0eecd7322833eb1bf59cb22 SHA512 1aea73e08ac5550e1ccd80a8b271e3bfc05878f70ae0f6091623a89892f71c1e68feda6843dfb8cf8a219322a7f3453894571434540d361a597b94ecbbfe1b55 +EBUILD genext2fs-1.5.0-r1.ebuild 505 BLAKE2B 5c8e6f1e1630ceae69e3f2745f718c0897ce956b619f5451a77cd602b2b703b83d908b9ad2c31a2dd8b4d4b7d796c4877f642d3e2cab6cfe9261cbb7fada096e SHA512 5207b00122187a6852e8c46dd8bf7efa075f8dd9da48878787696f0fb0b0ec4f4c1b4cd017b8c8902f2a1178e5f807ffcf4d2495ce9491f11e53dc27b4e47303 EBUILD genext2fs-1.5.0.ebuild 439 BLAKE2B 1d49a92e9a1fbe0d38cf93a8092d0b674727d701e14b45668df8690893db39e7fa5721da73d8800848ddecd5923a2a950cc487011288ac31b6aac05beac1dfbf SHA512 a48bcaf5d2b68772921b6ab048b69511aa1864595bfb65b190b48761c017dd9bf91ac4f58e546c933d1768365545e4670f369ada9eb241cccd0757b2c8282baf MISC metadata.xml 331 BLAKE2B 2b5ea4a09d867d0d1244932233f1b5060fe617e47957ac4a70558e79369637ef1446665ca7125989dd7c77dea3f9ef891b6ca41f0459aae5bc85f72f6ac8e7bf SHA512 b68c435320cf57d257d654fd9fb31a32ead79a2f235269e2279764fde9866a901f2f6f53029bef5e429b23fe06111e3612d73bd9176d67bf4fa791e9ae7f0887 diff --git a/sys-fs/genext2fs/files/backport-pr-32.patch b/sys-fs/genext2fs/files/backport-pr-32.patch new file mode 100644 index 000000000000..92c67e02031d --- /dev/null +++ b/sys-fs/genext2fs/files/backport-pr-32.patch @@ -0,0 +1,94 @@ +From 9651f5df1c95cdfee3d8f5f3f989fe326547f5d0 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Mon, 16 May 2022 21:54:21 -0400 +Subject: [PATCH 1/2] Fix alignment issues for strict architectures + +Fixes two locations where unaligned accesses will cause bus errors on +architectures that are strict about such accesses, namely sparc. + +The first is in swab32_into, which is called with an offset of +1 into +an unsigned char array from mklink_fs. + +The second is in add2fs_from_tarball when checking the validity of a +tarball, which casts a string from an unaligned position inside a struct +to a long. + +After these changes, the test suite passes on sparc. +--- + genext2fs.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/genext2fs.c b/genext2fs.c +index 96bbb43..404f31e 100644 +--- a/genext2fs.c ++++ b/genext2fs.c +@@ -2058,11 +2058,14 @@ mkdir_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, + + // byte swapping for symlinks + static inline void +-swab32_into(uint32 *dst, uint32 *src, size_t n) ++swab32_into(uint32 *dst, uint8 *src, size_t n) + { + size_t i; +- for(i = 0; i < n; i++) +- dst[i] = swab32(src[i]); ++ for(i = 0; i < n; i++) { ++ uint32 tmp_buf; ++ memcpy(&tmp_buf, src + i * sizeof(uint32) / sizeof(uint8), sizeof(uint32) / sizeof(uint8)); ++ dst[i] = swab32(tmp_buf); ++ } + } + + // make a symlink +@@ -2079,7 +2082,7 @@ mklink_fs(filesystem *fs, uint32 parent_nod, const char *name, size_t size, uint + + if (size < 4 * (EXT2_TIND_BLOCK + 1)) + if (fs->swapit) +- swab32_into(node->i_block, (uint32 *)b, EXT2_TIND_BLOCK + 1); ++ swab32_into(node->i_block, b, EXT2_TIND_BLOCK + 1); + else + memcpy(node->i_block, b, 4 * (EXT2_TIND_BLOCK + 1)); + else +@@ -2290,7 +2293,7 @@ add2fs_from_tarball(filesystem *fs, uint32 this_nod, FILE * fh, int squash_uids, + continue; + } else + nbnull = 0; +- if (*(long *)tarhead->ustar != *(long *)"ustar\00000" && strcmp(tarhead->ustar, "ustar ")) ++ if (memcmp(tarhead->ustar, "ustar\00000", sizeof(long)) && strcmp(tarhead->ustar, "ustar ")) + error_msg_and_die("not a tarball"); + signed_checksum = unsigned_checksum = 0; + checksum = OCTAL_READ(tarhead->checksum); +@@ -3351,7 +3354,7 @@ print_link(filesystem *fs, uint32 nod) + uint32 *buf = malloc(4 * (EXT2_TIND_BLOCK + 1)); + if (buf == NULL) + error_msg_and_die(memory_exhausted); +- swab32_into(buf, node->i_block, EXT2_TIND_BLOCK + 1); ++ swab32_into(buf, (uint8*)node->i_block, EXT2_TIND_BLOCK + 1); + printf("links to '%s'\n", (char*) buf); + free(buf); + } else { + +From 4a99c22603fb01ca8d6c6c4cb9873f50124ac025 Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Wed, 18 May 2022 11:46:44 -0400 +Subject: [PATCH 2/2] Hardcode length of hardcoded char array instead of + sizeof(long) + +sizeof(long) != 8 on 32-bit. +--- + genext2fs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/genext2fs.c b/genext2fs.c +index 404f31e..e8c71ff 100644 +--- a/genext2fs.c ++++ b/genext2fs.c +@@ -2293,7 +2293,7 @@ add2fs_from_tarball(filesystem *fs, uint32 this_nod, FILE * fh, int squash_uids, + continue; + } else + nbnull = 0; +- if (memcmp(tarhead->ustar, "ustar\00000", sizeof(long)) && strcmp(tarhead->ustar, "ustar ")) ++ if (memcmp(tarhead->ustar, "ustar\00000", 8) && strcmp(tarhead->ustar, "ustar ")) + error_msg_and_die("not a tarball"); + signed_checksum = unsigned_checksum = 0; + checksum = OCTAL_READ(tarhead->checksum); diff --git a/sys-fs/genext2fs/genext2fs-1.5.0-r1.ebuild b/sys-fs/genext2fs/genext2fs-1.5.0-r1.ebuild new file mode 100644 index 000000000000..35487c327f55 --- /dev/null +++ b/sys-fs/genext2fs/genext2fs-1.5.0-r1.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="generate ext2 file systems" +HOMEPAGE="https://github.com/bestouff/genext2fs" +SRC_URI="https://github.com/bestouff/genext2fs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86" + +PATCHES=( "${FILESDIR}/backport-pr-32.patch" ) + +src_prepare() { + default + eautoreconf +} |