2015-04-27 12:08:55 +02:00
|
|
|
%global selinux_variants mls targeted
|
|
|
|
%global modulename dist_git
|
2017-02-21 16:04:11 +01:00
|
|
|
%global installdir /var/lib/dist-git
|
2015-04-27 12:08:55 +02:00
|
|
|
|
2015-04-22 10:10:31 +02:00
|
|
|
Name: dist-git
|
2018-11-23 08:50:19 +01:00
|
|
|
Version: 1.9
|
2015-04-22 10:10:31 +02:00
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Package source version control system
|
2015-03-30 13:07:29 +02:00
|
|
|
|
2017-02-08 10:02:21 +01:00
|
|
|
# upload.cgi uses GPLv1
|
|
|
|
License: MIT and GPLv1
|
2015-04-22 10:10:31 +02:00
|
|
|
URL: https://github.com/release-engineering/dist-git
|
|
|
|
# Source is created by
|
|
|
|
# git clone https://github.com/release-engineering/dist-git.git
|
|
|
|
# cd dist-git
|
|
|
|
# tito build --tgz
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
2015-03-30 13:07:29 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
2015-04-10 11:09:11 +02:00
|
|
|
BuildRequires: systemd
|
|
|
|
|
2015-04-22 10:10:31 +02:00
|
|
|
Requires: httpd
|
2015-04-27 09:22:37 +02:00
|
|
|
Requires: perl(Sys::Syslog)
|
2018-01-13 13:35:17 +01:00
|
|
|
Requires: dist-git-selinux
|
2017-02-06 12:02:34 +01:00
|
|
|
Requires: git
|
2015-04-22 10:10:31 +02:00
|
|
|
Requires: git-daemon
|
2015-04-10 15:17:46 +02:00
|
|
|
Requires: mod_ssl
|
2015-04-15 18:14:51 +02:00
|
|
|
Requires: fedmsg
|
2017-02-23 17:06:20 +01:00
|
|
|
Requires: crudini
|
2017-05-25 13:20:32 +02:00
|
|
|
Requires: moreutils
|
2015-03-31 14:08:34 +02:00
|
|
|
Requires(pre): shadow-utils
|
2015-03-30 13:07:29 +02:00
|
|
|
|
2018-02-19 10:54:27 +01:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
|
|
|
Requires: python-requests
|
|
|
|
Requires: python-configparser
|
|
|
|
Requires: python-grokmirror
|
|
|
|
%else
|
2018-02-05 19:30:41 +01:00
|
|
|
Requires: python2-requests
|
|
|
|
Requires: python2-configparser
|
2018-08-14 21:27:43 +02:00
|
|
|
Recommends: python3-grokmirror
|
2017-05-25 13:20:32 +02:00
|
|
|
%endif
|
|
|
|
|
2015-03-30 13:07:29 +02:00
|
|
|
%description
|
2015-04-22 10:10:31 +02:00
|
|
|
Dist Git is a remote Git repository specifically designed to hold RPM
|
2015-04-22 10:05:08 +02:00
|
|
|
package sources.
|
2015-03-30 13:07:29 +02:00
|
|
|
|
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
%package selinux
|
|
|
|
Summary: SELinux support for dist-git
|
|
|
|
|
|
|
|
BuildRequires: checkpolicy
|
|
|
|
BuildRequires: policycoreutils
|
|
|
|
BuildRequires: selinux-policy-devel
|
2015-04-29 10:44:32 +02:00
|
|
|
BuildRequires: hardlink
|
2015-04-27 12:08:55 +02:00
|
|
|
|
|
|
|
Requires: %name = %version-%release
|
|
|
|
%if "%{_selinux_policy_version}" != ""
|
2017-12-17 10:15:12 +01:00
|
|
|
Requires: selinux-policy >= %{_selinux_policy_version}
|
2015-04-27 12:08:55 +02:00
|
|
|
%endif
|
|
|
|
Requires(post): /usr/sbin/semodule, /sbin/restorecon
|
|
|
|
Requires(postun): /usr/sbin/semodule, /sbin/restorecon
|
|
|
|
|
|
|
|
|
|
|
|
%description selinux
|
|
|
|
Dist Git is a remote Git repository specifically designed to hold RPM
|
|
|
|
package sources.
|
|
|
|
|
|
|
|
This package includes SELinux support.
|
|
|
|
|
|
|
|
|
2015-03-30 13:07:29 +02:00
|
|
|
%prep
|
2015-03-30 15:19:30 +02:00
|
|
|
%setup -q
|
2015-03-30 13:07:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
%build
|
2015-04-27 12:08:55 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# SELinux
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
cd selinux
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
|
|
|
mv %{modulename}.pp %{modulename}.pp.${selinuxvariant}
|
|
|
|
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
|
|
|
done
|
|
|
|
cd -
|
2015-03-30 13:07:29 +02:00
|
|
|
|
|
|
|
|
2015-04-10 11:09:11 +02:00
|
|
|
%pre
|
2015-04-27 12:08:55 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Users and Groups
|
|
|
|
# ------------------------------------------------------------------------------
|
2015-04-10 11:09:11 +02:00
|
|
|
getent group packager > /dev/null || \
|
|
|
|
groupadd -r packager
|
2017-03-08 16:30:54 +01:00
|
|
|
exit 0
|
2015-04-10 11:09:11 +02:00
|
|
|
|
|
|
|
|
2015-03-30 13:07:29 +02:00
|
|
|
%install
|
2015-03-31 14:08:34 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
2017-03-08 16:30:54 +01:00
|
|
|
# /usr/share/ ........... scripts
|
2015-03-31 14:08:34 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
2017-02-22 14:43:23 +01:00
|
|
|
install -d %{buildroot}%{_datadir}/dist-git/
|
|
|
|
cp -a scripts/dist-git/* %{buildroot}%{_datadir}/dist-git/
|
2015-03-30 13:07:29 +02:00
|
|
|
|
2015-03-31 14:08:34 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# /etc/ .......... config files
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/dist-git
|
2017-02-22 10:34:51 +01:00
|
|
|
cp -a configs/dist-git/dist-git.conf %{buildroot}%{_sysconfdir}/dist-git/
|
2015-03-30 13:07:29 +02:00
|
|
|
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d/dist-git
|
2015-04-10 11:21:37 +02:00
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
2015-03-31 14:08:34 +02:00
|
|
|
|
2017-02-06 11:54:03 +01:00
|
|
|
cp -a configs/httpd/dist-git.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/
|
2015-03-30 13:07:29 +02:00
|
|
|
cp -a configs/httpd/dist-git/* %{buildroot}%{_sysconfdir}/httpd/conf.d/dist-git/
|
2015-04-10 11:09:11 +02:00
|
|
|
cp -a configs/systemd/* %{buildroot}%{_unitdir}/
|
2015-03-30 13:07:29 +02:00
|
|
|
|
2015-03-31 14:08:34 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# /var/lib/ ...... dynamic persistent files
|
|
|
|
# ------------------------------------------------------------------------------
|
2016-10-05 12:43:12 +02:00
|
|
|
install -d %{buildroot}%{installdir}
|
|
|
|
install -d %{buildroot}%{installdir}/git
|
|
|
|
install -d %{buildroot}%{installdir}/cache
|
|
|
|
install -d %{buildroot}%{installdir}/cache/lookaside
|
|
|
|
install -d %{buildroot}%{installdir}/cache/lookaside/pkgs
|
|
|
|
install -d %{buildroot}%{installdir}/web
|
|
|
|
|
|
|
|
cp -a scripts/httpd/upload.cgi %{buildroot}%{installdir}/web/
|
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# SELinux
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
cd selinux
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
|
|
|
install -p -m 644 %{modulename}.pp.${selinuxvariant} \
|
|
|
|
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp
|
|
|
|
done
|
|
|
|
cd -
|
2015-04-10 11:09:11 +02:00
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
2015-03-30 13:07:29 +02:00
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
%post selinux
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
/usr/sbin/semodule -s ${selinuxvariant} -i \
|
|
|
|
%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
|
|
|
|
done
|
2017-02-14 16:25:40 +01:00
|
|
|
%{_sbindir}/restorecon -v %{installdir}/cache || :
|
|
|
|
%{_sbindir}/restorecon -v %{installdir}/cache/lookaside || :
|
|
|
|
%{_sbindir}/restorecon -v %{installdir}/cache/lookaside/pkgs || :
|
|
|
|
%{_sbindir}/restorecon -v %{installdir}/git || :
|
|
|
|
%{_sbindir}/restorecon -Rv %{installdir}/web/ || :
|
2015-03-31 14:08:34 +02:00
|
|
|
|
2017-03-08 16:30:54 +01:00
|
|
|
%systemd_post dist-git.socket
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun dist-git.socket
|
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
%postun selinux
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
/usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2017-03-08 16:30:54 +01:00
|
|
|
%systemd_postun dist-git.socket
|
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Docs
|
|
|
|
# ------------------------------------------------------------------------------
|
2015-04-23 11:53:09 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
|
2015-03-31 14:08:34 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# /etc/ .......... config files
|
|
|
|
# ------------------------------------------------------------------------------
|
2015-04-23 11:53:09 +02:00
|
|
|
%dir %{_sysconfdir}/dist-git
|
2017-02-22 10:34:51 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/dist-git/dist-git.conf
|
2015-04-23 11:53:09 +02:00
|
|
|
%dir %{_sysconfdir}/httpd/conf.d/dist-git
|
2015-04-22 15:56:04 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/dist-git/*
|
2017-02-06 11:54:03 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/dist-git.conf
|
2015-04-22 10:10:31 +02:00
|
|
|
|
2016-10-05 12:43:12 +02:00
|
|
|
%{_unitdir}/dist-git@.service
|
|
|
|
%{_unitdir}/dist-git.socket
|
2015-03-31 14:08:34 +02:00
|
|
|
|
2016-10-05 12:43:12 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# /var/lib/ ...... dynamic persistent files
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# non-standard-dir-perm:
|
|
|
|
# - git repositories and their contents must have w permission for their creators
|
|
|
|
%dir %{installdir}
|
2017-04-08 15:15:36 +02:00
|
|
|
%attr (2775, -, packager) %{installdir}/git
|
2016-10-05 12:43:12 +02:00
|
|
|
%dir %{installdir}/web
|
|
|
|
%attr (755, apache, apache) %{installdir}/web/upload.cgi
|
|
|
|
%dir %{installdir}/cache
|
|
|
|
%dir %{installdir}/cache/lookaside
|
2017-04-07 13:31:36 +02:00
|
|
|
%attr (2775, apache, apache) %{installdir}/cache/lookaside/pkgs
|
|
|
|
|
2017-02-22 14:43:23 +01:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# /usr/share ...... executable files
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%dir %{_datadir}/dist-git
|
|
|
|
%attr (775, -, -) %{_datadir}/dist-git/*
|
|
|
|
|
2015-03-31 14:08:34 +02:00
|
|
|
|
2015-04-27 12:08:55 +02:00
|
|
|
%files selinux
|
|
|
|
%doc selinux/*
|
|
|
|
%{_datadir}/selinux/*/%{modulename}.pp
|
|
|
|
|
2015-03-31 14:08:34 +02:00
|
|
|
|
2015-03-30 13:07:29 +02:00
|
|
|
%changelog
|
2018-11-23 08:50:19 +01:00
|
|
|
* Fri Nov 23 2018 clime <clime@redhat.com> 1.9-1
|
|
|
|
- do not create sources file when creating a repo
|
|
|
|
- set umask 0002 in all available dist-git scripts
|
|
|
|
- Use REMOTE_USER as fallback for GSS_NAME
|
|
|
|
- add support for setting mtime for an uploaded file
|
|
|
|
|
|
|
|
* Tue Aug 14 2018 clime <clime@redhat.com> 1.8-1
|
|
|
|
- add disable group check option
|
|
|
|
- add lookaside_dir option
|
|
|
|
- deprecate cache_dir
|
|
|
|
- fix python-grokmirror dep
|
|
|
|
|
2018-02-26 14:27:45 +01:00
|
|
|
* Mon Feb 26 2018 clime <clime@redhat.com> 1.7-1
|
|
|
|
- move 'fedmsgs', 'old_paths', 'nomd5' options to optional upload section
|
|
|
|
|
2018-02-19 12:05:41 +01:00
|
|
|
* Mon Feb 19 2018 clime <clime@redhat.com> 1.6-1
|
|
|
|
- add 'fedmsgs', 'old_paths', and 'default_namespace' config options
|
|
|
|
- remove domain_read_all_domains_state SELinux rule
|
|
|
|
- require dist-git-selinux
|
|
|
|
- give optional map permission to git_system_t on git_user_content_t
|
|
|
|
- update requires to work for all environments
|
|
|
|
- make the package completely distribution-agnostic
|
|
|
|
|
2017-12-18 05:41:10 +01:00
|
|
|
* Mon Dec 18 2017 clime <clime@redhat.com> 1.5-1
|
|
|
|
- make selinux policy build on f27+
|
|
|
|
- add optional map SELinux permission for httpd_t
|
|
|
|
|
2017-07-25 15:27:02 +02:00
|
|
|
* Tue Jul 25 2017 clime <clime@redhat.com> 1.4-1
|
|
|
|
- disable md5 uploading by default
|
|
|
|
|
2017-06-26 21:29:34 +02:00
|
|
|
* Mon Jun 26 2017 clime <clime@redhat.com> 1.3-1
|
|
|
|
- translate '/' to '-' in package name for mailinglist hook
|
|
|
|
(graybrandon@gmail.com)
|
|
|
|
|
2017-05-26 16:34:25 +02:00
|
|
|
* Fri May 26 2017 clime <clime@redhat.com> 1.2-1
|
|
|
|
- remove mail git hook
|
|
|
|
- grokmirror support
|
|
|
|
|
2017-05-03 10:09:06 +02:00
|
|
|
* Wed May 03 2017 clime <clime@redhat.com> 1.1-1
|
|
|
|
- fix default config value for email
|
|
|
|
- fix name/email switch
|
|
|
|
|
2017-04-10 10:43:59 +02:00
|
|
|
* Mon Apr 10 2017 clime <clime@redhat.com> 1.0-1
|
|
|
|
- big redo of the package
|
|
|
|
- gitolite dropped from the package (but can be installed additionally)
|
|
|
|
- pkgdb integration dropped
|
|
|
|
- upload.cgi updated from FedoraInfra state
|
|
|
|
- git repos are stored one level higher in fs hiearchy (default: /var/lib/dist-git/git/)
|
|
|
|
- dist-git.conf completely new
|
|
|
|
- updated setup_git_package, mkbranch, mkbranch_branching
|
|
|
|
- updated SELinux policy
|
|
|
|
- configurable paths to cache dir and git repos
|
2017-12-18 05:41:10 +01:00
|
|
|
|
2015-08-05 13:44:02 +02:00
|
|
|
* Wed Aug 05 2015 Adam Samalik <asamalik@redhat.com> 0.13-1
|
|
|
|
- optional cgit_pkg_list.sh parameter (asamalik@redhat.com)
|
|
|
|
- change mv to cp + rm (asamalik@redhat.com)
|
|
|
|
- update config to not be Fedora specific (asamalik@redhat.com)
|
|
|
|
- Change: lookaside dir perms + cgit_pkg_list.sh (asamalik@redhat.com)
|
2017-02-08 10:02:21 +01:00
|
|
|
|
2015-07-20 14:01:34 +02:00
|
|
|
* Mon Jul 20 2015 Adam Samalik <asamalik@redhat.com> 0.12-1
|
|
|
|
- config update (asamalik@redhat.com)
|
|
|
|
- Upload files to new and old paths + remove email (asamalik@redhat.com)
|
|
|
|
|
2015-05-05 10:13:27 +02:00
|
|
|
* Tue May 05 2015 Adam Samalik <asamalik@redhat.com> 0.11-1
|
|
|
|
- SELinux subpackage
|
2017-02-08 10:02:21 +01:00
|
|
|
|
2015-04-27 09:24:21 +02:00
|
|
|
* Mon Apr 27 2015 Adam Samalik <asamalik@redhat.com> 0.10-1
|
|
|
|
- perl require and files update (asamalik@redhat.com)
|
|
|
|
|
2015-04-23 16:13:36 +02:00
|
|
|
* Thu Apr 23 2015 Adam Samalik <asamalik@redhat.com> 0.9-1
|
|
|
|
- update hook update (asamalik@redhat.com)
|
|
|
|
|
2015-04-23 14:55:05 +02:00
|
|
|
* Thu Apr 23 2015 Adam Samalik <asamalik@redhat.com> 0.8-1
|
|
|
|
- review update (asamalik@redhat.com)
|
|
|
|
|
2015-04-22 16:05:22 +02:00
|
|
|
* Wed Apr 22 2015 Adam Samalik <asamalik@redhat.com> 0.7-1
|
|
|
|
- git hooks permissions (asamalik@redhat.com)
|
|
|
|
- noreplace configs (asamalik@redhat.com)
|
|
|
|
- fixes after rpmlint (asamalik@redhat.com)
|
|
|
|
|
2015-04-22 10:05:23 +02:00
|
|
|
* Wed Apr 22 2015 Adam Samalik <asamalik@redhat.com> 0.6-1
|
|
|
|
- license + description (asamalik@redhat.com)
|
|
|
|
- cron files fix (asamalik@redhat.com)
|
|
|
|
|
2015-04-15 18:42:24 +02:00
|
|
|
* Wed Apr 15 2015 Adam Samalik <asamalik@redhat.com> 0.5-1
|
|
|
|
- git hook: update-block-push-origin (asamalik@redhat.com)
|
|
|
|
- lookaside-upload config comments (asamalik@redhat.com)
|
|
|
|
- gen-acls user fix (asamalik@redhat.com)
|
|
|
|
- ssl httpd configs as examples (asamalik@redhat.com)
|
|
|
|
|
2015-04-10 12:00:37 +02:00
|
|
|
* Fri Apr 10 2015 Adam Samalik <asamalik@redhat.com> 0.4-1
|
|
|
|
- spec and config fix
|
|
|
|
- systemd services
|
2017-02-08 10:02:21 +01:00
|
|
|
|
2015-03-31 17:19:52 +02:00
|
|
|
* Tue Mar 31 2015 Adam Samalik <asamalik@redhat.com> 0.3-1
|
|
|
|
- alpha package (asamalik@redhat.com)
|
|
|
|
|
2015-03-30 14:57:38 +02:00
|
|
|
* Mon Mar 30 2015 Adam Samalik <asamalik@redhat.com> 0.2-1
|
|
|
|
- new package built with tito
|
|
|
|
|
2015-03-30 13:07:29 +02:00
|
|
|
|