Accepting request 653788 from devel:tools:scm

OBS-URL: https://build.opensuse.org/request/show/653788
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=226
This commit is contained in:
Dominique Leuenberger 2018-12-10 11:26:12 +00:00 committed by Git OBS Bridge
parent c1c7775c3f
commit 42cfc11470
2 changed files with 92 additions and 81 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Dec 4 08:40:09 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Use Requires(pre).
- Do not ignore error returns from useradd.
- Package descriptions need not be wrapped in %if..%endif.
-------------------------------------------------------------------
Fri Nov 30 11:42:53 UTC 2018 - Marketa Calabkova <mcalabkova@suse.com>
- Avoid boo#1082023 - git send-email fails to authenticate with
SMTP server
-------------------------------------------------------------------
Wed Nov 21 19:59:33 UTC 2018 - astieger@suse.com

160
git.spec
View File

@ -12,44 +12,38 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define gitexecdir %{_libexecdir}/git
%define _fwdefdir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
%if 0%{?suse_version} >= 1210
%bcond_without git_gnome_keyring
%else
%bcond_with git_gnome_keyring
%endif
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
%define gitexecdir %_libexecdir/git
%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
%if 0%{?suse_version} >= 1210
%bcond_without git_gnome_keyring
%else
%bcond_with git_gnome_keyring
%endif
%bcond_without git_libsecret
%bcond_without docs
Name: git
Version: 2.19.2
Release: 0
Summary: Fast, scalable, distributed revision control system
License: GPL-2.0-only
Group: Development/Tools/Version Control
Url: http://git-scm.com
URL: http://git-scm.com
Source0: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz
Source7: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.sign
Source1: apache2-gitweb.conf
Source2: sysconfig.git-daemon
Source3: git-daemon.service
Source5: usr.share.git-web.gitweb.cgi
Source6: susefirewall-git-daemon
Source8: %name.keyring
Source7: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.sign
Source8: %{name}.keyring
Source9: %{name}-gui.desktop
Source10: %{name}-gui.png
Patch3: completion-wordbreaks.diff
@ -61,28 +55,12 @@ Patch6: git-tcsh-completion-fixes.diff
Patch7: git-zsh-completion-fixes.diff
Patch8: git-asciidoc.patch
BuildRequires: apache2
%if %{with docs}
%if 0%{?suse_version} > 1320
BuildRequires: rubygem(asciidoctor)
%else
BuildRequires: asciidoc
%endif
%endif
BuildRequires: curl
BuildRequires: fdupes
BuildRequires: gpg2
BuildRequires: libcurl-devel
BuildRequires: libexpat-devel
%if %{with git_gnome_keyring}
BuildRequires: libgnome-keyring-devel
%endif
%if %{with git_libsecret}
BuildRequires: libsecret-devel
%endif
BuildRequires: libopenssl-devel
%if 0%{?suse_version} > 1320
BuildRequires: libsha1detectcoll-devel
%endif
BuildRequires: pcre2-devel
BuildRequires: perl-Error
BuildRequires: perl-MailTools
@ -95,8 +73,29 @@ BuildRequires: xmlto
BuildRequires: xz
BuildRequires: zlib-devel
Requires: git-core = %{version}
Recommends: git-svn git-cvs git-email gitk git-gui
Suggests: git-daemon git-web
Recommends: git-cvs
Recommends: git-email
Recommends: git-gui
Recommends: git-svn
Recommends: gitk
Suggests: git-daemon
Suggests: git-web
%if %{with docs}
%if 0%{?suse_version} > 1320
BuildRequires: rubygem(asciidoctor)
%else
BuildRequires: asciidoc
%endif
%endif
%if %{with git_gnome_keyring}
BuildRequires: libgnome-keyring-devel
%endif
%if %{with git_libsecret}
BuildRequires: libsecret-devel
%endif
%if 0%{?suse_version} > 1320
BuildRequires: libsha1detectcoll-devel
%endif
%description
Git is a fast, scalable, distributed revision control system with an
@ -115,13 +114,13 @@ Group: Development/Tools/Version Control
Requires: less
Requires: openssh
Requires: perl-Error
%if 0%{?suse_version} >= 1230
%perl_requires
Requires: rsync
Obsoletes: git-remote-helpers < %{version}
%if 0%{?suse_version} >= 1230
%{perl_requires}
%else
Requires: perl-base = %{perl_version}
%endif
Requires: rsync
Obsoletes: git-remote-helpers < %{version}
%description core
Git is a fast, scalable, distributed revision control system with an
@ -149,13 +148,13 @@ text/html formats. (The manpages are in the main package.)
Summary: Git tools for importing Subversion repositories
Group: Development/Tools/Version Control
Requires: git-core = %{version}
%if 0%{suse_version} < 1140
Requires: subversion
Requires: subversion-perl
%if 0%{?suse_version} < 1140
Requires: perl-TermReadKey
%else
Requires: perl-Term-ReadKey
%endif
Requires: subversion
Requires: subversion-perl
%description svn
Tools for importing Subversion repositories to the Git version control
@ -172,7 +171,6 @@ Requires: perl-DBD-SQLite
%description cvs
Tools for importing CVS repositories to the Git version control system.
%if %{with git_gnome_keyring}
%package credential-gnome-keyring
Summary: Git credential backend using the GNOME keyring as storage
Group: Development/Tools/Version Control
@ -181,9 +179,7 @@ Requires: gnome-keyring
%description credential-gnome-keyring
A Git credential backend which uses the GNOME keyring as storage.
%endif
%if %{with git_libsecret}
%package credential-libsecret
Summary: Git credential backend using libsecret to access keyring
Group: Development/Tools/Version Control
@ -192,7 +188,6 @@ Requires: git-core = %{version}
%description credential-libsecret
A Git credential backend which uses libsecret API to acces keyrings such as
kwallet or GNOME keyring.
%endif
%package arch
Summary: Git tools for importing Arch repositories
@ -220,7 +215,8 @@ Group: Development/Tools/Version Control
Requires: git-core = %{version}
Requires: perl-MailTools
# For sending mails over secure SMTP:
Recommends: perl-Net-SMTP-SSL, perl-Authen-SASL
Requires: perl-Authen-SASL
Requires: perl-Net-SMTP-SSL
%description email
Email interface for the GIT version control system.
@ -229,7 +225,9 @@ Email interface for the GIT version control system.
Summary: Simple Server for Git Repositories
Group: Development/Tools/Version Control
Requires: git-core = %{version}
PreReq: /usr/sbin/useradd %fillup_prereq
Requires(pre): %fillup_prereq
Requires(pre): %{_sbindir}/useradd
Requires(pre): group(nogroup)
%{?systemd_requires}
%description daemon
@ -292,8 +290,8 @@ directory /git/ that calls the cgi script.
%build
cat > .make <<'EOF'
#!/bin/bash
make %{_smp_mflags} CFLAGS="%{optflags}" \
GITWEB_CONFIG="/etc/gitweb.conf" \
make %{?_smp_mflags} CFLAGS="%{optflags}" \
GITWEB_CONFIG="%{_sysconfdir}/gitweb.conf" \
GITWEB_PROJECTROOT="/srv/git" \
WITH_OWN_SUBPROCESS_PY=YesPlease \
DESTDIR=%{buildroot} \
@ -336,18 +334,18 @@ chmod 755 .make
cp gitweb/INSTALL INSTALL.gitweb
cp gitweb/README README.gitweb
install -d %{buildroot}%{_datadir}/git-web
install -d %{buildroot}/etc/apache2/conf.d
install -m 644 %{SOURCE1} %{buildroot}/etc/apache2/conf.d/gitweb.conf
install -d %{buildroot}%{_sysconfdir}/apache2/conf.d
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apache2/conf.d/gitweb.conf
### git-daemon
install -d -m 755 %{buildroot}%{_unitdir}
install -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}/git-daemon.service
install -d -m 755 %{buildroot}%{_sbindir}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcgit-daemon
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcgit-daemon
install -d -m 755 %{buildroot}%{_fillupdir}
install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.git-daemon
install -d -m 755 %{buildroot}/srv/git
mkdir -p %{buildroot}/%{_fwdefdir}
install -m 644 %{S:6} %{buildroot}/%{_fwdefdir}/git-daemon
install -m 644 %{SOURCE6} %{buildroot}/%{_fwdefdir}/git-daemon
###
./.make -C contrib/subtree install
%{!?_without_docs: ./.make -C contrib/subtree install-doc}
@ -356,10 +354,10 @@ install -m 644 %{S:6} %{buildroot}/%{_fwdefdir}/git-daemon
(find %{buildroot}%{_mandir} -type f | grep -vE "archimport|p4|svn|git-cvs|email|gitk|git-daemon|gui" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files
%perl_process_packlist
%if %{with docs}
find %{buildroot}/%_mandir -type f -print0 | xargs -0 chmod 644
find %{buildroot}/%{_mandir} -type f -exec chmod 644 "{}" "+"
%endif
install -m 644 -D contrib/completion/git-completion.bash %{buildroot}/etc/bash_completion.d/git.sh
install -m 644 -D contrib/completion/git-prompt.sh %{buildroot}/etc/bash_completion.d/git-prompt.sh
install -m 644 -D contrib/completion/git-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/git.sh
install -m 644 -D contrib/completion/git-prompt.sh %{buildroot}%{_sysconfdir}/bash_completion.d/git-prompt.sh
# contrib/credential
%if %{with git_gnome_keyring}
install -m 755 -D contrib/credential/gnome-keyring/git-credential-gnome-keyring %{buildroot}/%{gitexecdir}/git-credential-gnome-keyring
@ -373,15 +371,15 @@ install -m 755 -D contrib/workdir/git-new-workdir %{buildroot}/%{_bindir}
(cd contrib/completion
mkdir -p %{buildroot}%{_datadir}/tcsh
tcsh ./git-completion.tcsh
install -m 644 -D git.csh %{buildroot}/etc/profile.d/git.csh
install -m 644 -D git.csh %{buildroot}%{_sysconfdir}/profile.d/git.csh
)
# zsh completion
install -m 644 -D contrib/completion/git-completion.zsh %{buildroot}/etc/zsh_completion.d/_git
install -m 644 -D contrib/completion/git-completion.zsh %{buildroot}%{_sysconfdir}/zsh_completion.d/_git
#
# apparmor profile for git-web
#
install -d -m 755 %{buildroot}/etc/apparmor.d
install -m 644 %{SOURCE5} %{buildroot}/etc/apparmor.d
install -d -m 755 %{buildroot}%{_sysconfdir}/apparmor.d
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/apparmor.d
#
# create predictable symlinks to make apparmor profile work
for i in git git-upload-archive git-receive-pack; do
@ -393,13 +391,13 @@ if ! test -f %{buildroot}%{gitexecdir}/git-add; then
exit 1
fi
mkdir -p "%buildroot/%_docdir/git" "%buildroot/%_docdir/git/howto" "%buildroot/%_docdir/git/technical"
cp -a README.md Documentation/*.txt "%buildroot/%_docdir/git/"
cp -a Documentation/howto/*.txt "%buildroot/%_docdir/git/howto/"
cp -a Documentation/technical/*.txt "%buildroot/%_docdir/git/technical/"
%{!?_without_docs: cp -a Documentation/*.html "%buildroot/%_docdir/git/"}
%{!?_without_docs: cp -a Documentation/howto/*.html "%buildroot/%_docdir/git/howto/"}
%{!?_without_docs: cp -a Documentation/technical/*.html "%buildroot/%_docdir/git/technical/"}
mkdir -p "%{buildroot}/%{_docdir}/git" "%{buildroot}/%{_docdir}/git/howto" "%{buildroot}/%{_docdir}/git/technical"
cp -a README.md Documentation/*.txt "%{buildroot}/%{_docdir}/git/"
cp -a Documentation/howto/*.txt "%{buildroot}/%{_docdir}/git/howto/"
cp -a Documentation/technical/*.txt "%{buildroot}/%{_docdir}/git/technical/"
%{!?_without_docs: cp -a Documentation/*.html "%{buildroot}/%{_docdir}/git/"}
%{!?_without_docs: cp -a Documentation/howto/*.html "%{buildroot}/%{_docdir}/git/howto/"}
%{!?_without_docs: cp -a Documentation/technical/*.html "%{buildroot}/%{_docdir}/git/technical/"}
install -d -m 755 %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE9} %{buildroot}%{_datadir}/applications
@ -416,8 +414,8 @@ cat %{name}.lang >>bin-man-doc-files
./.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 || :
if ! %{_bindir}/getent passwd git-daemon >/dev/null; then
%{_sbindir}/useradd -r -d %{_localstatedir}/lib/empty -s /bin/false -c "git daemon" -g nogroup git-daemon
fi
%service_add_pre git-daemon.service
@ -432,12 +430,12 @@ fi
%service_del_postun git-daemon.service
%files
%dir %_docdir/%name
%_docdir/%name/README.md
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/README.md
%files doc
%_docdir/%name/
%exclude %_docdir/%name/README.md
%{_docdir}/%{name}/
%exclude %{_docdir}/%{name}/README.md
%files svn
%{gitexecdir}/*svn*
@ -494,9 +492,9 @@ fi
%files web
%doc README.gitweb INSTALL.gitweb
%config(noreplace) /etc/apache2/conf.d/gitweb.conf
%config(noreplace) %{_sysconfdir}/apache2/conf.d/gitweb.conf
%{_datadir}/gitweb
/etc/apparmor.d
%{_sysconfdir}/apparmor.d
%files core -f bin-man-doc-files
%{_datadir}/git-core/
@ -505,13 +503,13 @@ fi
%{gitexecdir}/mergetools/guiffy
%{_bindir}/git-new-workdir
%if 0%{?suse_version} < 1140
/var/adm/perl-modules/%{name}
%{_localstatedir}/adm/perl-modules/%{name}
%endif
%attr(-,root,root) %{perl_vendorlib}/*
/etc/bash_completion.d/*.sh
%{_sysconfdir}/bash_completion.d/*.sh
%{_datadir}/tcsh
/etc/profile.d/*.csh
/etc/zsh_completion.d
%{_sysconfdir}/profile.d/*.csh
%{_sysconfdir}/zsh_completion.d
%license COPYING
%changelog