/rocketgit.spec.in (4cf6dc800a559467433b64621ab9d4dd9774f42d) (3501 bytes) (mode 100644) (type blob)
%global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls strict targeted || echo %{selinux_types})
%global selinux_policyver 0.0.0
Summary: Light and fast Git hosting solution
Name: @PRJ@
Version: @VER@
Release: @REV@
License: Affero GPLv3
Group: Development/Tools
Source: http://kernel.embedromix.ro/us/rocketgit/%{name}-%{version}.tar.gz
URL: http://kernel.embedromix.ro/us/
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildArch: noarch
Requires: httpd, php, php-cli, php-pgsql, php-mbstring, xinetd
Requires: git, cronie
Requires: util-linux
# SELinux stuff
# https://fedoraproject.org/wiki/SELinux_Policy_Modules_Packaging_Draft?rd=PackagingDrafts/SELinux/PolicyModules
BuildRequires: checkpolicy, selinux-policy-devel, hardlink
# Needed for Fedora <= 19
%if "%{selinux_policyver}" != ""
Requires: selinux-policy >= %{selinux_policyver}
%endif
Requires(pre): shadow-utils
Requires(post): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
%description
Light and fast Git hosting solution, similar with Gitorious/Gitolite/etc.
%pre
getent group rocketgit >/dev/null || groupadd -r rocketgit
getent passwd rocketgit >/dev/null || useradd -r -g rocketgit -s /bin/bash -m -d /home/rocketgit -c "RocketGit user" rocketgit
%post
for type in %{selinux_variants}
do
[ -r /tmp/rgsdebug ] && echo "Installing module ${type}..."
/usr/sbin/semodule -s ${type} -i \
@USR_SHARE@/selinux/${type}/@PRJ@.pp &> /dev/null || :
done
[ -r /tmp/rgsdebug ] && echo "fixfiles -R..."
/sbin/fixfiles -R @PRJ@ restore || :
# restorecon is needed because fixfiles -R will not restore the locks!
[ -r /tmp/rgsdebug ] && echo "restorecon -R..."
/sbin/restorecon -R @VAR_LIB@/@PRJ@ || :
if [ $1 -ne 0 ]; then
/sbin/service xinetd reload &>/dev/null || :
/sbin/service httpd reload &>/dev/null || :
fi
%postun
if [ $1 = 0 ]; then
for type in %{selinux_variants}
do
/usr/sbin/semodule -s ${type} -r @PRJ@ &> /dev/null || :
done
/sbin/fixfiles -R @PRJ@ restore || :
fi
%prep
%setup -q
%build
%configure
# TODO: should we do this in configure?!
make selinux_variants="%{selinux_variants}"
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}
make install DESTDIR=${RPM_BUILD_ROOT}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr (-,root,root,0755)
%dir @USR_SHARE@/@PRJ@
%doc README LICENSE Changelog TODO selinux/@PRJ@.*
%dir @ETC@/@PRJ@
%config(noreplace) @ETC@/@PRJ@/config.php
@ETC@/@PRJ@/config.php.sample
@ETC@/cron.d/rocketgit
@ETC@/logrotate.d/rocketgit
%config(noreplace) @ETC@/xinetd.d/rocketgit
%config(noreplace) @ETC@/httpd/conf.d/rocketgit.conf
%attr(0755,rocketgit,rocketgit) %dir @VAR_LOG@/@PRJ@
%attr(0755,apache,apache) %dir @VAR_LOG@/@PRJ@-web
%attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@
%attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/locks
%attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/repos
%attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/q_merge_requests
%attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/sockets
@USR_SHARE@/@PRJ@/*
@USR_SHARE@/selinux/*/@PRJ@.pp
%changelog
* Wed Oct 17 2012 Catalin(ux) M. BOIE <catab at embedromix dot ro> 0.10
Alpha1 version released with a lot of fixes and some features.
* Mon Jun 27 2011 Catalin(ux) M. BOIE <catab at embedromix dot ro> 0.2
Another round of bulk changes.
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
9 |
f3c7a7c5da68804a1bdf391127ba34aed33c3cca |
.exclude |
100644 |
blob |
102 |
eaeb7d777062c60a55cdd4b5734902cdf6e1790c |
.gitignore |
100644 |
blob |
212 |
e14603f109924434b214855ecc649e0dbfeaa851 |
AUTHORS |
100644 |
blob |
1132 |
dd65951315f3de6d52d52a82fca59889d1d95187 |
Certs.txt |
100644 |
blob |
731 |
4080772e93a3949e17e7a238a9a30fb43ccfd997 |
Compare.txt |
100644 |
blob |
202 |
76ae4b68b254d7b2fcc199dec13830136927826a |
History.txt |
100644 |
blob |
34520 |
dba13ed2ddf783ee8118c6a581dbf75305f816a3 |
LICENSE |
100644 |
blob |
2193 |
7528f3903e2d8dfcb629e1dc04ab71dd518834d9 |
Makefile.in |
100644 |
blob |
3825 |
34183feb4b2f10639e35acf146b94cadda95e89c |
README |
100644 |
blob |
59406 |
305ba6fa940fe2b9d36dd1815a03f1669dce38d6 |
TODO |
100644 |
blob |
1294 |
f22911eb777f0695fcf81ad686eac133eb11fcc4 |
TODO-plans |
040000 |
tree |
- |
21928e906ad2907a55c2e81c2a8b0502b586b8a0 |
artwork |
100755 |
blob |
30 |
92c4bc48245c00408cd7e1fd89bc1a03058f4ce4 |
configure |
040000 |
tree |
- |
f67d3605efbd6422a8acdd953578991139266391 |
docs |
100755 |
blob |
13704 |
87c4881d7f32f8179d29d86ee17ddbe0f6254c57 |
duilder |
100644 |
blob |
291 |
5aadcd3c293024f76583f67dec0a57fa78b47d19 |
duilder.conf |
040000 |
tree |
- |
753d466d716ad54ef3826c94084eec85c5d4ff03 |
hooks |
040000 |
tree |
- |
1f9e5019e17f99d76e34f23efeaf3db86330bd59 |
inc |
100644 |
blob |
3501 |
4cf6dc800a559467433b64621ab9d4dd9774f42d |
rocketgit.spec.in |
040000 |
tree |
- |
184401bef3d1790473a75ccdc9b7e18053cfb697 |
root |
040000 |
tree |
- |
4dc3f75586b6d4b7872c0c5a0f5785c1ff1aea80 |
samples |
040000 |
tree |
- |
4be8f2c415d68361d357b60be923d83e7249019d |
scripts |
040000 |
tree |
- |
67d785c5d4bbc0b48e1408281b91b40b981013b4 |
selinux |
100755 |
blob |
242 |
bfcfb00931a643571fec9082e3308c6b68ca9189 |
spell_check.sh |
040000 |
tree |
- |
c77a5ef2bafbb65762ae2ef3f41e073c6416405e |
tests |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit
Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main