diff options
Diffstat (limited to 'system')
116 files changed, 4275 insertions, 1756 deletions
diff --git a/system/cmake/APKBUILD b/system/cmake/APKBUILD index 672caf7e0..983dd5335 100644 --- a/system/cmake/APKBUILD +++ b/system/cmake/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Valery Kartel <valery.kartel@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=cmake -pkgver=3.23.5 +pkgver=3.31.8 pkgrel=0 pkgdesc="Cross-platform build system" url="https://cmake.org" @@ -19,7 +19,7 @@ case $pkgver in esac source="https://cmake.org/files/$_v/cmake-${pkgver}.tar.gz - fix-tests-git-file-protocol-permission.patch + musl-ldso.patch " _parallel_opt() { @@ -41,6 +41,7 @@ build() { --datadir=/share/$pkgname \ --docdir=/share/doc/$pkgname \ --system-libs \ + --no-system-cppdap \ --no-system-jsoncpp \ $(_parallel_opt) make @@ -53,11 +54,13 @@ check() { ; # skip CTestTestUpload: tries to upload something during check... - #CTEST_PARALLEL_LEVEL=${JOBS} \ + # BundleUtilities fails in autobuilder env due to LD_PRELOAD hack + # RunCMake.CrosscompilingEmulator and RunCMake.add_test don't support + # running with parallel level > 1. + CTEST_PARALLEL_LEVEL=${JOBS} \ CTEST_OUTPUT_ON_FAILURE=TRUE \ bin/ctest \ - -E CTestTestUpload \ - -E BundleUtilities \ + -E '(CTestTestUpload|BundleUtilities|RunCMake\.(CrosscompilingEmulator|add_test))' \ ; } @@ -65,5 +68,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="298f02cd4a0b332184b3e49f343d8a03dcfa637004b0ee9d0a81f72b1ee568aca9caa7322dbf9fe82d9660a8c617f572404cef0c34b2f63297e9211e953cca12 cmake-3.23.5.tar.gz -353cae903076760c77a902256ea6c61102ada60c1ebd05227670cb2bb9aa8f49a4e9946513650f4e58ff94f9a1d108c427d88340b9a633df5376e8036498245e fix-tests-git-file-protocol-permission.patch" +sha512sums="07dbb5af1d449760ef92a921e43c0a0a091989ac51ce3f8b7607bf617b8b56e47c675486d3c620c04f1105b7dfa3852b926915e0888ff46ea473cd01e572f461 cmake-3.31.8.tar.gz +4ad2da9781f55686f4c5dbbb93f909748097f23760208a81109117b3b0976e02f2228253c3a916a6b26575a27f8b67012d2458c35a9cacf6668261d8cede9582 musl-ldso.patch" diff --git a/system/cmake/fix-tests-git-file-protocol-permission.patch b/system/cmake/fix-tests-git-file-protocol-permission.patch deleted file mode 100644 index c43d9a146..000000000 --- a/system/cmake/fix-tests-git-file-protocol-permission.patch +++ /dev/null @@ -1,21 +0,0 @@ -Backported: https://github.com/Kitware/CMake/commit/79ce0f434e916684d734e136b92e14f472a9d14a - -diff -ur a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt ---- a/Tests/CMakeLists.txt 2022-11-01 08:36:33.000000000 -0500 -+++ b/Tests/CMakeLists.txt 2023-02-28 15:24:14.294747915 -0600 -@@ -1586,6 +1586,7 @@ - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject") - set_tests_properties(ExternalProject PROPERTIES -+ ENVIRONMENT GIT_ALLOW_PROTOCOL=file - RUN_SERIAL 1 - TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - -@@ -2678,6 +2679,7 @@ - -P "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake" - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateGIT_DIR}") -+ set_property(TEST CTest.UpdateGIT PROPERTY ENVIRONMENT GIT_ALLOW_PROTOCOL=file) - endif() - - # Test CTest Update with HG diff --git a/system/cmake/musl-ldso.patch b/system/cmake/musl-ldso.patch new file mode 100644 index 000000000..7fd68e374 --- /dev/null +++ b/system/cmake/musl-ldso.patch @@ -0,0 +1,5 @@ +--- cmake-3.31.8/Tests/RunCMake/RuntimePath/Stub-fail-stderr.txt.old 2025-06-12 08:51:05.000000000 -0500 ++++ cmake-3.31.8/Tests/RunCMake/RuntimePath/Stub-fail-stderr.txt 2025-06-16 19:11:24.657917052 -0500 +@@ -1 +1 @@ +-(error while loading shared libraries: libStub\.so\.1|Library not loaded: '?@rpath/libStub\.1\.dylib'?|(Cannot|Could not) load module libStub\.a\(libStub\.so\.1\)|fatal: libStub\.so\.1: open failed|Shared object "libStub\.so\.1" not found) ++(Error loading shared library libStub\.so\.1|error while loading shared libraries: libStub\.so\.1|Library not loaded: '?@rpath/libStub\.1\.dylib'?|(Cannot|Could not) load module libStub\.a\(libStub\.so\.1\)|fatal: libStub\.so\.1: open failed|Shared object "libStub\.so\.1" not found) diff --git a/system/git/APKBUILD b/system/git/APKBUILD index 0562bfba2..2b9c75221 100644 --- a/system/git/APKBUILD +++ b/system/git/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=git -pkgver=2.40.0 -pkgrel=1 +pkgver=2.49.0 +pkgrel=0 pkgdesc="Distributed version control system" url="https://www.git-scm.com/" arch="all" @@ -26,11 +26,9 @@ subpackages="$pkgname-doc replaces="git-perl perl-git" source="https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz dont-test-other-encodings.patch + endian.patch git-daemon.initd git-daemon.confd - - disable-t2082-2.patch - perl-getopt-long.patch " _gitcoredir=/usr/libexec/git-core @@ -59,6 +57,7 @@ prepare() { cat >> config.mak <<-EOF NO_SVN_TESTS=YesPlease NO_REGEX=YesPlease + NO_ICONV=YesPlease USE_ASCIIDOCTOR=1 USE_LIBPCRE2=YesPlease NO_NSEC=YesPlease @@ -72,7 +71,7 @@ build() { } check() { - make prefix=/usr DESTDIR="$pkgdir" -j1 test + GIT_SKIP_TESTS='t5564.6' make prefix=/usr DESTDIR="$pkgdir" -j1 test } package() { @@ -168,9 +167,8 @@ subtree() { make install prefix=/usr DESTDIR="$subpkgdir" } -sha512sums="a2720f8f9a0258c0bb5e23badcfd68a147682e45a5d039a42c47128296c508109d5039029db89311a35db97a9008585e84ed11b400846502c9be913d67f0fd90 git-2.40.0.tar.xz -4bcc8367478601c856e0977d46fc4842f62daf300093a576704ad27ccd9fae975f95d3fbfcb00e9fa7254b1db64cd074f49a94fb5cf0abd8d72d7edc9ab8798c dont-test-other-encodings.patch +sha512sums="81a16415890305fc6cfd14ade8bee76779feba01f51c5446f40c14211654342c68ef0911859fa6e8e9ff0a718847bb44ee4156d03a19c9165df19ba91e09e1f0 git-2.49.0.tar.xz +829d7a5cb1cfc162eee2920cfcd09798af967657751a9040f18046c9537d0b7a7b314fb84edef1ebe4114cdabafb41253cff60709779ecf91cfa49cd7542f923 dont-test-other-encodings.patch +e8c63db09327ff01527f4d5f56185c602ef8cb10e2c24f0e3e02b567166ae226053fc1428263ddecd2708d89e6ea8d99d8bf4c1f19541b7a4d4c367898e1777f endian.patch 89528cdd14c51fd568aa61cf6c5eae08ea0844e59f9af9292da5fc6c268261f4166017d002d494400945e248df6b844e2f9f9cd2d9345d516983f5a110e4c42a git-daemon.initd -fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec git-daemon.confd -6d7cbb701584a078328056a67bfd32dde5795a80c0911734b38bd534699fb0165ac2b486b267c5c39b90bbb0d7c5ab0ab6ada1d068748865617326da28304eb4 disable-t2082-2.patch -9800318f9e6a8b6bfd8c700cce5cc326522a607b89236a868ef46940efe0566fdadf5d69dc3e72f989d61df66be8510b8989bd4ce3fc780f017f30652c7e9efa perl-getopt-long.patch" +fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec git-daemon.confd" diff --git a/system/git/disable-t2082-2.patch b/system/git/disable-t2082-2.patch deleted file mode 100644 index b18a9caa7..000000000 --- a/system/git/disable-t2082-2.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/t/t2082-parallel-checkout-attributes.sh 2021-11-24 19:29:21.000000000 +0000 -+++ b/t/t2082-parallel-checkout-attributes.sh 2022-01-12 17:29:58.890000000 +0000 -@@ -33,33 +33,6 @@ - ) - ' - --test_expect_success 'parallel-checkout with re-encoding' ' -- set_checkout_config 2 0 && -- git init encoding && -- ( -- cd encoding && -- echo text >utf8-text && -- write_utf16 <utf8-text >utf16-text && -- -- echo "A working-tree-encoding=UTF-16" >.gitattributes && -- cp utf16-text A && -- cp utf8-text B && -- git add A B .gitattributes && -- git commit -m encoding && -- -- # Check that A is stored in UTF-8 -- git cat-file -p :A >A.internal && -- test_cmp_bin utf8-text A.internal && -- -- rm A B && -- test_checkout_workers 2 git checkout A B && -- -- # Check that A (and only A) is re-encoded during checkout -- test_cmp_bin utf16-text A && -- test_cmp_bin utf8-text B -- ) --' -- - test_expect_success 'parallel-checkout with eol conversions' ' - set_checkout_config 2 0 && - git init eol && diff --git a/system/git/dont-test-other-encodings.patch b/system/git/dont-test-other-encodings.patch index fed4a6e21..d1c917821 100644 --- a/system/git/dont-test-other-encodings.patch +++ b/system/git/dont-test-other-encodings.patch @@ -1,18 +1,8 @@ We can't support Japanese people using musl ---- git-2.14.1/t/t5100-mailinfo.sh.old 2017-08-09 14:54:31.000000000 -0500 -+++ git-2.14.1/t/t5100-mailinfo.sh 2017-09-10 23:26:39.206126739 -0500 -@@ -27,6 +27,7 @@ - - for mail in 00* - do -+ if [ $mail == 0004 ]; then continue; fi - test_expect_success "mailinfo $mail" ' - check_mailinfo "$mail" "" && - if test -f "$DATA/msg$mail--scissors" --- git-2.14.1/t/t8005-blame-i18n.sh.old 2017-08-09 14:54:31.000000000 -0500 +++ git-2.14.1/t/t8005-blame-i18n.sh 2017-09-16 00:42:35.123728809 -0500 -@@ -24,43 +24,10 @@ +@@ -31,43 +31,10 @@ git commit --author "$SJIS_NAME <sjis@localhost>" -m "$SJIS_MSG" ' @@ -58,7 +48,7 @@ We can't support Japanese people using musl summary $UTF8_MSG --- git-2.21.0/t/t0028-working-tree-encoding.sh.old 2019-02-24 16:31:46.000000000 +0000 +++ git-2.21.0/t/t0028-working-tree-encoding.sh 2019-03-08 00:49:07.580000000 +0000 -@@ -51,14 +51,6 @@ +@@ -58,14 +58,6 @@ test_cmp_bin test.utf8.raw test.utf16.git ' @@ -73,17 +63,17 @@ We can't support Japanese people using musl test_expect_success 're-encode to UTF-16-LE-BOM on checkout' ' rm test.utf16lebom && git checkout test.utf16lebom && -@@ -123,41 +115,6 @@ - test_i18ngrep "fatal: BOM is required .* utf-${i}" err.out && - test_i18ngrep "use UTF-${i}BE or UTF-${i}LE" err.out +@@ -131,41 +123,6 @@ + test_grep "fatal: BOM is required .* utf-${i}" err.out && + test_grep "use UTF-${i}BE or UTF-${i}LE" err.out ' - - test_expect_success "eol conversion for UTF-${i} encoded files on checkout" ' - test_when_finished "rm -f crlf.utf${i}.raw lf.utf${i}.raw" && - test_when_finished "git reset --hard HEAD^" && - -- cat lf.utf8.raw | write_utf${i} >lf.utf${i}.raw && -- cat crlf.utf8.raw | write_utf${i} >crlf.utf${i}.raw && +- write_utf${i} <lf.utf8.raw >lf.utf${i}.raw && +- write_utf${i} <crlf.utf8.raw >crlf.utf${i}.raw && - cp crlf.utf${i}.raw eol.utf${i} && - - cat >expectIndexLF <<-EOF && diff --git a/system/git/endian.patch b/system/git/endian.patch new file mode 100644 index 000000000..83fa3e4f1 --- /dev/null +++ b/system/git/endian.patch @@ -0,0 +1,2305 @@ +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:36 +0200 +Subject: [PATCH v4 1/7] parse: fix off-by-one for minimum signed values +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +We accept a maximum value in `git_parse_signed()` that restricts the +range of accepted integers. As the intent is to pass `INT*_MAX` values +here, this maximum doesn't only act as the upper bound, but also as the +implicit lower bound of the accepted range. + +This lower bound is calculated by negating the maximum. But given that +the maximum value of a signed integer with N bits is `2^(N-1)-1` whereas +the minimum value is `-2^(N-1)` we have an off-by-one error in the lower +bound. + +Fix this off-by-one error by using `-max - 1` as lower bound instead. + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + parse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/parse.c b/parse.c +index 7a60a4f816c..3c47448ca67 100644 +--- a/parse.c ++++ b/parse.c +@@ -38,7 +38,7 @@ int git_parse_signed(const char *value, intmax_t *ret, intmax_t max) + errno = EINVAL; + return 0; + } +- if ((val < 0 && -max / factor > val) || ++ if ((val < 0 && (-max - 1) / factor > val) || + (val > 0 && max / factor < val)) { + errno = ERANGE; + return 0; + +-- +2.49.0.805.g082f7c87e0.dirty + + +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:37 +0200 +Subject: [PATCH v4 2/7] global: use designated initializers for options +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +While we expose macros for most of our different option types understood +by the "parse-options" subsystem, not every combination of fields that +has one as that would otherwise quickly lead to an explosion of macros. +Instead, we just initialize structures manually for those variants of +fields that don't have a macro. + +Callsites that open-code these structure initialization don't use +designated initializers though and instead just provide values for each +of the fields that they want to initialize. This has three significant +downsides: + + - Callsites need to specify all values up to the last field that they + care about. This often includes fields that should simply be left at + their default zero-initialized state, which adds distraction. + + - Any reader not deeply familiar with the layout of the structure + has a hard time figuring out what the respective initializers mean. + + - Reordering or introducing new fields in the middle of the structure + is impossible without adapting all callsites. + +Convert all sites to instead use designated initializers, which we have +started using in our codebase quite a while ago. This allows us to skip +any default-initialized fields, gives the reader context by specifying +the field names and allows us to reorder or introduce new fields where +we want to. + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + archive.c | 35 ++++++++--- + builtin/am.c | 28 ++++++--- + builtin/clone.c | 13 ++++- + builtin/commit-tree.c | 12 +++- + builtin/commit.c | 62 +++++++++++++++----- + builtin/config.c | 13 ++++- + builtin/describe.c | 24 ++++++-- + builtin/fetch.c | 10 +++- + builtin/fmt-merge-msg.c | 25 +++++--- + builtin/gc.c | 12 +++- + builtin/grep.c | 14 +++-- + builtin/init-db.c | 13 +++-- + builtin/ls-remote.c | 11 +++- + builtin/merge.c | 37 +++++++++--- + builtin/read-tree.c | 11 +++- + builtin/rebase.c | 25 ++++++-- + builtin/revert.c | 12 +++- + builtin/show-branch.c | 12 +++- + builtin/tag.c | 23 ++++++-- + builtin/update-index.c | 131 +++++++++++++++++++++++++++++------------- + builtin/write-tree.c | 12 ++-- + diff.c | 13 +++-- + ref-filter.h | 15 +++-- + t/helper/test-parse-options.c | 38 +++++++++--- + 24 files changed, 443 insertions(+), 158 deletions(-) + +diff --git a/archive.c b/archive.c +index 8be4e7ac8db..67bba3cd301 100644 +--- a/archive.c ++++ b/archive.c +@@ -650,20 +650,37 @@ static int parse_archive_args(int argc, const char **argv, + OPT_STRING(0, "format", &format, N_("fmt"), N_("archive format")), + OPT_STRING(0, "prefix", &base, N_("prefix"), + N_("prepend prefix to each pathname in the archive")), +- { OPTION_CALLBACK, 0, "add-file", args, N_("file"), +- N_("add untracked file to archive"), 0, add_file_cb, +- (intptr_t)&base }, +- { OPTION_CALLBACK, 0, "add-virtual-file", args, +- N_("path:content"), N_("add untracked file to archive"), 0, +- add_file_cb, (intptr_t)&base }, ++ { ++ .type = OPTION_CALLBACK, ++ .long_name = "add-file", ++ .value = args, ++ .argh = N_("file"), ++ .help = N_("add untracked file to archive"), ++ .callback = add_file_cb, ++ .defval = (intptr_t) &base, ++ }, ++ { ++ .type = OPTION_CALLBACK, ++ .long_name = "add-virtual-file", ++ .value = args, ++ .argh = N_("path:content"), ++ .help = N_("add untracked file to archive"), ++ .callback = add_file_cb, ++ .defval = (intptr_t) &base, ++ }, + OPT_STRING('o', "output", &output, N_("file"), + N_("write the archive to this file")), + OPT_BOOL(0, "worktree-attributes", &worktree_attributes, + N_("read .gitattributes in working directory")), + OPT__VERBOSE(&verbose, N_("report archived files on stderr")), +- { OPTION_STRING, 0, "mtime", &mtime_option, N_("time"), +- N_("set modification time of archive entries"), +- PARSE_OPT_NONEG }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "mtime", ++ .value = &mtime_option, ++ .argh = N_("time"), ++ .help = N_("set modification time of archive entries"), ++ .flags = PARSE_OPT_NONEG, ++ }, + OPT_NUMBER_CALLBACK(&compression_level, + N_("set compression level"), number_callback), + OPT_GROUP(""), +diff --git a/builtin/am.c b/builtin/am.c +index 3b61bd4c333..4afb519830f 100644 +--- a/builtin/am.c ++++ b/builtin/am.c +@@ -2399,11 +2399,16 @@ int cmd_am(int argc, + OPT_CMDMODE(0, "quit", &resume_mode, + N_("abort the patching operation but keep HEAD where it is"), + RESUME_QUIT), +- { OPTION_CALLBACK, 0, "show-current-patch", &resume_mode, +- "(diff|raw)", +- N_("show the patch being applied"), +- PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP, +- parse_opt_show_current_patch, RESUME_SHOW_PATCH_RAW }, ++ { ++ .type = OPTION_CALLBACK, ++ .long_name = "show-current-patch", ++ .value = &resume_mode, ++ .argh = "(diff|raw)", ++ .help = N_("show the patch being applied"), ++ .flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP, ++ .callback = parse_opt_show_current_patch, ++ .defval = RESUME_SHOW_PATCH_RAW, ++ }, + OPT_CMDMODE(0, "retry", &resume_mode, + N_("try to apply current patch again"), + RESUME_APPLY), +@@ -2416,9 +2421,16 @@ int cmd_am(int argc, + OPT_BOOL(0, "ignore-date", &state.ignore_date, + N_("use current timestamp for author date")), + OPT_RERERE_AUTOUPDATE(&state.allow_rerere_autoupdate), +- { OPTION_STRING, 'S', "gpg-sign", &state.sign_commit, N_("key-id"), +- N_("GPG-sign commits"), +- PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'S', ++ .long_name = "gpg-sign", ++ .value = &state.sign_commit, ++ .argh = N_("key-id"), ++ .help = N_("GPG-sign commits"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "", ++ }, + OPT_CALLBACK_F(0, "empty", &state.empty_type, "(stop|drop|keep)", + N_("how to handle empty patches"), + PARSE_OPT_NONEG, am_option_parse_empty), +diff --git a/builtin/clone.c b/builtin/clone.c +index 88276e5b7ab..9c3547f41e3 100644 +--- a/builtin/clone.c ++++ b/builtin/clone.c +@@ -928,9 +928,16 @@ int cmd_clone(int argc, + N_("don't use local hardlinks, always copy")), + OPT_BOOL('s', "shared", &option_shared, + N_("setup as shared repository")), +- { OPTION_CALLBACK, 0, "recurse-submodules", &option_recurse_submodules, +- N_("pathspec"), N_("initialize submodules in the clone"), +- PARSE_OPT_OPTARG, recurse_submodules_cb, (intptr_t)"." }, ++ { ++ .type = OPTION_CALLBACK, ++ .long_name = "recurse-submodules", ++ .value = &option_recurse_submodules, ++ .argh = N_("pathspec"), ++ .help = N_("initialize submodules in the clone"), ++ .flags = PARSE_OPT_OPTARG, ++ .callback = recurse_submodules_cb, ++ .defval = (intptr_t)".", ++ }, + OPT_ALIAS(0, "recursive", "recurse-submodules"), + OPT_INTEGER('j', "jobs", &max_jobs, + N_("number of submodules cloned in parallel")), +diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c +index 38457600a4e..c787133d004 100644 +--- a/builtin/commit-tree.c ++++ b/builtin/commit-tree.c +@@ -111,8 +111,16 @@ int cmd_commit_tree(int argc, + OPT_CALLBACK_F('F', NULL, &buffer, N_("file"), + N_("read commit log message from file"), PARSE_OPT_NONEG, + parse_file_arg_callback), +- { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"), +- N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'S', ++ .long_name = "gpg-sign", ++ .value = &sign_commit, ++ .argh = N_("key-id"), ++ .help = N_("GPG sign commit"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "", ++ }, + OPT_END() + }; + int ret; +diff --git a/builtin/commit.c b/builtin/commit.c +index 2f459682221..66bd91fd523 100644 +--- a/builtin/commit.c ++++ b/builtin/commit.c +@@ -1542,17 +1542,34 @@ struct repository *repo UNUSED) + STATUS_FORMAT_LONG), + OPT_BOOL('z', "null", &s.null_termination, + N_("terminate entries with NUL")), +- { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, +- N_("mode"), +- N_("show untracked files, optional modes: all, normal, no. (Default: all)"), +- PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, +- { OPTION_STRING, 0, "ignored", &ignored_arg, +- N_("mode"), +- N_("show ignored files, optional modes: traditional, matching, no. (Default: traditional)"), +- PARSE_OPT_OPTARG, NULL, (intptr_t)"traditional" }, +- { OPTION_STRING, 0, "ignore-submodules", &ignore_submodule_arg, N_("when"), +- N_("ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)"), +- PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'u', ++ .long_name = "untracked-files", ++ .value = &untracked_files_arg, ++ .argh = N_("mode"), ++ .help = N_("show untracked files, optional modes: all, normal, no. (Default: all)"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t)"all", ++ }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "ignored", ++ .value = &ignored_arg, ++ .argh = N_("mode"), ++ .help = N_("show ignored files, optional modes: traditional, matching, no. (Default: traditional)"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t)"traditional", ++ }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "ignore-submodules", ++ .value = &ignore_submodule_arg, ++ .argh = N_("when"), ++ .help = N_("ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t)"all", ++ }, + OPT_COLUMN(0, "column", &s.colopts, N_("list untracked files in columns")), + OPT_BOOL(0, "no-renames", &no_renames, N_("do not detect renames")), + OPT_CALLBACK_F('M', "find-renames", &rename_score_arg, +@@ -1688,8 +1705,16 @@ int cmd_commit(int argc, + OPT_BOOL('e', "edit", &edit_flag, N_("force edit of commit")), + OPT_CLEANUP(&cleanup_arg), + OPT_BOOL(0, "status", &include_status, N_("include status in commit message template")), +- { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"), +- N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'S', ++ .long_name = "gpg-sign", ++ .value = &sign_commit, ++ .argh = N_("key-id"), ++ .help = N_("GPG sign commit"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "", ++ }, + /* end commit message options */ + + OPT_GROUP(N_("Commit contents options")), +@@ -1714,7 +1739,16 @@ int cmd_commit(int argc, + N_("terminate entries with NUL")), + OPT_BOOL(0, "amend", &amend, N_("amend previous commit")), + OPT_BOOL(0, "no-post-rewrite", &no_post_rewrite, N_("bypass post-rewrite hook")), +- { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, N_("mode"), N_("show untracked files, optional modes: all, normal, no. (Default: all)"), PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'u', ++ .long_name = "untracked-files", ++ .value = &untracked_files_arg, ++ .argh = N_("mode"), ++ .help = N_("show untracked files, optional modes: all, normal, no. (Default: all)"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t)"all", ++ }, + OPT_PATHSPEC_FROM_FILE(&pathspec_from_file), + OPT_PATHSPEC_FILE_NUL(&pathspec_file_nul), + /* end commit contents options */ +diff --git a/builtin/config.c b/builtin/config.c +index 53a90094e31..f70d6354772 100644 +--- a/builtin/config.c ++++ b/builtin/config.c +@@ -131,9 +131,16 @@ struct config_display_options { + #define TYPE_COLOR 6 + #define TYPE_BOOL_OR_STR 7 + +-#define OPT_CALLBACK_VALUE(s, l, v, h, i) \ +- { OPTION_CALLBACK, (s), (l), (v), NULL, (h), PARSE_OPT_NOARG | \ +- PARSE_OPT_NONEG, option_parse_type, (i) } ++#define OPT_CALLBACK_VALUE(s, l, v, h, i) { \ ++ .type = OPTION_CALLBACK, \ ++ .short_name = (s), \ ++ .long_name = (l), \ ++ .value = (v), \ ++ .help = (h), \ ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, \ ++ .callback = option_parse_type, \ ++ .defval = (i), \ ++} + + static int option_parse_type(const struct option *opt, const char *arg, + int unset) +diff --git a/builtin/describe.c b/builtin/describe.c +index e2e73f3d757..2da9f4fed01 100644 +--- a/builtin/describe.c ++++ b/builtin/describe.c +@@ -601,12 +601,24 @@ int cmd_describe(int argc, + N_("do not consider tags matching <pattern>")), + OPT_BOOL(0, "always", &always, + N_("show abbreviated commit object as fallback")), +- {OPTION_STRING, 0, "dirty", &dirty, N_("mark"), +- N_("append <mark> on dirty working tree (default: \"-dirty\")"), +- PARSE_OPT_OPTARG, NULL, (intptr_t) "-dirty"}, +- {OPTION_STRING, 0, "broken", &broken, N_("mark"), +- N_("append <mark> on broken working tree (default: \"-broken\")"), +- PARSE_OPT_OPTARG, NULL, (intptr_t) "-broken"}, ++ { ++ .type = OPTION_STRING, ++ .long_name = "dirty", ++ .value = &dirty, ++ .argh = N_("mark"), ++ .help = N_("append <mark> on dirty working tree (default: \"-dirty\")"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "-dirty", ++ }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "broken", ++ .value = &broken, ++ .argh = N_("mark"), ++ .help = N_("append <mark> on broken working tree (default: \"-broken\")"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "-broken", ++ }, + OPT_END(), + }; + +diff --git a/builtin/fetch.c b/builtin/fetch.c +index 02af5054690..3a5159d9e69 100644 +--- a/builtin/fetch.c ++++ b/builtin/fetch.c +@@ -2367,8 +2367,14 @@ int cmd_fetch(int argc, + OPT_SET_INT_F(0, "refetch", &refetch, + N_("re-fetch without negotiating common commits"), + 1, PARSE_OPT_NONEG), +- { OPTION_STRING, 0, "submodule-prefix", &submodule_prefix, N_("dir"), +- N_("prepend this to submodule path output"), PARSE_OPT_HIDDEN }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "submodule-prefix", ++ .value = &submodule_prefix, ++ .argh = N_("dir"), ++ .help = N_("prepend this to submodule path output"), ++ .flags = PARSE_OPT_HIDDEN, ++ }, + OPT_CALLBACK_F(0, "recurse-submodules-default", + &recurse_submodules_default, N_("on-demand"), + N_("default for recursive fetching of submodules " +diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c +index 189cd1096a0..240cdb474bc 100644 +--- a/builtin/fmt-merge-msg.c ++++ b/builtin/fmt-merge-msg.c +@@ -20,13 +20,24 @@ int cmd_fmt_merge_msg(int argc, + char *into_name = NULL; + int shortlog_len = -1; + struct option options[] = { +- { OPTION_INTEGER, 0, "log", &shortlog_len, N_("n"), +- N_("populate log with at most <n> entries from shortlog"), +- PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN }, +- { OPTION_INTEGER, 0, "summary", &shortlog_len, N_("n"), +- N_("alias for --log (deprecated)"), +- PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, NULL, +- DEFAULT_MERGE_LOG_LEN }, ++ { ++ .type = OPTION_INTEGER, ++ .long_name = "log", ++ .value = &shortlog_len, ++ .argh = N_("n"), ++ .help = N_("populate log with at most <n> entries from shortlog"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = DEFAULT_MERGE_LOG_LEN, ++ }, ++ { ++ .type = OPTION_INTEGER, ++ .long_name = "summary", ++ .value = &shortlog_len, ++ .argh = N_("n"), ++ .help = N_("alias for --log (deprecated)"), ++ .flags = PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, ++ .defval = DEFAULT_MERGE_LOG_LEN, ++ }, + OPT_STRING('m', "message", &message, N_("text"), + N_("use <text> as start of message")), + OPT_STRING(0, "into-name", &into_name, N_("name"), +diff --git a/builtin/gc.c b/builtin/gc.c +index 99431fd4674..6707a26bc6e 100644 +--- a/builtin/gc.c ++++ b/builtin/gc.c +@@ -699,9 +699,15 @@ struct repository *repo UNUSED) + int ret; + struct option builtin_gc_options[] = { + OPT__QUIET(&quiet, N_("suppress progress reporting")), +- { OPTION_STRING, 0, "prune", &prune_expire_arg, N_("date"), +- N_("prune unreferenced objects"), +- PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire_arg }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "prune", ++ .value = &prune_expire_arg, ++ .argh = N_("date"), ++ .help = N_("prune unreferenced objects"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t)prune_expire_arg, ++ }, + OPT_BOOL(0, "cruft", &cfg.cruft_packs, N_("pack unreferenced objects separately")), + OPT_MAGNITUDE(0, "max-cruft-size", &cfg.max_cruft_size, + N_("with --cruft, limit the size of new cruft packs")), +diff --git a/builtin/grep.c b/builtin/grep.c +index d1427290f77..c4869733e1b 100644 +--- a/builtin/grep.c ++++ b/builtin/grep.c +@@ -1017,10 +1017,16 @@ int cmd_grep(int argc, + OPT_BOOL(0, "all-match", &opt.all_match, + N_("show only matches from files that match all patterns")), + OPT_GROUP(""), +- { OPTION_STRING, 'O', "open-files-in-pager", &show_in_pager, +- N_("pager"), N_("show matching files in the pager"), +- PARSE_OPT_OPTARG | PARSE_OPT_NOCOMPLETE, +- NULL, (intptr_t)default_pager }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'O', ++ .long_name = "open-files-in-pager", ++ .value = &show_in_pager, ++ .argh = N_("pager"), ++ .help = N_("show matching files in the pager"), ++ .flags = PARSE_OPT_OPTARG | PARSE_OPT_NOCOMPLETE, ++ .defval = (intptr_t)default_pager, ++ }, + OPT_BOOL_F(0, "ext-grep", &external_grep_allowed__ignored, + N_("allow calling of grep(1) (ignored by this build)"), + PARSE_OPT_NOCOMPLETE), +diff --git a/builtin/init-db.c b/builtin/init-db.c +index 196dccdd77a..4a950e44d8d 100644 +--- a/builtin/init-db.c ++++ b/builtin/init-db.c +@@ -93,10 +93,15 @@ int cmd_init_db(int argc, + N_("directory from which templates will be used")), + OPT_SET_INT(0, "bare", &is_bare_repository_cfg, + N_("create a bare repository"), 1), +- { OPTION_CALLBACK, 0, "shared", &init_shared_repository, +- N_("permissions"), +- N_("specify that the git repository is to be shared amongst several users"), +- PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0}, ++ { ++ .type = OPTION_CALLBACK, ++ .long_name = "shared", ++ .value = &init_shared_repository, ++ .argh = N_("permissions"), ++ .help = N_("specify that the git repository is to be shared amongst several users"), ++ .flags = PARSE_OPT_OPTARG | PARSE_OPT_NONEG, ++ .callback = shared_callback ++ }, + OPT_BIT('q', "quiet", &flags, N_("be quiet"), INIT_DB_QUIET), + OPT_STRING(0, "separate-git-dir", &real_git_dir, N_("gitdir"), + N_("separate git dir from working tree")), +diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c +index 42f34e12361..01a4d4daa1f 100644 +--- a/builtin/ls-remote.c ++++ b/builtin/ls-remote.c +@@ -67,9 +67,14 @@ int cmd_ls_remote(int argc, + OPT__QUIET(&quiet, N_("do not print remote URL")), + OPT_STRING(0, "upload-pack", &uploadpack, N_("exec"), + N_("path of git-upload-pack on the remote host")), +- { OPTION_STRING, 0, "exec", &uploadpack, N_("exec"), +- N_("path of git-upload-pack on the remote host"), +- PARSE_OPT_HIDDEN }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "exec", ++ .value = &uploadpack, ++ .argh = N_("exec"), ++ .help = N_("path of git-upload-pack on the remote host"), ++ .flags = PARSE_OPT_HIDDEN, ++ }, + OPT_BIT('t', "tags", &flags, N_("limit to tags"), REF_TAGS), + OPT_BIT('b', "branches", &flags, N_("limit to branches"), REF_BRANCHES), + OPT_BIT_F('h', "heads", &flags, +diff --git a/builtin/merge.c b/builtin/merge.c +index ba9faf126aa..21787d45165 100644 +--- a/builtin/merge.c ++++ b/builtin/merge.c +@@ -250,9 +250,15 @@ static struct option builtin_merge_options[] = { + OPT_BOOL(0, "stat", &show_diffstat, + N_("show a diffstat at the end of the merge")), + OPT_BOOL(0, "summary", &show_diffstat, N_("(synonym to --stat)")), +- { OPTION_INTEGER, 0, "log", &shortlog_len, N_("n"), +- N_("add (at most <n>) entries from shortlog to merge commit message"), +- PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN }, ++ { ++ .type = OPTION_INTEGER, ++ .long_name = "log", ++ .value = &shortlog_len, ++ .argh = N_("n"), ++ .help = N_("add (at most <n>) entries from shortlog to merge commit message"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = DEFAULT_MERGE_LOG_LEN, ++ }, + OPT_BOOL(0, "squash", &squash, + N_("create a single commit instead of doing a merge")), + OPT_BOOL(0, "commit", &option_commit, +@@ -274,9 +280,16 @@ static struct option builtin_merge_options[] = { + OPT_CALLBACK('m', "message", &merge_msg, N_("message"), + N_("merge commit message (for a non-fast-forward merge)"), + option_parse_message), +- { OPTION_LOWLEVEL_CALLBACK, 'F', "file", &merge_msg, N_("path"), +- N_("read message from file"), PARSE_OPT_NONEG, +- NULL, 0, option_read_message }, ++ { ++ .type = OPTION_LOWLEVEL_CALLBACK, ++ .short_name = 'F', ++ .long_name = "file", ++ .value = &merge_msg, ++ .argh = N_("path"), ++ .help = N_("read message from file"), ++ .flags = PARSE_OPT_NONEG, ++ .ll_callback = option_read_message, ++ }, + OPT_STRING(0, "into-name", &into_name, N_("name"), + N_("use <name> instead of the real target")), + OPT__VERBOSITY(&verbosity), +@@ -289,8 +302,16 @@ static struct option builtin_merge_options[] = { + OPT_BOOL(0, "allow-unrelated-histories", &allow_unrelated_histories, + N_("allow merging unrelated histories")), + OPT_SET_INT(0, "progress", &show_progress, N_("force progress reporting"), 1), +- { OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"), +- N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'S', ++ .long_name = "gpg-sign", ++ .value = &sign_commit, ++ .argh = N_("key-id"), ++ .help = N_("GPG sign commit"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "", ++ }, + OPT_AUTOSTASH(&autostash), + OPT_BOOL(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")), + OPT_BOOL(0, "signoff", &signoff, N_("add a Signed-off-by trailer")), +diff --git a/builtin/read-tree.c b/builtin/read-tree.c +index d2a807a828b..a8f352f7cd9 100644 +--- a/builtin/read-tree.c ++++ b/builtin/read-tree.c +@@ -135,9 +135,14 @@ int cmd_read_tree(int argc, + N_("3-way merge in presence of adds and removes")), + OPT_BOOL(0, "reset", &opts.reset, + N_("same as -m, but discard unmerged entries")), +- { OPTION_STRING, 0, "prefix", &opts.prefix, N_("<subdirectory>/"), +- N_("read the tree into the index under <subdirectory>/"), +- PARSE_OPT_NONEG }, ++ { ++ .type = OPTION_STRING, ++ .long_name = "prefix", ++ .value = &opts.prefix, ++ .argh = N_("<subdirectory>/"), ++ .help = N_("read the tree into the index under <subdirectory>/"), ++ .flags = PARSE_OPT_NONEG, ++ }, + OPT_BOOL('u', NULL, &opts.update, + N_("update working tree with merge result")), + OPT_CALLBACK_F(0, "exclude-per-directory", &opts, +diff --git a/builtin/rebase.c b/builtin/rebase.c +index d4715ed35d7..d4083350090 100644 +--- a/builtin/rebase.c ++++ b/builtin/rebase.c +@@ -1122,9 +1122,15 @@ int cmd_rebase(int argc, + OPT_BIT('v', "verbose", &options.flags, + N_("display a diffstat of what changed upstream"), + REBASE_NO_QUIET | REBASE_VERBOSE | REBASE_DIFFSTAT), +- {OPTION_NEGBIT, 'n', "no-stat", &options.flags, NULL, +- N_("do not show diffstat of what changed upstream"), +- PARSE_OPT_NOARG, NULL, REBASE_DIFFSTAT }, ++ { ++ .type = OPTION_NEGBIT, ++ .short_name = 'n', ++ .long_name = "no-stat", ++ .value = &options.flags, ++ .help = N_("do not show diffstat of what changed upstream"), ++ .flags = PARSE_OPT_NOARG, ++ .defval = REBASE_DIFFSTAT, ++ }, + OPT_BOOL(0, "signoff", &options.signoff, + N_("add a Signed-off-by trailer to each commit")), + OPT_BOOL(0, "committer-date-is-author-date", +@@ -1190,9 +1196,16 @@ int cmd_rebase(int argc, + OPT_BOOL(0, "update-refs", &options.update_refs, + N_("update branches that point to commits " + "that are being rebased")), +- { OPTION_STRING, 'S', "gpg-sign", &gpg_sign, N_("key-id"), +- N_("GPG-sign commits"), +- PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'S', ++ .long_name = "gpg-sign", ++ .value = &gpg_sign, ++ .argh = N_("key-id"), ++ .help = N_("GPG-sign commits"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "", ++ }, + OPT_AUTOSTASH(&options.autostash), + OPT_STRING_LIST('x', "exec", &options.exec, N_("exec"), + N_("add exec lines after each commit of the " +diff --git a/builtin/revert.c b/builtin/revert.c +index aca6c293cdf..4f5ef975494 100644 +--- a/builtin/revert.c ++++ b/builtin/revert.c +@@ -132,8 +132,16 @@ static int run_sequencer(int argc, const char **argv, const char *prefix, + OPT_STRING(0, "strategy", &strategy, N_("strategy"), N_("merge strategy")), + OPT_STRVEC('X', "strategy-option", &opts->xopts, N_("option"), + N_("option for merge strategy")), +- { OPTION_STRING, 'S', "gpg-sign", &gpg_sign, N_("key-id"), +- N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, ++ { ++ .type = OPTION_STRING, ++ .short_name = 'S', ++ .long_name = "gpg-sign", ++ .value = &gpg_sign, ++ .argh = N_("key-id"), ++ .help = N_("GPG sign commit"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = (intptr_t) "", ++ }, + OPT_END() + }; + struct option *options = base_options; +diff --git a/builtin/show-branch.c b/builtin/show-branch.c +index fce6b404e92..dab37019d29 100644 +--- a/builtin/show-branch.c ++++ b/builtin/show-branch.c +@@ -667,9 +667,15 @@ int cmd_show_branch(int ac, + N_("show remote-tracking branches")), + OPT__COLOR(&showbranch_use_color, + N_("color '*!+-' corresponding to the branch")), +- { OPTION_INTEGER, 0, "more", &extra, N_("n"), +- N_("show <n> more commits after the common ancestor"), +- PARSE_OPT_OPTARG, NULL, (intptr_t)1 }, ++ { ++ .type = OPTION_INTEGER, ++ .long_name = "more", ++ .value = &extra, ++ .argh = N_("n"), ++ .help = N_("show <n> more commits after the common ancestor"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = 1, ++ }, + OPT_SET_INT(0, "list", &extra, N_("synonym to more=-1"), -1), + OPT_BOOL(0, "no-name", &no_name, N_("suppress naming strings")), + OPT_BOOL(0, "current", &with_current_branch, +diff --git a/builtin/tag.c b/builtin/tag.c +index d3e0943b734..b266f12bb48 100644 +--- a/builtin/tag.c ++++ b/builtin/tag.c +@@ -479,9 +479,15 @@ int cmd_tag(int argc, + int edit_flag = 0; + struct option options[] = { + OPT_CMDMODE('l', "list", &cmdmode, N_("list tag names"), 'l'), +- { OPTION_INTEGER, 'n', NULL, &filter.lines, N_("n"), +- N_("print <n> lines of each tag message"), +- PARSE_OPT_OPTARG, NULL, 1 }, ++ { ++ .type = OPTION_INTEGER, ++ .short_name = 'n', ++ .value = &filter.lines, ++ .argh = N_("n"), ++ .help = N_("print <n> lines of each tag message"), ++ .flags = PARSE_OPT_OPTARG, ++ .defval = 1, ++ }, + OPT_CMDMODE('d', "delete", &cmdmode, N_("delete tags"), 'd'), + OPT_CMDMODE('v', "verify", &cmdmode, N_("verify tags"), 'v'), + +@@ -513,9 +519,14 @@ int cmd_tag(int argc, + N_("do not output a newline after empty formatted refs")), + OPT_REF_SORT(&sorting_options), + { +- OPTION_CALLBACK, 0, "points-at", &filter.points_at, N_("object"), +- N_("print only tags of the object"), PARSE_OPT_LASTARG_DEFAULT, +- parse_opt_object_name, (intptr_t) "HEAD" ++ .type = OPTION_CALLBACK, ++ .long_name = "points-at", ++ .value = &filter.points_at, ++ .argh = N_("object"), ++ .help = N_("print only tags of the object"), ++ .flags = PARSE_OPT_LASTARG_DEFAULT, ++ .callback = parse_opt_object_name, ++ .defval = (intptr_t) "HEAD", + }, + OPT_STRING( 0 , "format", &format.format, N_("format"), + N_("format to use for the output")), +diff --git a/builtin/update-index.c b/builtin/update-index.c +index b2f6b1a3fbb..ee64b022679 100644 +--- a/builtin/update-index.c ++++ b/builtin/update-index.c +@@ -964,29 +964,51 @@ int cmd_update_index(int argc, + N_("like --refresh, but ignore assume-unchanged setting"), + PARSE_OPT_NOARG | PARSE_OPT_NONEG, + really_refresh_callback), +- {OPTION_LOWLEVEL_CALLBACK, 0, "cacheinfo", NULL, +- N_("<mode>,<object>,<path>"), +- N_("add the specified entry to the index"), +- PARSE_OPT_NOARG | /* disallow --cacheinfo=<mode> form */ +- PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP, +- NULL, 0, +- cacheinfo_callback}, ++ { ++ .type = OPTION_LOWLEVEL_CALLBACK, ++ .long_name = "cacheinfo", ++ .argh = N_("<mode>,<object>,<path>"), ++ .help = N_("add the specified entry to the index"), ++ .flags = PARSE_OPT_NOARG | /* disallow --cacheinfo=<mode> form */ ++ PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP, ++ .ll_callback = cacheinfo_callback, ++ }, + OPT_CALLBACK_F(0, "chmod", &set_executable_bit, "(+|-)x", + N_("override the executable bit of the listed files"), + PARSE_OPT_NONEG, + chmod_callback), +- {OPTION_SET_INT, 0, "assume-unchanged", &mark_valid_only, NULL, +- N_("mark files as \"not changing\""), +- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG}, +- {OPTION_SET_INT, 0, "no-assume-unchanged", &mark_valid_only, NULL, +- N_("clear assumed-unchanged bit"), +- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG}, +- {OPTION_SET_INT, 0, "skip-worktree", &mark_skip_worktree_only, NULL, +- N_("mark files as \"index-only\""), +- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG}, +- {OPTION_SET_INT, 0, "no-skip-worktree", &mark_skip_worktree_only, NULL, +- N_("clear skip-worktree bit"), +- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG}, ++ { ++ .type = OPTION_SET_INT, ++ .long_name = "assume-unchanged", ++ .value = &mark_valid_only, ++ .help = N_("mark files as \"not changing\""), ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = MARK_FLAG, ++ }, ++ { ++ .type = OPTION_SET_INT, ++ .long_name = "no-assume-unchanged", ++ .value = &mark_valid_only, ++ .help = N_("clear assumed-unchanged bit"), ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = UNMARK_FLAG, ++ }, ++ { ++ .type = OPTION_SET_INT, ++ .long_name = "skip-worktree", ++ .value = &mark_skip_worktree_only, ++ .help = N_("mark files as \"index-only\""), ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = MARK_FLAG, ++ }, ++ { ++ .type = OPTION_SET_INT, ++ .long_name = "no-skip-worktree", ++ .value = &mark_skip_worktree_only, ++ .help = N_("clear skip-worktree bit"), ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = UNMARK_FLAG, ++ }, + OPT_BOOL(0, "ignore-skip-worktree-entries", &ignore_skip_worktree_entries, + N_("do not touch index-only entries")), + OPT_SET_INT(0, "info-only", &info_only, +@@ -995,22 +1017,39 @@ int cmd_update_index(int argc, + N_("remove named paths even if present in worktree"), 1), + OPT_BOOL('z', NULL, &nul_term_line, + N_("with --stdin: input lines are terminated by null bytes")), +- {OPTION_LOWLEVEL_CALLBACK, 0, "stdin", &read_from_stdin, NULL, +- N_("read list of paths to be updated from standard input"), +- PARSE_OPT_NONEG | PARSE_OPT_NOARG, +- NULL, 0, stdin_callback}, +- {OPTION_LOWLEVEL_CALLBACK, 0, "index-info", &nul_term_line, NULL, +- N_("add entries from standard input to the index"), +- PARSE_OPT_NONEG | PARSE_OPT_NOARG, +- NULL, 0, stdin_cacheinfo_callback}, +- {OPTION_LOWLEVEL_CALLBACK, 0, "unresolve", &has_errors, NULL, +- N_("repopulate stages #2 and #3 for the listed paths"), +- PARSE_OPT_NONEG | PARSE_OPT_NOARG, +- NULL, 0, unresolve_callback}, +- {OPTION_LOWLEVEL_CALLBACK, 'g', "again", &has_errors, NULL, +- N_("only update entries that differ from HEAD"), +- PARSE_OPT_NONEG | PARSE_OPT_NOARG, +- NULL, 0, reupdate_callback}, ++ { ++ .type = OPTION_LOWLEVEL_CALLBACK, ++ .long_name = "stdin", ++ .value = &read_from_stdin, ++ .help = N_("read list of paths to be updated from standard input"), ++ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG, ++ .ll_callback = stdin_callback, ++ }, ++ { ++ .type = OPTION_LOWLEVEL_CALLBACK, ++ .long_name = "index-info", ++ .value = &nul_term_line, ++ .help = N_("add entries from standard input to the index"), ++ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG, ++ .ll_callback = stdin_cacheinfo_callback, ++ }, ++ { ++ .type = OPTION_LOWLEVEL_CALLBACK, ++ .long_name = "unresolve", ++ .value = &has_errors, ++ .help = N_("repopulate stages #2 and #3 for the listed paths"), ++ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG, ++ .ll_callback = unresolve_callback, ++ }, ++ { ++ .type = OPTION_LOWLEVEL_CALLBACK, ++ .short_name = 'g', ++ .long_name = "again", ++ .value = &has_errors, ++ .help = N_("only update entries that differ from HEAD"), ++ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG, ++ .ll_callback = reupdate_callback, ++ }, + OPT_BIT(0, "ignore-missing", &refresh_args.flags, + N_("ignore files missing from worktree"), + REFRESH_IGNORE_MISSING), +@@ -1036,12 +1075,22 @@ int cmd_update_index(int argc, + N_("write out the index even if is not flagged as changed"), 1), + OPT_BOOL(0, "fsmonitor", &fsmonitor, + N_("enable or disable file system monitor")), +- {OPTION_SET_INT, 0, "fsmonitor-valid", &mark_fsmonitor_only, NULL, +- N_("mark files as fsmonitor valid"), +- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG}, +- {OPTION_SET_INT, 0, "no-fsmonitor-valid", &mark_fsmonitor_only, NULL, +- N_("clear fsmonitor valid bit"), +- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG}, ++ { ++ .type = OPTION_SET_INT, ++ .long_name = "fsmonitor-valid", ++ .value = &mark_fsmonitor_only, ++ .help = N_("mark files as fsmonitor valid"), ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = MARK_FLAG, ++ }, ++ { ++ .type = OPTION_SET_INT, ++ .long_name = "no-fsmonitor-valid", ++ .value = &mark_fsmonitor_only, ++ .help = N_("clear fsmonitor valid bit"), ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = UNMARK_FLAG, ++ }, + OPT_END() + }; + +diff --git a/builtin/write-tree.c b/builtin/write-tree.c +index 43f233e69b0..5a8dc377ec0 100644 +--- a/builtin/write-tree.c ++++ b/builtin/write-tree.c +@@ -31,10 +31,14 @@ int cmd_write_tree(int argc, + WRITE_TREE_MISSING_OK), + OPT_STRING(0, "prefix", &tree_prefix, N_("<prefix>/"), + N_("write tree object for a subdirectory <prefix>")), +- { OPTION_BIT, 0, "ignore-cache-tree", &flags, NULL, +- N_("only useful for debugging"), +- PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, NULL, +- WRITE_TREE_IGNORE_CACHE_TREE }, ++ { ++ .type = OPTION_BIT, ++ .long_name = "ignore-cache-tree", ++ .value = &flags, ++ .help = N_("only useful for debugging"), ++ .flags = PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, ++ .defval = WRITE_TREE_IGNORE_CACHE_TREE, ++ }, + OPT_END() + }; + +diff --git a/diff.c b/diff.c +index 08f5e00a2cc..f2fcc7f3c22 100644 +--- a/diff.c ++++ b/diff.c +@@ -5892,10 +5892,15 @@ struct option *add_diff_options(const struct option *opts, + OPT_CALLBACK_F(0, "diff-filter", options, N_("[(A|C|D|M|R|T|U|X|B)...[*]]"), + N_("select files by diff type"), + PARSE_OPT_NONEG, diff_opt_diff_filter), +- { OPTION_CALLBACK, 0, "output", options, N_("<file>"), +- N_("output to a specific file"), +- PARSE_OPT_NONEG, NULL, 0, diff_opt_output }, +- ++ { ++ .type = OPTION_CALLBACK, ++ .long_name = "output", ++ .value = options, ++ .argh = N_("<file>"), ++ .help = N_("output to a specific file"), ++ .flags = PARSE_OPT_NONEG, ++ .ll_callback = diff_opt_output, ++ }, + OPT_END() + }; + +diff --git a/ref-filter.h b/ref-filter.h +index 013d4cfa64b..c98c4fbd4c1 100644 +--- a/ref-filter.h ++++ b/ref-filter.h +@@ -114,11 +114,16 @@ struct ref_format { + } + + /* Macros for checking --merged and --no-merged options */ +-#define _OPT_MERGED_NO_MERGED(option, filter, h) \ +- { OPTION_CALLBACK, 0, option, (filter), N_("commit"), (h), \ +- PARSE_OPT_LASTARG_DEFAULT | PARSE_OPT_NONEG, \ +- parse_opt_merge_filter, (intptr_t) "HEAD" \ +- } ++#define _OPT_MERGED_NO_MERGED(option, filter, h) { \ ++ .type = OPTION_CALLBACK, \ ++ .long_name = option, \ ++ .value = (filter), \ ++ .argh = N_("commit"), \ ++ .help = (h), \ ++ .flags = PARSE_OPT_LASTARG_DEFAULT | PARSE_OPT_NONEG, \ ++ .callback = parse_opt_merge_filter, \ ++ .defval = (intptr_t) "HEAD", \ ++} + #define OPT_MERGED(f, h) _OPT_MERGED_NO_MERGED("merged", f, h) + #define OPT_NO_MERGED(f, h) _OPT_MERGED_NO_MERGED("no-merged", f, h) + +diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c +index bfe45ec68b0..997f55fd45b 100644 +--- a/t/helper/test-parse-options.c ++++ b/t/helper/test-parse-options.c +@@ -124,8 +124,15 @@ int cmd__parse_options(int argc, const char **argv) + struct option options[] = { + OPT_BOOL(0, "yes", &boolean, "get a boolean"), + OPT_BOOL('D', "no-doubt", &boolean, "begins with 'no-'"), +- { OPTION_SET_INT, 'B', "no-fear", &boolean, NULL, +- "be brave", PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1 }, ++ { ++ .type = OPTION_SET_INT, ++ .short_name = 'B', ++ .long_name = "no-fear", ++ .value = &boolean, ++ .help = "be brave", ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ .defval = 1, ++ }, + OPT_COUNTUP('b', "boolean", &boolean, "increment by one"), + OPT_BIT('4', "or4", &boolean, + "bitwise-or boolean with ...0100", 4), +@@ -155,12 +162,27 @@ int cmd__parse_options(int argc, const char **argv) + OPT_GROUP("Magic arguments"), + OPT_NUMBER_CALLBACK(&integer, "set integer to NUM", + number_callback), +- { OPTION_COUNTUP, '+', NULL, &boolean, NULL, "same as -b", +- PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH }, +- { OPTION_COUNTUP, 0, "ambiguous", &ambiguous, NULL, +- "positive ambiguity", PARSE_OPT_NOARG | PARSE_OPT_NONEG }, +- { OPTION_COUNTUP, 0, "no-ambiguous", &ambiguous, NULL, +- "negative ambiguity", PARSE_OPT_NOARG | PARSE_OPT_NONEG }, ++ { ++ .type = OPTION_COUNTUP, ++ .short_name = '+', ++ .value = &boolean, ++ .help = "same as -b", ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH, ++ }, ++ { ++ .type = OPTION_COUNTUP, ++ .long_name = "ambiguous", ++ .value = &ambiguous, ++ .help = "positive ambiguity", ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ }, ++ { ++ .type = OPTION_COUNTUP, ++ .long_name = "no-ambiguous", ++ .value = &ambiguous, ++ .help = "negative ambiguity", ++ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG, ++ }, + OPT_GROUP("Standard options"), + OPT__ABBREV(&abbrev), + OPT__VERBOSE(&verbose, "be verbose"), + +-- +2.49.0.805.g082f7c87e0.dirty + + +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:38 +0200 +Subject: [PATCH v4 3/7] parse-options: support unit factors in + `OPT_INTEGER()` +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +There are two main differences between `OPT_INTEGER()` and +`OPT_MAGNITUDE()`: + + - The former parses signed integers whereas the latter parses unsigned + integers. + + - The latter parses unit factors like 'k', 'm' or 'g'. + +While the first difference makes obvious sense, there isn't really a +good reason why signed integers shouldn't support unit factors, too. + +This inconsistency will also become a bit of a problem with subsequent +commits, where we will fix a couple of callsites that pass an unsigned +integer to `OPT_INTEGER()`. There are three options: + + - We could adapt those users to instead pass a signed integer, but + this would needlessly extend the range of accepted integer values. + + - We could convert them to use `OPT_MAGNITUDE()`, as it only accepts + unsigned integers. But now we have the inconsistency that we also + start to accept unit factors. + + - We could introduce `OPT_UNSIGNED()` as equivalent to `OPT_INTEGER()` + so that it knows to only accept unsigned integers without unit + suffix. + +Introducing a whole new option type feels a bit excessive. There also +isn't really a good reason why `OPT_INTEGER()` cannot be extended to +also accept unit factors: all valid values passed to such options cannot +have a unit factors right now, so there wouldn't be any ambiguity. + +Refactor `OPT_INTEGER()` to use `git_parse_int()`, which knows to +interpret unit factors. This removes the inconsistency between the +signed and unsigned options so that we can easily fix up callsites that +pass the wrong integer type right now. + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + Documentation/technical/api-parse-options.adoc | 6 ++++-- + parse-options.c | 8 ++++---- + t/t0040-parse-options.sh | 4 +++- + 3 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/Documentation/technical/api-parse-options.adoc b/Documentation/technical/api-parse-options.adoc +index 61fa6ee1678..63acfb419bd 100644 +--- a/Documentation/technical/api-parse-options.adoc ++++ b/Documentation/technical/api-parse-options.adoc +@@ -211,8 +211,10 @@ There are some macros to easily define options: + Use of `--no-option` will clear the list of preceding values. + + `OPT_INTEGER(short, long, &int_var, description)`:: +- Introduce an option with integer argument. +- The integer is put into `int_var`. ++ Introduce an option with integer argument. The argument must be a ++ integer and may include a suffix of 'k', 'm' or 'g' to ++ scale the provided value by 1024, 1024^2 or 1024^3 respectively. ++ The scaled value is put into `int_var`. + + `OPT_MAGNITUDE(short, long, &unsigned_long_var, description)`:: + Introduce an option with a size argument. The argument must be a +diff --git a/parse-options.c b/parse-options.c +index 35fbb3b0d63..b287436e81a 100644 +--- a/parse-options.c ++++ b/parse-options.c +@@ -73,7 +73,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p, + enum opt_parsed flags, + const char **argp) + { +- const char *s, *arg; ++ const char *arg; + const int unset = flags & OPT_UNSET; + int err; + +@@ -185,9 +185,9 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p, + if (!*arg) + return error(_("%s expects a numerical value"), + optname(opt, flags)); +- *(int *)opt->value = strtol(arg, (char **)&s, 10); +- if (*s) +- return error(_("%s expects a numerical value"), ++ if (!git_parse_int(arg, opt->value)) ++ return error(_("%s expects an integer value" ++ " with an optional k/m/g suffix"), + optname(opt, flags)); + return 0; + +diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh +index 2fe3522305f..0c538c4b437 100755 +--- a/t/t0040-parse-options.sh ++++ b/t/t0040-parse-options.sh +@@ -111,7 +111,9 @@ test_expect_success 'OPT_BOOL() no negation #2' 'check_unknown_i18n --no-no-fear + + test_expect_success 'OPT_BOOL() positivation' 'check boolean: 0 -D --doubt' + +-test_expect_success 'OPT_INT() negative' 'check integer: -2345 -i -2345' ++test_expect_success 'OPT_INTEGER() negative' 'check integer: -2345 -i -2345' ++test_expect_success 'OPT_INTEGER() kilo' 'check integer: 239616 -i 234k' ++test_expect_success 'OPT_INTEGER() negative kilo' 'check integer: -239616 -i -234k' + + test_expect_success 'OPT_MAGNITUDE() simple' ' + check magnitude: 2345678 -m 2345678 + +-- +2.49.0.805.g082f7c87e0.dirty + + +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:39 +0200 +Subject: [PATCH v4 4/7] parse-options: rename `OPT_MAGNITUDE()` to + `OPT_UNSIGNED()` +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +With the preceding commit, `OPT_INTEGER()` has learned to support unit +factors. Consequently, the major differencen between `OPT_INTEGER()` and +`OPT_MAGNITUDE()` isn't the support of unit factors anymore, as both of +them do support them now. Instead, the difference is that one handles +signed and the other handles unsigned integers. + +Adapt the name of `OPT_MAGNITUDE()` accordingly by renaming it to +`OPT_UNSIGNED()`. + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + Documentation/technical/api-parse-options.adoc | 4 +-- + builtin/gc.c | 4 +-- + builtin/multi-pack-index.c | 2 +- + builtin/pack-objects.c | 8 ++--- + builtin/repack.c | 8 ++--- + parse-options.c | 6 ++-- + parse-options.h | 6 ++-- + t/helper/test-parse-options.c | 6 ++-- + t/t0040-parse-options.sh | 50 +++++++++++++------------- + 9 files changed, 47 insertions(+), 47 deletions(-) + +diff --git a/Documentation/technical/api-parse-options.adoc b/Documentation/technical/api-parse-options.adoc +index 63acfb419bd..880eb946425 100644 +--- a/Documentation/technical/api-parse-options.adoc ++++ b/Documentation/technical/api-parse-options.adoc +@@ -216,8 +216,8 @@ There are some macros to easily define options: + scale the provided value by 1024, 1024^2 or 1024^3 respectively. + The scaled value is put into `int_var`. + +-`OPT_MAGNITUDE(short, long, &unsigned_long_var, description)`:: +- Introduce an option with a size argument. The argument must be a ++`OPT_UNSIGNED(short, long, &unsigned_long_var, description)`:: ++ Introduce an option with an unsigned integer argument. The argument must be a + non-negative integer and may include a suffix of 'k', 'm' or 'g' to + scale the provided value by 1024, 1024^2 or 1024^3 respectively. + The scaled value is put into `unsigned_long_var`. +diff --git a/builtin/gc.c b/builtin/gc.c +index 6707a26bc6e..b32cf937cdf 100644 +--- a/builtin/gc.c ++++ b/builtin/gc.c +@@ -709,8 +709,8 @@ struct repository *repo UNUSED) + .defval = (intptr_t)prune_expire_arg, + }, + OPT_BOOL(0, "cruft", &cfg.cruft_packs, N_("pack unreferenced objects separately")), +- OPT_MAGNITUDE(0, "max-cruft-size", &cfg.max_cruft_size, +- N_("with --cruft, limit the size of new cruft packs")), ++ OPT_UNSIGNED(0, "max-cruft-size", &cfg.max_cruft_size, ++ N_("with --cruft, limit the size of new cruft packs")), + OPT_BOOL(0, "aggressive", &aggressive, N_("be more thorough (increased runtime)")), + OPT_BOOL_F(0, "auto", &opts.auto_flag, N_("enable auto-gc mode"), + PARSE_OPT_NOCOMPLETE), +diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c +index 2a938466f53..e4820fd721a 100644 +--- a/builtin/multi-pack-index.c ++++ b/builtin/multi-pack-index.c +@@ -245,7 +245,7 @@ static int cmd_multi_pack_index_repack(int argc, const char **argv, + { + struct option *options; + static struct option builtin_multi_pack_index_repack_options[] = { +- OPT_MAGNITUDE(0, "batch-size", &opts.batch_size, ++ OPT_UNSIGNED(0, "batch-size", &opts.batch_size, + N_("during repack, collect pack-files of smaller size into a batch that is larger than this size")), + OPT_BIT(0, "progress", &opts.flags, + N_("force progress reporting"), MIDX_PROGRESS), +diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c +index 79e1e6fb52b..9328812e286 100644 +--- a/builtin/pack-objects.c ++++ b/builtin/pack-objects.c +@@ -4399,16 +4399,16 @@ int cmd_pack_objects(int argc, + OPT_CALLBACK_F(0, "index-version", &pack_idx_opts, N_("<version>[,<offset>]"), + N_("write the pack index file in the specified idx format version"), + PARSE_OPT_NONEG, option_parse_index_version), +- OPT_MAGNITUDE(0, "max-pack-size", &pack_size_limit, +- N_("maximum size of each output pack file")), ++ OPT_UNSIGNED(0, "max-pack-size", &pack_size_limit, ++ N_("maximum size of each output pack file")), + OPT_BOOL(0, "local", &local, + N_("ignore borrowed objects from alternate object store")), + OPT_BOOL(0, "incremental", &incremental, + N_("ignore packed objects")), + OPT_INTEGER(0, "window", &window, + N_("limit pack window by objects")), +- OPT_MAGNITUDE(0, "window-memory", &window_memory_limit, +- N_("limit pack window by memory in addition to object limit")), ++ OPT_UNSIGNED(0, "window-memory", &window_memory_limit, ++ N_("limit pack window by memory in addition to object limit")), + OPT_INTEGER(0, "depth", &depth, + N_("maximum length of delta chain allowed in the resulting pack")), + OPT_BOOL(0, "reuse-delta", &reuse_delta, +diff --git a/builtin/repack.c b/builtin/repack.c +index 75e3752353a..8bf9941b2c2 100644 +--- a/builtin/repack.c ++++ b/builtin/repack.c +@@ -1202,8 +1202,8 @@ int cmd_repack(int argc, + PACK_CRUFT), + OPT_STRING(0, "cruft-expiration", &cruft_expiration, N_("approxidate"), + N_("with --cruft, expire objects older than this")), +- OPT_MAGNITUDE(0, "max-cruft-size", &cruft_po_args.max_pack_size, +- N_("with --cruft, limit the size of new cruft packs")), ++ OPT_UNSIGNED(0, "max-cruft-size", &cruft_po_args.max_pack_size, ++ N_("with --cruft, limit the size of new cruft packs")), + OPT_BOOL('d', NULL, &delete_redundant, + N_("remove redundant packs, and run git-prune-packed")), + OPT_BOOL('f', NULL, &po_args.no_reuse_delta, +@@ -1233,8 +1233,8 @@ int cmd_repack(int argc, + N_("limits the maximum delta depth")), + OPT_STRING(0, "threads", &opt_threads, N_("n"), + N_("limits the maximum number of threads")), +- OPT_MAGNITUDE(0, "max-pack-size", &po_args.max_pack_size, +- N_("maximum size of each packfile")), ++ OPT_UNSIGNED(0, "max-pack-size", &po_args.max_pack_size, ++ N_("maximum size of each packfile")), + OPT_PARSE_LIST_OBJECTS_FILTER(&po_args.filter_options), + OPT_BOOL(0, "pack-kept-objects", &pack_kept_objects, + N_("repack objects in packs marked with .keep")), +diff --git a/parse-options.c b/parse-options.c +index b287436e81a..d23e587e98b 100644 +--- a/parse-options.c ++++ b/parse-options.c +@@ -191,7 +191,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p, + optname(opt, flags)); + return 0; + +- case OPTION_MAGNITUDE: ++ case OPTION_UNSIGNED: + if (unset) { + *(unsigned long *)opt->value = 0; + return 0; +@@ -656,7 +656,7 @@ static void show_negated_gitcomp(const struct option *opts, int show_all, + case OPTION_STRING: + case OPTION_FILENAME: + case OPTION_INTEGER: +- case OPTION_MAGNITUDE: ++ case OPTION_UNSIGNED: + case OPTION_CALLBACK: + case OPTION_BIT: + case OPTION_NEGBIT: +@@ -708,7 +708,7 @@ static int show_gitcomp(const struct option *opts, int show_all) + case OPTION_STRING: + case OPTION_FILENAME: + case OPTION_INTEGER: +- case OPTION_MAGNITUDE: ++ case OPTION_UNSIGNED: + case OPTION_CALLBACK: + if (opts->flags & PARSE_OPT_NOARG) + break; +diff --git a/parse-options.h b/parse-options.h +index 997ffbee805..14e4df1ee21 100644 +--- a/parse-options.h ++++ b/parse-options.h +@@ -25,7 +25,7 @@ enum parse_opt_type { + /* options with arguments (usually) */ + OPTION_STRING, + OPTION_INTEGER, +- OPTION_MAGNITUDE, ++ OPTION_UNSIGNED, + OPTION_CALLBACK, + OPTION_LOWLEVEL_CALLBACK, + OPTION_FILENAME +@@ -270,8 +270,8 @@ struct option { + #define OPT_CMDMODE(s, l, v, h, i) OPT_CMDMODE_F(s, l, v, h, i, 0) + + #define OPT_INTEGER(s, l, v, h) OPT_INTEGER_F(s, l, v, h, 0) +-#define OPT_MAGNITUDE(s, l, v, h) { \ +- .type = OPTION_MAGNITUDE, \ ++#define OPT_UNSIGNED(s, l, v, h) { \ ++ .type = OPTION_UNSIGNED, \ + .short_name = (s), \ + .long_name = (l), \ + .value = (v), \ +diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c +index 997f55fd45b..fc3e2861c26 100644 +--- a/t/helper/test-parse-options.c ++++ b/t/helper/test-parse-options.c +@@ -6,7 +6,7 @@ + + static int boolean = 0; + static int integer = 0; +-static unsigned long magnitude = 0; ++static unsigned long unsigned_integer = 0; + static timestamp_t timestamp; + static int abbrev = 7; + static int verbose = -1; /* unspecified */ +@@ -140,7 +140,7 @@ int cmd__parse_options(int argc, const char **argv) + OPT_GROUP(""), + OPT_INTEGER('i', "integer", &integer, "get a integer"), + OPT_INTEGER('j', NULL, &integer, "get a integer, too"), +- OPT_MAGNITUDE('m', "magnitude", &magnitude, "get a magnitude"), ++ OPT_UNSIGNED('u', "unsigned", &unsigned_integer, "get an unsigned integer"), + OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23), + OPT_CMDMODE(0, "mode1", &integer, "set integer to 1 (cmdmode option)", 1), + OPT_CMDMODE(0, "mode2", &integer, "set integer to 2 (cmdmode option)", 2), +@@ -210,7 +210,7 @@ int cmd__parse_options(int argc, const char **argv) + } + show(&expect, &ret, "boolean: %d", boolean); + show(&expect, &ret, "integer: %d", integer); +- show(&expect, &ret, "magnitude: %lu", magnitude); ++ show(&expect, &ret, "unsigned: %lu", unsigned_integer); + show(&expect, &ret, "timestamp: %"PRItime, timestamp); + show(&expect, &ret, "string: %s", string ? string : "(not set)"); + show(&expect, &ret, "abbrev: %d", abbrev); +diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh +index 0c538c4b437..65a11c8dbc8 100755 +--- a/t/t0040-parse-options.sh ++++ b/t/t0040-parse-options.sh +@@ -23,7 +23,7 @@ usage: test-tool parse-options <options> + -i, --[no-]integer <n> + get a integer + -j <n> get a integer, too +- -m, --magnitude <n> get a magnitude ++ -u, --unsigned <n> get an unsigned integer + --[no-]set23 set integer to 23 + --mode1 set integer to 1 (cmdmode option) + --mode2 set integer to 2 (cmdmode option) +@@ -115,30 +115,30 @@ test_expect_success 'OPT_INTEGER() negative' 'check integer: -2345 -i -2345' + test_expect_success 'OPT_INTEGER() kilo' 'check integer: 239616 -i 234k' + test_expect_success 'OPT_INTEGER() negative kilo' 'check integer: -239616 -i -234k' + +-test_expect_success 'OPT_MAGNITUDE() simple' ' +- check magnitude: 2345678 -m 2345678 ++test_expect_success 'OPT_UNSIGNED() simple' ' ++ check unsigned: 2345678 -u 2345678 + ' + +-test_expect_success 'OPT_MAGNITUDE() kilo' ' +- check magnitude: 239616 -m 234k ++test_expect_success 'OPT_UNSIGNED() kilo' ' ++ check unsigned: 239616 -u 234k + ' + +-test_expect_success 'OPT_MAGNITUDE() mega' ' +- check magnitude: 104857600 -m 100m ++test_expect_success 'OPT_UNSIGNED() mega' ' ++ check unsigned: 104857600 -u 100m + ' + +-test_expect_success 'OPT_MAGNITUDE() giga' ' +- check magnitude: 1073741824 -m 1g ++test_expect_success 'OPT_UNSIGNED() giga' ' ++ check unsigned: 1073741824 -u 1g + ' + +-test_expect_success 'OPT_MAGNITUDE() 3giga' ' +- check magnitude: 3221225472 -m 3g ++test_expect_success 'OPT_UNSIGNED() 3giga' ' ++ check unsigned: 3221225472 -u 3g + ' + + cat >expect <<\EOF + boolean: 2 + integer: 1729 +-magnitude: 16384 ++unsigned: 16384 + timestamp: 0 + string: 123 + abbrev: 7 +@@ -149,7 +149,7 @@ file: prefix/my.file + EOF + + test_expect_success 'short options' ' +- test-tool parse-options -s123 -b -i 1729 -m 16k -b -vv -n -F my.file \ ++ test-tool parse-options -s123 -b -i 1729 -u 16k -b -vv -n -F my.file \ + >output 2>output.err && + test_cmp expect output && + test_must_be_empty output.err +@@ -158,7 +158,7 @@ test_expect_success 'short options' ' + cat >expect <<\EOF + boolean: 2 + integer: 1729 +-magnitude: 16384 ++unsigned: 16384 + timestamp: 0 + string: 321 + abbrev: 10 +@@ -169,7 +169,7 @@ file: prefix/fi.le + EOF + + test_expect_success 'long options' ' +- test-tool parse-options --boolean --integer 1729 --magnitude 16k \ ++ test-tool parse-options --boolean --integer 1729 --unsigned 16k \ + --boolean --string2=321 --verbose --verbose --no-dry-run \ + --abbrev=10 --file fi.le --obsolete \ + >output 2>output.err && +@@ -181,7 +181,7 @@ test_expect_success 'abbreviate to something longer than SHA1 length' ' + cat >expect <<-EOF && + boolean: 0 + integer: 0 +- magnitude: 0 ++ unsigned: 0 + timestamp: 0 + string: (not set) + abbrev: 100 +@@ -255,7 +255,7 @@ test_expect_success 'superfluous value provided: cmdmode' ' + cat >expect <<\EOF + boolean: 1 + integer: 13 +-magnitude: 0 ++unsigned: 0 + timestamp: 0 + string: 123 + abbrev: 7 +@@ -278,7 +278,7 @@ test_expect_success 'intermingled arguments' ' + cat >expect <<\EOF + boolean: 0 + integer: 2 +-magnitude: 0 ++unsigned: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -345,7 +345,7 @@ cat >expect <<\EOF + Callback: "four", 0 + boolean: 5 + integer: 4 +-magnitude: 0 ++unsigned: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -370,7 +370,7 @@ test_expect_success 'OPT_CALLBACK() and callback errors work' ' + cat >expect <<\EOF + boolean: 1 + integer: 23 +-magnitude: 0 ++unsigned: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -449,7 +449,7 @@ test_expect_success 'OPT_NUMBER_CALLBACK() works' ' + cat >expect <<\EOF + boolean: 0 + integer: 0 +-magnitude: 0 ++unsigned: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -773,14 +773,14 @@ test_expect_success 'subcommands are incompatible with KEEP_DASHDASH unless in c + grep ^BUG err + ' + +-test_expect_success 'negative magnitude' ' +- test_must_fail test-tool parse-options --magnitude -1 >out 2>err && ++test_expect_success 'negative unsigned' ' ++ test_must_fail test-tool parse-options --unsigned -1 >out 2>err && + grep "non-negative integer" err && + test_must_be_empty out + ' + +-test_expect_success 'magnitude with units but no numbers' ' +- test_must_fail test-tool parse-options --magnitude m >out 2>err && ++test_expect_success 'unsigned with units but no numbers' ' ++ test_must_fail test-tool parse-options --unsigned m >out 2>err && + grep "non-negative integer" err && + test_must_be_empty out + ' + +-- +2.49.0.805.g082f7c87e0.dirty + + +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:40 +0200 +Subject: [PATCH v4 5/7] parse-options: introduce precision handling for + `OPTION_INTEGER` +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +The `OPTION_INTEGER` option type accepts a signed integer. The type of +the underlying integer is a simple `int`, which restricts the range of +values accepted by such options. But there is a catch: because the +caller provides a pointer to the value via the `.value` field, which is +a simple void pointer. This has two consequences: + + - There is no check whether the passed value is sufficiently long to + store the entire range of `int`. This can lead to integer wraparound + in the best case and out-of-bounds writes in the worst case. + + - Even when a caller knows that they want to store a value larger than + `INT_MAX` they don't have a way to do so. + +In practice this doesn't tend to be a huge issue because users typically +don't end up passing huge values to most commands. But the parsing logic +is demonstrably broken, and it is too easy to get the calling convention +wrong. + +Improve the situation by introducing a new `precision` field into the +structure. This field gets assigned automatically by `OPT_INTEGER_F()` +and tracks the size of the passed value. Like this it becomes possible +for the caller to pass arbitrarily-sized integers and the underlying +logic knows to handle it correctly by doing range checks. Furthermore, +convert the code to use `strtoimax()` intstead of `strtol()` so that we +can also parse values larger than `LONG_MAX`. + +Note that we do not yet assert signedness of the passed variable, which +is another source of bugs. This will be handled in a subsequent commit. + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + builtin/fmt-merge-msg.c | 2 ++ + builtin/merge.c | 1 + + builtin/show-branch.c | 1 + + builtin/tag.c | 1 + + parse-options.c | 52 ++++++++++++++++++++++++++++++++----------- + parse-options.h | 6 +++++ + t/helper/test-parse-options.c | 3 +++ + t/t0040-parse-options.sh | 23 ++++++++++++++++++- + 8 files changed, 75 insertions(+), 14 deletions(-) + +diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c +index 240cdb474bc..3b6aac2cf7f 100644 +--- a/builtin/fmt-merge-msg.c ++++ b/builtin/fmt-merge-msg.c +@@ -24,6 +24,7 @@ int cmd_fmt_merge_msg(int argc, + .type = OPTION_INTEGER, + .long_name = "log", + .value = &shortlog_len, ++ .precision = sizeof(shortlog_len), + .argh = N_("n"), + .help = N_("populate log with at most <n> entries from shortlog"), + .flags = PARSE_OPT_OPTARG, +@@ -33,6 +34,7 @@ int cmd_fmt_merge_msg(int argc, + .type = OPTION_INTEGER, + .long_name = "summary", + .value = &shortlog_len, ++ .precision = sizeof(shortlog_len), + .argh = N_("n"), + .help = N_("alias for --log (deprecated)"), + .flags = PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, +diff --git a/builtin/merge.c b/builtin/merge.c +index 21787d45165..9ab10c7db0a 100644 +--- a/builtin/merge.c ++++ b/builtin/merge.c +@@ -254,6 +254,7 @@ static struct option builtin_merge_options[] = { + .type = OPTION_INTEGER, + .long_name = "log", + .value = &shortlog_len, ++ .precision = sizeof(shortlog_len), + .argh = N_("n"), + .help = N_("add (at most <n>) entries from shortlog to merge commit message"), + .flags = PARSE_OPT_OPTARG, +diff --git a/builtin/show-branch.c b/builtin/show-branch.c +index dab37019d29..b549d8c3f5b 100644 +--- a/builtin/show-branch.c ++++ b/builtin/show-branch.c +@@ -671,6 +671,7 @@ int cmd_show_branch(int ac, + .type = OPTION_INTEGER, + .long_name = "more", + .value = &extra, ++ .precision = sizeof(extra), + .argh = N_("n"), + .help = N_("show <n> more commits after the common ancestor"), + .flags = PARSE_OPT_OPTARG, +diff --git a/builtin/tag.c b/builtin/tag.c +index b266f12bb48..7597d93c71b 100644 +--- a/builtin/tag.c ++++ b/builtin/tag.c +@@ -483,6 +483,7 @@ int cmd_tag(int argc, + .type = OPTION_INTEGER, + .short_name = 'n', + .value = &filter.lines, ++ .precision = sizeof(filter.lines), + .argh = N_("n"), + .help = N_("print <n> lines of each tag message"), + .flags = PARSE_OPT_OPTARG, +diff --git a/parse-options.c b/parse-options.c +index d23e587e98b..768718a3972 100644 +--- a/parse-options.c ++++ b/parse-options.c +@@ -172,25 +172,51 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p, + return (*opt->ll_callback)(p, opt, p_arg, p_unset); + } + case OPTION_INTEGER: ++ { ++ intmax_t upper_bound = INTMAX_MAX >> (bitsizeof(intmax_t) - CHAR_BIT * opt->precision); ++ intmax_t lower_bound = -upper_bound - 1; ++ intmax_t value; ++ + if (unset) { +- *(int *)opt->value = 0; +- return 0; +- } +- if (opt->flags & PARSE_OPT_OPTARG && !p->opt) { +- *(int *)opt->value = opt->defval; +- return 0; +- } +- if (get_arg(p, opt, flags, &arg)) ++ value = 0; ++ } else if (opt->flags & PARSE_OPT_OPTARG && !p->opt) { ++ value = opt->defval; ++ } else if (get_arg(p, opt, flags, &arg)) { + return -1; +- if (!*arg) ++ } else if (!*arg) { + return error(_("%s expects a numerical value"), + optname(opt, flags)); +- if (!git_parse_int(arg, opt->value)) +- return error(_("%s expects an integer value" +- " with an optional k/m/g suffix"), ++ } else if (!git_parse_signed(arg, &value, upper_bound)) { ++ if (errno == ERANGE) ++ return error(_("value %s for %s not in range [%"PRIdMAX",%"PRIdMAX"]"), ++ arg, optname(opt, flags), lower_bound, upper_bound); ++ ++ return error(_("%s expects an integer value with an optional k/m/g suffix"), + optname(opt, flags)); +- return 0; ++ } ++ ++ if (value < lower_bound) ++ return error(_("value %s for %s not in range [%"PRIdMAX",%"PRIdMAX"]"), ++ arg, optname(opt, flags), lower_bound, upper_bound); + ++ switch (opt->precision) { ++ case 1: ++ *(int8_t *)opt->value = value; ++ return 0; ++ case 2: ++ *(int16_t *)opt->value = value; ++ return 0; ++ case 4: ++ *(int32_t *)opt->value = value; ++ return 0; ++ case 8: ++ *(int64_t *)opt->value = value; ++ return 0; ++ default: ++ BUG("invalid precision for option %s", ++ optname(opt, flags)); ++ } ++ } + case OPTION_UNSIGNED: + if (unset) { + *(unsigned long *)opt->value = 0; +diff --git a/parse-options.h b/parse-options.h +index 14e4df1ee21..4c430c7273c 100644 +--- a/parse-options.h ++++ b/parse-options.h +@@ -92,6 +92,10 @@ typedef int parse_opt_subcommand_fn(int argc, const char **argv, + * `value`:: + * stores pointers to the values to be filled. + * ++ * `precision`:: ++ * precision of the integer pointed to by `value` in number of bytes. Should ++ * typically be its `sizeof()`. ++ * + * `argh`:: + * token to explain the kind of argument this option wants. Does not + * begin in capital letter, and does not end with a full stop. +@@ -151,6 +155,7 @@ struct option { + int short_name; + const char *long_name; + void *value; ++ size_t precision; + const char *argh; + const char *help; + +@@ -214,6 +219,7 @@ struct option { + .short_name = (s), \ + .long_name = (l), \ + .value = (v), \ ++ .precision = sizeof(*v), \ + .argh = N_("n"), \ + .help = (h), \ + .flags = (f), \ +diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c +index fc3e2861c26..3689aee8315 100644 +--- a/t/helper/test-parse-options.c ++++ b/t/helper/test-parse-options.c +@@ -120,6 +120,7 @@ int cmd__parse_options(int argc, const char **argv) + }; + struct string_list expect = STRING_LIST_INIT_NODUP; + struct string_list list = STRING_LIST_INIT_NODUP; ++ int16_t i16 = 0; + + struct option options[] = { + OPT_BOOL(0, "yes", &boolean, "get a boolean"), +@@ -139,6 +140,7 @@ int cmd__parse_options(int argc, const char **argv) + OPT_NEGBIT(0, "neg-or4", &boolean, "same as --no-or4", 4), + OPT_GROUP(""), + OPT_INTEGER('i', "integer", &integer, "get a integer"), ++ OPT_INTEGER(0, "i16", &i16, "get a 16 bit integer"), + OPT_INTEGER('j', NULL, &integer, "get a integer, too"), + OPT_UNSIGNED('u', "unsigned", &unsigned_integer, "get an unsigned integer"), + OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23), +@@ -210,6 +212,7 @@ int cmd__parse_options(int argc, const char **argv) + } + show(&expect, &ret, "boolean: %d", boolean); + show(&expect, &ret, "integer: %d", integer); ++ show(&expect, &ret, "i16: %"PRIdMAX, (intmax_t) i16); + show(&expect, &ret, "unsigned: %lu", unsigned_integer); + show(&expect, &ret, "timestamp: %"PRItime, timestamp); + show(&expect, &ret, "string: %s", string ? string : "(not set)"); +diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh +index 65a11c8dbc8..be785547ead 100755 +--- a/t/t0040-parse-options.sh ++++ b/t/t0040-parse-options.sh +@@ -22,6 +22,7 @@ usage: test-tool parse-options <options> + + -i, --[no-]integer <n> + get a integer ++ --[no-]i16 <n> get a 16 bit integer + -j <n> get a integer, too + -u, --unsigned <n> get an unsigned integer + --[no-]set23 set integer to 23 +@@ -138,6 +139,7 @@ test_expect_success 'OPT_UNSIGNED() 3giga' ' + cat >expect <<\EOF + boolean: 2 + integer: 1729 ++i16: 0 + unsigned: 16384 + timestamp: 0 + string: 123 +@@ -158,6 +160,7 @@ test_expect_success 'short options' ' + cat >expect <<\EOF + boolean: 2 + integer: 1729 ++i16: 9000 + unsigned: 16384 + timestamp: 0 + string: 321 +@@ -169,7 +172,7 @@ file: prefix/fi.le + EOF + + test_expect_success 'long options' ' +- test-tool parse-options --boolean --integer 1729 --unsigned 16k \ ++ test-tool parse-options --boolean --integer 1729 --i16 9000 --unsigned 16k \ + --boolean --string2=321 --verbose --verbose --no-dry-run \ + --abbrev=10 --file fi.le --obsolete \ + >output 2>output.err && +@@ -181,6 +184,7 @@ test_expect_success 'abbreviate to something longer than SHA1 length' ' + cat >expect <<-EOF && + boolean: 0 + integer: 0 ++ i16: 0 + unsigned: 0 + timestamp: 0 + string: (not set) +@@ -255,6 +259,7 @@ test_expect_success 'superfluous value provided: cmdmode' ' + cat >expect <<\EOF + boolean: 1 + integer: 13 ++i16: 0 + unsigned: 0 + timestamp: 0 + string: 123 +@@ -278,6 +283,7 @@ test_expect_success 'intermingled arguments' ' + cat >expect <<\EOF + boolean: 0 + integer: 2 ++i16: 0 + unsigned: 0 + timestamp: 0 + string: (not set) +@@ -345,6 +351,7 @@ cat >expect <<\EOF + Callback: "four", 0 + boolean: 5 + integer: 4 ++i16: 0 + unsigned: 0 + timestamp: 0 + string: (not set) +@@ -370,6 +377,7 @@ test_expect_success 'OPT_CALLBACK() and callback errors work' ' + cat >expect <<\EOF + boolean: 1 + integer: 23 ++i16: 0 + unsigned: 0 + timestamp: 0 + string: (not set) +@@ -449,6 +457,7 @@ test_expect_success 'OPT_NUMBER_CALLBACK() works' ' + cat >expect <<\EOF + boolean: 0 + integer: 0 ++i16: 0 + unsigned: 0 + timestamp: 0 + string: (not set) +@@ -785,4 +794,16 @@ test_expect_success 'unsigned with units but no numbers' ' + test_must_be_empty out + ' + ++test_expect_success 'i16 limits range' ' ++ test-tool parse-options --i16 32767 >out && ++ test_grep "i16: 32767" out && ++ test_must_fail test-tool parse-options --i16 32768 2>err && ++ test_grep "value 32768 for option .i16. not in range \[-32768,32767\]" err && ++ ++ test-tool parse-options --i16 -32768 >out && ++ test_grep "i16: -32768" out && ++ test_must_fail test-tool parse-options --i16 -32769 2>err && ++ test_grep "value -32769 for option .i16. not in range \[-32768,32767\]" err ++' ++ + test_done + +-- +2.49.0.805.g082f7c87e0.dirty + + +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:41 +0200 +Subject: [PATCH v4 6/7] parse-options: introduce precision handling for + `OPTION_UNSIGNED` +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +This commit is the equivalent to the preceding commit, but instead of +introducing precision handling for `OPTION_INTEGER` we introduce it for +`OPTION_UNSIGNED`. + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + parse-options.c | 48 +++++++++++++++++++++++++++++++++---------- + parse-options.h | 1 + + parse.c | 2 +- + parse.h | 1 + + t/helper/test-parse-options.c | 3 +++ + t/t0040-parse-options.sh | 18 +++++++++++++++- + 6 files changed, 60 insertions(+), 13 deletions(-) + +diff --git a/parse-options.c b/parse-options.c +index 768718a3972..a9a39ecaef6 100644 +--- a/parse-options.c ++++ b/parse-options.c +@@ -197,7 +197,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p, + + if (value < lower_bound) + return error(_("value %s for %s not in range [%"PRIdMAX",%"PRIdMAX"]"), +- arg, optname(opt, flags), lower_bound, upper_bound); ++ arg, optname(opt, flags), (intmax_t)lower_bound, (intmax_t)upper_bound); + + switch (opt->precision) { + case 1: +@@ -218,21 +218,47 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p, + } + } + case OPTION_UNSIGNED: ++ { ++ uintmax_t upper_bound = UINTMAX_MAX >> (bitsizeof(uintmax_t) - CHAR_BIT * opt->precision); ++ uintmax_t value; ++ + if (unset) { +- *(unsigned long *)opt->value = 0; +- return 0; +- } +- if (opt->flags & PARSE_OPT_OPTARG && !p->opt) { +- *(unsigned long *)opt->value = opt->defval; +- return 0; +- } +- if (get_arg(p, opt, flags, &arg)) ++ value = 0; ++ } else if (opt->flags & PARSE_OPT_OPTARG && !p->opt) { ++ value = opt->defval; ++ } else if (get_arg(p, opt, flags, &arg)) { + return -1; +- if (!git_parse_ulong(arg, opt->value)) ++ } else if (!*arg) { ++ return error(_("%s expects a numerical value"), ++ optname(opt, flags)); ++ } else if (!git_parse_unsigned(arg, &value, upper_bound)) { ++ if (errno == ERANGE) ++ return error(_("value %s for %s not in range [%"PRIdMAX",%"PRIdMAX"]"), ++ arg, optname(opt, flags), (uintmax_t) 0, upper_bound); ++ + return error(_("%s expects a non-negative integer value" + " with an optional k/m/g suffix"), + optname(opt, flags)); +- return 0; ++ } ++ ++ switch (opt->precision) { ++ case 1: ++ *(uint8_t *)opt->value = value; ++ return 0; ++ case 2: ++ *(uint16_t *)opt->value = value; ++ return 0; ++ case 4: ++ *(uint32_t *)opt->value = value; ++ return 0; ++ case 8: ++ *(uint64_t *)opt->value = value; ++ return 0; ++ default: ++ BUG("invalid precision for option %s", ++ optname(opt, flags)); ++ } ++ } + + default: + BUG("opt->type %d should not happen", opt->type); +diff --git a/parse-options.h b/parse-options.h +index 4c430c7273c..dc460a26ff1 100644 +--- a/parse-options.h ++++ b/parse-options.h +@@ -281,6 +281,7 @@ struct option { + .short_name = (s), \ + .long_name = (l), \ + .value = (v), \ ++ .precision = sizeof(*v), \ + .argh = N_("n"), \ + .help = (h), \ + .flags = PARSE_OPT_NONEG, \ +diff --git a/parse.c b/parse.c +index 3c47448ca67..48313571aab 100644 +--- a/parse.c ++++ b/parse.c +@@ -51,7 +51,7 @@ int git_parse_signed(const char *value, intmax_t *ret, intmax_t max) + return 0; + } + +-static int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max) ++int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max) + { + if (value && *value) { + char *end; +diff --git a/parse.h b/parse.h +index 6bb9a54d9ac..ea32de9a91f 100644 +--- a/parse.h ++++ b/parse.h +@@ -2,6 +2,7 @@ + #define PARSE_H + + int git_parse_signed(const char *value, intmax_t *ret, intmax_t max); ++int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max); + int git_parse_ssize_t(const char *, ssize_t *); + int git_parse_ulong(const char *, unsigned long *); + int git_parse_int(const char *value, int *ret); +diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c +index 3689aee8315..f2663dd0c07 100644 +--- a/t/helper/test-parse-options.c ++++ b/t/helper/test-parse-options.c +@@ -120,6 +120,7 @@ int cmd__parse_options(int argc, const char **argv) + }; + struct string_list expect = STRING_LIST_INIT_NODUP; + struct string_list list = STRING_LIST_INIT_NODUP; ++ uint16_t u16 = 0; + int16_t i16 = 0; + + struct option options[] = { +@@ -143,6 +144,7 @@ int cmd__parse_options(int argc, const char **argv) + OPT_INTEGER(0, "i16", &i16, "get a 16 bit integer"), + OPT_INTEGER('j', NULL, &integer, "get a integer, too"), + OPT_UNSIGNED('u', "unsigned", &unsigned_integer, "get an unsigned integer"), ++ OPT_UNSIGNED(0, "u16", &u16, "get a 16 bit unsigned integer"), + OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23), + OPT_CMDMODE(0, "mode1", &integer, "set integer to 1 (cmdmode option)", 1), + OPT_CMDMODE(0, "mode2", &integer, "set integer to 2 (cmdmode option)", 2), +@@ -214,6 +216,7 @@ int cmd__parse_options(int argc, const char **argv) + show(&expect, &ret, "integer: %d", integer); + show(&expect, &ret, "i16: %"PRIdMAX, (intmax_t) i16); + show(&expect, &ret, "unsigned: %lu", unsigned_integer); ++ show(&expect, &ret, "u16: %"PRIuMAX, (uintmax_t) u16); + show(&expect, &ret, "timestamp: %"PRItime, timestamp); + show(&expect, &ret, "string: %s", string ? string : "(not set)"); + show(&expect, &ret, "abbrev: %d", abbrev); +diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh +index be785547ead..ca55ea8228c 100755 +--- a/t/t0040-parse-options.sh ++++ b/t/t0040-parse-options.sh +@@ -25,6 +25,7 @@ usage: test-tool parse-options <options> + --[no-]i16 <n> get a 16 bit integer + -j <n> get a integer, too + -u, --unsigned <n> get an unsigned integer ++ --u16 <n> get a 16 bit unsigned integer + --[no-]set23 set integer to 23 + --mode1 set integer to 1 (cmdmode option) + --mode2 set integer to 2 (cmdmode option) +@@ -141,6 +142,7 @@ boolean: 2 + integer: 1729 + i16: 0 + unsigned: 16384 ++u16: 0 + timestamp: 0 + string: 123 + abbrev: 7 +@@ -162,6 +164,7 @@ boolean: 2 + integer: 1729 + i16: 9000 + unsigned: 16384 ++u16: 32768 + timestamp: 0 + string: 321 + abbrev: 10 +@@ -173,7 +176,7 @@ EOF + + test_expect_success 'long options' ' + test-tool parse-options --boolean --integer 1729 --i16 9000 --unsigned 16k \ +- --boolean --string2=321 --verbose --verbose --no-dry-run \ ++ --u16 32k --boolean --string2=321 --verbose --verbose --no-dry-run \ + --abbrev=10 --file fi.le --obsolete \ + >output 2>output.err && + test_must_be_empty output.err && +@@ -186,6 +189,7 @@ test_expect_success 'abbreviate to something longer than SHA1 length' ' + integer: 0 + i16: 0 + unsigned: 0 ++ u16: 0 + timestamp: 0 + string: (not set) + abbrev: 100 +@@ -261,6 +265,7 @@ boolean: 1 + integer: 13 + i16: 0 + unsigned: 0 ++u16: 0 + timestamp: 0 + string: 123 + abbrev: 7 +@@ -285,6 +290,7 @@ boolean: 0 + integer: 2 + i16: 0 + unsigned: 0 ++u16: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -353,6 +359,7 @@ boolean: 5 + integer: 4 + i16: 0 + unsigned: 0 ++u16: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -379,6 +386,7 @@ boolean: 1 + integer: 23 + i16: 0 + unsigned: 0 ++u16: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -459,6 +467,7 @@ boolean: 0 + integer: 0 + i16: 0 + unsigned: 0 ++u16: 0 + timestamp: 0 + string: (not set) + abbrev: 7 +@@ -806,4 +815,11 @@ test_expect_success 'i16 limits range' ' + test_grep "value -32769 for option .i16. not in range \[-32768,32767\]" err + ' + ++test_expect_success 'u16 limits range' ' ++ test-tool parse-options --u16 65535 >out && ++ test_grep "u16: 65535" out && ++ test_must_fail test-tool parse-options --u16 65536 2>err && ++ test_grep "value 65536 for option .u16. not in range \[0,65535\]" err ++' ++ + test_done + +-- +2.49.0.805.g082f7c87e0.dirty + + +From mboxrd@z Thu Jan 1 00:00:00 1970 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 17 Apr 2025 12:49:42 +0200 +Subject: [PATCH v4 7/7] parse-options: detect mismatches in integer + signedness +References: <20250417-b4-pks-parse-options-integers-v4-0-9cbc76b61cfe@pks.im> +To: git@vger.kernel.org +X-Mailer: b4 0.14.2 + +It was reported that "t5620-backfill.sh" fails on s390x and sparc64 in a +test that exercises the "--min-batch-size" command line option. The +symptom was that the option didn't seem to have an effect: we didn't +fetch objects with a batch size of 20, but instead fetched all objects +at once. + +As it turns out, the root cause is that `--min-batch-size` uses +`OPT_INTEGER()` to parse the command line option. While this macro +expects the caller to pass a pointer to an integer, we instead pass a +pointer to a `size_t`. This coincidentally works on most platforms, but +it breaks apart on the mentioned platforms because they are big endian. + +This issue isn't specific to git-backfill(1): there are a couple of +other places where we have the same type confusion going on. This +indicates that the issue really is the interface that the parse-options +subsystem provides -- it is simply too easy to get this wrong as there +isn't any kind of compiler warning, and things just work on the most +common systems. + +Address the systemic issue by introducing two new build asserts +`BARF_UNLESS_SIGNED()` and `BARF_UNLESS_UNSIGNED()`. As the names +already hint at, those macros will cause a compiler error when passed a +value that is not signed or unsigned, respectively. + +Adapt `OPT_INTEGER()`, `OPT_UNSIGNED()` as well as `OPT_MAGNITUDE()` to +use those asserts. This uncovers a small set of sites where we indeed +have the same bug as in git-backfill(1). Adapt all of them to use the +correct option. + +Reported-by: Todd Zullinger <tmz@pobox.com> +Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> +Helped-by: SZEDER Gábor <szeder.dev@gmail.com> +Helped-by: Jeff King <peff@peff.net> +Signed-off-by: Patrick Steinhardt <ps@pks.im> +--- + apply.c | 4 ++-- + builtin/backfill.c | 4 ++-- + builtin/column.c | 2 +- + builtin/grep.c | 4 ++-- + git-compat-util.h | 7 +++++++ + parse-options.h | 4 ++-- + 6 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/apply.c b/apply.c +index f274a379487..a850c7d75fe 100644 +--- a/apply.c ++++ b/apply.c +@@ -5123,8 +5123,8 @@ int apply_parse_options(int argc, const char **argv, + /* Think twice before adding "--nul" synonym to this */ + OPT_SET_INT('z', NULL, &state->line_termination, + N_("paths are separated with NUL character"), '\0'), +- OPT_INTEGER('C', NULL, &state->p_context, +- N_("ensure at least <n> lines of context match")), ++ OPT_UNSIGNED('C', NULL, &state->p_context, ++ N_("ensure at least <n> lines of context match")), + OPT_CALLBACK(0, "whitespace", state, N_("action"), + N_("detect new or modified lines that have whitespace errors"), + apply_option_parse_whitespace), +diff --git a/builtin/backfill.c b/builtin/backfill.c +index 33e1ea2f84f..d95d7a2d4d6 100644 +--- a/builtin/backfill.c ++++ b/builtin/backfill.c +@@ -123,8 +123,8 @@ int cmd_backfill(int argc, const char **argv, const char *prefix, struct reposit + .sparse = 0, + }; + struct option options[] = { +- OPT_INTEGER(0, "min-batch-size", &ctx.min_batch_size, +- N_("Minimum number of objects to request at a time")), ++ OPT_UNSIGNED(0, "min-batch-size", &ctx.min_batch_size, ++ N_("Minimum number of objects to request at a time")), + OPT_BOOL(0, "sparse", &ctx.sparse, + N_("Restrict the missing objects to the current sparse-checkout")), + OPT_END(), +diff --git a/builtin/column.c b/builtin/column.c +index 50314cc2559..ce6443d5fac 100644 +--- a/builtin/column.c ++++ b/builtin/column.c +@@ -31,7 +31,7 @@ int cmd_column(int argc, + struct option options[] = { + OPT_STRING(0, "command", &real_command, N_("name"), N_("lookup config vars")), + OPT_COLUMN(0, "mode", &colopts, N_("layout to use")), +- OPT_INTEGER(0, "raw-mode", &colopts, N_("layout to use")), ++ OPT_UNSIGNED(0, "raw-mode", &colopts, N_("layout to use")), + OPT_INTEGER(0, "width", &copts.width, N_("maximum width")), + OPT_STRING(0, "indent", &copts.indent, N_("string"), N_("padding space on left border")), + OPT_STRING(0, "nl", &copts.nl, N_("string"), N_("padding space on right border")), +diff --git a/builtin/grep.c b/builtin/grep.c +index c4869733e1b..f23a6f1dc86 100644 +--- a/builtin/grep.c ++++ b/builtin/grep.c +@@ -983,9 +983,9 @@ int cmd_grep(int argc, + OPT_CALLBACK('C', "context", &opt, N_("n"), + N_("show <n> context lines before and after matches"), + context_callback), +- OPT_INTEGER('B', "before-context", &opt.pre_context, ++ OPT_UNSIGNED('B', "before-context", &opt.pre_context, + N_("show <n> context lines before matches")), +- OPT_INTEGER('A', "after-context", &opt.post_context, ++ OPT_UNSIGNED('A', "after-context", &opt.post_context, + N_("show <n> context lines after matches")), + OPT_INTEGER(0, "threads", &num_threads, + N_("use <n> worker threads")), +diff --git a/git-compat-util.h b/git-compat-util.h +index cf733b38acd..1218fcf81a4 100644 +--- a/git-compat-util.h ++++ b/git-compat-util.h +@@ -110,12 +110,19 @@ DISABLE_WARNING(-Wsign-compare) + # define BARF_UNLESS_COPYABLE(dst, src) \ + BUILD_ASSERT_OR_ZERO(__builtin_types_compatible_p(__typeof__(*(dst)), \ + __typeof__(*(src)))) ++ ++# define BARF_UNLESS_SIGNED(var) BUILD_ASSERT_OR_ZERO(((__typeof__(var)) -1) < 0) ++# define BARF_UNLESS_UNSIGNED(var) BUILD_ASSERT_OR_ZERO(((__typeof__(var)) -1) > 0) + #else + # define BARF_UNLESS_AN_ARRAY(arr) 0 + # define BARF_UNLESS_COPYABLE(dst, src) \ + BUILD_ASSERT_OR_ZERO(0 ? ((*(dst) = *(src)), 0) : \ + sizeof(*(dst)) == sizeof(*(src))) ++ ++# define BARF_UNLESS_SIGNED(var) 0 ++# define BARF_UNLESS_UNSIGNED(var) 0 + #endif ++ + /* + * ARRAY_SIZE - get the number of elements in a visible array + * @x: the array whose size you want. +diff --git a/parse-options.h b/parse-options.h +index dc460a26ff1..91c3e3c29b3 100644 +--- a/parse-options.h ++++ b/parse-options.h +@@ -218,7 +218,7 @@ struct option { + .type = OPTION_INTEGER, \ + .short_name = (s), \ + .long_name = (l), \ +- .value = (v), \ ++ .value = (v) + BARF_UNLESS_SIGNED(*(v)), \ + .precision = sizeof(*v), \ + .argh = N_("n"), \ + .help = (h), \ +@@ -280,7 +280,7 @@ struct option { + .type = OPTION_UNSIGNED, \ + .short_name = (s), \ + .long_name = (l), \ +- .value = (v), \ ++ .value = (v) + BARF_UNLESS_UNSIGNED(*(v)), \ + .precision = sizeof(*v), \ + .argh = N_("n"), \ + .help = (h), \ + +-- +2.49.0.805.g082f7c87e0.dirty + + diff --git a/system/git/perl-getopt-long.patch b/system/git/perl-getopt-long.patch deleted file mode 100644 index dd5776033..000000000 --- a/system/git/perl-getopt-long.patch +++ /dev/null @@ -1,459 +0,0 @@ -From 46edab516bf04c190cb2e100419dee817d3f33f6 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger <tmz@pobox.com> -Date: Wed, 15 Nov 2023 12:39:44 -0500 -Subject: [PATCH] send-email: remove stray characters from usage - -A few stray single quotes crept into the usage string in a2ce608244 -(send-email docs: add format-patch options, 2021-10-25). Remove them. - -Signed-off-by: Todd Zullinger <tmz@pobox.com> -Signed-off-by: Junio C Hamano <gitster@pobox.com> ---- - git-send-email.perl | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/git-send-email.perl b/git-send-email.perl -index 897cea6564fb50..85544a18bfe37e 100755 ---- a/git-send-email.perl -+++ b/git-send-email.perl -@@ -28,8 +28,8 @@ - - sub usage { - print <<EOT; --git send-email' [<options>] <file|directory> --git send-email' [<options>] <format-patch options> -+git send-email [<options>] <file|directory> -+git send-email [<options>] <format-patch options> - git send-email --dump-aliases - - Composing: -From d13a73e383076636534e10ba799af0c9a2b85357 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger <tmz@pobox.com> -Date: Thu, 16 Nov 2023 14:30:10 -0500 -Subject: [PATCH] perl: bump the required Perl version to 5.8.1 from 5.8.0 - -The following commit will make use of a Getopt::Long feature which is -only present in Perl >= 5.8.1. Document that as the minimum version we -support. - -Many of our Perl scripts will continue to run with 5.8.0 but this change -allows us to adjust them as needed without breaking any promises to our -users. - -The Perl requirement was last changed in d48b284183 (perl: bump the -required Perl version to 5.8 from 5.6.[21], 2010-09-24). At that time, -5.8.0 was 8 years old. It is now over 21 years old. - -Signed-off-by: Todd Zullinger <tmz@pobox.com> -Signed-off-by: Junio C Hamano <gitster@pobox.com> ---- - Documentation/CodingGuidelines | 2 +- - INSTALL | 2 +- - contrib/diff-highlight/DiffHighlight.pm | 2 +- - contrib/mw-to-git/Git/Mediawiki.pm | 2 +- - git-archimport.perl | 2 +- - git-cvsexportcommit.perl | 2 +- - git-cvsimport.perl | 2 +- - git-cvsserver.perl | 2 +- - git-send-email.perl | 4 ++-- - git-svn.perl | 2 +- - gitweb/INSTALL | 2 +- - gitweb/gitweb.perl | 2 +- - perl/Git.pm | 2 +- - perl/Git/I18N.pm | 2 +- - perl/Git/LoadCPAN.pm | 2 +- - perl/Git/LoadCPAN/Error.pm | 2 +- - perl/Git/LoadCPAN/Mail/Address.pm | 2 +- - perl/Git/Packet.pm | 2 +- - t/t0202/test.pl | 2 +- - t/t5562/invoke-with-content-length.pl | 2 +- - t/t9700/test.pl | 2 +- - t/test-terminal.perl | 2 +- - 22 files changed, 23 insertions(+), 23 deletions(-) - -diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines -index 65af8d82cedd5f..aa0195d6ebab0b 100644 ---- a/Documentation/CodingGuidelines -+++ b/Documentation/CodingGuidelines -@@ -490,7 +490,7 @@ For Perl programs: - - - Most of the C guidelines above apply. - -- - We try to support Perl 5.8 and later ("use Perl 5.008"). -+ - We try to support Perl 5.8.1 and later ("use Perl 5.008001"). - - - use strict and use warnings are strongly preferred. - -diff --git a/INSTALL b/INSTALL -index 4b422888828d0e..06f29a8ae70022 100644 ---- a/INSTALL -+++ b/INSTALL -@@ -119,7 +119,7 @@ Issues of note: - - A POSIX-compliant shell is required to run some scripts needed - for everyday use (e.g. "bisect", "request-pull"). - -- - "Perl" version 5.8 or later is needed to use some of the -+ - "Perl" version 5.8.1 or later is needed to use some of the - features (e.g. sending patches using "git send-email", - interacting with svn repositories with "git svn"). If you can - live without these, use NO_PERL. Note that recent releases of -diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm -index 376f577737591e..636add69680675 100644 ---- a/contrib/diff-highlight/DiffHighlight.pm -+++ b/contrib/diff-highlight/DiffHighlight.pm -@@ -1,6 +1,6 @@ - package DiffHighlight; - --use 5.008; -+use 5.008001; - use warnings FATAL => 'all'; - use strict; - -diff --git a/contrib/mw-to-git/Git/Mediawiki.pm b/contrib/mw-to-git/Git/Mediawiki.pm -index 917d9e2d3222c1..ff7811225ee671 100644 ---- a/contrib/mw-to-git/Git/Mediawiki.pm -+++ b/contrib/mw-to-git/Git/Mediawiki.pm -@@ -1,6 +1,6 @@ - package Git::Mediawiki; - --use 5.008; -+use 5.008001; - use strict; - use POSIX; - use Git; -diff --git a/git-archimport.perl b/git-archimport.perl -index b7c173c345544d..f5a317b89961ce 100755 ---- a/git-archimport.perl -+++ b/git-archimport.perl -@@ -54,7 +54,7 @@ =head1 Devel Notes - - =cut - --use 5.008; -+use 5.008001; - use strict; - use warnings; - use Getopt::Std; -diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl -index 289d4bc684dc26..1e03ba94d1b271 100755 ---- a/git-cvsexportcommit.perl -+++ b/git-cvsexportcommit.perl -@@ -1,6 +1,6 @@ - #!/usr/bin/perl - --use 5.008; -+use 5.008001; - use strict; - use warnings; - use Getopt::Std; -diff --git a/git-cvsimport.perl b/git-cvsimport.perl -index 7bf3c12d678974..07ea3443f7f336 100755 ---- a/git-cvsimport.perl -+++ b/git-cvsimport.perl -@@ -13,7 +13,7 @@ - # The head revision is on branch "origin" by default. - # You can change that with the '-o' option. - --use 5.008; -+use 5.008001; - use strict; - use warnings; - use Getopt::Long; -diff --git a/git-cvsserver.perl b/git-cvsserver.perl -index 7b757360e28c01..124f598bdc0705 100755 ---- a/git-cvsserver.perl -+++ b/git-cvsserver.perl -@@ -15,7 +15,7 @@ - #### - #### - --use 5.008; -+use 5.008001; - use strict; - use warnings; - use bytes; -diff --git a/git-send-email.perl b/git-send-email.perl -index 897cea6564fb50..041db702d46fcc 100755 ---- a/git-send-email.perl -+++ b/git-send-email.perl -@@ -16,7 +16,7 @@ - # and second line is the subject of the message. - # - --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - use Getopt::Long; -@@ -228,7 +228,7 @@ sub system_or_msg { - my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code); - if (defined $msg) { - # Quiet the 'redundant' warning category, except we -- # need to support down to Perl 5.8, so we can't do a -+ # need to support down to Perl 5.8.1, so we can't do a - # "no warnings 'redundant'", since that category was - # introduced in perl 5.22, and asking for it will die - # on older perls. -diff --git a/git-svn.perl b/git-svn.perl -index be987e316f92ac..1d1c52f42468b1 100755 ---- a/git-svn.perl -+++ b/git-svn.perl -@@ -1,7 +1,7 @@ - #!/usr/bin/perl - # Copyright (C) 2006, Eric Wong <normalperson@yhbt.net> - # License: GPL v2 or later --use 5.008; -+use 5.008001; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - use strict; - use vars qw/ $AUTHOR $VERSION -diff --git a/gitweb/INSTALL b/gitweb/INSTALL -index a58e6b3c44b0ef..dadc6efa81f035 100644 ---- a/gitweb/INSTALL -+++ b/gitweb/INSTALL -@@ -29,7 +29,7 @@ Requirements - ------------ - - - Core git tools -- - Perl 5.8 -+ - Perl 5.8.1 - - Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename. - - web server - -diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl -index e66eb3d9bad7cf..55e7c6567e6c47 100755 ---- a/gitweb/gitweb.perl -+++ b/gitweb/gitweb.perl -@@ -7,7 +7,7 @@ - # - # This program is licensed under the GPLv2 - --use 5.008; -+use 5.008001; - use strict; - use warnings; - # handle ACL in file access tests -diff --git a/perl/Git.pm b/perl/Git.pm -index 117765dc73c4a8..03bf570bf4c852 100644 ---- a/perl/Git.pm -+++ b/perl/Git.pm -@@ -7,7 +7,7 @@ Git - Perl interface to the Git version control system - - package Git; - --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - -diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm -index 895e759c57a9d9..5454c3a6d2c433 100644 ---- a/perl/Git/I18N.pm -+++ b/perl/Git/I18N.pm -@@ -1,5 +1,5 @@ - package Git::I18N; --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - BEGIN { -diff --git a/perl/Git/LoadCPAN.pm b/perl/Git/LoadCPAN.pm -index 0c360bc7998607..8c7fa805f97390 100644 ---- a/perl/Git/LoadCPAN.pm -+++ b/perl/Git/LoadCPAN.pm -@@ -1,5 +1,5 @@ - package Git::LoadCPAN; --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - -diff --git a/perl/Git/LoadCPAN/Error.pm b/perl/Git/LoadCPAN/Error.pm -index 5d84c202884b7c..5cecb0fcd6930a 100644 ---- a/perl/Git/LoadCPAN/Error.pm -+++ b/perl/Git/LoadCPAN/Error.pm -@@ -1,5 +1,5 @@ - package Git::LoadCPAN::Error; --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - use Git::LoadCPAN ( -diff --git a/perl/Git/LoadCPAN/Mail/Address.pm b/perl/Git/LoadCPAN/Mail/Address.pm -index 340e88a7a56be3..9f808090a66a16 100644 ---- a/perl/Git/LoadCPAN/Mail/Address.pm -+++ b/perl/Git/LoadCPAN/Mail/Address.pm -@@ -1,5 +1,5 @@ - package Git::LoadCPAN::Mail::Address; --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - use Git::LoadCPAN ( -diff --git a/perl/Git/Packet.pm b/perl/Git/Packet.pm -index d144f5168f37ad..d896e6952399b0 100644 ---- a/perl/Git/Packet.pm -+++ b/perl/Git/Packet.pm -@@ -1,5 +1,5 @@ - package Git::Packet; --use 5.008; -+use 5.008001; - use strict; - use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); - BEGIN { -diff --git a/t/t0202/test.pl b/t/t0202/test.pl -index 2cbf7b95907384..47d96a2a13f93b 100755 ---- a/t/t0202/test.pl -+++ b/t/t0202/test.pl -@@ -1,5 +1,5 @@ - #!/usr/bin/perl --use 5.008; -+use 5.008001; - use lib (split(/:/, $ENV{GITPERLLIB})); - use strict; - use warnings; -diff --git a/t/t5562/invoke-with-content-length.pl b/t/t5562/invoke-with-content-length.pl -index 718dd9b49d493e..9babb9a375e5fb 100644 ---- a/t/t5562/invoke-with-content-length.pl -+++ b/t/t5562/invoke-with-content-length.pl -@@ -1,4 +1,4 @@ --use 5.008; -+use 5.008001; - use strict; - use warnings; - -diff --git a/t/t9700/test.pl b/t/t9700/test.pl -index 6d753708d2acb6..d8e85482ab2ba7 100755 ---- a/t/t9700/test.pl -+++ b/t/t9700/test.pl -@@ -1,7 +1,7 @@ - #!/usr/bin/perl - use lib (split(/:/, $ENV{GITPERLLIB})); - --use 5.008; -+use 5.008001; - use warnings; - use strict; - -diff --git a/t/test-terminal.perl b/t/test-terminal.perl -index 1bcf01a9a42a61..3810e9bb431903 100755 ---- a/t/test-terminal.perl -+++ b/t/test-terminal.perl -@@ -1,5 +1,5 @@ - #!/usr/bin/perl --use 5.008; -+use 5.008001; - use strict; - use warnings; - use IO::Pty; -From 6ff658cc78f36baa74c0f25314b0043a8f4b4fc6 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger <tmz@pobox.com> -Date: Thu, 16 Nov 2023 14:30:11 -0500 -Subject: [PATCH] send-email: avoid duplicate specification warnings - -A warning is issued for options which are specified more than once -beginning with perl-Getopt-Long >= 2.55. In addition to causing users -to see warnings, this results in test failures which compare the output. -An example, from t9001-send-email.37: - - | +++ diff -u expect actual - | --- expect 2023-11-14 10:38:23.854346488 +0000 - | +++ actual 2023-11-14 10:38:23.848346466 +0000 - | @@ -1,2 +1,7 @@ - | +Duplicate specification "no-chain-reply-to" for option "no-chain-reply-to" - | +Duplicate specification "to-cover|to-cover!" for option "to-cover" - | +Duplicate specification "cc-cover|cc-cover!" for option "cc-cover" - | +Duplicate specification "no-thread" for option "no-thread" - | +Duplicate specification "no-to-cover" for option "no-to-cover" - | fatal: longline.patch:35 is longer than 998 characters - | warning: no patches were sent - | error: last command exited with $?=1 - | not ok 37 - reject long lines - -Remove the duplicate option specs. These are primarily the explicit -'--no-' prefix opts which were added in f471494303 (git-send-email.perl: -support no- prefix with older GetOptions, 2015-01-30). This was done -specifically to support perl-5.8.0 which includes Getopt::Long 2.32[1]. - -Getopt::Long 2.33 added support for the '--no-' prefix natively by -appending '!' to the option specification string, which was included in -perl-5.8.1 and is not present in perl-5.8.0. The previous commit bumped -the minimum supported Perl version to 5.8.1 so we no longer need to -provide the '--no-' variants for negatable options manually. - -Teach `--git-completion-helper` to output the '--no-' options. They are -not included in the options hash and would otherwise be lost. - -Signed-off-by: Todd Zullinger <tmz@pobox.com> -Signed-off-by: Junio C Hamano <gitster@pobox.com> ---- - git-send-email.perl | 19 ++++++------------- - 1 file changed, 6 insertions(+), 13 deletions(-) - -diff --git a/git-send-email.perl b/git-send-email.perl -index 041db702d46fcc..60afafb375d8f4 100755 ---- a/git-send-email.perl -+++ b/git-send-email.perl -@@ -119,13 +119,16 @@ sub completion_helper { - - foreach my $key (keys %$original_opts) { - unless (exists $not_for_completion{$key}) { -- $key =~ s/!$//; -+ my $negatable = ($key =~ s/!$//); - - if ($key =~ /[:=][si]$/) { - $key =~ s/[:=][si]$//; - push (@send_email_opts, "--$_=") foreach (split (/\|/, $key)); - } else { - push (@send_email_opts, "--$_") foreach (split (/\|/, $key)); -+ if ($negatable) { -+ push (@send_email_opts, "--no-$_") foreach (split (/\|/, $key)); -+ } - } - } - } -@@ -491,7 +494,6 @@ sub config_regexp { - "bcc=s" => \@getopt_bcc, - "no-bcc" => \$no_bcc, - "chain-reply-to!" => \$chain_reply_to, -- "no-chain-reply-to" => sub {$chain_reply_to = 0}, - "sendmail-cmd=s" => \$sendmail_cmd, - "smtp-server=s" => \$smtp_server, - "smtp-server-option=s" => \@smtp_server_options, -@@ -506,34 +508,25 @@ sub config_regexp { - "smtp-auth=s" => \$smtp_auth, - "no-smtp-auth" => sub {$smtp_auth = 'none'}, - "annotate!" => \$annotate, -- "no-annotate" => sub {$annotate = 0}, - "compose" => \$compose, - "quiet" => \$quiet, - "cc-cmd=s" => \$cc_cmd, - "suppress-from!" => \$suppress_from, -- "no-suppress-from" => sub {$suppress_from = 0}, - "suppress-cc=s" => \@suppress_cc, - "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, -- "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0}, -- "cc-cover|cc-cover!" => \$cover_cc, -- "no-cc-cover" => sub {$cover_cc = 0}, -- "to-cover|to-cover!" => \$cover_to, -- "no-to-cover" => sub {$cover_to = 0}, -+ "cc-cover!" => \$cover_cc, -+ "to-cover!" => \$cover_to, - "confirm=s" => \$confirm, - "dry-run" => \$dry_run, - "envelope-sender=s" => \$envelope_sender, - "thread!" => \$thread, -- "no-thread" => sub {$thread = 0}, - "validate!" => \$validate, -- "no-validate" => sub {$validate = 0}, - "transfer-encoding=s" => \$target_xfer_encoding, - "format-patch!" => \$format_patch, -- "no-format-patch" => sub {$format_patch = 0}, - "8bit-encoding=s" => \$auto_8bit_encoding, - "compose-encoding=s" => \$compose_encoding, - "force" => \$force, - "xmailer!" => \$use_xmailer, -- "no-xmailer" => sub {$use_xmailer = 0}, - "batch-size=i" => \$batch_size, - "relogin-delay=i" => \$relogin_delay, - "git-completion-helper" => \$git_completion_helper, diff --git a/system/gmp/APKBUILD b/system/gmp/APKBUILD index e5c71a783..298dd3a48 100644 --- a/system/gmp/APKBUILD +++ b/system/gmp/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org> pkgname=gmp -pkgver=6.2.1 -pkgrel=2 +pkgver=6.3.0 +pkgrel=0 pkgdesc="A free library for arbitrary precision arithmetic" url="https://gmplib.org/" arch="all" @@ -44,4 +44,4 @@ libgmpxx() { mv "$pkgdir"/usr/lib/libgmpxx.so.* "$subpkgdir"/usr/lib/ } -sha512sums="c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84 gmp-6.2.1.tar.xz" +sha512sums="e85a0dab5195889948a3462189f0e0598d331d3457612e2d3350799dba2e244316d256f8161df5219538eb003e4b5343f989aaa00f96321559063ed8c8f29fd2 gmp-6.3.0.tar.xz" diff --git a/system/grep/APKBUILD b/system/grep/APKBUILD index 4eada9099..8502b0c82 100644 --- a/system/grep/APKBUILD +++ b/system/grep/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=grep -pkgver=3.11 +pkgver=3.12 pkgrel=0 pkgdesc="Pattern matching utilities" url="https://www.gnu.org/software/grep/grep.html" @@ -40,6 +40,6 @@ package() { rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true } -sha512sums="f254a1905a08c8173e12fbdd4fd8baed9a200217fba9d7641f0d78e4e002c1f2a621152d67027d9b25f0bb2430898f5233dc70909d8464fd13d7dd9298e65c42 grep-3.11.tar.xz +sha512sums="c54b4db5a8b9afe098c088decd94977746305284d716666a60bac82b4edc0fae4acf828970b5b6fc7d58ecd549f638e17e6958f33a71fedcc7d7415b9228b161 grep-3.12.tar.xz 7e4bc1da5de16a036e00fef6d9387b701bbe447d21d77cc3fc28a73e0364c972dec7cdcd70a176ef339b221fad92e7feccbb1e20f3f7b114a3585b8551770de5 gnulib-tests-dont-require-gpg-passphrase.patch 9ba6b01c0c74933299afb469dadd2ea0c7e24befa34c691671a576063e32a1f0c735541e5e2bb0073d8afd814790909f7f895827aa8a2fbacdfcae380a7bcb11 fix-tests.patch" diff --git a/system/gzip/APKBUILD b/system/gzip/APKBUILD index 84cb58b78..4682daca3 100644 --- a/system/gzip/APKBUILD +++ b/system/gzip/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=gzip -pkgver=1.12 +pkgver=1.14 pkgrel=0 pkgdesc="The GNU data compression program" subpackages="$pkgname-doc" @@ -45,4 +45,4 @@ package() { ln -sf /bin/gunzip "$pkgdir"/usr/bin/uncompress } -sha512sums="09b441299039479488700b7ef267ab7f71268af0d648d32cf6b1efcac58e59f1f352fa9d4f95278e96a76dc21239be1a5acab319bc85a7501cf5d8573c83d857 gzip-1.12.tar.gz" +sha512sums="65db6f01d982a976c431d33e9725dab84fcb991c9603cb2a492a2d578a58f9ac03a14ade4b91af49e9e877d81afec61dea563cf1e599f5b2eee2087613a2d368 gzip-1.14.tar.gz" diff --git a/system/icu/APKBUILD b/system/icu/APKBUILD index 17741042d..a27b1fda6 100644 --- a/system/icu/APKBUILD +++ b/system/icu/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Sergey Lukin <sergej.lukin@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=icu -pkgver=75.1 +pkgver=77.1 # convert x.y.z to x_y_z _ver=$(printf '%s' "$pkgver" | tr . _) @@ -17,7 +17,6 @@ makedepends="" subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs" source="https://github.com/unicode-org/icu/releases/download/release-$(printf '%s' "$pkgver" | tr . -)/${pkgname}4c-$_ver-src.tgz icu-60.2-always-use-utf8.patch - islamic-calendar.patch " # secfixes: @@ -79,6 +78,5 @@ static() { mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/ } -sha512sums="70ea842f0d5f1f6c6b65696ac71d96848c4873f4d794bebc40fd87af2ad4ef064c61a786bf7bc430ce4713ec6deabb8cc1a8cc0212eab148cee2d498a3683e45 icu4c-75_1-src.tgz -f89e9f389621ed9a58548ac961fc93fca8377b91fbb0df1991049757deadf72f6f11346eb7af883040c85b28621140805636a7f90d94f3b53e666d67b9681989 icu-60.2-always-use-utf8.patch -1a4305e6145ecab171d044e4cc14e074294c73e221f780803363823bafa2f79d2efd77d63f6c0bb6df6d5f9767de38d321196d85649be929a583f1abc27dbdd0 islamic-calendar.patch" +sha512sums="a47d6d9c327d037a05ea43d1d1a06b2fd757cc02a94f7c1a238f35cfc3dfd4ab78d0612790f3a3cca0292c77412a9c2c15c8f24b718f79a857e007e66f07e7cd icu4c-77_1-src.tgz +95c37febf7b6291dd0766de0dbd8eaee14132ad1b84bc93260b9e19cb3c05a786e8780ac0cbd47bf80182f73c647d4e5f067c9b4f5fbeda13a7fcc34b3bc0341 icu-60.2-always-use-utf8.patch" diff --git a/system/icu/icu-60.2-always-use-utf8.patch b/system/icu/icu-60.2-always-use-utf8.patch index 801a907d0..17ff834a4 100644 --- a/system/icu/icu-60.2-always-use-utf8.patch +++ b/system/icu/icu-60.2-always-use-utf8.patch @@ -1,6 +1,6 @@ --- source/common/unicode/platform.h 2017-10-25 13:41:15.000000000 -0500 +++ source/common/unicode/platform.h 2018-04-04 02:07:28.851222016 -0500 -@@ -606,7 +606,7 @@ +@@ -612,7 +612,7 @@ U_PLATFORM == U_PF_EMSCRIPTEN # define U_CHARSET_IS_UTF8 1 #else diff --git a/system/icu/islamic-calendar.patch b/system/icu/islamic-calendar.patch deleted file mode 100644 index bae9734af..000000000 --- a/system/icu/islamic-calendar.patch +++ /dev/null @@ -1,14 +0,0 @@ -The addition is duplicated, causing some dates to be one year off. - -Fixes: d43d216feb ("ICU-22633 Test and fix int32_t overflow for Calendar set") - ---- source/i18n/islamcal.cpp.old 2024-04-16 16:08:53.000000000 -0500 -+++ source/i18n/islamcal.cpp 2024-08-12 00:03:20.102380147 -0500 -@@ -452,7 +452,6 @@ - // This may be called by Calendar::handleComputeJulianDay with months out of the range - // 0..11. Need to handle that here since monthStart requires months in the range 0.11. - if (month > 11) { -- eyear += (month / 12); - if (uprv_add32_overflow(eyear, (month / 12), &eyear)) { - status = U_ILLEGAL_ARGUMENT_ERROR; - return 0; diff --git a/system/iproute2/APKBUILD b/system/iproute2/APKBUILD index ec3a915eb..8060532bb 100644 --- a/system/iproute2/APKBUILD +++ b/system/iproute2/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=iproute2 -pkgver=5.17.0 +pkgver=6.15.0 pkgrel=0 pkgdesc="Advanced IP routing and network device configuration tools" url="https://wiki.linuxfoundation.org/networking/iproute2" @@ -15,26 +15,17 @@ makedepends="bison flex bash db-dev libelf-dev libmnl-dev libcap-dev bsd-compat- subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch" source="https://kernel.org/pub/linux/utils/net/iproute2/iproute2-$pkgver.tar.xz" -prepare() { - default_prepare - - sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h - sed -i -e 's:=/share:=/usr/share:' \ - -e 's:-Werror::' Makefile -} - build() { - ./configure - make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib + ./configure --libdir=/lib --color=auto + make CCOPTS="-D_GNU_SOURCE $CFLAGS" } package() { make -j1 DESTDIR="$pkgdir" install mkdir "$pkgdir"/bin - mv "$pkgdir"/sbin/ip "$pkgdir"/bin/ip + ln -s ../sbin/ip "$pkgdir"/bin/ip mkdir "$pkgdir"/usr/share/man/man1 - mv "$pkgdir"/usr/share/man/man8/ip.8 \ + ln -s ../man8/ip.8 \ "$pkgdir"/usr/share/man/man1/ip.1 } @@ -50,4 +41,4 @@ bashcomp() { rmdir -p "$pkgdir"/usr/share 2>/dev/null || true } -sha512sums="fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d iproute2-5.17.0.tar.xz" +sha512sums="1a438941cd939e1c8e32cfe8c40e6fd826c89185f1bb0c623eaad7380a66afd9fa9e0d7cdc5e5b193d2761b7dbdc78fd0811537eecc500be633730c32ff55ad4 iproute2-6.15.0.tar.xz" diff --git a/system/isl/APKBUILD b/system/isl/APKBUILD index 413c82956..bc07ee387 100644 --- a/system/isl/APKBUILD +++ b/system/isl/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Timo Teräs <timo.teras@iki.fi> # Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org> pkgname=isl -pkgver=0.24 +pkgver=0.27 pkgrel=0 pkgdesc="Integer Set Library" url="https://libisl.sourceforge.io/" @@ -10,6 +10,7 @@ options="!dbg strip" # Static libs only license="MIT" depends="" depends_dev="gmp-dev" +checkdepends="!python3" # Python test fails with missing symbol error. (#1332) makedepends_host="$depends_dev" makedepends="$makedepends_host" replaces="cloog" @@ -37,4 +38,4 @@ package() { make DESTDIR="$pkgdir" INSTALL="install -D" install } -sha512sums="aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 isl-0.24.tar.bz2" +sha512sums="e14ab1a622d3f6219b264b8e2512487aecd6725b7b88f40bc8f31651bfe7d89db4649aae12eaa0052dd904bac21607f63c83fbab73251767425d91989a969f7e isl-0.27.tar.bz2" diff --git a/system/kmod/APKBUILD b/system/kmod/APKBUILD index 171f279ce..c973ea098 100644 --- a/system/kmod/APKBUILD +++ b/system/kmod/APKBUILD @@ -1,15 +1,15 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=kmod -pkgver=30 +pkgver=33 pkgrel=0 pkgdesc="Linux kernel module management utilities" -url="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary" +url="https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/about/" arch="all" options="!check" # https://bugs.gentoo.org/408915#c3 license="GPL-2.0+" depends="" -makedepends="openssl-dev zlib-dev xz-dev zstd-dev" +makedepends="openssl-dev scdoc xz-dev zlib-dev zstd-dev" triggers="$pkgname.trigger=/lib/modules/*" subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-bash-completion:bashcomp:noarch" @@ -25,6 +25,7 @@ build() { --prefix=/usr \ --bindir=/bin \ --sysconfdir=/etc \ + --libdir=/lib \ --with-rootlibdir=/lib \ --with-zlib \ --with-xz \ @@ -41,11 +42,14 @@ package() { make DESTDIR="$pkgdir" install mkdir -p "$pkgdir"/sbin for i in lsmod rmmod insmod modinfo modprobe depmod; do + case $i in + lsmod|modinfo) ;; + *) rm "$pkgdir"/bin/$i;; + esac ln -sf ../bin/kmod "$pkgdir"/sbin/$i done - for i in lsmod modinfo; do - ln -s kmod "$pkgdir"/bin/$i - done + mkdir -p "$pkgdir"/usr/lib + mv "$pkgdir"/lib/pkgconfig "$pkgdir"/usr/lib/ install -Dm755 "$srcdir"/kmod-static-nodes.initd \ "$pkgdir"/etc/init.d/kmod-static-nodes } @@ -60,6 +64,6 @@ bashcomp() { } -sha512sums="e2cd34e600a72e44710760dfda9364b790b8352a99eafbd43e683e4a06f37e6b5c0b5d14e7c28070e30fc5fc6ceddedf7b97f3b6c2c5c2d91204fefd630b9a3e kmod-30.tar.xz -f2ea3527bfba182c5e15557c224a5bba8c7e2ea3d21cf604e6eb2277226dcf983c3aeb9ac44a322c7f2b4942b35135da999d63a5b946b829d3f3b09c050a0f17 strndupa.patch +sha512sums="32d79d0bb7e89012f18458d4e88325f8e19a7dba6e1d5cff01aec3e618d1757b0f7c119735bf38d02e0d056a14273fd7522fca7c61a4d12a3ea5854bb662fff8 kmod-33.tar.xz +8bc365bbff8e9602c18c6ba0ae635b6648216ba367a631818ec99851e68aba27742c5f1f0a51b0981877359da7668f6fa79584dc956757299d08c0f77b3dd559 strndupa.patch 7f0f89fe98167f71b7924f341ba701d001158225463c2f5e39f706a0224b1e952ee901b441f28cb15787563e83bb6e54eb752bf8669ae7c0ffbb11984542f354 kmod-static-nodes.initd" diff --git a/system/kmod/strndupa.patch b/system/kmod/strndupa.patch index d4527140e..bde1b23a6 100644 --- a/system/kmod/strndupa.patch +++ b/system/kmod/strndupa.patch @@ -2,7 +2,7 @@ diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c index df12433..142e767 100644 --- a/shared/util.c +++ b/shared/util.c -@@ -334,7 +334,9 @@ int mkdir_p(const char *path, int len, mode_t mode) +@@ -389,7 +389,9 @@ int mkdir_p(const char *path, int len, mode_t mode) { char *start, *end; diff --git a/system/less/APKBUILD b/system/less/APKBUILD index 793d3bbab..71448ea19 100644 --- a/system/less/APKBUILD +++ b/system/less/APKBUILD @@ -1,18 +1,17 @@ # Contributor: Cameron Banta <cbanta@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=less -pkgver=590 +pkgver=678 pkgrel=0 pkgdesc="File pager" url="http://www.greenwoodsoftware.com/less/" arch="all" license="BSD-2-Clause OR GPL-3.0+" -options="!check" +depends="" makedepends="ncurses-dev" subpackages="$pkgname-doc" source="http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz - search-path-history-file.patch - search-path-lesskey-file.patch + test-tinfow.patch " prepare() { @@ -31,10 +30,13 @@ build() { make } +check() { + make check +} + package() { make DESTDIR="$pkgdir" install } -sha512sums="426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903 less-590.tar.gz -d059a3b4e28c8c8473a9834e00eade8bb9ab14922235bf0344d71604ad656449dcb95763f7103a21d2443881d599178d333f1e4c88a4372d9cb526eb36ebd8b0 search-path-history-file.patch -62d92ba9ae2e152cbf47d214f92a202591f901a68e74afa7a46fbaa6af1f6c38b76e067cf5c9f4fba2ee9602857c5900a0857d5402ebd593ab2410527b5f162d search-path-lesskey-file.patch" +sha512sums="ad1983229bfb5a30c6139db60012d3a12b613011f044acb4c0ec5c0fc809b8dc9be40255bf420f65d51425152c4cfc943076ccd2ee63b196165d6ab1426ea187 less-678.tar.gz +ef417e321e8af95cfec0dbd4411f2676f1649052b8a99097472e82b52774d485a304d307183370b14a265c4e2381a0bb9a7d3e389ba17553824e6d6b5216567a test-tinfow.patch" diff --git a/system/less/search-path-history-file.patch b/system/less/search-path-history-file.patch deleted file mode 100644 index 7ec0ce9f1..000000000 --- a/system/less/search-path-history-file.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 5e1f4ce2c3a2c0fd6a953c4f7ca2839370f9c3ae Mon Sep 17 00:00:00 2001 -From: Mark Nudelman <markn@greenwoodsoftware.com> -Date: Fri, 3 Dec 2021 09:38:22 -0800 -Subject: [PATCH] Add $XDG_STATE_HOME and $HOME/.local/state to list of - directories to search for the history file. - ---- - cmdbuf.c | 48 ++++++++++++++++++++++++++++++++---------------- - less.nro.VER | 6 +++--- - 2 files changed, 35 insertions(+), 19 deletions(-) - -diff --git a/cmdbuf.c b/cmdbuf.c -index cd99010d..abbda9b9 100644 ---- a/cmdbuf.c -+++ b/cmdbuf.c -@@ -1401,14 +1401,41 @@ mlist_size(ml) - /* - * Get the name of the history file. - */ -+ static char * -+histfile_find(must_exist) -+ int must_exist; -+{ -+ char *home = lgetenv("HOME"); -+ char *name = NULL; -+ -+ /* Try in $XDG_DATA_STATE, then in $HOME/.local/state, then in $XDG_DATA_HOME, then in $HOME. */ -+#if OS2 -+ if (isnullenv(home)) -+ home = lgetenv("INIT"); -+#endif -+ name = dirfile(lgetenv("XDG_STATE_HOME"), &LESSHISTFILE[1], must_exist); -+ if (name == NULL) -+ { -+ char *dir = dirfile(home, ".local/state", 1); -+ if (dir != NULL) -+ { -+ name = dirfile(dir, &LESSHISTFILE[1], must_exist); -+ free(dir); -+ } -+ } -+ if (name == NULL) -+ name = dirfile(lgetenv("XDG_DATA_HOME"), &LESSHISTFILE[1], must_exist); -+ if (name == NULL) -+ name = dirfile(home, LESSHISTFILE, must_exist); -+ return (name); -+} -+ - static char * - histfile_name(must_exist) - int must_exist; - { -- char *home; -- char *xdg; - char *name; -- -+ - /* See if filename is explicitly specified by $LESSHISTFILE. */ - name = lgetenv("LESSHISTFILE"); - if (!isnullenv(name)) -@@ -1423,25 +1450,14 @@ histfile_name(must_exist) - if (strcmp(LESSHISTFILE, "") == 0 || strcmp(LESSHISTFILE, "-") == 0) - return (NULL); - -- /* Try in $XDG_DATA_HOME first, then in $HOME. */ -- xdg = lgetenv("XDG_DATA_HOME"); -- home = lgetenv("HOME"); --#if OS2 -- if (isnullenv(home)) -- home = lgetenv("INIT"); --#endif - name = NULL; - if (!must_exist) - { - /* If we're writing the file and the file already exists, use it. */ -- name = dirfile(xdg, &LESSHISTFILE[1], 1); -- if (name == NULL) -- name = dirfile(home, LESSHISTFILE, 1); -+ name = histfile_find(1); - } - if (name == NULL) -- name = dirfile(xdg, &LESSHISTFILE[1], must_exist); -- if (name == NULL) -- name = dirfile(home, LESSHISTFILE, must_exist); -+ name = histfile_find(must_exist); - return (name); - } - diff --git a/system/less/search-path-lesskey-file.patch b/system/less/search-path-lesskey-file.patch deleted file mode 100644 index 422376930..000000000 --- a/system/less/search-path-lesskey-file.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d3edebf528da8a9e15d6be518c24e90462a28698 Mon Sep 17 00:00:00 2001 -From: Mark Nudelman <markn@greenwoodsoftware.com> -Date: Tue, 19 Oct 2021 14:24:04 -0700 -Subject: [PATCH] Add $HOME/.config to possible locations of lesskey file. - ---- - NEWS | 4 ++++ - decode.c | 13 ++++++++++++- - less.nro.VER | 2 +- - 3 files changed, 17 insertions(+), 2 deletions(-) - -diff --git a/decode.c b/decode.c -index e1a55198..2eb480fa 100644 ---- a/decode.c -+++ b/decode.c -@@ -952,9 +952,20 @@ add_hometable(call_lesskey, envname, def_filename, sysvar) - filename = save(def_filename); - else /* def_filename is just basename */ - { -+ /* Remove first char (normally a dot) unless stored in $HOME. */ - char *xdg = lgetenv("XDG_CONFIG_HOME"); - if (!isnullenv(xdg)) -- filename = dirfile(xdg, def_filename+1, 1); -+ filename = dirfile(xdg, &def_filename[1], 1); -+ if (filename == NULL) -+ { -+ char *home = lgetenv("HOME"); -+ if (!isnullenv(home)) -+ { -+ char *cfg_dir = dirfile(home, ".config", 0); -+ filename = dirfile(cfg_dir, &def_filename[1], 1); -+ free(cfg_dir); -+ } -+ } - if (filename == NULL) - filename = homefile(def_filename); - } diff --git a/system/less/test-tinfow.patch b/system/less/test-tinfow.patch new file mode 100644 index 000000000..a24c45746 --- /dev/null +++ b/system/less/test-tinfow.patch @@ -0,0 +1,13 @@ +Upstream-URL: https://github.com/gwsw/less/issues/631 + +--- less-678/lesstest/Makefile.old 2025-05-01 15:42:10.000000000 -0500 ++++ less-678/lesstest/Makefile 2025-05-31 16:46:46.402951544 -0500 +@@ -1,7 +1,7 @@ + CC ?= gcc + CFLAGS ?= -Wall -O2 + LDFLAGS ?= +-TERMLIB = -lncurses ++TERMLIB = -ltinfow + srcdir ?= . + + all: lesstest lt_screen diff --git a/system/libarchive/APKBUILD b/system/libarchive/APKBUILD index 9fcca3319..4c63983d6 100644 --- a/system/libarchive/APKBUILD +++ b/system/libarchive/APKBUILD @@ -1,20 +1,20 @@ # Contributor: Sergey Lukin <sergej.lukin@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libarchive -pkgver=3.7.2 +pkgver=3.8.0 pkgrel=0 pkgdesc="Multi-format archive and compression library" url="https://www.libarchive.org/" arch="all" license="BSD-2-Clause AND BSD-3-Clause AND Public-Domain" depends="" -makedepends="zlib-dev bzip2-dev xz-dev lz4-dev acl-dev openssl-dev expat-dev - attr-dev zstd-dev" +makedepends="acl-dev attr-dev bzip2-dev expat-dev lz4-dev openssl-dev pcre2-dev + xz-dev zlib-dev zstd-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-tools" source="https://github.com/libarchive/libarchive/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz disable-locale-tests.patch disable-unaligned-access-arm32-xxhash.patch - fix-test-32-bit-zstd.patch + test-fix.patch " # secfixes: @@ -40,6 +40,7 @@ build () { --with-lz4 \ --enable-acl \ --enable-xattr \ + --enable-posix-regex-lib=libpcre2posix \ ac_cv_header_linux_fiemap_h=no make } @@ -61,7 +62,7 @@ tools() { ln -s bsdcpio "$subpkgdir"/usr/bin/cpio } -sha512sums="1af253203df3014d1fbf3e99ebdc7aa2a3f036c7c2606d0f0550c49973b0fff99ee7262f4a6e20090c0806c40e964731334360daa3b718bde40108183eacc8a1 libarchive-3.7.2.tar.gz -27cf2aaa3e70e3a2a9944fac0c96c411e669c7e1a48daad1423bff68eef0f49153e5ef9d22dc9591a65353119d7fe203a28258ab82278aeb86b46fe691bcfb6a disable-locale-tests.patch +sha512sums="e563cd10cd447daf7c5d11c657cbc3d8971add4440264fb4754ea7670a249e8b7b1c31f62f78259867960392623dba73c2d20efc57dc02564c8f55841dc8f2cc libarchive-3.8.0.tar.gz +0360eb38364af93ebe81fc59e6a2b1bdb9c1d42487560c3565c5723a57f8f5ee85638ad6906f761d9b41f7d6ad03bad800810394ea1bfcfc70e6c07b25bcfad6 disable-locale-tests.patch 56a2b13b6cd7b127c04ac50ebf49994ec91ff2467d5d0f32b8428bd4df82b167459d4630dee5d1b5119f70b04ea6fe4411d44b768e0f313fa302c9e5fe51b7cd disable-unaligned-access-arm32-xxhash.patch -f0a8e3881e742395afc74e418eceab419280152f0884fd6b9dc971d90e117de1cd0a7578c08f14f694c75b904f12fa71fb0102dde0d67a095f6369b3413f7348 fix-test-32-bit-zstd.patch" +1eee8588058ce1de122d20de1ac67f8294be5b8d1ea28dc7adf28cee86eb45e697983a051f25a38d2e0ca92b9996e1d13707b985b86ff1647c8960ffca965fea test-fix.patch" diff --git a/system/libarchive/disable-locale-tests.patch b/system/libarchive/disable-locale-tests.patch index 885490c95..0775e8cc9 100644 --- a/system/libarchive/disable-locale-tests.patch +++ b/system/libarchive/disable-locale-tests.patch @@ -1,6 +1,6 @@ --- libarchive-3.6.0/libarchive/test/test_gnutar_filename_encoding.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_gnutar_filename_encoding.c 2022-02-20 17:08:38.820000000 -0600 -@@ -75,7 +75,7 @@ +@@ -73,7 +73,7 @@ char buff[4096]; size_t used; @@ -9,7 +9,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -116,7 +116,7 @@ +@@ -114,7 +114,7 @@ char buff[4096]; size_t used; @@ -18,7 +18,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -157,8 +157,7 @@ +@@ -155,8 +155,7 @@ char buff[4096]; size_t used; @@ -28,7 +28,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -242,7 +241,7 @@ +@@ -240,7 +239,7 @@ char buff[4096]; size_t used; @@ -37,7 +37,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -277,7 +276,7 @@ +@@ -275,7 +274,7 @@ char buff[4096]; size_t used; @@ -46,7 +46,7 @@ skipping("eucJP locale not available on this system."); return; } -@@ -357,8 +356,7 @@ +@@ -355,8 +354,7 @@ char buff[4096]; size_t used; @@ -58,7 +58,7 @@ } --- libarchive-3.6.0/libarchive/test/test_pax_filename_encoding.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_pax_filename_encoding.c 2022-02-20 17:09:41.050000000 -0600 -@@ -342,7 +342,7 @@ +@@ -341,7 +341,7 @@ char buff[4096]; size_t used; @@ -67,7 +67,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -388,8 +388,7 @@ +@@ -387,8 +387,7 @@ char buff[4096]; size_t used; @@ -77,7 +77,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -435,7 +434,7 @@ +@@ -434,7 +433,7 @@ char buff[4096]; size_t used; @@ -86,7 +86,7 @@ skipping("eucJP locale not available on this system."); return; } -@@ -482,8 +481,7 @@ +@@ -481,8 +480,7 @@ char buff[4096]; size_t used; @@ -98,7 +98,7 @@ } --- libarchive-3.6.0/libarchive/test/test_read_format_cpio_filename.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_read_format_cpio_filename.c 2022-02-20 17:16:18.580000000 -0600 -@@ -91,7 +91,7 @@ +@@ -90,7 +90,7 @@ /* * Read UTF-8 filename in ja_JP.eucJP with "hdrcharset=UTF-8" option. */ @@ -107,7 +107,7 @@ skipping("ja_JP.eucJP locale not available on this system."); return; } -@@ -191,8 +191,7 @@ +@@ -196,8 +196,7 @@ /* * Read CP866 filename in ru_RU.KOI8-R with "hdrcharset=CP866" option. */ @@ -117,7 +117,7 @@ skipping("ru_RU.KOI8-R locale not available on this system."); return; } -@@ -296,8 +295,7 @@ +@@ -301,8 +300,7 @@ /* * Read KOI8-R filename in ru_RU.CP866 with "hdrcharset=KOI8-R" option. */ @@ -127,7 +127,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -401,8 +399,7 @@ +@@ -406,8 +404,7 @@ /* * Read UTF-8 filename in ru_RU.KOI8-R with "hdrcharset=UTF-8" option. */ @@ -137,7 +137,7 @@ skipping("ru_RU.KOI8-R locale not available on this system."); return; } -@@ -454,8 +451,7 @@ +@@ -459,8 +456,7 @@ /* * Read UTF-8 filename in ru_RU.CP866 with "hdrcharset=UTF-8" option. */ @@ -147,7 +147,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -553,8 +549,7 @@ +@@ -564,8 +560,7 @@ /* * Read eucJP filename in CP932/SJIS with "hdrcharset=eucJP" option. */ @@ -157,7 +157,7 @@ skipping("CP932 locale not available on this system."); return; } -@@ -604,8 +599,7 @@ +@@ -615,8 +600,7 @@ /* * Read UTF-8 filename in CP932/SJIS with "hdrcharset=UTF-8" option. */ @@ -167,7 +167,7 @@ skipping("CP932 locale not available on this system."); return; } -@@ -656,8 +650,7 @@ +@@ -667,8 +661,7 @@ /* * Read CP866 filename in CP1251 with "hdrcharset=CP866" option. */ @@ -177,7 +177,7 @@ skipping("CP1251 locale not available on this system."); return; } -@@ -715,7 +708,7 @@ +@@ -726,7 +719,7 @@ /* * Read CP866 filename in CP1251 without "hdrcharset=CP866" option. */ @@ -186,7 +186,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -761,8 +754,7 @@ +@@ -772,8 +765,7 @@ /* * Read KOI8-R filename in CP1251 with "hdrcharset=KOI8-R" option. */ @@ -196,7 +196,7 @@ skipping("CP1251 locale not available on this system."); return; } -@@ -814,8 +806,7 @@ +@@ -825,8 +817,7 @@ /* * Read KOI8-R filename in CP1251 with "hdrcharset=KOI8-R" option. */ @@ -208,7 +208,7 @@ } --- libarchive-3.6.0/libarchive/test/test_read_format_gtar_filename.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_read_format_gtar_filename.c 2022-02-20 17:17:56.960000000 -0600 -@@ -89,8 +89,7 @@ +@@ -88,8 +88,7 @@ /* * Read CP866 filename in ru_RU.KOI8-R with "hdrcharset=CP866" option. */ @@ -218,7 +218,7 @@ skipping("ru_RU.KOI8-R locale not available on this system."); return; } -@@ -194,8 +193,7 @@ +@@ -193,8 +192,7 @@ /* * Read KOI8-R filename in ru_RU.CP866 with "hdrcharset=KOI8-R" option. */ @@ -228,7 +228,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -299,8 +297,7 @@ +@@ -298,8 +296,7 @@ /* * Read eucJP filename in CP932/SJIS with "hdrcharset=eucJP" option. */ @@ -238,7 +238,7 @@ skipping("CP932 locale not available on this system."); return; } -@@ -350,8 +347,7 @@ +@@ -349,8 +346,7 @@ /* * Read CP866 filename in CP1251 with "hdrcharset=CP866" option. */ @@ -248,7 +248,7 @@ skipping("CP1251 locale not available on this system."); return; } -@@ -409,7 +405,7 @@ +@@ -408,7 +404,7 @@ /* * Read CP866 filename in CP1251 without "hdrcharset=CP866" option. */ @@ -257,7 +257,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -455,8 +451,7 @@ +@@ -454,8 +450,7 @@ /* * Read KOI8-R filename in CP1251 with "hdrcharset=KOI8-R" option. */ @@ -269,7 +269,7 @@ } --- libarchive-3.6.0/libarchive/test/test_read_format_rar.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_read_format_rar.c 2022-02-20 17:19:17.710000000 -0600 -@@ -336,8 +336,7 @@ +@@ -344,8 +344,7 @@ struct archive_entry *ae; struct archive *a; @@ -281,7 +281,7 @@ } --- libarchive-3.6.0/libarchive/test/test_read_format_zip_filename.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_read_format_zip_filename.c 2022-02-20 17:29:22.640000000 -0600 -@@ -176,7 +176,7 @@ +@@ -175,7 +175,7 @@ * because the file name in the sample file is UTF-8 and * Bit 11 of its general purpose bit flag is set. */ @@ -290,7 +290,7 @@ skipping("ja_JP.eucJP locale not availablefilename_ on " "this system."); return; -@@ -343,8 +343,7 @@ +@@ -342,8 +342,7 @@ /* * Read CP866 filename in ru_RU.KOI8-R with "hdrcharset=CP866" option. */ @@ -300,7 +300,7 @@ skipping("ru_RU.KOI8-R locale not available on this system."); return; } -@@ -456,8 +455,7 @@ +@@ -455,8 +454,7 @@ /* * Read KOI8-R filename in ru_RU.CP866 with "hdrcharset=KOI8-R" option. */ @@ -310,7 +310,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -569,8 +567,7 @@ +@@ -568,8 +566,7 @@ /* * Read UTF-8 filename in ru_RU.KOI8-R with "hdrcharset=UTF-8" option. */ @@ -320,7 +320,7 @@ skipping("ru_RU.KOI8-R locale not available on this system."); return; } -@@ -633,8 +630,7 @@ +@@ -632,8 +629,7 @@ * because the file name in the sample file is UTF-8 and * Bit 11 of its general purpose bit flag is set. */ @@ -330,7 +330,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -809,8 +805,7 @@ +@@ -808,8 +804,7 @@ * because the file name in the sample file is UTF-8 and * Bit 11 of its general purpose bit flag is set. */ @@ -340,7 +340,7 @@ skipping("CP932 locale not available on this system."); return; } -@@ -884,8 +879,7 @@ +@@ -883,8 +878,7 @@ /* * Read CP866 filename in CP1251 with "hdrcharset=CP866" option. */ @@ -350,7 +350,7 @@ skipping("CP1251 locale not available on this system."); return; } -@@ -947,7 +941,7 @@ +@@ -946,7 +940,7 @@ /* * Read CP866 filename in CP1251 without "hdrcharset=CP866" option. */ @@ -359,7 +359,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -997,8 +991,7 @@ +@@ -996,8 +990,7 @@ /* * Read KOI8-R filename in CP1251 with "hdrcharset=KOI8-R" option. */ @@ -369,7 +369,7 @@ skipping("CP1251 locale not available on this system."); return; } -@@ -1056,8 +1049,7 @@ +@@ -1055,8 +1048,7 @@ * because the file name in the sample file is UTF-8 and * Bit 11 of its general purpose bit flag is set. */ @@ -381,7 +381,7 @@ } --- libarchive-3.6.0/libarchive/test/test_ustar_filename_encoding.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_ustar_filename_encoding.c 2022-02-20 17:30:54.440000000 -0600 -@@ -75,7 +75,7 @@ +@@ -74,7 +74,7 @@ char buff[4096]; size_t used; @@ -390,7 +390,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -116,7 +116,7 @@ +@@ -115,7 +115,7 @@ char buff[4096]; size_t used; @@ -399,7 +399,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -157,8 +157,7 @@ +@@ -156,8 +156,7 @@ char buff[4096]; size_t used; @@ -409,7 +409,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -242,7 +241,7 @@ +@@ -241,7 +240,7 @@ char buff[4096]; size_t used; @@ -418,7 +418,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -277,7 +276,7 @@ +@@ -276,7 +275,7 @@ char buff[4096]; size_t used; @@ -427,7 +427,7 @@ skipping("eucJP locale not available on this system."); return; } -@@ -357,8 +356,7 @@ +@@ -356,8 +355,7 @@ char buff[4096]; size_t used; @@ -439,7 +439,7 @@ } --- libarchive-3.6.0/libarchive/test/test_zip_filename_encoding.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_zip_filename_encoding.c 2022-02-20 17:41:15.060000000 -0600 -@@ -122,7 +122,7 @@ +@@ -124,7 +124,7 @@ char buff[4096]; size_t used; @@ -448,7 +448,7 @@ skipping("KOI8-R locale not available on this system."); return; } -@@ -222,7 +222,7 @@ +@@ -224,7 +224,7 @@ char buff[4096]; size_t used; @@ -457,7 +457,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -265,7 +265,7 @@ +@@ -267,7 +267,7 @@ char buff[4096]; size_t used; @@ -466,7 +466,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -334,7 +334,7 @@ +@@ -336,7 +336,7 @@ char buff[4096]; size_t used; @@ -475,7 +475,7 @@ skipping("eucJP locale not available on this system."); return; } -@@ -433,8 +433,7 @@ +@@ -435,8 +435,7 @@ char buff[4096]; size_t used; @@ -487,7 +487,7 @@ } --- libarchive-3.6.0/libarchive/test/test_read_format_tar_filename.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_read_format_tar_filename.c 2022-02-20 17:54:34.540000000 -0600 -@@ -47,8 +47,7 @@ +@@ -46,8 +46,7 @@ * Read filename in ru_RU.CP866 with "hdrcharset=KOI8-R" option. * We should correctly read two filenames. */ @@ -497,7 +497,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -276,8 +275,7 @@ +@@ -275,8 +274,7 @@ * Read filename in CP1251 with "hdrcharset=KOI8-R" option. * We should correctly read two filenames. */ @@ -509,7 +509,7 @@ } --- libarchive-3.6.0/libarchive/test/test_read_format_ustar_filename.c.old 2022-02-09 06:24:12.000000000 -0600 +++ libarchive-3.6.0/libarchive/test/test_read_format_ustar_filename.c 2022-02-20 17:56:02.310000000 -0600 -@@ -90,8 +90,7 @@ +@@ -89,8 +89,7 @@ /* * Read CP866 filename in ru_RU.KOI8-R with "hdrcharset=CP866" option. */ @@ -519,7 +519,7 @@ skipping("ru_RU.KOI8-R locale not available on this system."); return; } -@@ -200,8 +199,7 @@ +@@ -199,8 +198,7 @@ /* * Read KOI8-R filename in ru_RU.CP866 with "hdrcharset=KOI8-R" option. */ @@ -529,7 +529,7 @@ skipping("ru_RU.CP866 locale not available on this system."); return; } -@@ -311,8 +309,7 @@ +@@ -310,8 +308,7 @@ /* * Read eucJP filename in CP932/SJIS with "hdrcharset=eucJP" option. */ @@ -539,7 +539,7 @@ skipping("CP932 locale not available on this system."); return; } -@@ -365,8 +362,7 @@ +@@ -364,8 +361,7 @@ /* * Read CP866 filename in CP1251 with "hdrcharset=CP866" option. */ @@ -549,7 +549,7 @@ skipping("CP1251 locale not available on this system."); return; } -@@ -427,7 +423,7 @@ +@@ -426,7 +422,7 @@ /* * Read CP866 filename in CP1251 without "hdrcharset=CP866" option. */ @@ -558,7 +558,7 @@ skipping("Russian_Russia locale not available on this system."); return; } -@@ -476,8 +472,7 @@ +@@ -475,8 +471,7 @@ /* * Read KOI8-R filename in CP1251 with "hdrcharset=KOI8-R" option. */ @@ -568,3 +568,14 @@ skipping("CP1251 locale not available on this system."); return; } +--- libarchive-3.8.0/libarchive/test/test_archive_string_conversion.c.old 2025-05-20 04:00:39.000000000 -0500 ++++ libarchive-3.8.0/libarchive/test/test_archive_string_conversion.c 2025-05-31 18:27:37.470770608 -0500 +@@ -995,7 +995,7 @@ + + memset(&mstr, 0, sizeof(mstr)); + +- if (setlocale(LC_ALL, "ru_RU.KOI8-R") == NULL) { ++ if (1) { + skipping("KOI8-R locale not available on this system."); + return; + } diff --git a/system/libarchive/fix-test-32-bit-zstd.patch b/system/libarchive/fix-test-32-bit-zstd.patch deleted file mode 100644 index 5f43c2626..000000000 --- a/system/libarchive/fix-test-32-bit-zstd.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3bd918d92f8c34ba12de9c6604d96f9e262a59fc Mon Sep 17 00:00:00 2001 -From: Martin Matuska <martin@matuska.de> -Date: Tue, 12 Sep 2023 08:54:47 +0200 -Subject: [PATCH] tests: fix zstd long option test for 32-bit architectures - -Fixes #1968 ---- - libarchive/test/test_write_filter_zstd.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/libarchive/test/test_write_filter_zstd.c b/libarchive/test/test_write_filter_zstd.c -index 3cdbd812a..c9731f1b6 100644 ---- a/libarchive/test/test_write_filter_zstd.c -+++ b/libarchive/test/test_write_filter_zstd.c -@@ -161,8 +161,12 @@ DEFINE_TEST(test_write_filter_zstd) - archive_write_set_filter_option(a, NULL, "max-frame-size", "1048576")); - #endif - #if ZSTD_VERSION_NUMBER >= MINVER_LONG -- assertEqualIntA(a, ARCHIVE_OK, -- archive_write_set_filter_option(a, NULL, "long", "27")); -+ if ((int)(sizeof(size_t) == 4)) -+ assertEqualIntA(a, ARCHIVE_OK, -+ archive_write_set_filter_option(a, NULL, "long", "26")); -+ else -+ assertEqualIntA(a, ARCHIVE_OK, -+ archive_write_set_filter_option(a, NULL, "long", "27")); - assertEqualIntA(a, ARCHIVE_FAILED, - archive_write_set_filter_option(a, NULL, "long", "-1")); /* negative */ - #endif diff --git a/system/libarchive/test-fix.patch b/system/libarchive/test-fix.patch new file mode 100644 index 000000000..484145dd3 --- /dev/null +++ b/system/libarchive/test-fix.patch @@ -0,0 +1,13 @@ +Upstream-URL: https://github.com/libarchive/libarchive/issues/2653 + +--- libarchive-3.8.0/test_utils/test_main.c.old 2025-05-20 04:00:39.000000000 -0500 ++++ libarchive-3.8.0/test_utils/test_main.c 2025-05-31 17:39:16.638713788 -0500 +@@ -2456,7 +2456,7 @@ + + /* Skip arbitrary third-party version numbers. */ + while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || +- isalnum((unsigned char)*q))) { ++ *q == '_' || isalnum((unsigned char)*q))) { + ++q; + --s; + } diff --git a/system/libbsd/APKBUILD b/system/libbsd/APKBUILD index 66270a012..68b7c1505 100644 --- a/system/libbsd/APKBUILD +++ b/system/libbsd/APKBUILD @@ -2,24 +2,17 @@ # Contributor: Ariadne Conill <ariadne@dereferenced.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libbsd -pkgver=0.10.0 +pkgver=0.12.2 pkgrel=0 pkgdesc="Commonly used BSD functions not implemented by all libcs" url="https://libbsd.freedesktop.org/" arch="all" license="BSD-2-Clause-NetBSD AND BSD-3-Clause AND BSD-4-Clause AND BSD-5-Clause AND Expat AND ISC AND Public-Domain AND Beerware" depends="musl>=1.1.16-r22" -depends_dev="bsd-compat-headers linux-headers" -makedepends="$depends_dev autoconf automake libtool" +depends_dev="bsd-compat-headers libmd-dev linux-headers" +makedepends="$depends_dev" subpackages="$pkgname-dev $pkgname-doc" -source="https://libbsd.freedesktop.org/releases/$pkgname-$pkgver.tar.xz - disable-fpurge-test.patch - " - -prepare() { - default_prepare - autoreconf -fi -} +source="https://libbsd.freedesktop.org/releases/$pkgname-$pkgver.tar.xz" build() { ./configure \ @@ -41,5 +34,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="b75529785b16c93d31401187f8a58258fbebe565dac071c8311775c913af989f62cd29d5ce2651af3ea6221cffd31cf04826577d3e546ab9ca14340f297777b9 libbsd-0.10.0.tar.xz -424828e759420afbf2d4b97f5d402be9b3d51cb90241da1f047517bb75048255ea6cbbbc1e98bffa67449a7f48efe00d8f99b38bdaac9e8c461d1e989e9697b7 disable-fpurge-test.patch" +sha512sums="ce43e4f0486d5f00d4a8119ee863eaaa2f968cae4aa3d622976bb31ad601dfc565afacef7ebade5eba33fff1c329b5296c6387c008d1e1805d878431038f8b21 libbsd-0.12.2.tar.xz" diff --git a/system/libbsd/disable-fpurge-test.patch b/system/libbsd/disable-fpurge-test.patch deleted file mode 100644 index ef6241f62..000000000 --- a/system/libbsd/disable-fpurge-test.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libbsd-0.8.3/test/Makefile.am.old 2017-08-17 02:42:30.045825258 +0000 -+++ libbsd-0.8.3/test/Makefile.am 2017-08-17 03:49:17.928202106 +0000 -@@ -38,7 +38,6 @@ - humanize \ - fgetln \ - fparseln \ -- fpurge \ - md5 \ - proctitle-init \ - strmode \ diff --git a/system/libcap-ng/APKBUILD b/system/libcap-ng/APKBUILD index f2a2d4207..ef308a6bb 100644 --- a/system/libcap-ng/APKBUILD +++ b/system/libcap-ng/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Zach van Rijn <me@zv.io> pkgname=libcap-ng -pkgver=0.8.3 +pkgver=0.8.5 pkgrel=0 pkgdesc="POSIX capabilities library" url="https://people.redhat.com/sgrubb/libcap-ng/index.html" @@ -41,4 +41,4 @@ utils() { mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ } -sha512sums="0ef9bc7bc6b7b59991f43b79aa6cde3e8d2c22c4b9ced2af8deae501e01d51e893033d109cb8aa0fdcba190140110993089245346334d7b114d18f1bb1b55b97 libcap-ng-0.8.3.tar.gz" +sha512sums="89fb86454847f354c012411ecdc7e17f07bb40d7e9719ca0b93ea81c436113685bbbb5c1b9cb1b7ac92d216c105c687285304135beb156aedd55ab1c61e4f269 libcap-ng-0.8.5.tar.gz" diff --git a/system/libcap/APKBUILD b/system/libcap/APKBUILD index 8aadc5445..2882ccce1 100644 --- a/system/libcap/APKBUILD +++ b/system/libcap/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Zach van Rijn <me@zv.io> pkgname=libcap -pkgver=2.68 -pkgrel=1 +pkgver=2.76 +pkgrel=0 pkgdesc="POSIX 1003.1e capabilities" arch="all" license="BSD-3-Clause OR GPL-2.0-only" @@ -44,4 +44,4 @@ package() { mv "$pkgdir"/usr/sbin "$pkgdir"/ } -sha512sums="ede3e1356aef22e18a46dc8ff0727500ab023bea698cf2bb822abb06625e272940afea52ad6457d0cd8cf1c7f435f1b568baf0a6bf0a08ae96fbf6d7502f9de2 libcap-2.68.tar.xz" +sha512sums="f9448628ce036a10ce71958b25e5dd31032c4d86d8d34d905d2dfa32890ad443804169d4c6b825fd4bfe260b5de20f046cee958e40268bcadbbe7f7731ae40ad libcap-2.76.tar.xz" diff --git a/system/libedit/APKBUILD b/system/libedit/APKBUILD index 6968aed53..72d063912 100644 --- a/system/libedit/APKBUILD +++ b/system/libedit/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libedit -pkgver=20210910.3.1 +pkgver=20250104.3.1 _realver="${pkgver%%.*}-${pkgver#*.}" pkgrel=0 pkgdesc="Library providing line editing, history, and tokenisation functions" @@ -39,4 +39,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="b7361c277f971ebe87e0e539e5e1fb01a4ca1bbab61e199eb97774d8b60dddeb9e35796faf9cc68eb86d1890e8aac11db13b44b57ccc8302d559741fbe9d979e libedit-20210910-3.1.tar.gz" +sha512sums="4b4a8b4b1f2cb952bbb3d128605eba9bc7cd0ad35c44b2c099f067c8bea69455bd11faae4ff20384bbe0ea901b25a1249d8323dea4ccd6141a17393f62bb8df2 libedit-20250104-3.1.tar.gz" diff --git a/system/libffi/APKBUILD b/system/libffi/APKBUILD index 48f7bb2d5..da046103d 100644 --- a/system/libffi/APKBUILD +++ b/system/libffi/APKBUILD @@ -1,9 +1,9 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libffi -pkgver=3.4.4 +pkgver=3.4.8 pkgrel=0 pkgdesc="A portable foreign function interface library" -url="https://sourceware.org/libffi" +url="https://sourceware.org/libffi/" arch="all" license="MIT" depends="" @@ -21,8 +21,6 @@ build () { } check() { - rm -v testsuite/libffi.call/s55.c #979 - make check } @@ -32,4 +30,4 @@ package() { install -m644 LICENSE ""$pkgdir"/usr/share/licenses/$pkgname/" } -sha512sums="88680aeb0fa0dc0319e5cd2ba45b4b5a340bc9b4bcf20b1e0613b39cd898f177a3863aa94034d8e23a7f6f44d858a53dcd36d1bb8dee13b751ef814224061889 libffi-3.4.4.tar.gz" +sha512sums="05344c6c1a1a5b44704f6cf99277098d1ea3ac1dc11c2a691c501786a214f76184ec0637135588630db609ce79e49df3dbd00282dd61e7f21137afba70e24ffe libffi-3.4.8.tar.gz" diff --git a/system/libgcrypt/APKBUILD b/system/libgcrypt/APKBUILD index da5eb8713..baa40fc7a 100644 --- a/system/libgcrypt/APKBUILD +++ b/system/libgcrypt/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libgcrypt -pkgver=1.10.1 +pkgver=1.11.1 pkgrel=0 pkgdesc="GnuPG cryptography library" url="https://www.gnupg.org" @@ -29,13 +29,6 @@ build() { ;; esac - case "$CARCH" in - pmmx) - # https://git.adelielinux.org/adelie/packages/-/issues/511 - _arch_configure="${_arch_configure} --disable-asm" - ;; - esac - ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -58,4 +51,4 @@ package() { rm -f ${pkgdir}/usr/share/info/dir } -sha512sums="e5ca7966624fff16c3013795836a2c4377f0193dbb4ac5ad2b79654b1fa8992e17d83816569a402212dc8367a7980d4141f5d6ac282bae6b9f02186365b61f13 libgcrypt-1.10.1.tar.bz2" +sha512sums="85846d62ce785e4250a2bf8a2b13ec24837e48ab8e10d537ad4a18d650d2cca747f82fd1501feab47ad3114b9593b36c9fa7a892f48139e2a71ef61295a47678 libgcrypt-1.11.1.tar.bz2" diff --git a/system/libgpg-error/APKBUILD b/system/libgpg-error/APKBUILD index dec8c1613..a6fc5841f 100644 --- a/system/libgpg-error/APKBUILD +++ b/system/libgpg-error/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libgpg-error -pkgver=1.46 +pkgver=1.55 pkgrel=0 pkgdesc="GnuPG runtime library" url="https://www.gnupg.org" @@ -19,7 +19,8 @@ build() { --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --localstatedir=/var + --localstatedir=/var \ + --enable-install-gpg-error-config make } @@ -36,4 +37,4 @@ lisp() { mv "$pkgdir"/usr/share "$subpkgdir"/usr/share/ } -sha512sums="b06223bb2b0f67d3db5d0d9ab116361a0eda175d4667352b5c0941408d37f2b0ba8e507297e480ccebb88cbba9d0a133820b896914b07d264fb3edaac7b8c99d libgpg-error-1.46.tar.bz2" +sha512sums="d3f6ca9d9abefe81f5cbbc195fbe259d3362119018c535ad2621ee407cad3487011325a9f4c4a15442a9ac5a0fe7ce86dafd7b3d891a446516362ba6b7b9047b libgpg-error-1.55.tar.bz2" diff --git a/system/libidn/APKBUILD b/system/libidn/APKBUILD index 2cf6e7a1a..f8143e85e 100644 --- a/system/libidn/APKBUILD +++ b/system/libidn/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Michael Mason <ms13sp@gmail.com> # Maintainer: pkgname=libidn -pkgver=1.40 +pkgver=1.43 pkgrel=0 pkgdesc="Library for internationalized domain names" url="https://www.gnu.org/software/libidn/" @@ -39,4 +39,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="6588454c0a6153b76090057c0f3b97ef6cd78b3d7c84dd27cb9537556b7f6d2b4048485c3b82e33e9fb3c9b8d308c0899676ea92f92cf201a6454bd9af781f96 libidn-1.40.tar.gz" +sha512sums="a098d9c1df9d47181e7707a115dcfa12ba4b1aba68b1d070eff4f0578fd2e09b9c453457f83fc1a704726eac3a6f90e5a00772ab116affd07efe1e1ab9d5b0f1 libidn-1.43.tar.gz" diff --git a/system/libmd/APKBUILD b/system/libmd/APKBUILD new file mode 100644 index 000000000..361dcd8d3 --- /dev/null +++ b/system/libmd/APKBUILD @@ -0,0 +1,33 @@ +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=libmd +pkgver=1.1.0 +pkgrel=0 +pkgdesc="Message Digest functions from BSD systems" +url="https://libbsd.freedesktop.org/" +arch="all" +license="BSD-2-Clause AND BSD-2-Clause-NetBSD AND BSD-3-Clause AND Public-Domain AND Beerware" +depends="" +makedepends="" +subpackages="$pkgname-dev $pkgname-doc" +source="https://libbsd.freedesktop.org/releases/libmd-$pkgver.tar.xz" + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="5d0da3337038e474fae7377bbc646d17214e72dc848a7aadc157f49333ce7b5ac1456e45d13674bd410ea08477c6115fc4282fed6c8e6a0bf63537a418c0df96 libmd-1.1.0.tar.xz" diff --git a/system/libpipeline/APKBUILD b/system/libpipeline/APKBUILD index a772cc14e..8888a4f40 100644 --- a/system/libpipeline/APKBUILD +++ b/system/libpipeline/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libpipeline -pkgver=1.5.7 +pkgver=1.5.8 pkgrel=0 pkgdesc="C pipeline manipulation library" url="https://libpipeline.nongnu.org/" @@ -32,4 +32,4 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="bb3be954f5d826cef805f85d65759fb197c31adf80d92360c7d0caa486e0d4877510681390ca01c028b6e805f968f14e8bf4b3eca02e429529031787e7f14d84 libpipeline-1.5.7.tar.gz" +sha512sums="0ae94df4bd508f0e664fa5430687d64904c60d69d9565c18cacb70251f8653cb7c571325d1406c859fdd149048adce8c4b3bf028573064496d7da3436e27b9b0 libpipeline-1.5.8.tar.gz" diff --git a/system/libssh2/APKBUILD b/system/libssh2/APKBUILD index abf895908..b2a057903 100644 --- a/system/libssh2/APKBUILD +++ b/system/libssh2/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Ariadne Conill <ariadne@dereferenced.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libssh2 -pkgver=1.10.0 +pkgver=1.11.1 pkgrel=0 pkgdesc="Library for accessing SSH servers" url="https://libssh2.org/" @@ -10,12 +10,8 @@ license="BSD-3-Clause" checkdepends="openssh-server" makedepends="openssl-dev zlib-dev" subpackages="$pkgname-dev $pkgname-doc" -#< zv> heads up that ipv6 on www.libssh2.org seems to be down -#< bagder> yeah, I know. its a misconfigure thing since a while back -#source="https://www.libssh2.org/download/libssh2-$pkgver.tar.gz -source="https://github.com/libssh2/libssh2/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz +source="https://www.libssh2.org/download/libssh2-$pkgver.tar.gz test-sshd.patch - fix-tests.patch " # secfixes: @@ -31,7 +27,8 @@ build() { --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ - --disable-rpath + --disable-rpath \ + --disable-docker-tests make } @@ -43,6 +40,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="e064ee1089eb8e6cd5fa2617f4fd8ff56c2721c5476775a98bdb68c6c4ee4d05c706c3bb0eb479a27a8ec0b17a8a5ef43e1d028ad3f134519aa582d3981a3a30 libssh2-1.10.0.tar.gz -d6d4dfcd96bfa08210ecfb94c71624e011f294bab0b88548f41caff48283c2102ff012a6a6e71a100aa1d6430c8470fc0175449f31ae4583b6f8cfa224983603 test-sshd.patch -d075765062e3ffefb90902c9644ecde17f9bb39eac8ab5759370a26206f5804cb71b8b2d9b8d3ce9989c209bc36483dbc25f894f8c0ec9081aaef1a489c048df fix-tests.patch" +sha512sums="8703636fc28f0b12c8171712f3d605e0466a5bb9ba06e136c3203548fc3408ab07defd71dc801d7009a337e1e02fd60e8933a2a526d5ef0ce53153058d201233 libssh2-1.11.1.tar.gz +3df4e616bfa994876d60c1a6883a3d48c6c51d20423e2a7d2fa13cfc9ce61b0079bd17f51a0fcc1cc0de2dd9e8b06b5bbc59ad20389128781929ef3d5ef7ef8d test-sshd.patch" diff --git a/system/libssh2/fix-tests.patch b/system/libssh2/fix-tests.patch deleted file mode 100644 index 29f554991..000000000 --- a/system/libssh2/fix-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libssh2-1.9.0/tests/ssh2.sh.old 2022-04-27 23:22:54.532007741 -0500 -+++ libssh2-1.9.0/tests/ssh2.sh 2022-04-27 23:34:30.501706060 -0500 -@@ -27,6 +27,8 @@ - -o "AuthorizedKeysFile $srcdir/etc/user.pub" \ - -o 'UsePrivilegeSeparation no' \ - -o 'StrictModes no' \ -+ -o 'HostkeyAlgorithms +ssh-rsa' \ -+ -o 'PubkeyAcceptedAlgorithms +ssh-rsa' \ - -D \ - -e \ - $libssh2_sshd_params & diff --git a/system/libssh2/test-sshd.patch b/system/libssh2/test-sshd.patch index 5daa8ce00..a4bf65615 100644 --- a/system/libssh2/test-sshd.patch +++ b/system/libssh2/test-sshd.patch @@ -1,21 +1,12 @@ ---- libssh2-1.9.0/tests/ssh2.sh 2010-10-25 17:15:14.000000000 -0500 -+++ libssh2-1.9.0/tests/ssh2.sh 2019-09-11 18:52:25.932354801 -0500 -@@ -28,6 +28,7 @@ $SSHD -f /dev/null -h "$srcdir"/etc/host - -o 'UsePrivilegeSeparation no' \ - -o 'StrictModes no' \ - -D \ -+ -e \ - $libssh2_sshd_params & - sshdpid=$! - ---- libssh2-1.9.0/tests/ssh2.c 2019-03-26 08:08:54.000000000 -0500 -+++ libssh2-1.9.0/tests/ssh2.c 2019-09-11 19:38:03.782403778 -0500 -@@ -147,20 +147,6 @@ int main(int argc, char *argv[]) +--- libssh2-1.9.0/tests/test_ssh2.c 2019-03-26 08:08:54.000000000 -0500 ++++ libssh2-1.9.0/tests/test_ssh2.c 2019-09-11 19:38:03.782403778 -0500 +@@ -225,21 +225,6 @@ int main(int argc, char *argv[]) */ libssh2_channel_setenv(channel, "FOO", "bar"); - /* Request a terminal with 'vanilla' terminal emulation -- * See /etc/termcap for more options +- * See /etc/termcap for more options. This is useful when opening +- * an interactive shell. - */ - if(libssh2_channel_request_pty(channel, "vanilla")) { - fprintf(stderr, "Failed requesting pty\n"); @@ -28,6 +19,6 @@ - goto shutdown; - } - - ec = 0; + rc = 0; skip_shell: diff --git a/system/libucontext/APKBUILD b/system/libucontext/APKBUILD index ae05f76ff..b3e71e9ba 100644 --- a/system/libucontext/APKBUILD +++ b/system/libucontext/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libucontext -pkgver=1.2 +pkgver=1.3.2 pkgrel=0 pkgdesc="Implementation of software-defined threading" url=" " @@ -9,9 +9,7 @@ license="ISC" depends="" makedepends="" subpackages="$pkgname-dev" -source="https://distfiles.dereferenced.org/libucontext/libucontext-$pkgver.tar.xz - pmmx.patch - " +source="https://distfiles.dereferenced.org/libucontext/libucontext-$pkgver.tar.xz" case "$CTARGET_ARCH" in aarch64_be) LIBUCONTEXT_ARCH="aarch64" ;; @@ -22,16 +20,15 @@ pmmx) LIBUCONTEXT_ARCH="x86" ;; esac build() { - make ARCH="$LIBUCONTEXT_ARCH" + make ARCH="$LIBUCONTEXT_ARCH" libdir="/lib" } check() { - make ARCH="$LIBUCONTEXT_ARCH" check + make ARCH="$LIBUCONTEXT_ARCH" libdir="/lib" check } package() { - make ARCH="$LIBUCONTEXT_ARCH" DESTDIR="$pkgdir" install + make ARCH="$LIBUCONTEXT_ARCH" libdir="/lib" DESTDIR="$pkgdir" install } -sha512sums="6603f2dcd87c4d9919c1726f2964632483e1a647733ff543d5935e3e2dac548adf320f1f9fb4c494691fe99fb393d64b15369f04d3783b2ca4c40b68c3d87865 libucontext-1.2.tar.xz -e5855aaf5042856e019dcd8bbf85c1319c4ed3ea836fd64617595b1fcacc14a101f7631e9d07a8af7f624a82c59a5bc6d2c1011b961ba4fede37725b6f5e9c37 pmmx.patch" +sha512sums="3911a9a772832dad68dc4dbb78ca646cba92170d4e192948e0a6e78295f6ee27f20b637986d39450edae805c96b08f7e1716fa7904fc84258acab8691d87c4f5 libucontext-1.3.2.tar.xz" diff --git a/system/libucontext/pmmx.patch b/system/libucontext/pmmx.patch deleted file mode 100644 index 3f6019ab8..000000000 --- a/system/libucontext/pmmx.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 196db62779287efb098943c2d4f2433e4b8ea592 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Mon, 25 Apr 2022 23:34:32 -0500 -Subject: [PATCH] Revert "x86: port to use common trampoline" - -This reverts commit 388edbe12138e8300e230e2bc9c08a8f273e98d9. ---- - arch/x86/defs.h | 3 --- - arch/x86/startcontext.S | 41 +++++++++++++++++++++++++++++++++++++++++ - arch/x86/trampoline.c | 3 --- - 3 files changed, 41 insertions(+), 6 deletions(-) - create mode 100644 arch/x86/startcontext.S - delete mode 100644 arch/x86/trampoline.c - -diff --git a/arch/x86/defs.h b/arch/x86/defs.h -index 9370869..e0166e5 100644 ---- a/arch/x86/defs.h -+++ b/arch/x86/defs.h -@@ -57,9 +57,6 @@ - - #define MCONTEXT_GREGS (20) - --#define FETCH_LINKPTR(dest) \ -- asm("movl (%%esp, %%ebx, 4), %0" : "=r" ((dest))); -- - #include "common-defs.h" - - #endif -diff --git a/arch/x86/startcontext.S b/arch/x86/startcontext.S -new file mode 100644 -index 0000000..1cbc68c ---- /dev/null -+++ b/arch/x86/startcontext.S -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 2018, 2020 Ariadne Conill <ariadne@dereferenced.org> -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * This software is provided 'as is' and without any warranty, express or -+ * implied. In no event shall the authors be liable for any damages arising -+ * from the use of this software. -+ */ -+ -+#include "defs.h" -+ -+FUNC(libucontext_trampoline) -+ /* get the proper context into position and test for NULL */ -+ leal (%esp,%ebx,4), %esp -+ cmpl $0, (%esp) -+ -+ /* restore global offset table, exit@plt and libucontext_setcontext@plt need this */ -+ call __i686.get_pc_thunk.bx -+ addl $_GLOBAL_OFFSET_TABLE_, %ebx -+ -+ /* if we have no linked context, lets get out of here */ -+ je no_linked_context -+ -+ /* call setcontext to switch to the linked context */ -+ call libucontext_setcontext@plt -+ movl %eax, (%esp) -+ -+no_linked_context: -+ /* we are returning into a null context, it seems, so maybe we should exit */ -+ call exit@plt -+ -+ /* something is really hosed, call hlt to force termination */ -+ hlt -+ -+__i686.get_pc_thunk.bx: -+ mov (%esp), %ebx -+ ret -+END(libucontext_trampoline) -diff --git a/arch/x86/trampoline.c b/arch/x86/trampoline.c -deleted file mode 100644 -index 699a050..0000000 ---- a/arch/x86/trampoline.c -+++ /dev/null -@@ -1,3 +0,0 @@ --#include "defs.h" --#include <libucontext/libucontext.h> --#include "common-trampoline.c" --- -2.32.0 (Apple Git-132) - diff --git a/system/libxml2/APKBUILD b/system/libxml2/APKBUILD index 02b24e0ec..3c01c9ae7 100644 --- a/system/libxml2/APKBUILD +++ b/system/libxml2/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libxml2 -pkgver=2.13.3 +pkgver=2.13.7 pkgrel=0 pkgdesc="XML parsing library" url="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home" @@ -9,12 +9,12 @@ arch="all" options="!strip" license="MIT" depends="" -depends_dev="zlib-dev icu-dev" checkdepends="perl libarchive" -makedepends="$depends_dev python3-dev" +makedepends="$depends_dev icu-dev python3-dev zlib-dev" subpackages="$pkgname-doc $pkgname-dev py3-libxml2:py" provides="$pkgname-utils=$pkgver-r$pkgrel" source="https://download.gnome.org/sources/libxml2/${pkgver%.*}/libxml2-$pkgver.tar.xz + icu-77.patch python-segfault-fix.patch " @@ -45,6 +45,7 @@ build() { --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-icu \ + --with-zlib \ --without-iconv \ --with-python=/usr/bin/python3 \ --enable-static @@ -65,5 +66,6 @@ py() { mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/ } -sha512sums="682da3fc0e15852c3963207edb66aa201cabe9ec16f1fb2ca97d6d1273daa33fff6ed70e91589204cc09bf49961dc163b5e3d9ee38fdedac957453b0fd64b36d libxml2-2.13.3.tar.xz +sha512sums="6e69ed38cdf2aaa5df7e26b654a7aadd2d80131619184380bafc6a22811acb6b7286c819175c3b37edb194019a93ba6085852a0281934d6bb36d0b52ce138541 libxml2-2.13.7.tar.xz +226d72c42db8d9161ed7429869210bccec17e403b83df5525e2c8c7ac22326b7345f15b2072ba6d0467dd786285b02bccc8f2a4d1c4a627f4700f31f08abea9f icu-77.patch 384b3d2031cd8f77528190bbb7652faa9ccb22bc604bcf4927e59046d38830dac38010828fe1568b6514976f725981a6d3ac1aa595d31477a36db2afe491452c python-segfault-fix.patch" diff --git a/system/libxml2/icu-77.patch b/system/libxml2/icu-77.patch new file mode 100644 index 000000000..67040ee59 --- /dev/null +++ b/system/libxml2/icu-77.patch @@ -0,0 +1,87 @@ +--- libxml2-2.13.7/configure.old 2025-03-27 08:37:45.000000000 -0500 ++++ libxml2-2.13.7/configure 2025-05-31 00:21:33.827860625 -0500 +@@ -1711,7 +1711,7 @@ + LZMA_LIBS linker flags for LZMA, overriding pkg-config + ICU_CFLAGS C compiler flags for ICU, overriding pkg-config + ICU_LIBS linker flags for ICU, overriding pkg-config +- ICU_DEFS value of DEFS for icu-i18n, overriding pkg-config ++ ICU_DEFS value of DEFS for icu-uc, overriding pkg-config + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. +@@ -16281,19 +16281,19 @@ + # If this succeeeds, we ignore the WITH_ICU directory. + + pkg_failed=no +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icu-i18n" >&5 +-printf %s "checking for icu-i18n... " >&6; } ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icu-uc" >&5 ++printf %s "checking for icu-uc... " >&6; } + + if test -n "$ICU_CFLAGS"; then + pkg_cv_ICU_CFLAGS="$ICU_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n" 2>/dev/null` ++ pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -16305,12 +16305,12 @@ + pkg_cv_ICU_LIBS="$ICU_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-i18n" 2>/dev/null` ++ pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -16331,9 +16331,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n" 2>&1` ++ ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc" 2>&1` + else +- ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n" 2>&1` ++ ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ICU_PKG_ERRORS" >&5 +@@ -16349,18 +16349,18 @@ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + printf "%s\n" "yes" >&6; } + +- WITH_ICU=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} icu-i18n" ++ WITH_ICU=1; XML_PC_REQUIRES="${XML_PC_REQUIRES} icu-uc" + + if test -n "$ICU_DEFS"; then + pkg_cv_ICU_DEFS="$ICU_DEFS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_ICU_DEFS=`$PKG_CONFIG --variable="DEFS" "icu-i18n" 2>/dev/null` ++ pkg_cv_ICU_DEFS=`$PKG_CONFIG --variable="DEFS" "icu-uc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes diff --git a/system/lvm2/APKBUILD b/system/lvm2/APKBUILD index 626c1da98..e624e1822 100644 --- a/system/lvm2/APKBUILD +++ b/system/lvm2/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=lvm2 -pkgver=2.03.21 +pkgver=2.03.32 pkgrel=0 pkgdesc="Logical Volume Manager 2 utilities" url="https://sourceware.org/lvm2/" @@ -16,6 +16,7 @@ makedepends_host="$depends_dev util-linux-dev" makedepends="$makedepends_build $makedepends_host" replaces="device-mapper $pkgname-dmeventd" source="https://mirrors.kernel.org/sourceware/$pkgname/LVM2.$pkgver.tgz + bashism-configure.patch fix-stdio-usage.patch mlockall-default-config.patch lvm.initd @@ -86,8 +87,9 @@ udev() { } -sha512sums="6024811c3fa92afd2fc13a10d1c3542352aa9a016f40c3ef588bd2f5f3e41245fed4b36c8a87d9f7f8dddc6e13b7253396f5c811f99665df27751676dc7b5bde LVM2.2.03.21.tgz -40e49bb34a9c07493ab6a9948e3ac1a85e22f069b69ad2a1369cb7d30a6ea6d72a27f380ad8951f55d939834e2f29c9da589ae475322ea41b4dfce72060b9557 fix-stdio-usage.patch +sha512sums="6a7acebf10274b029211b0f5b7c7a9aabf2074a8e9ce1b72fce7eadffdaf2ebb23d9d998be41ff31a9e10808ece32ec2dde3454c82103c39084ac1beffe18ec1 LVM2.2.03.32.tgz +0a16a8f42de0eafcfed994f06a7adb14097ee44937b184aea6e1526a0cfbaf27a03d4dacaa3f3f272fdb2e90fc036984a43c42271a7558b47e6b6f2e824a9e5a bashism-configure.patch +ab5eb15aff6be96fe91245749095da28ec4d1f51f039e0d36f29eecaed5596cf79ea4cda90401a9d6fa78453b5247707f6018e11fa544bfdfd5c0c4de20b028c fix-stdio-usage.patch 0f1feeddf35a7208a240b13d87f479eeb5410ccb534ccd62714355b10721c4eff77d725c72a2b5270320bef12828c32d60003f187db990fad3fef37ec08c1dff mlockall-default-config.patch a853078660fd2fd943538924f56e81dc5793294e26b8f61d93e6188893f15f4a438d33792b341c1865d61e03f4a371b7c7ee0db5f4130ef7cb7aeaeb9290086a lvm.initd 07caf8fa942290f3c953cc2463aaf55bac01d0bcb9351daf3880fa4d0eefb67fe00761c46a7a4da91cd2f8e492a12fed35853a15dc939cd80d19d3303bc3951d lvm.confd diff --git a/system/lvm2/bashism-configure.patch b/system/lvm2/bashism-configure.patch new file mode 100644 index 000000000..5c9f3258c --- /dev/null +++ b/system/lvm2/bashism-configure.patch @@ -0,0 +1,49 @@ +Upstream-URL: https://gitlab.com/lvmteam/lvm2/-/merge_requests/29 + +From b0b259e3571b5be49d912e56518c9af734f317d4 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Mon, 2 Jun 2025 04:08:08 +0000 +Subject: [PATCH] configure: Use portable string comparison + += and == are equivalent in Bash for strings, but = is the only portable +operator for compatibility with other shells. Before this change, +running ./configure with Dash as /bin/sh resulted in: + +./configure: 14558: test: yes: unexpected operator + +and the test did not work (i.e. --enable-cmdlib --disable-shared allowed +a failed build to continue). Now, the test works in Bash and Dash. +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 342bd0047..75564a228 100755 +--- a/configure ++++ b/configure +@@ -14564,7 +14564,7 @@ printf %s "checking whether to compile liblvm2cmd.so... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMDLIB" >&5 + printf "%s\n" "$CMDLIB" >&6; } + +-if test "$CMDLIB" == "yes" && test "$SHARED_LINK" = "no" ++if test "$CMDLIB" = "yes" && test "$SHARED_LINK" = "no" + then : + as_fn_error $? "--enable-cmdlib requires dynamic linking." "$LINENO" 5 + fi +diff --git a/configure.ac b/configure.ac +index 6fcf6f2b5..470057be4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1395,7 +1395,7 @@ AS_IF([test "$CMDLIB" != "yes"], [CMDLIB="no" LVM2CMD_LIB=], [LVM2CMD_LIB="-llvm + AC_MSG_CHECKING([whether to compile liblvm2cmd.so]) + AC_MSG_RESULT([$CMDLIB]) + +-AS_IF([test "$CMDLIB" == "yes" && test "$SHARED_LINK" = "no"], ++AS_IF([test "$CMDLIB" = "yes" && test "$SHARED_LINK" = "no"], + [AC_MSG_ERROR([--enable-cmdlib requires dynamic linking.])]) + + +-- +2.40.0 + diff --git a/system/lvm2/fix-stdio-usage.patch b/system/lvm2/fix-stdio-usage.patch index 2b3f0a91f..5a66665ea 100644 --- a/system/lvm2/fix-stdio-usage.patch +++ b/system/lvm2/fix-stdio-usage.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} +++ b/lib/log/log.c @@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) - _check_and_replace_standard_log_streams(old_stream, new_stream); + _check_and_replace_standard_log_streams(*stream, new_stream); +#ifdef __GLIBC__ *stream = new_stream; @@ -22,7 +22,7 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c -@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void) +@@ -3407,7 +3407,7 @@ static int _check_standard_fds(void) int err = is_valid_fd(STDERR_FILENO); if (!is_valid_fd(STDIN_FILENO) && @@ -31,7 +31,7 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} if (err) perror("stdin stream open"); else -@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void) +@@ -3417,7 +3417,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDOUT_FILENO) && @@ -40,7 +40,7 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} if (err) perror("stdout stream open"); /* else no stdout */ -@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void) +@@ -3425,7 +3425,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDERR_FILENO) && diff --git a/system/lz4/APKBUILD b/system/lz4/APKBUILD index 3911e26f4..9b4991db7 100644 --- a/system/lz4/APKBUILD +++ b/system/lz4/APKBUILD @@ -1,20 +1,16 @@ # Contributor: Stuart Cardall <developer@it-offshore.co.uk> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=lz4 -pkgver=1.9.4 +pkgver=1.10.0 pkgrel=0 pkgdesc="LZ4: Extremely Fast Compression algorithm" url="https://github.com/lz4/lz4" arch="all" -license="BSD-2-Clause GPL-2.0-only" +license="GPL-2.0+" checkdepends="diffutils" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz" -case "$CARCH" in -armhf) options="!check" ;; # FIXME -esac - # secfixes: # 1.9.3-r1: # - CVE-2021-3520 @@ -31,4 +27,9 @@ package() { make PREFIX="/usr" DESTDIR="$pkgdir" install } -sha512sums="043a9acb2417624019d73db140d83b80f1d7c43a6fd5be839193d68df8fd0b3f610d7ed4d628c2a9184f7cde9a0fd1ba9d075d8251298e3eb4b3a77f52736684 lz4-1.9.4.tar.gz" +libs() { + license="BSD-2-Clause" + default_libs +} + +sha512sums="8c4ceb217e6dc8e7e0beba99adc736aca8963867bcf9f970d621978ba11ce92855912f8b66138037a1d2ae171e8e17beb7be99281fea840106aa60373c455b28 lz4-1.10.0.tar.gz" diff --git a/system/lzip/APKBUILD b/system/lzip/APKBUILD index 9f664b6ce..c31cbf0cb 100644 --- a/system/lzip/APKBUILD +++ b/system/lzip/APKBUILD @@ -1,7 +1,7 @@ # Contributor: ScrumpyJack <scrumpyjack@st.ilet.to> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=lzip -pkgver=1.23 +pkgver=1.25 pkgrel=0 pkgdesc="Lossless data compressor" url="https://www.nongnu.org/lzip/lzip.html" @@ -28,4 +28,4 @@ package() { make DESTDIR=$pkgdir install } -sha512sums="482804205b6e92fdf9cb17fb9482df7987227c7b1bef9e42d78787acfabe73995f5b1a66f847d2176423f22dce56f1122c5b1c9670f0b778c0bdad2852369c85 lzip-1.23.tar.gz" +sha512sums="6dec5625d5668d2f6f93816b0f2d7050ef357b5ce9a9af100bde45dddc21171341c2bcb623acdde8146b7eaed2248f8e0f5f32e64f57ecc6fe6cb9a0e187b796 lzip-1.25.tar.gz" diff --git a/system/m4/APKBUILD b/system/m4/APKBUILD index 90b5145c7..f24881d02 100644 --- a/system/m4/APKBUILD +++ b/system/m4/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Zach van Rijn <me@zv.io> pkgname=m4 -pkgver=1.4.19 -pkgrel=1 +pkgver=1.4.20 +pkgrel=0 pkgdesc="GNU macro processor" url="https://www.gnu.org/software/m4" arch="all" @@ -10,12 +10,8 @@ depends="" checkdepends="diffutils" makedepends="texinfo" subpackages="$pkgname-doc $pkgname-lang" -source="https://ftp.gnu.org/gnu/m4/$pkgname-$pkgver.tar.gz - disable-mbrtowc-test.patch +source="https://ftp.gnu.org/gnu/m4/$pkgname-$pkgver.tar.xz gnulib-tests-dont-require-gpg-passphrase.patch - m4-1.4.19-test-198.patch - posix-test.patch - fix-ppc-ucontext-regs.patch " build() { @@ -36,9 +32,5 @@ package() { rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true } -sha512sums="f5dd0f02fcae65a176a16af9a8e1747c26e9440c6c224003ba458d3298b777a75ffb189aee9051fb0c4840b2a48278be4a51d959381af0b1d627570f478c58f2 m4-1.4.19.tar.gz -c39562852502282f83b9bfa46aff00c8859b19d4d4335dbdb488748b10f6df6a13ea8291784683bf967674a5a824276419af47d2395e8af18823452a8d4999da disable-mbrtowc-test.patch -fb7344bc8a7aea1f1ce87474109aaf3d5a5ca0cd86b517025c6aad9a388a9ede7c267e7095d171d8768d1c0f0d9d8009e307467352afa81484c54dc476db0ebd gnulib-tests-dont-require-gpg-passphrase.patch -f409fcfd70d55c099bba7d784bea8f99cd6ccbfe24dfc3d76a2e757df96b6c71f7e4b42f63d433259e3bec7b7e40e6569533c032c98537003a6e7314754dd6fb m4-1.4.19-test-198.patch -43c68f84c465b2e26a73ef0a5cf9bacafee70849f9de166eef45d7699438dce0ea3cacdd513daa8a8ae7fb677778290e2a78d01b551d9465de68eb167abcbc93 posix-test.patch -0d40a28e2a4d40c5f18c317e4e6bce7fda2c7316249ebf102c585eda32d069a63a1fb5ced5efcba6d2beb2d68d54d67c6b2789f881bbb488899c95130e152744 fix-ppc-ucontext-regs.patch" +sha512sums="dc7b4f61452e564b095010029bf6ce4246e5a03959989cd76b09eb8012db7424c52819143020fab21a3471ff57ab026d3eccbd00dd3969819208980565a9fec0 m4-1.4.20.tar.xz +aec2ad41e0e340491d764ca2fd3e64b06ea6874116700cbe514ef8e44d8edd4a02568dda0e012811d7e619518baa2279f409c7a65101d067da23fe842a8c904e gnulib-tests-dont-require-gpg-passphrase.patch" diff --git a/system/m4/fix-ppc-ucontext-regs.patch b/system/m4/fix-ppc-ucontext-regs.patch deleted file mode 100644 index d696da4ad..000000000 --- a/system/m4/fix-ppc-ucontext-regs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/lib/sigsegv.c b/lib/sigsegv.c ---- a/lib/sigsegv.c 2022-03-05 20:30:15.030000000 +0000 -+++ b/lib/sigsegv.c 2022-03-05 20:42:49.910000000 +0000 -@@ -220,7 +220,7 @@ - # if 0 - # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] - # else --# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] -+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1] - # endif - # endif - diff --git a/system/m4/gnulib-tests-dont-require-gpg-passphrase.patch b/system/m4/gnulib-tests-dont-require-gpg-passphrase.patch index d00fbfd6a..c414f2154 100644 --- a/system/m4/gnulib-tests-dont-require-gpg-passphrase.patch +++ b/system/m4/gnulib-tests-dont-require-gpg-passphrase.patch @@ -1,6 +1,6 @@ --- m4-1.4.18/tests/test-vc-list-files-git.sh.old 2018-01-03 18:36:29.000000000 -0600 +++ m4-1.4.18/tests/test-vc-list-files-git.sh 2018-06-18 21:57:08.305562148 -0500 -@@ -32,6 +32,7 @@ +@@ -39,6 +39,7 @@ touch d/a b c && git config user.email "you@example.com" && git config user.name "Your Name" && diff --git a/system/m4/m4-1.4.19-test-198.patch b/system/m4/m4-1.4.19-test-198.patch deleted file mode 100644 index 3ca4bd478..000000000 --- a/system/m4/m4-1.4.19-test-198.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cd7f4d153ccccf601751e9fa82424412f6ecfc96 Mon Sep 17 00:00:00 2001 -From: Eric Blake <eblake@redhat.com> -Date: Tue, 1 Jun 2021 08:10:51 -0500 -Subject: [PATCH] tests: Fix 198.sysval - -In my attempt to avoid test failures on Haiku, I caused test failures -on platforms where sh is noisy when reporting a killed sub-process. - -* doc/m4.texi (Sysval): Avoid stderr noise during test. -Fixes: 17011ea76a (tests: Skip signal detection on Haiku) -Fixes: https://lists.gnu.org/archive/html/bug-m4/2021-05/msg00029.html ---- - doc/m4.texi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/m4.texi b/doc/m4.texi -index 247f2be5..3b833b2a 100644 ---- a/doc/m4.texi -+++ b/doc/m4.texi -@@ -6756,6 +6756,7 @@ ifdef(`__unix__', , - ')m4exit(`77')')dnl - changequote(`[', `]') - @result{} --syscmd([/bin/sh -c 'kill -9 $$'; st=$?; test $st = 137 || test $st = 265]) -+syscmd([@{ /bin/sh -c 'kill -9 $$'; @} 2>/dev/null; st=$?; -+test $st = 137 || test $st = 265]) - @result{} - ifelse(sysval, [0], , [errprint([ skipping: shell does not send signal 9 --- -2.17.1 - diff --git a/system/m4/posix-test.patch b/system/m4/posix-test.patch deleted file mode 100644 index 058c85c6f..000000000 --- a/system/m4/posix-test.patch +++ /dev/null @@ -1,18 +0,0 @@ -This behaviour does not pass on *this* platform. - ---- m4-1.4.19/tests/test-posix_spawn_file_actions_addclose.c.old 2021-04-22 15:28:47.000000000 -0500 -+++ m4-1.4.19/tests/test-posix_spawn_file_actions_addclose.c 2022-02-09 03:27:59.030000000 -0600 -@@ -54,13 +54,6 @@ - errno = 0; - ASSERT (posix_spawn_file_actions_addclose (&actions, -1) == EBADF); - } -- /* This behaviour is not mandated by POSIX, but happens to pass on all -- platforms. */ -- { -- int bad_fd = big_fd (); -- errno = 0; -- ASSERT (posix_spawn_file_actions_addclose (&actions, bad_fd) == EBADF); -- } - - posix_spawn_file_actions_destroy (&actions); - diff --git a/system/man-pages/APKBUILD b/system/man-pages/APKBUILD index 2ee5c69f1..53ac72bfc 100644 --- a/system/man-pages/APKBUILD +++ b/system/man-pages/APKBUILD @@ -1,9 +1,9 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=man-pages -pkgver=5.13 +pkgver=6.14 _posixver=2017 -pkgrel=1 +pkgrel=0 pkgdesc="Linux man pages" url="https://www.kernel.org/doc/man-pages/" arch="noarch" @@ -12,7 +12,7 @@ license="GPL-2.0+ AND POSIX" depends="" makedepends="" install_if="docs build-tools" -source="https://cdn.kernel.org/pub/linux/docs/$pkgname/Archive/$pkgname-$pkgver.tar.xz +source="https://cdn.kernel.org/pub/linux/docs/$pkgname/$pkgname-$pkgver.tar.xz https://cdn.kernel.org/pub/linux/docs/$pkgname/$pkgname-posix/$pkgname-posix-${_posixver}-a.tar.xz " @@ -27,7 +27,7 @@ build() { } package() { - make prefix="$pkgdir"/usr install + make -R prefix="$pkgdir"/usr install find "$pkgdir"/usr/share/man -name "*.[0-9]" | xargs gzip -9 # provided by libiconv-doc @@ -50,5 +50,5 @@ package() { rm -f "$pkgdir"/usr/share/man/man1/localedef* } -sha512sums="a68c0bd5f078aff2f13f962060863e5d30734c1c562e8e9e3d5eda5a329b18ad3e9b4ebb883d31cacfc0a476f91fccb8dd4257598acd75d09dd21351893d3499 man-pages-5.13.tar.xz +sha512sums="e2981bb75e22d74ae4424dde7a9529d685693635777b072318af73e76f8156783bc74205e8fff5a433ec4d769ccaa8388078a9d061f3878b5182128e5af50693 man-pages-6.14.tar.xz dac6bd5bb3e1d5f8918bad3eb15e08eeb3e06ae160c04ccd5619bfb0c536139ac06faa62b6856656a1bb9a7496f3148e52a5227b83e4099be6e6b93230de211d man-pages-posix-2017-a.tar.xz" diff --git a/system/mawk/APKBUILD b/system/mawk/APKBUILD index 64b641031..221383e97 100644 --- a/system/mawk/APKBUILD +++ b/system/mawk/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=mawk -pkgver=1.3.4.20230525 +pkgver=1.3.4.20250131 pkgrel=0 pkgdesc="Pattern scanning and text processing language" url="https://invisible-island.net/mawk/mawk.html" @@ -37,4 +37,4 @@ package() { ln -s ../../bin/awk "$pkgdir"/usr/bin/awk } -sha512sums="704c1a94569e8e953af7b00ea81efa20df03483f57e4183935e73df62309874644f2250a307b136af34ce3df62d90170d8afe7b3a86eeacb31cf5845056126cb mawk-1.3.4-20230525.tgz" +sha512sums="100b1f5ee190d2841d5dee449c53601a6d32453e47b232de919f3489f6f7040d0c6d21f6c7d30df616b04abde2db9799c5eb16570c1f88dbc10fcd75c5838042 mawk-1.3.4-20250131.tgz" diff --git a/system/muon/APKBUILD b/system/muon/APKBUILD new file mode 100644 index 000000000..6ccf8a24d --- /dev/null +++ b/system/muon/APKBUILD @@ -0,0 +1,32 @@ +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=muon +pkgver=0.5.0 +pkgrel=0 +pkgdesc="A Meson-compatible build system" +url="https://muon.build/" +arch="all" +license="GPL-3.0-only AND MIT AND Unlicense AND Python-2.0 AND Apache-2.0" +depends="samurai" +checkdepends="python3" +makedepends="curl-dev libarchive-dev pkgconf-dev scdoc" +subpackages="$pkgname-doc" +source="https://muon.build/releases/v$pkgver/muon-v$pkgver.tar.gz" +builddir="$srcdir/$pkgname-v$pkgver" + +build() { + ./bootstrap.sh build + build/muon-bootstrap setup \ + -Dprefix=/usr \ + build + build/muon-bootstrap -C build samu +} + +check() { + build/muon-bootstrap -C build test +} + +package() { + DESTDIR="$pkgdir" build/muon-bootstrap -C build install +} + +sha512sums="3552e9b3ead9072de5a683cc1448eaab1ebd60a10653a3c8d183ec89b3b56ffce12dac4735be5f5e4ede7795e7d0abeafd3c404648ac1597cbf7d6d55f8d0ed7 muon-v0.5.0.tar.gz" diff --git a/system/nspr/APKBUILD b/system/nspr/APKBUILD index 033c5a6d6..c20fefbd2 100644 --- a/system/nspr/APKBUILD +++ b/system/nspr/APKBUILD @@ -1,11 +1,10 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=nspr -pkgver=4.35 +pkgver=4.36 pkgrel=0 pkgdesc="Netscape Portable Runtime" url="https://firefox-source-docs.mozilla.org/nspr/index.html" arch="all" -options="!check" # No test suite. license="MPL-1.1 AND GPL-2.0-only AND LGPL-2.1-only" depends="" # -dev package does not ship any symlinks so dependency cannot be autodetected @@ -40,6 +39,13 @@ build() { make CC="${CC:-gcc}" CXX="${CXX:-g++}" } +check() { + make -C "$builddir"/build/lib/tests + for i in arena base64t getopt string; do + "$builddir"/build/lib/tests/$i + done +} + package() { cd "$builddir"/build make DESTDIR="$pkgdir" install @@ -56,5 +62,5 @@ package() { "$pkgdir"/usr/include/nspr/md } -sha512sums="502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f nspr-4.35.tar.gz +sha512sums="55d21e196508ad29a179639fc8006f44b04dc2c0b5a85895e727f0a4f0ea37aeeceb936e37ac6b271b882a18e9f06d96133a60f19cee6345f8424c1c66e270ee nspr-4.36.tar.gz 1f694fc151f6578080449e3aa999c520486bbe117b8237150966ec43092db4156e81412ac889045e0c0c3bf65d459af5bdc1cf19c9fa3dab120405a60732f15a stacksize.patch" diff --git a/system/nss/APKBUILD b/system/nss/APKBUILD index f25f8d35c..834b5a857 100644 --- a/system/nss/APKBUILD +++ b/system/nss/APKBUILD @@ -1,13 +1,13 @@ # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=nss -pkgver=3.103 +pkgver=3.112 _ver=$(printf '%s' "$pkgver" | tr . _) pkgrel=0 pkgdesc="Mozilla Network Security Services" url="https://firefox-source-docs.mozilla.org/security/nss/index.html" arch="all" -options="!check" +options="!check" # Requires builder name to resolve in the DNS + ~3hrs on gwyn license="MPL-2.0" depends="" depends_dev="nspr-dev" @@ -66,6 +66,15 @@ build() { make -C nss all } +check() { + export BUILD_OPT=1 + case "$CARCH" in + *64* | s390x) export USE_64=1;; + esac + + nss/tests/all.sh +} + package() { install -m755 -d "$pkgdir"/usr/lib/pkgconfig install -m755 -d "$pkgdir"/usr/bin @@ -157,7 +166,7 @@ tools() { mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } -sha512sums="bc7680fc34d84de7953b27f1a220681f3f5c5a501a82be210ec6134894313f6a2c9bfcc350f4802152a5e3a1fc2defc74d700445ade338d6c86a923ac8b4dc75 nss-3.103.tar.gz +sha512sums="564ae4ded323d7213f224673b0ddc584dcfae71bbdd139310854e547d9ba2877ba45462da49f71ea2fae72caea1cf10fa51d9dfef656a21957256cadc5fa4b35 nss-3.112.tar.gz 75dbd648a461940647ff373389cc73bc8ec609139cd46c91bcce866af02be6bcbb0524eb3dfb721fbd5b0bc68c20081ed6f7debf6b24317f2a7ba823e8d3c531 nss.pc.in 0f2efa8563b11da68669d281b4459289a56f5a3a906eb60382126f3adcfe47420cdcedc6ab57727a3afeeffa2bbb4c750b43bef8b5f343a75c968411dfa30e09 nss-util.pc.in 09c69d4cc39ec9deebc88696a80d0f15eb2d8c94d9daa234a2adfec941b63805eb4ce7f2e1943857b938bddcaee1beac246a0ec627b71563d9f846e6119a4a15 nss-softokn.pc.in diff --git a/system/openssl/APKBUILD b/system/openssl/APKBUILD index 9e178ca77..677942d41 100644 --- a/system/openssl/APKBUILD +++ b/system/openssl/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=openssl -pkgver=1.1.1v +pkgver=1.1.1z_p2 pkgrel=0 pkgdesc="Toolkit for SSL and TLS" url="https://www.openssl.org/" @@ -11,9 +11,14 @@ checkdepends="perl" makedepends_build="perl" subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.1:libcrypto libssl1.1:libssl" -source="https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz +source="https://www.openssl.org/source/${pkgname}-${pkgver%z_p2}w.tar.gz ppc-auxv.patch ppc64.patch + x.patch + y.patch + za.patch + zb.patch + zb2.patch " # secfixes: @@ -63,6 +68,11 @@ source="https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz # 1.1.1t-r1: # - CVE-2023-0465 +unpack() { + default_unpack + mv "$pkgname-${pkgver%z_p2}w" "$pkgname-$pkgver" +} + build() { # openssl will prepend crosscompile always core CC et al CC=${CC#${CROSS_COMPILE}} @@ -131,6 +141,11 @@ libssl() { done } -sha512sums="1a67340d99026aa62bf50ff89165d9f77fe4a6690fe30d1751b5021dd3f238391afd581b41724687c322c4e3af1770c44a63766a06e9b8cab6425101153e0c7e openssl-1.1.1v.tar.gz +sha512sums="b4c625fe56a4e690b57b6a011a225ad0cb3af54bd8fb67af77b5eceac55cc7191291d96a660c5b568a08a2fbf62b4612818e7cca1bb95b2b6b4fc649b0552b6d openssl-1.1.1w.tar.gz 7fd3158c6eb3451f10e4bfd78f85c3e7aef84716eb38e00503d5cfc8e414b7bdf02e0671d0299a96a453dd2e38249dcf1281136b27b6df372f3ea08fbf78329b ppc-auxv.patch -e040f23770d52b988578f7ff84d77563340f37c026db7643db8e4ef18e795e27d10cb42cb8656da4d9c57a28283a2828729d70f940edc950c3422a54fea55509 ppc64.patch" +e040f23770d52b988578f7ff84d77563340f37c026db7643db8e4ef18e795e27d10cb42cb8656da4d9c57a28283a2828729d70f940edc950c3422a54fea55509 ppc64.patch +8116cc9e1ae192ac85ad3c85619a297748a04cbf80e91b9d72fc9857dcbfc7da449724b7d6782de97fe6367e5374d6cf06b8864355473608147b45f7fb741d8a x.patch +f696bb088cf75a4ad0307f919344b1e3361bb77a42f34c5db557cdba9e2c091ca1fe1f8d66cd4612fa2a7d64a41245bee72ba603789cf20d86b952490284756d y.patch +85f5eb3a5423ced9b01fa20d020cbbfd987e3c82467d9d196ba5f0bc327c8b09e1e39b98a479c8fc1f9a90b3eda82202995d8abe8ff536c4644b73cca630f053 za.patch +060992bff56f9e69f4dc89f3de3a74817cd21b7338e8062a9e9e52a74a08d7b461ead51fb5c7ae9fcc2c717e72e285d42922dd0c37b314b3e5d0e5cf3ae2682f zb.patch +b2c31f588aec1ef641985f08a302f815b3854e5be2291eeb2c9db4b12cf69caaa6c813ec75139e623fe3a48a6f4f02500b9b5b1ac2c83d9d053ef098c220a929 zb2.patch" diff --git a/system/openssl/x.patch b/system/openssl/x.patch new file mode 100644 index 000000000..52e575b08 --- /dev/null +++ b/system/openssl/x.patch @@ -0,0 +1,294 @@ +From 01ca0bbbe65215f6ae72bba7d63ea67fb53c4f9a Mon Sep 17 00:00:00 2001 +From: Ken Zalewski <ken.zalewski@gmail.com> +Date: Sat, 13 Jul 2024 11:00:49 -0400 +Subject: [PATCH] Patch to openssl-1.1.1x. This version addresses two + vulnerabilities: CVE-2023-5678 and CVE-2024-0727 + +--- + crypto/dh/dh_check.c | 13 +++++++++++++ + crypto/dh/dh_err.c | 2 ++ + crypto/dh/dh_key.c | 10 ++++++++++ + crypto/err/openssl.txt | 2 ++ + crypto/pkcs12/p12_add.c | 18 ++++++++++++++++++ + crypto/pkcs12/p12_mutl.c | 5 +++++ + crypto/pkcs12/p12_npas.c | 5 +++-- + crypto/pkcs12/pk12err.c | 2 ++ + crypto/pkcs7/pk7_mime.c | 9 +++++++-- + include/openssl/dh.h | 6 ++++-- + include/openssl/dherr.h | 2 ++ + include/openssl/opensslv.h | 4 ++-- + include/openssl/pkcs12err.h | 1 + + 13 files changed, 71 insertions(+), 8 deletions(-) + +diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c +index ae1b03b..40dfc57 100644 +--- a/crypto/dh/dh_check.c ++++ b/crypto/dh/dh_check.c +@@ -198,6 +198,19 @@ int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) + BN_CTX *ctx = NULL; + + *ret = 0; ++ ++ /* Don't do any checks at all with an excessively large modulus */ ++ if (BN_num_bits(dh->p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) { ++ DHerr(DH_F_DH_CHECK_PUB_KEY, DH_R_MODULUS_TOO_LARGE); ++ *ret = DH_CHECK_P_NOT_PRIME | DH_CHECK_PUBKEY_INVALID; ++ return 0; ++ } ++ ++ if (dh->q != NULL && BN_ucmp(dh->p, dh->q) < 0) { ++ *ret |= DH_CHECK_INVALID_Q_VALUE | DH_CHECK_PUBKEY_INVALID; ++ return 1; ++ } ++ + ctx = BN_CTX_new(); + if (ctx == NULL) + goto err; +diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c +index 92800d3..048ba66 100644 +--- a/crypto/dh/dh_err.c ++++ b/crypto/dh/dh_err.c +@@ -21,6 +21,7 @@ static const ERR_STRING_DATA DH_str_functs[] = { + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK, 0), "DH_check"}, + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_EX, 0), "DH_check_ex"}, + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_PARAMS_EX, 0), "DH_check_params_ex"}, ++ {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_PUB_KEY, 0), "DH_check_pub_key"}, + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_PUB_KEY_EX, 0), "DH_check_pub_key_ex"}, + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CMS_DECRYPT, 0), "dh_cms_decrypt"}, + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CMS_SET_PEERKEY, 0), "dh_cms_set_peerkey"}, +@@ -82,6 +83,7 @@ static const ERR_STRING_DATA DH_str_reasons[] = { + {ERR_PACK(ERR_LIB_DH, 0, DH_R_PARAMETER_ENCODING_ERROR), + "parameter encoding error"}, + {ERR_PACK(ERR_LIB_DH, 0, DH_R_PEER_KEY_ERROR), "peer key error"}, ++ {ERR_PACK(ERR_LIB_DH, 0, DH_R_Q_TOO_LARGE), "q too large"}, + {ERR_PACK(ERR_LIB_DH, 0, DH_R_SHARED_INFO_ERROR), "shared info error"}, + {ERR_PACK(ERR_LIB_DH, 0, DH_R_UNABLE_TO_CHECK_GENERATOR), + "unable to check generator"}, +diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c +index 117f2fa..9f5e6f6 100644 +--- a/crypto/dh/dh_key.c ++++ b/crypto/dh/dh_key.c +@@ -114,6 +114,11 @@ static int generate_key(DH *dh) + return 0; + } + ++ if (dh->q != NULL && BN_num_bits(dh->q) > OPENSSL_DH_MAX_MODULUS_BITS) { ++ DHerr(DH_F_GENERATE_KEY, DH_R_Q_TOO_LARGE); ++ return 0; ++ } ++ + ctx = BN_CTX_new(); + if (ctx == NULL) + goto err; +@@ -207,6 +212,11 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) + goto err; + } + ++ if (dh->q != NULL && BN_num_bits(dh->q) > OPENSSL_DH_MAX_MODULUS_BITS) { ++ DHerr(DH_F_COMPUTE_KEY, DH_R_Q_TOO_LARGE); ++ goto err; ++ } ++ + ctx = BN_CTX_new(); + if (ctx == NULL) + goto err; +diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt +index c0a3cd7..ec3823e 100644 +--- a/crypto/err/openssl.txt ++++ b/crypto/err/openssl.txt +@@ -969,6 +969,7 @@ PKCS12_F_PKCS12_SETUP_MAC:122:PKCS12_setup_mac + PKCS12_F_PKCS12_SET_MAC:123:PKCS12_set_mac + PKCS12_F_PKCS12_UNPACK_AUTHSAFES:130:PKCS12_unpack_authsafes + PKCS12_F_PKCS12_UNPACK_P7DATA:131:PKCS12_unpack_p7data ++PKCS12_F_PKCS12_UNPACK_P7ENCDATA:134:PKCS12_unpack_p7encdata + PKCS12_F_PKCS12_VERIFY_MAC:126:PKCS12_verify_mac + PKCS12_F_PKCS8_ENCRYPT:125:PKCS8_encrypt + PKCS12_F_PKCS8_SET0_PBE:132:PKCS8_set0_pbe +@@ -2106,6 +2107,7 @@ DH_R_NO_PARAMETERS_SET:107:no parameters set + DH_R_NO_PRIVATE_VALUE:100:no private value + DH_R_PARAMETER_ENCODING_ERROR:105:parameter encoding error + DH_R_PEER_KEY_ERROR:111:peer key error ++DH_R_Q_TOO_LARGE:130:q too large + DH_R_SHARED_INFO_ERROR:113:shared info error + DH_R_UNABLE_TO_CHECK_GENERATOR:121:unable to check generator + DSA_R_BAD_Q_VALUE:102:bad q value +diff --git a/crypto/pkcs12/p12_add.c b/crypto/pkcs12/p12_add.c +index af184c8..6549691 100644 +--- a/crypto/pkcs12/p12_add.c ++++ b/crypto/pkcs12/p12_add.c +@@ -76,6 +76,12 @@ STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7) + PKCS12_R_CONTENT_TYPE_NOT_DATA); + return NULL; + } ++ ++ if (p7->d.data == NULL) { ++ PKCS12err(PKCS12_F_PKCS12_UNPACK_P7DATA, PKCS12_R_DECODE_ERROR); ++ return NULL; ++ } ++ + return ASN1_item_unpack(p7->d.data, ASN1_ITEM_rptr(PKCS12_SAFEBAGS)); + } + +@@ -132,6 +138,12 @@ STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, + { + if (!PKCS7_type_is_encrypted(p7)) + return NULL; ++ ++ if (p7->d.encrypted == NULL) { ++ PKCS12err(PKCS12_F_PKCS12_UNPACK_P7ENCDATA, PKCS12_R_DECODE_ERROR); ++ return NULL; ++ } ++ + return PKCS12_item_decrypt_d2i(p7->d.encrypted->enc_data->algorithm, + ASN1_ITEM_rptr(PKCS12_SAFEBAGS), + pass, passlen, +@@ -159,6 +171,12 @@ STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12) + PKCS12_R_CONTENT_TYPE_NOT_DATA); + return NULL; + } ++ ++ if (p12->authsafes->d.data == NULL) { ++ PKCS12err(PKCS12_F_PKCS12_UNPACK_AUTHSAFES, PKCS12_R_DECODE_ERROR); ++ return NULL; ++ } ++ + return ASN1_item_unpack(p12->authsafes->d.data, + ASN1_ITEM_rptr(PKCS12_AUTHSAFES)); + } +diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c +index 3658003..766c9c1 100644 +--- a/crypto/pkcs12/p12_mutl.c ++++ b/crypto/pkcs12/p12_mutl.c +@@ -93,6 +93,11 @@ static int pkcs12_gen_mac(PKCS12 *p12, const char *pass, int passlen, + return 0; + } + ++ if (p12->authsafes->d.data == NULL) { ++ PKCS12err(PKCS12_F_PKCS12_GEN_MAC, PKCS12_R_DECODE_ERROR); ++ return 0; ++ } ++ + salt = p12->mac->salt->data; + saltlen = p12->mac->salt->length; + if (!p12->mac->iter) +diff --git a/crypto/pkcs12/p12_npas.c b/crypto/pkcs12/p12_npas.c +index 0334289..1303376 100644 +--- a/crypto/pkcs12/p12_npas.c ++++ b/crypto/pkcs12/p12_npas.c +@@ -78,8 +78,9 @@ static int newpass_p12(PKCS12 *p12, const char *oldpass, const char *newpass) + bags = PKCS12_unpack_p7data(p7); + } else if (bagnid == NID_pkcs7_encrypted) { + bags = PKCS12_unpack_p7encdata(p7, oldpass, -1); +- if (!alg_get(p7->d.encrypted->enc_data->algorithm, +- &pbe_nid, &pbe_iter, &pbe_saltlen)) ++ if (p7->d.encrypted == NULL ++ || !alg_get(p7->d.encrypted->enc_data->algorithm, ++ &pbe_nid, &pbe_iter, &pbe_saltlen)) + goto err; + } else { + continue; +diff --git a/crypto/pkcs12/pk12err.c b/crypto/pkcs12/pk12err.c +index 38ce519..3eb7f2f 100644 +--- a/crypto/pkcs12/pk12err.c ++++ b/crypto/pkcs12/pk12err.c +@@ -58,6 +58,8 @@ static const ERR_STRING_DATA PKCS12_str_functs[] = { + "PKCS12_unpack_authsafes"}, + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS12_UNPACK_P7DATA, 0), + "PKCS12_unpack_p7data"}, ++ {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS12_UNPACK_P7ENCDATA, 0), ++ "PKCS12_unpack_p7encdata"}, + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS12_VERIFY_MAC, 0), + "PKCS12_verify_mac"}, + {ERR_PACK(ERR_LIB_PKCS12, PKCS12_F_PKCS8_ENCRYPT, 0), "PKCS8_encrypt"}, +diff --git a/crypto/pkcs7/pk7_mime.c b/crypto/pkcs7/pk7_mime.c +index 19e6868..635af10 100644 +--- a/crypto/pkcs7/pk7_mime.c ++++ b/crypto/pkcs7/pk7_mime.c +@@ -30,10 +30,15 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags) + { + STACK_OF(X509_ALGOR) *mdalgs; + int ctype_nid = OBJ_obj2nid(p7->type); +- if (ctype_nid == NID_pkcs7_signed) ++ if (ctype_nid == NID_pkcs7_signed) { ++ if (p7->d.sign == NULL) { ++ return 0; ++ } + mdalgs = p7->d.sign->md_algs; +- else ++ } ++ else { + mdalgs = NULL; ++ } + + flags ^= SMIME_OLDMIME; + +diff --git a/include/openssl/dh.h b/include/openssl/dh.h +index 6c6ff36..d2a9c0d 100644 +--- a/include/openssl/dh.h ++++ b/include/openssl/dh.h +@@ -71,14 +71,16 @@ DECLARE_ASN1_ITEM(DHparams) + /* #define DH_GENERATOR_3 3 */ + # define DH_GENERATOR_5 5 + +-/* DH_check error codes */ ++/* DH_check error codes, some of them shared with DH_check_pub_key */ + # define DH_CHECK_P_NOT_PRIME 0x01 + # define DH_CHECK_P_NOT_SAFE_PRIME 0x02 + # define DH_UNABLE_TO_CHECK_GENERATOR 0x04 + # define DH_NOT_SUITABLE_GENERATOR 0x08 + # define DH_CHECK_Q_NOT_PRIME 0x10 +-# define DH_CHECK_INVALID_Q_VALUE 0x20 ++# define DH_CHECK_INVALID_Q_VALUE 0x20 /* +DH_check_pub_key */ + # define DH_CHECK_INVALID_J_VALUE 0x40 ++# define DH_MODULUS_TOO_SMALL 0x80 ++# define DH_MODULUS_TOO_LARGE 0x100 /* +DH_check_pub_key */ + + /* DH_check_pub_key error codes */ + # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 +diff --git a/include/openssl/dherr.h b/include/openssl/dherr.h +index 528c819..a98bb1e 100644 +--- a/include/openssl/dherr.h ++++ b/include/openssl/dherr.h +@@ -33,6 +33,7 @@ int ERR_load_DH_strings(void); + # define DH_F_DH_CHECK 126 + # define DH_F_DH_CHECK_EX 121 + # define DH_F_DH_CHECK_PARAMS_EX 122 ++# define DH_F_DH_CHECK_PUB_KEY 127 + # define DH_F_DH_CHECK_PUB_KEY_EX 123 + # define DH_F_DH_CMS_DECRYPT 114 + # define DH_F_DH_CMS_SET_PEERKEY 115 +@@ -82,6 +83,7 @@ int ERR_load_DH_strings(void); + # define DH_R_NO_PRIVATE_VALUE 100 + # define DH_R_PARAMETER_ENCODING_ERROR 105 + # define DH_R_PEER_KEY_ERROR 111 ++# define DH_R_Q_TOO_LARGE 130 + # define DH_R_SHARED_INFO_ERROR 113 + # define DH_R_UNABLE_TO_CHECK_GENERATOR 121 + +diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h +index 5667d47..c16eafd 100644 +--- a/include/openssl/opensslv.h ++++ b/include/openssl/opensslv.h +@@ -39,8 +39,8 @@ extern "C" { + * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for + * major minor fix final patch/beta) + */ +-# define OPENSSL_VERSION_NUMBER 0x1010117fL +-# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1w 11 Sep 2023" ++# define OPENSSL_VERSION_NUMBER 0x1010118fL ++# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1x 25 Jan 2024" + + /*- + * The macros below are to be used for shared library (.so, .dll, ...) +diff --git a/include/openssl/pkcs12err.h b/include/openssl/pkcs12err.h +index eff5eb2..0d2f15a 100644 +--- a/include/openssl/pkcs12err.h ++++ b/include/openssl/pkcs12err.h +@@ -49,6 +49,7 @@ int ERR_load_PKCS12_strings(void); + # define PKCS12_F_PKCS12_SET_MAC 123 + # define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 130 + # define PKCS12_F_PKCS12_UNPACK_P7DATA 131 ++# define PKCS12_F_PKCS12_UNPACK_P7ENCDATA 134 + # define PKCS12_F_PKCS12_VERIFY_MAC 126 + # define PKCS12_F_PKCS8_ENCRYPT 125 + # define PKCS12_F_PKCS8_SET0_PBE 132 diff --git a/system/openssl/y.patch b/system/openssl/y.patch new file mode 100644 index 000000000..3c8c4ace5 --- /dev/null +++ b/system/openssl/y.patch @@ -0,0 +1,183 @@ +From 4e975e3aec06165e760953f6c51a795f3dcfd1a0 Mon Sep 17 00:00:00 2001 +From: Ken Zalewski <ken.zalewski@gmail.com> +Date: Sat, 13 Jul 2024 12:02:52 -0400 +Subject: [PATCH] Patch to openssl-1.1.1y. This version addresses two + vulnerabilities: CVE-2024-2511 and CVE-2024-4741 + +--- + include/openssl/opensslv.h | 4 ++-- + include/openssl/ssl.h | 2 +- + ssl/record/rec_layer_s3.c | 9 +++++++++ + ssl/record/record.h | 1 + + ssl/ssl_lib.c | 8 ++++++-- + ssl/ssl_local.h | 2 +- + ssl/ssl_sess.c | 28 ++++++++++++++++++++++------ + ssl/statem/statem_srvr.c | 5 ++--- + 8 files changed, 44 insertions(+), 15 deletions(-) + +diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h +index c16eafd..585109a 100644 +--- a/include/openssl/opensslv.h ++++ b/include/openssl/opensslv.h +@@ -39,8 +39,8 @@ extern "C" { + * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for + * major minor fix final patch/beta) + */ +-# define OPENSSL_VERSION_NUMBER 0x1010118fL +-# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1x 25 Jan 2024" ++# define OPENSSL_VERSION_NUMBER 0x1010119fL ++# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1y 27 May 2024" + + /*- + * The macros below are to be used for shared library (.so, .dll, ...) +diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h +index 9af0c89..64eaca3 100644 +--- a/include/openssl/ssl.h ++++ b/include/openssl/ssl.h +@@ -1659,7 +1659,7 @@ __owur int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, + __owur int SSL_SESSION_is_resumable(const SSL_SESSION *s); + + __owur SSL_SESSION *SSL_SESSION_new(void); +-__owur SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src); ++__owur SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src); + const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, + unsigned int *len); + const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s, +diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c +index 1db1712..525c3ab 100644 +--- a/ssl/record/rec_layer_s3.c ++++ b/ssl/record/rec_layer_s3.c +@@ -81,6 +81,15 @@ int RECORD_LAYER_read_pending(const RECORD_LAYER *rl) + return SSL3_BUFFER_get_left(&rl->rbuf) != 0; + } + ++int RECORD_LAYER_data_present(const RECORD_LAYER *rl) ++{ ++ if (rl->rstate == SSL_ST_READ_BODY) ++ return 1; ++ if (RECORD_LAYER_processed_read_pending(rl)) ++ return 1; ++ return 0; ++} ++ + /* Checks if we have decrypted unread record data pending */ + int RECORD_LAYER_processed_read_pending(const RECORD_LAYER *rl) + { +diff --git a/ssl/record/record.h b/ssl/record/record.h +index af56206..513ab39 100644 +--- a/ssl/record/record.h ++++ b/ssl/record/record.h +@@ -197,6 +197,7 @@ void RECORD_LAYER_release(RECORD_LAYER *rl); + int RECORD_LAYER_read_pending(const RECORD_LAYER *rl); + int RECORD_LAYER_processed_read_pending(const RECORD_LAYER *rl); + int RECORD_LAYER_write_pending(const RECORD_LAYER *rl); ++int RECORD_LAYER_data_present(const RECORD_LAYER *rl); + void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl); + void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl); + int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl); +diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c +index 47adc32..356d65c 100644 +--- a/ssl/ssl_lib.c ++++ b/ssl/ssl_lib.c +@@ -3515,9 +3515,10 @@ void ssl_update_cache(SSL *s, int mode) + + /* + * If the session_id_length is 0, we are not supposed to cache it, and it +- * would be rather hard to do anyway :-) ++ * would be rather hard to do anyway :-). Also if the session has already ++ * been marked as not_resumable we should not cache it for later reuse. + */ +- if (s->session->session_id_length == 0) ++ if (s->session->session_id_length == 0 || s->session->not_resumable) + return; + + /* +@@ -5247,6 +5248,9 @@ int SSL_free_buffers(SSL *ssl) + if (RECORD_LAYER_read_pending(rl) || RECORD_LAYER_write_pending(rl)) + return 0; + ++ if (RECORD_LAYER_data_present(rl)) ++ return 0; ++ + RECORD_LAYER_release(rl); + return 1; + } +diff --git a/ssl/ssl_local.h b/ssl/ssl_local.h +index 5c79215..5e73fa4 100644 +--- a/ssl/ssl_local.h ++++ b/ssl/ssl_local.h +@@ -2261,7 +2261,7 @@ __owur int ssl_get_new_session(SSL *s, int session); + __owur SSL_SESSION *lookup_sess_in_cache(SSL *s, const unsigned char *sess_id, + size_t sess_id_len); + __owur int ssl_get_prev_session(SSL *s, CLIENTHELLO_MSG *hello); +-__owur SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket); ++__owur SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket); + __owur int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b); + DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(SSL_CIPHER, SSL_CIPHER, ssl_cipher_id); + __owur int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap, +diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c +index 68d1737..2b27a47 100644 +--- a/ssl/ssl_sess.c ++++ b/ssl/ssl_sess.c +@@ -94,16 +94,11 @@ SSL_SESSION *SSL_SESSION_new(void) + return ss; + } + +-SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src) +-{ +- return ssl_session_dup(src, 1); +-} +- + /* + * Create a new SSL_SESSION and duplicate the contents of |src| into it. If + * ticket == 0 then no ticket information is duplicated, otherwise it is. + */ +-SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket) ++static SSL_SESSION *ssl_session_dup_intern(const SSL_SESSION *src, int ticket) + { + SSL_SESSION *dest; + +@@ -226,6 +221,27 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket) + return NULL; + } + ++SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src) ++{ ++ return ssl_session_dup_intern(src, 1); ++} ++ ++/* ++ * Used internally when duplicating a session which might be already shared. ++ * We will have resumed the original session. Subsequently we might have marked ++ * it as non-resumable (e.g. in another thread) - but this copy should be ok to ++ * resume from. ++ */ ++SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) ++{ ++ SSL_SESSION *sess = ssl_session_dup_intern(src, ticket); ++ ++ if (sess != NULL) ++ sess->not_resumable = 0; ++ ++ return sess; ++} ++ + const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) + { + if (len) +diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c +index 43f77a5..2f6ce8f 100644 +--- a/ssl/statem/statem_srvr.c ++++ b/ssl/statem/statem_srvr.c +@@ -2403,9 +2403,8 @@ int tls_construct_server_hello(SSL *s, WPACKET *pkt) + * so the following won't overwrite an ID that we're supposed + * to send back. + */ +- if (s->session->not_resumable || +- (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER) +- && !s->hit)) ++ if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER) ++ && !s->hit) + s->session->session_id_length = 0; + + if (usetls13) { diff --git a/system/openssl/za.patch b/system/openssl/za.patch new file mode 100644 index 000000000..90a30beb1 --- /dev/null +++ b/system/openssl/za.patch @@ -0,0 +1,108 @@ +From 72f5c8e48a09ab09dae91c869e53e3d0c75ef921 Mon Sep 17 00:00:00 2001 +From: Ken Zalewski <ken.zalewski@gmail.com> +Date: Sat, 13 Jul 2024 12:19:50 -0400 +Subject: [PATCH] Patch to openssl-1.1.1za. This version addresses one + vulnerability: CVE-2024-5535 + +--- + include/openssl/opensslv.h | 4 +-- + ssl/ssl_lib.c | 63 ++++++++++++++++++++++++-------------- + 2 files changed, 42 insertions(+), 25 deletions(-) + +diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h +index 585109a..a1a5d07 100644 +--- a/include/openssl/opensslv.h ++++ b/include/openssl/opensslv.h +@@ -39,8 +39,8 @@ extern "C" { + * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for + * major minor fix final patch/beta) + */ +-# define OPENSSL_VERSION_NUMBER 0x1010119fL +-# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1y 27 May 2024" ++# define OPENSSL_VERSION_NUMBER 0x101011afL ++# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1za 26 Jun 2024" + + /*- + * The macros below are to be used for shared library (.so, .dll, ...) +diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c +index 356d65c..ccb1d4a 100644 +--- a/ssl/ssl_lib.c ++++ b/ssl/ssl_lib.c +@@ -2761,37 +2761,54 @@ int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, + unsigned int server_len, + const unsigned char *client, unsigned int client_len) + { +- unsigned int i, j; +- const unsigned char *result; +- int status = OPENSSL_NPN_UNSUPPORTED; ++ PACKET cpkt, csubpkt, spkt, ssubpkt; ++ ++ if (!PACKET_buf_init(&cpkt, client, client_len) ++ || !PACKET_get_length_prefixed_1(&cpkt, &csubpkt) ++ || PACKET_remaining(&csubpkt) == 0) { ++ *out = NULL; ++ *outlen = 0; ++ return OPENSSL_NPN_NO_OVERLAP; ++ } ++ ++ /* ++ * Set the default opportunistic protocol. Will be overwritten if we find ++ * a match. ++ */ ++ *out = (unsigned char *)PACKET_data(&csubpkt); ++ *outlen = (unsigned char)PACKET_remaining(&csubpkt); + + /* + * For each protocol in server preference order, see if we support it. + */ +- for (i = 0; i < server_len;) { +- for (j = 0; j < client_len;) { +- if (server[i] == client[j] && +- memcmp(&server[i + 1], &client[j + 1], server[i]) == 0) { +- /* We found a match */ +- result = &server[i]; +- status = OPENSSL_NPN_NEGOTIATED; +- goto found; ++ if (PACKET_buf_init(&spkt, server, server_len)) { ++ while (PACKET_get_length_prefixed_1(&spkt, &ssubpkt)) { ++ if (PACKET_remaining(&ssubpkt) == 0) ++ continue; /* Invalid - ignore it */ ++ if (PACKET_buf_init(&cpkt, client, client_len)) { ++ while (PACKET_get_length_prefixed_1(&cpkt, &csubpkt)) { ++ if (PACKET_equal(&csubpkt, PACKET_data(&ssubpkt), ++ PACKET_remaining(&ssubpkt))) { ++ /* We found a match */ ++ *out = (unsigned char *)PACKET_data(&ssubpkt); ++ *outlen = (unsigned char)PACKET_remaining(&ssubpkt); ++ return OPENSSL_NPN_NEGOTIATED; ++ } ++ } ++ /* Ignore spurious trailing bytes in the client list */ ++ } else { ++ /* This should never happen */ ++ return OPENSSL_NPN_NO_OVERLAP; + } +- j += client[j]; +- j++; + } +- i += server[i]; +- i++; ++ /* Ignore spurious trailing bytes in the server list */ + } + +- /* There's no overlap between our protocols and the server's list. */ +- result = client; +- status = OPENSSL_NPN_NO_OVERLAP; +- +- found: +- *out = (unsigned char *)result + 1; +- *outlen = result[0]; +- return status; ++ /* ++ * There's no overlap between our protocols and the server's list. We use ++ * the default opportunistic protocol selected earlier ++ */ ++ return OPENSSL_NPN_NO_OVERLAP; + } + + #ifndef OPENSSL_NO_NEXTPROTONEG diff --git a/system/openssl/zb.patch b/system/openssl/zb.patch new file mode 100644 index 000000000..97a6239b9 --- /dev/null +++ b/system/openssl/zb.patch @@ -0,0 +1,345 @@ +From 9ad69b994ae7c73ba06d9f75efd2625102de814c Mon Sep 17 00:00:00 2001 +From: Ken Zalewski <ken.zalewski@gmail.com> +Date: Mon, 21 Oct 2024 16:24:47 -0400 +Subject: [PATCH] Patch to openssl-1.1.1zb. This version addresses one + vulnerability: CVE-2024-9143 + +--- + CHANGES | 134 +++++++++++++++++++++++++++++++++++++ + NEWS | 18 +++++ + README | 2 +- + crypto/bn/bn_gf2m.c | 28 +++++--- + include/openssl/opensslv.h | 4 +- + test/ec_internal_test.c | 51 ++++++++++++++ + 6 files changed, 226 insertions(+), 11 deletions(-) + +diff --git a/CHANGES b/CHANGES +index c440948..7d82f7a 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -7,6 +7,140 @@ + https://github.com/openssl/openssl/commits/ and pick the appropriate + release branch. + ++ Changes between 1.1.1za and 1.1.1zb [16 Oct 2024] ++ ++ *) Harden BN_GF2m_poly2arr against misuse ++ ++ The BN_GF2m_poly2arr() function converts characteristic-2 field ++ (GF_{2^m}) Galois polynomials from a representation as a BIGNUM bitmask, ++ to a compact array with just the exponents of the non-zero terms. ++ ++ These polynomials are then used in BN_GF2m_mod_arr() to perform modular ++ reduction. A precondition of calling BN_GF2m_mod_arr() is that the ++ polynomial must have a non-zero constant term (i.e. the array has `0` as ++ its final element). ++ ++ Internally, callers of BN_GF2m_poly2arr() did not verify that ++ precondition, and binary EC curve parameters with an invalid polynomial ++ could lead to out of bounds memory reads and writes in BN_GF2m_mod_arr(). ++ ++ The precondition is always true for polynomials that arise from the ++ standard form of EC parameters for characteristic-two fields (X9.62). ++ See the "Finite Field Identification" section of: ++ ++ https://www.itu.int/ITU-T/formal-language/itu-t/x/x894/2018-cor1/ANSI-X9-62.html ++ ++ The OpenSSL GF(2^m) code supports only the trinomial and pentanomial ++ basis X9.62 forms. ++ ++ This commit updates BN_GF2m_poly2arr() to return `0` (failure) when ++ the constant term is zero (i.e. the input bitmask BIGNUM is not odd). ++ ++ Additionally, the return value is made unambiguous when there is not ++ enough space to also pad the array with a final `-1` sentinel value. ++ The return value is now always the number of elements (including the ++ final `-1`) that would be filled when the output array is sufficiently ++ large. Previously the same count was returned both when the array has ++ just enough room for the final `-1` and when it had only enough space ++ for non-sentinel values. ++ ++ Finally, BN_GF2m_poly2arr() is updated to reject polynomials whose ++ degree exceeds `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against ++ CPU exhausition attacks via excessively large inputs. ++ ++ The above issues do not arise in processing X.509 certificates. These ++ generally have EC keys from "named curves", and RFC5840 (Section 2.1.1) ++ disallows explicit EC parameters. The TLS code in OpenSSL enforces this ++ constraint only after the certificate is decoded, but, even if explicit ++ parameters are specified, they are in X9.62 form, which cannot represent ++ problem values as noted above. ++ ++ (CVE-2024-9143) ++ [Viktor Dukhovni] ++ ++ ++ Changes between 1.1.1y and 1.1.1za [26 Jun 2024] ++ ++ *) Fix SSL_select_next_proto ++ ++ Ensure that the provided client list is non-NULL and starts with a valid ++ entry. When called from the ALPN callback the client list should already ++ have been validated by OpenSSL so this should not cause a problem. When ++ called from the NPN callback the client list is locally configured and ++ will not have already been validated. Therefore SSL_select_next_proto ++ should not assume that it is correctly formatted. ++ ++ We implement stricter checking of the client protocol list. We also do the ++ same for the server list while we are about it. ++ ++ (CVE-2024-5535) ++ [Matt Caswell] ++ ++ ++ Changes between 1.1.1x and 1.1.1y [27 May 2024] ++ ++ *) Only free the read buffers if we're not using them ++ ++ If we're part way through processing a record, or the application has ++ not released all the records then we should not free our buffer because ++ they are still needed. ++ ++ (CVE-2024-4741) ++ [Matt Caswell] ++ [Watson Ladd] ++ ++ *) Fix unconstrained session cache growth in TLSv1.3 ++ ++ In TLSv1.3 we create a new session object for each ticket that we send. ++ We do this by duplicating the original session. If SSL_OP_NO_TICKET is in ++ use then the new session will be added to the session cache. However, if ++ early data is not in use (and therefore anti-replay protection is being ++ used), then multiple threads could be resuming from the same session ++ simultaneously. If this happens and a problem occurs on one of the threads, ++ then the original session object could be marked as not_resumable. When we ++ duplicate the session object this not_resumable status gets copied into the ++ new session object. The new session object is then added to the session ++ cache even though it is not_resumable. ++ ++ Subsequently, another bug means that the session_id_length is set to 0 for ++ sessions that are marked as not_resumable - even though that session is ++ still in the cache. Once this happens the session can never be removed from ++ the cache. When that object gets to be the session cache tail object the ++ cache never shrinks again and grows indefinitely. ++ ++ (CVE-2024-2511) ++ [Matt Caswell] ++ ++ ++ Changes between 1.1.1w and 1.1.1x [25 Jan 2024] ++ ++ *) Add NULL checks where ContentInfo data can be NULL ++ ++ PKCS12 structures contain PKCS7 ContentInfo fields. These fields are ++ optional and can be NULL even if the "type" is a valid value. OpenSSL ++ was not properly accounting for this and a NULL dereference can occur ++ causing a crash. ++ ++ (CVE-2024-0727) ++ [Matt Caswell] ++ ++ *) Make DH_check_pub_key() and DH_generate_key() safer yet ++ ++ We already check for an excessively large P in DH_generate_key(), but not in ++ DH_check_pub_key(), and none of them check for an excessively large Q. ++ ++ This change adds all the missing excessive size checks of P and Q. ++ ++ It's to be noted that behaviours surrounding excessively sized P and Q ++ differ. DH_check() raises an error on the excessively sized P, but only ++ sets a flag for the excessively sized Q. This behaviour is mimicked in ++ DH_check_pub_key(). ++ ++ (CVE-2024-5678) ++ [Richard Levitte] ++ [Hugo Landau] ++ ++ + Changes between 1.1.1v and 1.1.1w [11 Sep 2023] + + *) Fix POLY1305 MAC implementation corrupting XMM registers on Windows. +diff --git a/NEWS b/NEWS +index 1b849cd..7810ece 100644 +--- a/NEWS ++++ b/NEWS +@@ -5,6 +5,24 @@ + This file gives a brief overview of the major changes between each OpenSSL + release. For more details please read the CHANGES file. + ++ Major changes between OpenSSL 1.1.1za and OpenSSL 1.1.1zb [16 Oct 2024] ++ ++ o Harden BN_GF2m_poly2arr against misuse ++ ++ Major changes between OpenSSL 1.1.1y and OpenSSL 1.1.1za [26 Jun 2024] ++ ++ o Fix SSL_select_next_proto ++ ++ Major changes between OpenSSL 1.1.1x and OpenSSL 1.1.1y [27 May 2024] ++ ++ o Only free the read buffers if we're not using them ++ o Fix unconstrained session cache growth in TLSv1.3 ++ ++ Major changes between OpenSSL 1.1.1w and OpenSSL 1.1.1x [25 Jan 2024] ++ ++ o Add NULL checks where ContentInfo data can be NULL ++ o Make DH_check_pub_key() and DH_generate_key() safer yet ++ + Major changes between OpenSSL 1.1.1v and OpenSSL 1.1.1w [11 Sep 2023] + + o Fix POLY1305 MAC implementation corrupting XMM registers on Windows +diff --git a/README b/README +index e924e15..6612eb0 100644 +--- a/README ++++ b/README +@@ -1,5 +1,5 @@ + +- OpenSSL 1.1.1w 11 Sep 2023 ++ OpenSSL 1.1.1zb 16 Oct 2024 + + Copyright (c) 1998-2023 The OpenSSL Project + Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson +diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c +index a2ea867..6709471 100644 +--- a/crypto/bn/bn_gf2m.c ++++ b/crypto/bn/bn_gf2m.c +@@ -15,6 +15,7 @@ + #include "bn_local.h" + + #ifndef OPENSSL_NO_EC2M ++#include <openssl/ec.h> + + /* + * Maximum number of iterations before BN_GF2m_mod_solve_quad_arr should +@@ -1109,16 +1110,26 @@ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + /* + * Convert the bit-string representation of a polynomial ( \sum_{i=0}^n a_i * + * x^i) into an array of integers corresponding to the bits with non-zero +- * coefficient. Array is terminated with -1. Up to max elements of the array +- * will be filled. Return value is total number of array elements that would +- * be filled if array was large enough. ++ * coefficient. The array is intended to be suitable for use with ++ * `BN_GF2m_mod_arr()`, and so the constant term of the polynomial must not be ++ * zero. This translates to a requirement that the input BIGNUM `a` is odd. ++ * ++ * Given sufficient room, the array is terminated with -1. Up to max elements ++ * of the array will be filled. ++ * ++ * The return value is total number of array elements that would be filled if ++ * array was large enough, including the terminating `-1`. It is `0` when `a` ++ * is not odd or the constant term is zero contrary to requirement. ++ * ++ * The return value is also `0` when the leading exponent exceeds ++ * `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against CPU exhaustion attacks, + */ + int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + { + int i, j, k = 0; + BN_ULONG mask; + +- if (BN_is_zero(a)) ++ if (!BN_is_odd(a)) + return 0; + + for (i = a->top - 1; i >= 0; i--) { +@@ -1136,12 +1147,13 @@ int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + } + } + +- if (k < max) { ++ if (k > 0 && p[0] > OPENSSL_ECC_MAX_FIELD_BITS) ++ return 0; ++ ++ if (k < max) + p[k] = -1; +- k++; +- } + +- return k; ++ return k + 1; + } + + /* +diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h +index a1a5d07..ddf42b6 100644 +--- a/include/openssl/opensslv.h ++++ b/include/openssl/opensslv.h +@@ -39,8 +39,8 @@ extern "C" { + * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for + * major minor fix final patch/beta) + */ +-# define OPENSSL_VERSION_NUMBER 0x101011afL +-# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1za 26 Jun 2024" ++# define OPENSSL_VERSION_NUMBER 0x101011bfL ++# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1zb 16 Oct 2024" + + /*- + * The macros below are to be used for shared library (.so, .dll, ...) +diff --git a/test/ec_internal_test.c b/test/ec_internal_test.c +index 390f41f..1590a18 100644 +--- a/test/ec_internal_test.c ++++ b/test/ec_internal_test.c +@@ -150,6 +150,56 @@ static int field_tests_ecp_mont(void) + } + + #ifndef OPENSSL_NO_EC2M ++/* Test that decoding of invalid GF2m field parameters fails. */ ++static int ec2m_field_sanity(void) ++{ ++ int ret = 0; ++ BN_CTX *ctx = BN_CTX_new(); ++ BIGNUM *p, *a, *b; ++ EC_GROUP *group1 = NULL, *group2 = NULL, *group3 = NULL; ++ ++ TEST_info("Testing GF2m hardening\n"); ++ ++ BN_CTX_start(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ if (!TEST_ptr(b = BN_CTX_get(ctx)) ++ || !TEST_true(BN_one(a)) ++ || !TEST_true(BN_one(b))) ++ goto out; ++ ++ /* Even pentanomial value should be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf2))) ++ goto out; ++ if (!TEST_ptr_null(group1 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Zero constant term accepted in GF2m polynomial"); ++ ++ /* Odd hexanomial should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf3))) ++ goto out; ++ if (!TEST_ptr_null(group2 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Hexanomial accepted as GF2m polynomial"); ++ ++ /* Excessive polynomial degree should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0x71)) ++ || !TEST_true(BN_set_bit(p, OPENSSL_ECC_MAX_FIELD_BITS + 1))) ++ goto out; ++ if (!TEST_ptr_null(group3 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("GF2m polynomial degree > %d accepted", ++ OPENSSL_ECC_MAX_FIELD_BITS); ++ ++ ret = group1 == NULL && group2 == NULL && group3 == NULL; ++ ++ out: ++ EC_GROUP_free(group1); ++ EC_GROUP_free(group2); ++ EC_GROUP_free(group3); ++ BN_CTX_end(ctx); ++ BN_CTX_free(ctx); ++ ++ return ret; ++} ++ + /* test EC_GF2m_simple_method directly */ + static int field_tests_ec2_simple(void) + { +@@ -367,6 +417,7 @@ int setup_tests(void) + ADD_TEST(field_tests_ecp_simple); + ADD_TEST(field_tests_ecp_mont); + #ifndef OPENSSL_NO_EC2M ++ ADD_TEST(ec2m_field_sanity); + ADD_TEST(field_tests_ec2_simple); + #endif + ADD_ALL_TESTS(field_tests_default, crv_len); diff --git a/system/openssl/zb2.patch b/system/openssl/zb2.patch new file mode 100644 index 000000000..f6405e003 --- /dev/null +++ b/system/openssl/zb2.patch @@ -0,0 +1,177 @@ +From 2a3058269d854754b66ef8bdaefb7820bd8c0908 Mon Sep 17 00:00:00 2001 +From: Ken Zalewski <ken.zalewski@gmail.com> +Date: Sun, 9 Feb 2025 11:47:12 -0500 +Subject: [PATCH] Patch to openssl-1.1.1zb p2. This version addresses one + vulnerability: CVE-2024-13176 + +--- + CHANGES | 25 +++++++++++++++++++++++++ + NEWS | 5 +++++ + README | 2 +- + crypto/bn/bn_exp.c | 21 +++++++++++++++------ + crypto/ec/ec_lib.c | 6 +++--- + include/crypto/bn.h | 3 +++ + include/openssl/opensslv.h | 2 +- + 7 files changed, 53 insertions(+), 11 deletions(-) + +diff --git a/CHANGES b/CHANGES +index 7d82f7a..66ae239 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -7,6 +7,31 @@ + https://github.com/openssl/openssl/commits/ and pick the appropriate + release branch. + ++ Changes between 1.1.1zb_p1 and 1.1.1zb_p2 [20 Jan 2025] ++ ++ *) Fix timing side-channel in ECDSA signature computation ++ ++ There is a timing signal of around 300 nanoseconds when the top word of ++ the inverted ECDSA nonce value is zero. This can happen with significant ++ probability only for some of the supported elliptic curves. In particular ++ the NIST P-521 curve is affected. To be able to measure this leak, the ++ attacker process must either be located in the same physical computer or ++ must have a very fast network connection with low latency. ++ ++ Attacks on ECDSA nonce are also known as Minerva attack. ++ ++ [CVE-2024-13176] ++ [Tomas Mraz] ++ ++ ++ Changes between 1.1.1zb and 1.1.1zb_p1 [24 Oct 2024] ++ ++ *) Fix the version number for versions that require two letters. ++ ++ [V Petrischew] ++ [Ken Zalewski] ++ ++ + Changes between 1.1.1za and 1.1.1zb [16 Oct 2024] + + *) Harden BN_GF2m_poly2arr against misuse +diff --git a/NEWS b/NEWS +index 7810ece..ab46ab1 100644 +--- a/NEWS ++++ b/NEWS +@@ -5,6 +5,11 @@ + This file gives a brief overview of the major changes between each OpenSSL + release. For more details please read the CHANGES file. + ++ Major changes between OpenSSL 1.1.1zb and OpenSSL 1.1.1zb_p2 [20 Jan 2025] ++ ++ o Fix version number for versions that require two letters ++ o Fix timing side-channel in ECDSA signature computation ++ + Major changes between OpenSSL 1.1.1za and OpenSSL 1.1.1zb [16 Oct 2024] + + o Harden BN_GF2m_poly2arr against misuse +diff --git a/README b/README +index 6612eb0..a02895e 100644 +--- a/README ++++ b/README +@@ -1,5 +1,5 @@ + +- OpenSSL 1.1.1zb 16 Oct 2024 ++ OpenSSL 1.1.1zb_p2 20 Jan 2025 + + Copyright (c) 1998-2023 The OpenSSL Project + Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson +diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c +index 517e3c2..0489658 100644 +--- a/crypto/bn/bn_exp.c ++++ b/crypto/bn/bn_exp.c +@@ -601,7 +601,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, + * out by Colin Percival, + * http://www.daemonology.net/hyperthreading-considered-harmful/) + */ +-int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, ++int bn_mod_exp_mont_fixed_top(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *in_mont) + { +@@ -618,10 +618,6 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + unsigned int t4 = 0; + #endif + +- bn_check_top(a); +- bn_check_top(p); +- bn_check_top(m); +- + if (!BN_is_odd(m)) { + BNerr(BN_F_BN_MOD_EXP_MONT_CONSTTIME, BN_R_CALLED_WITH_EVEN_MODULUS); + return 0; +@@ -1141,7 +1137,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + goto err; + } else + #endif +- if (!BN_from_montgomery(rr, &tmp, mont, ctx)) ++ if (!bn_from_mont_fixed_top(rr, &tmp, mont, ctx)) + goto err; + ret = 1; + err: +@@ -1155,6 +1151,19 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + return ret; + } + ++int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, ++ BN_MONT_CTX *in_mont) ++{ ++ bn_check_top(a); ++ bn_check_top(p); ++ bn_check_top(m); ++ if (!bn_mod_exp_mont_fixed_top(rr, a, p, m, ctx, in_mont)) ++ return 0; ++ bn_correct_top(rr); ++ return 1; ++} ++ + int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) + { +diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c +index 08db89f..fef0c2f 100644 +--- a/crypto/ec/ec_lib.c ++++ b/crypto/ec/ec_lib.c +@@ -1155,10 +1155,10 @@ static int ec_field_inverse_mod_ord(const EC_GROUP *group, BIGNUM *r, + if (!BN_sub(e, group->order, e)) + goto err; + /*- +- * Exponent e is public. +- * No need for scatter-gather or BN_FLG_CONSTTIME. ++ * Although the exponent is public we want the result to be ++ * fixed top. + */ +- if (!BN_mod_exp_mont(r, x, e, group->order, ctx, group->mont_data)) ++ if (!bn_mod_exp_mont_fixed_top(r, x, e, group->order, ctx, group->mont_data)) + goto err; + + ret = 1; +diff --git a/include/crypto/bn.h b/include/crypto/bn.h +index 250914c..10cfc84 100644 +--- a/include/crypto/bn.h ++++ b/include/crypto/bn.h +@@ -72,6 +72,9 @@ int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); + */ + int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, + BN_MONT_CTX *mont, BN_CTX *ctx); ++int bn_mode_exp_mont_fixed_top(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, ++ const BIGNUM *m, BN_CTX *ctx, ++ BN_MONT_CTX *in_mont); + int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, + BN_CTX *ctx); + int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, +diff --git a/include/openssl/opensslv.h b/include/openssl/opensslv.h +index ddf42b6..1568415 100644 +--- a/include/openssl/opensslv.h ++++ b/include/openssl/opensslv.h +@@ -40,7 +40,7 @@ extern "C" { + * major minor fix final patch/beta) + */ + # define OPENSSL_VERSION_NUMBER 0x101011bfL +-# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1zb 16 Oct 2024" ++# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1z 20 Jan 2025" + + /*- + * The macros below are to be used for shared library (.so, .dll, ...) diff --git a/system/parted/APKBUILD b/system/parted/APKBUILD index b83f7bd8b..d5d6c49ef 100644 --- a/system/parted/APKBUILD +++ b/system/parted/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=parted -pkgver=3.5 +pkgver=3.6 pkgrel=0 pkgdesc="Utility to create, destroy, resize, check and copy partitions" url="https://www.gnu.org/software/parted/parted.html" @@ -13,6 +13,7 @@ makedepends="ncurses-dev lvm2-dev bash util-linux-dev autoconf automake" checkdepends="check-dev e2fsprogs python3" source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz fix-includes.patch + modern-c.patch posix-shell.patch sysmacros.patch tests-call-name-correctly.patch @@ -41,8 +42,9 @@ package() { rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true } -sha512sums="87fc69e947de5f0b670ee5373a7cdf86180cd782f6d7280f970f217f73f55ee1b1b018563f48954f3a54fdde5974b33e07eee68c9ccdf08e621d3dc0e3ce126a parted-3.5.tar.xz +sha512sums="034a44b25718acba175212019d24f092972a791c5bd1d921ae91e17478657a77c5c5dd0c832bed7968c3a07ec6c65c0785acfac2f90c1ca5e1692f3c141693ef parted-3.6.tar.xz 55ee63c218d1867c0f2c596e7c3eec5c42af160181456cc551fe3d432eabed0ac2dd3a3955ff0c375f76aeec8071e7f55a32834b87a0d39b8ef30361f671bfdd fix-includes.patch +66c74da28033b7340767c7339b307928c396930dca9c7cdd8f226f8cf18358eedba78ceba03036ad3f9a62fc5e164171edff81670477d3bf3af81847db3879d4 modern-c.patch 507d19454aca6631fe387ca53b28f2925c325044efc7b506e81429a5b42914e56c39e1644c570840b4c4c153da742237428cba2a1ff651487f2ef8a0a8c64d1f posix-shell.patch 5d2e8f22b6cd5bdd3289996848279a945ca09acd2862e82283bb769c2e4d61a24a31e1793d81385e8f3f1f4d48417e2308c5ea39dac47e832666363dde044ba7 sysmacros.patch -8bd86d2b0401566e7757c43d849b7f913cc4ec1bf50d5641dc72d7e278ca38db2ac746cd8dcc756b245021ea1f9738875b6a831f05185b9217d3f1c287944748 tests-call-name-correctly.patch" +62b5b94441288beddd01f2e51e6770c1c7cf1fea0b4354a77849568bf8a350724f6449e7efa04719b9970fa3c0fc1451dcc9dc3368a013b8d72854b23c8ff205 tests-call-name-correctly.patch" diff --git a/system/parted/modern-c.patch b/system/parted/modern-c.patch new file mode 100644 index 000000000..1f54f6782 --- /dev/null +++ b/system/parted/modern-c.patch @@ -0,0 +1,41 @@ +From 16343bda6ce0d41edf43f8dac368db3bbb63d271 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum <rudi@heitbaum.com> +Date: Wed, 20 Nov 2024 12:22:22 +0000 +Subject: [PATCH] bug#74444: [PATCH] parted: fix do_version declaration + +With gcc 15-20241117 compile fails with the below error, update the +do_version declaration to match the header in command.h + +../../parted/parted.c: In function '_init_commands': +../../parted/parted.c:2469:9: error: passing argument 2 of 'command_create' from incompatible pointer type [-Wincompatible-pointer-types] + 2469 | do_version, + | ^~~~~~~~~~ + | | + | int (*)(void) +In file included from ../../parted/parted.c:28: +../../parted/command.h:35:39: note: expected 'int (*)(PedDevice **, PedDisk **)' {aka 'int (*)(struct _PedDevice **, struct _PedDisk **)'} but argument is of type 'int (*)(void)' + 35 | int (*method) (PedDevice** dev, PedDisk** diskp), + | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> +Signed-off-by: Brian C. Lane <bcl@redhat.com> +--- + parted/parted.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/parted/parted.c b/parted/parted.c +index 3abb52f..fc2aeba 100644 +--- a/parted/parted.c ++++ b/parted/parted.c +@@ -2172,7 +2172,7 @@ do_unit (PedDevice** dev, PedDisk** diskp) + } + + static int +-do_version () ++do_version (PedDevice** dev, PedDisk** diskp) + { + printf ("\n%s\n%s", + prog_name, +-- +2.39.5 + diff --git a/system/parted/tests-call-name-correctly.patch b/system/parted/tests-call-name-correctly.patch index 27a6287e8..30645842d 100644 --- a/system/parted/tests-call-name-correctly.patch +++ b/system/parted/tests-call-name-correctly.patch @@ -17,8 +17,8 @@ mkpart syntax recently changed, tests do not reflect that. dd if=/dev/null of=$dev bs=1M seek=$n_mbs || fail=1 # create 1st partition --parted --align=none -s $dev mklabel gpt mkpart p1 1MiB 2MiB > err 2>&1 || fail=1 -+parted --align=none -s $dev mklabel gpt mkpart primary 1MiB 2MiB name 1 p1 > err 2>&1 || fail=1 +-parted --align=none -s $dev mklabel gpt mkpart p1 1MiB 2048KiB > err 2>&1 || fail=1 ++parted --align=none -s $dev mklabel gpt mkpart primary 1MiB 2048KiB name 1 p1 > err 2>&1 || fail=1 compare /dev/null err || fail=1 # expect no output #parted -m -s $dev u s p > exp || fail=1 diff --git a/system/patch/APKBUILD b/system/patch/APKBUILD index 62a551259..19f07c789 100644 --- a/system/patch/APKBUILD +++ b/system/patch/APKBUILD @@ -1,23 +1,16 @@ # Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house> pkgname=patch -pkgver=2.7.6 -pkgrel=5 +pkgver=2.8 +pkgrel=0 pkgdesc="Utility to apply diffs to files" url="https://www.gnu.org/software/patch/patch.html" arch="all" license="GPL-3.0+" depends="" -checkdepends="autoconf automake bash ed" -makedepends="autoconf automake" +checkdepends="bash ed" +makedepends="" subpackages="$pkgname-doc" -source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz - allow-missing.patch - CVE-2018-1000156.patch - CVE-2018-6951.patch - CVE-2018-6952.patch - CVE-2019-13636.patch - CVE-2019-13638.patch - " +source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz" # secfixes: # 2.7.6-r2: @@ -29,11 +22,6 @@ source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz # - CVE-2019-13636 # - CVE-2019-13638 -prepare() { - default_prepare - aclocal && autoheader && autoconf && automake --add-missing -} - build() { ./configure \ --build=$CBUILD \ @@ -58,10 +46,4 @@ package() { rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true } -sha512sums="fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd patch-2.7.6.tar.xz -317c922c3adcf347024a9ffd2374a1827b19cc1f275a90e195e070cbcf16fb47788b14ffd18365ae5e1f867ed650e6f9aed6acf287bfc427107f3ed8bcd2b3af allow-missing.patch -93414b33413b493eaa15027dfbe39c00eb1c556acf9f30af4c0ca113303867c5e7ad441c2596a7f9d060b8b67735a2a1c8be5db3c779ea47302f616ef8530d5d CVE-2018-1000156.patch -db51d0b791d38dd4f1b373621ee18620ae339b172f58a79420fdaa4a4b1b1d9df239cf61bbddc4e6a4896b28b8cffc7c99161eb5e2facaec8df86a1bf7755bc0 CVE-2018-6951.patch -99df964d826d400f87e9b82bf2600d8663c59bb8f9bf4aec082adc8cf6261744f37d416e15492d6e883202ade521d4436cb41c91f516085c3e6ce8e01a8956fb CVE-2018-6952.patch -cecb80d8d48dfe66bc13c22a5ed0eb52157cc85a1b74d03d4a8ea1ebcfe5d59bae975aec34ac685adc71129dcdb794579fee0e221144412a7c1fa71c460f63c1 CVE-2019-13636.patch -d60f8c2364fca9b73aa73b5914cfd6571d11528d13fa7703ccfa93730cbdf8a6e4c9ca04cb7d02a40d33c38075890790b490052d5217e728b0948991da937980 CVE-2019-13638.patch" +sha512sums="d689d696660a662753e8660792733c3be0a94c76abfe7a28b0f9f70300c3a42d6437d081553a59bfde6e1b0d5ee13ed89be48d0b00b6da2cadbfc14a15ada603 patch-2.8.tar.xz" diff --git a/system/patch/CVE-2018-1000156.patch b/system/patch/CVE-2018-1000156.patch deleted file mode 100644 index 36f33dea2..000000000 --- a/system/patch/CVE-2018-1000156.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher <agruen@gnu.org> -Date: Fri, 6 Apr 2018 12:14:49 +0200 -Subject: Fix arbitrary command execution in ed-style patches - (CVE-2018-1000156) - -* src/pch.c (do_ed_script): Write ed script to a temporary file instead -of piping it to ed: this will cause ed to abort on invalid commands -instead of rejecting them and carrying on. -* tests/ed-style: New test case. -* tests/Makefile.am (TESTS): Add test case. ---- - src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++--------------- - tests/Makefile.am | 1 + - tests/ed-style | 41 +++++++++++++++++++++++++ - 3 files changed, 108 insertions(+), 25 deletions(-) - create mode 100644 tests/ed-style - -diff --git a/src/pch.c b/src/pch.c -index 0c5cc26..4fd5a05 100644 ---- a/src/pch.c -+++ b/src/pch.c -@@ -33,6 +33,7 @@ - # include <io.h> - #endif - #include <safe.h> -+#include <sys/wait.h> - - #define INITHUNKMAX 125 /* initial dynamic allocation size */ - -@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname, - static char const editor_program[] = EDITOR_PROGRAM; - - file_offset beginning_of_this_line; -- FILE *pipefp = 0; - size_t chars_read; -+ FILE *tmpfp = 0; -+ char const *tmpname; -+ int tmpfd; -+ pid_t pid; -+ -+ if (! dry_run && ! skip_rest_of_patch) -+ { -+ /* Write ed script to a temporary file. This causes ed to abort on -+ invalid commands such as when line numbers or ranges exceed the -+ number of available lines. When ed reads from a pipe, it rejects -+ invalid commands and treats the next line as a new command, which -+ can lead to arbitrary command execution. */ -+ -+ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0); -+ if (tmpfd == -1) -+ pfatal ("Can't create temporary file %s", quotearg (tmpname)); -+ tmpfp = fdopen (tmpfd, "w+b"); -+ if (! tmpfp) -+ pfatal ("Can't open stream for file %s", quotearg (tmpname)); -+ } - -- if (! dry_run && ! skip_rest_of_patch) { -- int exclusive = *outname_needs_removal ? 0 : O_EXCL; -- if (inerrno != ENOENT) -- { -- *outname_needs_removal = true; -- copy_file (inname, outname, 0, exclusive, instat.st_mode, true); -- } -- sprintf (buf, "%s %s%s", editor_program, -- verbosity == VERBOSE ? "" : "- ", -- outname); -- fflush (stdout); -- pipefp = popen(buf, binary_transput ? "wb" : "w"); -- if (!pipefp) -- pfatal ("Can't open pipe to %s", quotearg (buf)); -- } - for (;;) { - char ed_command_letter; - beginning_of_this_line = file_tell (pfp); -@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname, - } - ed_command_letter = get_ed_command_letter (buf); - if (ed_command_letter) { -- if (pipefp) -- if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) -+ if (tmpfp) -+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) - write_fatal (); - if (ed_command_letter != 'd' && ed_command_letter != 's') { - p_pass_comments_through = true; - while ((chars_read = get_line ()) != 0) { -- if (pipefp) -- if (! fwrite (buf, sizeof *buf, chars_read, pipefp)) -+ if (tmpfp) -+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp)) - write_fatal (); - if (chars_read == 2 && strEQ (buf, ".\n")) - break; -@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname, - break; - } - } -- if (!pipefp) -+ if (!tmpfp) - return; -- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0 -- || fflush (pipefp) != 0) -+ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0 -+ || fflush (tmpfp) != 0) - write_fatal (); -- if (pclose (pipefp) != 0) -- fatal ("%s FAILED", editor_program); -+ -+ if (lseek (tmpfd, 0, SEEK_SET) == -1) -+ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname)); -+ -+ if (! dry_run && ! skip_rest_of_patch) { -+ int exclusive = *outname_needs_removal ? 0 : O_EXCL; -+ *outname_needs_removal = true; -+ if (inerrno != ENOENT) -+ { -+ *outname_needs_removal = true; -+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true); -+ } -+ sprintf (buf, "%s %s%s", editor_program, -+ verbosity == VERBOSE ? "" : "- ", -+ outname); -+ fflush (stdout); -+ -+ pid = fork(); -+ if (pid == -1) -+ pfatal ("Can't fork"); -+ else if (pid == 0) -+ { -+ dup2 (tmpfd, 0); -+ execl ("/bin/sh", "sh", "-c", buf, (char *) 0); -+ _exit (2); -+ } -+ else -+ { -+ int wstatus; -+ if (waitpid (pid, &wstatus, 0) == -1 -+ || ! WIFEXITED (wstatus) -+ || WEXITSTATUS (wstatus) != 0) -+ fatal ("%s FAILED", editor_program); -+ } -+ } -+ -+ fclose (tmpfp); -+ safe_unlink (tmpname); - - if (ofp) - { -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 6b6df63..16f8693 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -32,6 +32,7 @@ TESTS = \ - crlf-handling \ - dash-o-append \ - deep-directories \ -+ ed-style \ - empty-files \ - false-match \ - fifo \ -diff --git a/tests/ed-style b/tests/ed-style -new file mode 100644 -index 0000000..d8c0689 ---- /dev/null -+++ b/tests/ed-style -@@ -0,0 +1,41 @@ -+# Copyright (C) 2018 Free Software Foundation, Inc. -+# -+# Copying and distribution of this file, with or without modification, -+# in any medium, are permitted without royalty provided the copyright -+# notice and this notice are preserved. -+ -+. $srcdir/test-lib.sh -+ -+require cat -+use_local_patch -+use_tmpdir -+ -+# ============================================================== -+ -+cat > ed1.diff <<EOF -+0a -+foo -+. -+EOF -+ -+check 'patch -e foo -i ed1.diff' <<EOF -+EOF -+ -+check 'cat foo' <<EOF -+foo -+EOF -+ -+cat > ed2.diff <<EOF -+1337a -+r !echo bar -+,p -+EOF -+ -+check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF -+? -+Status: 2 -+EOF -+ -+check 'cat foo' <<EOF -+foo -+EOF --- -cgit v1.0-41-gc330 - diff --git a/system/patch/CVE-2018-6951.patch b/system/patch/CVE-2018-6951.patch deleted file mode 100644 index 002d8ffd9..000000000 --- a/system/patch/CVE-2018-6951.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher <agruen@gnu.org> -Date: Mon, 12 Feb 2018 16:48:24 +0100 -Subject: Fix segfault with mangled rename patch - -http://savannah.gnu.org/bugs/?53132 -* src/pch.c (intuit_diff_type): Ensure that two filenames are specified -for renames and copies (fix the existing check). ---- - src/pch.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/pch.c b/src/pch.c -index ff9ed2c..bc6278c 100644 ---- a/src/pch.c -+++ b/src/pch.c -@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type) - if ((pch_rename () || pch_copy ()) - && ! inname - && ! ((i == OLD || i == NEW) && -- p_name[! reverse] && -+ p_name[reverse] && p_name[! reverse] && -+ name_is_valid (p_name[reverse]) && - name_is_valid (p_name[! reverse]))) - { - say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy"); --- -cgit v1.0-41-gc330 - diff --git a/system/patch/CVE-2018-6952.patch b/system/patch/CVE-2018-6952.patch deleted file mode 100644 index d9ad374a2..000000000 --- a/system/patch/CVE-2018-6952.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9c986353e420ead6e706262bf204d6e03322c300 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher <agruen@gnu.org> -Date: Fri, 17 Aug 2018 13:35:40 +0200 -Subject: Fix swapping fake lines in pch_swap - -* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a -blank line in the middle of a context-diff hunk: that empty line stays -in the middle of the hunk and isn't swapped. - -Fixes: https://savannah.gnu.org/bugs/index.php?53133 ---- - src/pch.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pch.c b/src/pch.c -index e92bc64..a500ad9 100644 ---- a/src/pch.c -+++ b/src/pch.c -@@ -2122,7 +2122,7 @@ pch_swap (void) - } - if (p_efake >= 0) { /* fix non-freeable ptr range */ - if (p_efake <= i) -- n = p_end - i + 1; -+ n = p_end - p_ptrn_lines; - else - n = -i; - p_efake += n; --- -cgit v1.0-41-gc330 - diff --git a/system/patch/CVE-2019-13636.patch b/system/patch/CVE-2019-13636.patch deleted file mode 100644 index e62c3d417..000000000 --- a/system/patch/CVE-2019-13636.patch +++ /dev/null @@ -1,108 +0,0 @@ -From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher <agruen@gnu.org> -Date: Mon, 15 Jul 2019 16:21:48 +0200 -Subject: Don't follow symlinks unless --follow-symlinks is given - -* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, -append_to_file): Unless the --follow-symlinks option is given, open files with -the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing -that consistently for input files. -* src/util.c (create_backup): When creating empty backup files, (re)create them -with O_CREAT | O_EXCL to avoid following symlinks in that case as well. ---- - src/inp.c | 12 ++++++++++-- - src/util.c | 14 +++++++++++--- - 2 files changed, 21 insertions(+), 5 deletions(-) - -diff --git a/src/inp.c b/src/inp.c -index 32d0919..22d7473 100644 ---- a/src/inp.c -+++ b/src/inp.c -@@ -238,8 +238,13 @@ plan_a (char const *filename) - { - if (S_ISREG (instat.st_mode)) - { -- int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); -+ int flags = O_RDONLY | binary_transput; - size_t buffered = 0, n; -+ int ifd; -+ -+ if (! follow_symlinks) -+ flags |= O_NOFOLLOW; -+ ifd = safe_open (filename, flags, 0); - if (ifd < 0) - pfatal ("can't open file %s", quotearg (filename)); - -@@ -340,6 +345,7 @@ plan_a (char const *filename) - static void - plan_b (char const *filename) - { -+ int flags = O_RDONLY | binary_transput; - int ifd; - FILE *ifp; - int c; -@@ -353,7 +359,9 @@ plan_b (char const *filename) - - if (instat.st_size == 0) - filename = NULL_DEVICE; -- if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0 -+ if (! follow_symlinks) -+ flags |= O_NOFOLLOW; -+ if ((ifd = safe_open (filename, flags, 0)) < 0 - || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r"))) - pfatal ("Can't open file %s", quotearg (filename)); - if (TMPINNAME_needs_removal) -diff --git a/src/util.c b/src/util.c -index 1cc08ba..fb38307 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) - - try_makedirs_errno = ENOENT; - safe_unlink (bakname); -- while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) -+ while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0) - { - if (errno != try_makedirs_errno) - pfatal ("Can't create file %s", quotearg (bakname)); -@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode, - static void - copy_to_fd (const char *from, int tofd) - { -+ int from_flags = O_RDONLY | O_BINARY; - int fromfd; - ssize_t i; - -- if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0) -+ if (! follow_symlinks) -+ from_flags |= O_NOFOLLOW; -+ if ((fromfd = safe_open (from, from_flags, 0)) < 0) - pfatal ("Can't reopen file %s", quotearg (from)); - while ((i = read (fromfd, buf, bufsize)) != 0) - { -@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost, - else - { - assert (S_ISREG (mode)); -+ if (! follow_symlinks) -+ to_flags |= O_NOFOLLOW; - tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode, - to_dir_known_to_exist); - copy_to_fd (from, tofd); -@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost, - void - append_to_file (char const *from, char const *to) - { -+ int to_flags = O_WRONLY | O_APPEND | O_BINARY; - int tofd; - -- if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0) -+ if (! follow_symlinks) -+ to_flags |= O_NOFOLLOW; -+ if ((tofd = safe_open (to, to_flags, 0)) < 0) - pfatal ("Can't reopen file %s", quotearg (to)); - copy_to_fd (from, tofd); - if (close (tofd) != 0) --- -cgit v1.0-41-gc330 - diff --git a/system/patch/CVE-2019-13638.patch b/system/patch/CVE-2019-13638.patch deleted file mode 100644 index 38caff628..000000000 --- a/system/patch/CVE-2019-13638.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher <agruen@gnu.org> -Date: Fri, 6 Apr 2018 19:36:15 +0200 -Subject: Invoke ed directly instead of using the shell - -* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell -command to avoid quoting vulnerabilities. ---- - src/pch.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/pch.c b/src/pch.c -index 4fd5a05..16e001a 100644 ---- a/src/pch.c -+++ b/src/pch.c -@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, - *outname_needs_removal = true; - copy_file (inname, outname, 0, exclusive, instat.st_mode, true); - } -- sprintf (buf, "%s %s%s", editor_program, -- verbosity == VERBOSE ? "" : "- ", -- outname); - fflush (stdout); - - pid = fork(); -@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname, - else if (pid == 0) - { - dup2 (tmpfd, 0); -- execl ("/bin/sh", "sh", "-c", buf, (char *) 0); -+ assert (outname[0] != '!' && outname[0] != '-'); -+ execlp (editor_program, editor_program, "-", outname, (char *) NULL); - _exit (2); - } - else --- -cgit v1.0-41-gc330 - diff --git a/system/patch/allow-missing.patch b/system/patch/allow-missing.patch deleted file mode 100644 index 98c9aa877..000000000 --- a/system/patch/allow-missing.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher <agruen@gnu.org> -Date: Fri, 6 Apr 2018 11:34:51 +0200 -Subject: Allow input files to be missing for ed-style patches - -* src/pch.c (do_ed_script): Allow input files to be missing so that new -files will be created as with non-ed-style patches. ---- - src/pch.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/pch.c b/src/pch.c -index bc6278c..0c5cc26 100644 ---- a/src/pch.c -+++ b/src/pch.c -@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname, - - if (! dry_run && ! skip_rest_of_patch) { - int exclusive = *outname_needs_removal ? 0 : O_EXCL; -- assert (! inerrno); -- *outname_needs_removal = true; -- copy_file (inname, outname, 0, exclusive, instat.st_mode, true); -+ if (inerrno != ENOENT) -+ { -+ *outname_needs_removal = true; -+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true); -+ } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); --- -cgit v1.0-41-gc330 - diff --git a/system/pax-utils/APKBUILD b/system/pax-utils/APKBUILD index 9d306faf2..9b64e2668 100644 --- a/system/pax-utils/APKBUILD +++ b/system/pax-utils/APKBUILD @@ -1,28 +1,31 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Zach van Rijn <me@zv.io> pkgname=pax-utils -pkgver=1.3.4 +pkgver=1.3.8 pkgrel=0 -pkgdesc="ELF related utils for ELF 32/64 binaries" +pkgdesc="ELF utils that can check files for security relevant properties" url="https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities" arch="all" -options="!check" # depends on nx package(s) +options="!check" # depends on unpackaged py3-pyelftools license="GPL-2.0-only" depends="scanelf" -makedepends="linux-headers libcap-dev" -# ATTENTION MAINTAINERS: Generate a new tarball from upstream sources: -# git clone https://anongit.gentoo.org/git/proj/pax-utils.git -# cd pax-utils -# ./make-tarball.sh v$pkgver -source="https://distfiles.adelielinux.org/source/upstream/$pkgname-$pkgver.tar.xz" +makedepends="linux-headers libcap-dev muon xmlto" +source="https://dev.gentoo.org/~sam/distfiles/app-misc/$pkgname/$pkgname-$pkgver.tar.xz" subpackages="$pkgname-doc scanelf:_scanelf" build() { - make USE_CAP=yes + muon setup \ + -Dprefix=/usr \ + -Dlddtree_implementation=sh \ + -Duse_libcap=enabled \ + -Dbuild_manpages=enabled \ + -Duse_fuzzing=false \ + build + muon -C build samu } package() { - make DESTDIR="$pkgdir/" install + DESTDIR="$pkgdir" muon -C build install # Don't conflict with lddtree package rm -f "$pkgdir"/usr/bin/lddtree @@ -36,4 +39,4 @@ _scanelf() { mv "$pkgdir"/usr/bin/scanelf "$subpkgdir"/usr/bin/ } -sha512sums="44a475860823e8b70b1d09d69e5fba3ed8298511d07e1e7b09ce62237cb8b1ecee8fc2fc550d6853d0b9f8db3c350bf78ced49d5f210997b294dc10e36627fcd pax-utils-1.3.4.tar.xz" +sha512sums="0dde95f86802729d80b7b38af84dec636e973f6abc70600633edcb05d3d5f95c1b2861300ce478dd7f798c7a1e5eccb1011c06c53adba38e11a996b69d463656 pax-utils-1.3.8.tar.xz" diff --git a/system/perl-io-socket-ssl/APKBUILD b/system/perl-io-socket-ssl/APKBUILD index e8b9f6556..210fcabc3 100644 --- a/system/perl-io-socket-ssl/APKBUILD +++ b/system/perl-io-socket-ssl/APKBUILD @@ -5,7 +5,7 @@ _pkgreal=IO-Socket-SSL _author=SULLR _au=${_author%%"${_author#??}"} _a=${_author%%"${_author#?}"} -pkgver=2.085 +pkgver=2.095 pkgrel=0 pkgdesc="Perl module implementing SSL/TLS with IO::Socket interface" url="https://metacpan.org/release/IO-Socket-SSL" @@ -31,4 +31,4 @@ package() { find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } -sha512sums="c4e045e88f69579d53a3663ed8f74d342fe3529e24e06d9e7d299debafdb840839c6f5bccb579b4d03f7501615439dba4661ac006312f379a2598a3030634cfd IO-Socket-SSL-2.085.tar.gz" +sha512sums="6025bc0eac4258e81eb0fc6da9297e8c3c648ed02ba0b2b66a6f604f83a7bd5d8b4a945e7c51c733754a7738ed1309316d4d1be6eccf1f7744fc58fd9fb27109 IO-Socket-SSL-2.095.tar.gz" diff --git a/system/perl-net-http/APKBUILD b/system/perl-net-http/APKBUILD index 6235d2fc0..1cff0a513 100644 --- a/system/perl-net-http/APKBUILD +++ b/system/perl-net-http/APKBUILD @@ -23,6 +23,7 @@ build() { } check() { + export NO_NETWORK_TESTING=1 #986 make test } diff --git a/system/pkgconf/APKBUILD b/system/pkgconf/APKBUILD index e67f27565..a3cb2132e 100644 --- a/system/pkgconf/APKBUILD +++ b/system/pkgconf/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=pkgconf -pkgver=1.9.4 +pkgver=2.4.3 pkgrel=0 pkgdesc="Toolkit for maintaining development package metadata" url="http://pkgconf.org/" @@ -47,4 +47,4 @@ dev() { mv "$subpkgdir"/usr/share/aclocal/pkg.m4 "$pkgdir"/usr/share/aclocal/ } -sha512sums="079436244f3942161f91c961c96d382a85082079c9843fec5ddd7fb245ba7500a9f7a201b5ef2c70a7a079fe1aacf3a52b73de5402a6f061df87bcdcf0a90755 pkgconf-1.9.4.tar.xz" +sha512sums="7e59b6aaf875ec3fc8c225985937384d2aef57d9daf64b7ea88242bf1a11349fe52cf6d1238d728f0509599982d69c761a0f01e8f8e24de028db58288760896f pkgconf-2.4.3.tar.xz" diff --git a/system/po4a/APKBUILD b/system/po4a/APKBUILD index f5cdb0755..728357272 100644 --- a/system/po4a/APKBUILD +++ b/system/po4a/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Christian Kampka <christian@kampka.net> # Maintainer: Zach van Rijn <me@zv.io> pkgname=po4a -pkgver=0.69 +pkgver=0.73 pkgrel=0 pkgdesc="Tools for helping translation of documentation" url="https://po4a.org" @@ -35,5 +35,5 @@ package() { find ${pkgdir} -name .packlist -o -name perllocal.pod -delete } -sha512sums="9cb5eec547ab18d1c3ebdda212b909fc4f5489a74641ba2d7e0a3a1d060f245d23667c16e687c678c5ccc3809c9315d20673266dcc3764172a899caa397238e3 po4a-0.69.tar.gz -be457a023383c60864bd155b13d8952f8ae523b709a464af2419695a3fb64c1ee6b4176b23811241fa9bed87c2d0c44dbf8c19178046b052b49ea191d03ccc5a disable-stats.patch" +sha512sums="5860af1da2a0ab1875a994b09ae2da481c12a6777655610e8c8ded4a6132048a33aeea10eaa756a73af1a7bf1e3e65f7ab5ded9d799904ae3240c6ec3b0a31d2 po4a-0.73.tar.gz +2765d06cb3009126af21570faea8c6bb04b570716d26ab1b519868023ac22662f0aa489de063bd55f444baa7f6403f4e0c2c8605f6b4cfa4e1a0c2762b9f2def disable-stats.patch" diff --git a/system/po4a/disable-stats.patch b/system/po4a/disable-stats.patch index 692888460..bbe6bc5e2 100644 --- a/system/po4a/disable-stats.patch +++ b/system/po4a/disable-stats.patch @@ -10,7 +10,7 @@ This is because stdout/stderr is empty. --- po4a-0.66/Po4aBuilder.pm.old 2022-01-01 18:10:18.000000000 -0600 +++ po4a-0.66/Po4aBuilder.pm 2022-05-07 19:42:25.316006467 -0500 -@@ -15,7 +15,8 @@ +@@ -22,7 +22,8 @@ $self->depends_on('docs'); $self->depends_on('distmeta'); # regenerate META.yml $self->depends_on('man') unless ($^O eq 'MSWin32'); diff --git a/system/procps/APKBUILD b/system/procps/APKBUILD index 11ccc7172..e0c3aac92 100644 --- a/system/procps/APKBUILD +++ b/system/procps/APKBUILD @@ -1,19 +1,20 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=procps -pkgver=3.3.17 +pkgver=4.0.5 pkgrel=0 pkgdesc="Utilities for monitoring your system and processes on your system" url="https://gitlab.com/procps-ng/procps" arch="all" -license="GPL-2.0+ LGPL-2.0+" +license="GPL-2.0+ AND LGPL-2.0+" depends="" checkdepends="dejagnu" makedepends_build="autoconf automake libtool gettext-tiny" makedepends_host="ncurses-dev utmps-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang libproc" source="https://gitlab.com/procps-ng/procps/-/archive/v$pkgver/procps-v$pkgver.tar.bz2 - use-utmpx.patch - add-langinfo-header.patch + shell-portability.patch + ut-hostsize.patch + utmpx.patch " builddir="$srcdir/$pkgname-v$pkgver" @@ -24,6 +25,7 @@ prepare() { } build() { + export CFLAGS="$CFLAGS -D__UT_HOSTSIZE=UT_HOSTSIZE" export LIBS="$LIBS -lutmps -lskarnet" export VERSION="$pkgver" ./configure \ @@ -70,6 +72,7 @@ libproc() { mv "$pkgdir"/lib "$subpkgdir"/ } -sha512sums="7f4ad6a76b042a2478fa866ea63d6826129b08b734c6341155134fcc73c0cf0df429c369dbd5aa65b28ebeeb1ab6ee8df4f2dab2083951bad539bce916e14b64 procps-v3.3.17.tar.bz2 -77cfd89cf75e937806dd068a83da3ad548000b941401fce49a482988dc8db82438ade2a939cf6fe795a59059275ffc4a61520b169da60f53ecef408a24042bcf use-utmpx.patch -f1085cec2fab869b94d2a4b45baf68d6316e8f2ac729cd23341ef27c871df91f83f8953a777a0e858b244d8faf5171f9c640b9e7616c9a5d9c816fa044b92a78 add-langinfo-header.patch" +sha512sums="8fc75d8c205ea18605a1f1eccf487a4236cd0503543d5c2917bcb047e760beba3b25b4ad3cb3224a48b390ec9289993bd5fed77105fa97c6b464c17708e97403 procps-v4.0.5.tar.bz2 +99bb972229204afda5236e71bdfaeaca383e9ab509cd21b78140457193b7dcc301b1306a621fe5164d975928a2d17128ed23f46502dd36c1aa10daaef28b792c shell-portability.patch +bb22cf9875f08d027825645f46d467fbfe4b7d7b0374412f44929577e7afc723b44495edd9751901c2ba2292b2a59e9e5d532324047fefd986c30675563f7f45 ut-hostsize.patch +670b4ff2e160fd4090be5c2474a08f44f3560d177de6276c734236e176148edfd877ebee3e326df6ccdb62cabb5d6281b14326a61cda7df9b7349115d9ce7853 utmpx.patch" diff --git a/system/procps/add-langinfo-header.patch b/system/procps/add-langinfo-header.patch deleted file mode 100644 index 8498271e8..000000000 --- a/system/procps/add-langinfo-header.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur a/proc/escape.c b/proc/escape.c ---- a/proc/escape.c 2022-05-04 06:50:01.750000000 +0000 -+++ b/proc/escape.c 2022-05-04 06:50:29.050000000 +0000 -@@ -20,6 +20,7 @@ - #include <stdio.h> - #include <sys/types.h> - #include <string.h> -+#include <langinfo.h> - #include <limits.h> - #include "procps.h" - #include "escape.h" diff --git a/system/procps/shell-portability.patch b/system/procps/shell-portability.patch new file mode 100644 index 000000000..98e161483 --- /dev/null +++ b/system/procps/shell-portability.patch @@ -0,0 +1,11 @@ +--- procps-v4.0.5/Makefile.am.old 2024-12-18 18:41:10.000000000 -0600 ++++ procps-v4.0.5/Makefile.am 2025-06-16 04:03:21.753061719 -0500 +@@ -455,7 +455,7 @@ + last_capname=`sed -n -e 's/^#define\s*CAP_LAST_CAP\s*\([A-Z_]*\)$$/\1/p' $(LNX_CAP_HEADER)`; \ + capability_count=`sed -n -e "s/^#define\s*$$last_capname\s*\([0-9]*\)$$/\1/p" $(LNX_CAP_HEADER)`; \ + sed -n -e 's/^#define\s*CAP_\([A-Z_]*\)\s*\([0-9]*\)$$/ [\2] = \"\L\1\",/p' $(LNX_CAP_HEADER) >> $@; \ +- echo -e "};\n\n" >> $@; \ ++ printf '};\n\n' >> $@; \ + echo "#define CAPABILITY_COUNT $$capability_count" >> $@; \ + echo "$$capnames_footer" >> $@; \ + echo ""; \ diff --git a/system/procps/use-utmpx.patch b/system/procps/use-utmpx.patch deleted file mode 100644 index 608ea6182..000000000 --- a/system/procps/use-utmpx.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ur a/proc/whattime.c b/proc/whattime.c ---- a/proc/whattime.c 2022-05-04 07:08:11.390000000 +0000 -+++ b/proc/whattime.c 2022-05-04 07:08:42.860000000 +0000 -@@ -33,7 +33,7 @@ - #include <fcntl.h> - #include <unistd.h> - #include <time.h> --#include <utmp.h> -+#include <utmpx.h> - #include <sys/ioctl.h> - #include "whattime.h" - #include "sysinfo.h" -@@ -42,7 +43,7 @@ - static double av[3]; - - char *sprint_uptime(int human_readable) { -- struct utmp *utmpstruct; -+ struct utmpx *utmpstruct; - int upminutes, uphours, updays, upweeks, upyears, updecades; - int pos; - int comma; -@@ -98,13 +99,13 @@ - /* count the number of users */ - - numuser = 0; -- setutent(); -- while ((utmpstruct = getutent())) { -+ setutxent(); -+ while ((utmpstruct = getutxent())) { - if ((utmpstruct->ut_type == USER_PROCESS) && - (utmpstruct->ut_name[0] != '\0')) - numuser++; - } -- endutent(); -+ endutxent(); - - pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s"); - diff --git a/system/procps/ut-hostsize.patch b/system/procps/ut-hostsize.patch new file mode 100644 index 000000000..3bc3255f7 --- /dev/null +++ b/system/procps/ut-hostsize.patch @@ -0,0 +1,14 @@ +--- procps-v4.0.5/configure.ac.old 2024-12-18 18:41:10.000000000 -0600 ++++ procps-v4.0.5/configure.ac 2025-06-16 03:13:14.743718810 -0500 +@@ -81,9 +81,9 @@ + dnl Needed for musl + if test "x$ac_cv_header_utmpx_h" = xyes + then : +-AC_CHECK_DECLS([__UT_HOSTSIZE], ++AC_CHECK_DECLS([UT_HOSTSIZE], + [AC_DEFINE([HAVE_UT_HOSTSIZE_IN_UTMPX], [1], +- [Define if __UT_HOSTSIZE in utmpx.h])], ++ [Define if UT_HOSTSIZE in utmpx.h])], + [], + [[#include <utmpx.h>]]) + fi diff --git a/system/procps/utmpx.patch b/system/procps/utmpx.patch new file mode 100644 index 000000000..c4af55ede --- /dev/null +++ b/system/procps/utmpx.patch @@ -0,0 +1,44 @@ +--- procps-v4.0.5/library/uptime.c.old 2024-12-18 18:41:10.000000000 -0600 ++++ procps-v4.0.5/library/uptime.c 2025-06-16 03:14:07.898014940 -0500 +@@ -30,7 +30,11 @@ + #include <string.h> + #include <time.h> + #include <unistd.h> ++#ifdef HAVE_UTMPX_H ++#include <utmpx.h> ++#else + #include <utmp.h> ++#endif + #ifdef WITH_SYSTEMD + #include <systemd/sd-daemon.h> + #include <systemd/sd-login.h> +@@ -63,7 +67,7 @@ + PROCPS_EXPORT int procps_users(void) + { + int numuser = 0; +-#ifdef HAVE_UTMP_X ++#ifdef HAVE_UTMPX_H + struct utmpx *ut; + #else + struct utmp *ut; +@@ -99,7 +103,7 @@ + } + #endif + +-#ifdef HAVE_UTMP_X ++#ifdef HAVE_UTMPX_H + setutxent(); + while ((ut = getutxent())) { + #else +@@ -109,7 +113,11 @@ + if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0')) + numuser++; + } ++#ifdef HAVE_UTMPX_H ++ endutxent(); ++#else + endutent(); ++#endif + + return numuser; + } diff --git a/system/psmisc/APKBUILD b/system/psmisc/APKBUILD index b80969030..36244bc77 100644 --- a/system/psmisc/APKBUILD +++ b/system/psmisc/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: Zach van Rijn <me@zv.io> pkgname=psmisc -pkgver=23.6 +pkgver=23.7 pkgrel=0 pkgdesc="Miscellaneous utilities that use the proc filesystem" url="https://gitlab.com/psmisc/psmisc" @@ -49,5 +49,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="17ee04c2ce8bd5107b583069853dbf296ecbbf5b3bfb395d02e35691212de453e8b8cae15666a61a3041487cc0e4d1a6e7fbe105afc3a0114bd5b19682efa17a psmisc-23.6.tar.bz2 -a910611896368a088503f50a04a1c2af00d57ee20f3613e81c79cd89574805a505dff43e356ed833a464e3b59d7c1e11fd52cf0bbf32fcfece4dbd2380f23b71 fix-peekfd-on-ppc.patch" +sha512sums="facb57c8f4dcd4ed7ece729c2108f91aaaf2f2c5123c71f8f645d30c4bfb8ec147f1f222da262c37e18a7b0def7c25b66e3b5d0e216a45a016e8085f472121eb psmisc-23.7.tar.bz2 +2832aab7a76fa2e9190eeca5131bb2697464c939f451e3662b5d1a102b26a20249d096a840c58db4be50fe6759b4e810706f496b49b0b77dd7eeb5e47edacc86 fix-peekfd-on-ppc.patch" diff --git a/system/psmisc/fix-peekfd-on-ppc.patch b/system/psmisc/fix-peekfd-on-ppc.patch index b28e17efb..5368f33d7 100644 --- a/system/psmisc/fix-peekfd-on-ppc.patch +++ b/system/psmisc/fix-peekfd-on-ppc.patch @@ -1,6 +1,6 @@ --- psmisc-23.0/src/peekfd.c.old 2017-06-12 00:29:46.000000000 +0000 +++ psmisc-23.0/src/peekfd.c 2017-06-28 10:15:18.635344983 +0000 -@@ -266,11 +266,11 @@ +@@ -341,11 +341,11 @@ if (WIFSTOPPED(status)) { #ifdef PPC struct pt_regs regs; diff --git a/system/python3/APKBUILD b/system/python3/APKBUILD index 64fd5ec98..07a7b44bd 100644 --- a/system/python3/APKBUILD +++ b/system/python3/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Síle Ekaterin Liszka <sheila@vulpine.house> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=python3 -pkgver=3.11.5 +pkgver=3.11.13 _basever="${pkgver%.*}" pkgrel=0 pkgdesc="A high-level scripting language" @@ -189,6 +189,6 @@ tests() { "$subpkgdir"/usr/lib/python$_basever/ } -sha512sums="93fa640bedcea449060caac8aa691aa315a19f172fd9f0422183d17749c3512d4ecac60e7599f9ef14e3cdb3c8b4b060e484c9061b1e7ee8d958200d6041e408 Python-3.11.5.tar.xz -df1c7096a7744c94312ee6cacdd54345e384bcdf2a17148163f5f4c70f0cfa80301efbcbb2398306401ec53106e5c6922ba582a7df226e718cedb53396cc4786 musl-find_library.patch +sha512sums="70f57464d548eac4fe0d0c7f85a14b0e549a4e25ef66de4fc36b06ce72a3efe87dadfcd56ee275c10483cf802fbc9d73b61f9fb2941a46e2f92f075aeb1afe85 Python-3.11.13.tar.xz +43dcf9955c9f7bee8b509d94bcce9f3946fe082c9987a2fe3ce2bf39a63f40473a524c30af47bef9ea1913545956cd75adeb25cf095b72c971fe8c5da8f1ffd9 musl-find_library.patch 75c60afecba2e57f11d58c20aadc611ebbb5c68e05b14415c5cf2f7aa75e103986764ca22f76e6a58b2c08e2ff3acffdbf6d85d2c8c4589743a0b949a4c90687 musl-has-login_tty.patch" diff --git a/system/python3/musl-find_library.patch b/system/python3/musl-find_library.patch index 6181ede0a..b60ee20fa 100644 --- a/system/python3/musl-find_library.patch +++ b/system/python3/musl-find_library.patch @@ -1,7 +1,7 @@ diff -ru Python-2.7.12.orig/Lib/ctypes/util.py Python-2.7.12/Lib/ctypes/util.py --- Python-2.7.12.orig/Lib/ctypes/util.py 2016-06-26 00:49:30.000000000 +0300 +++ Python-2.7.12/Lib/ctypes/util.py 2016-11-03 16:05:46.954665040 +0200 -@@ -265,6 +265,41 @@ +@@ -268,6 +268,41 @@ def find_library(name, is64 = False): return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) diff --git a/system/rhash/APKBUILD b/system/rhash/APKBUILD index c58756509..34010792e 100644 --- a/system/rhash/APKBUILD +++ b/system/rhash/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Przemyslaw Pawelczyk <przemoc@zoho.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=rhash -pkgver=1.4.3 +pkgver=1.4.6 pkgrel=0 pkgdesc="Utility for calculation and verification of hash sums and magnet links" url="https://rhash.sourceforge.net/" @@ -31,4 +31,4 @@ package() { make -j1 DESTDIR="$pkgdir" install install-gmo install-lib-headers install-lib-so-link install-man } -sha512sums="d87ffcde28d8f25cf775c279fed457e52d24523ed9b695629dae694b3c22372247d18f6032f8ce13a0b70fa2953be408982e46659daaa7c4ab227ae89eaed9c7 rhash-1.4.3.tar.gz" +sha512sums="c125b71ec36cce2ec31057239cac8b987555f5e3b152dacb6386b905f8cc4d449c1de5b53e5a5206a2d87975681225c9b54e5826c10ffd91b3440f8595d22b15 rhash-1.4.6.tar.gz" diff --git a/system/rsync/APKBUILD b/system/rsync/APKBUILD index 09fe1740c..cfbf8695b 100644 --- a/system/rsync/APKBUILD +++ b/system/rsync/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house> pkgname=rsync -pkgver=3.4.0 +pkgver=3.4.1 pkgrel=0 pkgdesc="File transfer program to keep remote files in sync" url="https://rsync.samba.org/" @@ -75,7 +75,7 @@ rrsync() { install -D -m 755 "$builddir"/support/rrsync "$subpkgdir"/usr/bin/rrsync } -sha512sums="4a0e7817e6e71e0173713ddd6b6bc7ee86237d092bd0a8c830a69f9993b76b5712a13a3ca60c7bbf42162cdc837df8783e07f8cd65c32fcb12c35f751043c56b rsync-3.4.0.tar.gz +sha512sums="a3ecde4843ddb795308dca88581b868ac0221eb6f88a1477d7a9a2ecb4e4686042966bdddbab40866f90a4715d3104daa7b83222ddf0f3387b796a86bde8e5c2 rsync-3.4.1.tar.gz 638d87c9a753b35044f6321ccd09d2c0addaab3c52c40863eb6905905576b5268bec67b496df81225528c9e39fbd92e9225d7b3037ab1fda78508d452c78158f rsyncd.initd c7527e289c81bee5e4c14b890817cdb47d14f0d26dd8dcdcbe85c7199cf27c57a0b679bdd1b115bfe00de77b52709cc5d97522a47f63c1bb5104f4a7220c9961 rsyncd.confd 3db8a2b364fc89132af6143af90513deb6be3a78c8180d47c969e33cb5edde9db88aad27758a6911f93781e3c9846aeadc80fffc761c355d6a28358853156b62 rsyncd.conf diff --git a/system/ruby/APKBUILD b/system/ruby/APKBUILD index c01d0fec0..93cb3a460 100644 --- a/system/ruby/APKBUILD +++ b/system/ruby/APKBUILD @@ -42,7 +42,7 @@ # - CVE-2020-8130 # pkgname=ruby -pkgver=3.4.1 +pkgver=3.4.4 _abiver="${pkgver%.*}.0" pkgrel=0 pkgdesc="An object-oriented language for quick and easy programming" @@ -274,7 +274,7 @@ _mvgem() { done } -sha512sums="8d2e34117696f9debf463ae1eed288fdbb5c1a12e32800e901b69218e3b7302a0066052077e2ebca851e3a635296199bd5a10437eea1d6f787f69a77bb865680 ruby-3.4.1.tar.xz +sha512sums="0d258cf790daad424c866404b5cbdc8adba0e4e13764847a89adf2335229e5184095c9f3e9594705897697e48bcc322d9a9f919b04047abb2075daca9fce8871 ruby-3.4.4.tar.xz a142199140fa711a64717429e9069fd2082319abaf4b129f561db374b3bc16e2a90cc4c849b5d28334505d1c71fed242aef3c44d983da3513d239dcb778673a5 rubygems-avoid-platform-specific-gems.patch 814fe6359505b70d8ff680adf22f20a74b4dbd3fecc9a63a6c2456ee9824257815929917b6df5394ed069a6869511b8c6dce5b95b4acbbb7867c1f3a975a0150 test_insns-lower-recursion-depth.patch 3ffc034c01110ee5531265333ca5ee8d61d08131843fe3004c5b34c88c9c1b32cb4ed89574f393177c8bd526e9c15da61ab344f93adf07b9148c561ee19e2eb5 fix-get_main_stack.patch" diff --git a/system/samurai/APKBUILD b/system/samurai/APKBUILD new file mode 100644 index 000000000..3bcd50c72 --- /dev/null +++ b/system/samurai/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house> +# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house> +pkgname=samurai +pkgver=1.2 +pkgrel=0 +pkgdesc="Pure-C drop-in replacement for ninja" +url="https://github.com/michaelforney/samurai" +arch="all" +options="!check" # no test suite and upstream build-tests against Chromium anyhow +license="Apache-2.0 OR ISC" +depends="" +makedepends="" +provides="ninja" +replaces="ninja" +subpackages="$pkgname-doc" +source="https://github.com/michaelforney/samurai/releases/download/$pkgver/samurai-$pkgver.tar.gz + CVE-2021-30218.patch + CVE-2021-30219.patch" + +# secfixes: +# 1.2-r0: +# - CVE-2021-30218 +# - CVE-2021-30219 + +build() { + make +} + +package() { + make PREFIX=/usr DESTDIR="$pkgdir" install + cd "$pkgdir/usr/bin" + ln -s samu ninja +} + +sha512sums="bbe6a582c34b04f1df53b76c1647aa3e03c4698ebf7591a203935f11ffa05971bbcb86dc1a8c06aeb904cdc741abb08918122810fc47216fed0a6d9f87fd1225 samurai-1.2.tar.gz +6e1c3a0bd92e006f364a81e9e51394f1bc583efa96120306fe33dc0a48cb4babaa8e8c97d754d3c37cda4b4936e77f64e4c138ccb8cfedfdce43adb09c393edb CVE-2021-30218.patch +0504b137fc9ac113453075a22bdfac4ab7616f668e640b7125041400729aaecad1173c528934223246035f68a95d92c6a85e62d1ea5fea996d85647cb33483eb CVE-2021-30219.patch" diff --git a/system/samurai/CVE-2021-30218.patch b/system/samurai/CVE-2021-30218.patch new file mode 100644 index 000000000..1d6663865 --- /dev/null +++ b/system/samurai/CVE-2021-30218.patch @@ -0,0 +1,29 @@ +From e84b6d99c85043fa1ba54851ee500540ec206918 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Fri, 2 Apr 2021 17:27:48 -0700 +Subject: [PATCH] util: Check for NULL string in writefile + +This check was there previously, but was removed in f549b757 with +the addition of a check during parse that every rule has rspfile +if and only if it has rspfile_content. However, this fails to +consider the possibility of those variables coming from the edge +or global environment. So, re-add the check. + +Fixes #67. +--- + util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util.c b/util.c +index ea5c3ce..2a59881 100644 +--- a/util.c ++++ b/util.c +@@ -258,7 +258,7 @@ writefile(const char *name, struct string *s) + return -1; + } + ret = 0; +- if (fwrite(s->s, 1, s->n, f) != s->n || fflush(f) != 0) { ++ if (s && (fwrite(s->s, 1, s->n, f) != s->n || fflush(f) != 0)) { + warn("write %s:", name); + ret = -1; + } diff --git a/system/samurai/CVE-2021-30219.patch b/system/samurai/CVE-2021-30219.patch new file mode 100644 index 000000000..fbc97b03d --- /dev/null +++ b/system/samurai/CVE-2021-30219.patch @@ -0,0 +1,26 @@ +From d2af3bc375e2a77139c3a28d6128c60cd8d08655 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 4 Apr 2021 03:50:09 -0700 +Subject: [PATCH] parse: Check for non-empty command/rspfile/rspfile_content + +This matches ninja behavior and prevents the possibility of a rule +with an empty (NULL) command string. + +Fixes #68. +--- + parse.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/parse.c b/parse.c +index f79a5ee..b4b98a1 100644 +--- a/parse.c ++++ b/parse.c +@@ -42,6 +42,8 @@ parserule(struct scanner *s, struct environment *env) + var = scanname(s); + parselet(s, &val); + ruleaddvar(r, var, val); ++ if (!val) ++ continue; + if (strcmp(var, "command") == 0) + hascommand = true; + else if (strcmp(var, "rspfile") == 0) diff --git a/system/scdoc/APKBUILD b/system/scdoc/APKBUILD index d496dce6a..348ccc385 100644 --- a/system/scdoc/APKBUILD +++ b/system/scdoc/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=scdoc -pkgver=1.11.2 +pkgver=1.11.3 pkgrel=0 pkgdesc="Small man page generator" url="https://git.sr.ht/~sircmpwn/scdoc" @@ -21,4 +21,4 @@ package() { make PREFIX=/usr DESTDIR=$pkgdir install } -sha512sums="3fbf1a74b222dd88410636124e4b6ca73f7e77f67d512cf430a878fefcaa5c6c13a1e9f6c0c9654de15353f94bb1bd528665acebc2293bebb325501d1eb6cda3 scdoc-1.11.2.tar.gz" +sha512sums="fbecc505b44c396890c53c05183d34336160dbd02993ee120421fc6e2a3ec78ba349747e8acfe97af956a0081c923309290ff97fb7babafbc3ca8addc9ec92f9 scdoc-1.11.3.tar.gz" diff --git a/system/strace/APKBUILD b/system/strace/APKBUILD index 7894f3ae4..55b7da853 100644 --- a/system/strace/APKBUILD +++ b/system/strace/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=strace -pkgver=6.9 +pkgver=6.15 pkgrel=0 pkgdesc="A useful diagnositic, instructional, and debugging tool" url="https://strace.io/" @@ -54,5 +54,5 @@ package() { make -j1 DESTDIR="$pkgdir" install } -sha512sums="aa80b9b6ec41082f1710f2327f7a22003cdce6d95ab0e5083ada9c5b7b40b8f7cbc7dc6c017878dc0e42c52e405e98ed1488c51d17bc3538989ff4be2c2411e1 strace-6.9.tar.xz +sha512sums="5bb21b55d52aab6883821d4aea9449138d5efafac99f72b3831de710ed1ece11bb4a21b16fab97d772397213f43d06072e1d467ae03c38198ead0e65ddcd6ab5 strace-6.15.tar.xz 6616161b6e015c5e56b7171995d28ab63a865156b7f9826b4be26beaac863f0ebc341014910ea53157a810c6afafc10ce80b2d31f4d649d28718a9be78795c6c nlattr-fix.patch" diff --git a/system/sudo/APKBUILD b/system/sudo/APKBUILD index 8010e5e88..7bcd318e1 100644 --- a/system/sudo/APKBUILD +++ b/system/sudo/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Horst Burkhardt <horst@adelielinux.org> pkgname=sudo -pkgver=1.9.10 +pkgver=1.9.17 if [ "${pkgver%_*}" != "$pkgver" ]; then _realver=${pkgver%_*}${pkgver#*_} else @@ -78,4 +78,4 @@ package() { rm -rf "$pkgdir"/var/run } -sha512sums="65cf92b67b64413cb807da8b9602fc90b75e5b30dd1402d682ca36f276a3d6209a8a59c14e463898abc9856bc56263e5ba4bb6d44774f56a2885a9eea4a35375 sudo-1.9.10.tar.gz" +sha512sums="e94df174ca63a828d953d8400d7e68f8cb86119ca1cd845567b7b452d09bef806a6bd0a6cfc232acfdf7c85aa915f2897b29990c7df89b36c92c62aa469cd7a7 sudo-1.9.17.tar.gz" diff --git a/system/sysvinit/APKBUILD b/system/sysvinit/APKBUILD index 1532dfd35..bc7db3d00 100644 --- a/system/sysvinit/APKBUILD +++ b/system/sysvinit/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=sysvinit -pkgver=3.11 +pkgver=3.14 pkgrel=0 pkgdesc="System V-style init programs" url="https://savannah.nongnu.org/projects/sysvinit" @@ -14,8 +14,9 @@ install="sysvinit.post-upgrade sysvinit.post-install" provides="/sbin/init=0" subpackages="$pkgname-doc" source="https://github.com/slicer69/sysvinit/releases/download/$pkgver/$pkgname-$pkgver.tar.xz - inittab-2.88 + bounds.patch utmpx.patch + inittab-2.88 s6-svscanboot " @@ -71,7 +72,8 @@ package() { _install_s6_stuff } -sha512sums="12e2d11b76702b493e8f083e5409b98a1daf41a8d9fb7ef8a36416bb0310d5a26b92eaee0c9396c03cf08842258b953f79541ae147ef730f3bc54530da4d1029 sysvinit-3.11.tar.xz +sha512sums="d2b7279523b301b3d7325c5cf9acef8f9fcc35199dc0f284eee22306c2cb96b42f9a27375a7877033c4d3b16b30fb32c1be32c3665fd2cba183630e008a682a3 sysvinit-3.14.tar.xz +f845750b21d5504e56b0841f3b299ae33770399456da9db6a155d1294a1f27daa68ccc4b078ccb83f1f72d559b87674207b6703043e9a85d1479ec857ecf2c09 bounds.patch +033fb17f7e02bddf1068e5565e3a578abfd2c8caba4a67640a4da8d25e40fd38d3d2d624ebf8818465ebd1d0cd83424608df57c57730ab4283a20aead9023f70 utmpx.patch 87668b49690091a227c0384fd2400f1006d24c27cc27a25efa7eba56839ccb1eead00b58ce4b654eab9c0208d68aa2cbb888fd5f2990905845aa9688442a69a0 inittab-2.88 -78d04e33099de13b40243ac0be3e93bf4f2addcee3155c799e711ffec0dc003bf416d956d302aba92ec3e80d2dc6b2d73da0133e3466fce49531f672190ca2d9 utmpx.patch e52fd49daa5abfc583f1973f3428b1e00a71e7136a8bc6418e94b345d53ef250b3b3c3bee389fe37872b26a78d0957ae852e221428f33b2c728dfd3d50b59634 s6-svscanboot" diff --git a/system/sysvinit/bounds.patch b/system/sysvinit/bounds.patch new file mode 100644 index 000000000..bf30d56e2 --- /dev/null +++ b/system/sysvinit/bounds.patch @@ -0,0 +1,19 @@ +--- sysvinit-3.14/src/dowall.c.old 2025-06-24 02:38:56.414501867 -0500 ++++ sysvinit-3.14/src/dowall.c 2025-06-25 01:36:34.943110622 -0500 +@@ -44,6 +44,7 @@ + #ifndef HOST_NAME_MAX + # define HOST_NAME_MAX 255 + #endif ++#define MIN(a,b) (((a)<(b))?(a):(b)) + + static sigjmp_buf jbuf; + +@@ -226,7 +227,7 @@ + utmp->ut_user[0] == 0) continue; + if (strncmp(utmp->ut_line, _PATH_DEV, strlen(_PATH_DEV)) == 0) { + term[0] = 0; +- strncat(term, utmp->ut_line, sizeof(term)-1); ++ strncat(term, utmp->ut_line, MIN(UT_LINESIZE,sizeof(term)-1)); + } else + snprintf(term, sizeof(term), _PATH_DEV "%.*s", + UT_LINESIZE, utmp->ut_line); diff --git a/system/sysvinit/utmpx.patch b/system/sysvinit/utmpx.patch index e839a0834..195532b4c 100644 --- a/system/sysvinit/utmpx.patch +++ b/system/sysvinit/utmpx.patch @@ -10,7 +10,7 @@ diff -ur a/src/dowall.c b/src/dowall.c #include <pwd.h> #include <fcntl.h> #include <signal.h> -@@ -160,7 +160,7 @@ +@@ -161,7 +161,7 @@ { FILE *tp; struct sigaction sa; @@ -19,7 +19,7 @@ diff -ur a/src/dowall.c b/src/dowall.c time_t t; char term[UT_LINESIZE+ strlen(_PATH_DEV) + 1]; char line[256]; -@@ -217,9 +217,9 @@ +@@ -220,9 +220,9 @@ sigemptyset(&sa.sa_mask); sigaction(SIGALRM, &sa, NULL); @@ -31,7 +31,7 @@ diff -ur a/src/dowall.c b/src/dowall.c if(utmp->ut_type != USER_PROCESS || utmp->ut_user[0] == 0) continue; if (strncmp(utmp->ut_line, _PATH_DEV, strlen(_PATH_DEV)) == 0) { -@@ -253,7 +253,7 @@ +@@ -256,7 +256,7 @@ if (fd >= 0) close(fd); if (tp != NULL) fclose(tp); } @@ -105,7 +105,7 @@ diff -ur a/src/init.c b/src/init.c char *console_dev; /* Console device. */ int pipe_fd = -1; /* /run/initctl */ int did_boot = 0; /* Did we already do BOOT* stuff? */ -@@ -2332,12 +2328,6 @@ +@@ -2367,12 +2363,6 @@ static void redo_utmp_wtmp(void) { @@ -118,7 +118,7 @@ diff -ur a/src/init.c b/src/init.c if ((wrote_wtmp_reboot == 0) || (wrote_utmp_reboot == 0)) write_utmp_wtmp("reboot", "~~", 0, BOOT_TIME, "~"); -@@ -2879,8 +2869,6 @@ +@@ -2914,8 +2904,6 @@ console_init(); if (!reload) { @@ -127,7 +127,7 @@ diff -ur a/src/init.c b/src/init.c /* Close whatever files are open, and reset the console. */ close(0); close(1); -@@ -2894,13 +2882,6 @@ +@@ -2929,13 +2917,6 @@ setenv("PATH", PATH_DEFAULT, 1 /* Overwrite */); /* @@ -198,7 +198,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c #include <syslog.h> #include "paths.h" #include "reboot.h" -@@ -355,6 +351,9 @@ +@@ -358,6 +354,9 @@ for(i = 3; i < 20; i++) close(i); close(255); @@ -208,7 +208,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c /* First idle init. */ if (kill(1, SIGTSTP) < 0) { fprintf(stderr, "shutdown: can't idle init: %s.\r\n", strerror(errno)); -@@ -381,9 +380,6 @@ +@@ -384,9 +383,6 @@ /* Give init the chance to collect zombies. */ /* sleep(1); */ @@ -218,7 +218,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c /* This is for those who have quota installed. */ #if defined(ACCTON_OFF) # if (ACCTON_OFF > 1) && (_BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)) -@@ -514,7 +510,7 @@ +@@ -517,7 +513,7 @@ struct sigaction sa; struct tm *lt; struct stat st; @@ -227,7 +227,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c time_t t, target_time; char *halttype; char *downusers[32]; -@@ -634,7 +630,7 @@ +@@ -637,7 +633,7 @@ fclose(fp); /* Now walk through /var/run/utmp to find logged in users. */ @@ -236,7 +236,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c /* See if this is a user process on a VC. */ if (ut->ut_type != USER_PROCESS) continue; -@@ -660,7 +656,7 @@ +@@ -663,7 +659,7 @@ break; } } diff --git a/system/tcl/APKBUILD b/system/tcl/APKBUILD index 7b4097e9b..87341d6f6 100644 --- a/system/tcl/APKBUILD +++ b/system/tcl/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Zach van Rijn <me@zv.io> pkgname=tcl -pkgver=8.6.13 +pkgver=8.6.16 pkgrel=0 pkgdesc="The Tcl scripting language" url="https://tcl.sourceforge.net/" @@ -72,5 +72,5 @@ dev() { done } -sha512sums="b597f6b62fd71457e96445401a4f8aa662c2678de8a52127c60b0abddebf1fd4452ba5364420902a15b263c0118fc91167550fd1ad2d24fa4ab2204e372c027e tcl8.6.13-src.tar.gz +sha512sums="434c92f8181fb8dca6bc065b0f1f5078779086f19adf008818c90a3108596c63465ef43e9f3c1cfb3d4151a9de244d0bf0e6ee5b40e714b1ddca4a78eb43050b tcl8.6.16-src.tar.gz cd52cbe80fd2be227c9018dbe38fa0888302293402e7a57f2e231c195b7c1902f1b58bc87d19c9d123915ca757e871abf084c0ef23b1a7f187bc03ba93904cc2 tcl-stat64.patch" diff --git a/system/texinfo/APKBUILD b/system/texinfo/APKBUILD index e32cf71d6..66d457c0f 100644 --- a/system/texinfo/APKBUILD +++ b/system/texinfo/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=texinfo -pkgver=7.0.3 +pkgver=7.2 pkgrel=0 pkgdesc="Utilities to manage on-line documentation" url="https://www.gnu.org/software/texinfo/" @@ -30,4 +30,4 @@ package() { gzip "$pkgdir"/usr/share/info/* } -sha512sums="7d14f7458f2b7d0ee0b740e00a5fc2a9d61d33811aa5905d649875ec518dcb4f01be46fb0c46748f7dfe36950597a852f1473ab0648d5add225bc8f35528a8ff texinfo-7.0.3.tar.xz" +sha512sums="8e67337ae12a552fc620c43725507a4978710ea6630e98b0f5e98eb3f79a90e191dde5225699aa6217c26f171d277461f76150f0459cd07b40c3234d2f3d89bf texinfo-7.2.tar.xz" diff --git a/system/tzdata/APKBUILD b/system/tzdata/APKBUILD index de3eb0a51..0261ba76b 100644 --- a/system/tzdata/APKBUILD +++ b/system/tzdata/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=tzdata -pkgver=2023c +pkgver=2025b pkgrel=0 pkgdesc="Time zone data" url="https://www.iana.org/time-zones" @@ -47,5 +47,5 @@ package() { rm -f "$pkgdir"/usr/share/zoneinfo/localtime } -sha512sums="fa18bae9c0e7c061bc9d5f5f2eb9967f0e4ddb2baafdee9887fa30cd0c60f4aa6f21eacffb17df0d59d26ff54d08c5dcefa98159309eba497e86443624913a82 tzcode2023c.tar.gz -608bd286ebcbd0004cfdc1da183273f08aff61f90c8867661154453d77a05d421e4c46ad6d066a1fe2e87d5c82ec0f1c0224667a3b35f3180a3eb7f6ff84cbf5 tzdata2023c.tar.gz" +sha512sums="19826b12968c10fc4db7e4b07ba782bfb8590eeebaec6f719d74b92a2e642ab817bd72bceff0015ce52a838edfdb00753b3cd87dd84b35abf2606e5bee445f76 tzcode2025b.tar.gz +7d83741f3cae81fac8131994b43c55b6da7328df18b706e5ee40e9b3212bc506e6f8fc90988b18da424ed59eff69bce593f2783b7b5f18eb483a17aeb94258d6 tzdata2025b.tar.gz" diff --git a/system/util-linux/0000-utmps-paths.patch b/system/util-linux/0000-utmps-paths.patch index 861e38ff3..709a8e208 100644 --- a/system/util-linux/0000-utmps-paths.patch +++ b/system/util-linux/0000-utmps-paths.patch @@ -18,7 +18,7 @@ diff -rNU3 util-linux-2.38.1.old/include/pathnames.h util-linux-2.38.1/include/p diff -rNU3 util-linux-2.38.1.old/login-utils/login.c util-linux-2.38.1/login-utils/login.c --- util-linux-2.38.1.old/login-utils/login.c 2022-05-11 08:13:10.903531622 +0000 +++ util-linux-2.38.1/login-utils/login.c 2023-08-30 14:57:20.930021550 +0000 -@@ -71,6 +71,9 @@ +@@ -72,6 +72,9 @@ # include <libaudit.h> #endif @@ -28,7 +28,7 @@ diff -rNU3 util-linux-2.38.1.old/login-utils/login.c util-linux-2.38.1/login-uti #include "c.h" #include "pathnames.h" #include "strutils.h" -@@ -623,7 +626,8 @@ +@@ -630,7 +633,8 @@ sizeof(ut.ut_addr_v6)); } @@ -38,7 +38,7 @@ diff -rNU3 util-linux-2.38.1.old/login-utils/login.c util-linux-2.38.1/login-uti } #ifdef HAVE_LIBAUDIT -@@ -731,7 +735,7 @@ +@@ -742,7 +746,7 @@ struct utmpx *utp = NULL; struct timeval tv = { 0 }; @@ -47,7 +47,7 @@ diff -rNU3 util-linux-2.38.1.old/login-utils/login.c util-linux-2.38.1/login-uti setutxent(); /* Find pid in utmp. -@@ -794,7 +798,8 @@ +@@ -805,7 +809,8 @@ pututxline(&ut); endutxent(); diff --git a/system/util-linux/APKBUILD b/system/util-linux/APKBUILD index b532a613b..4357a8cd3 100644 --- a/system/util-linux/APKBUILD +++ b/system/util-linux/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=util-linux -pkgver=2.38.1 +pkgver=2.41.1 case $pkgver in *.*.*) _v=${pkgver%.*};; @@ -56,6 +56,7 @@ build() { --disable-kill \ --disable-login \ --disable-chfn-chsh \ + --disable-liblastlog2 \ --without-python make } @@ -98,6 +99,6 @@ libmount() { mv "$pkgdir"/lib/libmount.so.* "$subpkgdir"/lib/ } -sha512sums="07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957 util-linux-2.38.1.tar.xz +sha512sums="12cf37ab2d62d0378b16a40e0194ef7131ef1ad06737cca3f169cfc04b9da08a4233076c819b30705e8fb2c3b8d91a1d83aac4f036ce58b9cf5928f545e511a2 util-linux-2.41.1.tar.xz 876bb9041eca1b2cca1e9aac898f282db576f7860aba690a95c0ac629d7c5b2cdeccba504dda87ff55c2a10b67165985ce16ca41a0694a267507e1e0cafd46d9 ttydefaults.h -b1d992b58af516bd4c19dfa3f7df2680f4d0c31608fd20b5ae5eab23138df00666a8b1895d8d19d8afb66ce5f535f04a1ce81b248ae69b1f68c991d6549e6726 0000-utmps-paths.patch" +eea323f157040e7cc4a12dc98d3a2d4fe3f719307d8de164dc1673ac4b6fdd92cb0173cd3cfb2746aff3069dff7ee3fe660a350aa1ae6bc8745f5a6b11ad80ab 0000-utmps-paths.patch" diff --git a/system/utmps/APKBUILD b/system/utmps/APKBUILD index 75c22fb25..07767cc33 100644 --- a/system/utmps/APKBUILD +++ b/system/utmps/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Laurent Bercot <ska-adelie@skarnet.org> pkgname=utmps -pkgver=0.1.3.0 +pkgver=0.1.3.1 pkgrel=0 pkgdesc="A secure utmp/wtmp implementation" url="https://skarnet.org/software/utmps/" @@ -60,7 +60,7 @@ openrc() { ln -s ../../init.d/utmps "$rldir/utmps" } -sha512sums="307010371d8c7d9e56e1823c599d84f44719e6050ccf30799f08d7a6c071ca2fbc46ef236d5e2422dc1b96f8a7582ae735635302c28becd6aac3263302c385d9 utmps-0.1.3.0.tar.gz +sha512sums="9dd4ba69d771bc85298de7789140d2603a2dd8ce38cf71e21725c2cd3b5986caddac4f2bba1a72a3956af055a695af5bf486f3eb7427ffa6fcf6fb1f8e054a27 utmps-0.1.3.1.tar.gz 0ec30284c64c6ea9f25142c5f4a643bd48b137fe85781b650104f5137ffa4dfc35ca7be3e41e3acd3403ebe1d8c5378073afa4e2f3607d3d794fcd9f98ed51c4 utmpd.run 9e875a5cd37be531320a8e582afed2c980dd0a1bdfc2f6f3d826d5e5389fc6ab93f973ed1506edb23f4c73cf24a2357aefe856148eaacff86c2aafe376c575e2 wtmpd.run 503bdbb3d244243934b9b4e3deea0bf92a95f88417c822ad9cf6202584d4724d5e182a0d88d7f09069e435a8a97230b85d2b264736c85c893da193fd5ec34c71 btmpd.run diff --git a/system/xmlto/APKBUILD b/system/xmlto/APKBUILD index cbba646f5..ff9811e02 100644 --- a/system/xmlto/APKBUILD +++ b/system/xmlto/APKBUILD @@ -2,18 +2,19 @@ # Contributor: Molly Miller <adelie@m-squa.red> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=xmlto -pkgver=0.0.28 -pkgrel=3 +pkgver=0.0.29 +pkgrel=0 pkgdesc="Tool for converting XML files to various formats" url="https://pagure.io/xmlto/" arch="all" license="GPL-2.0+" depends="libxslt perl-yaml-syck perl-test-pod bash docbook-xsl" -makedepends="bash" +makedepends="autoconf automake bash" subpackages="$pkgname-doc" source="https://releases.pagure.org/xmlto/xmlto-$pkgver.tar.bz2" build() { + autoreconf -vif ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -31,4 +32,4 @@ package() { make -j1 DESTDIR="$pkgdir" install } -sha512sums="6e0c4968d4f1b7a3b132904182aa72a73f6167553eabdeb65cfafa6295ef7b960541685769d04144207963cca77b0c44db4f9fbb2796348ffcb37b3b399f18f1 xmlto-0.0.28.tar.bz2" +sha512sums="fcf76a4cbe22d09126924d3e4a735ad5e448c22aa3b553e54766ecc7579f5b0d467b52e79301e495201fdc955de411a2a26081b8089643851f3794efa8b55158 xmlto-0.0.29.tar.bz2" diff --git a/system/xz/APKBUILD b/system/xz/APKBUILD index 0b52b0f85..c60ca30be 100644 --- a/system/xz/APKBUILD +++ b/system/xz/APKBUILD @@ -1,12 +1,12 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=xz -pkgver=5.4.2 +pkgver=5.8.1 pkgrel=0 pkgdesc="Library and command line tools for XZ and LZMA compressed files" url="https://tukaani.org/xz/" arch="all" -license="Public-Domain AND LGPL-2.1+" +license="0BSD AND LGPL-2.1+" depends="" makedepends="" subpackages="$pkgname-doc $pkgname-dev $pkgname-lang $pkgname-libs" @@ -43,5 +43,5 @@ package() { "$pkgdir"/usr/share/licenses/$pkgname } -sha512sums="149f980338bea3d66de1ff5994b2b236ae1773135eda68b62b009df0c9dcdf5467f8cb2c06da95a71b6556d60bd3d21f475feced34d5dfdb80ee95416a2f9737 xz-5.4.2.tar.gz -54bbe1f8aae954d2550941f69a509e210d0f6bee2393494dcf445a14d14046953c125177b4cc9fa79ec55b81379dfe4ae0187f106abd2f3cc4331782a5c0b4fd dont-use-libdir-for-pkgconfig.patch" +sha512sums="151b2a47fdf00274c4fd71ceada8fb6c892bdac44070847ebf3259e602b97c95ee5ee88974e03d7aa821ab4f16d5c38e50dfb2baf660cf39c199878a666e19ad xz-5.8.1.tar.gz +e70d945e7a6f572c073312a1807f4a6384d670e61a637ed291b1ed2324d876e533902dee7f4e18e8d0fc86bd23d0703aaebc611d32839c9c6f6b016f544669ee dont-use-libdir-for-pkgconfig.patch" diff --git a/system/xz/dont-use-libdir-for-pkgconfig.patch b/system/xz/dont-use-libdir-for-pkgconfig.patch index c6b1c480c..332d1e79c 100644 --- a/system/xz/dont-use-libdir-for-pkgconfig.patch +++ b/system/xz/dont-use-libdir-for-pkgconfig.patch @@ -11,10 +11,10 @@ --- xz-5.2.4/src/liblzma/Makefile.in.old 2018-04-29 16:01:26.000000000 +0000 +++ xz-5.2.4/src/liblzma/Makefile.in 2018-07-19 02:18:33.600000000 +0000 -@@ -879,7 +879,7 @@ +@@ -883,7 +883,7 @@ - liblzma_la_LDFLAGS = -no-undefined -version-info 9:2:4 $(am__append_1) \ - $(am__append_2) $(am__append_48) + liblzma_la_LDFLAGS = -no-undefined -version-info 13:1:8 \ + $(am__append_1) $(am__append_2) $(am__append_47) -pkgconfigdir = $(libdir)/pkgconfig +pkgconfigdir = /usr/lib/pkgconfig pkgconfig_DATA = liblzma.pc diff --git a/system/zsh/APKBUILD b/system/zsh/APKBUILD index 6ae71a896..f5d0ba889 100644 --- a/system/zsh/APKBUILD +++ b/system/zsh/APKBUILD @@ -3,8 +3,8 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Dan Theisen <djt@hxx.in> pkgname=zsh -pkgver=5.8.1 -pkgrel=1 +pkgver=5.9 +pkgrel=0 pkgdesc="A very advanced and programmable command interpreter (shell)" url="https://www.zsh.org/" arch="all" @@ -14,6 +14,7 @@ makedepends_host="ncurses-dev pcre-dev utmps-dev" install="zsh.post-install zsh.post-upgrade zsh.pre-deinstall" # Note the custom fetch() function source="https://www.zsh.org/pub/$pkgname-$pkgver.tar.xz + datetime-test-fix.patch fix-deprecated-egrep.patch skel @@ -51,7 +52,7 @@ _comps="android-tools:Unix/_adb rsync:Unix/_rsync subversion:Unix/_subversion tmux:Unix/_tmux - zfs:Unix/_zfs*:Unix/_zpool" + " for _i in $_comps; do subpackages="$subpackages ${_i%%:*}-zsh-completion:_completion:noarch" done @@ -114,8 +115,8 @@ check() { rm "$builddir"/Test/B03print.ztst # Not guaranteed to work portably (requires atime) rm "$builddir"/Test/C02cond.ztst - # PPC? - rm "$builddir"/Test/V09datetime.ztst + # Breaks with musl locale: https://zsh.org/workers/50246 + rm "$builddir"/Test/E02xtrace.ztst make test } @@ -181,8 +182,9 @@ _submv() { mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ } -sha512sums="f54a5a47ed15d134902613f6169c985680afc45a67538505e11b66b348fcb367145e9b8ae2d9eac185e07ef5f97254b85df01ba97294002a8c036fd02ed5e76d zsh-5.8.1.tar.xz -fdb5c46637c7e981c0889ea9f3acd450dcd51deab57bbce11c3778c0811a36fe16dfbe06aa997c1eaa4e5c056e99fb747d4a2c93b72b9acad8e590923bfaa4fe fix-deprecated-egrep.patch +sha512sums="d9138b7f379ad942a5f46819d2dd52d31f3a1129f2a0d1b53d4c5cd43c318b60396da6d37c57c477b8e958fb750209aca0ae93f8c9dd42ac958de006a0ff067e zsh-5.9.tar.xz +e1d0f931a7dd12343741226f81532ca402336eaed1d255b434aebbeecdc386dfc7a13e7390c74c40be88e0f5093c3aa0bca7fb5718027daaae9187b33d3f5e34 datetime-test-fix.patch +08bf4c2f14fd04f6844dc3d6d2488bd109e5ea488a5a22a263829ae52264f63a4b3978a7840b4c1e1dd0b9a63e8e7e92303769f0ce4a8d991a9d283cdd8e70c5 fix-deprecated-egrep.patch d820fcf65bb3c52f23e968110b5df1188fc0b64079312f64d22ffe35de3b4f3055d4d629b3b0f97a1bfaddf62dbc80676af31c3a1a79645632082abfc854cf97 skel 63167188e22bf8933eb420a5ba068ab897531b90c8d8b8ec892f26a9180267a971013046a72b810d5b9d3add427cf650df608b0e008cd0789681ed1371b172c3 zprofile 1675e016f97333cad89b587f4292d81b6bc10e27b75482e3e0c3808539c95bd49b907b6579fb98d817f77f2f2384c0df5afa3e2b6f43b6ae9b466925cd9ccffc zshrc" diff --git a/system/zsh/datetime-test-fix.patch b/system/zsh/datetime-test-fix.patch new file mode 100644 index 000000000..3703fb417 --- /dev/null +++ b/system/zsh/datetime-test-fix.patch @@ -0,0 +1,14 @@ +# Ref: https://bugs.gentoo.org/833981 +--- a/Test/V09datetime.ztst ++++ b/Test/V09datetime.ztst +@@ -79,8 +79,8 @@ + >1973^@03^@03 + + # We assume '%@' is not a valid format on any OSs. +-# The result can be '%@' (Linux), '@' (BSDs) or an error (Cygwin). +- [[ $(strftime '%@' 0 2> /dev/null) == (%|)@ || $? != 0 ]] ++# The result can be '%@' (Linux), '\n' (Linux with musl libc) '@', (BSDs) or an error (Cygwin). ++ [[ $(strftime '%@' 0 2> /dev/null) == (%|)@ || $? != 0 || $'\n' ]] + 0:bad format specifier + + # This test may fail at 23:59:59.xxx on New Year's Eve :/ diff --git a/system/zsh/fix-deprecated-egrep.patch b/system/zsh/fix-deprecated-egrep.patch index 58d141002..c5ec96f7b 100644 --- a/system/zsh/fix-deprecated-egrep.patch +++ b/system/zsh/fix-deprecated-egrep.patch @@ -25,7 +25,7 @@ diff -ur a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst diff -ur a/Test/E01options.ztst b/Test/E01options.ztst --- a/Test/E01options.ztst 2023-04-06 03:22:25.019387496 +0000 +++ b/Test/E01options.ztst 2023-04-06 03:22:45.338578392 +0000 -@@ -649,7 +649,7 @@ +@@ -651,7 +651,7 @@ >noktarg1 >0 1 @@ -37,7 +37,7 @@ diff -ur a/Test/E01options.ztst b/Test/E01options.ztst diff -ur a/Test/V07pcre.ztst b/Test/V07pcre.ztst --- a/Test/V07pcre.ztst 2023-04-06 03:22:25.019387496 +0000 +++ b/Test/V07pcre.ztst 2023-04-06 03:24:15.802995141 +0000 -@@ -13,7 +13,7 @@ +@@ -12,7 +12,7 @@ unset -m LC_\* mb_ok= langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 @@ -61,8 +61,8 @@ diff -ur a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst diff -ur a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst --- a/Test/X03zlebindkey.ztst 2023-04-06 03:22:25.015387655 +0000 +++ b/Test/X03zlebindkey.ztst 2023-04-06 03:24:02.531518995 +0000 -@@ -5,7 +5,7 @@ - %prep +@@ -6,7 +6,7 @@ + unset -m LC_\* ZSH_TEST_LANG= langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 - $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) diff --git a/system/zstd/APKBUILD b/system/zstd/APKBUILD index 6ed1b2fd3..6c41ccc29 100644 --- a/system/zstd/APKBUILD +++ b/system/zstd/APKBUILD @@ -1,7 +1,7 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=zstd -pkgver=1.5.4 +pkgver=1.5.7 pkgrel=0 pkgdesc="Fast real-time compression algorithm" url="https://facebook.github.io/zstd/" @@ -18,15 +18,15 @@ source="https://github.com/facebook/zstd/releases/download/v$pkgver/zstd-$pkgver # - CVE-2021-24032 build() { - make PREFIX="/usr" + make PREFIX="/usr" LIBDIR="/lib" PKGCONFIGDIR="/usr/lib/pkgconfig" } check() { - make PREFIX="/usr" check + make PREFIX="/usr" LIBDIR="/lib" PKGCONFIGDIR="/usr/lib/pkgconfig" check } package() { - make PREFIX="/usr" DESTDIR="$pkgdir" install + make PREFIX="/usr" LIBDIR="/lib" PKGCONFIGDIR="/usr/lib/pkgconfig" DESTDIR="$pkgdir" install } -sha512sums="2896a6dd6b60cc251720356babcbab6018c874eb2149121b26e28041496fc355a9cb5fd1b39c91558fcfbafb789b3d721264a0f9b5734f893d5f3cdf97016394 zstd-1.5.4.tar.gz" +sha512sums="b4de208f179b68d4c6454139ca60d66ed3ef3893a560d6159a056640f83d3ee67cdf6ffb88971cdba35449dba4b597eaa8b4ae908127ef7fd58c89f40bf9a705 zstd-1.5.7.tar.gz" |