Package init
This commit is contained in:
commit
edbe51a883
BIN
git-2.23.0.tar.sign
Normal file
BIN
git-2.23.0.tar.sign
Normal file
Binary file not shown.
BIN
git-2.23.0.tar.xz
Normal file
BIN
git-2.23.0.tar.xz
Normal file
Binary file not shown.
9
git-gui.desktop
Normal file
9
git-gui.desktop
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Git GUI
|
||||||
|
GenericName=Git GUI
|
||||||
|
Comment=A graphical interface to Git
|
||||||
|
Exec=git gui
|
||||||
|
Icon=/usr/share/git-gui/lib/git-gui.ico
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Development;
|
||||||
9
git.socket
Normal file
9
git.socket
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Git Activation Socket
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=9418
|
||||||
|
Accept=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
||||||
270
git.spec
Normal file
270
git.spec
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
%global gitexecdir %{_libexecdir}/git-core
|
||||||
|
Name: git
|
||||||
|
Version: 2.23.0
|
||||||
|
Release: 4
|
||||||
|
Summary: A popular and widely used Version Control System
|
||||||
|
License: GPLv2+ or LGPLv2.1
|
||||||
|
URL: https://git-scm.com/
|
||||||
|
Source0: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz
|
||||||
|
Source1: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.sign
|
||||||
|
|
||||||
|
Source100: git-gui.desktop
|
||||||
|
Source101: gitweb-httpd.conf
|
||||||
|
Source102: gitweb.conf.in
|
||||||
|
Source103: git@.service.in
|
||||||
|
Source104: git.socket
|
||||||
|
|
||||||
|
BuildRequires: openssl-devel libcurl-devel expat-devel systemd asciidoc xmlto glib2-devel libsecret-devel pcre-devel desktop-file-utils
|
||||||
|
BuildRequires: python3-devel perl-generators perl-interpreter
|
||||||
|
Requires: less zlib openssh-clients
|
||||||
|
Obsoletes: %{name}-core %{name}-core-doc %{name}-subtree %{name}-p4
|
||||||
|
Provides: %{name} <= %{version}-%{release} %{name}-core %{name}-subtree %{name}-p4
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
Git is a free and open source distributed version control system
|
||||||
|
designed to handle everything from small to very large projects
|
||||||
|
with speed and efficiency.
|
||||||
|
Git is easy to learn and has a tiny footprint with lightning fast
|
||||||
|
performance. It outclasses SCM tools like Subversion, CVS, Perforce,
|
||||||
|
and ClearCase with features like cheap local branching, convenient
|
||||||
|
staging areas, and multiple workflows.
|
||||||
|
|
||||||
|
%package daemon
|
||||||
|
Summary: Git server daemon
|
||||||
|
Requires: %{name} = %{version}-%{release} systemd
|
||||||
|
|
||||||
|
%description daemon
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%package gui
|
||||||
|
Summary: Graphical user interface to Git
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: %{name} = %{version}-%{release} tk
|
||||||
|
|
||||||
|
%description gui
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n gitk
|
||||||
|
Summary: TK based graphical tool for visualization of Git
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: %{name} = %{version}-%{release} tk
|
||||||
|
|
||||||
|
%description -n gitk
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%package web
|
||||||
|
Summary: Git web interfaces
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Obsoletes: gitweb %{name}-instaweb
|
||||||
|
Provides: gitweb %{name}-instaweb
|
||||||
|
|
||||||
|
%description web
|
||||||
|
Git web interface allows user browsing git repositories via web service.
|
||||||
|
|
||||||
|
|
||||||
|
%package cvs
|
||||||
|
Summary: Git tools for importing CVS repositories
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: %{name} = %{version}-%{release} cvs cvsps perl-DBD-SQLite
|
||||||
|
|
||||||
|
%description cvs
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%package svn
|
||||||
|
Summary: Git tools for importing Subversion repositories
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: %{name} = %{version}-%{release} subversion perl-TermReadKey perl-Digest-MD5
|
||||||
|
|
||||||
|
%description svn
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package email
|
||||||
|
Summary: Git tools for sending patches via email
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: git = %{version}-%{release}
|
||||||
|
Requires: perl-Authen-SASL perl-Net-SMTP-SSL
|
||||||
|
|
||||||
|
%description email
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package -n perl-Git
|
||||||
|
Summary: Perl interface to Git
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: git = %{version}-%{release} perl-libs
|
||||||
|
|
||||||
|
%description -n perl-Git
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package -n perl-Git-SVN
|
||||||
|
Summary: Perl interface to Git::SVN
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: git = %{version}-%{release} perl-libs
|
||||||
|
|
||||||
|
%description -n perl-Git-SVN
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Man pages and documents for Git system
|
||||||
|
BuildArch: noarch
|
||||||
|
Obsoletes: %{name}-core-doc
|
||||||
|
Provides: %{name}-core-doc
|
||||||
|
|
||||||
|
%description help
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
|
||||||
|
# Some options can not configure in configure script, so give options here (config.mak included in Makefile)
|
||||||
|
cat > config.mak << EOF
|
||||||
|
CFLAGS = %{optflags}
|
||||||
|
LDFLAGS = %{__global_ldflags}
|
||||||
|
NEEDS_CRYPTO_WITH_SSL = 1
|
||||||
|
USE_LIBPCRE = 1
|
||||||
|
INSTALL_SYMLINKS = 1
|
||||||
|
GNU_ROFF = 1
|
||||||
|
GITWEB_PROJECTROOT = %{_localstatedir}/lib/git
|
||||||
|
PYTHON_PATH = %{__python3}
|
||||||
|
htmldir = %{?_pkgdocdir}
|
||||||
|
perllibdir = %{perl_vendorlib}
|
||||||
|
gitwebdir = %{_localstatedir}/www/git
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Default using python3
|
||||||
|
sed -i '1s@#![ ]*/usr/bin/env python@#!%{__python3}@' \
|
||||||
|
contrib/hooks/multimail/git_multimail.py \
|
||||||
|
contrib/hooks/multimail/migrate-mailhook-config \
|
||||||
|
contrib/hooks/multimail/post-receive.example
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
%make_build -C contrib/subtree/
|
||||||
|
%make_build -C contrib/contacts/
|
||||||
|
%make_build -C contrib/credential/libsecret/
|
||||||
|
%make_build -C contrib/diff-highlight/
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install install-doc
|
||||||
|
%make_install -C contrib/subtree/ install-doc
|
||||||
|
%make_install -C contrib/contacts/ install-doc
|
||||||
|
|
||||||
|
install -p -m 644 README.md %{buildroot}%{_pkgdocdir}
|
||||||
|
install -p -m 644 gitweb/INSTALL %{buildroot}%{_pkgdocdir}/INSTALL.gitweb
|
||||||
|
install -p -m 644 gitweb/README %{buildroot}%{_pkgdocdir}/README.gitweb
|
||||||
|
|
||||||
|
# install root path for gitweb
|
||||||
|
mkdir -p %{buildroot}%{_localstatedir}/lib/git
|
||||||
|
|
||||||
|
# install config files
|
||||||
|
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE100}
|
||||||
|
install -D -p -m 644 %{SOURCE101} %{buildroot}%{_sysconfdir}/httpd/conf.d/gitweb-httpd.conf
|
||||||
|
install -D -p -m 644 %{SOURCE102} %{buildroot}%{_sysconfdir}/gitweb.conf
|
||||||
|
install -D -p -m 644 %{SOURCE103} %{buildroot}%{_unitdir}/git@.service
|
||||||
|
install -D -p -m 644 %{SOURCE104} %{buildroot}%{_unitdir}/git.socket
|
||||||
|
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
cat %{name}.lang >> git-bin-files
|
||||||
|
|
||||||
|
# split out bin for primary package
|
||||||
|
(find %{buildroot}{%{_bindir},%{gitexecdir}} -type f -o -type l | grep -vE "git-(gui|daemon|cvs|svn|instaweb|citool|send-email)" | \
|
||||||
|
sed -e s@^%{buildroot}@@) >> git-bin-files
|
||||||
|
|
||||||
|
(find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) > perl-git-files
|
||||||
|
(find %{buildroot}%{perl_vendorlib} -mindepth 1 -type d | sed -e 's@^%{buildroot}@%dir @') >> perl-git-files
|
||||||
|
# split out perl files for Git and Git::SVN
|
||||||
|
grep Git/SVN perl-git-files > perl-git-svn-files
|
||||||
|
sed -i "/Git\/SVN/ d" perl-git-files
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
|
%preun daemon
|
||||||
|
%systemd_preun git@.service
|
||||||
|
|
||||||
|
%post daemon
|
||||||
|
%systemd_post git@.service
|
||||||
|
|
||||||
|
%postun daemon
|
||||||
|
%systemd_postun_with_restart git@.service
|
||||||
|
|
||||||
|
%files -f git-bin-files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc README.md
|
||||||
|
%license LGPL-2.1 COPYING
|
||||||
|
|
||||||
|
%files daemon
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_unitdir}/git.socket
|
||||||
|
%{_unitdir}/git@.service
|
||||||
|
%{gitexecdir}/git-daemon
|
||||||
|
%{_localstatedir}/lib/git
|
||||||
|
|
||||||
|
%files gui
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_datadir}/applications/git-gui.desktop
|
||||||
|
%{gitexecdir}/git-gui*
|
||||||
|
%{gitexecdir}/git-citool
|
||||||
|
%{_datadir}/git-gui/
|
||||||
|
|
||||||
|
%files -n gitk
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/gitk
|
||||||
|
%{_datadir}/gitk/
|
||||||
|
|
||||||
|
%files web
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_pkgdocdir}/*.gitweb
|
||||||
|
%config(noreplace) %{_sysconfdir}/gitweb.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/gitweb-httpd.conf
|
||||||
|
%{_localstatedir}/www/git/
|
||||||
|
%{gitexecdir}/git-instaweb
|
||||||
|
|
||||||
|
%files cvs
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/git-cvsserver
|
||||||
|
%{gitexecdir}/git-cvs*
|
||||||
|
|
||||||
|
%files svn
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{gitexecdir}/git-svn
|
||||||
|
|
||||||
|
%files email
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{gitexecdir}/*email*
|
||||||
|
|
||||||
|
%files -n perl-Git -f perl-git-files
|
||||||
|
|
||||||
|
%files -n perl-Git-SVN -f perl-git-svn-files
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%exclude %{_pkgdocdir}/{README.md,*.gitweb}
|
||||||
|
%{_pkgdocdir}/*
|
||||||
|
%{_mandir}/man1/git*.1.*
|
||||||
|
%{_mandir}/man3/Git.*
|
||||||
|
%{_mandir}/man5/git*.5.*
|
||||||
|
%{_mandir}/man7/git*.7.*
|
||||||
|
#templates for users
|
||||||
|
%{_datadir}/git-core/
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Sep 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.23.0-4
|
||||||
|
- Modify license
|
||||||
|
|
||||||
|
* Wed Sep 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.23.0-3
|
||||||
|
- Split out perl-Git-SVN
|
||||||
|
|
||||||
|
* Wed Sep 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.23.0-2
|
||||||
|
- Split Package
|
||||||
|
|
||||||
|
* Sat Aug 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.23.0-1
|
||||||
|
- Package init
|
||||||
10
git@.service.in
Normal file
10
git@.service.in
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Git Repositories Server Daemon
|
||||||
|
Documentation=man:git-daemon(1)
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=nobody
|
||||||
|
ExecStart=-/usr/libexec/git-core/git-daemon --base-path=/var/lib/git --export-all \
|
||||||
|
--user-path=public_git --inetd --log-destination=stderr --verbose
|
||||||
|
StandardInput=socket
|
||||||
|
StandardError=journal
|
||||||
7
gitweb-httpd.conf
Normal file
7
gitweb-httpd.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Alias /git /var/www/git
|
||||||
|
|
||||||
|
<Directory /var/www/git>
|
||||||
|
Options +ExecCGI
|
||||||
|
AddHandler cgi-script .cgi
|
||||||
|
DirectoryIndex gitweb.cgi
|
||||||
|
</Directory>
|
||||||
53
gitweb.conf.in
Normal file
53
gitweb.conf.in
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# The gitweb config file is a fragment of perl code. You can set variables
|
||||||
|
# using "our $variable = value"; text from "#" character until the end of a
|
||||||
|
# line is ignored. See perlsyn(1) man page for details.
|
||||||
|
#
|
||||||
|
# See /usr/share/doc/gitweb-*/README and /usr/share/doc/gitweb-*/INSTALL for
|
||||||
|
# more details and available configuration variables.
|
||||||
|
|
||||||
|
# Set the path to git projects. This is an absolute filesystem path which will
|
||||||
|
# be prepended to the project path.
|
||||||
|
#our $projectroot = "/var/lib/git";
|
||||||
|
|
||||||
|
# Set the list of git base URLs used for URL to where fetch project from, i.e.
|
||||||
|
# the full URL is "$git_base_url/$project". By default this is empty
|
||||||
|
#our @git_base_url_list = qw(git://git.example.com
|
||||||
|
# ssh://git.example.com/var/lib/git);
|
||||||
|
|
||||||
|
# Enable the 'blame' blob view, showing the last commit that modified
|
||||||
|
# each line in the file. This can be very CPU-intensive. Disabled by default
|
||||||
|
#$feature{'blame'}{'default'} = [1];
|
||||||
|
#
|
||||||
|
# Allow projects to override the default setting via git config file.
|
||||||
|
# Example: gitweb.blame = 0|1;
|
||||||
|
#$feature{'blame'}{'override'} = 1;
|
||||||
|
|
||||||
|
# Disable the 'snapshot' link, providing a compressed archive of any tree. This
|
||||||
|
# can potentially generate high traffic if you have large project. Enabled for
|
||||||
|
# .tar.gz snapshots by default.
|
||||||
|
#
|
||||||
|
# Value is a list of formats defined in %known_snapshot_formats that you wish
|
||||||
|
# to offer.
|
||||||
|
#$feature{'snapshot'}{'default'} = [];
|
||||||
|
#
|
||||||
|
# Allow projects to override the default setting via git config file.
|
||||||
|
# Example: gitweb.snapshot = tbz2,zip; (use "none" to disable)
|
||||||
|
#$feature{'snapshot'}{'override'} = 1;
|
||||||
|
|
||||||
|
# Disable grep search, which will list the files in currently selected tree
|
||||||
|
# containing the given string. This can be potentially CPU-intensive, of
|
||||||
|
# course. Enabled by default.
|
||||||
|
#$feature{'grep'}{'default'} = [0];
|
||||||
|
#
|
||||||
|
# Allow projects to override the default setting via git config file.
|
||||||
|
# Example: gitweb.grep = 0|1;
|
||||||
|
#$feature{'grep'}{'override'} = 1;
|
||||||
|
|
||||||
|
# Disable the pickaxe search, which will list the commits that modified a given
|
||||||
|
# string in a file. This can be practical and quite faster alternative to
|
||||||
|
# 'blame', but still potentially CPU-intensive. Enabled by default.
|
||||||
|
#$feature{'pickaxe'}{'default'} = [0];
|
||||||
|
#
|
||||||
|
# Allow projects to override the default setting via git config file.
|
||||||
|
# Example: gitweb.pickaxe = 0|1;
|
||||||
|
#$feature{'pickaxe'}{'override'} = 1;
|
||||||
Loading…
x
Reference in New Issue
Block a user