From 9b4cb0385429bdfcf8e0dcce229ea432dc038195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Mon, 20 Jun 2011 22:17:44 +0200 Subject: [PATCH 01/10] Perl mass rebuild --- git.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git.spec b/git.spec index 7d07a3d..9df0543 100644 --- a/git.spec +++ b/git.spec @@ -7,7 +7,7 @@ Name: git Version: 1.7.5.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -476,6 +476,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Mon Jun 20 2011 Marcela Mašláňová - 1.7.5.4-2 +- Perl mass rebuild + * Thu Jun 09 2011 Adam Tkac - 1.7.5.4-1 - update to 1.7.5.4 From 5dc4f2bfb5a4968a1e2232265e5fa1f48da9566e Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 29 Jun 2011 15:07:52 +0200 Subject: [PATCH 02/10] Update to 1.7.6 Signed-off-by: Adam Tkac --- git.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/git.spec b/git.spec index 9df0543..e3f5172 100644 --- a/git.spec +++ b/git.spec @@ -6,8 +6,8 @@ %endif Name: git -Version: 1.7.5.4 -Release: 2%{?dist} +Version: 1.7.6 +Release: 1%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -476,6 +476,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Wed Jun 29 2011 Adam Tkac - 1.7.6-1 +- update to 1.7.6 + * Mon Jun 20 2011 Marcela Mašláňová - 1.7.5.4-2 - Perl mass rebuild diff --git a/sources b/sources index 7a4d6fd..9c931b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4985b774db84d3bbcc2b8d90952552a3 git-1.7.5.4.tar.bz2 +9e0a438eb71e89eedb61f89470ed32a0 git-1.7.6.tar.bz2 From b8e748f9f914734eac133a41ac3ab234b650341e Mon Sep 17 00:00:00 2001 From: Petr Sabata Date: Wed, 20 Jul 2011 11:42:32 +0200 Subject: [PATCH 03/10] Perl mass rebuild --- git.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git.spec b/git.spec index e3f5172..12cce13 100644 --- a/git.spec +++ b/git.spec @@ -7,7 +7,7 @@ Name: git Version: 1.7.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -476,6 +476,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Wed Jul 20 2011 Petr Sabata - 1.7.6-2 +- Perl mass rebuild + * Wed Jun 29 2011 Adam Tkac - 1.7.6-1 - update to 1.7.6 From 56b925003b1620437540fe8c881a2205822c3e63 Mon Sep 17 00:00:00 2001 From: Petr Sabata Date: Thu, 21 Jul 2011 18:33:42 +0200 Subject: [PATCH 04/10] Perl mass rebuild --- git.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git.spec b/git.spec index 12cce13..0c2e522 100644 --- a/git.spec +++ b/git.spec @@ -7,7 +7,7 @@ Name: git Version: 1.7.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -476,6 +476,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Thu Jul 21 2011 Petr Sabata - 1.7.6-3 +- Perl mass rebuild + * Wed Jul 20 2011 Petr Sabata - 1.7.6-2 - Perl mass rebuild From 3f0dc974fa8b2943641d67c73ad1e34df4a3dcff Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Tue, 26 Jul 2011 11:56:36 -0400 Subject: [PATCH 05/10] Drop git-arch on fedora >= 16 The tla package was retired. --- git.spec | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/git.spec b/git.spec index 0c2e522..78d478c 100644 --- a/git.spec +++ b/git.spec @@ -5,9 +5,16 @@ %global gitcoredir %{_libexecdir}/git-core %endif +# Only build git-arch for Fedora < 16, where tla is available +%if 0%{?fedora} && 0%{?fedora} < 16 +%global arch_support 1 +%else +%global arch_support 0 +%endif + Name: git Version: 1.7.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -76,7 +83,7 @@ Group: Development/Tools BuildArch: noarch %endif Requires: git = %{version}-%{release} -%if 0%{?fedora} +%if %{arch_support} Requires: git-arch = %{version}-%{release} %endif Requires: git-cvs = %{version}-%{release} @@ -146,7 +153,7 @@ Requires: perl-DBD-SQLite %description cvs Git tools for importing CVS repositories. -%if 0%{?fedora} +%if %{arch_support} %package arch Summary: Git tools for importing Arch repositories Group: Development/Tools @@ -323,7 +330,7 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';' find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';' -%if ! 0%{?fedora} +%if ! %{arch_support} find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';' %endif @@ -403,7 +410,7 @@ rm -rf %{buildroot} %{!?_without_docs: %{_mandir}/man1/*cvs*.1*} %{!?_without_docs: %doc Documentation/*git-cvs*.html } -%if 0%{?fedora} +%if %{arch_support} %files arch %defattr(-,root,root) %doc Documentation/git-archimport.txt @@ -476,6 +483,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Tue Jul 26 2011 Todd Zullinger - 1.7.6-4 +- Drop git-arch on fedora >= 16, the tla package has been retired + * Thu Jul 21 2011 Petr Sabata - 1.7.6-3 - Perl mass rebuild From 7e2e90daedd07f9f4820ebfac45bd261b39ecf28 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Tue, 26 Jul 2011 14:12:21 -0400 Subject: [PATCH 06/10] Rework most spec file dist conditionals Over time the spec file had become littered with conditional statements to enable, disable, patch, and/or tweak things for various releases. Consolidate all these at the top of the spec file to make it easier to add future conditions. --- git.spec | 132 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 46 deletions(-) diff --git a/git.spec b/git.spec index 78d478c..7eabe22 100644 --- a/git.spec +++ b/git.spec @@ -1,10 +1,65 @@ # Pass --without docs to rpmbuild if you don't want the documentation + +# Leave git-* binaries in %{_bindir} on EL <= 5 %if 0%{?rhel} && 0%{?rhel} <= 5 %global gitcoredir %{_bindir} %else %global gitcoredir %{_libexecdir}/git-core %endif +# Build noarch subpackages and use libcurl-devel on Fedora and EL >= 6 +%if 0%{?fedora} || 0%{?rhel} >= 6 +%global noarch_sub 1 +%global libcurl_devel libcurl-devel +%else +%global noarch_sub 0 +%global libcurl_devel curl-devel +%endif + +# Build git-emacs, use perl(Error) and perl(Net::SMTP::SSL), require cvsps, and +# adjust git-core obsolete version on Fedora and EL >= 5. (We don't really +# support EL-4, but folks stuck using it have enough problems, no point making +# it harder on them.) +%if 0%{?fedora} || 0%{?rhel} >= 5 +%global emacs_support 1 +%global git_core_version 1.5.4.3 +%global perl_error 1 +%global perl_net_smtp_ssl 1 +%global require_cvsps 1 +%else +%global emacs_support 0 +%global git_core_version 1.5.4.7-4 +%global perl_error 0 +%global perl_net_smtp_ssl 0 +%global require_cvsps 0 +%endif + +# Patch emacs and tweak docbook spaces on EL-5 +%if 0%{?rhel} == 5 +%global emacs_old 1 +%global docbook_suppress_sp 1 +%else +%global emacs_old 0 +%global docbook_suppress_sp 0 +%endif + +# Enable ipv6 for git-daemon and use desktop --vendor option on EL <= 5 +%if 0%{?rhel} && 0%{?rhel} <= 5 +%global enable_ipv6 1 +%global use_desktop_vendor 1 +%else +%global enable_ipv6 1 +%global use_desktop_vendor 1 +%endif + +# Use asciidoc-7 on EL <= 4. Again, we don't support EL-4, but no need to make +# it more difficult to build a modern git there. +%if 0%{?rhel} && 0%{?rhel} <= 4 +%global asciidoc7 1 +%else +%global asciidoc7 0 +%endif + # Only build git-arch for Fedora < 16, where tla is available %if 0%{?fedora} && 0%{?fedora} < 16 %global arch_support 1 @@ -35,14 +90,10 @@ Patch3: git-1.7-el5-emacs-support.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{emacs_support} BuildRequires: emacs %endif -%if 0%{?fedora} || 0%{?rhel} >= 6 -BuildRequires: libcurl-devel -%else -BuildRequires: curl-devel -%endif +BuildRequires: %{libcurl_devel} BuildRequires: expat-devel BuildRequires: gettext BuildRequires: openssl-devel @@ -51,7 +102,7 @@ BuildRequires: zlib-devel >= 1.2 Requires: less Requires: openssh-clients -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{perl_error} Requires: perl(Error) %endif Requires: perl-Git = %{version}-%{release} @@ -59,13 +110,7 @@ Requires: rsync Requires: zlib >= 1.2 Provides: git-core = %{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} >= 5 -Obsoletes: git-core <= 1.5.4.3 -%else -# EL-4 has 1.5.4.7-3.el4. We don't support this, but no point making it more -# difficult than it needs to be (folks stuck on EL-4 have it bad enough ;). -Obsoletes: git-core <= 1.5.4.7-4 -%endif +Obsoletes: git-core <= %{git_core_version} %description Git is a fast, scalable, distributed revision control system with an @@ -79,7 +124,7 @@ SCMs, install the git-all meta-package. %package all Summary: Meta-package to pull in all git tools Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release} @@ -92,16 +137,10 @@ Requires: git-gui = %{version}-%{release} Requires: git-svn = %{version}-%{release} Requires: gitk = %{version}-%{release} Requires: perl-Git = %{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{emacs_support} Requires: emacs-git = %{version}-%{release} %endif -%if 0%{?fedora} || 0%{?rhel} >= 5 -Obsoletes: git <= 1.5.4.3 -%else -# EL-4 has 1.5.4.7-3.el4. We don't support this, but no point making it more -# difficult than it needs to be (folks stuck on EL-4 have it bad enough ;). -Obsoletes: git <= 1.5.4.7-4 -%endif +Obsoletes: git <= %{git_core_version} %description all Git is a fast, scalable, distributed revision control system with an @@ -120,7 +159,7 @@ The git dæmon for supporting git:// access to git repositories %package -n gitweb Summary: Simple web interface to git repositories Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release} @@ -132,7 +171,7 @@ Simple web interface to track changes in git repositories %package svn Summary: Git tools for importing Subversion repositories Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release}, subversion, perl(Term::ReadKey) @@ -142,11 +181,11 @@ Git tools for importing Subversion repositories. %package cvs Summary: Git tools for importing CVS repositories Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release}, cvs -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{require_cvsps} Requires: cvsps Requires: perl-DBD-SQLite %endif @@ -166,12 +205,12 @@ Git tools for importing Arch repositories. %package email Summary: Git tools for sending email Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release} Requires: perl(Authen::SASL) -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{perl_net_smtp_ssl} Requires: perl(Net::SMTP::SSL) %endif %description email @@ -180,7 +219,7 @@ Git tools for sending email. %package gui Summary: Git GUI tool Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release}, tk >= 8.4 @@ -191,7 +230,7 @@ Git GUI tool. %package -n gitk Summary: Git revision tree visualiser Group: Development/Tools -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release}, tk >= 8.4 @@ -201,11 +240,11 @@ Git revision tree visualiser. %package -n perl-Git Summary: Perl interface to Git Group: Development/Libraries -%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: git = %{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{perl_error} BuildRequires: perl(Error), perl(ExtUtils::MakeMaker) Requires: perl(Error) %endif @@ -214,12 +253,12 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $versi %description -n perl-Git Perl interface to Git. -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{emacs_support} %package -n emacs-git Summary: Git version control system support for Emacs Group: Applications/Editors Requires: git = %{version}-%{release} -%if 0%{?fedora} || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch Requires: emacs(bin) >= %{_emacs_version} %else @@ -232,7 +271,7 @@ Requires: emacs-common %package -n emacs-git-el Summary: Elisp source files for git version control system support for Emacs Group: Applications/Editors -%if 0%{?fedora} || 0%{?rhel} >= 6 +%if %{noarch_sub} BuildArch: noarch %endif Requires: emacs-git = %{version}-%{release} @@ -246,7 +285,7 @@ Requires: emacs-git = %{version}-%{release} %patch0 -p1 %patch1 -p1 %patch2 -p1 -%if 0%{?rhel} == 5 +%if %{emacs_old} %patch3 -p1 %endif @@ -267,16 +306,16 @@ prefix = %{_prefix} gitwebdir = %{_var}/www/git EOF -%if 0%{?rhel} && 0%{?rhel} <= 5 +%if "%{gitcoredir}" == "%{_bindir}" echo gitexecdir = %{_bindir} >> config.mak %endif -%if 0%{?rhel} && 0%{?rhel} == 5 +%if %{docbook_suppress_sp} # This is needed for 1.69.1-1.71.0 echo DOCBOOK_SUPPRESS_SP = 1 >> config.mak %endif -%if 0%{?rhel} && 0%{?rhel} <= 4 +%if %{asciidoc7} echo ASCIIDOC7 = 1 >> config.mak %endif @@ -294,7 +333,7 @@ chmod +x %{__perl_requires} %build make %{?_smp_mflags} all %{!?_without_docs: doc} -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{emacs_support} make -C contrib/emacs %endif @@ -305,8 +344,8 @@ sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash rm -rf %{buildroot} make %{?_smp_mflags} INSTALLDIRS=vendor install %{!?_without_docs: install-doc} -%if 0%{?fedora} || 0%{?rhel} >= 5 -%if 0%{?rhel} == 5 +%if %{emacs_support} +%if %{emacs_old} %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp %global _emacs_sitestartdir %{_emacs_sitelispdir}/site-start.d %endif @@ -350,7 +389,7 @@ enable_ipv6=" # xinetd does not enable IPv6 by default perl -p \ -e "s|\@GITCOREDIR\@|%{gitcoredir}|g;" \ -e "s|\@BASE_PATH\@|%{_var}/lib/git|g;" \ -%if 0%{?rhel} && 0%{?rhel} <= 5 +%if %{enable_ipv6} -e "s|^}|$enable_ipv6\n$&|;" \ %endif %{SOURCE2} > %{buildroot}%{_sysconfdir}/xinetd.d/git @@ -368,7 +407,7 @@ popd > /dev/null # install git-gui .desktop file desktop-file-install \ -%if 0%{?rhel} && 0%{?rhel} <= 5 +%if %{use_desktop_vendor} --vendor fedora \ %endif --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} @@ -449,7 +488,7 @@ rm -rf %{buildroot} %defattr(-,root,root) %{!?_without_docs: %{_mandir}/man3/*Git*.3pm*} -%if 0%{?fedora} || 0%{?rhel} >= 5 +%if %{emacs_support} %files -n emacs-git %defattr(-,root,root) %doc contrib/emacs/README @@ -485,6 +524,7 @@ rm -rf %{buildroot} %changelog * Tue Jul 26 2011 Todd Zullinger - 1.7.6-4 - Drop git-arch on fedora >= 16, the tla package has been retired +- Rework most spec file dist conditionals to make future changes easier * Thu Jul 21 2011 Petr Sabata - 1.7.6-3 - Perl mass rebuild From 69974bd1686fd973b53492f0cc0847294ce4a992 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 5 Aug 2011 16:28:48 -0400 Subject: [PATCH 07/10] Fix git push --quiet, thanks to Clemens Buchacher (#725593) --- ...gate-quiet-to-send-pack-receive-pack.patch | 201 ++++++++++++++++++ git.spec | 8 +- 2 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 0001-propagate-quiet-to-send-pack-receive-pack.patch diff --git a/0001-propagate-quiet-to-send-pack-receive-pack.patch b/0001-propagate-quiet-to-send-pack-receive-pack.patch new file mode 100644 index 0000000..59f8879 --- /dev/null +++ b/0001-propagate-quiet-to-send-pack-receive-pack.patch @@ -0,0 +1,201 @@ +From c513fc653a2f88fd29e30ffcdd8aaf7741222cc7 Mon Sep 17 00:00:00 2001 +From: Clemens Buchacher +Date: Sat, 30 Jul 2011 10:35:24 -0400 +Subject: [PATCH] propagate --quiet to send-pack/receive-pack + +Currently, git push --quiet produces some non-error output, e.g.: + + $ git push --quiet + Unpacking objects: 100% (3/3), done. + +Add the --quiet option to send-pack/receive-pack and pass it to +unpack-objects in the receive-pack codepath and to receive-pack in +the push codepath. + +This fixes a bug reported for the fedora git package: + + https://bugzilla.redhat.com/show_bug.cgi?id=725593 + +Reported-by: Jesse Keating +Cc: Todd Zullinger +Signed-off-by: Clemens Buchacher +--- + Documentation/git-receive-pack.txt | 5 ++++- + Documentation/git-send-pack.txt | 5 ++++- + builtin/receive-pack.c | 12 ++++++++++-- + builtin/send-pack.c | 11 ++++++++++- + remote-curl.c | 4 +++- + transport.c | 10 +++++++--- + 6 files changed, 38 insertions(+), 9 deletions(-) + +diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt +index f34e0ae..23f9a48 100644 +--- a/Documentation/git-receive-pack.txt ++++ b/Documentation/git-receive-pack.txt +@@ -8,7 +8,7 @@ git-receive-pack - Receive what is pushed into the repository + + SYNOPSIS + -------- +-'git-receive-pack' ++'git-receive-pack' [--quiet] + + DESCRIPTION + ----------- +@@ -34,6 +34,9 @@ are not fast-forwards. + + OPTIONS + ------- ++--quiet:: ++ Print only error messages. ++ + :: + The repository to sync into. + +diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt +index 17f8f55..67bcd0c 100644 +--- a/Documentation/git-send-pack.txt ++++ b/Documentation/git-send-pack.txt +@@ -8,7 +8,7 @@ git-send-pack - Push objects over git protocol to another repository + + SYNOPSIS + -------- +-'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=] [--verbose] [--thin] [:] [...] ++'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=] [--quiet] [--verbose] [--thin] [:] [...] + + DESCRIPTION + ----------- +@@ -44,6 +44,9 @@ OPTIONS + the remote repository can lose commits; use it with + care. + ++--quiet:: ++ Print only error messages. ++ + --verbose:: + Run verbosely. + +diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c +index e1a687a..fca26fb 100644 +--- a/builtin/receive-pack.c ++++ b/builtin/receive-pack.c +@@ -636,7 +636,7 @@ static const char *parse_pack_header(struct pack_header *hdr) + + static const char *pack_lockfile; + +-static const char *unpack(void) ++static const char *unpack(int quiet) + { + struct pack_header hdr; + const char *hdr_err; +@@ -653,6 +653,8 @@ static const char *unpack(void) + int code, i = 0; + const char *unpacker[4]; + unpacker[i++] = "unpack-objects"; ++ if (quiet) ++ unpacker[i++] = "-q"; + if (receive_fsck_objects) + unpacker[i++] = "--strict"; + unpacker[i++] = hdr_arg; +@@ -753,6 +755,7 @@ static void add_alternate_refs(void) + + int cmd_receive_pack(int argc, const char **argv, const char *prefix) + { ++ int quiet = 0; + int advertise_refs = 0; + int stateless_rpc = 0; + int i; +@@ -766,6 +769,11 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) + const char *arg = *argv++; + + if (*arg == '-') { ++ if (!strcmp(arg, "--quiet")) { ++ quiet = 1; ++ continue; ++ } ++ + if (!strcmp(arg, "--advertise-refs")) { + advertise_refs = 1; + continue; +@@ -814,7 +822,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) + const char *unpack_status = NULL; + + if (!delete_only(commands)) +- unpack_status = unpack(); ++ unpack_status = unpack(quiet); + execute_commands(commands, unpack_status); + if (pack_lockfile) + unlink_or_warn(pack_lockfile); +diff --git a/builtin/send-pack.c b/builtin/send-pack.c +index c1f6ddd..40a1675 100644 +--- a/builtin/send-pack.c ++++ b/builtin/send-pack.c +@@ -439,6 +439,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) + args.force_update = 1; + continue; + } ++ if (!strcmp(arg, "--quiet")) { ++ args.quiet = 1; ++ continue; ++ } + if (!strcmp(arg, "--verbose")) { + args.verbose = 1; + continue; +@@ -488,8 +492,13 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) + fd[0] = 0; + fd[1] = 1; + } else { +- conn = git_connect(fd, dest, receivepack, ++ struct strbuf sb = STRBUF_INIT; ++ strbuf_addstr(&sb, receivepack); ++ if (args.quiet) ++ strbuf_addstr(&sb, " --quiet"); ++ conn = git_connect(fd, dest, sb.buf, + args.verbose ? CONNECT_VERBOSE : 0); ++ strbuf_release(&sb); + } + + memset(&extra_have, 0, sizeof(extra_have)); +diff --git a/remote-curl.c b/remote-curl.c +index b5be25c..1da0ff4 100644 +--- a/remote-curl.c ++++ b/remote-curl.c +@@ -764,7 +764,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs) + argv[argc++] = "--thin"; + if (options.dry_run) + argv[argc++] = "--dry-run"; +- if (options.verbosity > 1) ++ if (options.verbosity < 0) ++ argv[argc++] = "--quiet"; ++ else if (options.verbosity > 1) + argv[argc++] = "--verbose"; + argv[argc++] = url; + for (i = 0; i < nr_spec; i++) +diff --git a/transport.c b/transport.c +index c9c8056..98c5778 100644 +--- a/transport.c ++++ b/transport.c +@@ -482,14 +482,18 @@ static int set_git_option(struct git_transport_options *opts, + static int connect_setup(struct transport *transport, int for_push, int verbose) + { + struct git_transport_data *data = transport->data; ++ struct strbuf sb = STRBUF_INIT; + + if (data->conn) + return 0; + +- data->conn = git_connect(data->fd, transport->url, +- for_push ? data->options.receivepack : +- data->options.uploadpack, ++ strbuf_addstr(&sb, for_push ? data->options.receivepack : ++ data->options.uploadpack); ++ if (for_push && transport->verbose < 0) ++ strbuf_addstr(&sb, " --quiet"); ++ data->conn = git_connect(data->fd, transport->url, sb.buf, + verbose ? CONNECT_VERBOSE : 0); ++ strbuf_release(&sb); + + return 0; + } +-- +1.7.6.rc1 + diff --git a/git.spec b/git.spec index 7eabe22..50a181d 100644 --- a/git.spec +++ b/git.spec @@ -69,7 +69,7 @@ Name: git Version: 1.7.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -87,6 +87,8 @@ Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch Patch2: git-1.6-update-contrib-hooks-path.patch # https://bugzilla.redhat.com/600411 Patch3: git-1.7-el5-emacs-support.patch +# https://bugzilla.redhat.com/725593 +Patch4: 0001-propagate-quiet-to-send-pack-receive-pack.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -288,6 +290,7 @@ Requires: emacs-git = %{version}-%{release} %if %{emacs_old} %patch3 -p1 %endif +%patch4 -p1 # Use these same options for every invocation of 'make'. # Otherwise it will rebuild in %%install due to flags changes. @@ -522,6 +525,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Fri Aug 05 2011 Todd Zullinger - 1.7.6-5 +- Fix git push --quiet, thanks to Clemens Buchacher (#725593) + * Tue Jul 26 2011 Todd Zullinger - 1.7.6-4 - Drop git-arch on fedora >= 16, the tla package has been retired - Rework most spec file dist conditionals to make future changes easier From 3f997b4b46f3f6e2a4e2e1a404aba0527060f8a9 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 5 Aug 2011 16:29:26 -0400 Subject: [PATCH 08/10] Obsolete git-arch as needed --- git.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git.spec b/git.spec index 50a181d..dfed7cd 100644 --- a/git.spec +++ b/git.spec @@ -114,6 +114,11 @@ Requires: zlib >= 1.2 Provides: git-core = %{version}-%{release} Obsoletes: git-core <= %{git_core_version} +# Obsolete git-arch as needed +%if ! %{arch_support} +Obsoletes: git-arch < %{version}-%{release} +%endif + %description Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations @@ -527,6 +532,7 @@ rm -rf %{buildroot} %changelog * Fri Aug 05 2011 Todd Zullinger - 1.7.6-5 - Fix git push --quiet, thanks to Clemens Buchacher (#725593) +- Obsolete git-arch as needed * Tue Jul 26 2011 Todd Zullinger - 1.7.6-4 - Drop git-arch on fedora >= 16, the tla package has been retired From e86aa5543f5ee5c72836b33d7b337c61e0edbfe2 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 26 Aug 2011 10:13:53 -0400 Subject: [PATCH 09/10] Update to 1.7.6.1 --- ...gate-quiet-to-send-pack-receive-pack.patch | 201 ------------------ git.spec | 10 +- sources | 2 +- 3 files changed, 6 insertions(+), 207 deletions(-) delete mode 100644 0001-propagate-quiet-to-send-pack-receive-pack.patch diff --git a/0001-propagate-quiet-to-send-pack-receive-pack.patch b/0001-propagate-quiet-to-send-pack-receive-pack.patch deleted file mode 100644 index 59f8879..0000000 --- a/0001-propagate-quiet-to-send-pack-receive-pack.patch +++ /dev/null @@ -1,201 +0,0 @@ -From c513fc653a2f88fd29e30ffcdd8aaf7741222cc7 Mon Sep 17 00:00:00 2001 -From: Clemens Buchacher -Date: Sat, 30 Jul 2011 10:35:24 -0400 -Subject: [PATCH] propagate --quiet to send-pack/receive-pack - -Currently, git push --quiet produces some non-error output, e.g.: - - $ git push --quiet - Unpacking objects: 100% (3/3), done. - -Add the --quiet option to send-pack/receive-pack and pass it to -unpack-objects in the receive-pack codepath and to receive-pack in -the push codepath. - -This fixes a bug reported for the fedora git package: - - https://bugzilla.redhat.com/show_bug.cgi?id=725593 - -Reported-by: Jesse Keating -Cc: Todd Zullinger -Signed-off-by: Clemens Buchacher ---- - Documentation/git-receive-pack.txt | 5 ++++- - Documentation/git-send-pack.txt | 5 ++++- - builtin/receive-pack.c | 12 ++++++++++-- - builtin/send-pack.c | 11 ++++++++++- - remote-curl.c | 4 +++- - transport.c | 10 +++++++--- - 6 files changed, 38 insertions(+), 9 deletions(-) - -diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt -index f34e0ae..23f9a48 100644 ---- a/Documentation/git-receive-pack.txt -+++ b/Documentation/git-receive-pack.txt -@@ -8,7 +8,7 @@ git-receive-pack - Receive what is pushed into the repository - - SYNOPSIS - -------- --'git-receive-pack' -+'git-receive-pack' [--quiet] - - DESCRIPTION - ----------- -@@ -34,6 +34,9 @@ are not fast-forwards. - - OPTIONS - ------- -+--quiet:: -+ Print only error messages. -+ - :: - The repository to sync into. - -diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt -index 17f8f55..67bcd0c 100644 ---- a/Documentation/git-send-pack.txt -+++ b/Documentation/git-send-pack.txt -@@ -8,7 +8,7 @@ git-send-pack - Push objects over git protocol to another repository - - SYNOPSIS - -------- --'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=] [--verbose] [--thin] [:] [...] -+'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=] [--quiet] [--verbose] [--thin] [:] [...] - - DESCRIPTION - ----------- -@@ -44,6 +44,9 @@ OPTIONS - the remote repository can lose commits; use it with - care. - -+--quiet:: -+ Print only error messages. -+ - --verbose:: - Run verbosely. - -diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c -index e1a687a..fca26fb 100644 ---- a/builtin/receive-pack.c -+++ b/builtin/receive-pack.c -@@ -636,7 +636,7 @@ static const char *parse_pack_header(struct pack_header *hdr) - - static const char *pack_lockfile; - --static const char *unpack(void) -+static const char *unpack(int quiet) - { - struct pack_header hdr; - const char *hdr_err; -@@ -653,6 +653,8 @@ static const char *unpack(void) - int code, i = 0; - const char *unpacker[4]; - unpacker[i++] = "unpack-objects"; -+ if (quiet) -+ unpacker[i++] = "-q"; - if (receive_fsck_objects) - unpacker[i++] = "--strict"; - unpacker[i++] = hdr_arg; -@@ -753,6 +755,7 @@ static void add_alternate_refs(void) - - int cmd_receive_pack(int argc, const char **argv, const char *prefix) - { -+ int quiet = 0; - int advertise_refs = 0; - int stateless_rpc = 0; - int i; -@@ -766,6 +769,11 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) - const char *arg = *argv++; - - if (*arg == '-') { -+ if (!strcmp(arg, "--quiet")) { -+ quiet = 1; -+ continue; -+ } -+ - if (!strcmp(arg, "--advertise-refs")) { - advertise_refs = 1; - continue; -@@ -814,7 +822,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) - const char *unpack_status = NULL; - - if (!delete_only(commands)) -- unpack_status = unpack(); -+ unpack_status = unpack(quiet); - execute_commands(commands, unpack_status); - if (pack_lockfile) - unlink_or_warn(pack_lockfile); -diff --git a/builtin/send-pack.c b/builtin/send-pack.c -index c1f6ddd..40a1675 100644 ---- a/builtin/send-pack.c -+++ b/builtin/send-pack.c -@@ -439,6 +439,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) - args.force_update = 1; - continue; - } -+ if (!strcmp(arg, "--quiet")) { -+ args.quiet = 1; -+ continue; -+ } - if (!strcmp(arg, "--verbose")) { - args.verbose = 1; - continue; -@@ -488,8 +492,13 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) - fd[0] = 0; - fd[1] = 1; - } else { -- conn = git_connect(fd, dest, receivepack, -+ struct strbuf sb = STRBUF_INIT; -+ strbuf_addstr(&sb, receivepack); -+ if (args.quiet) -+ strbuf_addstr(&sb, " --quiet"); -+ conn = git_connect(fd, dest, sb.buf, - args.verbose ? CONNECT_VERBOSE : 0); -+ strbuf_release(&sb); - } - - memset(&extra_have, 0, sizeof(extra_have)); -diff --git a/remote-curl.c b/remote-curl.c -index b5be25c..1da0ff4 100644 ---- a/remote-curl.c -+++ b/remote-curl.c -@@ -764,7 +764,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs) - argv[argc++] = "--thin"; - if (options.dry_run) - argv[argc++] = "--dry-run"; -- if (options.verbosity > 1) -+ if (options.verbosity < 0) -+ argv[argc++] = "--quiet"; -+ else if (options.verbosity > 1) - argv[argc++] = "--verbose"; - argv[argc++] = url; - for (i = 0; i < nr_spec; i++) -diff --git a/transport.c b/transport.c -index c9c8056..98c5778 100644 ---- a/transport.c -+++ b/transport.c -@@ -482,14 +482,18 @@ static int set_git_option(struct git_transport_options *opts, - static int connect_setup(struct transport *transport, int for_push, int verbose) - { - struct git_transport_data *data = transport->data; -+ struct strbuf sb = STRBUF_INIT; - - if (data->conn) - return 0; - -- data->conn = git_connect(data->fd, transport->url, -- for_push ? data->options.receivepack : -- data->options.uploadpack, -+ strbuf_addstr(&sb, for_push ? data->options.receivepack : -+ data->options.uploadpack); -+ if (for_push && transport->verbose < 0) -+ strbuf_addstr(&sb, " --quiet"); -+ data->conn = git_connect(data->fd, transport->url, sb.buf, - verbose ? CONNECT_VERBOSE : 0); -+ strbuf_release(&sb); - - return 0; - } --- -1.7.6.rc1 - diff --git a/git.spec b/git.spec index dfed7cd..7bd1a81 100644 --- a/git.spec +++ b/git.spec @@ -68,8 +68,8 @@ %endif Name: git -Version: 1.7.6 -Release: 5%{?dist} +Version: 1.7.6.1 +Release: 1%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -87,8 +87,6 @@ Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch Patch2: git-1.6-update-contrib-hooks-path.patch # https://bugzilla.redhat.com/600411 Patch3: git-1.7-el5-emacs-support.patch -# https://bugzilla.redhat.com/725593 -Patch4: 0001-propagate-quiet-to-send-pack-receive-pack.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -295,7 +293,6 @@ Requires: emacs-git = %{version}-%{release} %if %{emacs_old} %patch3 -p1 %endif -%patch4 -p1 # Use these same options for every invocation of 'make'. # Otherwise it will rebuild in %%install due to flags changes. @@ -530,6 +527,9 @@ rm -rf %{buildroot} # No files for you! %changelog +* Fri Aug 26 2011 Todd Zullinger - 1.7.6.1-1 +- Update to 1.7.6.1 + * Fri Aug 05 2011 Todd Zullinger - 1.7.6-5 - Fix git push --quiet, thanks to Clemens Buchacher (#725593) - Obsolete git-arch as needed diff --git a/sources b/sources index 9c931b7..488926d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e0a438eb71e89eedb61f89470ed32a0 git-1.7.6.tar.bz2 +d1e00772cc9dc6c571999feb9e8771ab git-1.7.6.1.tar.bz2 From ea3f2530c36f09e078442ae15b27d1590019d969 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 26 Aug 2011 10:14:43 -0400 Subject: [PATCH 10/10] Include gpg signature for tarball in SRPM --- git-1.7.6.1.tar.bz2.sign | 8 ++++++++ git.spec | 22 ++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 git-1.7.6.1.tar.bz2.sign diff --git a/git-1.7.6.1.tar.bz2.sign b/git-1.7.6.1.tar.bz2.sign new file mode 100644 index 0000000..b7ffb45 --- /dev/null +++ b/git-1.7.6.1.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBOVZCyyGugalF9Dw4RAmGsAKCS1gD8soK84X5rSX0/nlcdTde90wCdEG8e +P1MrSqSH3yuGkFzFieprZSA= +=/XaV +-----END PGP SIGNATURE----- diff --git a/git.spec b/git.spec index 7bd1a81..db94acd 100644 --- a/git.spec +++ b/git.spec @@ -75,11 +75,12 @@ License: GPLv2 Group: Development/Tools URL: http://git-scm.com/ Source0: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2 -Source1: git-init.el -Source2: git.xinetd.in -Source3: git.conf.httpd -Source4: git-gui.desktop -Source5: gitweb.conf.in +Source1: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2.sign +Source2: git-init.el +Source3: git.xinetd.in +Source4: git.conf.httpd +Source5: git-gui.desktop +Source6: gitweb.conf.in Patch0: git-1.5-gitweb-home-link.patch # https://bugzilla.redhat.com/490602 Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch @@ -361,14 +362,14 @@ for elc in %{buildroot}%{elispdir}/*.elc ; do install -pm 644 contrib/emacs/$(basename $elc .elc).el \ %{buildroot}%{elispdir} done -install -Dpm 644 %{SOURCE1} \ +install -Dpm 644 %{SOURCE2} \ %{buildroot}%{_emacs_sitestartdir}/git-init.el %endif mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d -install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf +install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf sed "s|@PROJECTROOT@|%{_var}/lib/git|g" \ - %{SOURCE5} > %{buildroot}%{_sysconfdir}/gitweb.conf + %{SOURCE6} > %{buildroot}%{_sysconfdir}/gitweb.conf find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';' @@ -397,7 +398,7 @@ perl -p \ %if %{enable_ipv6} -e "s|^}|$enable_ipv6\n$&|;" \ %endif - %{SOURCE2} > %{buildroot}%{_sysconfdir}/xinetd.d/git + %{SOURCE3} > %{buildroot}%{_sysconfdir}/xinetd.d/git mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d install -pm 644 contrib/completion/git-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/git @@ -415,7 +416,7 @@ desktop-file-install \ %if %{use_desktop_vendor} --vendor fedora \ %endif - --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} + --dir=%{buildroot}%{_datadir}/applications %{SOURCE5} # quiet some rpmlint complaints chmod -R g-w %{buildroot} @@ -529,6 +530,7 @@ rm -rf %{buildroot} %changelog * Fri Aug 26 2011 Todd Zullinger - 1.7.6.1-1 - Update to 1.7.6.1 +- Include gpg signature for tarball in SRPM * Fri Aug 05 2011 Todd Zullinger - 1.7.6-5 - Fix git push --quiet, thanks to Clemens Buchacher (#725593)