From bb15dc829e558481ade692b9387dd64bdea749b7 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 1 Feb 2019 01:38:15 -0500 Subject: [PATCH] Replace gitweb home-link with inline sed One less patch to manage. --- git-1.8-gitweb-home-link.patch | 12 ------------ git.spec | 8 ++++++-- 2 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 git-1.8-gitweb-home-link.patch diff --git a/git-1.8-gitweb-home-link.patch b/git-1.8-gitweb-home-link.patch deleted file mode 100644 index aeb29e0..0000000 --- a/git-1.8-gitweb-home-link.patch +++ /dev/null @@ -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 = (); diff --git a/git.spec b/git.spec index e5cbdf0..7e9395f 100644 --- a/git.spec +++ b/git.spec @@ -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 - 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 - 2.20.1-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild