Replace gitweb home-link with inline sed

One less patch to manage.
This commit is contained in:
Todd Zullinger 2019-02-01 01:38:15 -05:00
parent fece8d786b
commit bb15dc829e
2 changed files with 6 additions and 14 deletions

View File

@ -1,12 +0,0 @@
diff -up git-1.8.4.2/gitweb/gitweb.perl.orig git-1.8.4.2/gitweb/gitweb.perl
--- git-1.8.4.2/gitweb/gitweb.perl.orig 2013-10-28 14:17:38.000000000 -0400
+++ git-1.8.4.2/gitweb/gitweb.perl 2013-10-29 16:49:07.302747507 -0400
@@ -83,7 +83,7 @@ our $projectroot = "++GITWEB_PROJECTROOT
our $project_maxdepth = "++GITWEB_PROJECT_MAXDEPTH++";
# string of the home link on top of all pages
-our $home_link_str = "++GITWEB_HOME_LINK_STR++";
+our $home_link_str = $ENV{'SERVER_NAME'} ? "git://" . $ENV{'SERVER_NAME'} : "projects";
# extra breadcrumbs preceding the home link
our @extra_breadcrumbs = ();

View File

@ -117,9 +117,8 @@ Source16: git.socket
# Script to print test failure output (used in %%check)
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
Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
%if %{with docs}
# pod2man is needed to build Git.3pm
@ -516,6 +515,10 @@ chmod +x %{__perl_requires}
rm -rf perl/Git/LoadCPAN{.pm,/}
grep -rlZ '^use Git::LoadCPAN::' | xargs -r0 sed -i 's/Git::LoadCPAN:://g'
# Update gitweb default home link string
sed -i 's@"++GITWEB_HOME_LINK_STR++"@$ENV{"SERVER_NAME"} ? "git://" . $ENV{"SERVER_NAME"} : "projects"@' \
gitweb/gitweb.perl
%build
%make_build all %{?with_docs:doc}
@ -921,6 +924,7 @@ make -C contrib/credential/netrc/ testverbose
* Thu Jan 31 2019 Todd Zullinger <tmz@pobox.com> - 2.20.1-2
- Remove extraneous pcre BuildRequires
- Add additional BuildRequires for i18n locales used in tests
- Replace gitweb home-link with inline sed
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.1-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild