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 new file mode 100644 index 0000000000000000000000000000000000000000..f7c150944debf27ab836d5ebf6644a7ca9d53407 --- /dev/null +++ b/0001-t-lib-httpd-try-harder-to-find-a-port-for-apache.patch @@ -0,0 +1,73 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..4540b63704e6a4ca3e4d07179e4ea52ad3b0a63d --- /dev/null +++ b/0002-t-lib-git-daemon-try-harder-to-find-a-port.patch @@ -0,0 +1,88 @@ +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.36.1.tar.sign b/git-2.36.1.tar.sign deleted file mode 100644 index 14d7b617377c1a6e2ce8b5925545fabf66b20d30..0000000000000000000000000000000000000000 Binary files a/git-2.36.1.tar.sign and /dev/null differ diff --git a/git-2.37.3.tar.sign b/git-2.37.3.tar.sign new file mode 100644 index 0000000000000000000000000000000000000000..75e17aa00170420c7fd26fb2a5673e21285a8937 Binary files /dev/null and b/git-2.37.3.tar.sign differ diff --git a/git-2.36.1.tar.xz b/git-2.37.3.tar.xz similarity index 48% rename from git-2.36.1.tar.xz rename to git-2.37.3.tar.xz index 33cba94953b13fd5d3ef835fcf791c00317e4787..f98528f6135b59081c73ed1ad7e619bfdc3c5048 100644 Binary files a/git-2.36.1.tar.xz and b/git-2.37.3.tar.xz differ diff --git a/git.spec b/git.spec index 3593988fc52db673e77ce4a60952d7eab9c6e983..b40b9e41d5d55b7b9bb1c305b267b7fb195ef021 100644 --- a/git.spec +++ b/git.spec @@ -1,43 +1,33 @@ -%define anolis_release 2 +%define anolis_release 1 + # Pass --without docs to rpmbuild if you don't want the documentation %bcond_without docs # Pass --without tests to rpmbuild if you don't want to run the tests -%bcond_without tests - -%global gitexecdir %{_libexecdir}/git-core - -%bcond_with emacs - -%bcond_with linkcheck - -%bcond_without asciidoctor - -%bcond_without python3 -%global gitweb_httpd_conf gitweb.conf -%global use_glibc_langpacks 1 -%global use_perl_generators 1 -%global use_perl_interpreter 1 - -%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) -%global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) - +%bcond_without tests +%bcond_with linkcheck +%bcond_without asciidoctor +%bcond_without python3 # Allow cvs subpackage to be toggled via --with/--without -%bcond_with cvs - +%bcond_with cvs # Allow credential-libsecret subpackage to be toggled via --with/--without -%bcond_without libsecret - +%bcond_without libsecret # Allow p4 subpackage to be toggled via --with/--without # Disable by default if we lack python3 support -%bcond_without p4 - +%bcond_without p4 +%global gitweb_httpd_conf gitweb.conf +%global use_glibc_langpacks 1 +%global use_perl_generators 1 +%global use_perl_interpreter 1 +%global gitexecdir %{_libexecdir}/git-core +%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) +%global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) # Set path to the package-notes linker script %global _package_note_file %{_builddir}/%{name}-%{version}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld Name: git -Version: 2.36.1 +Version: 2.37.3 Release: %{anolis_release}%{?dist} Summary: Fast Version Control System License: GPLv2 @@ -69,6 +59,14 @@ Source99: print-failed-test-output # fix git-cvsimport got noisy Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch +# tests: try harder to find open ports for apache, git, and svn +# +# https://github.com/tmzullinger/git/commit/aedeaaf788 +Patch1: 0001-t-lib-httpd-try-harder-to-find-a-port-for-apache.patch +# https://github.com/tmzullinger/git/commit/16750d024c +Patch2: 0002-t-lib-git-daemon-try-harder-to-find-a-port.patch +# https://github.com/tmzullinger/git/commit/aa5105dc11 +Patch3: 0003-t-lib-git-svn-try-harder-to-find-a-port.patch %if %{with docs} # pod2man is needed to build Git.3pm @@ -88,9 +86,6 @@ BuildRequires: linkchecker BuildRequires: coreutils BuildRequires: desktop-file-utils BuildRequires: diffutils -%if %{with emacs} -BuildRequires: emacs-common -%endif BuildRequires: expat-devel BuildRequires: findutils BuildRequires: gawk @@ -181,15 +176,6 @@ Requires: perl(Term::ReadKey) %endif Requires: perl-Git = %{version}-%{release} -%if %{with emacs} && %{defined _emacs_version} -Requires: emacs-filesystem >= %{_emacs_version} -%endif - -# Obsolete emacs-git if it's disabled -%if %{without emacs} -Obsoletes: emacs-git < %{?epoch:%{epoch}:}%{version}-%{release} -%endif - # Obsolete git-cvs if it's disabled %if %{without cvs} Obsoletes: git-cvs < %{?epoch:%{epoch}:}%{version}-%{release} @@ -415,7 +401,9 @@ xz -dc '%{SOURCE0}' | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1 install -p -m 755 %{SOURCE99} print-failed-test-output # Remove git-archimport from command list +sed -i '/^SCRIPT_PERL += git-archimport\.perl$/d' Makefile sed -i '/^git-archimport/d' command-list.txt +rm git-archimport.perl Documentation/git-archimport.txt %if %{without cvs} # Remove git-cvs* from command list @@ -514,18 +502,6 @@ sed -i -e '1s@#!\( */usr/bin/env python\|%{__python2}\)$@#!%{__python3}@' \ %make_install -C contrib/contacts -%if %{with emacs} -%global elispdir %{_emacs_sitelispdir}/git -pushd contrib/emacs >/dev/null -for el in *.el ; do - # Note: No byte-compiling is done. These .el files are one-line stubs - # which only serve to point users to better alternatives. - install -Dpm 644 $el %{buildroot}%{elispdir}/$el - rm -f $el # clean up to avoid cruft in git-core-doc -done -popd >/dev/null -%endif - %if %{with libsecret} install -pm 755 contrib/credential/libsecret/git-credential-libsecret \ %{buildroot}%{gitexecdir} @@ -554,9 +530,6 @@ rm -rf contrib/scalar # Clean up contrib/subtree to avoid cruft in the git-core-doc docdir rm -rf contrib/subtree/{INSTALL,Makefile,git-subtree*,t} -# git-archimport is not supported -find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';' - %if %{without cvs} # Remove git-cvs* and gitcvs* find %{buildroot} Documentation \( -type f -o -type l \) \ @@ -572,7 +545,7 @@ rm -f %{buildroot}%{gitexecdir}/mergetools/p4merge # Remove unneeded git-remote-testsvn so git-svn can be noarch rm -f %{buildroot}%{gitexecdir}/git-remote-testsvn -exclude_re="archimport|email|git-(citool|credential-libsecret|cvs|daemon|gui|instaweb|p4|subtree|svn)|gitk|gitweb|p4merge" +exclude_re="email|git-(citool|credential-libsecret|cvs|daemon|gui|instaweb|p4|subtree|svn)|gitk|gitweb|p4merge" (find %{buildroot}{%{_bindir},%{_libexecdir}} -type f -o -type l | grep -vE "$exclude_re" | sed -e s@^%{buildroot}@@) > bin-man-doc-files (find %{buildroot}{%{_bindir},%{_libexecdir}} -mindepth 1 -type d | grep -vE "$exclude_re" | sed -e 's@^%{buildroot}@%dir @') >> bin-man-doc-files (find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) > perl-git-files @@ -744,9 +717,6 @@ rmdir --ignore-fail-on-non-empty "$testdir" %systemd_postun_with_restart git.socket %files -f bin-man-doc-git-files -%if %{with emacs} -%{elispdir} -%endif %{_datadir}/git-core/contrib/diff-highlight %{_datadir}/git-core/contrib/hooks/update-paranoid %{_datadir}/git-core/contrib/hooks/setgitperms.perl @@ -866,6 +836,9 @@ rmdir --ignore-fail-on-non-empty "$testdir" %{?with_docs:%{_pkgdocdir}/git-svn.html} %changelog +* Wed Sep 07 2022 happy_orange - 2.37.3-1 +- update to 2.37.3 + * Fri Jun 10 2022 Chunmei Xu - 2.36.1-2 - remove dependency of apr-util-bdb and add skip testcases