git/git.spec

448 lines
13 KiB
RPMSpec
Raw Normal View History

#
# spec file for package git
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define gitexecdir %_libexecdir/git
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
Name: git
%if 0%{?suse_version} < 1030
%define dist_has_fdupes 0
%else
%define dist_has_fdupes 1
%endif
BuildRequires: asciidoc
BuildRequires: curl
BuildRequires: libcurl-devel
BuildRequires: libexpat-devel
%if %{dist_has_fdupes}
BuildRequires: fdupes
%endif
%if 0%{?suse_version} < 1030
BuildRequires: openssl-devel
%else
BuildRequires: libopenssl-devel
%endif
BuildRequires: sgml-skel
BuildRequires: xmlto
BuildRequires: python
BuildRequires: perl-Error
Accepting request 103515 from devel:tools:scm - updated to v1.7.9: * gitk updates accumulated since early 2011. * git-gui updated to 0.16.0. * git-p4 (in contrib/) updates. * Git uses gettext to translate its most common interface messages into the user's language if translations are available and the locale is appropriately set. Distributors can drop new PO files in po/ to add new translations. * The code to handle username/password for HTTP transactions used in "git push" & "git fetch" learned to talk "credential API" to external programs to cache or store them, to allow integration with platform native keychain mechanisms. * The input prompts in the terminal use our own getpass() replacement when possible. HTTP transactions used to ask for the username without echoing back what was typed, but with this change you will see it as you type. * The internals of "revert/cherry-pick" have been tweaked to prepare building more generic "sequencer" on top of the implementation that drives them. * "git rev-parse FETCH_HEAD" after "git fetch" without specifying what to fetch from the command line will now show the commit that would be merged if the command were "git pull". * "git add" learned to stream large files directly into a packfile instead of writing them into individual loose object files. * "git checkout -B <current branch> <elsewhere>" is a more intuitive way to spell "git reset --keep <elsewhere>". * "git checkout" and "git merge" learned "--no-overwrite-ignore" option to tell Git that untracked and ignored files are not expendable. * "git commit --amend" learned "--no-edit" option to say that the user is amending the tree being recorded, without updating the (forwarded request 103501 from tiwai) OBS-URL: https://build.opensuse.org/request/show/103515 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=82
2012-02-14 11:23:58 +01:00
Version: 1.7.9
Release: 0
Summary: Fast, scalable, distributed revision control system
License: GPL-2.0
Group: Development/Tools/Version Control
Url: http://git-scm.com
Accepting request 96975 from devel:tools:scm - Implement %check via make test - Update to v1.7.8 New features: * The date parser now accepts timezone designators that lack minutes part and also has a colon between "hh:mm". * The contents of the /etc/mailname file, if exists, is used as the default value of the hostname part of the committer/author e-mail. * "git am" learned how to read from patches generated by Hg. * "git archive" talking with a remote repository can report errors from the remote side in a more informative way. * "git branch" learned an explicit --list option to ask for branches listed, optionally with a glob matching pattern to limit its output. * "git check-attr" learned "--cached" option to look at .gitattributes files from the index, not from the working tree. * Variants of "git cherry-pick" and "git revert" that take multiple commits learned to "--continue" and "--abort". * "git daemon" gives more human readble error messages to clients using ERR packets when appropriate. * Errors at the network layer is logged by "git daemon". * "git diff" learned "--minimal" option to spend extra cycles to come up with a minimal patch output. * "git diff" learned "--function-context" option to show the whole function as context that was affected by a change. * "git difftool" can be told to skip launching the tool for a path by answering 'n' to its prompt. * "git fetch" learned to honor transfer.fsckobjects configuration to validate the objects that were received from the other end, just like "git receive-pack" (the receiving end of "git push") does. * "git fetch" makes sure that the set of objects it received from the (forwarded request 96521 from namtrac) OBS-URL: https://build.opensuse.org/request/show/96975 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=79
2011-12-21 10:00:12 +01:00
Source0: http://git-core.googlecode.com/files/%name-%{version}.tar.gz
Source1: apache2-gitweb.conf
Source2: sysconfig.git-daemon
Source3: git-daemon.init
Source4: git.xinetd
Source5: usr.share.git-web.gitweb.cgi
Source6: susefirewall-git-daemon
Patch1: git-nohardlink.diff
Patch2: git-python-install-fix.diff
Patch3: completion-wordbreaks.diff
# CVE-2011-2186, bnc#698456
Patch4: git-prevent_xss-default.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: git-core = %{version}
Recommends: git-svn git-cvs git-email gitk git-gui git-web
Suggests: git-daemon
%description
Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations and
full access to internals.
This package itself only provides the README of git but with the
packages it requires, it brings you a complete Git environment
including GTK and email interfaces and tools for importing source code
repositories from other revision control systems such as subversion,
CVS, and GNU arch.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
%package core
Summary: Core git tools
Group: Development/Tools/Version Control
Requires: rsync, less, openssh, perl-Error
Requires: perl-base = %{perl_version}
%description core
Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations and
full access to internals.
These are the core tools with minimal dependencies.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
Junio C Hamano <junkio@cox.net>
%package svn
Summary: Git tools for importing Subversion repositories
Group: Development/Tools/Version Control
Requires: git-core = %{version}, subversion
Requires: subversion-perl
%description svn
Tools for importing Subversion repositories to the Git version control
system.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
Junio C Hamano <junkio@cox.net>
%package cvs
Summary: Git tools for importing CVS repositories
Group: Development/Tools/Version Control
Requires: git-core = %{version}, cvs, cvsps, perl-DBD-SQLite
%description cvs
Tools for importing CVS repositories to the Git version control system.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
Junio C Hamano <junkio@cox.net>
%package arch
Summary: Git tools for importing Arch repositories
Group: Development/Tools/Version Control
Requires: git-core = %{version}
# Requires: tla
%description arch
Tools for importing GNU Arch repositories to the GIT version control
system.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
Junio C Hamano <junkio@cox.net>
%package email
Summary: Git tools for sending email
Group: Development/Tools/Version Control
Requires: git-core = %{version}
# For sending mails over secure SMTP:
Recommends: perl-Net-SMTP-SSL, perl-Authen-SASL
%description email
Email interface for the GIT version control system.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
Junio C Hamano <junkio@cox.net>
%package daemon
Summary: Simple Server for Git Repositories
Group: Development/Tools/Version Control
Requires: git-core = %{version}
PreReq: /usr/sbin/useradd %fillup_prereq %insserv_prereq
%description daemon
A really simple TCP git daemon. In the default configuration it allows
read only access to repositories in /srv/git/ that contain the
'git-daemon-export-ok' file.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
%package -n gitk
Summary: Git revision tree visualiser
Group: Development/Tools/Version Control
Requires: git-core = %{version}, tk >= 8.4
Supplements: packageand(git-core:tk)
%description -n gitk
Grapical tool for visualization of revision trees of projects
maintained in the Git version control system. It name gitk indicates
that it's written using the Tk Widget set.
A simple Tk based graphical interface for common Git operations is
found in the package git-gui.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
Junio C Hamano <junkio@cox.net>
%package gui
Summary: Grapical tool for common git operations
Group: Development/Tools/Version Control
Requires: git-core = %{version}, tk >= 8.4
Supplements: packageand(git-core:tk)
%description gui
A Tcl/Tk based graphical user interface to Git. git-gui focuses on
allowing users to make changes to their repository by making new
commits, amending existing ones, creating branches, performing local
merges, and fetching/pushing to remote repositories.
Unlike gitk, git-gui focuses on commit generation and single file
annotation, and does not show project history. It does however supply
menu actions to start a gitk session from within git-gui.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
%package web
Summary: Git Web Interface
Group: Development/Tools/Version Control
Requires: git-core = %{version}
Supplements: packageand(git-core:apache2)
%description web
CGI script that allows browsing git repositories via web interface.
The apache2 configuration contained in this package installs a virtual
directory /git/ that calls the cgi script.
Authors:
--------
Linus Torvalds <torvalds@osdl.org>
%package remote-helpers
Summary: Python package for remote helper scripts
Group: Development/Tools/Version Control
Requires: git-core = %{version}, python
%description remote-helpers
This package contains the building blocks for remote helpers written in Python.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
cat > .make <<'EOF'
#!/bin/bash
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
GITWEB_CONFIG="/etc/gitweb.conf" \
GITWEB_PROJECTROOT="/srv/git" \
WITH_OWN_SUBPROCESS_PY=YesPlease \
DESTDIR=$RPM_BUILD_ROOT \
NO_CROSS_DIRECTORY_HARDLINKS=1 \
V=1 \
prefix=%{_prefix} mandir=%{_mandir} \
gitexecdir=%{gitexecdir} \
htmldir=%{_docdir}/git-core \
"$@"
EOF
#
chmod 755 .make
./.make all %{?_smp_mflags}
%{!?_without_docs: ./.make doc}
%install
./.make install %{!?_without_docs: install-doc}
### git-web
cp gitweb/INSTALL INSTALL.gitweb
cp gitweb/README README.gitweb
install -d ${RPM_BUILD_ROOT}/usr/share/git-web
install -d ${RPM_BUILD_ROOT}/etc/apache2/conf.d
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/apache2/conf.d/gitweb.conf
### git-daemon
install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/init.d/git-daemon
install -d -m 755 $RPM_BUILD_ROOT%{_sbindir}
ln -s ../../etc/init.d/git-daemon $RPM_BUILD_ROOT%{_sbindir}/rcgit-daemon
install -d -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.git-daemon
install -d -m 755 $RPM_BUILD_ROOT/srv/git
install -d -m 755 $RPM_BUILD_ROOT/etc/xinetd.d
install -m 644 %{S:4} $RPM_BUILD_ROOT/etc/xinetd.d/git
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m 644 %{S:6} $RPM_BUILD_ROOT/%{_fwdefdir}/git-daemon
###
(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "archimport|svn|cvs|email|gitk|daemon|gui" | sed -e s@^$RPM_BUILD_ROOT@@) > bin-man-doc-files
(find $RPM_BUILD_ROOT%{gitexecdir} -mindepth 1 | grep -vE "archimport|svn|cvs|email|gitk|daemon|gui" | sed -e s@^$RPM_BUILD_ROOT@@) >> bin-man-doc-files
(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE "archimport|svn|git-cvs|email|gitk|daemon|gui" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files
( pushd perl
perl Makefile.PL
make -f perl.mak DESTDIR=${RPM_BUILD_ROOT} install_vendor
)
rm -rf ${RPM_BUILD_ROOT}/usr/lib/perl5/site_perl
%perl_process_packlist
find $RPM_BUILD_ROOT/%_mandir -type f -print0 | xargs -0 chmod 644
install -m 644 -D contrib/completion/git-completion.bash $RPM_BUILD_ROOT/etc/bash_completion.d/git.sh
#
# apparmor profile for git-web
#
install -d -m 755 $RPM_BUILD_ROOT/etc/apparmor.d
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/apparmor.d
#
%if %{dist_has_fdupes}
# create predictable symlinks to make apparmor profile work
for i in git git-upload-archive; do
rm $RPM_BUILD_ROOT%{_bindir}/$i
ln -s %{gitexecdir}/git-add $RPM_BUILD_ROOT%{_bindir}/$i
done
if ! test -f $RPM_BUILD_ROOT%{gitexecdir}/git-add; then
echo "git-add is not a regular file, apparmor profile won't work!" >&2
exit 1
fi
Accepting request 103515 from devel:tools:scm - updated to v1.7.9: * gitk updates accumulated since early 2011. * git-gui updated to 0.16.0. * git-p4 (in contrib/) updates. * Git uses gettext to translate its most common interface messages into the user's language if translations are available and the locale is appropriately set. Distributors can drop new PO files in po/ to add new translations. * The code to handle username/password for HTTP transactions used in "git push" & "git fetch" learned to talk "credential API" to external programs to cache or store them, to allow integration with platform native keychain mechanisms. * The input prompts in the terminal use our own getpass() replacement when possible. HTTP transactions used to ask for the username without echoing back what was typed, but with this change you will see it as you type. * The internals of "revert/cherry-pick" have been tweaked to prepare building more generic "sequencer" on top of the implementation that drives them. * "git rev-parse FETCH_HEAD" after "git fetch" without specifying what to fetch from the command line will now show the commit that would be merged if the command were "git pull". * "git add" learned to stream large files directly into a packfile instead of writing them into individual loose object files. * "git checkout -B <current branch> <elsewhere>" is a more intuitive way to spell "git reset --keep <elsewhere>". * "git checkout" and "git merge" learned "--no-overwrite-ignore" option to tell Git that untracked and ignored files are not expendable. * "git commit --amend" learned "--no-edit" option to say that the user is amending the tree being recorded, without updating the (forwarded request 103501 from tiwai) OBS-URL: https://build.opensuse.org/request/show/103515 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=82
2012-02-14 11:23:58 +01:00
%find_lang %{name}
# use symlinks instead of hardlinks in sub-commands
%fdupes -s $RPM_BUILD_ROOT
%endif
Accepting request 96975 from devel:tools:scm - Implement %check via make test - Update to v1.7.8 New features: * The date parser now accepts timezone designators that lack minutes part and also has a colon between "hh:mm". * The contents of the /etc/mailname file, if exists, is used as the default value of the hostname part of the committer/author e-mail. * "git am" learned how to read from patches generated by Hg. * "git archive" talking with a remote repository can report errors from the remote side in a more informative way. * "git branch" learned an explicit --list option to ask for branches listed, optionally with a glob matching pattern to limit its output. * "git check-attr" learned "--cached" option to look at .gitattributes files from the index, not from the working tree. * Variants of "git cherry-pick" and "git revert" that take multiple commits learned to "--continue" and "--abort". * "git daemon" gives more human readble error messages to clients using ERR packets when appropriate. * Errors at the network layer is logged by "git daemon". * "git diff" learned "--minimal" option to spend extra cycles to come up with a minimal patch output. * "git diff" learned "--function-context" option to show the whole function as context that was affected by a change. * "git difftool" can be told to skip launching the tool for a path by answering 'n' to its prompt. * "git fetch" learned to honor transfer.fsckobjects configuration to validate the objects that were received from the other end, just like "git receive-pack" (the receiving end of "git push") does. * "git fetch" makes sure that the set of objects it received from the (forwarded request 96521 from namtrac) OBS-URL: https://build.opensuse.org/request/show/96975 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=79
2011-12-21 10:00:12 +01:00
%check
make %{?_smp_mflags} test
%pre daemon
if ! /usr/bin/getent passwd git-daemon >/dev/null; then
/usr/sbin/useradd -r -d /var/lib/empty -s /bin/false -c "git daemon" -g nogroup git-daemon || :
fi
%post daemon
%{fillup_and_insserv -n git-daemon}
%postun daemon
%{insserv_cleanup}
%preun daemon
%stop_on_removal
%files
%defattr(-,root,root)
%doc README
%files svn
%defattr(-,root,root)
%{gitexecdir}/*svn*
%doc Documentation/*svn*.txt
%{!?_without_docs: %{_mandir}/man1/*svn*.1*}
%{!?_without_docs: %doc Documentation/*svn*.html }
%files cvs
%defattr(-,root,root)
%doc Documentation/*git-cvs*.txt
%{_bindir}/git-cvs*
%{gitexecdir}/*cvs*
%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
%{!?_without_docs: %doc Documentation/*git-cvs*.html }
%files arch
%defattr(-,root,root)
%doc Documentation/git-archimport.txt
%{gitexecdir}/git-archimport
%{!?_without_docs: %{_mandir}/man1/git-archimport.1*}
%{!?_without_docs: %doc Documentation/git-archimport.html }
%files email
%defattr(-,root,root)
%doc Documentation/*email*.txt
%{gitexecdir}/*email*
%{!?_without_docs: %{_mandir}/man1/*email*.1*}
%{!?_without_docs: %doc Documentation/*email*.html }
%files daemon
%defattr(-,root,root)
%doc Documentation/*daemon*.txt
%{gitexecdir}/*daemon*
/etc/init.d/git-daemon
%{_sbindir}/rcgit-daemon
%dir /srv/git
/var/adm/fillup-templates/sysconfig.git-daemon
%{!?_without_docs: %{_mandir}/man1/*daemon*.1*}
%{!?_without_docs: %doc Documentation/*daemon*.html }
%config(noreplace) /etc/xinetd.d/git
%config %{_fwdefdir}/*
%files -n gitk
%defattr(-,root,root)
%doc Documentation/*gitk*.txt
%{_bindir}/gitk
/usr/share/gitk
%{!?_without_docs: %{_mandir}/man1/*gitk*.1*}
%{!?_without_docs: %doc Documentation/*gitk*.html }
%files gui
%defattr(-,root,root)
%doc Documentation/*gui*.txt
%{gitexecdir}/git-gui*
/usr/share/git-gui
%{!?_without_docs: %{_mandir}/man1/*gui*.1*}
%{!?_without_docs: %doc Documentation/*gui*.html }
%files web
%defattr(-,root,root)
%doc README.gitweb INSTALL.gitweb
%dir /etc/apache2
%dir /etc/apache2/conf.d
%config(noreplace) /etc/apache2/conf.d/gitweb.conf
/usr/share/gitweb
/etc/apparmor.d
%files remote-helpers
%defattr(-,root,root)
%if %suse_version >= 1120
%python_sitelib/*
%else
%py_sitedir/*
%endif
Accepting request 103515 from devel:tools:scm - updated to v1.7.9: * gitk updates accumulated since early 2011. * git-gui updated to 0.16.0. * git-p4 (in contrib/) updates. * Git uses gettext to translate its most common interface messages into the user's language if translations are available and the locale is appropriately set. Distributors can drop new PO files in po/ to add new translations. * The code to handle username/password for HTTP transactions used in "git push" & "git fetch" learned to talk "credential API" to external programs to cache or store them, to allow integration with platform native keychain mechanisms. * The input prompts in the terminal use our own getpass() replacement when possible. HTTP transactions used to ask for the username without echoing back what was typed, but with this change you will see it as you type. * The internals of "revert/cherry-pick" have been tweaked to prepare building more generic "sequencer" on top of the implementation that drives them. * "git rev-parse FETCH_HEAD" after "git fetch" without specifying what to fetch from the command line will now show the commit that would be merged if the command were "git pull". * "git add" learned to stream large files directly into a packfile instead of writing them into individual loose object files. * "git checkout -B <current branch> <elsewhere>" is a more intuitive way to spell "git reset --keep <elsewhere>". * "git checkout" and "git merge" learned "--no-overwrite-ignore" option to tell Git that untracked and ignored files are not expendable. * "git commit --amend" learned "--no-edit" option to say that the user is amending the tree being recorded, without updating the (forwarded request 103501 from tiwai) OBS-URL: https://build.opensuse.org/request/show/103515 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=82
2012-02-14 11:23:58 +01:00
%files core -f bin-man-doc-files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/git
%{_datadir}/git-core/
%dir %{gitexecdir}
%doc README COPYING Documentation/*.txt
%{!?_without_docs: %doc Documentation/*.html }
%if 0%{?suse_version} < 1140
/var/adm/perl-modules/%{name}
%endif
%{perl_vendorlib}/Git.pm
Accepting request 103515 from devel:tools:scm - updated to v1.7.9: * gitk updates accumulated since early 2011. * git-gui updated to 0.16.0. * git-p4 (in contrib/) updates. * Git uses gettext to translate its most common interface messages into the user's language if translations are available and the locale is appropriately set. Distributors can drop new PO files in po/ to add new translations. * The code to handle username/password for HTTP transactions used in "git push" & "git fetch" learned to talk "credential API" to external programs to cache or store them, to allow integration with platform native keychain mechanisms. * The input prompts in the terminal use our own getpass() replacement when possible. HTTP transactions used to ask for the username without echoing back what was typed, but with this change you will see it as you type. * The internals of "revert/cherry-pick" have been tweaked to prepare building more generic "sequencer" on top of the implementation that drives them. * "git rev-parse FETCH_HEAD" after "git fetch" without specifying what to fetch from the command line will now show the commit that would be merged if the command were "git pull". * "git add" learned to stream large files directly into a packfile instead of writing them into individual loose object files. * "git checkout -B <current branch> <elsewhere>" is a more intuitive way to spell "git reset --keep <elsewhere>". * "git checkout" and "git merge" learned "--no-overwrite-ignore" option to tell Git that untracked and ignored files are not expendable. * "git commit --amend" learned "--no-edit" option to say that the user is amending the tree being recorded, without updating the (forwarded request 103501 from tiwai) OBS-URL: https://build.opensuse.org/request/show/103515 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=82
2012-02-14 11:23:58 +01:00
%{perl_vendorlib}/Git/
%{perl_vendorlib}/Git/*.pm
%{perl_vendorarch}/auto/Git/
/etc/bash_completion.d/git.sh
%changelog