Removed obsolete ebuilds

git-svn-id: svn+ssh://svnintern.kmrc.de/projects/gentoo/iwm-overlay@39695 cbe59ace-07ea-0310-918e-868702b5370d
This commit is contained in:
Torsten Kurbad 2017-07-14 16:07:01 +00:00
parent f55eb6dcfd
commit 1f6bd45c8d
51 changed files with 0 additions and 5759 deletions

View File

@ -1,7 +0,0 @@
AUX 70svn-gentoo.el 443 RMD160 300189eea80dfefa0f2a8479f67d255b39fd2adb SHA1 245b5ed611755276016bc76de2eabdc117e2c511 SHA256 23aa9effa5aea7ae73d14ae4df1a9269135137a5e483b4ff2a501dc130d7d1be
AUX svnserve.confd 323 RMD160 cbf4d810d9f41bac1611004741170d1047cbeef0 SHA1 39e922bc777ba847eb85d421d92f560f84b895b5 SHA256 90d3e2532715a6230ebf65023566a6591eed4b3fc12abbca0d2fb7949e146006
AUX svnserve.confd2 320 RMD160 dc1e74d06d9bd3eeb1a8dfd20aacebecd8378abb SHA1 557191219c3afa90126b8a2bfe7dd62b8a09eb82 SHA256 c70655c073dc06f538c5acdbcd49e216f4be2c859ce395bdf78757a1eeccab00
AUX svnserve.initd 817 RMD160 59f4e8e983d4595b7c27615889a9c0809d015a18 SHA1 483b47512fb444c0f752ad4eb6c3252f659a967e SHA256 6b483e211b5c311079605e246fca9228c7e5762d27a023fa4c4529fdaa766b08
AUX svnserve.xinetd 332 RMD160 c2fc4eb02da7e7405756fce650b8897f0a9da7f7 SHA1 d7d478fc257a40626888f9b12ee218df55dac570 SHA256 267f30c78ef6428aeeb97d3c64c06b9acfba4bc624766fc3c6a6d2c4133799a2
DIST subversion-1.5.7.tar.bz2 4952962 RMD160 eede9db32d516b19d246e6ccba1d6f25222e04de SHA1 1fecff77387a48f0d48fd87c59fe5deb87407f16 SHA256 5a7665508d4fa5875d797cf4294a7ce6dd412e56c104acc39667271651ea3ba0
EBUILD subversion-1.5.7.ebuild 27739 RMD160 cdab216ce12b85880d2548140575ed005c3418f3 SHA1 24905beb6065f260cf8d28dc9b1c05f1871a1780 SHA256 55476bff63ce7f074966219419cc8e2589bed8dde4b7730e6a43ba4b9858b084

View File

@ -1,13 +0,0 @@
;;; subversion site-lisp configuration
(add-to-list 'load-path "@SITELISP@")
(and (< emacs-major-version 22)
(add-to-list 'load-path "@SITELISP@/compat"))
(add-to-list 'vc-handled-backends 'SVN)
(defalias 'svn-examine 'svn-status)
(autoload 'svn-status "dsvn" "Run `svn status'." t)
(autoload 'svn-update "dsvn" "Run `svn update'." t)
(autoload 'svn-status "psvn"
"Examine the status of Subversion working copy in directory DIR." t)

View File

@ -1,10 +0,0 @@
# The commented variables in this file are the defaults that are used
# in the init-script. You don't need to uncomment them except to
# customize them to different values.
# Options for svnserve
#SVNSERVE_OPTS="--root=/var/svn"
# User and group as which to run svnserve
#SVNSERVE_USER="apache"
#SVNSERVE_GROUP="apache"

View File

@ -1,10 +0,0 @@
# The commented variables in this file are the defaults that are used
# in the init-script. You don't need to uncomment them except to
# customize them to different values.
# Options for svnserve
#SVNSERVE_OPTS="--root=/var/svn"
# User and group as which to run svnserve
SVNSERVE_USER="svn"
SVNSERVE_GROUP="svnusers"

View File

@ -1,26 +0,0 @@
#!/sbin/runscript
# Copyright 2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/files/svnserve.initd,v 1.2 2005/08/25 13:59:48 pauldv Exp $
depend() {
need net
}
start() {
ebegin "Starting svnserve"
# Ensure that we run from a readable working dir, and that we do not
# lock filesystems when being run from such a location.
cd /
start-stop-daemon --start --quiet --background --make-pidfile \
--pidfile /var/run/svnserve.pid --exec /usr/bin/svnserve \
--chuid ${SVNSERVE_USER:-apache}:${SVNSERVE_GROUP:-apache} -- \
--foreground --daemon ${SVNSERVE_OPTS:---root=/var/svn}
eend $?
}
stop() {
ebegin "Stopping svnserve"
start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid
eend $?
}

View File

@ -1,14 +0,0 @@
service svn
{
socket_type = stream
wait = no
user = apache
group = apache
umask = 002
protocol = tcp
log_on_failure += USERID HOST
port = 3690
server = /usr/bin/svnserve
server_args = -i
disable = yes
}

View File

@ -1,813 +0,0 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.11.ebuild,v 1.1 2010/05/26 21:28:07 arfrever Exp $
EAPI="3"
SUPPORT_PYTHON_ABIS="1"
WANT_AUTOMAKE="none"
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python
DESCRIPTION="Advanced version control system"
HOMEPAGE="http://subversion.apache.org/"
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2"
RESTRICT="nomirror"
LICENSE="Subversion"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="apache2 berkdb debug doc +dso emacs extras java nls perl python ruby sasl test vim-syntax +webdav-neon webdav-serf"
CDEPEND=">=dev-libs/apr-1.3:1
>=dev-libs/apr-util-1.3:1
dev-libs/expat
sys-libs/zlib
berkdb? ( =sys-libs/db-4* )
emacs? ( virtual/emacs )
perl? ( dev-lang/perl )
python? ( =dev-lang/python-2* )
ruby? ( >=dev-lang/ruby-1.8.2 )
sasl? ( dev-libs/cyrus-sasl )
webdav-neon? ( >=net-misc/neon-0.28 )
webdav-serf? ( =net-libs/serf-0.3* )"
RDEPEND="${CDEPEND}
apache2? ( www-servers/apache[apache2_modules_dav] )
java? ( >=virtual/jre-1.5 )
nls? ( virtual/libintl )
perl? ( dev-perl/URI )"
APACHE_TEST_DEPEND="|| (
=www-servers/apache-2.4*[apache2_modules_auth_basic,apache2_modules_authn_core,apache2_modules_authn_file,apache2_modules_authz_core,apache2_modules_authz_user,apache2_modules_dav,apache2_modules_log_config,apache2_modules_unixd]
=www-servers/apache-2.2*[apache2_modules_auth_basic,apache2_modules_authn_file,apache2_modules_dav,apache2_modules_log_config]
)"
DEPEND="${CDEPEND}
>=sys-apps/sandbox-1.6
doc? ( app-doc/doxygen )
java? ( >=virtual/jdk-1.5 )
nls? ( sys-devel/gettext )
test? (
=dev-lang/python-2*
webdav-neon? ( ${APACHE_TEST_DEPEND} )
webdav-serf? ( ${APACHE_TEST_DEPEND} )
)
webdav-neon? ( dev-util/pkgconfig )"
RESTRICT_PYTHON_ABIS="3.*"
want_apache
S="${WORKDIR}/${P/_/-}"
# Allow for custom repository locations.
# This can't be in pkg_setup() because the variable needs to be available to pkg_config().
: ${SVN_REPOS_LOC:=/var/svn}
pkg_setup() {
if use berkdb; then
einfo
if [[ -z "${SVN_BDB_VERSION}" ]]; then
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")"
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB."
fi
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}"
einfo
local apu_bdb_version="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying"
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}."
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"."
eerror "Aborting to avoid possible run-time crashes."
die "Berkeley DB version mismatch"
fi
fi
depend.apache_pkg_setup
java-pkg-opt-2_pkg_setup
if ! use webdav-neon && ! use webdav-serf; then
ewarn
ewarn "WebDAV support is disabled. You need WebDAV to"
ewarn "access repositories through the HTTP protocol."
ewarn
ewarn "WebDAV support needs one of the following USE flags enabled:"
ewarn " webdav-neon webdav-serf"
ewarn
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:"
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf"
ewarn
echo -ne "\a"
fi
if use test; then
elog
elog "\e[1;31m************************************************************************************************\e[0m"
elog
elog "NOTES ABOUT TESTS"
elog
elog "You can set the following variables to enable testing of some features and configure testing:"
if use webdav-neon || use webdav-serf; then
elog " SVN_TEST_APACHE_PORT=integer - Set Apache port number (Default value: 62208)"
fi
elog " SVN_TEST_SVNSERVE_PORT=integer - Set svnserve port number (Default value: 62209)"
elog " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories"
elog " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 62210)"
elog " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories"
elog " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories"
elog " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)"
if use java || use perl || use python || use ruby; then
elog " (Testing of bindings requires ${CATEGORY}/${PF})"
fi
if use java; then
elog " (Testing of JavaHL library requires dev-java/junit:4)"
fi
elog
elog "\e[1;31m************************************************************************************************\e[0m"
elog
if ! use apache2 && { use webdav-neon || use webdav-serf; }; then
eerror "Testing of libsvn_ra_neon / libsvn_ra_serf requires support for Apache."
die "Enable \"apache2\" USE flag."
fi
if [[ -n "${SVN_TEST_APACHE_PORT}" ]] && ! ([[ "$((${SVN_TEST_APACHE_PORT}))" == "${SVN_TEST_APACHE_PORT}" ]]) &>/dev/null; then
die "Value of SVN_TEST_APACHE_PORT must be an integer"
fi
if [[ -n "${SVN_TEST_SVNSERVE_PORT}" ]] && ! ([[ "$((${SVN_TEST_SVNSERVE_PORT}))" == "${SVN_TEST_SVNSERVE_PORT}" ]]) &>/dev/null; then
die "Value of SVN_TEST_SVNSERVE_PORT must be an integer"
fi
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then
die "net-misc/memcached must be installed"
fi
if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then
die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer"
fi
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then
die "Value of SVN_TEST_FSFS_SHARDING must be an integer"
fi
if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then
die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING"
fi
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then
if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then
die "${CATEGORY}/${PF} must be installed"
fi
if use java && ! has_version dev-java/junit:4; then
die "dev-java/junit:4 must be installed"
fi
fi
fi
if use debug; then
append-cppflags -DSVN_DEBUG -DAP_DEBUG
fi
}
src_prepare() {
#epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch"
#epatch "${FILESDIR}/${PN}-1.6.2-local_library_preloading.patch"
#epatch "${FILESDIR}/${PN}-1.6.3-kwallet_window.patch"
#chmod +x build/transform_libtool_scripts.sh || die "chmod failed"
if ! use test; then
sed -i \
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
fi
sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed"
eautoconf
elibtoolize
sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed"
}
src_configure() {
local myconf
if use python || use perl || use ruby; then
myconf+=" --with-swig"
else
myconf+=" --without-swig"
fi
if use java; then
if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then
myconf+=" --with-junit=/usr/share/junit-4/lib/junit.jar"
else
myconf+=" --without-junit"
fi
fi
econf --libdir="/usr/$(get_libdir)" \
$(use_with apache2 apxs "${APXS}") \
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
$(use_enable dso runtime-module-search) \
$(use_enable java javahl) \
$(use_with java jdk "${JAVA_HOME}") \
$(use_enable nls) \
$(use_with sasl) \
$(use_with webdav-neon neon /usr) \
$(use_with webdav-serf serf /usr) \
${myconf} \
--with-apr=/usr/bin/apr-1-config \
--with-apr-util=/usr/bin/apu-1-config \
--disable-experimental-libtool \
--without-jikes \
--disable-mod-activation \
--disable-neon-version-check
}
src_compile() {
einfo
einfo "Building of core of Subversion"
einfo
emake local-all || die "Building of core of Subversion failed"
if use python; then
einfo
einfo "Building of Subversion SWIG Python bindings"
einfo
python_copy_sources subversion/bindings/swig/python
rm -fr subversion/bindings/swig/python
swig_python_bindings_building() {
rm -f subversion/bindings/swig/python
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python
emake \
PYTHON_INCLUDES="-I$(python_get_includedir)" \
PYTHON_VERSION="$(python_get_version)" \
swig_pydir="$(python_get_sitedir)/libsvn" \
swig_pydir_extra="$(python_get_sitedir)/svn" \
swig-py
}
python_execute_function \
--action-message 'Building of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \
--failure-message 'Building of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \
swig_python_bindings_building
fi
if use perl; then
einfo
einfo "Building of Subversion SWIG Perl bindings"
einfo
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed"
fi
if use ruby; then
einfo
einfo "Building of Subversion SWIG Ruby bindings"
einfo
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed"
fi
if use java; then
einfo
einfo "Building of Subversion JavaHL library"
einfo
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "Building of Subversion JavaHL library failed"
fi
if use emacs; then
einfo
einfo "Compilation of Emacs modules"
einfo
elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el doc/svn-doc.el doc/tools/svnbook.el || die "Compilation of Emacs modules failed"
fi
if use extras; then
einfo
einfo "Building of contrib and tools"
einfo
emake contrib || die "Building of contrib failed"
emake tools || die "Building of tools failed"
fi
if use doc; then
einfo
einfo "Building of Subversion HTML documentation"
einfo
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
if use java; then
einfo
einfo "Building of Subversion JavaHL library HTML documentation"
einfo
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed"
fi
fi
}
create_apache_tests_configuration() {
get_loadmodule_directive() {
if [[ "$("${APACHE_BIN}" -l)" != *"mod_$1.c"* ]]; then
echo "LoadModule $1_module \"${APACHE_MODULESDIR}/mod_$1.so\""
fi
}
get_loadmodule_directives() {
if has_version "=www-servers/apache-2.4*"; then
get_loadmodule_directive auth_basic
get_loadmodule_directive authn_core
get_loadmodule_directive authn_file
get_loadmodule_directive authz_core
get_loadmodule_directive authz_user
get_loadmodule_directive dav
get_loadmodule_directive log_config
get_loadmodule_directive unixd
else
get_loadmodule_directive auth_basic
get_loadmodule_directive authn_file
get_loadmodule_directive dav
get_loadmodule_directive log_config
fi
}
mkdir -p "${T}/apache"
cat << EOF > "${T}/apache/apache.conf"
$(get_loadmodule_directives)
LoadModule dav_svn_module "${S}/subversion/mod_dav_svn/.libs/mod_dav_svn.so"
LoadModule authz_svn_module "${S}/subversion/mod_authz_svn/.libs/mod_authz_svn.so"
User $(id -un)
Group $(id -gn)
Listen localhost:${SVN_TEST_APACHE_PORT}
ServerName localhost
ServerRoot "${T}"
DocumentRoot "${T}"
CoreDumpDirectory "${T}"
PidFile "${T}/apache.pid"
CustomLog "${T}/apache/access_log" "%h %l %u %{%Y-%m-%dT%H:%M:%S}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
CustomLog "${T}/apache/svn_log" "%{%Y-%m-%dT%H:%M:%S}t %u %{SVN-REPOS-NAME}e %{SVN-ACTION}e" env=SVN-ACTION
ErrorLog "${T}/apache/error_log"
LogLevel Debug
MaxRequestsPerChild 0
<Directory />
AllowOverride None
</Directory>
<Location /svn-test-work/repositories>
DAV svn
SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories"
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz"
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile "${T}/apache/users"
Require valid-user
</Location>
<Location /svn-test-work/local_tmp/repos>
DAV svn
SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos"
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz"
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile "${T}/apache/users"
Require valid-user
</Location>
EOF
cat << EOF > "${T}/apache/users"
jrandom:xCGl35kV9oWCY
jconstant:xCGl35kV9oWCY
EOF
}
set_tests_variables() {
if [[ "$1" == "local" ]]; then
base_url="file://${S}/subversion/tests/cmdline"
http_library=""
fi
if [[ "$1" == "svn" ]]; then
base_url="svn://127.0.0.1:${SVN_TEST_SVNSERVE_PORT}"
http_library=""
fi
if [[ "$1" == "neon" || "$1" == "serf" ]]; then
base_url="http://127.0.0.1:${SVN_TEST_APACHE_PORT}"
http_library="$1"
fi
}
src_test() {
if ! use test; then
die "Invalid configuration"
fi
local fs_type fs_types ra_type ra_types options failed_tests
fs_types="fsfs"
use berkdb && fs_types+=" bdb"
ra_types="local svn"
use webdav-neon && ra_types+=" neon"
use webdav-serf && ra_types+=" serf"
local pid_file
for pid_file in svnserve.pid apache.pid memcached.pid; do
rm -f "${T}/${pid_file}"
done
termination() {
local die="$1" pid_file
if [[ -n "${die}" ]]; then
echo -e "\n\e[1;31mKilling of child processes...\e[0m\a" > /dev/tty
fi
for pid_file in svnserve.pid apache.pid memcached.pid; do
if [[ -f "${T}/${pid_file}" ]]; then
kill "$(<"${T}/${pid_file}")"
fi
done
if [[ -n "${die}" ]]; then
sleep 6
die "Termination"
fi
}
trap 'termination 1 &' SIGINT SIGTERM
SVN_TEST_SVNSERVE_PORT="${SVN_TEST_SVNSERVE_PORT:-62209}"
LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --listen-port "${SVN_TEST_SVNSERVE_PORT}" --log-file "${T}/svnserve.log" --pid-file "${T}/svnserve.pid"
if use webdav-neon || use webdav-serf; then
SVN_TEST_APACHE_PORT="${SVN_TEST_APACHE_PORT:-62208}"
create_apache_tests_configuration
"${APACHE_BIN}" -f "${T}/apache/apache.conf"
fi
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then
SVN_TEST_FSFS_MEMCACHED_PORT="${SVN_TEST_FSFS_MEMCACHED_PORT:-62210}"
sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf
memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid"
fi
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then
options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}"
fi
if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then
options+=" FSFS_PACKING=1"
fi
# if [[ -n "${SVN_TEST_SASL}" ]]; then
# options+=" ENABLE_SASL=1"
# fi
sleep 6
for ra_type in ${ra_types}; do
for fs_type in ${fs_types}; do
[[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue
einfo
einfo "\e[1;34mTesting of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')\e[0m"
einfo
set_tests_variables ${ra_type}
time emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="1" ${options} || failed_tests="1"
mv tests.log "${T}/tests-ra_${ra_type}-${fs_type}.log"
done
done
unset base_url http_library
termination
trap - SIGINT SIGTERM
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then
local swig_lingua swig_linguas
local -A linguas
if use python; then
einfo
einfo "\e[1;34mTesting of Subversion SWIG Python bindings\e[0m"
einfo
swig_python_bindings_testing() {
rm -f subversion/bindings/swig/python
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python
time emake PYTHON_VERSION="$(python_get_version)" check-swig-py || failed_tests="1"
}
python_execute_function \
--action-message 'Testing of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \
--failure-message 'Testing of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \
swig_python_bindings_testing
fi
use perl && swig_linguas+=" pl"
use ruby && swig_linguas+=" rb"
linguas[pl]="Perl"
linguas[rb]="Ruby"
for swig_lingua in ${swig_linguas}; do
einfo
einfo "\e[1;34mTesting of Subversion SWIG ${linguas[${swig_lingua}]} bindings\e[0m"
einfo
time emake check-swig-${swig_lingua} || failed_tests="1"
done
if use java; then
einfo
einfo "\e[1;34mTesting of Subversion JavaHL library\e[0m"
einfo
time emake check-javahl || failed_tests="1"
fi
fi
if [[ -n "${failed_tests}" ]]; then
ewarn
ewarn "\e[1;31mTests failed\e[0m"
ewarn
fi
}
src_install() {
einfo
einfo "Installation of core of Subversion"
einfo
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed"
if use python; then
einfo
einfo "Installation of Subversion SWIG Python bindings"
einfo
swig_python_bindings_installation() {
rm -f subversion/bindings/swig/python
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python
emake -j1 \
DESTDIR="${D}" \
PYTHON_VERSION="$(python_get_version)" \
swig_pydir="$(python_get_sitedir)/libsvn" \
swig_pydir_extra="$(python_get_sitedir)/svn" \
install-swig-py
}
python_execute_function \
--action-message 'Installation of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \
--failure-message 'Installation of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \
swig_python_bindings_installation
fi
if use perl; then
einfo
einfo "Installation of Subversion SWIG Perl bindings"
einfo
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed"
fixlocalpod
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr
fi
if use ruby; then
einfo
einfo "Installation of Subversion SWIG Ruby bindings"
einfo
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed"
fi
if use java; then
einfo
einfo "Installation of Subversion JavaHL library"
einfo
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed"
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar
fi
# Install Apache module configuration.
if use apache2; then
dodir "${APACHE_MODULES_CONFDIR}"
cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
<IfDefine SVN>
LoadModule dav_svn_module modules/mod_dav_svn.so
<IfDefine SVN_AUTHZ>
LoadModule authz_svn_module modules/mod_authz_svn.so
</IfDefine>
# Example configuration:
#<Location /svn/repos>
# DAV svn
# SVNPath ${SVN_REPOS_LOC}/repos
# AuthType Basic
# AuthName "Subversion repository"
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers
# Require valid-user
#</Location>
</IfDefine>
EOF
fi
# Install Bash Completion, bug 43179.
dobashcompletion tools/client-side/bash_completion subversion
rm -f tools/client-side/bash_completion
# Install hot backup script, bug 54304.
newbin tools/backup/hot-backup.py svn-hot-backup
rm -fr tools/backup
# Install svn_load_dirs.pl.
if use perl; then
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl
fi
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl
# Install svnserve init-script and xinet.d snippet, bug 43245.
newinitd "${FILESDIR}"/svnserve.initd svnserve
if use apache2; then
newconfd "${FILESDIR}"/svnserve.confd svnserve
else
newconfd "${FILESDIR}"/svnserve.confd2 svnserve
fi
insinto /etc/xinetd.d
newins "${FILESDIR}"/svnserve.xinetd svnserve
# Install documentation.
dodoc CHANGES COMMITTERS README
dodoc tools/xslt/svnindex.{css,xsl}
rm -fr tools/xslt
# Install Vim syntax files.
if use vim-syntax; then
insinto /usr/share/vim/vimfiles/syntax
doins contrib/client-side/vim/svn.vim
fi
rm -f contrib/client-side/vim/svn.vim
# Install Emacs Lisps.
if use emacs; then
elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} || die "Installation of Emacs modules failed"
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed"
touch "${D}${SITELISP}/${PN}/compat/.nosearch"
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed"
fi
rm -fr contrib/client-side/emacs
# Install extra files.
if use extras; then
einfo
einfo "Installation of contrib and tools"
einfo
cat << EOF > 80subversion-extras
PATH="/usr/$(get_libdir)/subversion/bin"
ROOTPATH="/usr/$(get_libdir)/subversion/bin"
EOF
doenvd 80subversion-extras
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed"
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed"
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr
rm -fr contrib/client-side/svn-push
rm -fr contrib/server-side/svnstsw
rm -fr tools/client-side/svnmucc
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
rm -fr tools/{buildbot,dev,diff,po}
insinto /usr/share/${PN}
doins -r contrib tools
fi
if use doc; then
einfo
einfo "Installation of Subversion HTML documentation"
einfo
dohtml -r doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed"
insinto /usr/share/doc/${PF}
doins -r notes
ecompressdir /usr/share/doc/${PF}/notes
# if use ruby; then
# emake DESTDIR="${D}" install-swig-rb-doc
# fi
if use java; then
java-pkg_dojavadoc doc/javadoc
fi
fi
}
pkg_preinst() {
# Compare versions of Berkeley DB, bug 122877.
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then
CHANGED_BDB_VERSION="1"
fi
fi
}
pkg_postinst() {
use emacs && elisp-site-regen
use perl && perl-module_pkg_postinst
if use python; then
python_mod_optimize libsvn svn
fi
elog "Subversion Server Notes"
elog "-----------------------"
elog
elog "If you intend to run a server, a repository needs to be created using"
elog "svnadmin (see man svnadmin) or the following command to create it in"
elog "${SVN_REPOS_LOC}:"
elog
elog " emerge --config =${CATEGORY}/${PF}"
elog
elog "Subversion has multiple server types, take your pick:"
elog
elog " - svnserve daemon: "
elog " 1. Edit /etc/conf.d/svnserve"
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
elog " 3. Start daemon: /etc/init.d/svnserve start"
elog " 4. Make persistent: rc-update add svnserve default"
elog
elog " - svnserve via xinetd:"
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)"
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart"
elog
elog " - svn over ssh:"
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")"
elog " Additionally run:"
elog " groupadd svnusers"
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos"
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you"
elog " want, for example:"
elog " #!/bin/bash"
elog " . /etc/conf.d/svnserve"
elog " umask 007"
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\""
elog
if use apache2; then
elog " - http-based server:"
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\""
elog " 2. Create an htpasswd file:"
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME"
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")"
elog " 4. Restart Apache: /etc/init.d/apache2 restart"
elog
fi
elog " Fixing the repository permissions:"
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf"
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos"
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db"
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks"
elog
elog "If you intend to use svn-hot-backup, you can specify the number of"
elog "backups to keep per repository by specifying an environment variable."
elog "If you want to keep e.g. 2 backups, do the following:"
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion"
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion"
elog
elog "Subversion contains support for the use of Memcached"
elog "to cache data of FSFS repositories."
elog "You should install \"net-misc/memcached\", start memcached"
elog "and configure your FSFS repositories, if you want to use this feature."
elog "See the documentation for details."
elog
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then
ewarn "You upgraded from an older version of Berkeley DB and may experience"
ewarn "problems with your repository. Run the following commands as root to fix it:"
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
fi
}
pkg_postrm() {
use emacs && elisp-site-regen
use perl && perl-module_pkg_postrm
if use python; then
python_mod_cleanup libsvn svn
fi
}
pkg_config() {
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..."
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then
echo "A Subversion repository already exists and I will not overwrite it."
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
else
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf"
einfo ">>> Populating repository directory ..."
# Create initial repository.
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos"
einfo ">>> Setting repository permissions ..."
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")"
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")"
if use apache2; then
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
else
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
enewgroup "${SVNSERVE_GROUP}"
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}"
fi
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos"
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf"
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos"
fi
}

