The package rpms/git.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/git.git/commit/?id=6eb92cebdc7414....
Change:
-%ifarch %{ix86}
Thanks.
Full change:
============
commit 6eb92cebdc74144c933b26b1e35d4eb16f6dca44
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Mon Apr 16 11:47:00 2018 -0400
Re-enable t5000-tar-tree.sh test on f28
The unknown, but temporary, breakage in fedora-28-x86_64 buildroots
appears to be resolved.
The test was disabled in a998227 ("Disable t5000-tar-tree.sh on x86 in
f28", 2018-01-18).
diff --git a/git.spec b/git.spec
index f4866dd..c8cc645 100644
--- a/git.spec
+++ b/git.spec
@@ -83,7 +83,7 @@
Name: git
Version: 2.17.0
-Release: 2%{?rcrev}%{?dist}
+Release: 3%{?rcrev}%{?dist}
Summary: Fast Version Control System
License: GPLv2
URL:
https://git-scm.com/
@@ -706,19 +706,6 @@ GIT_SKIP_TESTS=""
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.33 t5551.25"
%endif
-%ifarch %{ix86}
-# Skip tests which fail on x86
-#
-# t5000-tar-tree fails on x86 in f28:
-# ++ git archive --remote=. --format=tar.gz HEAD
-# remote: fatal: Unknown archive format 'tar.gz'
-# fatal: The remote end hung up unexpectedly
-# There must be something broken or changed in f28 to cause this
-%if 0%{?fedora} && 0%{?fedora} == 28
-GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5000"
-%endif
-%endif
-
%ifarch %{power64}
# Skip tests which fail on ppc
#
@@ -899,8 +886,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
-* Mon Apr 16 2018 Todd Zullinger <tmz(a)pobox.com>
+* Mon Apr 16 2018 Todd Zullinger <tmz(a)pobox.com> 2.17.0-3
- Move linkcheck macro to existing fedora/rhel > 7 block
+- Re-enable t5000-tar-tree.sh test on f28
* Fri Apr 13 2018 Pavel Cahyna <pcahyna(a)redhat.com>
- Use BuildRequires: perl-interpreter per the packaging guidelines
commit da74a8e523528fa538c3d925c51fd22f711e0561
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Mon Apr 16 11:18:51 2018 -0400
Move linkcheck macro to existing fedora/rhel > 7 block
The spec file is a bit easier to read with as few conditional blocks as
required. Use %bcond_(with|without) to allow easier toggling of the
link checking.
diff --git a/git.spec b/git.spec
index 498d683..f4866dd 100644
--- a/git.spec
+++ b/git.spec
@@ -20,10 +20,13 @@
# Settings for Fedora and EL > 7
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without python3
+# linkchcker is not available on EL <= 7
+%bcond_without linkcheck
%global use_perl_generators 1
%global use_perl_interpreter 1
%else
%bcond_with python3
+%bcond_with linkcheck
%global use_perl_generators 0
%global use_perl_interpreter 0
%endif
@@ -75,13 +78,6 @@
%global __global_ldflags -Wl,-z,relro -Wl,-z,now
%endif
-# Test links in HTML documentation on Fedora (linkchecker is not in EL <= 7)
-%if 0%{?fedora} || 0%{?rhel} > 7
-%global test_links 1
-%else
-%global test_links 0
-%endif
-
# Define for release candidates
#global rcrev .rc0
@@ -128,7 +124,7 @@ Patch3:
0001-daemon.c-fix-condition-for-redirecting-stderr.patch
%if %{with docs}
BuildRequires: asciidoc >= 8.4.1
BuildRequires: xmlto
-%if %{test_links}
+%if %{with linkcheck}
BuildRequires: linkchecker
%endif
%endif
@@ -692,7 +688,8 @@ find %{buildroot}%{_pkgdocdir}/{howto,technical} -type f \
##### #DOC
%check
-%if %{with docs} && %{test_links}
+%if %{with docs} && %{with linkcheck}
+# Test links in HTML documentation
find %{buildroot}%{_pkgdocdir} -name "*.html" -print0 | xargs -r0 linkchecker
%endif
@@ -902,6 +899,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
+* Mon Apr 16 2018 Todd Zullinger <tmz(a)pobox.com>
+- Move linkcheck macro to existing fedora/rhel > 7 block
+
* Fri Apr 13 2018 Pavel Cahyna <pcahyna(a)redhat.com>
- Use BuildRequires: perl-interpreter per the packaging guidelines
- Update conditions for future RHEL
commit 34c24408842e5b5dd7cd43926e45f8b2b31962ca
Author: Pavel Cahyna <pcahyna(a)redhat.com>
Date: Fri Apr 13 17:30:53 2018 +0200
Update conditions for future RHEL
diff --git a/git.spec b/git.spec
index 6e24092..498d683 100644
--- a/git.spec
+++ b/git.spec
@@ -75,8 +75,8 @@
%global __global_ldflags -Wl,-z,relro -Wl,-z,now
%endif
-# Test links in HTML documentation on Fedora (linkchecker is not in EL)
-%if 0%{?fedora}
+# Test links in HTML documentation on Fedora (linkchecker is not in EL <= 7)
+%if 0%{?fedora} || 0%{?rhel} > 7
%global test_links 1
%else
%global test_links 0
@@ -181,7 +181,7 @@ BuildRequires: cvs
BuildRequires: cvsps
%endif
BuildRequires: gnupg
-%if 0%{?fedora} || ( 0%{?rhel} && ( 0%{?rhel} == 6 || 0%{?rhel} == 7 &&
%{_arch} != ppc64 ))
+%if 0%{?fedora} || ( 0%{?rhel} && ( 0%{?rhel} == 6 || 0%{?rhel} >= 7
&& %{_arch} != ppc64 ))
BuildRequires: highlight
%endif
BuildRequires: httpd
@@ -904,6 +904,7 @@ make test || ./print-failed-test-output
%changelog
* Fri Apr 13 2018 Pavel Cahyna <pcahyna(a)redhat.com>
- Use BuildRequires: perl-interpreter per the packaging guidelines
+- Update conditions for future RHEL
* Tue Apr 10 2018 Todd Zullinger <tmz(a)pobox.com> - 2.17.0-2
- Require perl-generators on EL > 7
commit 1a82d92cd438a697f781ab13b988ed29a9708610
Author: Pavel Cahyna <pcahyna(a)redhat.com>
Date: Fri Apr 13 17:24:20 2018 +0200
Conform to the Packaging Guidelines for Perl
Add BuildRequires: perl-interpreter (or perl on systems that do not
provide perl-interpreter) since perl is invoked during the build
process.
(
https://fedoraproject.org/wiki/Packaging:Perl#Build_Dependencies,
https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules)
Probably no functional change, since perl is being brought in via other
deps.
diff --git a/git.spec b/git.spec
index 9477fc1..6e24092 100644
--- a/git.spec
+++ b/git.spec
@@ -21,9 +21,11 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without python3
%global use_perl_generators 1
+%global use_perl_interpreter 1
%else
%bcond_with python3
%global use_perl_generators 0
+%global use_perl_interpreter 0
%endif
# Settings for Fedora and EL >= 7
@@ -150,6 +152,11 @@ BuildRequires: perl(Test)
%if %{use_perl_generators}
BuildRequires: perl-generators
%endif
+%if %{use_perl_interpreter}
+BuildRequires: perl-interpreter
+%else
+BuildRequires: perl
+%endif
%if %{bashcomp_pkgconfig}
BuildRequires: pkgconfig(bash-completion)
%endif
@@ -895,6 +902,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
+* Fri Apr 13 2018 Pavel Cahyna <pcahyna(a)redhat.com>
+- Use BuildRequires: perl-interpreter per the packaging guidelines
+
* Tue Apr 10 2018 Todd Zullinger <tmz(a)pobox.com> - 2.17.0-2
- Require perl-generators on EL > 7
commit eeb72615738d12e3e00f464f82628676a2c7b979
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Tue Apr 10 10:08:55 2018 -0400
Require perl-generators on EL > 7
Add a %{use_perl_generators} macro to control this requirement.
diff --git a/git.spec b/git.spec
index c3e46bc..9477fc1 100644
--- a/git.spec
+++ b/git.spec
@@ -20,8 +20,10 @@
# Settings for Fedora and EL > 7
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without python3
+%global use_perl_generators 1
%else
%bcond_with python3
+%global use_perl_generators 0
%endif
# Settings for Fedora and EL >= 7
@@ -83,7 +85,7 @@
Name: git
Version: 2.17.0
-Release: 1%{?rcrev}%{?dist}
+Release: 2%{?rcrev}%{?dist}
Summary: Fast Version Control System
License: GPLv2
URL:
https://git-scm.com/
@@ -145,7 +147,7 @@ BuildRequires: openssl-devel
BuildRequires: pcre2-devel
BuildRequires: perl(Error)
BuildRequires: perl(Test)
-%if 0%{?fedora}
+%if %{use_perl_generators}
BuildRequires: perl-generators
%endif
%if %{bashcomp_pkgconfig}
@@ -893,6 +895,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
+* Tue Apr 10 2018 Todd Zullinger <tmz(a)pobox.com> - 2.17.0-2
+- Require perl-generators on EL > 7
+
* Mon Apr 09 2018 Todd Zullinger <tmz(a)pobox.com>
- daemon: use --log-destination=stderr with systemd
- daemon: fix condition for redirecting stderr
commit c1f934e01666370aa9f396dd9b11b983afab12a6
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Tue Apr 3 23:35:46 2018 -0400
daemon: use --log-destination=stderr with systemd
Using stderr rather than syslog should be a mild improvement with the
systemd journal. The reasons are detailed in the upstream commit
0c591cacba ("daemon: add --log-destination=(stderr|syslog|none)",
2018-02-04)¹:
The combination of --inetd with --log-destination=stderr is useful, for
instance, when running `git daemon` as an instanced systemd service
(with associated socket unit). In this case, log messages sent via
syslog are received by the journal daemon, but run the risk of being
processed at a time when the `git daemon` process has already exited
(especially if the process was very short-lived, e.g. due to client
error), so that the journal daemon can no longer read its cgroup and
attach the message to the correct systemd unit (see systemd/systemd#2913
[1]). Logging to stderr instead can solve this problem, because systemd
can connect stderr directly to the journal daemon, which then already
knows which unit is associated with this stream.
[1]:
https://github.com/systemd/systemd/issues/2913
While here, wrap the git-daemon command line to improve readability.
¹
https://github.com/git/git/commit/0c591cacba
diff --git a/git.spec b/git.spec
index 9f88574..c3e46bc 100644
--- a/git.spec
+++ b/git.spec
@@ -894,6 +894,7 @@ make test || ./print-failed-test-output
%changelog
* Mon Apr 09 2018 Todd Zullinger <tmz(a)pobox.com>
+- daemon: use --log-destination=stderr with systemd
- daemon: fix condition for redirecting stderr
- git-svn: avoid uninitialized value warning
diff --git a/git@.service.in b/git@.service.in
index bb93b78..7abcfeb 100644
--- a/git@.service.in
+++ b/git@.service.in
@@ -4,5 +4,7 @@ Documentation=man:git-daemon(1)
[Service]
User=nobody
-ExecStart=-@GITEXECDIR@/git-daemon --base-path=@BASE_PATH@ --export-all
--user-path=public_git --syslog --inetd --verbose
+ExecStart=-@GITEXECDIR@/git-daemon --base-path=@BASE_PATH@ --export-all \
+ --user-path=public_git --inetd --log-destination=stderr --verbose
StandardInput=socket
+StandardError=journal
commit f25fef61e0e0f3c11f5139a859c6c7682d06b8ab
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Mon Apr 9 22:04:17 2018 -0400
daemon: fix condition for redirecting stderr
We don't currently use the --log-destination option in the git-daemon
systemd service or xinetd files. With this patch in place, we can.
diff --git a/0001-daemon.c-fix-condition-for-redirecting-stderr.patch
b/0001-daemon.c-fix-condition-for-redirecting-stderr.patch
new file mode 100644
index 0000000..7afee92
--- /dev/null
+++ b/0001-daemon.c-fix-condition-for-redirecting-stderr.patch
@@ -0,0 +1,30 @@
+From e67d906d735166f2068f1e4cc393220483a97f30 Mon Sep 17 00:00:00 2001
+From: Lucas Werkmeister <mail(a)lucaswerkmeister.de>
+Date: Wed, 4 Apr 2018 00:13:07 +0200
+Subject: [PATCH] daemon.c: fix condition for redirecting stderr
+
+Since the --log-destination option was added in 0c591cacb ("daemon: add
+--log-destination=(stderr|syslog|none)", 2018-02-04) with the explicit
+goal of allowing logging to stderr when running in inetd mode, we should
+not always redirect stderr to /dev/null in inetd mode, but rather only
+when stderr is not being used for logging.
+
+Signed-off-by: Lucas Werkmeister <mail(a)lucaswerkmeister.de>
+Signed-off-by: Junio C Hamano <gitster(a)pobox.com>
+---
+ daemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/daemon.c b/daemon.c
+index fb538e3678997..7857169055385 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -1462,7 +1462,7 @@ int cmd_main(int argc, const char **argv)
+ die("base-path '%s' does not exist or is not a directory",
+ base_path);
+
+- if (inetd_mode) {
++ if (log_destination != LOG_DESTINATION_STDERR) {
+ if (!freopen("/dev/null", "w", stderr))
+ die_errno("failed to redirect stderr to /dev/null");
+ }
diff --git a/git.spec b/git.spec
index 1902e10..9f88574 100644
--- a/git.spec
+++ b/git.spec
@@ -118,6 +118,8 @@ Patch0: git-1.8-gitweb-home-link.patch
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
#
https://github.com/gitster/git/commit/51db271.patch
Patch2: 0001-git-svn-avoid-warning-on-undef-readline.patch
+#
https://github.com/gitster/git/commit/e67d906.patch
+Patch3: 0001-daemon.c-fix-condition-for-redirecting-stderr.patch
%if %{with docs}
BuildRequires: asciidoc >= 8.4.1
@@ -892,6 +894,7 @@ make test || ./print-failed-test-output
%changelog
* Mon Apr 09 2018 Todd Zullinger <tmz(a)pobox.com>
+- daemon: fix condition for redirecting stderr
- git-svn: avoid uninitialized value warning
* Sun Apr 08 2018 Todd Zullinger <tmz(a)pobox.com>
commit e72bed93ca31108c148cae01180756581050da44
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Mon Apr 9 22:00:06 2018 -0400
git-svn: avoid uninitialized value warning
This issue has been present since 2.11.0, but only became visible with
the addition of the 'use warnings' pragma in 2.17.0.
diff --git a/0001-git-svn-avoid-warning-on-undef-readline.patch
b/0001-git-svn-avoid-warning-on-undef-readline.patch
new file mode 100644
index 0000000..a274887
--- /dev/null
+++ b/0001-git-svn-avoid-warning-on-undef-readline.patch
@@ -0,0 +1,49 @@
+From 51db2715876580acdb28b17079c9f6cb784da849 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?=
+ <avarab(a)gmail.com>
+Date: Fri, 6 Apr 2018 13:15:14 +0000
+Subject: [PATCH] git-svn: avoid warning on undef readline()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change code in Git.pm that sometimes calls chomp() on undef to only do
+so the value is defined.
+
+This code has been chomping undef values ever since it was added in
+b26098fc2f ("git-svn: reduce scope of input record separator change",
+2016-10-14), but started warning due to the introduction of "use
+warnings" to Git.pm in my f0e19cb7ce ("Git.pm: add the "use
warnings"
+pragma", 2018-02-25) released with 2.17.0.
+
+Since this function will return undef in those cases it's still
+possible that the code using it will warn if it does a chomp of its
+own, as the code added in b26098fc2f ("git-svn: reduce scope of input
+record separator change", 2016-10-14) might do, but since git-svn has
+"use warnings" already that's clearly not a codepath that's going to
+warn.
+
+See
https://public-inbox.org/git/86h8oobl36.fsf@phe.ftfl.ca/ for the
+original report.
+
+Reported-by: Joseph Mingrone <jrm(a)ftfl.ca>
+Signed-off-by: Ævar Arnfjörð Bjarmason <avarab(a)gmail.com>
+Improved-by: Eric Wong <e(a)80x24.org>
+Signed-off-by: Junio C Hamano <gitster(a)pobox.com>
+---
+ perl/Git.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/perl/Git.pm b/perl/Git.pm
+index d2c5a8d238b87..d453e4b83b827 100644
+--- a/perl/Git.pm
++++ b/perl/Git.pm
+@@ -549,7 +549,7 @@ sub get_record {
+ my ($fh, $rs) = @_;
+ local $/ = $rs;
+ my $rec = <$fh>;
+- chomp $rec if defined $rs;
++ chomp $rec if defined $rec;
+ $rec;
+ }
+
diff --git a/git.spec b/git.spec
index 38786bc..1902e10 100644
--- a/git.spec
+++ b/git.spec
@@ -116,6 +116,8 @@ Source99: print-failed-test-output
Patch0: git-1.8-gitweb-home-link.patch
#
https://bugzilla.redhat.com/490602
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
+#
https://github.com/gitster/git/commit/51db271.patch
+Patch2: 0001-git-svn-avoid-warning-on-undef-readline.patch
%if %{with docs}
BuildRequires: asciidoc >= 8.4.1
@@ -889,6 +891,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
+* Mon Apr 09 2018 Todd Zullinger <tmz(a)pobox.com>
+- git-svn: avoid uninitialized value warning
+
* Sun Apr 08 2018 Todd Zullinger <tmz(a)pobox.com>
- Clean up redundant and unneeded Requires
commit 5eb603d7e00b2b664ac50d46a3fd6cabc3c887e2
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Sun Apr 8 18:02:12 2018 -0400
Clean up redundant and unneeded Requires
Move all Requires to their own lines for better readability.
We can safely drop the 'perl(Git)' requires from the cvs and email
packages because the perl rpm dependency generator already add it.
We can also drop 'perl-Git = %{version}-%{release}' from the email
package because it requires 'git = %{version}-%{release}' which in turn
requires the matching 'perl-Git' package.
diff --git a/git.spec b/git.spec
index 3e638c9..38786bc 100644
--- a/git.spec
+++ b/git.spec
@@ -277,10 +277,10 @@ Documentation files for git-core package including man pages.
%package cvs
Summary: Git tools for importing CVS repositories
BuildArch: noarch
-Requires: git = %{version}-%{release}, cvs
+Requires: git = %{version}-%{release}
+Requires: cvs
Requires: cvsps
Requires: perl(DBD::SQLite)
-Requires: perl(Git)
%description cvs
%{summary}.
%endif
@@ -302,10 +302,9 @@ The git daemon for supporting git:// access to git repositories
%package email
Summary: Git tools for sending patches via email
BuildArch: noarch
-Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release}
+Requires: git = %{version}-%{release}
Requires: perl(Authen::SASL)
Requires: perl(Net::SMTP::SSL)
-Requires: perl(Git)
%description email
%{summary}.
@@ -329,7 +328,8 @@ Requires: emacs-git = %{version}-%{release}
%package -n gitk
Summary: Git repository browser
BuildArch: noarch
-Requires: git = %{version}-%{release}, tk >= 8.4
+Requires: git = %{version}-%{release}
+Requires: tk >= 8.4
%description -n gitk
%{summary}.
@@ -343,8 +343,8 @@ Requires: git = %{version}-%{release}
%package gui
Summary: Graphical interface to Git
BuildArch: noarch
-Requires: git = %{version}-%{release}, tk >= 8.4
Requires: gitk = %{version}-%{release}
+Requires: tk >= 8.4
%description gui
%{summary}.
@@ -384,11 +384,12 @@ history.
%package svn
Summary: Git tools for interacting with Subversion repositories
-Requires: git = %{version}-%{release}, subversion
+Requires: git = %{version}-%{release}
Requires: perl(Digest::MD5)
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
+Requires: subversion
%description svn
%{summary}.
@@ -888,6 +889,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
+* Sun Apr 08 2018 Todd Zullinger <tmz(a)pobox.com>
+- Clean up redundant and unneeded Requires
+
* Sat Apr 07 2018 Todd Zullinger <tmz(a)pobox.com>
- Remove Git::LoadCPAN to ensure we use only system perl modules
commit b5fac2ab8dc1bd2bfec26d556108a9dcda106f14
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Sat Apr 7 19:21:23 2018 -0400
Remove Git::LoadCPAN to ensure we use only system perl modules
Git tries very hard to rely on as few non-core modules as possible. The
few that it does (currently Error and Mail::Address) are bundled. We've
disabled such bundling since it became an option in 2.17.0.
Go a step further and remove the Git::LoadCPAN wrapper. This allows
rpm's automatic dependency generator to find and add the needed
requirements.
With this change we can remove the manual 'Requires:' for perl(Error)
and perl(Mail::Address).
'Requires: perl(Error)' in the main git package has been unneeded for
many years. It was added in edddb83 ("Update to latest upstream
release. Fix some bugs at the same time", 2007-11-27), which was
git-1.5.3.6. It was needed for 'git svn' and 'git remote'. 'git
svn'
requires perl(Git), which in turn requires perl(Error).
In git-1.5.5, 'git remote' was converted to a builtin command in C
rather than perl, removing the perl(Error) dependency.
Lastly, move the 'BuildRequires: perl(Error)' from perl-Git to the main
list of BuildRequires.
diff --git a/git.spec b/git.spec
index 8311ca2..3e638c9 100644
--- a/git.spec
+++ b/git.spec
@@ -139,6 +139,7 @@ BuildRequires: libsecret-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pcre2-devel
+BuildRequires: perl(Error)
BuildRequires: perl(Test)
%if 0%{?fedora}
BuildRequires: perl-generators
@@ -200,7 +201,6 @@ BuildRequires: time
Requires: git-core = %{version}-%{release}
Requires: git-core-doc = %{version}-%{release}
-Requires: perl(Error)
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
@@ -304,7 +304,6 @@ Summary: Git tools for sending patches via email
BuildArch: noarch
Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release}
Requires: perl(Authen::SASL)
-Requires: perl(Mail::Address)
Requires: perl(Net::SMTP::SSL)
Requires: perl(Git)
%description email
@@ -362,9 +361,7 @@ Requires: git = %{version}-%{release}
%package -n perl-Git
Summary: Perl interface to Git
BuildArch: noarch
-BuildRequires: perl(Error)
Requires: git = %{version}-%{release}
-Requires: perl(Error)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
%description -n perl-Git
%{summary}.
@@ -480,6 +477,11 @@ EOF
chmod +x %{__perl_requires}
%endif
+# Remove Git::LoadCPAN to ensure we use only system perl modules. This also
+# allows the dependencies to be automatically processed by rpm.
+rm -rf perl/Git/LoadCPAN{.pm,/}
+grep -rlZ '^use Git::LoadCPAN::' | xargs -r0 sed -i
's/Git::LoadCPAN:://g'
+
%build
make %{?_smp_mflags} all %{?with_docs:doc}
@@ -886,6 +888,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
+* Sat Apr 07 2018 Todd Zullinger <tmz(a)pobox.com>
+- Remove Git::LoadCPAN to ensure we use only system perl modules
+
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com>
- Allow git-p4 subpackage to be toggled via --with/--without
- Use %%bcond_(with|without) to enable/disable python3
commit b3c76729a349ae2f39c60cb11a183ddb86f7c885
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Fri Apr 6 15:03:24 2018 -0400
Tighten file exclusion pattern
The bare p4 entry was a bit concerning; it's easy to imagine false
positives from such a short string. Remove git-remote-(bzr|hg) from the
pattern. The scripts and placeholders were removed in git-2.0.0.
While here, group all the git-* patterns and be more explicit with the
svn files.
diff --git a/git.spec b/git.spec
index 9c0aa7c..8311ca2 100644
--- a/git.spec
+++ b/git.spec
@@ -569,7 +569,7 @@ find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name
'git-cvs*' -exec rm -f
find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name '*p4*' -exec rm -f {}
';'
%endif
-exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|git-subtree|gitk|p4|svn"
+exclude_re="archimport|email|git-(citool|cvs|daemon|gui|p4|subtree|(remote-test)?svn)|gitk|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
@@ -879,10 +879,11 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/git-subtree.html}
%files svn
-%{gitexecdir}/*svn*
-%{_pkgdocdir}/*svn*.txt
-%{?with_docs:%{_mandir}/man1/*svn*.1*}
-%{?with_docs:%{_pkgdocdir}/*svn*.html}
+%{gitexecdir}/git-remote-testsvn
+%{gitexecdir}/git-svn
+%{_pkgdocdir}/git-svn.txt
+%{?with_docs:%{_mandir}/man1/git-svn.1*}
+%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com>
commit a4b4f7caded5d834a3d4dcfafc70ed3c2b4fc6b4
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Wed Mar 28 21:36:31 2018 -0400
Add support for disabling python2
Python 2 end of life is approaching, prepare for dropping it
along with all python2 scripts and subpackages requiring it.
Helped-by: Sebastian Kisela <skisela(a)redhat.com>
Helped-by: Pavel Cahyna <pcahyna(a)redhat.com>
diff --git a/git.spec b/git.spec
index a48ed73..9c0aa7c 100644
--- a/git.spec
+++ b/git.spec
@@ -3,6 +3,13 @@
%global gitexecdir %{_libexecdir}/git-core
+# Settings for Fedora > 29 and EL > 7
+%if 0%{?fedora} > 29 || 0%{?rhel} > 7
+%bcond_with python2
+%else
+%bcond_without python2
+%endif
+
# Settings for Fedora >= 29 and EL > 7
%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
%global gitweb_httpd_conf gitweb.conf
@@ -46,7 +53,12 @@
%endif
# Allow p4 subpackage to be toggled via --with/--without
+# Disable by default if we lack python2 support
+%if ! %{with python2}
+%bcond_with p4
+%else
%bcond_without p4
+%endif
# Hardening flags for EL-7
%if 0%{?rhel} == 7
@@ -176,7 +188,9 @@ BuildRequires: perl(Mail::Address)
BuildRequires: perl(Memoize)
BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
+%if %{with python2}
BuildRequires: python2-devel
+%endif
%if %{with python3}
BuildRequires: python3-devel
%endif
@@ -431,7 +445,11 @@ GNU_ROFF = 1
NO_CROSS_DIRECTORY_HARDLINKS = 1
NO_INSTALL_HARDLINKS = 1
NO_PERL_CPAN_FALLBACKS = 1
+%if %{with python2}
PYTHON_PATH = %{__python2}
+%else
+NO_PYTHON = 1
+%endif
htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
prefix = %{_prefix}
perllibdir = %{perl_vendorlib}
@@ -480,15 +498,17 @@ make -C contrib/subtree/
#
# The multimail hook is installed with git. Use python3 to avoid an
# unnecessary python2 dependency.
-sed -i -e '1s|#! */usr/bin/env python$|#!%{__python2}|' \
+%if %{with python2}
+sed -i -e '1s@#! */usr/bin/env python$@#!%{__python2}@' \
contrib/fast-import/import-zips.py \
contrib/hg-to-git/hg-to-git.py \
contrib/hooks/multimail/git_multimail.py \
contrib/hooks/multimail/migrate-mailhook-config \
contrib/hooks/multimail/post-receive.example \
contrib/svn-fe/svnrdump_sim.py
+%endif
%if %{with python3}
-sed -i -e '1s|#!%{__python2}$|#!%{__python3}|' \
+sed -i -e '1s@#!\( */usr/bin/env python\|%{__python2}\)$@#!%{__python3}@' \
contrib/hooks/multimail/git_multimail.py \
contrib/hooks/multimail/migrate-mailhook-config \
contrib/hooks/multimail/post-receive.example
@@ -868,6 +888,7 @@ make test || ./print-failed-test-output
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com>
- Allow git-p4 subpackage to be toggled via --with/--without
- Use %%bcond_(with|without) to enable/disable python3
+- Add support for disabling python2
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com> - 2.17.0-1
- Update to 2.17.0
commit 07e03fdaa0f0c5ab1f8b31c5c3cfb6e46df2ff22
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Mon Apr 2 17:41:16 2018 -0400
Use %bcond_(with|without) to enable/disable python3
The with_python3 macro was added in 7ac1fbc ("Avoid python dependency in
git-core (#1536471)", 2018-01-22) and followed the example from a devel
list request¹.
The %bcond_(with|without) macro allows enabling or disabling of python3
via the command line, modulemd file, etc. Use it.
¹
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.o...
diff --git a/git.spec b/git.spec
index 70faa18..a48ed73 100644
--- a/git.spec
+++ b/git.spec
@@ -12,9 +12,9 @@
# Settings for Fedora and EL > 7
%if 0%{?fedora} || 0%{?rhel} > 7
-%global with_python3 1
+%bcond_without python3
%else
-%global with_python3 0
+%bcond_with python3
%endif
# Settings for Fedora and EL >= 7
@@ -177,7 +177,7 @@ BuildRequires: perl(Memoize)
BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
BuildRequires: python2-devel
-%if 0%{?with_python3}
+%if %{with python3}
BuildRequires: python3-devel
%endif
BuildRequires: subversion
@@ -487,7 +487,7 @@ sed -i -e '1s|#! */usr/bin/env python$|#!%{__python2}|' \
contrib/hooks/multimail/migrate-mailhook-config \
contrib/hooks/multimail/post-receive.example \
contrib/svn-fe/svnrdump_sim.py
-%if 0%{?with_python3}
+%if %{with python3}
sed -i -e '1s|#!%{__python2}$|#!%{__python3}|' \
contrib/hooks/multimail/git_multimail.py \
contrib/hooks/multimail/migrate-mailhook-config \
@@ -867,6 +867,7 @@ make test || ./print-failed-test-output
%changelog
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com>
- Allow git-p4 subpackage to be toggled via --with/--without
+- Use %%bcond_(with|without) to enable/disable python3
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com> - 2.17.0-1
- Update to 2.17.0
commit 73282c0771ee8a5107874b51ba23795d58447cdb
Author: Todd Zullinger <tmz(a)pobox.com>
Date: Wed Mar 28 21:33:18 2018 -0400
Allow git-p4 subpackage to be toggled via --with/--without
Currently, git-p4 requires python2, which is approaching its end of
life. Prepare for building on releases without python2.
diff --git a/git.spec b/git.spec
index ee60d3e..70faa18 100644
--- a/git.spec
+++ b/git.spec
@@ -45,6 +45,9 @@
%bcond_without cvs
%endif
+# Allow p4 subpackage to be toggled via --with/--without
+%bcond_without p4
+
# Hardening flags for EL-7
%if 0%{?rhel} == 7
%global _hardened_build 1
@@ -214,7 +217,9 @@ Requires: git-cvs = %{version}-%{release}
%endif
Requires: git-email = %{version}-%{release}
Requires: git-gui = %{version}-%{release}
+%if %{with p4}
Requires: git-p4 = %{version}-%{release}
+%endif
Requires: git-subtree = %{version}-%{release}
Requires: git-svn = %{version}-%{release}
Requires: gitk = %{version}-%{release}
@@ -330,6 +335,7 @@ Requires: gitk = %{version}-%{release}
%description gui
%{summary}.
+%if %{with p4}
%package p4
Summary: Git tools for working with Perforce depots
BuildArch: noarch
@@ -337,6 +343,7 @@ BuildRequires: python2-devel
Requires: git = %{version}-%{release}
%description p4
%{summary}.
+%endif
%package -n perl-Git
Summary: Perl interface to Git
@@ -403,6 +410,11 @@ sed -i '/^git-archimport/d' command-list.txt
sed -i '/^git-cvs/d' command-list.txt
%endif
+%if ! %{with p4}
+# Remove git-p4 from command list
+sed -i '/^git-p4/d' command-list.txt
+%endif
+
# Use these same options for every invocation of 'make'.
# Otherwise it will rebuild in %%install due to flags changes.
cat << \EOF > config.mak
@@ -532,6 +544,11 @@ find %{buildroot} Documentation -type f -name
'git-archimport*' -exec rm -f {} '
find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name 'git-cvs*' -exec rm -f
{} ';'
%endif
+%if ! %{with p4}
+# Remove *p4* from %%{_bindir} and %%{gitexecdir}
+find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -name '*p4*' -exec rm -f {}
';'
+%endif
+
exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|git-subtree|gitk|p4|svn"
(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
@@ -750,6 +767,10 @@ make test || ./print-failed-test-output
%{?with_docs:%{_mandir}/man1/*cvs*.1*}
%{?with_docs:%{_pkgdocdir}/git-cvs*}
%endif
+%if ! %{with p4}
+%{?with_docs:%{_mandir}/man1/*p4*.1*}
+%{?with_docs:%{_pkgdocdir}/*p4*}
+%endif
%if %{with cvs}
%files cvs
@@ -817,12 +838,14 @@ make test || ./print-failed-test-output
%{?with_docs:%{_mandir}/man1/git-citool.1*}
%{?with_docs:%{_pkgdocdir}/git-citool.html}
+%if %{with p4}
%files p4
%{gitexecdir}/*p4*
%{gitexecdir}/mergetools/p4merge
%{_pkgdocdir}/*p4*.txt
%{?with_docs:%{_mandir}/man1/*p4*.1*}
%{?with_docs:%{_pkgdocdir}/*p4*.html}
+%endif
%files -n perl-Git -f perl-git-files
%{?with_docs:%{_mandir}/man3/Git.3pm*}
@@ -842,6 +865,9 @@ make test || ./print-failed-test-output
%{?with_docs:%{_pkgdocdir}/*svn*.html}
%changelog
+* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com>
+- Allow git-p4 subpackage to be toggled via --with/--without
+
* Mon Apr 02 2018 Todd Zullinger <tmz(a)pobox.com> - 2.17.0-1
- Update to 2.17.0