swm_version: 1 base: distro_version: dev pins: {} mutations: - type: source_patch tarball: https://www.kernel.org/pub/software/scm/git/git-2.54.0.tar.xz sha256: f689162364c10de79ef89aa8dbf48731eb057e34edbbd20aca510ce0154681a3 patches: - "The last test of t4129 creates a directory and expects its setgid bit\n(g+s) to be off. But this makes the test fail when the parent directory\nhas the bit set, as setgid's state is inherited by newly created\nsubdirectories. Make the test more robust by accepting the presence of\nthe setgid bit on the created directory. We only allow 'S' (setgid on\nbut no executable permission) and not 's' (setgid on with executable\npermission) because the previous 'umask 0077' shouldn't allow the second\nscenario to happen.\n\nNote that only subdirectories inherit this bit, so we don't have to make\nthe same change for the regular file that is also created by this test.\nBut checking the permissions using grep instead of test_cmp makes the\ntest a little simpler, so let's use it for the regular file as well.\n\nAlso note that the sticky bit (+t) and the setuid bit (u+s) are not\ninherited, so we don't have to worry about those.\n\nReported-by: Kevin Daudt \nSigned-off-by: Matheus Tavares \n---\n t/t4129-apply-samemode.sh | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh\nindex 41818d8315..3818398ca9 100755\n--- a/t/t4129-apply-samemode.sh\n+++ b/t/t4129-apply-samemode.sh\n@@ -90,12 +90,10 @@ test_expect_success POSIXPERM 'do not use core.sharedRepository for working tree\n \t\trm -rf d f1 &&\n \t\tgit apply patch-f1-and-f2.txt &&\n \n-\t\techo \"-rw-------\" >f1_mode.expected &&\n-\t\techo \"drwx------\" >d_mode.expected &&\n-\t\ttest_modebits f1 >f1_mode.actual &&\n-\t\ttest_modebits d >d_mode.actual &&\n-\t\ttest_cmp f1_mode.expected f1_mode.actual &&\n-\t\ttest_cmp d_mode.expected d_mode.actual\n+\t\ttest_modebits f1 >f1_mode &&\n+\t\ttest_modebits d >d_mode &&\n+\t\tgrep \"^-rw-------$\" f1_mode &&\n+\t\tgrep \"^drwx--[-S]---$\" d_mode\n \t)\n '\n \n-- \n2.29.2\n\n\n" build: compiler: zig-cc target: x86_64-linux-musl link: static flags: [] phases: configure: "command -v curl-config >/dev/null || { echo \"git: NO hay curl-config en el lab — sin él el test de libcurl falla y se sella un git SIN git-remote-http\"; exit 1; }\nLIBS=\"$(curl-config --libs)\" ./configure --prefix=/usr --build=x86_64-linux-musl --host=x86_64-linux-musl\nif grep -q '^NO_CURL=YesPlease' config.mak.autogen; then\n\techo \"git: el configure NO enganchó libcurl (NO_CURL=YesPlease) — el build saldría VERDE y el git no podría clonar por HTTPS. Mirar el 'checking for curl_global_init in -lcurl' de arriba\"\n\texit 1\nfi\nexit 0\n" compile: "make prefix=/usr CC=\"${CC:-cc}\" \\\n\tNO_GETTEXT=1 NO_TCLTK=1 NO_PYTHON=1 NO_INSTALL_HARDLINKS=1 NO_EXPAT=1 \\\n\tCURL_LDFLAGS=\"$(curl-config --static-libs)\" \\\n\tNO_R_TO_GCC_LINKER=1 FUZZ_PROGRAMS= \\\n\tCFLAGS=\"$CFLAGS -static -DSHA1DC_FORCE_ALIGNED_ACCESS\" \\\n\tLDFLAGS=\"$LDFLAGS -static -fsanitize=undefined\" \\\n\tall\n" install: "make prefix=/usr DESTDIR=\"/out\" CC=\"${CC:-cc}\" \\\n\tNO_GETTEXT=1 NO_TCLTK=1 NO_PYTHON=1 NO_INSTALL_HARDLINKS=1 NO_EXPAT=1 \\\n\tCURL_LDFLAGS=\"$(curl-config --static-libs)\" \\\n\tNO_R_TO_GCC_LINKER=1 FUZZ_PROGRAMS= \\\n\tCFLAGS=\"$CFLAGS -static -DSHA1DC_FORCE_ALIGNED_ACCESS\" \\\n\tLDFLAGS=\"$LDFLAGS -static -fsanitize=undefined\" \\\n\tinstall\n" strip_debug: true target_bin: /usr/bin/git expected_hash: b3:215742cb11adb747de7655346a3982e5d5a140539cb95c69df290dfc430ea8ef deps: build: - binutils - zlib - openssl - curl - pcre2 - linux-headers - perl runtime: []