/rocketgit.spec.in (51a49f94f963b81d59be494b6e308c92f13d5c6a) (3558 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
%attr(0700,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/tmp
@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 |
231 |
08460cbc6f39e8526b20a58dec2f993e64d569b0 |
AUTHORS |
100644 |
blob |
1132 |
dd65951315f3de6d52d52a82fca59889d1d95187 |
Certs.txt |
100644 |
blob |
1106 |
22ffae54bc4769711888273497ce0bdf49fe04ae |
Compare.txt |
100644 |
blob |
257 |
5ac9bb6eedc23c739dccf5ea9e472f2e5be3b4f6 |
History.txt |
100644 |
blob |
34520 |
dba13ed2ddf783ee8118c6a581dbf75305f816a3 |
LICENSE |
100644 |
blob |
2241 |
00feb72f58732b803fb130b4efe653919c372518 |
Makefile.in |
100644 |
blob |
3962 |
6236b45852db68b88ec62a367309949aff37e2ca |
README |
100644 |
blob |
69543 |
5013ef281845dd3e82356851dd3e2dd4d378234e |
TODO |
100644 |
blob |
1294 |
f22911eb777f0695fcf81ad686eac133eb11fcc4 |
TODO-plans |
100644 |
blob |
203 |
a2863c67c3da44126b61a15a6f09738c25e0fbe0 |
TODO.perf |
100644 |
blob |
239 |
3b7039a732dff7b4bd9c04b3252c136a5a4ae537 |
TODO.vm |
040000 |
tree |
- |
21928e906ad2907a55c2e81c2a8b0502b586b8a0 |
artwork |
100755 |
blob |
30 |
92c4bc48245c00408cd7e1fd89bc1a03058f4ce4 |
configure |
040000 |
tree |
- |
f67d3605efbd6422a8acdd953578991139266391 |
docs |
100755 |
blob |
13973 |
06c624a5b192128aec6d5b2831d823c63fa69fb9 |
duilder |
100644 |
blob |
291 |
045b3af10255ecb5a532a410cca81579240658c3 |
duilder.conf |
040000 |
tree |
- |
06571fbf2c30ba3796cd36a026956052dd44c144 |
hooks |
040000 |
tree |
- |
d2098210d456e9f2fd235af3a308975788b3d68a |
inc |
100644 |
blob |
3558 |
51a49f94f963b81d59be494b6e308c92f13d5c6a |
rocketgit.spec.in |
040000 |
tree |
- |
e9847d33678937027a57b77dbe5a36d128964068 |
root |
040000 |
tree |
- |
6b96b1a0f23c64e3ef2b2bdec37da08b6d76e2e2 |
samples |
040000 |
tree |
- |
dfd0dcfe350ab28ad4063b13ab01ccc36ebf74ea |
scripts |
040000 |
tree |
- |
ab77fbe1b5d3516691fc2cef7240ac4b69da273e |
selinux |
100755 |
blob |
242 |
bfcfb00931a643571fec9082e3308c6b68ca9189 |
spell_check.sh |
040000 |
tree |
- |
64b090b7c9827a89ef32c70f0301f486eb6406da |
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