diff --git a/.git.metadata b/.git.metadata index 2be2068..58e8ca4 100644 --- a/.git.metadata +++ b/.git.metadata @@ -1,3 +1 @@ 32562a231fe4422bc033bf872fffa61f41ee2669 SOURCES/git-1.8.3.1.tar.gz -94d48f6f8684aec851124e7d0b835b338a9187ad SOURCES/git-htmldocs-1.8.3.1.tar.gz -0cd759579d4bd75f1cf1ba073b1ab96c49390426 SOURCES/git-manpages-1.8.3.1.tar.gz diff --git a/.gitignore b/.gitignore index 1806bab..77f807d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ SOURCES/git-1.8.3.1.tar.gz -SOURCES/git-htmldocs-1.8.3.1.tar.gz -SOURCES/git-manpages-1.8.3.1.tar.gz diff --git a/SOURCES/0001-Switch-git-instaweb-default-to-apache.patch b/SOURCES/0001-Switch-git-instaweb-default-to-apache.patch new file mode 100644 index 0000000..85717e5 --- /dev/null +++ b/SOURCES/0001-Switch-git-instaweb-default-to-apache.patch @@ -0,0 +1,76 @@ +From fa378a40d41cbffed64b8b85394cb76c6303ef64 Mon Sep 17 00:00:00 2001 +From: Sebastian Kisela +Date: Tue, 26 Jun 2018 23:39:37 +0200 +Subject: [PATCH] Switch git instaweb default to apache + +On Fedora-derived systems, the apache httpd package installs modules +under /usr/lib{,64}/httpd/modules, depending on whether the system is +32- or 64-bit. A symlink from /etc/httpd/modules is created which +points to the proper module path. Use it to support apache on Fedora, +CentOS, and Red Hat systems. + +References upstream commit: 1976311aa285549599e5a451d7ad72b55a2b60e2 +--- + git-instaweb.sh | 32 +++++++++++++++++++++++--------- + 1 file changed, 23 insertions(+), 9 deletions(-) + +diff --git a/git-instaweb.sh b/git-instaweb.sh +index 01a1b05..06380b6 100755 +--- a/git-instaweb.sh ++++ b/git-instaweb.sh +@@ -34,7 +34,7 @@ conf="$GIT_DIR/gitweb/httpd.conf" + # Defaults: + + # if installed, it doesn't need further configuration (module_path) +-test -z "$httpd" && httpd='lighttpd -f' ++test -z "$httpd" && httpd='httpd -f' + + # Default is @@GITWEBDIR@@ + test -z "$root" && root='@@GITWEBDIR@@' +@@ -324,13 +324,17 @@ EOF + } + + apache2_conf () { +- if test -z "$module_path" +- then +- test -d "/usr/lib/httpd/modules" && +- module_path="/usr/lib/httpd/modules" +- test -d "/usr/lib/apache2/modules" && +- module_path="/usr/lib/apache2/modules" +- fi ++ for candidate in \ ++ /etc/httpd \ ++ /usr/lib/apache2 \ ++ /usr/lib/httpd ; ++ do ++ if test -d "$candidate/modules" ++ then ++ module_path="$candidate/modules" ++ break ++ fi ++ done + bind= + test x"$local" = xtrue && bind='127.0.0.1:' + echo 'text/css css' > "$fqgitdir/mime.types" +@@ -344,7 +348,17 @@ PidFile "$fqgitdir/pid" + Listen $bind$port + EOF + +- for mod in mime dir env log_config ++ for mod in mpm_event mpm_prefork mpm_worker ++ do ++ if test -e $module_path/mod_${mod}.so ++ then ++ echo "LoadModule ${mod}_module " \ ++ "$module_path/mod_${mod}.so" >> "$conf" ++ # only one mpm module permitted ++ break ++ fi ++ done ++ for mod in mime dir env log_config authz_core unixd + do + if test -e $module_path/mod_${mod}.so + then +-- +2.14.4 + diff --git a/SOURCES/git-1.7-el5-emacs-support.patch b/SOURCES/git-1.7-el5-emacs-support.patch deleted file mode 100644 index 25b3c31..0000000 --- a/SOURCES/git-1.7-el5-emacs-support.patch +++ /dev/null @@ -1,252 +0,0 @@ -From 424058e0607b4b3c558d19633090e06e7bd2b851 Mon Sep 17 00:00:00 2001 -From: Todd Zullinger -Date: Wed, 2 Feb 2011 21:24:44 -0500 -Subject: [PATCH] Restore vc-git.el for basic compatibility on EL-5 - -This is the vc-git.el from 1.6.4.1, the last version to include it. -Most uses will be better served by the vc-git.el which is provided by -emacs >= 22.2, but on EL-5 we don't have the luxury of a modern emacs. ---- - contrib/emacs/Makefile | 2 +- - contrib/emacs/vc-git.el | 216 +++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 217 insertions(+), 1 deletions(-) - create mode 100644 contrib/emacs/vc-git.el - -diff --git a/contrib/emacs/Makefile b/contrib/emacs/Makefile -index 24d9312..a48540a 100644 ---- a/contrib/emacs/Makefile -+++ b/contrib/emacs/Makefile -@@ -2,7 +2,7 @@ - - EMACS = emacs - --ELC = git.elc git-blame.elc -+ELC = git.elc vc-git.elc git-blame.elc - INSTALL ?= install - INSTALL_ELC = $(INSTALL) -m 644 - prefix ?= $(HOME) -diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el -new file mode 100644 -index 0000000..b8f6be5 ---- /dev/null -+++ b/contrib/emacs/vc-git.el -@@ -0,0 +1,216 @@ -+;;; vc-git.el --- VC backend for the git version control system -+ -+;; Copyright (C) 2006 Alexandre Julliard -+ -+;; This program is free software; you can redistribute it and/or -+;; modify it under the terms of the GNU General Public License as -+;; published by the Free Software Foundation; either version 2 of -+;; the License, or (at your option) any later version. -+;; -+;; This program is distributed in the hope that it will be -+;; useful, but WITHOUT ANY WARRANTY; without even the implied -+;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -+;; PURPOSE. See the GNU General Public License for more details. -+;; -+;; You should have received a copy of the GNU General Public -+;; License along with this program; if not, write to the Free -+;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+;; MA 02111-1307 USA -+ -+;;; Commentary: -+ -+;; This file contains a VC backend for the git version control -+;; system. -+;; -+;; To install: put this file on the load-path and add GIT to the list -+;; of supported backends in `vc-handled-backends'; the following line, -+;; placed in your ~/.emacs, will accomplish this: -+;; -+;; (add-to-list 'vc-handled-backends 'GIT) -+;; -+;; TODO -+;; - changelog generation -+;; - working with revisions other than HEAD -+;; -+ -+(eval-when-compile (require 'cl)) -+ -+(defvar git-commits-coding-system 'utf-8 -+ "Default coding system for git commits.") -+ -+(defun vc-git--run-command-string (file &rest args) -+ "Run a git command on FILE and return its output as string." -+ (let* ((ok t) -+ (str (with-output-to-string -+ (with-current-buffer standard-output -+ (unless (eq 0 (apply #'call-process "git" nil '(t nil) nil -+ (append args (list (file-relative-name file))))) -+ (setq ok nil)))))) -+ (and ok str))) -+ -+(defun vc-git--run-command (file &rest args) -+ "Run a git command on FILE, discarding any output." -+ (let ((name (file-relative-name file))) -+ (eq 0 (apply #'call-process "git" nil (get-buffer "*Messages") nil (append args (list name)))))) -+ -+(defun vc-git-registered (file) -+ "Check whether FILE is registered with git." -+ (with-temp-buffer -+ (let* ((dir (file-name-directory file)) -+ (name (file-relative-name file dir))) -+ (and (ignore-errors -+ (when dir (cd dir)) -+ (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name))) -+ (let ((str (buffer-string))) -+ (and (> (length str) (length name)) -+ (string= (substring str 0 (1+ (length name))) (concat name "\0")))))))) -+ -+(defun vc-git-state (file) -+ "git-specific version of `vc-state'." -+ (let ((diff (vc-git--run-command-string file "diff-index" "-z" "HEAD" "--"))) -+ (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} [ADMU]\0[^\0]+\0" diff)) -+ 'edited -+ 'up-to-date))) -+ -+(defun vc-git-workfile-version (file) -+ "git-specific version of `vc-workfile-version'." -+ (let ((str (with-output-to-string -+ (with-current-buffer standard-output -+ (call-process "git" nil '(t nil) nil "symbolic-ref" "HEAD"))))) -+ (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) -+ (match-string 2 str) -+ str))) -+ -+(defun vc-git-symbolic-commit (commit) -+ "Translate COMMIT string into symbolic form. -+Returns nil if not possible." -+ (and commit -+ (with-temp-buffer -+ (and -+ (zerop -+ (call-process "git" nil '(t nil) nil "name-rev" -+ "--name-only" "--tags" -+ commit)) -+ (goto-char (point-min)) -+ (= (forward-line 2) 1) -+ (bolp) -+ (buffer-substring-no-properties (point-min) (1- (point-max))))))) -+ -+(defun vc-git-previous-version (file rev) -+ "git-specific version of `vc-previous-version'." -+ (let ((default-directory (file-name-directory (expand-file-name file))) -+ (file (file-name-nondirectory file))) -+ (vc-git-symbolic-commit -+ (with-temp-buffer -+ (and -+ (zerop -+ (call-process "git" nil '(t nil) nil "rev-list" -+ "-2" rev "--" file)) -+ (goto-char (point-max)) -+ (bolp) -+ (zerop (forward-line -1)) -+ (not (bobp)) -+ (buffer-substring-no-properties -+ (point) -+ (1- (point-max)))))))) -+ -+(defun vc-git-next-version (file rev) -+ "git-specific version of `vc-next-version'." -+ (let* ((default-directory (file-name-directory -+ (expand-file-name file))) -+ (file (file-name-nondirectory file)) -+ (current-rev -+ (with-temp-buffer -+ (and -+ (zerop -+ (call-process "git" nil '(t nil) nil "rev-list" -+ "-1" rev "--" file)) -+ (goto-char (point-max)) -+ (bolp) -+ (zerop (forward-line -1)) -+ (bobp) -+ (buffer-substring-no-properties -+ (point) -+ (1- (point-max))))))) -+ (and current-rev -+ (vc-git-symbolic-commit -+ (with-temp-buffer -+ (and -+ (zerop -+ (call-process "git" nil '(t nil) nil "rev-list" -+ "HEAD" "--" file)) -+ (goto-char (point-min)) -+ (search-forward current-rev nil t) -+ (zerop (forward-line -1)) -+ (buffer-substring-no-properties -+ (point) -+ (progn (forward-line 1) (1- (point)))))))))) -+ -+(defun vc-git-revert (file &optional contents-done) -+ "Revert FILE to the version stored in the git repository." -+ (if contents-done -+ (vc-git--run-command file "update-index" "--") -+ (vc-git--run-command file "checkout" "HEAD"))) -+ -+(defun vc-git-checkout-model (file) -+ 'implicit) -+ -+(defun vc-git-workfile-unchanged-p (file) -+ (let ((sha1 (vc-git--run-command-string file "hash-object" "--")) -+ (head (vc-git--run-command-string file "ls-tree" "-z" "HEAD" "--"))) -+ (and head -+ (string-match "[0-7]\\{6\\} blob \\([0-9a-f]\\{40\\}\\)\t[^\0]+\0" head) -+ (string= (car (split-string sha1 "\n")) (match-string 1 head))))) -+ -+(defun vc-git-register (file &optional rev comment) -+ "Register FILE into the git version-control system." -+ (vc-git--run-command file "update-index" "--add" "--")) -+ -+(defun vc-git-print-log (file &optional buffer) -+ (let ((name (file-relative-name file)) -+ (coding-system-for-read git-commits-coding-system)) -+ (vc-do-command buffer 'async "git" name "rev-list" "--pretty" "HEAD" "--"))) -+ -+(defun vc-git-diff (file &optional rev1 rev2 buffer) -+ (let ((name (file-relative-name file)) -+ (buf (or buffer "*vc-diff*"))) -+ (if (and rev1 rev2) -+ (vc-do-command buf 0 "git" name "diff-tree" "-p" rev1 rev2 "--") -+ (vc-do-command buf 0 "git" name "diff-index" "-p" (or rev1 "HEAD") "--")) -+ ; git-diff-index doesn't set exit status like diff does -+ (if (vc-git-workfile-unchanged-p file) 0 1))) -+ -+(defun vc-git-checkin (file rev comment) -+ (let ((coding-system-for-write git-commits-coding-system)) -+ (vc-git--run-command file "commit" "-m" comment "--only" "--"))) -+ -+(defun vc-git-checkout (file &optional editable rev destfile) -+ (if destfile -+ (let ((fullname (substring -+ (vc-git--run-command-string file "ls-files" "-z" "--full-name" "--") -+ 0 -1)) -+ (coding-system-for-read 'no-conversion) -+ (coding-system-for-write 'no-conversion)) -+ (with-temp-file destfile -+ (eq 0 (call-process "git" nil t nil "cat-file" "blob" -+ (concat (or rev "HEAD") ":" fullname))))) -+ (vc-git--run-command file "checkout" (or rev "HEAD")))) -+ -+(defun vc-git-annotate-command (file buf &optional rev) -+ ; FIXME: rev is ignored -+ (let ((name (file-relative-name file))) -+ (call-process "git" nil buf nil "blame" name))) -+ -+(defun vc-git-annotate-time () -+ (and (re-search-forward "[0-9a-f]+ (.* \\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\) \\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\) \\([-+0-9]+\\) +[0-9]+)" nil t) -+ (vc-annotate-convert-time -+ (apply #'encode-time (mapcar (lambda (match) (string-to-number (match-string match))) '(6 5 4 3 2 1 7)))))) -+ -+;; Not really useful since we can't do anything with the revision yet -+;;(defun vc-annotate-extract-revision-at-line () -+;; (save-excursion -+;; (move-beginning-of-line 1) -+;; (and (looking-at "[0-9a-f]+") -+;; (buffer-substring (match-beginning 0) (match-end 0))))) -+ -+(provide 'vc-git) --- -1.7.3.4 - diff --git a/SOURCES/git-cve-2018-11235.patch b/SOURCES/git-cve-2018-11235.patch index e14d703..7b783d7 100644 --- a/SOURCES/git-cve-2018-11235.patch +++ b/SOURCES/git-cve-2018-11235.patch @@ -1,4 +1,4 @@ -From d5b68e9bb5d3bee62f98579022fe5e92fa5f60f0 Mon Sep 17 00:00:00 2001 +From 1e9bfbbfca9a4003368352d173815de134f9bcd9 Mon Sep 17 00:00:00 2001 From: Pavel Cahyna Date: Mon, 18 Jun 2018 13:58:25 +0200 Subject: [PATCH] Squashed commit of the following: @@ -56,7 +56,9 @@ Date: Fri May 4 20:03:35 2018 -0400 - until v2.6.2~7^2 (fsck: exit with non-zero when problems are found, 2015-09-23), git fsck did not reliably use the exit status to indicate errors; callers would have to - check stderr instead. Relaxed the test to permit that.] + check stderr instead. Relaxed the test to permit that. + [pc: revert the above and fix the actual error by moving the + initialization of retval earlier so it is not clobbered]] Signed-off-by: Jeff King Signed-off-by: Jonathan Nieder @@ -1032,7 +1034,7 @@ Date: Sat May 11 15:18:52 2013 +0200 builtin/update-index.c | 31 +-- cache.h | 21 +- config.c | 217 ++++++++++++++++----- - fsck.c | 190 +++++++++++++++++- + fsck.c | 193 +++++++++++++++++- fsck.h | 11 +- git-compat-util.h | 17 ++ git-submodule.sh | 21 +- @@ -1051,7 +1053,7 @@ Date: Sat May 11 15:18:52 2013 +0200 t/t4139-apply-escape.sh | 141 ++++++++++++++ t/t7415-submodule-names.sh | 154 +++++++++++++++ test-hashmap.c | 335 ++++++++++++++++++++++++++++++++ - 34 files changed, 2716 insertions(+), 194 deletions(-) + 34 files changed, 2717 insertions(+), 196 deletions(-) create mode 100644 Documentation/technical/api-hashmap.txt create mode 100644 builtin/submodule--helper.c create mode 100644 hashmap.c @@ -2678,7 +2680,7 @@ index 830ee14..201930f 100644 } } diff --git a/fsck.c b/fsck.c -index 99c0497..8117241 100644 +index 99c0497..3c090bd 100644 --- a/fsck.c +++ b/fsck.c @@ -6,6 +6,42 @@ @@ -2724,6 +2726,15 @@ index 99c0497..8117241 100644 static int fsck_walk_tree(struct tree *tree, fsck_walk_func walk, void *data) { +@@ -138,7 +174,7 @@ static int verify_ordered(unsigned mode1, const char *name1, unsigned mode2, con + + static int fsck_tree(struct tree *item, int strict, fsck_error error_func) + { +- int retval; ++ int retval = 0; + int has_null_sha1 = 0; + int has_full_path = 0; + int has_empty_name = 0; @@ -178,6 +214,16 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) if (!strcmp(name, ".git")) has_dotgit = 1; @@ -2741,7 +2752,15 @@ index 99c0497..8117241 100644 update_tree_entry(&desc); switch (mode) { -@@ -243,6 +289,26 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) +@@ -219,7 +265,6 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) + o_name = name; + } + +- retval = 0; + if (has_null_sha1) + retval += error_func(&item->object, FSCK_WARN, "contains entries pointing to null sha1"); + if (has_full_path) +@@ -243,6 +288,26 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) return retval; } @@ -2768,7 +2787,7 @@ index 99c0497..8117241 100644 static int fsck_ident(char **ident, struct object *obj, fsck_error error_func) { if (**ident == '<') -@@ -279,9 +345,10 @@ static int fsck_ident(char **ident, struct object *obj, fsck_error error_func) +@@ -279,9 +344,10 @@ static int fsck_ident(char **ident, struct object *obj, fsck_error error_func) return 0; } @@ -2781,7 +2800,7 @@ index 99c0497..8117241 100644 unsigned char tree_sha1[20], sha1[20]; struct commit_graft *graft; int parents = 0; -@@ -290,6 +357,9 @@ static int fsck_commit(struct commit *commit, fsck_error error_func) +@@ -290,6 +356,9 @@ static int fsck_commit(struct commit *commit, fsck_error error_func) if (commit->date == ULONG_MAX) return error_func(&commit->object, FSCK_ERROR, "invalid author/committer line"); @@ -2791,7 +2810,7 @@ index 99c0497..8117241 100644 if (memcmp(buffer, "tree ", 5)) return error_func(&commit->object, FSCK_ERROR, "invalid format - expected 'tree' line"); if (get_sha1_hex(buffer+5, tree_sha1) || buffer[45] != '\n') -@@ -340,7 +410,8 @@ static int fsck_commit(struct commit *commit, fsck_error error_func) +@@ -340,7 +409,8 @@ static int fsck_commit(struct commit *commit, fsck_error error_func) return 0; } @@ -2801,7 +2820,7 @@ index 99c0497..8117241 100644 { struct object *tagged = tag->tagged; -@@ -349,19 +420,80 @@ static int fsck_tag(struct tag *tag, fsck_error error_func) +@@ -349,19 +419,80 @@ static int fsck_tag(struct tag *tag, fsck_error error_func) return 0; } @@ -2886,7 +2905,7 @@ index 99c0497..8117241 100644 return error_func(obj, FSCK_ERROR, "unknown type '%d' (internal fsck error)", obj->type); -@@ -382,3 +514,47 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...) +@@ -382,3 +513,47 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...) strbuf_release(&sb); return 1; } @@ -4479,7 +4498,7 @@ index 0000000..45b5660 +test_done diff --git a/t/t7415-submodule-names.sh b/t/t7415-submodule-names.sh new file mode 100755 -index 0000000..a1919b3 +index 0000000..6456d5a --- /dev/null +++ b/t/t7415-submodule-names.sh @@ -0,0 +1,154 @@ @@ -4631,7 +4650,7 @@ index 0000000..a1919b3 + + # Check not only that fsck fails, but that it is due to the + # symlink detector. -+ test_might_fail git fsck 2>output && ++ test_must_fail git fsck 2>output && + test_i18ngrep "is a symbolic link" output + ) +' diff --git a/SPECS/git.spec b/SPECS/git.spec index a85f91e..9dd375c 100644 --- a/SPECS/git.spec +++ b/SPECS/git.spec @@ -1,33 +1,7 @@ # Pass --without docs to rpmbuild if you don't want the documentation +%bcond_without docs -# Settings for EL-5 -# - Leave git-* binaries in %{_bindir} -# - Don't use noarch subpackages -# - Use proper libcurl devel package -# - Patch emacs and tweak docbook spaces -# - Explicitly enable ipv6 for git-daemon -# - Use prebuilt documentation, asciidoc is too old -# - Define missing python macro -%if 0%{?rhel} && 0%{?rhel} <= 5 -%global gitcoredir %{_bindir} -%global noarch_sub 0 -%global libcurl_devel curl-devel -%global emacs_old 1 -%global docbook_suppress_sp 1 -%global enable_ipv6 1 -%global use_prebuilt_docs 1 -%global filter_yaml_any 1 -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%else %global gitcoredir %{_libexecdir}/git-core -%global noarch_sub 1 -%global libcurl_devel libcurl-devel -%global emacs_old 0 -%global docbook_suppress_sp 0 -%global enable_ipv6 0 -%global use_prebuilt_docs 0 -%global filter_yaml_any 0 -%endif # Use systemd instead of xinetd on Fedora 19+ and RHEL 7+ %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 @@ -51,7 +25,7 @@ Name: git Version: 1.8.3.1 -Release: 14%{?dist} +Release: 19%{?dist} Summary: Fast Version Control System License: GPLv2 Group: Development/Tools @@ -62,15 +36,11 @@ Source3: git.xinetd.in Source4: git.conf.httpd Source5: git-gui.desktop Source6: gitweb.conf.in -Source10: http://git-core.googlecode.com/files/%{name}-manpages-%{version}.tar.gz -Source11: http://git-core.googlecode.com/files/%{name}-htmldocs-%{version}.tar.gz Source12: git@.service Source13: git.socket Patch0: git-1.5-gitweb-home-link.patch # https://bugzilla.redhat.com/490602 Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch -# https://bugzilla.redhat.com/600411 -Patch3: git-1.7-el5-emacs-support.patch Patch5: 0001-git-subtree-Use-gitexecdir-instead-of-libexecdir.patch # This fixes the build when python is enabled. Needs discussion upstream to # find a proper solution. @@ -94,10 +64,11 @@ Patch14: 0007-git-prompt.patch Patch15: 0008-Fix-CVE-2017-8386.patch Patch16: git-cve-2017-1000117.patch Patch19: git-cve-2018-11235.patch +Patch20: 0001-Switch-git-instaweb-default-to-apache.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs} +%if %{with docs} BuildRequires: asciidoc >= 8.4.1 BuildRequires: xmlto %endif @@ -105,7 +76,7 @@ BuildRequires: desktop-file-utils BuildRequires: emacs BuildRequires: expat-devel BuildRequires: gettext -BuildRequires: %{libcurl_devel} +BuildRequires: libcurl-devel %if %{gnome_keyring} BuildRequires: libgnome-keyring-devel %endif @@ -143,9 +114,7 @@ SCMs, install the git-all meta-package. %package all Summary: Meta-package to pull in all git tools Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release} Requires: git-cvs = %{version}-%{release} Requires: git-email = %{version}-%{release} @@ -155,6 +124,8 @@ Requires: git-p4 = %{version}-%{release} Requires: gitk = %{version}-%{release} Requires: perl-Git = %{version}-%{release} Requires: emacs-git = %{version}-%{release} +Requires: git-instaweb = %{version}-%{release} +Requires: git-gnome-keyring = %{version}-%{release} Obsoletes: git <= 1.5.4.3 %description all @@ -167,9 +138,7 @@ This is a dummy package which brings in all subpackages. %package bzr Summary: Git tools for working with bzr repositories Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release} Requires: bzr @@ -194,9 +163,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 %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release} %description -n gitweb @@ -205,9 +172,7 @@ Simple web interface to track changes in git repositories %package hg Summary: Git tools for working with mercurial repositories Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release} Requires: mercurial @@ -217,9 +182,7 @@ Requires: mercurial %package p4 Summary: Git tools for working with Perforce depots Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif BuildRequires: python Requires: git = %{version}-%{release} %description p4 @@ -235,9 +198,7 @@ Git tools for importing Subversion repositories. %package cvs Summary: Git tools for importing CVS repositories Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release}, cvs Requires: cvsps Requires: perl-DBD-SQLite @@ -247,9 +208,7 @@ Git tools for importing CVS repositories. %package email Summary: Git tools for sending email Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release} Requires: perl(Authen::SASL) Requires: perl(Net::SMTP::SSL) @@ -259,9 +218,7 @@ Git tools for sending email. %package gui Summary: Git GUI tool Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release}, tk >= 8.4 Requires: gitk = %{version}-%{release} %description gui @@ -270,9 +227,7 @@ Git GUI tool. %package -n gitk Summary: Git revision tree visualiser Group: Development/Tools -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release}, tk >= 8.4 %description -n gitk Git revision tree visualiser. @@ -280,9 +235,7 @@ Git revision tree visualiser. %package -n perl-Git Summary: Perl interface to Git Group: Development/Libraries -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release} BuildRequires: perl(Error), perl(ExtUtils::MakeMaker) Requires: perl(Error) @@ -294,9 +247,7 @@ Perl interface to Git. %package -n perl-Git-SVN Summary: Perl interface to Git::SVN Group: Development/Libraries -%if %{noarch_sub} BuildArch: noarch -%endif Requires: git = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) @@ -307,12 +258,8 @@ Perl interface to Git. Summary: Git version control system support for Emacs Group: Applications/Editors Requires: git = %{version}-%{release} -%if %{noarch_sub} BuildArch: noarch Requires: emacs(bin) >= %{_emacs_version} -%else -Requires: emacs-common -%endif %description -n emacs-git %{summary}. @@ -320,21 +267,40 @@ Requires: emacs-common %package -n emacs-git-el Summary: Elisp source files for git version control system support for Emacs Group: Applications/Editors -%if %{noarch_sub} BuildArch: noarch -%endif Requires: emacs-git = %{version}-%{release} %description -n emacs-git-el %{summary}. +%package instaweb +Summary: Repository browser in gitweb +Group: Development/Tools +BuildArch: noarch +# to get the definition of _httpd_moddir +BuildRequires: httpd-devel +Requires: git = %{version}-%{release} +Requires: gitweb = %{version}-%{release} +Requires: mod_ssl +Requires: httpd + +%description instaweb +A simple script to set up gitweb and a web server for browsing the local repository. + +%if %{gnome_keyring} +%package gnome-keyring +Summary: Git module for working with gnome-keyring +BuildRequires: libgnome-keyring-devel +Requires: git = %{version}-%{release} +Requires: gnome-keyring +%description gnome-keyring +%{summary}. +%endif + %prep %setup -q %patch0 -p1 %patch1 -p1 -%if %{emacs_old} -%patch3 -p1 -%endif %patch5 -p1 %patch6 -p1 %patch7 -p1 @@ -350,18 +316,10 @@ Requires: emacs-git = %{version}-%{release} %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 chmod a+x t/t0011-hashmap.sh t/t1307-config-blob.sh t/t4139-apply-escape.sh t/t7415-submodule-names.sh -%if %{use_prebuilt_docs} -mkdir -p prebuilt_docs/{html,man} -tar xf %{SOURCE10} -C prebuilt_docs/man -tar xf %{SOURCE11} -C prebuilt_docs/html -# Remove non-html files -find prebuilt_docs/html -type f ! -name '*.html' | xargs rm -find prebuilt_docs/html -type d | xargs rmdir --ignore-fail-on-non-empty -%endif - # Use these same options for every invocation of 'make'. # Otherwise it will rebuild in %%install due to flags changes. cat << \EOF > config.mak @@ -384,10 +342,6 @@ EOF echo gitexecdir = %{_bindir} >> config.mak %endif -%if %{docbook_suppress_sp} -# This is needed for 1.69.1-1.71.0 -echo DOCBOOK_SUPPRESS_SP = 1 >> config.mak -%endif # Filter bogus perl requires # packed-refs comes from a comment in contrib/hooks/update-paranoid @@ -395,11 +349,7 @@ echo DOCBOOK_SUPPRESS_SP = 1 >> config.mak cat << \EOF > %{name}-req #!/bin/sh %{__perl_requires} $* |\ -sed \ -%if %{filter_yaml_any} - -e '/perl(YAML::Any)/d' \ -%endif - -e '/perl(packed-refs)/d' +sed -e '/perl(packed-refs)/d' EOF %global __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req @@ -409,9 +359,7 @@ chmod +x %{__perl_requires} sh configure --with-c-compiler=gcc make %{?_smp_mflags} git-daemon LDFLAGS="-pie -Wl,-z,relro,-z,now" CFLAGS="$RPM_OPT_FLAGS -fPIC" make %{?_smp_mflags} all -o git-daemon -%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs} -make %{?_smp_mflags} doc -%endif +make %{?_smp_mflags} %{?with_docs:doc} make -C contrib/emacs @@ -427,17 +375,8 @@ sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash %install rm -rf %{buildroot} make %{?_smp_mflags} INSTALLDIRS=vendor install -o git-daemon -%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs} -make %{?_smp_mflags} INSTALLDIRS=vendor install-doc -o git-daemon -%else -cp -a prebuilt_docs/man/* %{buildroot}%{_mandir} -cp -a prebuilt_docs/html/* Documentation/ -%endif +make %{?_smp_mflags} INSTALLDIRS=vendor %{?with_docs:install-doc} -o git-daemon -%if %{emacs_old} -%global _emacs_sitelispdir %{_datadir}/emacs/site-lisp -%global _emacs_sitestartdir %{_emacs_sitelispdir}/site-start.d -%endif %global elispdir %{_emacs_sitelispdir}/git make -C contrib/emacs install \ emacsdir=%{buildroot}%{elispdir} @@ -456,7 +395,7 @@ make -C contrib/credential/gnome-keyring/ clean %endif make -C contrib/subtree install -%if ! %{use_prebuilt_docs} +%if %{with docs} make -C contrib/subtree install-doc %endif @@ -476,7 +415,7 @@ rm -rf %{buildroot}%{python_sitelib} %{buildroot}%{gitcoredir}/git-remote-testgi # git-archimport is not supported find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';' -exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|gitk|p4|svn" +exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|gitk|p4|svn|instaweb|gnome-keyring" (find %{buildroot}{%{_bindir},%{_libexecdir}} -type f | 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 @@ -484,7 +423,7 @@ exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bz # Split out Git::SVN files grep Git/SVN perl-git-files > perl-git-svn-files sed -i "/Git\/SVN/ d" perl-git-files -%if %{!?_without_docs:1}0 +%if %{with docs} (find %{buildroot}%{_mandir} -type f | grep -vE "$exclude_re|Git" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files %else rm -rf %{buildroot}%{_mandir} @@ -496,15 +435,9 @@ mkdir -p %{buildroot}%{_unitdir} cp -a %{SOURCE12} %{SOURCE13} %{buildroot}%{_unitdir} %else mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d -# On EL <= 5, xinetd does not enable IPv6 by default -enable_ipv6=" # xinetd does not enable IPv6 by default - flags = IPv6" perl -p \ -e "s|\@GITCOREDIR\@|%{gitcoredir}|g;" \ -e "s|\@BASE_PATH\@|%{_var}/lib/git|g;" \ -%if %{enable_ipv6} - -e "s|^}|$enable_ipv6\n$&|;" \ -%endif %{SOURCE3} > %{buildroot}%{_sysconfdir}/xinetd.d/git %endif @@ -598,30 +531,30 @@ rm -rf %{buildroot} %{gitcoredir}/*p4* %{gitcoredir}/mergetools/p4merge %doc Documentation/*p4*.txt -%{!?_without_docs: %{_mandir}/man1/*p4*.1*} -%{!?_without_docs: %doc Documentation/*p4*.html } +%{?with_docs: %{_mandir}/man1/*p4*.1*} +%{?with_docs: %doc Documentation/*p4*.html } %files svn %defattr(-,root,root) %{gitcoredir}/*svn* %doc Documentation/*svn*.txt -%{!?_without_docs: %{_mandir}/man1/*svn*.1*} -%{!?_without_docs: %doc Documentation/*svn*.html } +%{?with_docs: %{_mandir}/man1/*svn*.1*} +%{?with_docs: %doc Documentation/*svn*.html } %files cvs %defattr(-,root,root) %doc Documentation/*git-cvs*.txt %{_bindir}/git-cvsserver %{gitcoredir}/*cvs* -%{!?_without_docs: %{_mandir}/man1/*cvs*.1*} -%{!?_without_docs: %doc Documentation/*git-cvs*.html } +%{?with_docs: %{_mandir}/man1/*cvs*.1*} +%{?with_docs: %doc Documentation/*git-cvs*.html } %files email %defattr(-,root,root) %doc Documentation/*email*.txt %{gitcoredir}/*email* -%{!?_without_docs: %{_mandir}/man1/*email*.1*} -%{!?_without_docs: %doc Documentation/*email*.html } +%{?with_docs: %{_mandir}/man1/*email*.1*} +%{?with_docs: %doc Documentation/*email*.html } %files gui %defattr(-,root,root) @@ -629,27 +562,27 @@ rm -rf %{buildroot} %{gitcoredir}/git-citool %{_datadir}/applications/*git-gui.desktop %{_datadir}/git-gui/ -%{!?_without_docs: %{_mandir}/man1/git-gui.1*} -%{!?_without_docs: %doc Documentation/git-gui.html} -%{!?_without_docs: %{_mandir}/man1/git-citool.1*} -%{!?_without_docs: %doc Documentation/git-citool.html} +%{?with_docs: %{_mandir}/man1/git-gui.1*} +%{?with_docs: %doc Documentation/git-gui.html} +%{?with_docs: %{_mandir}/man1/git-citool.1*} +%{?with_docs: %doc Documentation/git-citool.html} %files -n gitk %defattr(-,root,root) %doc Documentation/*gitk*.txt %{_bindir}/*gitk* %{_datadir}/gitk -%{!?_without_docs: %{_mandir}/man1/*gitk*.1*} -%{!?_without_docs: %doc Documentation/*gitk*.html } +%{?with_docs: %{_mandir}/man1/*gitk*.1*} +%{?with_docs: %doc Documentation/*gitk*.html } %files -n perl-Git -f perl-git-files %defattr(-,root,root) %exclude %{_mandir}/man3/*Git*SVN*.3pm* -%{!?_without_docs: %{_mandir}/man3/*Git*.3pm*} +%{?with_docs:%{_mandir}/man3/*Git*.3pm*} %files -n perl-Git-SVN -f perl-git-svn-files %defattr(-,root,root) -%{!?_without_docs: %{_mandir}/man3/*Git*SVN*.3pm*} +%{?with_docs:%{_mandir}/man3/*Git*SVN*.3pm*} %files -n emacs-git %defattr(-,root,root) @@ -673,8 +606,8 @@ rm -rf %{buildroot} %endif %{gitcoredir}/git-daemon %{_var}/lib/git -%{!?_without_docs: %{_mandir}/man1/*daemon*.1*} -%{!?_without_docs: %doc Documentation/*daemon*.html} +%{?with_docs: %{_mandir}/man1/*daemon*.1*} +%{?with_docs: %doc Documentation/*daemon*.html} %files -n gitweb %defattr(-,root,root) @@ -683,13 +616,56 @@ rm -rf %{buildroot} %config(noreplace)%{_sysconfdir}/httpd/conf.d/git.conf %{_var}/www/git/ +%files instaweb +%defattr(-,root,root) +%{gitcoredir}/git-instaweb +%{?with_docs: %{_mandir}/man1/git-instaweb.1*} +%{?with_docs: %doc Documentation/git-instaweb.html} + +%if %{gnome_keyring} +%files gnome-keyring +%defattr(-,root,root) +%{gitcoredir}/git-credential-gnome-keyring +%endif + %files all # No files for you! %changelog +* Wed Aug 29 2018 Sebastian Kisela - 1.8.3.1-19 +- Fix httpd modules path to be independent from system architecture. +Upstream commit: 1976311aa285549599e5a451d7ad72b55a2b60e2 +Resolves: #1213059 + +* Fri Jul 13 2018 Pavel Cahyna - 1.8.3.1-18 +- Use the correct apache module directory in instaweb. +- Apply the docs fixes to instaweb as well. + +* Tue Jul 10 2018 Pavel Cahyna - 1.8.3.1-17 +- Correctly return an error from fsck on encountering a .gitmodules symlink. + This was broken in the debian 2.1.x backport and found by covscan. + Fix the test to catch this. +- Correct a typo in changelog. + +* Mon Jul 02 2018 Sebastian Kisela - 1.8.3.1-16 +- Remove EL-5 settings and old Fedora conditionals. + Taken from fedora commits 903d8f35ed8ae16bece8ae8033f3d3926cc97595 and + 2c6eff99d7b50b87e8a1fe2e4a0489dfd90659b8. +- Fix builds using '--without docs' +- Change git-instaweb default from lighttpd(not available in rhel7) to + apache2. +- Add requires for git-{instaweb,gnome-keyring} to pull them, when + installing git-all. + +* Tue Jun 19 2018 Sebastian Kisela - 1.8.3.1-15 +- move instaweb to separate git-instaweb subpackage. + Resolves: #1213059 +- move gnome-keyring to a separate git-gnome-keyring subpackage. + Resolves: #1284081 + * Mon Jun 18 2018 Pavel Cahyna - 1.8.3.1-14 -- Backport fix for CVE-2018-1123 +- Backport fix for CVE-2018-11235 - Thanks to Jonathan Nieder for backporting to 2.1.x and to Steve Beattie for backporting to 1.9.1