View File

@ -1,2 +0,0 @@
DIST tragtor-0.8.6_all.tar.gz 451520 RMD160 5d510f7d36d93e979a145140ed37b2cbdb5354d3 SHA1 2b2de595bc0b2c1d2f4df683b9d9d53820c0912f SHA256 2678cfaa16ca35856514f0b9aacf75f5a29a1f23891132ad39ef3bb28379f704
EBUILD tragtor-0.8.6.ebuild 903 RMD160 9da03c73024fd84ac5bf147ff7175636815c4149 SHA1 b51eef7896cd91c0715fa2ed2e3fe47c2e67ac0e SHA256 a0c902019fe3d288b264bace67903427675d44ddafe37efb4f6e1b191e53a877

View File

@ -1,40 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils python
DESCRIPTION="traGtor is a graphical user interface (GUI) for ffmpeg"
HOMEPAGE="http://mein-neues-blog.de/tragtor-gui-for-ffmpeg/"
SRC_URI="http://mein-neues-blog.de/files/traGtor/${P}_all.tar.gz"
LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=""
RDEPEND="dev-python/pygtk
media-video/ffmpeg
media-sound/id3v2"
src_unpack() {
mkdir ${P}
cd ${P}
unpack ${A}
# Set English as the default language
sed -i 's/\(_DEFAULT_SETTINGS = {"language":"\)de\("}\)/\1en\2/' usr/share/tragtor/tragtor.py
# Deleting shipped *.pyc files
rm -f usr/share/tragtor/*.pyc
}
src_install() {
dobin usr/bin/tragtor
doicon usr/share/pixmaps/tragtor.svg
domenu usr/share/applications/tragtor.desktop
insinto /usr/share/tragtor
doins usr/share/tragtor/*
}

View File

@ -1,12 +0,0 @@
AUX postinstall-en.txt 210 RMD160 3bd025f985a46ecb4f1b97b7807761664120d6dc SHA1 00c7f7faae9fa2c688a576b8467945403f0d3995 SHA256 dd7c3d3b39c324e773e94118d96efba9d5eed0b0ff00dcbb14273ae61c7d8f04
MD5 3ebe22390bbc32149de71ed2c21abc2b files/postinstall-en.txt 210
RMD160 3bd025f985a46ecb4f1b97b7807761664120d6dc files/postinstall-en.txt 210
SHA256 dd7c3d3b39c324e773e94118d96efba9d5eed0b0ff00dcbb14273ae61c7d8f04 files/postinstall-en.txt 210
DIST ldap-account-manager-2.0.0.tar.gz 2002599 RMD160 b837081965798c80884b405ef35d8d8bf6d5d334 SHA1 848f3c0f37dab04112801dab417bb38c17b0a78c SHA256 4c6f358ecae3e7259d71b336fe60ec6337073e7e3f063f553a69dc6d0c0dd6cc
EBUILD ldap-account-manager-2.0.0.ebuild 2265 RMD160 eb9f9cbfae6b7cb5112a5c978afe27b2baeb7f45 SHA1 77dbd6663acc4143d7e9cd842f0470d863718765 SHA256 89720a46d0b462bda58fc0ebe16c5c4be7643be3c24e7b55c2c8c6431bc09335
MD5 c46bb7d60d1906093f55859948537525 ldap-account-manager-2.0.0.ebuild 2265
RMD160 eb9f9cbfae6b7cb5112a5c978afe27b2baeb7f45 ldap-account-manager-2.0.0.ebuild 2265
SHA256 89720a46d0b462bda58fc0ebe16c5c4be7643be3c24e7b55c2c8c6431bc09335 ldap-account-manager-2.0.0.ebuild 2265
MD5 3663d5bc396a072c5809c2375700a0dc files/digest-ldap-account-manager-2.0.0 283
RMD160 b69358d41e27f1d4bd9e93ad3da77cd6220ce0fd files/digest-ldap-account-manager-2.0.0 283
SHA256 72b5b4b1ec39b1d29e6ad361860a8bcbd8dd1f9879a8ab0c9b72dfe56b01528e files/digest-ldap-account-manager-2.0.0 283

View File

@ -1,3 +0,0 @@
MD5 1ff83a33560a56c02e4f9d5bdd9dd40e ldap-account-manager-2.0.0.tar.gz 2002599
RMD160 b837081965798c80884b405ef35d8d8bf6d5d334 ldap-account-manager-2.0.0.tar.gz 2002599
SHA256 4c6f358ecae3e7259d71b336fe60ec6337073e7e3f063f553a69dc6d0c0dd6cc ldap-account-manager-2.0.0.tar.gz 2002599

View File

@ -1,3 +0,0 @@
MD5 1ff83a33560a56c02e4f9d5bdd9dd40e ldap-account-manager-2.0.0.tar.gz 2002599
RMD160 b837081965798c80884b405ef35d8d8bf6d5d334 ldap-account-manager-2.0.0.tar.gz 2002599
SHA256 4c6f358ecae3e7259d71b336fe60ec6337073e7e3f063f553a69dc6d0c0dd6cc ldap-account-manager-2.0.0.tar.gz 2002599

View File

@ -1,10 +0,0 @@
LDAP-Account-Manager is installed. You will need to
change the master password in:
${MY_INSTALLDIR}/config/config.cfg
and change the profile:
${MY_INSTALLDIR}/config/lam.conf
according to your LDAP setup.

View File

@ -1,71 +0,0 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-nds/phpldapadmin/phpldapadmin-1.0.2.ebuild,v 1.2 2007/08/16 07:01:18 opfer Exp $
inherit webapp depend.php
MY_PN="lam"
DESCRIPTION="phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server."
HOMEPAGE="http://lam.sourceforge.net"
SRC_URI="mirror://sourceforge/${MY_PN}/${P}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~ppc ~sparc x86"
IUSE=""
need_php5
pkg_setup() {
webapp_pkg_setup
require_php_with_use ldap pcre session xml nls
}
src_unpack() {
unpack ${A}
cd ${S}
cp config/config.cfg_sample config/config.cfg
cp config/lam.conf_sample config/lam.conf
rm -rf docs/devel
}
src_compile() {
einfo "Nothing to compile"
}
src_install() {
webapp_src_preinst
dodoc docs/*
cp -r . ${D}${MY_HTDOCSDIR}
cd ${D}${MY_HTDOCSDIR}
webapp_configfile ${MY_HTDOCSDIR}/config/config.cfg
webapp_configfile ${MY_HTDOCSDIR}/config/lam.conf
webapp_serverowned ${MY_HTDOCSDIR}/sess
webapp_serverowned ${MY_HTDOCSDIR}/tmp
webapp_serverowned ${MY_HTDOCSDIR}/config
webapp_serverowned ${MY_HTDOCSDIR}/config/language
webapp_serverowned ${MY_HTDOCSDIR}/config/shells
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/default.group.xml
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/default.host.xml
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/default.mailAlias.xml
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/default.smbDomain.xml
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/default.user.xml
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/logos
webapp_serverowned ${MY_HTDOCSDIR}/config/pdf/logos/printLogo.jpg
webapp_serverowned ${MY_HTDOCSDIR}/config/profiles
webapp_serverowned ${MY_HTDOCSDIR}/config/profiles/default.group
webapp_serverowned ${MY_HTDOCSDIR}/config/profiles/default.host
webapp_serverowned ${MY_HTDOCSDIR}/config/profiles/default.mailAlias
webapp_serverowned ${MY_HTDOCSDIR}/config/profiles/default.smbDomain
webapp_serverowned ${MY_HTDOCSDIR}/config/profiles/default.user
webapp_serverowned ${MY_HTDOCSDIR}/config/selfService
webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
webapp_src_install
}

View File

@ -1,507 +0,0 @@
# ChangeLog for sys-cluster/util-vserver
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/ChangeLog,v 1.89 2008/03/17 09:16:31 hollow Exp $
*util-vserver-0.30.215 (17 Mar 2008)
17 Mar 2008; Benedikt Böhm <hollow@gentoo.org>
+util-vserver-0.30.215.ebuild:
version bump
14 Mar 2008; Benedikt Böhm <hollow@gentoo.org> metadata.xml:
fix metadata
*util-vserver-0.30.214-r1 (11 Mar 2008)
11 Mar 2008; Benedikt Böhm <hollow@gentoo.org>
-files/util-vserver-0.30.212-initpost.patch,
-files/util-vserver-0.30.212-vsomething-fix.patch,
-files/util-vserver-0.30.212-wrapper.patch,
+files/util-vserver-0.30.214-openrc.patch, -files/init.d/vprocunhide,
-files/init.d/vservers.default, -util-vserver-0.30.212-r2.ebuild,
+util-vserver-0.30.214-r1.ebuild:
add support for openrc; cleanup old cruft
18 Nov 2007; Benedikt Böhm <hollow@gentoo.org>
files/util-vserver-0.30.214-baselayout2_path.patch:
fix broken patch (LF instead of CRLF, blame trac)
17 Nov 2007; Benedikt Böhm <hollow@gentoo.org>
+files/util-vserver-0.30.214-baselayout2_path.patch,
util-vserver-0.30.214.ebuild:
fix PATH for baselayout2
10 Oct 2007; Benedikt Böhm <hollow@gentoo.org>
-files/util-vserver-0.30.213-init-vserver.sh.patch,
-util-vserver-0.30.213.ebuild, util-vserver-0.30.214.ebuild:
0.30.214 stable on amd64/x86
*util-vserver-0.30.214 (02 Sep 2007)
02 Sep 2007; Benedikt Böhm <hollow@gentoo.org>
+util-vserver-0.30.214.ebuild:
version bump
16 May 2007; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.213.ebuild:
Silence mkdir ${VDIRBASE} and apply the barrier to ${VDIRBASE} in pkg_postinst.
16 May 2007; Christian Heim <phreak@gentoo.org>
+files/util-vserver-0.30.213-init-vserver.sh.patch,
util-vserver-0.30.213.ebuild:
Add a fix for baselayout-2 support within vservers, we explicitly need to
export TERM=linux in init-vserver.sh to get color with baselayout-2.
*util-vserver-0.30.213 (03 May 2007)
03 May 2007; Benedikt Böhm <hollow@gentoo.org>
-util-vserver-0.30.213_rc5.ebuild, -util-vserver-0.30.213_rc6.ebuild,
+util-vserver-0.30.213.ebuild:
version bump; cleanup
03 May 2007; Sven Wegener <swegener@gentoo.org>
util-vserver-0.30.212-r2.ebuild, util-vserver-0.30.213_rc5.ebuild,
util-vserver-0.30.213_rc6.ebuild:
Include CATEGORY and PN in call to has_version else we'll never get a match.
07 Apr 2007; Benedikt Böhm <hollow@gentoo.org>
util-vserver-0.30.213_rc6.ebuild:
keep pkg dir so vserver ... delete works
05 Apr 2007; Benedikt Böhm <hollow@gentoo.org>
-util-vserver-0.30.212-r1.ebuild, +util-vserver-0.30.213_rc6.ebuild:
version bump, cleanup
29 Mar 2007; Benedikt Böhm <hollow@gentoo.org>
+util-vserver-0.30.213_rc5.ebuild:
test release, needed for baselayout 1.13
09 Feb 2007; Benedikt Böhm <hollow@gentoo.org>
files/util-vserver-0.30.212-vsomething-fix.patch:
finally fix vsomething patch
07 Feb 2007; Benedikt Böhm <hollow@gentoo.org>
files/util-vserver-0.30.212-vsomething-fix.patch:
fix vsomething patch
*util-vserver-0.30.212-r2 (05 Feb 2007)
05 Feb 2007; Benedikt Böhm <hollow@gentoo.org>
+files/util-vserver-0.30.212-vsomething-fix.patch,
+util-vserver-0.30.212-r2.ebuild:
fix vsomething argument handling
21 Jan 2007; Benedikt Böhm <hollow@gentoo.org>
-util-vserver-0.30.210-r13.ebuild, -util-vserver-0.30.211.ebuild,
util-vserver-0.30.212-r1.ebuild:
remove old ebuilds; remove autotools eclass; cleanup depends
*util-vserver-0.30.212-r1 (21 Jan 2007)
21 Jan 2007; Christian Heim <phreak@gentoo.org>
files/util-vserver-0.30.212-initpost.patch, -util-vserver-0.30.212.ebuild,
+util-vserver-0.30.212-r1.ebuild:
Revision bump, fixing the initpost patch (thanks to Karel Hala <stripe at
suchdol.net> in #163045).
20 Jan 2007; Christian Heim <phreak@gentoo.org>
+files/util-vserver-0.30.212-initpost.patch, util-vserver-0.30.212.ebuild:
Adding a patch to fix runlevel scripts for older baselayouts.
util-vserver-0.30.212 going stable on amd64 and x86.
20 Jan 2007; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.212.ebuild:
Dropping the explicit DEPEND/RDEPEND on sys-process/procps, as that is already
contained in base/packages (thus the system target on all arches). Moving away
from the extra ugly myconf-stuff, putting it all in econf's hand. Unifying
`make install' and `make install-distribution'. Adjusting the pkg_postinst to
use elog instead of einfo. Adding a hint, if upgrading to >0.30.211, as the
init-scripts changed.
21 Dec 2006; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.210-r13.ebuild, util-vserver-0.30.211.ebuild,
util-vserver-0.30.212.ebuild:
Providing a symlink for /sbin/vshelper, so on a new install you don't need
to touch /etc/sysctl.conf.
21 Dec 2006; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.211.ebuild:
Stabling util-vserver-0.30.211 on amd64 and x86.
*util-vserver-0.30.212 (09 Dec 2006)
09 Dec 2006; Benedikt Böhm <hollow@gentoo.org>
+files/util-vserver-0.30.212-wrapper.patch, +files/bash_completion,
+files/init.d/vprocunhide, +files/init.d/vservers.default,
-util-vserver-0.30.210-r17.ebuild, -util-vserver-0.30.210-r18.ebuild,
+util-vserver-0.30.212.ebuild:
version bump; cleanup
*util-vserver-0.30.211 (07 Oct 2006)
07 Oct 2006; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.211.ebuild:
Version bump.
26 Sep 2006; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.210-r13.ebuild, util-vserver-0.30.210-r17.ebuild,
util-vserver-0.30.210-r18.ebuild:
util-vserver-0.30.210 needs =automake-1.9*, fixing DEPEND. This fixes
#149085 (thanks to Matthias FooBar <genzilla at genfoo.de> for reporting).
07 Sep 2006; Benedikt Böhm <hollow@gentoo.org>
util-vserver-0.30.210-r18.ebuild:
add legacy API use flag for older kernels
*util-vserver-0.30.210-r18 (06 Sep 2006)
06 Sep 2006; Benedikt Böhm <hollow@gentoo.org>
+util-vserver-0.30.210-r18.ebuild:
patch reordering; bash-completion; yum 2.6 support; misc fixes
*util-vserver-0.30.210-r17 (24 Jul 2006)
24 Jul 2006; Benedikt Böhm <hollow@gentoo.org>
-util-vserver-0.30.210-r14.ebuild, -util-vserver-0.30.210-r15.ebuild,
-util-vserver-0.30.210-r16.ebuild, +util-vserver-0.30.210-r17.ebuild:
fix patch tarballs, d'oh
*util-vserver-0.30.210-r16 (23 Jul 2006)
23 Jul 2006; Benedikt Böhm <hollow@gentoo.org>
+util-vserver-0.30.210-r16.ebuild:
fix vschedcalc, thanks to Wilhelm Meier
*util-vserver-0.30.210-r15 (09 Jul 2006)
09 Jul 2006; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.210-r15.ebuild:
Revision bump, fixing some rpm related issues
01 Jul 2006; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.210-r13.ebuild, util-vserver-0.30.210-r14.ebuild:
Explicitly define the RDEPEND, dev-libs/dietlibc isn't needed as RDEPEND,
since all packages linked against dietlibc are compiled static
*util-vserver-0.30.210-r14 (25 Jun 2006)
25 Jun 2006; Benedikt Böhm <hollow@gentoo.org>
-util-vserver-0.30.210-r12.ebuild, +util-vserver-0.30.210-r14.ebuild:
fix start-vservers, update keywords
06 May 2006; Benedikt Böhm <hollow@gentoo.org>
-util-vserver-0.30.209-r1.ebuild, util-vserver-0.30.210-r13.ebuild:
0.30.210-r13 stable on amd/x86
*util-vserver-0.30.210-r13 (22 Apr 2006)
22 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.210-r13.ebuild:
fix #130783
14 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
-util-vserver-0.30.210-r11.ebuild, util-vserver-0.30.210-r12.ebuild:
0.30.210-r12 stable on amd64/x86; fixes bug #129914
*util-vserver-0.30.210-r12 (13 Apr 2006)
13 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.210-r12.ebuild:
remove obsolete patches; CPUSET support; Fedora Core 5 + CentOS4 support;
minor other fixes; thanks to Daniel Hokka Zakrisson
*util-vserver-0.30.210-r11 (12 Apr 2006)
12 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
-util-vserver-0.30.210-r9.ebuild, -util-vserver-0.30.210-r10.ebuild,
+util-vserver-0.30.210-r11.ebuild:
the r10 tarball got borked
*util-vserver-0.30.210-r10 (12 Apr 2006)
12 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.210-r10.ebuild:
vlogin fixes; new delete command; add vserver ... clone; clone(2) fix for
sparc64
*util-vserver-0.30.210-r9 (06 Apr 2006)
06 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
-util-vserver-0.30.210-r4.ebuild, -util-vserver-0.30.210-r5.ebuild,
-util-vserver-0.30.210-r6.ebuild, -util-vserver-0.30.210-r7.ebuild,
-util-vserver-0.30.210-r8.ebuild, +util-vserver-0.30.210-r9.ebuild:
guess what! vlogin fixes! + cleanup
*util-vserver-0.30.210-r8 (05 Apr 2006)
05 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.210-r8.ebuild:
vlogin fixes again
*util-vserver-0.30.210-r7 (03 Apr 2006)
03 Apr 2006; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.210-r7.ebuild:
secure chcontext; syscall update
*util-vserver-0.30.210-r6 (16 Mar 2006)
16 Mar 2006; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.210-r6.ebuild:
fix testsuite; fix vlogin
*util-vserver-0.30.210-r5 (12 Mar 2006)
12 Mar 2006; Christian Heim <phreak@gentoo.org>
-util-vserver-0.30.210-r3.ebuild, +util-vserver-0.30.210-r5.ebuild:
Revision bump (new patchset, introducing Benedikt's vlogin proxy, finally
deprecating init-style gentoo); Removing old ebuild
02 Mar 2006; Benedikt Boehm <hollow@gentoo.org>
util-vserver-0.30.210-r4.ebuild:
keep /var/cache/vservers
*util-vserver-0.30.210-r4 (26 Feb 2006)
26 Feb 2006; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.210-r4.ebuild:
Revision bump (again, sorry for that); Updating the Gentoo related tools,
adding the vprocunhide patch thanks to Oliver Welter
*util-vserver-0.30.210-r3 (23 Feb 2006)
23 Feb 2006; Benedikt Boehm <hollow@gentoo.org>
-util-vserver-0.30.210.ebuild, -util-vserver-0.30.210-r1.ebuild,
-util-vserver-0.30.210-r2.ebuild, +util-vserver-0.30.210-r3.ebuild:
remove skeleton patch; cleanup
*util-vserver-0.30.210-r2 (18 Feb 2006)
18 Feb 2006; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.210-r2.ebuild:
Fixing default vprocunhide list; rev bumping
*util-vserver-0.30.210-r1 (23 Jan 2006)
23 Jan 2006; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.210-r1.ebuild:
Removing util-vserver-0.30.208-fix-lockfile.c.patch from the patchset,
revbumping
*util-vserver-0.30.210 (22 Jan 2006)
22 Jan 2006; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.210.ebuild:
Version bump
06 Jan 2006; Christian Heim <phreak@gentoo.org>
-util-vserver-0.30.208-r5.ebuild:
Removing old version, since the newer version has the same KEYWORDS and is
additionally stable on AMD64
24 Dec 2005; Benedikt Boehm <hollow@gentoo.org>
-util-vserver-0.30.209.ebuild, util-vserver-0.30.209-r1.ebuild:
209-r1 to stable amd64 and x86
12 Dec 2005; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.208-r5.ebuild, util-vserver-0.30.209.ebuild,
util-vserver-0.30.209-r1.ebuild:
Removing COPYING from our dodoc in src_install()
*util-vserver-0.30.209-r1 (01 Dec 2005)
01 Dec 2005; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.209-r1.ebuild:
bug fixes; move to default-linux profiles
26 Nov 2005; Benedikt Boehm <hollow@gentoo.org> -files/vprocunhide,
-files/vserver-new_dev-fix.patch,
-files/vserver-new_drop-defaulttar.patch, -files/vservers.confd,
-files/vservers.initd, -util-vserver-0.30.205-r1.ebuild,
util-vserver-0.30.208-r5.ebuild, util-vserver-0.30.209.ebuild:
208-r5 to stable x86; cleanup
26 Nov 2005; Christian Heim <phreak@gentoo.org>
-util-vserver-0.30.208-r3.ebuild, -util-vserver-0.30.208-r4.ebuild,
util-vserver-0.30.208-r5.ebuild, util-vserver-0.30.209.ebuild:
Fixing SRC_URI; cleaning up old ebuilds
*util-vserver-0.30.209 (12 Nov 2005)
12 Nov 2005; Christian Heim <phreak@gentoo.org>
+util-vserver-0.30.209.ebuild:
Version bump
*util-vserver-0.30.208-r5 (27 Oct 2005)
27 Oct 2005; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.208-r5.ebuild:
many bugfixes, mainly vserver-new and gentoo-functions.sh
*util-vserver-0.30.208-r4 (13 Oct 2005)
13 Oct 2005; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.208-r4.ebuild:
mostly updates to gentoo tools
04 Oct 2005; Benedikt Boehm <hollow@gentoo.org>
+files/vserver-new_drop-defaulttar.patch, util-vserver-0.30.208-r3.ebuild:
drop support for downloading a default stage tar
02 Oct 2005; Christian Heim <phreak@gentoo.org>
util-vserver-0.30.205-r1.ebuild:
Adding dependency upon sys-process/procps; Fixing bug #106910
01 Oct 2005; Benedikt Boehm <hollow@gentoo.org>
+files/vserver-new_dev-fix.patch, util-vserver-0.30.208-r3.ebuild:
fix /dev issue in vserver-new
01 Oct 2005; Christian Heim <phreak@gentoo.org> metadata.xml:
Fixing metadata.xml; Thanks Jakub
*util-vserver-0.30.208-r3 (01 Oct 2005)
01 Oct 2005; Benedikt Boehm <hollow@gentoo.org>
-files/0.30.208-r1/vservers.confd, -files/0.30.208-r1/vservers.initd,
-util-vserver-0.30.207.ebuild, -util-vserver-0.30.208.ebuild,
-util-vserver-0.30.208-r1.ebuild, -util-vserver-0.30.208-r2.ebuild,
+util-vserver-0.30.208-r3.ebuild:
lockfile fix; hardened fix; syscall updates; new init script; cleanup
*util-vserver-0.30.208-r2 (30 Aug 2005)
30 Aug 2005; Benedikt Boehm <hollow@gentoo.org>
util-vserver-0.30.205-r1.ebuild, util-vserver-0.30.207.ebuild,
util-vserver-0.30.208.ebuild, util-vserver-0.30.208-r1.ebuild,
+util-vserver-0.30.208-r2.ebuild:
add back dietlibc support; add -r2 with a new tar (includes new fixes)
28 Aug 2005; Mike Frysinger <vapier@gentoo.org>
util-vserver-0.30.205-r1.ebuild, util-vserver-0.30.207.ebuild,
util-vserver-0.30.208.ebuild, util-vserver-0.30.208-r1.ebuild:
Punt USE=diet.
11 Aug 2005; Carlos Silva <r3pek@gentoo.org>
util-vserver-0.30.208-r1.ebuild:
marked ~amd64. closes bug #90317
*util-vserver-0.30.208-r1 (03 Aug 2005)
03 Aug 2005; Benedikt Boehm <hollow@gentoo.org>
+files/0.30.208-r1/vservers.confd, +files/0.30.208-r1/vservers.initd,
+util-vserver-0.30.208-r1.ebuild:
misc fixes + features
*util-vserver-0.30.208 (18 Jul 2005)
18 Jul 2005; Benedikt Boehm <hollow@gentoo.org>
-files/0.30.205/vprocunhide, -files/0.30.205/vservers.confd,
-files/0.30.205/vservers.initd, -files/0.30.205/vshelper-shutdown-hack,
+files/vprocunhide, files/vservers.initd, -util-vserver-0.30.196.ebuild,
-util-vserver-0.30.204.ebuild, -util-vserver-0.30.205.ebuild,
util-vserver-0.30.205-r1.ebuild, util-vserver-0.30.207.ebuild,
+util-vserver-0.30.208.ebuild:
Version bump; 205-r1 to stable; cleanup
15 Jun 2005; Benedikt Boehm <hollow@gentoo.org>
util-vserver-0.30.207.ebuild:
fixed vshelper hack
12 Jun 2005; Benedikt Boehm <hollow@gentoo.org>
+files/0.30.205/vshelper-shutdown-hack, util-vserver-0.30.207.ebuild:
fix vshelper + barrier warning
*util-vserver-0.30.207 (17 May 2005)
17 May 2005; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.207.ebuild:
Version bump
*util-vserver-0.30.205-r1 (07 Apr 2005)
07 Apr 2005; Benedikt Boehm <hollow@gentoo.org>
+files/0.30.205/vservers.confd, +files/0.30.205/vprocunhide,
+files/0.30.205/vservers.initd, +util-vserver-0.30.205-r1.ebuild:
added vprocunhide init script, small fixes
*util-vserver-0.30.205 (30 Mar 2005)
30 Mar 2005; Benedikt Boehm <hollow@gentoo.org>
-files/0.30.196/vservers.confd, -files/0.30.196/vservers.initd,
-files/rebootmgr.initd, +files/vservers.confd, files/vservers.initd,
-util-vserver-0.30.ebuild, util-vserver-0.30.196.ebuild,
util-vserver-0.30.204.ebuild, +util-vserver-0.30.205.ebuild:
bump to 0.30.205; 196 to stable; clean up of files/
26 Feb 2005; Benedikt Boehm <hollow@gentoo.org>
util-vserver-0.30.196.ebuild, util-vserver-0.30.204.ebuild:
fixed missing /var/lock/vservers for new init script + fixed
a bugs
25 Feb 2005; Benedikt Boehm <hollow@gentoo.org>
files/0.30.196/vservers.confd, files/0.30.196/vservers.initd:
updated conf.d & init.d scripts
*util-vserver-0.30.204 (23 Feb 2005)
23 Feb 2005; Benedikt Boehm <hollow@gentoo.org>
+util-vserver-0.30.204.ebuild:
Version bump
10 Feb 2005; Benedikt Boehm <hollow@gentoo.org>
util-vserver-0.30.196.ebuild:
fixed DEPEND
*util-vserver-0.30.196 (23 Jan 2005)
23 Jan 2005; Benedikt Boehm <hollow@gentoo.org> +metadata.xml,
-files/configure.patch, -files/vprocunhide,
-files/vserver-build-029p214.patch, -files/vservers-conf.d,
-files/vservers-init, +files/0.30.196/vservers.confd,
+files/0.30.196/vservers.initd, -util-vserver-0.29_p214.ebuild,
+util-vserver-0.30.196.ebuild:
Removed old versions. Added 0.30.196
19 Sep 2004; Michael Imhof <tantive@gentoo.org> -util-vserver-0.29.5.ebuild,
-util-vserver-0.29_p196-r1.ebuild:
Cleaned out old ebuilds.
*util-vserver-0.29_p214 (25 Aug 2004)
25 Aug 2004; Michael Imhof <tantive@gentoo.org> +files/vprocunhide,
+files/vserver-build-029p214.patch, +files/vservers-conf.d,
+files/vservers-init, +util-vserver-0.29_p214.ebuild:
Version bumped. Closes #58770.
*util-vserver-0.30 (09 Jul 2004)
09 Jul 2004; Michael Imhof <tantive@gentoo.org> +util-vserver-0.30.ebuild:
Version bumped. Closes #56572.
07 Jun 2004; Michael Sterrett <mr_bones_@gentoo.org>
util-vserver-0.29.ebuild:
clean older ebuild
12 May 2004; David Holm <dholm@gentoo.org> util-vserver-0.29.5.ebuild:
Added to ~ppc.
*util-vserver-0.29.5 (11 May 2004)
11 May 2004; Michael Imhof <tantive@gentoo.org> util-vserver-0.29.5.ebuild:
Version bumped. Added inherit eutils. Closes #49006.
27 Apr 2004; Aron Griffis <agriffis@gentoo.org> util-vserver-0.29.ebuild:
Add inherit eutils
*util-vserver-0.29_p196-r1 (25 Mar 2004)
25 Mar 2004; Michael Imhof <tantive@gentoo.org> util-vserver-0.29_p196-r1.ebuild:
New version. Closes #45729.
*util-vserver-0.29 (25 Mar 2004)
25 Mar 2004; Michael Imhof <tantive@gentoo.org> util-vserver-0.29.ebuild,
files/configure.patch:
Initial ebuild. Submitted by Ole Tange <bugs.gentoo.org@tange.dk>. Closes
#45053.

View File

@ -1,6 +0,0 @@
AUX bash_completion 7568 RMD160 45feafa30f715fb287403518eee8c45fecfe418e SHA1 d281bcad111df21ab0f37703142dd102145d784e SHA256 2232166a5aed9857a7a5c30adfdd4ea944e0608a29fad05f229b8cef2d61795d
AUX util-vserver-0.30.214-baselayout2_path.patch 648 RMD160 7775e5bc109774f9f253a88157739b5eb88ffc87 SHA1 fe8a94e8e0c76989b6d7268f9c9a07183a63b183 SHA256 59ad64c7b5356c16f500dc328eec989844301adeeefd4fe968955a03e9eb2630
AUX util-vserver-0.30.214-openrc.patch 4903 RMD160 12681cb3ed9904cbb99c7ad7411325b5856f45cf SHA1 530fb6e8077c5f4f4323811f06b8124a5e211419 SHA256 2abe4a75c33944205e0ba2f93009c45c1886c365ea141901df45af633b4c462b
DIST util-vserver-0.30.215.tar.bz2 695414 RMD160 62d34d2149fc949f27f7e08e8f4077919dfac838 SHA1 798fb71752420d1dd3d4807eeae37d3d8076662a SHA256 40686ac0652b245fcbb34e52ac8d80ae6b4ea3f73150ebc1ce7c69660ccaa35e
EBUILD util-vserver-0.30.215.ebuild 3652 RMD160 906ded6b35fe11bd137dab8ef6070cfe2df97592 SHA1 e202a98af1823f3b70cf841d909ee683a09d43b6 SHA256 89c3b60b671e6c398ce2fce0f8a3b139f0303d2be282fdeaf2e43cf8d5261e9d
MISC ChangeLog 18207 RMD160 9769ffef735790789793482e9a99d6925c3c7d40 SHA1 b4568bd1601ea88fcad8f854808023156b8d3fd1 SHA256 d91157892236401fb2a7e8f33fe153eb3994edc949d82edc9a123af4bd24cebf

View File

@ -1,300 +0,0 @@
# Completion for the vserver command. Source this file (or on some systems
# add it to ~/.bash_completion and start a new shell) and bash's completion
# mechanism will know all about vserver's options!
#
# Copyright (C) Thomas Champagne <lafeuil@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The latest version of this software can be obtained here:
#
# http://linux-vserver.org/Vserver+Completion
#
# version 0.4.0
have vserver-info && {
: ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" && {
. "$UTIL_VSERVER_VARS"
. "$_LIB_FUNCTIONS"
_vserver() {
local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
# find available vServers:
# call function getAllVservers in vserver library
getAllVservers names
names_pipe=`echo ${names[@]} | sed 's/ /|/g'`
# available commands
cmds='start stop restart condrestart suexec exec enter chkconfig \
running status unify pkg apt-get apt-config apt-cache \
rpm pkgmgmt delete'
# options (long and short name)
cmdOpts='--help --version --debug --defaulttty -s --sync -v \
--verbose --silent --'
cmdMethodOpts='-m -n --context --confdir --lockfile \
--hostname --netdev --netbcast --netmask \
--netprefix --interface --cpuset \
--cpusetcpus --cpusetmems --cpusetvirt \
--initstyle --flags --help --'
# if the previous option is a single option
helpCmds='--help|--version'
if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then
return 0
fi
# lookup the vServer name
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then
# found it!
break
fi
done
#a vserver has been found
if (( $i < ${#COMP_WORDS[@]}-1 )) ; then
# Show the vserver command without build
case "${COMP_WORDS[i+1]}" in
start)
COMPREPLY=( $( compgen -W "--rescue --rescue-cmd" -- $cur ) )
;;
# No completion for apt-config
stop|restart|condrestart|enter|running|status|apt-config|delete)
;;
suexec)
# I don't know how to do
COMPREPLY=( $( compgen -W -- $cur ) )
;;
exec)
#I don't know how to do
COMPREPLY=( $( compgen -W "" -- $cur ) )
;;
unify)
COMPREPLY=( $( compgen -W "-R" -- $cur ) )
;;
apt-get|apt-cache)
func=${COMP_WORDS[i+1]}
COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} )
COMP_CWORD=$((COMP_CWORD-i-1))
declare -f _${func//-/_} > /dev/null && _${func//-/_}
;;
*)
COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
;;
esac
return 0
else
#no vserver name found
prev=${COMP_WORDS[COMP_CWORD-1]}
#search the new name of vserver
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do
if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]] ; then
# found it!
break
fi
done
if (( $i < ${#COMP_WORDS[@]}-1 )) ; then
j=$i
i=${#COMP_WORDS[@]}
for (( ; j < ${#COMP_WORDS[@]}-1; j++ )) ; do
if [[ ${COMP_WORDS[j]} == "--" ]]; then
# method's parameter
case "$method" in
legacy|copy)
;;
apt-rpm)
COMPREPLY=( $( compgen -W "-d" -- $cur ) )
;;
yum)
COMPREPLY=( $( compgen -W "-d" -- $cur ) )
;;
rpm)
COMPREPLY=( $( compgen -W "-d --empty --force --nodeps" -- $cur ) )
;;
skeleton)
;;
debootstrap)
COMPREPLY=( $( compgen -W "-d -m -s --" -- $cur ) )
;;
*)
;;
esac
return 0
break
fi
if [[ ${COMP_WORDS[j]} == @(build|-m) ]]; then
i=$j
if (( $j+1 < ${#COMP_WORDS[@]}-1 )) ; then
method=${COMP_WORDS[j+1]}
fi
fi
done
if (( $i < ${#COMP_WORDS[@]}-1 )) ; then
case $prev in
--help)
;;
-n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags)
COMPREPLY=( $( compgen -W "" -- $cur ) )
;;
-m)
COMPREPLY=( $( compgen -W "legacy copy apt-rpm yum rpm skeleton debootstrap" -- $cur ) )
;;
*)
COMPREPLY=( $( compgen -W "$cmdMethodOpts" -- $cur ) )
;;
esac
else
COMPREPLY=( $( compgen -W "build" -- $cur ) )
fi
else
COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) )
fi
return 0
fi
return 0
}
complete -F _vserver vserver
_vapt_rpm_yum()
{
local cur cmds cmdOpts helpCmds names func i
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
# options (long and short name)
cmdOpts='--help --version --quiet -q --all'
# if the previous option is a single option
helpCmds='--help|--version'
if [[ "${COMP_WORDS[1]}" == "@($helpCmds)" ]] ; then
return 0
fi
# search --
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do
if [[ ${COMP_WORDS[i]} = "--" ]] ; then
# found it!
break
fi
done
# find available vServers
# call function getAllVservers in vserver library
getAllVservers names
names_pipe=`echo ${names[@]}" --all" | sed 's/ /|/g'`
if (( $i < ${#COMP_WORDS[@]}-1 )) && (( $i < $COMP_CWORD )) ; then
func=${COMP_WORDS[0]:1}
COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} )
COMP_CWORD=$((COMP_CWORD-i))
declare -f _${func//-/_} > /dev/null && _${func//-/_}
else
# search vServer name
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do
if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then
# found it!
break
fi
done
if (( $i < ${#COMP_WORDS[@]}-1 )) ; then
if [[ "${COMP_WORDS[i]}" = "--all" ]] ; then
cmdOpts='--'
COMPREPLY=( $( compgen -W "$cmdOpts" -- $cur ) )
else
cmdOpts='--'
COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) )
fi
else
COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) )
fi
fi
return 0
}
_vserver_copy()
{
local cur prev cmdOpts helpCmds confCmds names names_pipe i
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
# find available vServers
# call function getAllVservers in vserver library
getAllVservers names
names_pipe=`echo ${names[@]} | sed 's/ /|/g'`
# options (long and short name)
cmdOpts='--help -h --version -V --verbose -v --quiet -q \
--vsroot -r --rsh -R --stopstart -s \
--domain -d --ip -i'
# if the previous option is a single option
helpCmds='--help|-h|--version|-V'
if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then
return 0
fi
confCmds='--ip|-i|--domain|-d'
prev=${COMP_WORDS[COMP_CWORD-1]}
if [[ $prev == @($confCmds) ]] ; then
return 0
fi
# search a vServer name
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then
# found it!
break
fi
done
if (( $i < ${#COMP_WORDS[@]}-1 )) ; then
return 0
else
COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) )
fi
return 0
}
complete -F _vapt_rpm_yum vapt-get
complete -F _vapt_rpm_yum vrpm
complete -F _vapt_rpm_yum vyum
complete -F _vserver_copy vserver-copy
}
}

View File

@ -1,16 +0,0 @@
Index: scripts/vserver.functions
===================================================================
--- scripts/vserver.functions (revision 2626)
+++ scripts/vserver.functions (revision 2634)
@@ -315,9 +315,10 @@
(xgentoo)
test -n "$RUNLEVEL_START" || RUNLEVEL_START="default"
+ RC_PATH=/usr/sbin:/usr/bin:/sbin:/bin
INITCMD_START=( env TERM=$TERM /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" )
- INITCMD_STOP=( env -i TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
+ INITCMD_STOP=( env -i PATH=$RC_PATH TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
;;

View File

@ -1,126 +0,0 @@
diff -NurpP util-vserver-0.30.214.orig/distrib/gentoo/initpost util-vserver-0.30.214/distrib/gentoo/initpost
--- util-vserver-0.30.214.orig/distrib/gentoo/initpost 2007-09-02 22:06:42.000000000 +0200
+++ util-vserver-0.30.214/distrib/gentoo/initpost 2008-03-11 10:39:53.955478789 +0100
@@ -51,6 +51,11 @@ $_CHROOT_SH mkdir /usr/portage 2>/dev/nu
$_CHROOT_SH mkdir /usr/portage/distfiles 2>/dev/null || :
+# check if we have openrc
+have_openrc=0
+$_CHROOT_SH testfile /lib/rc/bin/is_older_than && have_openrc=1
+
+
# gentoo initstyle magic
initstyle=sysv
test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
@@ -59,8 +64,8 @@ if test "$initstyle" == "gentoo"; then
echo ">>> Installing special init-style magic ... "
$_CAT "$__DISTRIBDIR"/gentoo/init-vserver.sh | \
- $_CHROOT_SH truncate /lib/rcscripts/sh/init-vserver.sh
- $_CHROOT_SH chmod 0755 /lib/rcscripts/sh/init-vserver.sh
+ $_CHROOT_SH truncate /lib/rc/sh/init-vserver.sh
+ $_CHROOT_SH chmod 0755 /lib/rc/sh/init-vserver.sh
$_CAT "$__DISTRIBDIR"/gentoo/reboot.sh | \
$_CHROOT_SH truncate /etc/init.d/reboot.sh
@@ -78,23 +83,29 @@ if test "$initstyle" == "gentoo"; then
echo "!!! Consult the Gentoo Handbook on how to chroot and install"
echo "!!! packages into the guest environment."
echo "!!!"
+else
+ # fix gettys in inittab
+ if $_CHROOT_SH testfile /etc/inittab; then
+ echo ">>> Fixing inittab ... "
+ chrootsed /etc/inittab \
+ -e 's/\(^[^#].*getty.*$\)/#\1/'
+ fi
fi
-
# unneeded runlevel scripts
-echo ">>> Fixing default runlevel scripts ... "
-$_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
-$_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
-
+if test $have_openrc -ne 1; then
+ echo ">>> Fixing default runlevel scripts ... "
+ $_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
+ $_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
+fi
# setting hostname
if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; then
echo ">>> Setting hostname ... "
chrootsed /etc/conf.d/hostname \
- -e "s:HOSTNAME=\"\(.*\)\":HOSTNAME=\"$(< "$cfgdir"/uts/nodename)\":"
+ -e "s:\(HOSTNAME\)=\"\(.*\)\":\1=\"$(< "$cfgdir"/uts/nodename)\":i"
fi
-
# fix syslog-ng.conf
if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then
echo ">>> Fixing syslog-ng.conf ... "
@@ -103,27 +114,21 @@ if $_CHROOT_SH testfile /etc/syslog-ng/s
-e 's:\(.*console_all.*\):#\1:g'
fi
-
-# fix gettys in inittab
-if $_CHROOT_SH testfile /etc/inittab; then
- echo ">>> Fixing inittab ... "
- chrootsed /etc/inittab \
- -e 's/\(^[^#].*getty.*$\)/#\1/'
-fi
-
-
# fix fstab for checkfs/localmount in baselayout-2
# (does not affect any previous versions)
-echo ">>> Fixing fstab ... "
-echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
-
+if test $have_openrc -ne 1; then
+ echo ">>> Fixing fstab ... "
+ echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
+fi
# always satisfy net dependency in baselayout-2
# (does not affect any previous versions)
-echo ">>> Providing dummy net dependency ... "
-$_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
-$_CHROOT_SH truncate /etc/init.d/net.vserver
-$_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
-$_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
+if test $have_openrc -ne 1; then
+ echo ">>> Providing dummy net dependency ... "
+ $_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
+ $_CHROOT_SH truncate /etc/init.d/net.vserver
+ $_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
+ $_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
+fi
popd &>/dev/null
diff -NurpP util-vserver-0.30.214.orig/scripts/vserver.functions util-vserver-0.30.214/scripts/vserver.functions
--- util-vserver-0.30.214.orig/scripts/vserver.functions 2007-09-02 22:06:41.000000000 +0200
+++ util-vserver-0.30.214/scripts/vserver.functions 2008-03-11 10:31:41.758515991 +0100
@@ -314,9 +314,18 @@ function _generateInitOptions
(xgentoo)
test -n "$RUNLEVEL_START" || RUNLEVEL_START="default"
+ RC_PATH=/usr/sbin:/usr/bin:/sbin:/bin
- INITCMD_START=( env TERM=$TERM /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" )
- INITCMD_STOP=( env -i TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
+ if test -x "$vdir/vdir/lib/rcscripts/sh/init-vserver.sh"; then
+ RC_WRAP=/lib/rcscripts/sh/init-vserver.sh
+ elif test -x "$vdir/vdir/lib/rc/sh/init-vserver.sh"; then
+ RC_WRAP=/lib/rc/sh/init-vserver.sh
+ else
+ panic "init-vserver.sh not found; aborting"
+ fi
+
+ INITCMD_START=( env TERM=$TERM $RC_WRAP "$RUNLEVEL_START" )
+ INITCMD_STOP=( env -i PATH=$RC_PATH TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
;;

View File

@ -1,125 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/util-vserver-0.30.215.ebuild,v 1.1 2008/03/17 09:16:31 hollow Exp $
WANT_AUTOMAKE="1.9"
inherit autotools eutils bash-completion
DESCRIPTION="Linux-VServer admin utilities"
HOMEPAGE="http://www.nongnu.org/util-vserver/"
SRC_URI="http://ftp.linux-vserver.org/pub/utils/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
IUSE=""
DEPEND=">=dev-libs/dietlibc-0.30-r2
dev-libs/beecrypt
net-firewall/iptables
net-misc/vconfig
sys-apps/iproute2"
RDEPEND="sys-apps/iproute2
net-misc/vconfig
net-firewall/iptables
dev-libs/beecrypt"
pkg_setup() {
if [[ -z "${VDIRBASE}" ]]; then
einfo
einfo "You can change the default vserver base directory (/vservers)"
einfo "by setting the VDIRBASE environment variable."
fi
: ${VDIRBASE:=/vservers}
einfo
einfo "Using \"${VDIRBASE}\" as vserver base directory"
einfo
}
src_compile() {
econf --with-vrootdir=${VDIRBASE} \
--with-initscripts=gentoo \
--localstatedir=/var || die "econf failed!"
emake || die "emake failed!"
}
src_install() {
make DESTDIR="${D}" install install-distribution \
|| die "make install failed!"
# keep dirs
keepdir /var/run/vservers
keepdir /var/run/vservers.rev
keepdir /var/run/vshelper
keepdir /var/lock/vservers
keepdir /var/cache/vservers
keepdir "${VDIRBASE}"
keepdir "${VDIRBASE}"/.pkg
# remove legacy config file
rm -f "${D}"/etc/vservers.conf
# bash-completion
dobashcompletion "${FILESDIR}"/bash_completion util-vserver
dodoc README ChangeLog NEWS AUTHORS THANKS util-vserver.spec
}
pkg_postinst() {
# Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also
# present when merging.
[ ! -d "${VDIRBASE}" ] && mkdir -p "${VDIRBASE}" &> /dev/null
setattr --barrier "${VDIRBASE}" &> /dev/null
rm /etc/vservers/.defaults/vdirbase
ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase
elog
elog "You have to run the vprocunhide command after every reboot"
elog "in order to setup /proc permissions correctly for vserver"
elog "use. An init script has been installed by this package."
elog "To use it you should add it to a runlevel:"
elog
elog " rc-update add vprocunhide default"
elog
if has_version "<${CATEGORY}/${PN}-0.30.211" ; then
ewarn "Please make sure, that you remove the old init-script from any"
ewarn "runlevel and remove it from your init.d dir!"
ewarn
ewarn "# rc-update del vservers"
ewarn "# rm -f ${ROOT}etc/init.d/vservers"
ewarn
ewarn "Since util-vserver-0.30.211 all Gentoo specific wrappers"
ewarn "have been merged upstream, and may now have a slightly"
ewarn "different syntax, i.e. you have to update scripts that"
ewarn "depend on these wrappers (vesync, vemerge, vupdateworld"
ewarn "and vdispatch-conf)"
ewarn
ewarn "Additionally the init scripts have changed and now use"
ewarn "upstream scripts as backend. An init script to start"
ewarn "virtual servers in the 'default' group/mark has been"
ewarn "installed by this ebuild:"
ewarn
ewarn " rc-update add vservers.default default"
ewarn
ewarn "To start vservers in other groups/marks, you have to"
ewarn "symlink the default init script the same way you do"
ewarn "with net.* scripts:"
ewarn
ewarn " ln -s /etc/init.d/vservers.default /etc/init.d/vservers.<mark>"
ewarn
fi
ewarn "You should definitly fix up the barrier of your vserver"
ewarn "base directory by using the following command in a root shell:"
ewarn
ewarn " setattr --barrier ${VDIRBASE}"
ewarn
}

View File

@ -1,31 +0,0 @@
AUX config.ssh 245 SHA256 5bf5d5a357e88b71e14a12bb28ea68d0286ed29118045aa944484b84b6fa5e4b SHA512 52dbec481cd45136e72370713ab20a41616dccb252e75b884b66e2494aaefe7795719169906dcad5030dcbe33201d021bdad1f7a99120ac40a64611290ff8759 WHIRLPOOL 9b991ad20787e0e7274136ddb8e22e1082360d580f8576feb722730b5c3f3fa22992f671f7916e191052a78d8d688d32044b39059dc7146d14c2da57fa891214
AUX gitlab-git-http.service 972 SHA256 752e1b62a6c182d69b097788d4c21672655af92f150aa5ee416efab67c869f28 SHA512 ba6feefd2741fe97c176e00fbbb802fb4bfc9fc71b2d584c3ad44a312f2b01c9fe92d268d26ab18cb9372ad8616a5ca1554f2895297a17d35f6818bd27b8244b WHIRLPOOL c7c7fa598f2bae6f736a5f84aa3e737dd3b3bce8803128b0b17a8375e4e0c528b95bcd88b959c5bb9bd5ca1fd73330170be6fe2680c1a14702073d3c1c15f265
AUX gitlab-sidekiq-8.init 995 SHA256 179f8f9267f8358827c4c70697bf27dac728451ac7b9dbe0637d397850260fc2 SHA512 fca6c3b86788113f50120ada81859535bcdd3524ebf79e495c532049a5e1cb09b44499268b22610707ea4763bd6b380fe8abfad10520cd17b03802264c34f0bc WHIRLPOOL edc9c083447662bebdde5b0bbb97816f15a3122aa5cae966d1df805aac5a81e51a608cb5447283bda222af3bd28519b653a6ca6b34d1eef84abc37fd719e5955
AUX gitlab-sidekiq.service 1066 SHA256 b9a15ee7498cc5ebecfd51a037ab1e32e66723a1612d5ce9365eefd890b5670e SHA512 33ece22389637b7b4591f4dceedb488fb43a92ca47facb19432f87772bbbf1774d4fb737ace52a6d55533c9e291e343dc56971c6f70fed285a10429d6d97d318 WHIRLPOOL b5a81751b8317bb9244018f9ed82f9793734adbad9983c244429a33d710169eeeed25cdf868d724032866d83bb9676ccbbf616b53363491e15a80e474443f331
AUX gitlab-support.init 1052 SHA256 e7265ab4237298ed2a849c100c24a76e81c8fcfa726acc1256d5ad623474bab1 SHA512 fe2661d1d0940ca663227156715d2d20147cf500b0129a4a38edd1642e8f8c5c7a8d73d5cfd88f1b1785bd0e0a321eb23f62b2e7f2751b10f392bc6d2d5f905b WHIRLPOOL f72764e19a7aa85c8b82c8e7825c8308bc08579d440d68fbe0086c8670aa1f765289d71baf99cf6057b1fc4b31f15d8544608632271408134bb8fae1dc15335a
AUX gitlab-unicorn-8.init 1680 SHA256 c74c6db7c7bbce85df66648e20c11215917041577733454c6590dff3aacf7362 SHA512 44461e070b19abb1ddfa297aa995b04412cd367fb252591a7faf871f958e78c92955c78ba51137fcd1933dce896a9d05efdf06cabbf2cbe86e138fb12ead1bdb WHIRLPOOL 313548a006a3431e8116edbf3d0ce8613a9e65e3725ba4fb3683e95ebf2b2afac3801900d372839e6dc9a0004d805b98889c47292e8622e918c73a3a5e2fc0de
AUX gitlab-unicorn.init 1782 SHA256 198814924c71f3de35cec935c2e50c00ecf0f6aeb3129ec829d6aa170f569377 SHA512 b4c00769dd55eeb3b61c8c4cf1155be286cd3269601f80c21e03c9cd0359dc7e13ed8ad6e4421ce5639d21acb8163172f72482ba300523af2ef09d181201d6ce WHIRLPOOL f484373b7e77d8c4a86e46a61ba35b4e4cde69b054fc441d6d7cd4605a63b6e8b65c396fd6ce6001f0d20b28f39c22447a8746b5ec0716332cb5bb581db0bf46
AUX gitlab-unicorn.service 773 SHA256 010c9e223a30400d9155b39499eb0d7efad23b66baab9fcd9e365c689086b9bd SHA512 0bf9630aa91ed8f590a7bfa42d09b7ba33f6342b43b3d191c792c11157f8926c2a2ac2390eebd8179637e29b5bf68233d4699d62463497a0fd45b9bdbdd9167b WHIRLPOOL fbc709a5550dcc548a35c22c812dafe52ee507f5678b57c22c709ee89a399ae9109e2f56b7a13135d4140f1e024ebc4effe4aa4de13e0f36691da2a0737d9792
AUX gitlab.conf 27 SHA256 cd9be088bbb67a5400407fc6f63c061eb224f16748b7d0812ff2c101f43ca263 SHA512 909c49fee6d050c1e94b2559ff2a9d54c5c346492be0e2920b50d56d69eaddbed67e3ac12e012d2a9601b5596640ebf33c8dc68fc588a03ca370d963294be37f WHIRLPOOL fa436e8d7d2643d450259d26b6e7b24dae69df47ed22e5ef2a567f37aa785fbf3b0eb1129ae7c8bf8986c29559fc3b744a34064375e5245dce2b10053cd715d9
AUX gitlab.logrotate 191 SHA256 9c02c26f5faa443cd576599462c6a8206d62495ab9671098a5f0e379f216541b SHA512 2212a8e5f2d4704256d5abb92b5a1201b20f82b04610758e734d163792a60b78f482017510169666a70ed9352b171177d05237ffe87988cacb764c5ef7ba5443 WHIRLPOOL f61297015311316554e63af4822b8d274f5a2378e829e5c14bb22e642b0d83023446acff45a13aa354f127543ce1552c99488b92ed8f39d86959343c7e67bbee
AUX gitlabhq-6.9.2-fix-checks-gentoo.patch 413 SHA256 5e9358e6670ed6711f171876c46b7222e3fcb66e6cfa1658b3627d2878a92d87 SHA512 50a1e441d9bfcf0f5784fa1b940833653010dca23d96ca9b2cd462b7f659aa5ca6042c7eb8b2b5dd3319e507accd0ccb8d0c5ee2be78aa35749df9c3e924e899 WHIRLPOOL 7452073e202ecf7bb08ee463c088bbe883ba31aeb8f96db18f16af6f119cba6e698fa3a619122b05a69c932434b856d8162ff59c33f66214b7cbb53035a619a3
AUX gitlabhq-6.9.2.init 1920 SHA256 3fe052a74614130c3e8cddc59ef40c05e5249e9714b77201791344ddf933da25 SHA512 6d2ebc5559248696eae55d34b17562262c1ba4faf3be7e58da149addcde77a75137e9cef7c9f2a9a7b5382fa1ad1e79eaab035c74a435b9ba4510dbb10cffe60 WHIRLPOOL 191ee5ebf2b8c4d0552848e2323250073a667fbf04987907f7840435ae9dc862ab4a0b0f8bf157a1adeeb24d6385053ae049592b5b4f06db076a7b31ae63d6a0
AUX gitlabhq-7.0.0-fix-checks-gentoo.patch 413 SHA256 5e9358e6670ed6711f171876c46b7222e3fcb66e6cfa1658b3627d2878a92d87 SHA512 50a1e441d9bfcf0f5784fa1b940833653010dca23d96ca9b2cd462b7f659aa5ca6042c7eb8b2b5dd3319e507accd0ccb8d0c5ee2be78aa35749df9c3e924e899 WHIRLPOOL 7452073e202ecf7bb08ee463c088bbe883ba31aeb8f96db18f16af6f119cba6e698fa3a619122b05a69c932434b856d8162ff59c33f66214b7cbb53035a619a3
AUX gitlabhq-7.0.0.init 1920 SHA256 79bc5cece6bf79b57c9512cfafa72f4791aeb759b81de5ae5daa2f380a2c069a SHA512 5e5601391fb8866782bbaad48d04364b3dc45e06a144931b7b159da98052c93971fd46f3029a1e194b16a8791fbbc35c1b7e858b0453363bf1a5563dbb364036 WHIRLPOOL e81339c047b246a53c63ea5f2da8ba32821afab891b9976b4beab9bff9358d65f335c5936cc6e0fef35314774ea105163f821f9295658639beba2fda9a39c0e7
AUX gitlabhq-7.4.3-fix-checks-gentoo.patch 413 SHA256 5e9358e6670ed6711f171876c46b7222e3fcb66e6cfa1658b3627d2878a92d87 SHA512 50a1e441d9bfcf0f5784fa1b940833653010dca23d96ca9b2cd462b7f659aa5ca6042c7eb8b2b5dd3319e507accd0ccb8d0c5ee2be78aa35749df9c3e924e899 WHIRLPOOL 7452073e202ecf7bb08ee463c088bbe883ba31aeb8f96db18f16af6f119cba6e698fa3a619122b05a69c932434b856d8162ff59c33f66214b7cbb53035a619a3
AUX gitlabhq-7.4.3.init 1920 SHA256 544cf4d927964d38efd016234016e4ac9670cc5c22a702c8fe5c118047822775 SHA512 d297bc4696a571917f3d70222398d12e3fad75f1c7f25ceaf8789c33b0384f31ae34918df392a45a976327f629bac795145f4c377b7c6226e352fe6de96174c7 WHIRLPOOL d2092ea1844e2768847ebfc8bccf732908b30fcf7c7e1a8f1b10cc7f48e6a089540ddc61ebea140f22bf4aae099d65616c4daa258b9f760b8a437a35ea54be6e
AUX gitlabhq-7.8.1-fix-checks-gentoo.patch 412 SHA256 01a04c47d51b10674e38395d8197320c3e0ff65af65c42006bd42330a38fe6e3 SHA512 962cf056270073759376340f42f0a89af8073e9237ad8f1c9d602a5b3fbe378f3cafbeec910156a7fc1046a87a641dcccc0d39d9031255bf4cb4e1b38817e693 WHIRLPOOL e5ff60cecb4683c0f1917e7b81ce657acb8d1e80ff9375ca4d6e68214d8720a518cfbd48659ea741f7fcc8fbcf0bb82be8bc030ccffc347b50b88300e1d6aa68
AUX gitlabhq-7.8.1.init 1943 SHA256 a3706f4b58a86320ea205396eee9561388f5da5d0694f839b83222d83f57cf4b SHA512 29cc7acb41f02441273bb76fcf94f0b781c96d4c7b7ccb3b5bafeff168831d841921afe052671da21ba3fb84200cfffcfcc86eaf61e84b4ce7b102369b4d23c7 WHIRLPOOL 6d9e7da52c173f6d4ba723105f10513eea9efd280d5bdd228eaa44d14d7fc459e58a04482b7cfe61d4c5ddc30cdeefcd085ab0f660246eb28bf927a017ff3ee2
AUX gitlabhq-7.9.0-fix-checks-gentoo.patch 413 SHA256 5e9358e6670ed6711f171876c46b7222e3fcb66e6cfa1658b3627d2878a92d87 SHA512 50a1e441d9bfcf0f5784fa1b940833653010dca23d96ca9b2cd462b7f659aa5ca6042c7eb8b2b5dd3319e507accd0ccb8d0c5ee2be78aa35749df9c3e924e899 WHIRLPOOL 7452073e202ecf7bb08ee463c088bbe883ba31aeb8f96db18f16af6f119cba6e698fa3a619122b05a69c932434b856d8162ff59c33f66214b7cbb53035a619a3
AUX gitlabhq-7.9.0.init 1920 SHA256 ceb6bdd0f497d5c615c3d037c9211ed68b0979356a2e972be430243d1248a7d1 SHA512 37bbea92a7a9427c8b9203e5ef13e2f1db7b0fb02b22457849d785517f8253e161f065821a17ed06d41d662237f2cb930cc2ae4f75091ed951e7eadf9283803a WHIRLPOOL 3c7fe0029385b85ad9fd9a07bfc1ba3683664d2233367e369ed89e43bebd9615279fbbe76bc777ca3366adc3a856a4c27f55b80fa685fc53608fc8078ab3b5e1
AUX gitlabhq-8.0.2-fix-gemfile.patch 1586 SHA256 c91945e0e639b1297519d7165a3aa03fe203a29cde1d195f277be6cba71c67e1 SHA512 6eb15935292902b3090e856e00a972ee2e442eadbf2e42fbde1e4727d75d65e0e06c6be54be8fcd7aeebb5e0616c8d5123f60ebabebd7e02531f0fbc7b03d760 WHIRLPOOL 985e86c5bcb1ea059b41f1f08d3528afd3ab31d71eb81df79a2b454a0e2fb24dbf08b4a1c9197e56864550842baa60599db631bbd2a3603caaea9b7d6743e3d1
AUX gitlabhq-8.0.4.init 1944 SHA256 9f6b25a118dcbdc144290acb828f67a7e766d223854390036606bf845882d6da SHA512 3706a84b0c01392264f6036708ada0a3941ca26ff0ee7a3abd2eccebbd2e66fa4b6501b5b4efd24f4b1170502843860fdb4209f9536b51a65a4c0325d5d85ea5 WHIRLPOOL af5e48939c34640130facb6a54a5386e05d620feea6ccc96d00c07442c64717bcb39cbf01471a93297a8e7ac5b14329906e570ca92e5a0a6a60831d5f7155222
AUX gitlabhq-fix-sendmail-config.patch 731 SHA256 51f0d0af2a7c048d7cff56cf27955632f340ca67f9d460af840cf34ed60ca574 SHA512 b10d5b8d89927404d25345e17ba37ca4e7848b04c2ca20c5eef14eaac43d9ba14b62ae4c0d532eefaf6f9a2944578e84eb65a3420335d32495855c4807eec356 WHIRLPOOL 66f6443f311f2355ffd4efaea914f462816a1966a715b3b5ffaaa26b41bdced928b9905b8606f06fac3c2ccf20741553cfed2615430287bede01cf376aae2a60
DIST gitlabhq-8.0.4.tar.gz 8238901 SHA256 644b4bc98907bb171a1281ae73ac510f1bc6d379d39020f61e1697bb73547ae8 SHA512 41d4e8088221beb4aab731cf0ddccba0be2e4746ece0e33f92ec5488a4ed759f1e18788efed2351f5a643c31f47b4138a33077313b27e4e4567c9e9ad8dc79e5 WHIRLPOOL 08157b0f82150a5245cb2985b704026dab5f6342ab9e080c3149850ea37be5482d2dfc330a8d441957c1d8383528d3e65eb41c70ccfbb4a49e4a442f6f24a56e
EBUILD gitlabhq-6.9.2.ebuild 11730 SHA256 baca492d6634b1e932cf5d1be9a9f56f3aada00ee7e3f10e5fbbb40fd180bf22 SHA512 c1731cb8df63ff9bc04e29ac06a0ec9cd7587ac372460ea0d4ae17735257c19376b9b95e943f46570b3feff541110c96b19de1b1e215655ee28e07f5bdb07846 WHIRLPOOL f916eab9f96e93caba3954079af7f2af5cb3c83bbc5ca2b4f419845c6d84a89148e64a5a7a43c6771bf0590206bc5f2733ec7ba642f74b103a4d142d362b44b8
EBUILD gitlabhq-7.0.0.ebuild 11770 SHA256 319b8321bad5bd01db8cc633733c557643cacf0251a93c2b94e53d6c8cf716ca SHA512 3c8537afbb1b0aa03957cede02747e967088410e782ed35aed8e2f34d4c282312b88a6fb2f60cb87aeda42688af492795d8562345dcdf010f9844516bd419827 WHIRLPOOL b47a85ee57523a67e9ec6fe6dd93231344e358920b1f42796fc60d614d0cad1ae4696f93b474e12ac08922d684b622b493e45ce5cf968ae3374c83d462e7af19
EBUILD gitlabhq-7.4.3.ebuild 12261 SHA256 355978fca0c05f261864a0514cb60379b76d7a943daca390fd96601125da7e28 SHA512 02cb41d7ae7cc29c46dc8b745679e3ee6d1bf39fed035e6e1a773900fca743783f8604a3f3bd70c9673a7f03581410ee32c50808226c55ab390671949a68da58 WHIRLPOOL 095d19b2fe9f0789881ab89ef98cc1f711dc567900e160b1a8a0a4523295ad0a8a49e45beeac62c7698ad0c9f46bccba3e0a24c6a190cf21ece2c9bf0e22325a
EBUILD gitlabhq-7.8.1.ebuild 14387 SHA256 a2cee01efcb169abb21486117be2f57a8cdf213d206b52fc88b1a2fdd7b73a87 SHA512 bfa3f2c3623a10b9f2255a1c9f1b08921c8afc6085a7f4e58e926b2e637b23ea5c2661a67643fb6c8be6e0d057ce57a3cd200ff933d5325d5d6d325fc0a46873 WHIRLPOOL c418d9409554beb683a586a5e0dbce6796d641a957fafdd1d1243544ac4706cbb2ab00bd7fdfe74ab56938bb07745bfe1671cebb41c09bd6d20a7e5a105972ec
EBUILD gitlabhq-7.9.0.ebuild 12273 SHA256 37e25a3640a33b0ce8a5cb5ed579665a118134882a1946f1ab869169418eb9c4 SHA512 8f467ae66b6fe25d58401c9f0aced0f2c8d54df40689a0b4d6a45437dde03e422e4ba0d419f4bc9b7e9232e475fdae3efc0d28e7855bc15a2f61aa04fdc5b14f WHIRLPOOL 3d23bb51ed5da285cd61e535da75349a5a43e86e4a35a300d7eae8500b4badf35da6ebc7c37ecfb77ce010a60cf1ee28516a93cbd2d26f472aeb9b2e0691ea41
EBUILD gitlabhq-8.0.4-r1.ebuild 11220 SHA256 93a8b2b23b6db248006db6f6340999864723dbf6288111bf20c92d195c8c133c SHA512 c67cb757651ae76f2b2774a99908536dadd0aa8b77277719d14c91bbc9c4705b6c82759e21799edee459fb634d5e336ef8eef7e75ad78718723a205ffcd72cc5 WHIRLPOOL 223b14502091b9fa06e4bd1b3e02a252d8c75651ec7f6ad0790257ed0494215f94690cc71f306fb1748f269ef2790fbc43a038685b207475f0e221455512e20b
EBUILD gitlabhq-8.0.4.ebuild 14399 SHA256 3ec4be257e35c2ae4266435749ddfff9368e437fa075836a5e03f39574817ca7 SHA512 6ee8f4ec901d42d66553a243eeb9ee4b6bb3d309c6091979f4f25998527f69370601af43d32d86a0eaf649dd47355ed8715eed427f16db39ea85d726d5ab7f36 WHIRLPOOL 686afcddcd51478f626aa064a1dfed9b6c7b2073ab99a1af31e37d2ef8fd33abece4a9aae911fd78b78c05c82f8ab410266b0e7ecea4102505d24c9521e8e378

View File

@ -1,10 +0,0 @@
Host localhost
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
BatchMode yes
CheckHostIP no
AddressFamily inet
PreferredAuthentications publickey
ControlMaster auto
ControlPath ~/.ssh/ssh-%r-%h:%p.sock
ControlPersist 24h

View File

@ -1,25 +0,0 @@
#####################################################
#
# GitLab version : 8.x - 8.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################
[Unit]
Description=Gitlab Git HTTP Worker
Requires=gitlab-unicorn.service
Wants=gitlab-unicorn.service
After=gitlab-unicorn.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab
SyslogIdentifier=gitlab-git-http-server
PIDFile=/run/gitlab/gitlab-git-http-server.pid
ExecStart=/opt/gitlab/bin/daemon_with_pidfile /run/gitlab/gitlab-git-http-server.pid /usr/bin/gitlab-git-http-server -listenUmask 0 -listenNetwork unix -listenAddr /run/gitlab/gitlab-git-http-server.socket -authBackend http://127.0.0.1:8080 /var/lib/git/repositories/ >> /var/log/gitlab/gitlab-git-http-server.log 2>&1
[Install]
WantedBy=multi-user.target

View File

@ -1,43 +0,0 @@
#!/sbin/runscript
name="GitLab Sidekiq"
description="Sidekiq for GitLab"
: ${gitlab_user:=@USER@}
: ${gitlab_base:="@GITLAB_BASE@"}
: ${rails_env:=production}
: ${sidekiq_pidfile:="/run/gitlab/sidekiq.pid"}
: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"}
: ${sidekiq_queues:="@QUEUES@"}
sidekiq_command="/usr/bin/bundle"
sidekiq_command_args="exec sidekiq -q ${sidekiq_queues} -P ${sidekiq_pidfile} -L ${sidekiq_logfile}"
depend() {
need redis
use net gitlab-git-http-server
}
start() {
checkpath -d -o ${gitlab_user} -m755 "$(dirname "${sidekiq_pidfile}")"
ebegin "Starting ${name} - Sidekiq"
start-stop-daemon --start \
--background --quiet \
--chdir "${gitlab_base}" \
--user=${gitlab_user} \
--pidfile="${sidekiq_pidfile}" \
--env RAILS_ENV=${rails_env} \
--exec ${sidekiq_command} -- ${sidekiq_command_args}
eend $?
}
stop() {
ebegin "Stopping ${name} - Sidekiq"
start-stop-daemon --stop \
--pidfile=${sidekiq_pidfile} \
--exec ${sidekiq_command}
eend $?
}

View File

@ -1,27 +0,0 @@
#####################################################
#
# GitLab version : 5.x - 7.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################
[Unit]
Description=GitLab Sidekiq Worker
Requires=redis.service
Wants=mysqld.service postgresql.service
After=redis.service mysqld.service postgresql.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-sidekiq
PIDFile=/run/gitlab/sidekiq.pid
ExecStart=/usr/bin/bundle exec "sidekiq -d -q archive_repo -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P /run/gitlab/sidekiq.pid -d -L /var/log/gitlab/sidekiq.log >> /var/log/gitlab/sidekiq.log 2>&1"
ExecStop=/usr/bin/bundle exec "sidekiqctl stop /run/gitlab/sidekiq.pid >> /var/log/gitlab/sidekiq.log 2>&1"
[Install]
WantedBy=multi-user.target

View File

@ -1,44 +0,0 @@
#!/sbin/runscript
name="GitLab support"
description="Support for GitLab @SLOT@"
: ${gitlab_user:=@GIT_USER@}
: ${gitlab_group:=@GIT_GROUP@}
: ${gitlab_home:="@DEST_DIR@"}
: ${sidekiq_pidfile:="@DEST_DIR@/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="@LOG_DIR@/sidekiq.log"}
: ${rails_env:=production}
bundle="/usr/bin/bundle"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec rake sidekiq:start RAILS_ENV=${rails_env}"
sidekiq_stop_command_args="exec rake sidekiq:stop RAILS_ENV=${rails_env}"
if [ ${rails_env} = development ]; then
sidekiq_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net
}
start() {
ebegin "Starting GitLab @SLOT@ Sidekiq"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab @SLOT@ Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
}

View File

@ -1,67 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab on Unicorns"
: ${gitlab_user:=@USER@}
: ${gitlab_base:="@GITLAB_BASE@"}
: ${rails_env:=production}
: ${server_pidfile:="/run/gitlab/unicorn.pid"}
: ${sidekiq_pidfile:="/run/gitlab/sidekiq.pid"}
: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"}
: ${sidekiq_queues:="@QUEUES@"}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_base}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_command_args="exec sidekiq -q ${sidekiq_queues//,/ -q } -P ${sidekiq_pidfile} -L ${sidekiq_logfile}"
depend() {
provide gitlab
need redis
use net gitlab-git-http-server
}
start() {
ebegin "Starting ${name} - Unicorn servers"
checkpath -d -o ${gitlab_user} -m755 "$(dirname "${server_pidfile}")"
checkpath -d -o ${gitlab_user} -m755 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_base}" \
--user=${gitlab_user} \
--pidfile="${server_pidfile}" \
--env RAILS_ENV=${rails_env} \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting ${name} - Sidekiq"
start-stop-daemon --start \
--background --quiet \
--chdir "${gitlab_base}" \
--user=${gitlab_user} \
--pidfile="${sidekiq_pidfile}" \
--env RAILS_ENV=${rails_env} \
--exec ${sidekiq_command} -- ${sidekiq_command_args}
eend $?
}
stop() {
ebegin "Stopping ${name} - Sidekiq"
start-stop-daemon --stop \
--pidfile=${sidekiq_pidfile} \
--exec ${sidekiq_command}
eend $?
ebegin "Stopping ${name} - Unicorn servers"
start-stop-daemon --stop \
--signal QUIT \
--pidfile=${server_pidfile} \
--exec ${server_command}
eend $?
}

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab @SLOT@ on Unicorns"
: ${gitlab_user:=@GIT_USER@}
: ${gitlab_group:=@GIT_GROUP@}
: ${gitlab_home:="@DEST_DIR@"}
: ${server_pidfile:="@DEST_DIR@/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="@DEST_DIR@/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="@LOG_DIR@/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec rake sidekiq:start RAILS_ENV=${rails_env}"
sidekiq_stop_command_args="exec rake sidekiq:stop RAILS_ENV=${rails_env}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net
}
start() {
ebegin "Starting GitLab @SLOT@ Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab @SLOT@ Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab @SLOT@ Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab @SLOT@ Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,25 +0,0 @@
#####################################################
#
# GitLab version : 5.x - 7.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################
[Unit]
Description=GitLab Unicorn Server
Requires=redis.service
Wants=mysqld.service postgresql.service
After=redis.service mysqld.service postgresql.service
[Service]
User=git
WorkingDirectory=/opt/gitlab
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-unicorn
PIDFile=/run/gitlab/unicorn.pid
ExecStart=/usr/bin/bundle exec "unicorn_rails -D -c /opt/gitlab/config/unicorn.rb -E production"
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
d /run/gitlab 0755 git git

View File

@ -1,10 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@LOG_DIR@/*.log {
missingok
delaycompress
compress
copytruncate
}

View File

@ -1,11 +0,0 @@
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
@@ -20,8 +20,6 @@
check_gitlab_config_not_outdated
check_log_writable
check_tmp_writable
- check_init_script_exists
- check_init_script_up_to_date
check_projects_have_namespace
check_satellites_exist
check_redis_version

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab 6.9 on Unicorns"
: ${gitlab_user:=git}
: ${gitlab_group:=git}
: ${gitlab_home:="/opt/gitlabhq-6.9"}
: ${server_pidfile:="/opt/gitlabhq-6.9/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="/opt/gitlabhq-6.9/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="/var/log/gitlabhq-6.9/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net
}
start() {
ebegin "Starting GitLab 6.9 Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab 6.9 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab 6.9 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab 6.9 Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,11 +0,0 @@
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
@@ -20,8 +20,6 @@
check_gitlab_config_not_outdated
check_log_writable
check_tmp_writable
- check_init_script_exists
- check_init_script_up_to_date
check_projects_have_namespace
check_satellites_exist
check_redis_version

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab 7.0 on Unicorns"
: ${gitlab_user:=git}
: ${gitlab_group:=git}
: ${gitlab_home:="/opt/gitlabhq-7.0"}
: ${server_pidfile:="/opt/gitlabhq-7.0/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="/opt/gitlabhq-7.0/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="/var/log/gitlabhq-7.0/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net
}
start() {
ebegin "Starting GitLab 7.0 Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab 7.0 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab 7.0 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab 7.0 Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,11 +0,0 @@
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
@@ -20,8 +20,6 @@
check_gitlab_config_not_outdated
check_log_writable
check_tmp_writable
- check_init_script_exists
- check_init_script_up_to_date
check_projects_have_namespace
check_satellites_exist
check_redis_version

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab 7.4 on Unicorns"
: ${gitlab_user:=git}
: ${gitlab_group:=git}
: ${gitlab_home:="/opt/gitlabhq-7.4"}
: ${server_pidfile:="/opt/gitlabhq-7.4/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="/opt/gitlabhq-7.4/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="/var/log/gitlabhq-7.4/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net
}
start() {
ebegin "Starting GitLab 7.4 Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab 7.4 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab 7.4 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab 7.4 Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,11 +0,0 @@
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
@@ -20,8 +20,6 @@
check_gitlab_config_not_outdated
check_log_writable
check_tmp_writable
- check_init_script_exists
- check_init_script_up_to_date
check_projects_have_namespace
check_satellites_exist
check_redis_version

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab 7.8 on Unicorns"
: ${gitlab_user:=git}
: ${gitlab_group:=git}
: ${gitlab_home:="/opt/gitlabhq-7.8"}
: ${server_pidfile:="/opt/gitlabhq-7.8/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="/opt/gitlabhq-7.8/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="/var/log/gitlabhq-7.8/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec sidekiq -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net mysql
}
start() {
ebegin "Starting GitLab 7.8 Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab 7.8 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab 7.8 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab 7.8 Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,11 +0,0 @@
--- lib/tasks/gitlab/check.rake.orig 2013-11-16 21:51:59.570000000 +0100
+++ lib/tasks/gitlab/check.rake 2013-11-16 21:52:40.900000000 +0100
@@ -20,8 +20,6 @@
check_gitlab_config_not_outdated
check_log_writable
check_tmp_writable
- check_init_script_exists
- check_init_script_up_to_date
check_projects_have_namespace
check_satellites_exist
check_redis_version

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab 7.9 on Unicorns"
: ${gitlab_user:=git}
: ${gitlab_group:=git}
: ${gitlab_home:="/opt/gitlabhq-7.9"}
: ${server_pidfile:="/opt/gitlabhq-7.9/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="/opt/gitlabhq-7.9/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="/var/log/gitlabhq-7.9/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net
}
start() {
ebegin "Starting GitLab 7.9 Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab 7.9 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab 7.9 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab 7.9 Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,56 +0,0 @@
diff --git a/Gemfile b/Gemfile
index 5443374..31e1db6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -181,6 +181,9 @@ gem "underscore-rails", "~> 1.4.4"
# Sanitize user input
gem "sanitize", '~> 2.0'
+# The newer revision of charlock_holmes that is finally fixed to be compatible with Gentoo
+gem "charlock_holmes", git: "https://github.com/brianmario/charlock_holmes.git", ref: "dde194609b3513b0d2369ce8f916ae52566154b4"
+
# Protect against bruteforcing
gem "rack-attack", '~> 4.3.0'
@@ -190,9 +193,6 @@ gem 'ace-rails-ap', '~> 2.0.1'
# Keyboard shortcuts
gem 'mousetrap-rails', '~> 1.4.6'
-# Detect and convert string character encoding
-gem 'charlock_holmes', '~> 0.6.9.4'
-
gem "sass-rails", '~> 4.0.5'
gem "coffee-rails", '~> 4.1.0'
gem "uglifier", '~> 2.3.2'
diff --git a/Gemfile.lock b/Gemfile.lock
index 3c16251..960effc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,3 +1,10 @@
+GIT
+ remote: https://github.com/brianmario/charlock_holmes.git
+ revision: dde194609b3513b0d2369ce8f916ae52566154b4
+ ref: dde194609b3513b0d2369ce8f916ae52566154b4
+ specs:
+ charlock_holmes (0.6.9.4)
+
GEM
remote: https://rubygems.org/
specs:
@@ -101,7 +108,6 @@ GEM
json (>= 1.7)
celluloid (0.16.0)
timers (~> 4.0.0)
- charlock_holmes (0.6.9.4)
chronic (0.10.2)
chunky_png (1.3.4)
cliver (0.3.2)
@@ -802,7 +808,7 @@ DEPENDENCIES
capybara (~> 2.4.0)
capybara-screenshot (~> 1.0.0)
carrierwave (~> 0.9.0)
- charlock_holmes (~> 0.6.9.4)
+ charlock_holmes!
coffee-rails (~> 4.1.0)
colored (~> 1.2)
colorize (~> 0.5.8)

View File

@ -1,64 +0,0 @@
#!/sbin/runscript
name="GitLab"
description="GitLab 8.0 on Unicorns"
: ${gitlab_user:=git}
: ${gitlab_group:=git}
: ${gitlab_home:="/opt/gitlabhq-8.0"}
: ${server_pidfile:="/opt/gitlabhq-8.0/tmp/pids/unicorn.pid"}
: ${sidekiq_pidfile:="/opt/gitlabhq-8.0/tmp/pids/sidekiq.pid"}
: ${sidekiq_log:="/var/log/gitlabhq-8.0/sidekiq.log"}
: ${rails_env:=production}
server_command="/usr/bin/bundle"
server_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
sidekiq_command="/usr/bin/bundle"
sidekiq_start_command_args="exec sidekiq -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e ${rails_env} -P ${sidekiq_pidfile} -d -L ${sidekiq_log} >> ${sidekiq_log}"
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
if [ ${rails_env} = development ]; then
sidekiq_command_args+=" VVERBOSE=1"
fi
depend() {
provide gitlab
need redis
use net mysql
}
start() {
ebegin "Starting GitLab 8.0 Unicorn servers"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${server_pidfile}")"
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
start-stop-daemon --start \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}" \
--exec ${server_command} -- ${server_command_args}
eend $?
ebegin "Starting GitLab 8.0 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
eend $?
}
stop() {
ebegin "Stopping GitLab 8.0 Sidekiq"
cd "${gitlab_home}"
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
eend $?
ebegin "Stopping GitLab 8.0 Unicorn servers"
start-stop-daemon --stop \
--chdir "${gitlab_home}" \
--user="${gitlab_user}:${gitlab_group}" \
--pidfile="${server_pidfile}"
eend $?
}

View File

@ -1,20 +0,0 @@
diff --git a/config/environments/production.rb b/gitlab-6/environments/production.rb
index 82eb250..10e25e5 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -73,11 +73,10 @@ Gitlab::Application.configure do
# config.active_record.auto_explain_threshold_in_seconds = 0.5
config.action_mailer.delivery_method = :sendmail
- # Defaults to:
- # # config.action_mailer.sendmail_settings = {
- # # location: '/usr/sbin/sendmail',
- # # arguments: '-i -t'
- # # }
+ config.action_mailer.sendmail_settings = {
+ location: '/usr/sbin/sendmail',
+ arguments: '-i'
+ }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
end

View File

@ -1,375 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
# Mainteiner notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
# - USE flags analytics and public-projects applies our custom patches, see
# https://github.com/cvut/gitlabhq for more information.
#
USE_RUBY="ruby20"
PYTHON_DEPEND="2:2.5"
EGIT_REPO_URI="https://github.com/gitlabhq/gitlabhq.git"
EGIT_COMMIT="v${PV}"
inherit eutils git-2 python ruby-ng versionator user
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2)
KEYWORDS="~amd64 ~x86"
IUSE="memcached mysql +postgres +unicorn"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# json dev-util/ragel
# yajl-ruby dev-libs/yajl
# pygments.rb python 2.5+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql-base
# mysql virtual/mysql
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libxml2
dev-libs/libxslt
dev-util/ragel
dev-libs/yajl
net-libs/nodejs
postgres? ( dev-db/postgresql-base )
mysql? ( virtual/mysql )
memcached? ( net-misc/memcached )"
DEPEND="${GEMS_DEPEND}
$(ruby_implementation_depend ruby19 '=' -1.9.3*)[readline,ssl,yaml]
>=dev-vcs/git-1.8.1.5
>=dev-vcs/gitlab-shell-1.9.4
net-misc/curl
virtual/ssh"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
RUBY_PATCHES=(
"${P}-fix-checks-gentoo.patch"
)
GIT_USER="git"
GIT_GROUP="git"
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
DEST_DIR="/opt/${PN}-${SLOT}"
CONF_DIR="/etc/${PN}-${SLOT}"
GIT_REPOS="${GIT_HOME}/repositories"
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
GITLAB_SHELL="/var/lib/gitlab-shell"
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
pkg_setup() {
enewgroup ${GIT_GROUP}
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
}
all_ruby_unpack() {
git-2_src_unpack
}
each_ruby_prepare() {
# fix path to repo and gitlab-shell hooks
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
sed -i \
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
# modify database settings
sed -i \
-e 's|\(username:\) postgres.*|\1 gitlab|' \
-e 's|\(password:\).*|\1 gitlab|' \
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# replace "secret" token with random one
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
config/initializers/secret_token.rb \
|| die "failed to filter secret_token.rb"
# remove needless files
#rm -r .git Satisfy gitlab::check.
rm .foreman .gitignore Procfile .travis.yml
use unicorn || rm config/unicorn.rb.example
use postgres || rm config/database.yml.postgresql
use mysql || rm config/database.yml.mysql
# remove dependency on therubyracer and libv8 (we're using nodejs instead)
local tfile; for tfile in Gemfile{,.lock}; do
sed -i \
-e '/therubyracer/d' \
-e '/libv8/d' \
"${tfile}" || die "failed to filter ${tfile}"
done
# change thin and unicorn dependencies to be optional
sed -i \
-e '/^gem "thin"/ s/$/, group: :thin/' \
-e '/^gem "unicorn"/ s/$/, group: :unicorn/' \
Gemfile || die "failed to modify Gemfile"
# change cache_store
if use memcached; then
sed -i \
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
config/environments/production.rb \
|| die "failed to modify production.rb"
fi
# Update pathes for unicorn
if use unicorn; then
sed -i \
-e "s#/home/git/gitlab#${DEST_DIR}#" \
config/unicorn.rb.example \
|| die "failed to modify unicorn.rb.example"
fi
}
each_ruby_install() {
local dest="${DEST_DIR}"
local conf="/etc/${PN}-${SLOT}"
local temp="/var/tmp/${PN}-${SLOT}"
local logs="/var/log/${PN}-${SLOT}"
local uploads="${DEST_DIR}/public/uploads"
## Prepare directories ##
diropts -m750
keepdir "${logs}"
dodir "${temp}"
diropts -m755
keepdir "${conf}"
dodir "${dest}"
dodir "${uploads}"
dosym "${temp}" "${dest}/tmp"
dosym "${logs}" "${dest}/log"
## Link gitlab-shell into git home
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
## Install configs ##
insinto "${conf}"
doins -r config/*
dosym "${conf}" "${dest}/config"
insinto "${dest}/.ssh"
newins "${FILESDIR}/config.ssh" config
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
## Install all others ##
# remove needless dirs
rm -Rf config tmp log
insinto "${dest}"
doins -r ./
## Install logrotate config ##
dodir /etc/logrotate.d
sed -e "s|@LOG_DIR@|${logs}|" \
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|| die "failed to filter gitlab.logrotate"
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test thin"
local flag; for flag in memcached mysql postgres unicorn; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
# Fix invalid ldflags for charlock_holmes,
# see https://github.com/brianmario/charlock_holmes/issues/32
${RUBY} /usr/bin/bundle config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
## Clean ##
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
# remove gems cache
rm -Rf ${gemsdir}/cache
# fix permissions
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
fperms +x script/rails
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
## RC scripts ##
local rcscript=${P}.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@GIT_USER@|${GIT_USER}|" \
-e "s|@GIT_GROUP@|${GIT_USER}|" \
-e "s|@SLOT@|${SLOT}|" \
-e "s|@DEST_DIR@|${dest}|" \
-e "s|@LOG_DIR@|${logs}|" \
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
if use memcached; then
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
fi
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
}
pkg_postinst() {
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
einfo "Generating SSH key for git user"
su -l ${GIT_USER} -s /bin/sh -c "
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|| die "failed to generate SSH key"
fi
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
einfo "modify this file according to your needs!"
su -l ${GIT_USER} -s /bin/sh -c "
git config --global user.email 'gitlab@localhost';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
elog
elog "1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
elog " and edit this file in order to configure your GitLab settings."
elog
elog "2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
elog " and edit this file in order to configure your database settings"
elog " for \"production\" environment."
elog
elog "3. If this is a new installation, you should create database for your GitLab instance."
elog
if use postgres; then
elog " If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlab_production"
elog " Note: You should change your password to something more random..."
elog
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
elog " To get it work you must use this ugly workaround:"
elog " psql -U postgres -d gitlab"
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
elog
fi
elog "4. Finally execute the following command to initlize or update the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server."
elog
}
pkg_config() {
## Check config files existence ##
einfo "Checking configuration files"
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
eerror "Copy ${CONF_DIR}/database.yml.* to"
eerror "${CONF_DIR}/database.yml and edit this file in order to configure your"
eerror "database settings for \"production\" environment."
die
fi
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
eerror "Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
eerror "and edit this file in order to configure your GitLab settings"
eerror "for \"production\" environment."
die
fi
## Initialize app ##
local RAILS_ENV=${RAILS_ENV:-production}
local RUBY=${RUBY:-ruby20}
local BUNDLE="${RUBY} /usr/bin/bundle"
# Ask user whether this is the first installation
einfon "Do you want to upgrade an existing installation? [Y|n] "
do_upgrade=""
while true
do
read -r do_upgrade
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $do_upgrade ]] ; then
einfo "Migration database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake db:migrate RAILS_ENV=production
${BUNDLE} exec rake gitlab:satellites:create RAILS_ENV=production" \
|| die "failed to migrate database."
einfo "Clear redis cache ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|| die "failed to run cache:clear"
einfo "Clear and precompile assets ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake assets:clean RAILS_ENV=production
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|| die "failed to run assets:precompile"
else
einfo "Initializing database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|| die "failed to run rake gitlab:setup"
fi
einfo "You might want to run the following in order to check your application status:"
einfo "# cd ${DEST_DIR}"
einfo "# ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
einfo ""
einfo "GitLab is prepared, now you should configure your web server."
}

View File

@ -1,375 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
# Mainteiner notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
# - USE flags analytics and public-projects applies our custom patches, see
# https://github.com/cvut/gitlabhq for more information.
#
USE_RUBY="ruby20"
PYTHON_DEPEND="2:2.5"
EGIT_REPO_URI="https://github.com/gitlabhq/gitlabhq.git"
EGIT_COMMIT="v${PV}"
inherit eutils git-2 python ruby-ng versionator user
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2)
KEYWORDS="~amd64 ~x86"
IUSE="memcached mysql +postgres +unicorn"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# json dev-util/ragel
# yajl-ruby dev-libs/yajl
# pygments.rb python 2.5+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql-base
# mysql virtual/mysql
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libxml2
dev-libs/libxslt
dev-util/ragel
dev-libs/yajl
net-libs/nodejs
postgres? ( dev-db/postgresql-base )
mysql? ( virtual/mysql )
memcached? ( net-misc/memcached )"
DEPEND="${GEMS_DEPEND}
$(ruby_implementation_depend ruby19 '=' -1.9.3*)[readline,ssl,yaml]
>=dev-vcs/git-1.8.1.5
>=dev-vcs/gitlab-shell-1.9.6
net-misc/curl
virtual/ssh"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
RUBY_PATCHES=(
"${P}-fix-checks-gentoo.patch"
)
GIT_USER="git"
GIT_GROUP="git"
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
DEST_DIR="/opt/${PN}-${SLOT}"
CONF_DIR="/etc/${PN}-${SLOT}"
GIT_REPOS="${GIT_HOME}/repositories"
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
GITLAB_SHELL="/var/lib/gitlab-shell"
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
pkg_setup() {
enewgroup ${GIT_GROUP}
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
}
all_ruby_unpack() {
git-2_src_unpack
}
each_ruby_prepare() {
# fix path to repo and gitlab-shell hooks
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
sed -i \
-e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
# modify database settings
sed -i \
-e 's|\(username:\) postgres.*|\1 gitlab|' \
-e 's|\(password:\).*|\1 gitlab|' \
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# replace "secret" token with random one
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
config/initializers/secret_token.rb \
|| die "failed to filter secret_token.rb"
# remove needless files
#rm -r .git Satisfy gitlab::check.
rm .foreman .gitignore Procfile .travis.yml
use unicorn || rm config/unicorn.rb.example
use postgres || rm config/database.yml.postgresql
use mysql || rm config/database.yml.mysql
# remove dependency on therubyracer and libv8 (we're using nodejs instead)
local tfile; for tfile in Gemfile{,.lock}; do
sed -i \
-e '/therubyracer/d' \
-e '/libv8/d' \
"${tfile}" || die "failed to filter ${tfile}"
done
# change thin and unicorn dependencies to be optional
sed -i \
-e '/^gem "thin"/ s/$/, group: :thin/' \
-e '/^gem "unicorn"/ s/$/, group: :unicorn/' \
Gemfile || die "failed to modify Gemfile"
# change cache_store
if use memcached; then
sed -i \
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
config/environments/production.rb \
|| die "failed to modify production.rb"
fi
# Update pathes for unicorn
if use unicorn; then
sed -i \
-e "s#/home/git/gitlab#${DEST_DIR}#" \
config/unicorn.rb.example \
|| die "failed to modify unicorn.rb.example"
fi
}
each_ruby_install() {
local dest="${DEST_DIR}"
local conf="/etc/${PN}-${SLOT}"
local temp="/var/tmp/${PN}-${SLOT}"
local logs="/var/log/${PN}-${SLOT}"
local uploads="${DEST_DIR}/public/uploads"
## Prepare directories ##
diropts -m750
keepdir "${logs}"
dodir "${temp}"
diropts -m755
keepdir "${conf}"
dodir "${dest}"
dodir "${uploads}"
dosym "${temp}" "${dest}/tmp"
dosym "${logs}" "${dest}/log"
## Link gitlab-shell into git home
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
## Install configs ##
insinto "${conf}"
doins -r config/*
dosym "${conf}" "${dest}/config"
insinto "${dest}/.ssh"
newins "${FILESDIR}/config.ssh" config
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
## Install all others ##
# remove needless dirs
rm -Rf config tmp log
insinto "${dest}"
doins -r ./
## Install logrotate config ##
dodir /etc/logrotate.d
sed -e "s|@LOG_DIR@|${logs}|" \
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|| die "failed to filter gitlab.logrotate"
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test thin"
local flag; for flag in memcached mysql postgres unicorn; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
# Fix invalid ldflags for charlock_holmes,
# see https://github.com/brianmario/charlock_holmes/issues/32
${RUBY} /usr/bin/bundle config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
## Clean ##
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
# remove gems cache
rm -Rf ${gemsdir}/cache
# fix permissions
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
## RC scripts ##
local rcscript=${P}.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@GIT_USER@|${GIT_USER}|" \
-e "s|@GIT_GROUP@|${GIT_USER}|" \
-e "s|@SLOT@|${SLOT}|" \
-e "s|@DEST_DIR@|${dest}|" \
-e "s|@LOG_DIR@|${logs}|" \
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
if use memcached; then
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
fi
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
}
pkg_postinst() {
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
einfo "Generating SSH key for git user"
su -l ${GIT_USER} -s /bin/sh -c "
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|| die "failed to generate SSH key"
fi
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
einfo "modify this file according to your needs!"
su -l ${GIT_USER} -s /bin/sh -c "
git config --global user.email 'gitlab@localhost';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
elog
elog "1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
elog " and edit this file in order to configure your GitLab settings."
elog
elog "2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
elog " and edit this file in order to configure your database settings"
elog " for \"production\" environment."
elog
elog "3. If this is a new installation, you should create database for your GitLab instance."
elog
if use postgres; then
elog " If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlab_production"
elog " Note: You should change your password to something more random..."
elog
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
elog " To get it work you must use this ugly workaround:"
elog " psql -U postgres -d gitlab"
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
elog
fi
elog "4. Finally execute the following command to initlize or update the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server."
elog
}
pkg_config() {
## Check config files existence ##
einfo "Checking configuration files"
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
eerror "Copy ${CONF_DIR}/database.yml.* to"
eerror "${CONF_DIR}/database.yml and edit this file in order to configure your"
eerror "database settings for \"production\" environment."
die
fi
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
eerror "Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
eerror "and edit this file in order to configure your GitLab settings"
eerror "for \"production\" environment."
die
fi
## Initialize app ##
local RAILS_ENV=${RAILS_ENV:-production}
local RUBY=${RUBY:-ruby20}
local BUNDLE="${RUBY} /usr/bin/bundle"
# Ask user whether this is the first installation
einfon "Do you want to upgrade an existing installation? [Y|n] "
do_upgrade=""
while true
do
read -r do_upgrade
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $do_upgrade ]] ; then
einfo "Migration database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake db:migrate RAILS_ENV=production
${BUNDLE} exec rake gitlab:satellites:create RAILS_ENV=production" \
|| die "failed to migrate database."
einfo "Clear redis cache ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|| die "failed to run cache:clear"
einfo "Clear and precompile assets ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake assets:clean RAILS_ENV=production
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|| die "failed to run assets:precompile"
else
einfo "Initializing database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|| die "failed to run rake gitlab:setup"
fi
einfo "You might want to run the following in order to check your application status:"
einfo "# cd ${DEST_DIR}"
einfo "# ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
einfo ""
einfo "GitLab is prepared, now you should configure your web server."
}

View File

@ -1,390 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
# Mainteiner notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
# - USE flags analytics and public-projects applies our custom patches, see
# https://github.com/cvut/gitlabhq for more information.
#
USE_RUBY="ruby20"
PYTHON_DEPEND="2:2.5"
EGIT_REPO_URI="https://github.com/gitlabhq/gitlabhq.git"
EGIT_COMMIT="v${PV}"
inherit eutils git-2 python ruby-ng versionator user
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2)
KEYWORDS="~amd64 ~x86"
IUSE="memcached mysql +postgres +unicorn"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# json dev-util/ragel
# yajl-ruby dev-libs/yajl
# rugged net-libs/http-parser
# pygments.rb python 2.5+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql-base
# mysql virtual/mysql
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libgit2[ssh]
dev-libs/libxml2
dev-libs/libxslt
dev-util/ragel
dev-libs/yajl
net-libs/http-parser
net-libs/nodejs
postgres? ( dev-db/postgresql )
mysql? ( virtual/mysql )
memcached? ( net-misc/memcached )"
DEPEND="${GEMS_DEPEND}
$(ruby_implementation_depend ruby20 '=' -2.0.0*)[readline,ssl]
>=dev-vcs/git-1.8.1.5
>=dev-vcs/gitlab-shell-2.0.1
net-misc/curl
virtual/ssh"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
RUBY_PATCHES=(
"${P}-fix-checks-gentoo.patch"
)
GIT_USER="git"
GIT_GROUP="git"
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
DEST_DIR="/opt/${PN}-${SLOT}"
CONF_DIR="/etc/${PN}-${SLOT}"
GIT_REPOS="${GIT_HOME}/repositories"
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
GITLAB_SHELL="/var/lib/gitlab-shell"
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
RAILS_ENV=${RAILS_ENV:-production}
RUBY=${RUBY:-ruby20}
BUNDLE="${RUBY} /usr/bin/bundle"
pkg_setup() {
enewgroup ${GIT_GROUP}
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
}
all_ruby_unpack() {
git-2_src_unpack
}
each_ruby_prepare() {
# fix path to repo and gitlab-shell hooks
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
sed -i \
-e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
# modify database settings
sed -i \
-e 's|\(username:\) postgres.*|\1 gitlab|' \
-e 's|\(password:\).*|\1 gitlab|' \
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# replace "secret" token with random one
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
config/initializers/secret_token.rb \
|| die "failed to filter secret_token.rb"
# remove needless files
#rm -r .git Satisfy gitlab::check.
rm .foreman .gitignore Procfile
use unicorn || rm config/unicorn.rb.example
use postgres || rm config/database.yml.postgresql
use mysql || rm config/database.yml.mysql
# remove dependency on therubyracer and libv8 (we're using nodejs instead)
local tfile; for tfile in Gemfile{,.lock}; do
sed -i \
-e '/therubyracer/d' \
-e '/libv8/d' \
"${tfile}" || die "failed to filter ${tfile}"
done
# change thin and unicorn dependencies to be optional
sed -i \
-e '/^gem "thin"/ s/$/, group: :thin/' \
-e '/^gem "unicorn"/ s/$/, group: :unicorn/' \
Gemfile || die "failed to modify Gemfile"
# change cache_store
if use memcached; then
sed -i \
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
config/environments/production.rb \
|| die "failed to modify production.rb"
fi
# Update pathes for unicorn
if use unicorn; then
sed -i \
-e "s#/home/git/gitlab#${DEST_DIR}#" \
config/unicorn.rb.example \
|| die "failed to modify unicorn.rb.example"
fi
}
each_ruby_install() {
local dest="${DEST_DIR}"
local conf="/etc/${PN}-${SLOT}"
local temp="/var/tmp/${PN}-${SLOT}"
local logs="/var/log/${PN}-${SLOT}"
local uploads="${DEST_DIR}/public/uploads"
## Prepare directories ##
diropts -m750
keepdir "${logs}"
dodir "${temp}"
diropts -m755
keepdir "${conf}"
dodir "${dest}"
dodir "${uploads}"
dosym "${temp}" "${dest}/tmp"
dosym "${logs}" "${dest}/log"
## Link gitlab-shell into git home
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
## Install configs ##
insinto "${conf}"
doins -r config/*
dosym "${conf}" "${dest}/config"
insinto "${dest}/.ssh"
newins "${FILESDIR}/config.ssh" config
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
## Install all others ##
# remove needless dirs
rm -Rf config tmp log
insinto "${dest}"
doins -r ./
## Install logrotate config ##
dodir /etc/logrotate.d
sed -e "s|@LOG_DIR@|${logs}|" \
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|| die "failed to filter gitlab.logrotate"
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test thin"
local flag; for flag in memcached mysql postgres unicorn; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
# Use systemlibs for rugged
${BUNDLE} config build.rugged --use-system-libraries
# Use systemlibs for nokogiri as suggested
${BUNDLE} config build.nokogiri --use-system-libraries
# Fix invalid ldflags for charlock_holmes,
# see https://github.com/brianmario/charlock_holmes/issues/32
${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
einfo "Running bundle install ${bundle_args} ..."
${BUNDLE} install ${bundle_args} || die "bundler failed"
## Clean ##
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
# remove gems cache
rm -Rf ${gemsdir}/cache
# fix permissions
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
## RC scripts ##
local rcscript=${P}.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@GIT_USER@|${GIT_USER}|" \
-e "s|@GIT_GROUP@|${GIT_USER}|" \
-e "s|@SLOT@|${SLOT}|" \
-e "s|@DEST_DIR@|${dest}|" \
-e "s|@LOG_DIR@|${logs}|" \
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
if use memcached; then
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
fi
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
}
pkg_postinst() {
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
einfo "Generating SSH key for git user"
su -l ${GIT_USER} -s /bin/sh -c "
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|| die "failed to generate SSH key"
fi
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
einfo "modify this file according to your needs!"
su -l ${GIT_USER} -s /bin/sh -c "
git config --global user.email 'gitlab@localhost';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
elog
elog "1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
elog " and edit this file in order to configure your GitLab settings."
elog
elog "2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
elog " and edit this file in order to configure your database settings"
elog " for \"production\" environment."
elog
elog "3. If this is a new installation, you should create database for your GitLab instance."
elog
if use postgres; then
elog " If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlab_production"
elog " Note: You should change your password to something more random..."
elog
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
elog " To get it work you must use this ugly workaround:"
elog " psql -U postgres -d gitlab"
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
elog
fi
elog "4. Finally execute the following command to initlize or update the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server."
elog
}
pkg_config() {
## Check config files existence ##
einfo "Checking configuration files ..."
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\""
eerror "and edit this file in order to configure your database settings for"
eerror "\"production\" environment."
die
fi
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\""
eerror "and edit this file in order to configure your GitLab settings"
eerror "for \"production\" environment."
die
fi
# Ask user whether this is the first installation
einfo "Do you want to upgrade an existing installation? [Y|n] "
do_upgrade=""
while true
do
read -r do_upgrade
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $do_upgrade ]] ; then
einfo "Make sure that you've stopped any running Gitlab instance and"
einfo "that you've created a backup from your existing database: "
elog "\$ cd ${DEST_DIR} && ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production"
elog ""
einfo "Press ENTER to continue, STRG-C to cancel"
read
einfo "Migration database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake db:migrate RAILS_ENV=production
${BUNDLE} exec rake gitlab:satellites:create RAILS_ENV=production" \
|| die "failed to migrate database."
einfo "Clear redis cache ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|| die "failed to run cache:clear"
einfo "Clear and precompile assets ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake assets:clean RAILS_ENV=production
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|| die "failed to run assets:precompile"
else
einfo "Initializing database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|| die "failed to run rake gitlab:setup"
fi
einfo "You might want to run the following in order to check your application status:"
einfo "# cd ${DEST_DIR}"
einfo "# ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
einfo ""
einfo "GitLab is prepared, now you should configure your web server."
}

View File

@ -1,440 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
# Mainteiner notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
# - USE flags analytics and public-projects applies our custom patches, see
# https://github.com/cvut/gitlabhq for more information.
#
USE_RUBY="ruby20"
PYTHON_DEPEND="2:2.7"
EGIT_REPO_URI="https://github.com/gitlabhq/gitlabhq.git"
EGIT_COMMIT="v${PV}"
inherit eutils git-2 python ruby-ng versionator user
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2)
KEYWORDS="~amd64 ~x86 ~arm"
IUSE="memcached mysql +postgres +unicorn"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# json dev-util/ragel
# yajl-ruby dev-libs/yajl
# pygments.rb python 2.5+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql-base
# mysql virtual/mysql
# rugged net-libs/http-parser dev-libs/libgit2
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libxml2
dev-libs/libxslt
dev-util/ragel
dev-libs/yajl
net-libs/nodejs
postgres? ( dev-db/postgresql )
mysql? ( virtual/mysql )
memcached? ( net-misc/memcached )
net-libs/http-parser
>=dev-libs/libgit2-0.21.3
<dev-libs/libgit2-0.22.0"
DEPEND="${GEMS_DEPEND}
$(ruby_implementation_depend ruby20 '=' -2.0.0*)[readline,ssl]
>=dev-vcs/git-1.8.1.5
>=dev-vcs/gitlab-shell-2.5.4
net-misc/curl
virtual/ssh"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta
virtual/krb5"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
RUBY_PATCHES=(
"${P}-fix-checks-gentoo.patch"
)
GIT_USER="git"
GIT_GROUP="git"
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
DEST_DIR="/opt/${PN}-${SLOT}"
CONF_DIR="/etc/${PN}-${SLOT}"
GIT_REPOS="${GIT_HOME}/repositories"
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
GITLAB_SHELL="/var/lib/gitlab-shell"
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
RAILS_ENV=${RAILS_ENV:-production}
RUBY=${RUBY:-ruby20}
BUNDLE="${RUBY} /usr/bin/bundle"
pkg_setup() {
enewgroup ${GIT_GROUP}
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
}
all_ruby_unpack() {
git-2_src_unpack
}
each_ruby_prepare() {
# fix path to repo and gitlab-shell hooks
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
sed -i \
-e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
# modify database settings
sed -i \
-e 's|\(username:\) postgres.*|\1 gitlab|' \
-e 's|\(password:\).*|\1 gitlab|' \
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# replace "secret" token with random one
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
config/initializers/secret_token.rb \
|| die "failed to filter secret_token.rb"
# remove needless files
#rm -r .git Satisfy gitlab::check.
rm .foreman .gitignore Procfile
use unicorn || rm config/unicorn.rb.example
use postgres || rm config/database.yml.postgresql
use mysql || rm config/database.yml.mysql
# remove dependency on therubyracer and libv8 (we're using nodejs instead)
local tfile; for tfile in Gemfile{,.lock}; do
sed -i \
-e '/therubyracer/d' \
-e '/libv8/d' \
"${tfile}" || die "failed to filter ${tfile}"
done
# change thin and unicorn dependencies to be optional
sed -i \
-e '/^gem "thin"/ s/$/, group: :thin/' \
-e '/^gem "unicorn"/ s/$/, group: :unicorn/' \
Gemfile || die "failed to modify Gemfile"
# change cache_store
if use memcached; then
sed -i \
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
config/environments/production.rb \
|| die "failed to modify production.rb"
fi
# Update pathes for unicorn
if use unicorn; then
sed -i \
-e "s#/home/git/gitlab#${DEST_DIR}#" \
config/unicorn.rb.example \
|| die "failed to modify unicorn.rb.example"
fi
# Use >timfle-krb5-auth-0.8, see https://github.com/timfel/krb5-auth/pull/7
sed -i \
-e "s#timfel\-krb5\-auth (0.8)#timfel\-krb5\-auth (0.8.3)#g" \
Gemfile.lock \
|| die "failed to update Gemfile.lock"
}
each_ruby_install() {
local dest="${DEST_DIR}"
local conf="/etc/${PN}-${SLOT}"
local temp="/var/tmp/${PN}-${SLOT}"
local logs="/var/log/${PN}-${SLOT}"
local uploads="${DEST_DIR}/public/uploads"
## Prepare directories ##
diropts -m750
keepdir "${logs}"
dodir "${temp}"
diropts -m755
keepdir "${conf}"
dodir "${dest}"
dodir "${uploads}"
dosym "${temp}" "${dest}/tmp"
dosym "${logs}" "${dest}/log"
## Link gitlab-shell into git home
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
## Install configs ##
insinto "${conf}"
doins -r config/*
dosym "${conf}" "${dest}/config"
insinto "${dest}/.ssh"
newins "${FILESDIR}/config.ssh" config
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
## Install all others ##
# remove needless dirs
rm -Rf config tmp log
insinto "${dest}"
doins -r ./
## Install logrotate config ##
dodir /etc/logrotate.d
sed -e "s|@LOG_DIR@|${logs}|" \
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|| die "failed to filter gitlab.logrotate"
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test thin"
local flag; for flag in memcached mysql postgres unicorn; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
# Use systemlibs for rugged
${BUNDLE} config build.rugged --use-system-libraries
# Use systemlibs for nokogiri as suggested
${BUNDLE} config build.nokogiri --use-system-libraries
# Fix invalid ldflags for charlock_holmes,
# see https://github.com/brianmario/charlock_holmes/issues/32
${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
einfo "Running bundle install ${bundle_args} ..."
${BUNDLE} install ${bundle_args} || die "bundler failed"
## Clean ##
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
# remove gems cache
rm -Rf ${gemsdir}/cache
# fix permissions
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
## RC scripts ##
local rcscript=${P}.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@GIT_USER@|${GIT_USER}|" \
-e "s|@GIT_GROUP@|${GIT_USER}|" \
-e "s|@SLOT@|${SLOT}|" \
-e "s|@DEST_DIR@|${dest}|" \
-e "s|@LOG_DIR@|${logs}|" \
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
if use memcached; then
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
fi
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
}
pkg_postinst() {
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
einfo "Generating SSH key for git user"
su -l ${GIT_USER} -s /bin/sh -c "
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|| die "failed to generate SSH key"
fi
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
einfo "modify this file according to your needs!"
su -l ${GIT_USER} -s /bin/sh -c "
git config --global user.email 'gitlab@localhost';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
elog "If this is a new installation, proceed with the following steps:"
elog
elog " 1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
elog " and edit this file in order to configure your GitLab settings."
elog
elog " 2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
elog " and edit this file in order to configure your database settings"
elog " for \"production\" environment."
elog
elog " 3. If this is a new installation, create a database for your GitLab instance."
if use postgres; then
elog " If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlab_production"
elog " Note: You should change your password to something more random..."
elog
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
elog " To get it work you must use this ugly workaround:"
elog " psql -U postgres -d gitlab"
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
elog
fi
elog " 4. Execute the following command to finalize your setup:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server."
elog
elog "To update an existing instance, run the following command and choose upgrading when prompted:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog
}
pkg_config() {
## Check config files existence ##
einfo "Checking configuration files ..."
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\""
eerror "and edit this file in order to configure your database settings for"
eerror "\"production\" environment."
die
fi
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\""
eerror "and edit this file in order to configure your GitLab settings"
eerror "for \"production\" environment."
die
fi
# Ask user whether this is the first installation
einfo "Do you want to upgrade an existing installation? [Y|n] "
do_upgrade=""
while true
do
read -r do_upgrade
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $do_upgrade ]] ; then
LATEST_DEST=$(test -n "${LATEST_DEST}" && echo ${LATEST_DEST} || \
find /opt -maxdepth 1 -iname 'gitlabhq-*' -and -type d -and -not -iname "gitlabhq-${SLOT}" | \
sort -r | head -n1)
if [[ -z "${LATEST_DEST}" || ! -d "${LATEST_DEST}" ]] ; then
einfo "Please enter the path to your latest Gitlab instance:"
while true
do
read -r LATEST_DEST
test -d ${LATEST_DEST} && break ||\
eerror "Please specify a valid path to your Gitlab instance!"
done
else
einfo "Found your latest Gitlab instance at \"${LATEST_DEST}\"."
fi
einfo "Please make sure that you've stopped your running Gitlab instance and that you've created a backup: "
elog "\$ cd \"${LATEST_DEST}\" && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production"
elog ""
einfo "Press ENTER to continue, STRG-C to cancel"
read
einfo "Migrating uploads ..."
einfo "This will move your uploads from \"$LATEST_DEST\" to \"${DEST_DIR}\", continue? [Y|n] "
migrate_uploads=""
while true
do
read -r migrate_uploads
if [[ $migrate_uploads == "n" || $migrate_uploads == "N" ]] ; then migrate_uploads="" && break
elif [[ $migrate_uploads == "y" || $migrate_uploads == "Y" || $migrate_uploads == "" ]] ; then migrate_uploads=1 && break
else eerror "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $migrate_uploads ]] ; then
su -l ${GIT_USER} -s /bin/sh -c "
mv ${LATEST_DEST}/public/uploads/* ${DEST_DIR}/public/uploads/" \
|| die "failed to migrate uplaods."
fi
einfo "Migrating config ..."
for conf in database.yml gitlab.yml resque.yml unicorn.rb ; do
cp "${LATEST_DEST}/config/${conf}" "${DEST_DIR}/config/"
example="${DEST_DIR}/config/${conf}.example"
test -d "${example}" && mv "${example}" "${DEST_DIR}/config/.cfg0000_${conf}"
done
CONFIG_PROTECT="${DEST_DIR}" dispatch-conf || die "failed to migrate config."
einfo "Migrating database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake db:migrate RAILS_ENV=production
${BUNDLE} exec rake gitlab:satellites:create RAILS_ENV=production" \
|| die "failed to migrate database."
einfo "Clear redis cache ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|| die "failed to run cache:clear"
einfo "Clear and precompile assets ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake assets:clean RAILS_ENV=production
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|| die "failed to run assets:precompile"
else
einfo "Initializing database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|| die "failed to run rake gitlab:setup"
fi
einfo "You might want to run the following in order to check your application status:"
einfo "# cd ${DEST_DIR} && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
einfo ""
einfo "GitLab is prepared, now you should configure your web server."
}

View File

@ -1,391 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
# Mainteiner notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
# - USE flags analytics and public-projects applies our custom patches, see
# https://github.com/cvut/gitlabhq for more information.
#
USE_RUBY="ruby20 ruby21"
PYTHON_DEPEND="2:2.7"
EGIT_REPO_URI="https://github.com/gitlabhq/gitlabhq.git"
EGIT_COMMIT="v${PV}"
inherit eutils git-2 python ruby-ng versionator user
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2)
KEYWORDS=""
IUSE="memcached mysql +postgres +unicorn"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# json dev-util/ragel
# yajl-ruby dev-libs/yajl
# rugged net-libs/http-parser
# pygments.rb python 2.5+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql-base
# mysql virtual/mysql
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libgit2[ssh]
dev-libs/libxml2
dev-libs/libxslt
dev-util/cmake
dev-util/ragel
dev-libs/yajl
net-libs/http-parser
net-libs/nodejs
postgres? ( dev-db/postgresql )
mysql? ( virtual/mysql )
memcached? ( net-misc/memcached )"
DEPEND="${GEMS_DEPEND}
$(ruby_implementation_depend ruby20 '=' -2.0.0*)[readline,ssl]
>=dev-vcs/git-1.8.1.5
>=dev-vcs/gitlab-shell-2.6.0
net-misc/curl
virtual/ssh"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
RUBY_PATCHES=(
"${P}-fix-checks-gentoo.patch"
)
GIT_USER="git"
GIT_GROUP="git"
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
DEST_DIR="/opt/${PN}-${SLOT}"
CONF_DIR="/etc/${PN}-${SLOT}"
GIT_REPOS="${GIT_HOME}/repositories"
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
GITLAB_SHELL="/var/lib/gitlab-shell"
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
RAILS_ENV=${RAILS_ENV:-production}
RUBY=${RUBY:-ruby20}
BUNDLE="${RUBY} /usr/bin/bundle"
pkg_setup() {
enewgroup ${GIT_GROUP}
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
}
all_ruby_unpack() {
git-2_src_unpack
}
each_ruby_prepare() {
# fix path to repo and gitlab-shell hooks
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
sed -i \
-e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
# modify database settings
sed -i \
-e 's|\(username:\) postgres.*|\1 gitlab|' \
-e 's|\(password:\).*|\1 gitlab|' \
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# replace "secret" token with random one
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
config/initializers/secret_token.rb \
|| die "failed to filter secret_token.rb"
# remove needless files
#rm -r .git Satisfy gitlab::check.
rm .foreman .gitignore Procfile
use unicorn || rm config/unicorn.rb.example
use postgres || rm config/database.yml.postgresql
use mysql || rm config/database.yml.mysql
# remove dependency on therubyracer and libv8 (we're using nodejs instead)
local tfile; for tfile in Gemfile{,.lock}; do
sed -i \
-e '/therubyracer/d' \
-e '/libv8/d' \
"${tfile}" || die "failed to filter ${tfile}"
done
# change thin and unicorn dependencies to be optional
sed -i \
-e '/^gem "thin"/ s/$/, group: :thin/' \
-e '/^gem "unicorn"/ s/$/, group: :unicorn/' \
Gemfile || die "failed to modify Gemfile"
# change cache_store
if use memcached; then
sed -i \
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
config/environments/production.rb \
|| die "failed to modify production.rb"
fi
# Update pathes for unicorn
if use unicorn; then
sed -i \
-e "s#/home/git/gitlab#${DEST_DIR}#" \
config/unicorn.rb.example \
|| die "failed to modify unicorn.rb.example"
fi
}
each_ruby_install() {
local dest="${DEST_DIR}"
local conf="/etc/${PN}-${SLOT}"
local temp="/var/tmp/${PN}-${SLOT}"
local logs="/var/log/${PN}-${SLOT}"
local uploads="${DEST_DIR}/public/uploads"
## Prepare directories ##
diropts -m750
keepdir "${logs}"
dodir "${temp}"
diropts -m755
keepdir "${conf}"
dodir "${dest}"
dodir "${uploads}"
dosym "${temp}" "${dest}/tmp"
dosym "${logs}" "${dest}/log"
## Link gitlab-shell into git home
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
## Install configs ##
insinto "${conf}"
doins -r config/*
dosym "${conf}" "${dest}/config"
insinto "${dest}/.ssh"
newins "${FILESDIR}/config.ssh" config
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
## Install all others ##
# remove needless dirs
rm -Rf config tmp log
insinto "${dest}"
doins -r ./
## Install logrotate config ##
dodir /etc/logrotate.d
sed -e "s|@LOG_DIR@|${logs}|" \
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|| die "failed to filter gitlab.logrotate"
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test thin"
local flag; for flag in memcached mysql postgres unicorn; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
# Use systemlibs for rugged
${BUNDLE} config build.rugged --use-system-libraries
# Use systemlibs for nokogiri as suggested
${BUNDLE} config build.nokogiri --use-system-libraries
# Fix invalid ldflags for charlock_holmes,
# see https://github.com/brianmario/charlock_holmes/issues/32
${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
einfo "Running bundle install ${bundle_args} ..."
${BUNDLE} install ${bundle_args} || die "bundler failed"
## Clean ##
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
# remove gems cache
rm -Rf ${gemsdir}/cache
# fix permissions
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
## RC scripts ##
local rcscript=${P}.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@GIT_USER@|${GIT_USER}|" \
-e "s|@GIT_GROUP@|${GIT_USER}|" \
-e "s|@SLOT@|${SLOT}|" \
-e "s|@DEST_DIR@|${dest}|" \
-e "s|@LOG_DIR@|${logs}|" \
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
if use memcached; then
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
fi
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
}
pkg_postinst() {
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
einfo "Generating SSH key for git user"
su -l ${GIT_USER} -s /bin/sh -c "
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|| die "failed to generate SSH key"
fi
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
einfo "modify this file according to your needs!"
su -l ${GIT_USER} -s /bin/sh -c "
git config --global user.email 'gitlab@localhost';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
elog
elog "1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
elog " and edit this file in order to configure your GitLab settings."
elog
elog "2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
elog " and edit this file in order to configure your database settings"
elog " for \"production\" environment."
elog
elog "3. If this is a new installation, you should create database for your GitLab instance."
elog
if use postgres; then
elog " If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlab_production"
elog " Note: You should change your password to something more random..."
elog
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
elog " To get it work you must use this ugly workaround:"
elog " psql -U postgres -d gitlab"
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
elog
fi
elog "4. Finally execute the following command to initlize or update the environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server."
elog
}
pkg_config() {
## Check config files existence ##
einfo "Checking configuration files ..."
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\""
eerror "and edit this file in order to configure your database settings for"
eerror "\"production\" environment."
die
fi
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\""
eerror "and edit this file in order to configure your GitLab settings"
eerror "for \"production\" environment."
die
fi
# Ask user whether this is the first installation
einfo "Do you want to upgrade an existing installation? [Y|n] "
do_upgrade=""
while true
do
read -r do_upgrade
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $do_upgrade ]] ; then
einfo "Make sure that you've stopped any running Gitlab instance and"
einfo "that you've created a backup from your existing database: "
elog "\$ cd ${DEST_DIR} && ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production"
elog ""
einfo "Press ENTER to continue, STRG-C to cancel"
read
einfo "Migration database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake db:migrate RAILS_ENV=production
${BUNDLE} exec rake gitlab:satellites:create RAILS_ENV=production" \
|| die "failed to migrate database."
einfo "Clear redis cache ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|| die "failed to run cache:clear"
einfo "Clear and precompile assets ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake assets:clean RAILS_ENV=production
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|| die "failed to run assets:precompile"
else
einfo "Initializing database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|| die "failed to run rake gitlab:setup"
fi
einfo "You might want to run the following in order to check your application status:"
einfo "# cd ${DEST_DIR}"
einfo "# ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
einfo ""
einfo "GitLab is prepared, now you should configure your web server."
}

View File

@ -1,371 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
# Maintainer notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
#
USE_RUBY="ruby21"
PYTHON_COMPAT=( python2_7 )
inherit eutils python-r1 ruby-ng user systemd
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
SRC_URI="https://github.com/gitlabhq/gitlabhq/archive/v${PV}.tar.gz -> ${P}.tar.gz"
#SRC_URI="https://github.com/gitlabhq/gitlabhq/archive/v8.0.0.rc1.tar.gz -> ${P}.tar.gz"
#RUBY_S="${PN}-8.0.0"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# rugged dev-util/cmake, virtual/pkgconfig
# json dev-util/ragel
# pygments.rb python 2.7+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql
# mysql virtual/mysql
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libxml2
dev-libs/libxslt
dev-util/ragel
net-libs/nodejs
postgres? ( >=dev-db/postgresql-9.1:* )
mysql? ( virtual/mysql )
kerberos? ( virtual/krb5 )"
CDEPEND="
dev-util/cmake
virtual/pkgconfig"
DEPEND="${GEMS_DEPEND}
>=dev-vcs/gitlab-shell-2.6.5
dev-vcs/git
>=dev-vcs/gitlab-git-http-server-0.2.10
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser =dev-libs/libgit2-0.22* )"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta
systemd? ( sys-apps/systemd:0= )"
ruby_add_bdepend "
virtual/rubygems
dev-ruby/http_parser_rb
>=dev-ruby/bundler-1.0"
#
# fix-gemfile:
# Remove therubyracer that doesn't compile well on Gentoo (we're using
# nodejs instead that is faster and better). Also replace broken
# charlock_holmes version with fixed one.
#
# fix-sendmail-config:
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
#
RUBY_PATCHES=(
"${PN}-8.0.2-fix-gemfile.patch"
"${PN}-fix-sendmail-config.patch"
)
MY_NAME="gitlab"
MY_USER="git" # should be same as in gitlab-shell
DEST_DIR="/opt/${MY_NAME}"
CONF_DIR="/etc/${MY_NAME}"
LOGS_DIR="/var/log/${MY_NAME}"
TEMP_DIR="/var/tmp/${MY_NAME}"
# When updating ebuild to newer version, check list of the queues in
# https://gitlab.com/gitlab-org/gitlab-ce/blob/v${PV}/bin/background_jobs
SIDEKIQ_QUEUES="post_receive,mailer,archive_repo,system_hook,project_web_hook,gitlab_shell,common,default"
all_ruby_prepare() {
# fix paths
local satellites_path="${TEMP_DIR}/repo_satellites"
local repos_path=/var/lib/git/repositories
local shell_path=/usr/share/gitlab-shell
sed -i -E \
-e "/satellites:$/,/\w:$/ s|(\s*path:\s).*|\1${satellites_path}/|" \
-e "/gitlab_shell:$/,/\w:$/ s|(\s*path:\s).*|\1${shell_path}/|" \
-e "/gitlab_shell:$/,/\w:$/ s|(\s*repos_path:\s).*|\1${repos_path}/|" \
-e "/gitlab_shell:$/,/\w:$/ s|(\s*hooks_path:\s).*|\1${shell_path}/hooks/|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
local run_path=/run/${MY_NAME}
sed -i -E \
-e "s|/home/git/gitlab/tmp/(pids\|sockets)|${run_path}|" \
-e "s|/home/git/gitlab/log|${LOGS_DIR}|" \
-e "s|/home/git/gitlab|${DEST_DIR}|" \
config/unicorn.rb.example || die "failed to filter unicorn.rb.example"
sed -i \
-e "s|/home/git/gitlab/tmp/sockets|${run_path}|" \
lib/support/nginx/gitlab || die "failed to filter nginx/gitlab"
# modify default database settings for PostgreSQL
sed -i -E \
-e 's|(username:).*|\1 gitlab|' \
-e 's|(password:).*|\1 gitlab|' \
-e 's|(socket:).*|\1 /run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# rename config files
mv config/gitlab.yml.example config/gitlab.yml
mv config/unicorn.rb.example config/unicorn.rb
local dbconf=config/database.yml
if use postgres && ! use mysql; then
mv ${dbconf}.postgresql ${dbconf}
rm ${dbconf}.mysql
elif use mysql && ! use postgres; then
mv ${dbconf}.mysql ${dbconf}
rm ${dbconf}.postgresql
fi
# remove useless files
rm -r lib/support/{deploy,init.d}
use unicorn || rm config/unicorn.rb
}
all_ruby_install() {
local dest=${DEST_DIR}
local conf=${CONF_DIR}
local logs=${LOGS_DIR}
local temp=${TEMP_DIR}
# prepare directories
diropts -m750
dodir ${logs} ${temp} ${temp}/repo_satellites
diropts -m755
dodir ${conf} ${dest}/public/uploads
dosym ${temp} ${dest}/tmp
dosym ${logs} ${dest}/log
# install configs
insinto ${conf}
doins -r config/*
dosym ${conf} ${dest}/config
echo 'export RAILS_ENV=production' > "${D}/${dest}/.profile"
# remove needless dirs
rm -Rf config tmp log
# install the rest files
# using cp 'cause doins is slow
cp -Rl * "${D}/${dest}"/
# install logrotate config
dodir /etc/logrotate.d
cat > "${D}/etc/logrotate.d/${MY_NAME}" <<-EOF
${logs}/*.log {
missingok
delaycompress
compress
copytruncate
}
EOF
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test aws"
local flag; for flag in mysql postgres unicorn kerberos; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
use "rugged_use_system_libraries" && export RUGGED_USE_SYSTEM_LIBRARIES="YES"
einfo "Running bundle install ${bundle_args} ..."
${RUBY} /usr/bin/bundle install ${bundle_args} || die "bundler failed"
# clean gems cache
rm -Rf vendor/bundle/ruby/*/cache
rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git
# fix permissions
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
## RC script ##
if use systemd ; then
ewarn "Beware: systemd support has not been tested, use at your own risk!"
systemd_dounit "${FILESDIR}/gitlab-sidekiq.service"
systemd_dounit "${FILESDIR}/gitlab-unicorn.service"
systemd_dounit "${FILESDIR}/gitlab-git-http.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq-8.init
use unicorn && rcscript=gitlab-unicorn-8.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@USER@|${MY_USER}|" \
-e "s|@GITLAB_BASE@|${dest}|" \
-e "s|@LOGS_DIR@|${logs}|" \
-e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
newinitd "${T}/${rcscript}" "${MY_NAME}"
fi
}
pkg_postinst() {
elog
elog "1. Configure your GitLab's settings in ${CONF_DIR}/gitlab.yml."
elog
elog "2. Configure your database settings in ${CONF_DIR}/database.yml"
elog " for \"production\" environment."
elog
elog "3. Then you should create a database for your GitLab instance, if you"
elog "haven't done so already."
elog
if use postgres; then
elog "If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlabhq_production"
elog " Note: You should change your password to something more random..."
elog
fi
elog "4. Finally execute the following command to initlize environment:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server first!"
elog
elog "If this is an update from previous version, it's HIGHLY recommended"
elog "to backup your database before running the config phase!"
elog
elog "If you're running GitLab behind an SSL proxy such as nginx or Apache and"
elog "you can't login after the upgrade, be sure to read the section about the"
elog "verification of the CSRF token in GitLab's trouble-shooting guide at"
elog "http://goo.gl/5XGRGv."
}
pkg_config() {
local shell_conf='/etc/gitlab-shell.yml'
einfo "Checking configuration files"
if [ ! -r "${CONF_DIR}/database.yml" ]; then
eerror "Copy ${CONF_DIR}/database.yml.* to"
eerror "${CONF_DIR}/database.yml and edit this file in order to configure your"
eerror "database settings for \"production\" environment."; die
fi
# check gitlab-shell configuration
if [ -r ${shell_conf} ]; then
local shell_repos_path="$(ryaml ${shell_conf} repos_path)"
local gitlab_repos_path="$(ryaml ${CONF_DIR}/gitlab.yml \
production gitlab_shell repos_path)"
if [ ! "${shell_repos_path}" -ef "${gitlab_repos_path}" ]; then
eerror "repos_path in ${CONF_DIR}/gitlab.yml and ${shell_conf}"
eerror "must points to the same location! Fix the repos_path location and"
eerror "run this again."; die
fi
else
ewarn "GitLab Shell checks skipped, could not find config file at"
ewarn "${shell_conf}. Make sure that you have gitlab-shell properly"
ewarn "installed and that repos_path is the same as in GitLab."
fi
local email_from="$(ryaml ${CONF_DIR}/gitlab.yml production gitlab email_from)"
local git_home="$(egethome ${MY_USER})"
# configure Git global settings
if [ ! -e "${git_home}/.gitconfig" ]; then
einfo "Setting git user"
su -l ${MY_USER} -c "
git config --global user.email '${email_from}';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
if [ ! -d "${DEST_DIR}/.git" ]; then
# create dummy git repo as workaround for
# https://github.com/bundler/bundler/issues/2039
einfo "Initializing dummy git repository to avoid false errors from bundler"
su -l ${MY_USER} -c "
cd ${DEST_DIR}
git init
git add README.md
git commit -m 'Dummy repository'" >/dev/null
fi
## Initialize app ##
local RAILS_ENV="production"
local RUBY=${RUBY:-/usr/bin/ruby}
local BUNDLE="${RUBY} /usr/bin/bundle"
local dbname="$(ryaml ${CONF_DIR}/database.yml production database)"
if [ -f "${DEST_DIR}/.secret" ]; then
local update=true
einfo "Migrating database ..."
exec_rake db:migrate
# https://github.com/gitlabhq/gitlabhq/issues/5311#issuecomment-31656496
einfo "Migrating iids ..."
exec_rake migrate_iids
einfo "Cleaning old precompiled assets ..."
exec_rake assets:clean
einfo "Cleaning cache ..."
exec_rake cache:clear
else
local update=false
einfo "Initializing database ..."
exec_rake gitlab:setup
fi
einfo "Precompiling assests ..."
exec_rake assets:precompile
if [ "${update}" = 'true' ]; then
ewarn
ewarn "This configuration script runs only common migration tasks."
ewarn "Please read guides on"
ewarn " https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/"
ewarn "for any additional migration tasks specific to your previous GitLab"
ewarn "version."
fi
}
ryaml() {
ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@"
}
exec_rake() {
local command="${BUNDLE} exec rake $@ RAILS_ENV=${RAILS_ENV}"
echo " ${command}"
su -l ${MY_USER} -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${command}" \
|| die "failed to run rake $@"
}

