diff --git a/0001-t-lib-httpd-try-harder-to-find-a-port-for-apache.patch b/0001-t-lib-httpd-try-harder-to-find-a-port-for-apache.patch deleted file mode 100644 index f7c150944debf27ab836d5ebf6644a7ca9d53407..0000000000000000000000000000000000000000 --- a/0001-t-lib-httpd-try-harder-to-find-a-port-for-apache.patch +++ /dev/null @@ -1,73 +0,0 @@ -From aedeaaf788bd8a7fc5a1887196b6f6d8a5c31362 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger -Date: Sun, 21 Aug 2022 13:49:57 -0400 -Subject: [PATCH] t/lib-httpd: try harder to find a port for apache -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When running multiple builds concurrently, tests which run daemons, like -apache httpd, sometimes conflict with each other, leading to spurious -failures: - - ++ /usr/sbin/httpd -d '/tmp/git-t.ck9I/trash directory.t9118-git-svn-funky-branch-names/httpd' \ - -f /builddir/build/BUILD/git-2.37.2/t/lib-httpd/apache.conf -DDAV -DSVN -c 'Listen 127.0.0.1:9118' \ - -k start - (98)Address already in use: AH00072: make_sock: could not bind to address 127.0.0.1:9118 - no listening sockets available, shutting down - AH00015: Unable to open logs - ++ test 1 -ne 0 - -Try a bit harder to find an open port to use to avoid these intermittent -failures. If we fail to start httpd, increment the port number and try -again. By default, we make 3 attempts. This may be overridden by -setting GIT_TEST_START_HTTPD_TRIES to a different value. - -Helped-by: Ondřej Pohořelský -Signed-off-by: Todd Zullinger ---- - t/lib-httpd.sh | 29 ++++++++++++++++++----------- - 1 file changed, 18 insertions(+), 11 deletions(-) - -diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh -index 1f6b9b08d1..9279dcd659 100644 ---- a/t/lib-httpd.sh -+++ b/t/lib-httpd.sh -@@ -175,19 +175,26 @@ prepare_httpd() { - } - - start_httpd() { -- prepare_httpd >&3 2>&4 -- - test_atexit stop_httpd - -- "$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \ -- -f "$TEST_PATH/apache.conf" $HTTPD_PARA \ -- -c "Listen 127.0.0.1:$LIB_HTTPD_PORT" -k start \ -- >&3 2>&4 -- if test $? -ne 0 -- then -- cat "$HTTPD_ROOT_PATH"/error.log >&4 2>/dev/null -- test_skip_or_die GIT_TEST_HTTPD "web server setup failed" -- fi -+ i=0 -+ while test $i -lt ${GIT_TEST_START_HTTPD_TRIES:-3} -+ do -+ i=$(($i + 1)) -+ prepare_httpd >&3 2>&4 -+ say >&3 "Starting httpd on port $LIB_HTTPD_PORT" -+ "$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \ -+ -f "$TEST_PATH/apache.conf" $HTTPD_PARA \ -+ -c "Listen 127.0.0.1:$LIB_HTTPD_PORT" -k start \ -+ >&3 2>&4 -+ test $? -eq 0 && return -+ LIB_HTTPD_PORT=$(($LIB_HTTPD_PORT + 1)) -+ export LIB_HTTPD_PORT -+ # clean up modules symlink, prepare_httpd will re-create it -+ rm -f "$HTTPD_ROOT_PATH/modules" -+ done -+ cat "$HTTPD_ROOT_PATH"/error.log >&4 2>/dev/null -+ test_skip_or_die GIT_TEST_HTTPD "web server setup failed" - } - - stop_httpd() { diff --git a/0002-t-lib-git-daemon-try-harder-to-find-a-port.patch b/0002-t-lib-git-daemon-try-harder-to-find-a-port.patch deleted file mode 100644 index 4540b63704e6a4ca3e4d07179e4ea52ad3b0a63d..0000000000000000000000000000000000000000 --- a/0002-t-lib-git-daemon-try-harder-to-find-a-port.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 16750d024ce038b019ab2e9ee5639901e445af37 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger -Date: Fri, 26 Aug 2022 18:28:44 -0400 -Subject: [PATCH] t/lib-git-daemon: try harder to find a port - -As with the previous commit, try harder to find an open port to avoid -intermittent failures on busy/shared build systems. - -By default, we make 3 attempts. This may be overridden by setting -GIT_TEST_START_GIT_DAEMON_TRIES to a different value. - -Signed-off-by: Todd Zullinger ---- - t/lib-git-daemon.sh | 60 ++++++++++++++++++++++++++++----------------- - 1 file changed, 37 insertions(+), 23 deletions(-) - -diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh -index e62569222b..c3e8dda9ff 100644 ---- a/t/lib-git-daemon.sh -+++ b/t/lib-git-daemon.sh -@@ -51,30 +51,44 @@ start_git_daemon() { - registered_stop_git_daemon_atexit_handler=AlreadyDone - fi - -- say >&3 "Starting git daemon ..." -- mkfifo git_daemon_output -- ${LIB_GIT_DAEMON_COMMAND:-git daemon} \ -- --listen=127.0.0.1 --port="$LIB_GIT_DAEMON_PORT" \ -- --reuseaddr --verbose --pid-file="$GIT_DAEMON_PIDFILE" \ -- --base-path="$GIT_DAEMON_DOCUMENT_ROOT_PATH" \ -- "$@" "$GIT_DAEMON_DOCUMENT_ROOT_PATH" \ -- >&3 2>git_daemon_output & -- GIT_DAEMON_PID=$! -- { -- read -r line <&7 -- printf "%s\n" "$line" >&4 -- cat <&7 >&4 & -- } 7&3 "Starting git daemon on port $LIB_GIT_DAEMON_PORT ..." -+ mkfifo git_daemon_output -+ ${LIB_GIT_DAEMON_COMMAND:-git daemon} \ -+ --listen=127.0.0.1 --port="$LIB_GIT_DAEMON_PORT" \ -+ --reuseaddr --verbose --pid-file="$GIT_DAEMON_PIDFILE" \ -+ --base-path="$GIT_DAEMON_DOCUMENT_ROOT_PATH" \ -+ "$@" "$GIT_DAEMON_DOCUMENT_ROOT_PATH" \ -+ >&3 2>git_daemon_output & -+ GIT_DAEMON_PID=$! -+ { -+ read -r line <&7 -+ printf "%s\n" "$line" >&4 -+ cat <&7 >&4 & -+ } 7 -Date: Fri, 26 Aug 2022 18:28:44 -0400 -Subject: [PATCH] t/lib-git-svn: try harder to find a port - -As with the previous commits, try harder to find an open port to avoid -intermittent failures on busy/shared build systems. - -By default, we make 3 attempts. This may be overridden by setting -GIT_TEST_START_SVNSERVE_TRIES to a different value. - -Run svnserve in daemon mode and use 'test_atexit' to stop it. This is -cleaner than running in the foreground with --listen-once and having to -manage the PID ourselves. - -Signed-off-by: Todd Zullinger ---- - t/lib-git-svn.sh | 34 +++++++++++++++++++++++++---- - t/t9113-git-svn-dcommit-new-file.sh | 1 - - 2 files changed, 30 insertions(+), 5 deletions(-) - -diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh -index ea28971e8e..04e660e2ba 100644 ---- a/t/lib-git-svn.sh -+++ b/t/lib-git-svn.sh -@@ -17,6 +17,7 @@ fi - GIT_DIR=$PWD/.git - GIT_SVN_DIR=$GIT_DIR/svn/refs/remotes/git-svn - SVN_TREE=$GIT_SVN_DIR/svn-tree -+SVNSERVE_PIDFILE="$PWD"/daemon.pid - test_set_port SVNSERVE_PORT - - svn >/dev/null 2>&1 -@@ -119,10 +120,35 @@ require_svnserve () { - } - - start_svnserve () { -- svnserve --listen-port $SVNSERVE_PORT \ -- --root "$rawsvnrepo" \ -- --listen-once \ -- --listen-host 127.0.0.1 & -+ test_atexit stop_svnserve -+ -+ i=0 -+ while test $i -lt ${GIT_TEST_START_SVNSERVE_TRIES:-3} -+ do -+ say >&3 "Starting svnserve on port $SVNSERVE_PORT ..." -+ svnserve --listen-port $SVNSERVE_PORT \ -+ --root "$rawsvnrepo" \ -+ --daemon --pid-file="$SVNSERVE_PIDFILE" \ -+ --listen-host 127.0.0.1 -+ ret=$? -+ # increment port and retry if unsuccessful -+ if test $ret -ne 0 -+ then -+ SVNSERVE_PORT=$(($SVNSERVE_PORT + 1)) -+ export SVNSERVE_PORT -+ else -+ break -+ fi -+ done -+} -+ -+stop_svnserve () { -+ say >&3 "Stopping svnserve ..." -+ SVNSERVE_PID="$(cat "$SVNSERVE_PIDFILE")" -+ if test -n "$SVNSERVE_PID" -+ then -+ kill "$SVNSERVE_PID" 2>/dev/null -+ fi - } - - prepare_utf8_locale () { -diff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh -index e8479cec7a..5925891f5d 100755 ---- a/t/t9113-git-svn-dcommit-new-file.sh -+++ b/t/t9113-git-svn-dcommit-new-file.sh -@@ -28,7 +28,6 @@ test_expect_success 'create files in new directory with dcommit' " - echo hello > git-new-dir/world && - git update-index --add git-new-dir/world && - git commit -m hello && -- start_svnserve && - git svn dcommit - " - diff --git a/git-2.41.0.tar.xz b/git-2.47.1.tar.xz similarity index 48% rename from git-2.41.0.tar.xz rename to git-2.47.1.tar.xz index 7e3df8c98ef531bd8cfbe5b7bfaa6735ba8bc5d0..20c12a0e78f4c6aea14f81ec942963571d787197 100644 Binary files a/git-2.41.0.tar.xz and b/git-2.47.1.tar.xz differ diff --git a/git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch b/git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch deleted file mode 100644 index 37a22dd578057e414265f7b8100f225b0d8291da..0000000000000000000000000000000000000000 --- a/git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 09891c65a5f7409ce0bd37daced0ff31fbb1b1c9 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger -Date: Mon, 23 Mar 2009 00:03:36 -0400 -Subject: [PATCH] git-cvsimport: Ignore cvsps-2.2b1 Branches: output - -Signed-off-by: Todd Zullinger ---- - git-cvsimport.perl | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/git-cvsimport.perl b/git-cvsimport.perl -index e439202..d020f1a 100755 ---- a/git-cvsimport.perl -+++ b/git-cvsimport.perl -@@ -952,7 +952,7 @@ while () { - } elsif (/^-+$/) { # end of unknown-line processing - $state = 1; - } elsif ($state != 11) { # ignore stuff when skipping -- print STDERR "* UNKNOWN LINE * $_\n"; -+ print STDERR "* UNKNOWN LINE * $_\n" unless /^Branches: /; - } - } - commit() if $branch and $state != 11; --- -1.6.2.2 - diff --git a/git.spec b/git.spec index 1ee6ed6f867574da75279d635b1821b69a6fa75f..e3349b4897ae8273895c96ce04cf1bfa7a555ec2 100644 --- a/git.spec +++ b/git.spec @@ -3,24 +3,25 @@ %bcond_without docs %bcond_without tests %bcond_with linkcheck -%bcond_without asciidoctor +%bcond_with perl_modcompat +%bcond_with asciidoctor %bcond_with cvs %bcond_without libsecret -%bcond_without p4 +%bcond_with p4 %bcond_without use_glibc_langpacks %bcond_without use_perl_generators %bcond_without use_perl_interpreter -%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) -%global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) +%global gitweb_httpd_conf gitweb.conf %global _package_note_file %{_builddir}/%{name}-%{version}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld Name: git -Version: 2.41.0 +Version: 2.47.1 Release: %{anolis_release}%{?dist} Summary: Distributed version control system -License: GPLv2 +License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +#GPLv2 URL: https://git-scm.com/ Source0: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz Source1: git.xinetd.in @@ -31,13 +32,9 @@ Source5: git@.service.in Source6: git.socket Source7: print-failed-test-output -Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch -Patch1: 0001-t-lib-httpd-try-harder-to-find-a-port-for-apache.patch -Patch2: 0002-t-lib-git-daemon-try-harder-to-find-a-port.patch -Patch3: 0003-t-lib-git-svn-try-harder-to-find-a-port.patch - %if %{with docs} -BuildRequires: /usr/bin/pod2man +BuildRequires: perl-podlators +#/usr/bin/pod2man %if %{with asciidoctor} BuildRequires: docbook5-style-xsl rubygem-asciidoctor %else @@ -62,7 +59,7 @@ BuildRequires: perl-interpreter BuildRequires: perl %endif BuildRequires: pkgconfig(bash-completion) -BuildRequires: systemd tcl tk xz zlib-devel >= 1.2 +BuildRequires: systemd-rpm-macros tcl tk xz zlib-devel >= 1.2 %if %{with tests} BuildRequires: bash acl mod_http2 @@ -88,7 +85,7 @@ BuildRequires: perl(Memoize) perl(POSIX) BuildRequires: perl(Term::ReadLine) perl(Test::More) perl(Time::HiRes) BuildRequires: python3-devel BuildRequires: subversion subversion-perl -BuildRequires: tar time zip +BuildRequires: tar time zip zstd %endif @@ -364,9 +361,6 @@ export SOURCE_DATE_EPOCH=$(date -r version +%%s 2>/dev/null) rm -rf contrib/fast-import/import-zips.py -sed -i -e '1s@#!\( */usr/bin/env python\|%{__python2}\)$@#!%{__python3}@' \ - contrib/hg-to-git/hg-to-git.py - %install %make_install %{?with_docs:install-doc} @@ -389,6 +383,7 @@ sed "s|@PROJECTROOT@|%{_localstatedir}/lib/git|g" \ install -D -m 0755 -p contrib/diff-highlight/diff-highlight %{buildroot}%{_datadir}/git-core/contrib/diff-highlight rm -rf contrib/diff-highlight/{Makefile,diff-highlight,*.perl,t} +rm -rf contrib/persistent-https rm -rf contrib/scalar rm -rf contrib/subtree/{INSTALL,Makefile,git-subtree*,t} @@ -521,8 +516,6 @@ GIT_SKIP_TESTS="t5559 \ GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.37 t5551.25" %endif - - export GIT_SKIP_TESTS export GIT_TEST_GIT_DAEMON=true export GIT_TEST_HTTPD=true @@ -531,7 +524,7 @@ export GIT_TEST_SVN_HTTPD=true export LANG=en_US.UTF-8 -testdir=$(mktemp -d -p /tmp git-t.XXXX) +export testdir=$(mktemp -d -p /tmp git-t.XXXX) sed -i "s@^GIT_TEST_OPTS = .*@& --root=$testdir@" config.mak touch -r GIT-BUILD-OPTIONS ts sed -i "s@\(GIT_TEST_OPTS='.*\)'@\1 --root=$testdir'@" GIT-BUILD-OPTIONS @@ -568,7 +561,6 @@ rmdir --ignore-fail-on-non-empty "$testdir" # empty files %files core -f bin-files-core -%{bashcomproot} %{_datadir}/git-core/ %{!?_licensedir:%global license %doc} %license COPYING @@ -685,6 +677,9 @@ rmdir --ignore-fail-on-non-empty "$testdir" %changelog +* Wed Feb 12 2025 mgb01105731 - 2.47.1-1 +- Sync from CentOS Stream git-2.47.1-1(opohorel@redhat.com) + * Sat Jul 15 2023 Funda Wang - 2.41.0-1 - New verison 2.41.0 diff --git a/print-failed-test-output b/print-failed-test-output index d0d63aa4cb0e778f3be22812cad99de92f478d22..4e6566260cff548e12f4202e4a7ee8880ac0c9b4 100644 --- a/print-failed-test-output +++ b/print-failed-test-output @@ -10,4 +10,17 @@ for exit_file in t/test-results/*.exit; do printf '\n%s\n%s\n%s\n' "$sep" "$out_file" "$sep" cat "$out_file" done + +# tar up test-results & $testdir, then print base64 encoded output +# +# copy $testdir contents to test-results to avoid absolute paths with tar +cp -a $testdir/* t/test-results/ +begin='-----BEGIN BASE64 MESSAGE-----' +end='-----END BASE64 MESSAGE-----' +printf '\n%s\n' 'test-results and trash directory output follows; decode via:' +printf '%s\n' "sed -n '/^${begin}$/,/^${end}$/{/^${begin}$/!{/^${end}$/!p}}' build.log | base64 -d >output.tar.zst" +printf '%s\n' "$begin" +tar -C t -cf - test-results/ | zstdmt -17 | base64 +printf '%s\n' "$end" + exit 1