diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-vcs/git/files | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-vcs/git/files')
16 files changed, 596 insertions, 0 deletions
diff --git a/dev-vcs/git/files/0001-meson-ignore-subprojects-.wraplock.patch b/dev-vcs/git/files/0001-meson-ignore-subprojects-.wraplock.patch new file mode 100644 index 000000000000..c5a1347f7990 --- /dev/null +++ b/dev-vcs/git/files/0001-meson-ignore-subprojects-.wraplock.patch @@ -0,0 +1,33 @@ +https://bugs.gentoo.org/953122 +https://lore.kernel.org/git/20251202-toon-cross-compile-v1-0-cabc8bce529f@iotcl.com/ + +From 6437cb608c9c9894852499da36e22095adb57a8e Mon Sep 17 00:00:00 2001 +Message-ID: <6437cb608c9c9894852499da36e22095adb57a8e.1764817376.git.sam@gentoo.org> +From: Toon Claes <toon@iotcl.com> +Date: Tue, 2 Dec 2025 11:48:08 +0100 +Subject: [PATCH 1/3] meson: ignore subprojects/.wraplock + +When asking Meson to wrap subprojects, it generates a .wraplock file in +the subprojects/ directory. Ignore this file. + +See also https://github.com/mesonbuild/meson/issues/14948. + +Signed-off-by: Toon Claes <toon@iotcl.com> +--- + subprojects/.gitignore | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/subprojects/.gitignore b/subprojects/.gitignore +index 63ea916ef5..2bb68c8794 100644 +--- a/subprojects/.gitignore ++++ b/subprojects/.gitignore +@@ -1 +1,2 @@ + /*/ ++.wraplock + +base-commit: f0ef5b6d9bcc258e4cbef93839d1b7465d5212b9 +prerequisite-patch-id: b59f73a32b9910a2e72eb13797a0f9bd76ce4812 +prerequisite-patch-id: 9f1fdad38ca8082e13069df63de6af32599fe654 +-- +2.52.0 + diff --git a/dev-vcs/git/files/0002-meson-only-detect-ICONV_OMITS_BOM-if-possible.patch b/dev-vcs/git/files/0002-meson-only-detect-ICONV_OMITS_BOM-if-possible.patch new file mode 100644 index 000000000000..67443f4d26ca --- /dev/null +++ b/dev-vcs/git/files/0002-meson-only-detect-ICONV_OMITS_BOM-if-possible.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/953122 +https://lore.kernel.org/git/20251202-toon-cross-compile-v1-0-cabc8bce529f@iotcl.com/ + +From 4f638a773a0f9f6961abe92226be9c23a486110d Mon Sep 17 00:00:00 2001 +Message-ID: <4f638a773a0f9f6961abe92226be9c23a486110d.1764817376.git.sam@gentoo.org> +In-Reply-To: <6437cb608c9c9894852499da36e22095adb57a8e.1764817376.git.sam@gentoo.org> +References: <6437cb608c9c9894852499da36e22095adb57a8e.1764817376.git.sam@gentoo.org> +From: Toon Claes <toon@iotcl.com> +Date: Tue, 2 Dec 2025 11:48:09 +0100 +Subject: [PATCH 2/3] meson: only detect ICONV_OMITS_BOM if possible + +In our Meson setup it automatically detects whether ICONV_OMITS_BOM +should be defined. To check this, a piece of code is compiled and ran. + +When cross-compiling, it's not possible to run this piece of code. Guard +this test with a can_run_host_binaries() check to ensure it can run. + +Signed-off-by: Toon Claes <toon@iotcl.com> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index f1b3615659..95348e69a4 100644 +--- a/meson.build ++++ b/meson.build +@@ -1064,7 +1064,7 @@ if iconv.found() + } + ''' + +- if compiler.run(iconv_omits_bom_source, ++ if meson.can_run_host_binaries() and compiler.run(iconv_omits_bom_source, + dependencies: iconv, + name: 'iconv omits BOM', + ).returncode() != 0 +-- +2.52.0 + diff --git a/dev-vcs/git/files/0003-meson-use-is_cross_build-where-possible.patch b/dev-vcs/git/files/0003-meson-use-is_cross_build-where-possible.patch new file mode 100644 index 000000000000..d3ba9a872df9 --- /dev/null +++ b/dev-vcs/git/files/0003-meson-use-is_cross_build-where-possible.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/953122 +https://lore.kernel.org/git/20251202-toon-cross-compile-v1-0-cabc8bce529f@iotcl.com/ + +From 9e911f149088538f67ca9e8bf5cbfc95d3fe23fe Mon Sep 17 00:00:00 2001 +Message-ID: <9e911f149088538f67ca9e8bf5cbfc95d3fe23fe.1764817376.git.sam@gentoo.org> +In-Reply-To: <6437cb608c9c9894852499da36e22095adb57a8e.1764817376.git.sam@gentoo.org> +References: <6437cb608c9c9894852499da36e22095adb57a8e.1764817376.git.sam@gentoo.org> +From: Toon Claes <toon@iotcl.com> +Date: Wed, 3 Dec 2025 15:53:31 +0100 +Subject: [PATCH 3/3] meson: use is_cross_build() where possible + +In previous commit the first use of meson.can_run_host_binaries() was +introduced. This is a guard around compiler.run() to ensure it's +actually possible to execute the provided. + +In other places we've been having the same issue, but here `not +meson.is_cross_build()` is used as guard. This does the trick, but it +also prevents the code from running even when an exe_wrapper is +configured. + +Switch to using meson.can_run_host_binaries() here as well. + +There is another place left that still uses `not +meson.is_cross_build()`, but here it's a guard around fs.exists(). That +function will always run on the build machine, so checking for +cross-compilation is still in place here. + +Signed-off-by: Toon Claes <toon@iotcl.com> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 95348e69a4..00ad8a5c60 100644 +--- a/meson.build ++++ b/meson.build +@@ -1492,7 +1492,7 @@ if not has_bsd_sysctl + endif + endif + +-if not meson.is_cross_build() and compiler.run(''' ++if meson.can_run_host_binaries() and compiler.run(''' + #include <stdio.h> + + int main(int argc, const char **argv) +-- +2.52.0 + diff --git a/dev-vcs/git/files/git-2.46.2-unsafe-directory.patch b/dev-vcs/git/files/git-2.46.2-unsafe-directory.patch new file mode 100644 index 000000000000..0e07371a0d88 --- /dev/null +++ b/dev-vcs/git/files/git-2.46.2-unsafe-directory.patch @@ -0,0 +1,14 @@ +Neuter the "safe directory" feature, except for tests. +--- a/setup.c ++++ b/setup.c +@@ -1316,7 +1316,9 @@ static int ensure_valid_ownership(const char *gitfile, + git_protected_config(safe_directory_cb, &data); + + free(data.path); +- return data.is_safe; ++ if (git_env_bool("GIT_TEST_ASSUME_DIFFERENT_OWNER", 0)) ++ return data.is_safe; ++ return 1; + } + + void die_upon_dubious_ownership(const char *gitfile, const char *worktree, diff --git a/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch b/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch new file mode 100644 index 000000000000..f1b89e736f46 --- /dev/null +++ b/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch @@ -0,0 +1,39 @@ +meson.build: allow to disable fsmonitor backend for macOS + +Gentoo Prefix toolchain and setup does not enable CoreServices Framework +by default, so simply allow to disable the fsmonitor backend + +Signed-off-by: Fabian Groffen <grobian@gentoo.org> + +--- a/meson.build ++++ b/meson.build +@@ -1117,11 +1117,13 @@ + endif + + fsmonitor_backend = '' +-if host_machine.system() == 'windows' +- fsmonitor_backend = 'win32' +-elif host_machine.system() == 'darwin' +- fsmonitor_backend = 'darwin' +- libgit_dependencies += dependency('CoreServices') ++if get_option('fsmonitor') ++ if host_machine.system() == 'windows' ++ fsmonitor_backend = 'win32' ++ elif host_machine.system() == 'darwin' ++ fsmonitor_backend = 'darwin' ++ libgit_dependencies += dependency('CoreServices') ++ endif + endif + if fsmonitor_backend != '' + libgit_c_args += '-DHAVE_FSMONITOR_DAEMON_BACKEND' +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -57,6 +57,8 @@ + # Build tweaks. + option('macos_use_homebrew_gettext', type: 'boolean', value: true, + description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.') ++option('fsmonitor', type: 'boolean', value: true, ++ description: 'Build fsmonitor backend on supported platforms.') + + # gitweb configuration. + option('gitweb_config', type: 'string', value: 'gitweb_config.perl') diff --git a/dev-vcs/git/files/git-2.50.0-diff-implement-config.diff.renames-copies-harder.patch b/dev-vcs/git/files/git-2.50.0-diff-implement-config.diff.renames-copies-harder.patch new file mode 100644 index 000000000000..f815ff7bedc5 --- /dev/null +++ b/dev-vcs/git/files/git-2.50.0-diff-implement-config.diff.renames-copies-harder.patch @@ -0,0 +1,163 @@ +https://lore.kernel.org/git/20240311213928.1872437-1-sam@gentoo.org/ + +From afe0cc87d790d7dbf33b83cf3e1ae23d5646e8e9 Mon Sep 17 00:00:00 2001 +Message-ID: <afe0cc87d790d7dbf33b83cf3e1ae23d5646e8e9.1749343442.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Fri, 16 Feb 2024 22:07:54 +0000 +Subject: [PATCH] diff: implement config.diff.renames=copies-harder + +This patch adds a config value for 'diff.renames' called 'copies-harder' +which make it so '-C -C' is in effect always passed for 'git log -p', +'git diff', etc. + +This allows specifying that 'git log -p', 'git diff', etc should always act +as if '-C --find-copies-harder' was passed. + +It has proven this especially useful for certain types of repository (like +Gentoo's ebuild repositories) because files are often copies of a previous +version: + +Suppose a directory 'sys-devel/gcc' contains recipes for building +GCC, with one file for each supported upstream branch: + gcc-13.x.build.recipe + gcc-12.x.build.recipe + gcc-11.x.build.recipe + gcc-10.x.build.recipe + +gcc-13.x.build.recipe was started as a copy of gcc-12.x.build.recipe +(which was started as a copy of gcc-11.x.build.recipe, etc.). Previous versions +are kept around to support parallel installation of multiple versions. + +Being able to easily observe the diff relative to other recipes within the +directory has been a quality of life improvement for such repo layouts. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + Documentation/config/diff.adoc | 6 +++--- + Documentation/config/status.adoc | 4 +++- + diff.c | 11 +++++++++-- + diff.h | 1 + + diffcore-rename.c | 6 ++++-- + merge-ort.c | 2 +- + 6 files changed, 21 insertions(+), 9 deletions(-) + +diff --git a/Documentation/config/diff.adoc b/Documentation/config/diff.adoc +index 1135a62a0a..5362d8091e 100644 +--- a/Documentation/config/diff.adoc ++++ b/Documentation/config/diff.adoc +@@ -158,9 +158,9 @@ endif::git-diff[] + Whether and how Git detects renames. If set to `false`, + rename detection is disabled. If set to `true`, basic rename + detection is enabled. If set to `copies` or `copy`, Git will +- detect copies, as well. Defaults to `true`. Note that this +- affects only `git diff` Porcelain like linkgit:git-diff[1] and +- linkgit:git-log[1], and not lower level commands such as ++ detect copies, as well. Defaults to `true`. ++ Note that this affects only 'git diff' Porcelain like linkgit:git-diff[1] ++ and linkgit:git-log[1], and not lower level commands such as + linkgit:git-diff-files[1]. + + `diff.suppressBlankEmpty`:: +diff --git a/Documentation/config/status.adoc b/Documentation/config/status.adoc +index 8caf90f51c..e15add32a3 100644 +--- a/Documentation/config/status.adoc ++++ b/Documentation/config/status.adoc +@@ -33,7 +33,9 @@ status.renames:: + Whether and how Git detects renames in linkgit:git-status[1] and + linkgit:git-commit[1] . If set to "false", rename detection is + disabled. If set to "true", basic rename detection is enabled. +- If set to "copies" or "copy", Git will detect copies, as well. ++ If set to "copies" or "copy", Git will detect copies, as well. If set ++ to "copies-harder", Git will spend extra cycles to find more copies even ++ in unmodified paths, see '--find-copies-harder' in linkgit:git-diff[1]. + Defaults to the value of diff.renames. + + status.showStash:: +diff --git a/diff.c b/diff.c +index 90e8003dd1..f0ca884280 100644 +--- a/diff.c ++++ b/diff.c +@@ -212,6 +212,8 @@ int git_config_rename(const char *var, const char *value) + { + if (!value) + return DIFF_DETECT_RENAME; ++ if (!strcasecmp(value, "copies-harder")) ++ return DIFF_DETECT_COPY_HARDER; + if (!strcasecmp(value, "copies") || !strcasecmp(value, "copy")) + return DIFF_DETECT_COPY; + return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0; +@@ -4902,8 +4904,12 @@ void diff_setup_done(struct diff_options *options) + else + options->flags.diff_from_contents = 0; + +- if (options->flags.find_copies_harder) ++ /* Just fold this in as it makes the patch-to-git smaller */ ++ if (options->flags.find_copies_harder || ++ options->detect_rename == DIFF_DETECT_COPY_HARDER) { ++ options->flags.find_copies_harder = 1; + options->detect_rename = DIFF_DETECT_COPY; ++ } + + if (!options->flags.relative_name) + options->prefix = NULL; +@@ -5342,7 +5348,8 @@ static int diff_opt_find_copies(const struct option *opt, + if (*arg != 0) + return error(_("invalid argument to %s"), opt->long_name); + +- if (options->detect_rename == DIFF_DETECT_COPY) ++ if (options->detect_rename == DIFF_DETECT_COPY || ++ options->detect_rename == DIFF_DETECT_COPY_HARDER) + options->flags.find_copies_harder = 1; + else + options->detect_rename = DIFF_DETECT_COPY; +diff --git a/diff.h b/diff.h +index 62e5768a9a..8c8aa6cbb6 100644 +--- a/diff.h ++++ b/diff.h +@@ -594,6 +594,7 @@ int git_config_rename(const char *var, const char *value); + + #define DIFF_DETECT_RENAME 1 + #define DIFF_DETECT_COPY 2 ++#define DIFF_DETECT_COPY_HARDER 3 + + #define DIFF_PICKAXE_ALL 1 + #define DIFF_PICKAXE_REGEX 2 +diff --git a/diffcore-rename.c b/diffcore-rename.c +index 7723bc3334..34a883a55d 100644 +--- a/diffcore-rename.c ++++ b/diffcore-rename.c +@@ -302,7 +302,8 @@ static int find_identical_files(struct hashmap *srcs, + } + /* Give higher scores to sources that haven't been used already */ + score = !source->rename_used; +- if (source->rename_used && options->detect_rename != DIFF_DETECT_COPY) ++ if (source->rename_used && options->detect_rename != DIFF_DETECT_COPY && ++ options->detect_rename != DIFF_DETECT_COPY_HARDER) + continue; + score += basename_same(source, target); + if (score > best_score) { +@@ -1407,7 +1408,8 @@ void diffcore_rename_extended(struct diff_options *options, + trace2_region_enter("diff", "setup", options->repo); + info.setup = 0; + ASSERT(!dir_rename_count || strmap_empty(dir_rename_count)); +- want_copies = (detect_rename == DIFF_DETECT_COPY); ++ want_copies = (detect_rename == DIFF_DETECT_COPY || ++ detect_rename == DIFF_DETECT_COPY_HARDER); + if (dirs_removed && (break_idx || want_copies)) + BUG("dirs_removed incompatible with break/copy detection"); + if (break_idx && relevant_sources) +diff --git a/merge-ort.c b/merge-ort.c +index 47b3d1730e..cb090c7af5 100644 +--- a/merge-ort.c ++++ b/merge-ort.c +@@ -4957,7 +4957,7 @@ static void merge_start(struct merge_options *opt, struct merge_result *result) + * sanity check them anyway. + */ + assert(opt->detect_renames >= -1 && +- opt->detect_renames <= DIFF_DETECT_COPY); ++ opt->detect_renames <= DIFF_DETECT_COPY_HARDER); + assert(opt->verbosity >= 0 && opt->verbosity <= 5); + assert(opt->buffer_output <= 2); + assert(opt->obuf.len == 0); +-- +2.49.0 diff --git a/dev-vcs/git/files/git-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch b/dev-vcs/git/files/git-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch new file mode 100644 index 000000000000..f2af164e6f42 --- /dev/null +++ b/dev-vcs/git/files/git-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch @@ -0,0 +1,32 @@ +From 35f637fbabb3b8181a29ba7d96a505b49ea0ba0d Mon Sep 17 00:00:00 2001 +Message-ID: <35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Tue, 18 Nov 2025 18:10:03 +0000 +Subject: [PATCH 1/2] rust: don't pass --quiet to cargo + +This obscures that cargo is being invoked at all and it means even +ninja --verbose has no mention of it other than invoking the target. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + src/cargo-meson.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh +index 3998db0435..63a5e7c6ac 100755 +--- a/src/cargo-meson.sh ++++ b/src/cargo-meson.sh +@@ -19,7 +19,7 @@ do + esac + done + +-cargo build --lib --quiet --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" ++cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" + RET=$? + if test $RET -ne 0 + then + +base-commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed +-- +2.51.2 + diff --git a/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch b/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch new file mode 100644 index 000000000000..351786312a8d --- /dev/null +++ b/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch @@ -0,0 +1,32 @@ +From 1eba2788aab9f63ff55ac453b0d885aaa60c77af Mon Sep 17 00:00:00 2001 +Message-ID: <1eba2788aab9f63ff55ac453b0d885aaa60c77af.1763489487.git.sam@gentoo.org> +In-Reply-To: <35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git.sam@gentoo.org> +References: <35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Tue, 18 Nov 2025 18:10:47 +0000 +Subject: [PATCH 2/2] rust: respect $CARGO environment variable + +Respect the CARGO environment variable if set. Gentoo uses this to +control the version of rust/cargo for a build. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + src/cargo-meson.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh +index 63a5e7c6ac..bbf3f91178 100755 +--- a/src/cargo-meson.sh ++++ b/src/cargo-meson.sh +@@ -19,7 +19,7 @@ do + esac + done + +-cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" ++${CARGO:-cargo} build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" + RET=$? + if test $RET -ne 0 + then +-- +2.51.2 + diff --git a/dev-vcs/git/files/git-2.54.0-0001-rust-don-t-pass-quiet-to-cargo.patch b/dev-vcs/git/files/git-2.54.0-0001-rust-don-t-pass-quiet-to-cargo.patch new file mode 100644 index 000000000000..795e33e5e711 --- /dev/null +++ b/dev-vcs/git/files/git-2.54.0-0001-rust-don-t-pass-quiet-to-cargo.patch @@ -0,0 +1,30 @@ +From 0f7b6cf83c868a009c9843522429ba6810990ae6 Mon Sep 17 00:00:00 2001 +Message-ID: <0f7b6cf83c868a009c9843522429ba6810990ae6.1776707419.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Tue, 18 Nov 2025 18:10:03 +0000 +Subject: [PATCH 1/2] rust: don't pass --quiet to cargo + +This obscures that cargo is being invoked at all and it means even +ninja --verbose has no mention of it other than invoking the target. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + src/cargo-meson.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh +index 75f3cd1265..26a6d3bb16 100755 +--- a/src/cargo-meson.sh ++++ b/src/cargo-meson.sh +@@ -31,7 +31,7 @@ case "$(cargo -vV | sed -n 's/^host: \(.*\)$/\1/p')" in + LIBNAME=libgitcore.a;; + esac + +-cargo build --lib --quiet --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" ++cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" + RET=$? + if test $RET -ne 0 + then +-- +2.53.0 + diff --git a/dev-vcs/git/files/git-2.54.0-0002-rust-respect-CARGO-environment-variable.patch b/dev-vcs/git/files/git-2.54.0-0002-rust-respect-CARGO-environment-variable.patch new file mode 100644 index 000000000000..da7148e34e36 --- /dev/null +++ b/dev-vcs/git/files/git-2.54.0-0002-rust-respect-CARGO-environment-variable.patch @@ -0,0 +1,32 @@ +From 1fe93707dbb6d9c5214250f576151cb5cec3762f Mon Sep 17 00:00:00 2001 +Message-ID: <1fe93707dbb6d9c5214250f576151cb5cec3762f.1776707419.git.sam@gentoo.org> +In-Reply-To: <0f7b6cf83c868a009c9843522429ba6810990ae6.1776707419.git.sam@gentoo.org> +References: <0f7b6cf83c868a009c9843522429ba6810990ae6.1776707419.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Tue, 18 Nov 2025 18:10:47 +0000 +Subject: [PATCH 2/2] rust: respect $CARGO environment variable + +Respect the CARGO environment variable if set. Gentoo uses this to +control the version of rust/cargo for a build. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + src/cargo-meson.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh +index 26a6d3bb16..b7b9578861 100755 +--- a/src/cargo-meson.sh ++++ b/src/cargo-meson.sh +@@ -31,7 +31,7 @@ case "$(cargo -vV | sed -n 's/^host: \(.*\)$/\1/p')" in + LIBNAME=libgitcore.a;; + esac + +-cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" ++${CARGO:-cargo} build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" --target-dir="$BUILD_DIR" "$@" + RET=$? + if test $RET -ne 0 + then +-- +2.53.0 + diff --git a/dev-vcs/git/files/git-daemon-r2.initd b/dev-vcs/git/files/git-daemon-r2.initd new file mode 100644 index 000000000000..453fd608363f --- /dev/null +++ b/dev-vcs/git/files/git-daemon-r2.initd @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/run/git-daemon.pid" +command="/usr/bin/git" +command_args="daemon ${GITDAEMON_OPTS}" +command_user="${GIT_USER:-nobody}:${GIT_GROUP:-nobody}" +start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME=" +command_background="yes" + +depend() { + use logger +} diff --git a/dev-vcs/git/files/git-daemon.confd b/dev-vcs/git/files/git-daemon.confd new file mode 100644 index 000000000000..69b209ff18cc --- /dev/null +++ b/dev-vcs/git/files/git-daemon.confd @@ -0,0 +1,19 @@ +# conf.d file for git-daemon +# +# Please check man 1 git-daemon for more information about the options +# git-daemon accepts. You MUST edit this to include your repositories you wish +# to serve. +# +# Some of the meaningful options are: +# --syslog --- Enables syslog logging +# --verbose --- Enables verbose logging +# --export-all --- Exports all repositories +# --port=XXXX --- Starts in port XXXX instead of 9418 +# +GITDAEMON_OPTS="--syslog --base-path=/var/git" + +# To run an anonymous git safely, the following user should be able to only +# read your Git repositories. It should not be able to write to anywhere on +# your system, esp. not the repositories. +GIT_USER="nobody" +GIT_GROUP="nobody" diff --git a/dev-vcs/git/files/git-daemon.socket b/dev-vcs/git/files/git-daemon.socket new file mode 100644 index 000000000000..3dec01d21653 --- /dev/null +++ b/dev-vcs/git/files/git-daemon.socket @@ -0,0 +1,9 @@ +[Unit] +Description=Git Activation Socket + +[Socket] +ListenStream=9418 +Accept=true + +[Install] +WantedBy=sockets.target diff --git a/dev-vcs/git/files/git-daemon.xinetd b/dev-vcs/git/files/git-daemon.xinetd new file mode 100644 index 000000000000..02c938d4bd6c --- /dev/null +++ b/dev-vcs/git/files/git-daemon.xinetd @@ -0,0 +1,13 @@ +service git-daemon +{ + disable = yes + socket_type = stream + wait = no + user = nobody + type = UNLISTED + protocol = tcp + log_on_failure += USERID + port = 9418 + server = /usr/bin/git + server_args = daemon --inetd --syslog --export-all --base-path=/var/git +} diff --git a/dev-vcs/git/files/git-daemon_at-r1.service b/dev-vcs/git/files/git-daemon_at-r1.service new file mode 100644 index 000000000000..0a1bd14b16a3 --- /dev/null +++ b/dev-vcs/git/files/git-daemon_at-r1.service @@ -0,0 +1,12 @@ +[Unit] +Description=Git Repositories Server Daemon +Documentation=man:git-daemon(1) + +[Service] +User=nobody +Group=nobody +# Ignore non-zero exit status, access error makes git-daemon return them +ExecStart=-/usr/libexec/git-core/git-daemon --inetd --base-path=/var/git --verbose +StandardInput=socket +StandardOutput=inherit +StandardError=journal diff --git a/dev-vcs/git/files/git-next-0001-macos-no-fsmonitor.patch b/dev-vcs/git/files/git-next-0001-macos-no-fsmonitor.patch new file mode 100644 index 000000000000..d91266df7284 --- /dev/null +++ b/dev-vcs/git/files/git-next-0001-macos-no-fsmonitor.patch @@ -0,0 +1,68 @@ +From 4c1b3deac5d80f12fc7ba3227b49ef5b1a7242c4 Mon Sep 17 00:00:00 2001 +Message-ID: <4c1b3deac5d80f12fc7ba3227b49ef5b1a7242c4.1778619463.git.ben.knoble+github@gmail.com> +From: "D. Ben Knoble" <ben.knoble+github@gmail.com> +Date: Tue, 12 May 2026 16:46:38 -0400 +Subject: [PATCH] meson.build: allow to disable fsmonitor backend for macOS + +Gentoo Prefix toolchain and setup does not enable CoreServices Framework +by default, so simply allow to disable the fsmonitor backend + +Best-viewed-with: --ignore-all-space +Signed-off-by: Fabian Groffen <grobian@gentoo.org> +Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> +--- + meson.build | 24 +++++++++++++----------- + meson_options.txt | 2 ++ + 2 files changed, 15 insertions(+), 11 deletions(-) + +diff --git a/meson.build b/meson.build +index 38dddd67ab..1c369c7157 100644 +--- a/meson.build ++++ b/meson.build +@@ -1353,17 +1353,19 @@ endif + + fsmonitor_backend = '' + fsmonitor_os = '' +-if host_machine.system() == 'windows' +- fsmonitor_backend = 'win32' +- fsmonitor_os = 'win32' +-elif host_machine.system() == 'linux' and threads.found() and compiler.has_header('linux/magic.h') +- fsmonitor_backend = 'linux' +- fsmonitor_os = 'unix' +- libgit_c_args += '-DHAVE_LINUX_MAGIC_H' +-elif host_machine.system() == 'darwin' +- fsmonitor_backend = 'darwin' +- fsmonitor_os = 'unix' +- libgit_dependencies += dependency('CoreServices') ++if get_option('fsmonitor') ++ if host_machine.system() == 'windows' ++ fsmonitor_backend = 'win32' ++ fsmonitor_os = 'win32' ++ elif host_machine.system() == 'linux' and threads.found() and compiler.has_header('linux/magic.h') ++ fsmonitor_backend = 'linux' ++ fsmonitor_os = 'unix' ++ libgit_c_args += '-DHAVE_LINUX_MAGIC_H' ++ elif host_machine.system() == 'darwin' ++ fsmonitor_backend = 'darwin' ++ fsmonitor_os = 'unix' ++ libgit_dependencies += dependency('CoreServices') ++ endif + endif + if fsmonitor_backend != '' + libgit_c_args += '-DHAVE_FSMONITOR_DAEMON_BACKEND' +diff --git a/meson_options.txt b/meson_options.txt +index 80a8025f20..9c0e391254 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -81,6 +81,8 @@ option('rust', type: 'feature', value: 'enabled', + description: 'Enable building with Rust.') + option('macos_use_homebrew_gettext', type: 'boolean', value: true, + description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.') ++option('fsmonitor', type: 'boolean', value: true, ++ description: 'Build fsmonitor backend on supported platforms.') + + # gitweb configuration. + option('gitweb_config', type: 'string', value: 'gitweb_config.perl') +-- +2.54.0.564.ge3ee0a11b5.dirty + |