View File

@ -1,441 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"
# Mainteiner notes:
# - This ebuild uses Bundler to download and install all gems in deployment mode
# (i.e. into isolated directory inside application). That's not Gentoo way how
# it should be done, but GitLab has too many dependencies that it will be too
# difficult to maintain them via ebuilds.
# - USE flags analytics and public-projects applies our custom patches, see
# https://github.com/cvut/gitlabhq for more information.
#
USE_RUBY="ruby20"
PYTHON_DEPEND="2:2.7"
EGIT_REPO_URI="https://github.com/gitlabhq/gitlabhq.git"
EGIT_COMMIT="v${PV}"
inherit eutils git-2 python ruby-ng versionator user
DESCRIPTION="GitLab is a free project and repository management application"
HOMEPAGE="https://github.com/gitlabhq/gitlabhq"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2)
KEYWORDS="~amd64 ~x86 ~arm"
IUSE="memcached mysql +postgres +unicorn"
## Gems dependencies:
# charlock_holmes dev-libs/icu
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
# json dev-util/ragel
# yajl-ruby dev-libs/yajl
# pygments.rb python 2.5+
# execjs net-libs/nodejs, or any other JS runtime
# pg dev-db/postgresql-base
# mysql virtual/mysql
# rugged net-libs/http-parser dev-libs/libgit2
#
GEMS_DEPEND="
dev-libs/icu
dev-libs/libxml2
dev-libs/libxslt
dev-ruby/rb-inotify
dev-util/ragel
dev-libs/yajl
net-libs/nodejs
postgres? ( dev-db/postgresql )
mysql? ( virtual/mysql )
memcached? ( net-misc/memcached )
net-libs/http-parser
>=dev-libs/libgit2-0.22.0
<dev-libs/libgit2-0.23.0"
DEPEND="${GEMS_DEPEND}
$(ruby_implementation_depend ruby20)[readline,ssl]
>=dev-vcs/git-1.8.1.5
>=dev-vcs/gitlab-shell-2.6.5
net-misc/curl
virtual/ssh"
RDEPEND="${DEPEND}
dev-db/redis
virtual/mta
virtual/krb5"
ruby_add_bdepend "
virtual/rubygems
>=dev-ruby/bundler-1.0"
#RUBY_PATCHES=(
# "${P}-fix-checks-gentoo.patch"
#)
GIT_USER="git"
GIT_GROUP="git"
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
DEST_DIR="/opt/${PN}-${SLOT}"
CONF_DIR="/etc/${PN}-${SLOT}"
GIT_REPOS="${GIT_HOME}/repositories"
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
GITLAB_SHELL="/var/lib/gitlab-shell"
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
RAILS_ENV=${RAILS_ENV:-production}
RUBY=${RUBY:-ruby20}
BUNDLE="${RUBY} /usr/bin/bundle"
pkg_setup() {
enewgroup ${GIT_GROUP}
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
}
all_ruby_unpack() {
git-2_src_unpack
}
each_ruby_prepare() {
# fix path to repo and gitlab-shell hooks
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
sed -i \
-e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
# modify database settings
sed -i \
-e 's|\(username:\) postgres.*|\1 gitlab|' \
-e 's|\(password:\).*|\1 gitlab|' \
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
config/database.yml.postgresql \
|| die "failed to filter database.yml.postgresql"
# replace "secret" token with random one
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
config/initializers/secret_token.rb \
|| die "failed to filter secret_token.rb"
# remove needless files
#rm -r .git Satisfy gitlab::check.
rm .foreman .gitignore Procfile
use unicorn || rm config/unicorn.rb.example
use postgres || rm config/database.yml.postgresql
use mysql || rm config/database.yml.mysql
# remove dependency on therubyracer and libv8 (we're using nodejs instead)
local tfile; for tfile in Gemfile{,.lock}; do
sed -i \
-e '/therubyracer/d' \
-e '/libv8/d' \
"${tfile}" || die "failed to filter ${tfile}"
done
# change thin and unicorn dependencies to be optional
sed -i \
-e '/^gem "thin"/ s/$/, group: :thin/' \
-e '/^gem "unicorn"/ s/$/, group: :unicorn/' \
Gemfile || die "failed to modify Gemfile"
# change cache_store
if use memcached; then
sed -i \
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
config/environments/production.rb \
|| die "failed to modify production.rb"
fi
# Update pathes for unicorn
if use unicorn; then
sed -i \
-e "s#/home/git/gitlab#${DEST_DIR}#" \
config/unicorn.rb.example \
|| die "failed to modify unicorn.rb.example"
fi
# Use >timfle-krb5-auth-0.8, see https://github.com/timfel/krb5-auth/pull/7
sed -i \
-e "s#timfel\-krb5\-auth (0.8)#timfel\-krb5\-auth (0.8.3)#g" \
Gemfile.lock \
|| die "failed to update Gemfile.lock"
}
each_ruby_install() {
local dest="${DEST_DIR}"
local conf="/etc/${PN}-${SLOT}"
local temp="/var/tmp/${PN}-${SLOT}"
local logs="/var/log/${PN}-${SLOT}"
local uploads="${DEST_DIR}/public/uploads"
## Prepare directories ##
diropts -m750
keepdir "${logs}"
dodir "${temp}"
diropts -m755
keepdir "${conf}"
dodir "${dest}"
dodir "${uploads}"
dosym "${temp}" "${dest}/tmp"
dosym "${logs}" "${dest}/log"
## Link gitlab-shell into git home
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
## Install configs ##
insinto "${conf}"
doins -r config/*
dosym "${conf}" "${dest}/config"
insinto "${dest}/.ssh"
newins "${FILESDIR}/config.ssh" config
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
## Install all others ##
# remove needless dirs
rm -Rf config tmp log
insinto "${dest}"
doins -r ./
## Install logrotate config ##
dodir /etc/logrotate.d
sed -e "s|@LOG_DIR@|${logs}|" \
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|| die "failed to filter gitlab.logrotate"
## Install gems via bundler ##
cd "${D}/${dest}"
local without="development test thin"
local flag; for flag in memcached mysql postgres unicorn; do
without+="$(use $flag || echo ' '$flag)"
done
local bundle_args="--deployment ${without:+--without ${without}}"
# Use systemlibs for rugged
${BUNDLE} config build.rugged --use-system-libraries
# Use systemlibs for nokogiri as suggested
${BUNDLE} config build.nokogiri --use-system-libraries
# Fix invalid ldflags for charlock_holmes,
# see https://github.com/brianmario/charlock_holmes/issues/32
${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
einfo "Running bundle install ${bundle_args} ..."
${BUNDLE} install ${bundle_args} || die "bundler failed"
## Clean ##
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
# remove gems cache
rm -Rf ${gemsdir}/cache
# fix permissions
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
## RC scripts ##
local rcscript=${P}.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@GIT_USER@|${GIT_USER}|" \
-e "s|@GIT_GROUP@|${GIT_USER}|" \
-e "s|@SLOT@|${SLOT}|" \
-e "s|@DEST_DIR@|${dest}|" \
-e "s|@LOG_DIR@|${logs}|" \
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"
if use memcached; then
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
fi
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
}
pkg_postinst() {
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
einfo "Generating SSH key for git user"
su -l ${GIT_USER} -s /bin/sh -c "
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|| die "failed to generate SSH key"
fi
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
einfo "modify this file according to your needs!"
su -l ${GIT_USER} -s /bin/sh -c "
git config --global user.email 'gitlab@localhost';
git config --global user.name 'GitLab'" \
|| die "failed to setup git name and email"
fi
elog "If this is a new installation, proceed with the following steps:"
elog
elog " 1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
elog " and edit this file in order to configure your GitLab settings."
elog
elog " 2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
elog " and edit this file in order to configure your database settings"
elog " for \"production\" environment."
elog
elog " 3. If this is a new installation, create a database for your GitLab instance."
if use postgres; then
elog " If you have local PostgreSQL running, just copy&run:"
elog " su postgres"
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
elog " createdb -E UTF-8 -O gitlab gitlab_production"
elog " Note: You should change your password to something more random..."
elog
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
elog " To get it work you must use this ugly workaround:"
elog " psql -U postgres -d gitlab"
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
elog
fi
elog " 4. Execute the following command to finalize your setup:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog " Note: Do not forget to start Redis server."
elog
elog "To update an existing instance, run the following command and choose upgrading when prompted:"
elog " emerge --config \"=${CATEGORY}/${PF}\""
elog
}
pkg_config() {
## Check config files existence ##
einfo "Checking configuration files ..."
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\""
eerror "and edit this file in order to configure your database settings for"
eerror "\"production\" environment."
die
fi
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\""
eerror "and edit this file in order to configure your GitLab settings"
eerror "for \"production\" environment."
die
fi
# Ask user whether this is the first installation
einfo "Do you want to upgrade an existing installation? [Y|n] "
do_upgrade=""
while true
do
read -r do_upgrade
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $do_upgrade ]] ; then
LATEST_DEST=$(test -n "${LATEST_DEST}" && echo ${LATEST_DEST} || \
find /opt -maxdepth 1 -iname 'gitlabhq-*' -and -type d -and -not -iname "gitlabhq-${SLOT}" | \
sort -r | head -n1)
if [[ -z "${LATEST_DEST}" || ! -d "${LATEST_DEST}" ]] ; then
einfo "Please enter the path to your latest Gitlab instance:"
while true
do
read -r LATEST_DEST
test -d ${LATEST_DEST} && break ||\
eerror "Please specify a valid path to your Gitlab instance!"
done
else
einfo "Found your latest Gitlab instance at \"${LATEST_DEST}\"."
fi
einfo "Please make sure that you've stopped your running Gitlab instance and that you've created a backup: "
elog "\$ cd \"${LATEST_DEST}\" && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production"
elog ""
einfo "Press ENTER to continue, STRG-C to cancel"
read
einfo "Migrating uploads ..."
einfo "This will move your uploads from \"$LATEST_DEST\" to \"${DEST_DIR}\", continue? [Y|n] "
migrate_uploads=""
while true
do
read -r migrate_uploads
if [[ $migrate_uploads == "n" || $migrate_uploads == "N" ]] ; then migrate_uploads="" && break
elif [[ $migrate_uploads == "y" || $migrate_uploads == "Y" || $migrate_uploads == "" ]] ; then migrate_uploads=1 && break
else eerror "Please type either \"Y\" or \"N\" ... " ; fi
done
if [[ $migrate_uploads ]] ; then
su -l ${GIT_USER} -s /bin/sh -c "
mv ${LATEST_DEST}/public/uploads/* ${DEST_DIR}/public/uploads/" \
|| die "failed to migrate uplaods."
fi
einfo "Migrating config ..."
for conf in database.yml gitlab.yml resque.yml unicorn.rb ; do
cp "${LATEST_DEST}/config/${conf}" "${DEST_DIR}/config/"
example="${DEST_DIR}/config/${conf}.example"
test -d "${example}" && mv "${example}" "${DEST_DIR}/config/.cfg0000_${conf}"
done
CONFIG_PROTECT="${DEST_DIR}" dispatch-conf || die "failed to migrate config."
einfo "Migrating database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake db:migrate RAILS_ENV=production
${BUNDLE} exec rake gitlab:satellites:create RAILS_ENV=production" \
|| die "failed to migrate database."
einfo "Clear redis cache ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|| die "failed to run cache:clear"
einfo "Clear and precompile assets ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake assets:clean RAILS_ENV=production
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|| die "failed to run assets:precompile"
else
einfo "Initializing database ..."
su -l ${GIT_USER} -s /bin/sh -c "
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
cd ${DEST_DIR}
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|| die "failed to run rake gitlab:setup"
fi
einfo "You might want to run the following in order to check your application status:"
einfo "# cd ${DEST_DIR} && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
einfo ""
einfo "GitLab is prepared, now you should configure your web server."
}