xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / selinux / build.sh (63e1b87190d9e5afc760aa0355acd2bf61fcdd10) (764B) (mode 100755) [raw]
#!/bin/bash

if [ -z "${selinux_variants}" ]; then
	selinux_variants="mls targeted minimum"
fi

if [ -z "${PRJ}" ]; then
	echo "Define PRJ first!"
	exit 1
fi

# test if we need to rebuild the policy
last_mod=`stat --format=%Y ${PRJ}.{te,if,fc} | sort -r -n | head -n 1`

if [ -r "out/done" ]; then
	last_done=`stat --format=%Y out/done`
else
	last_done="0"
fi

if [ "${last_done}" -gt ${last_mod} ]; then
	echo "No need to rebuild SELinux policy."
	exit 0
fi

for type in ${selinux_variants}; do
	make NAME=${type} -f /usr/share/selinux/devel/Makefile
	mkdir -p out
	mv ${PRJ}.pp out/${PRJ}-${type}.pp
	make NAME=${type} -f /usr/share/selinux/devel/Makefile clean
done

# Hard link identical policies (thanks, crossfire)
/usr/sbin/hardlink -cv out

touch out/done
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://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master