intermediate commit

This commit is contained in:
Manuel Friedli 2015-11-23 10:28:07 +01:00
parent 3e3f92135e
commit 5a4363382d
5 changed files with 174 additions and 6 deletions

View file

@ -4,12 +4,15 @@ AUX gitlab-ce-8.1.4-fix-gemfile.patch 1585 SHA256 5e5a17fe241547f79e9992a43dc87c
AUX gitlab-ce-fix-sendmail-config.patch 731 SHA256 51f0d0af2a7c048d7cff56cf27955632f340ca67f9d460af840cf34ed60ca574 SHA512 b10d5b8d89927404d25345e17ba37ca4e7848b04c2ca20c5eef14eaac43d9ba14b62ae4c0d532eefaf6f9a2944578e84eb65a3420335d32495855c4807eec356 WHIRLPOOL 66f6443f311f2355ffd4efaea914f462816a1966a715b3b5ffaaa26b41bdced928b9905b8606f06fac3c2ccf20741553cfed2615430287bede01cf376aae2a60
AUX gitlab-git-http.service 972 SHA256 752e1b62a6c182d69b097788d4c21672655af92f150aa5ee416efab67c869f28 SHA512 ba6feefd2741fe97c176e00fbbb802fb4bfc9fc71b2d584c3ad44a312f2b01c9fe92d268d26ab18cb9372ad8616a5ca1554f2895297a17d35f6818bd27b8244b WHIRLPOOL c7c7fa598f2bae6f736a5f84aa3e737dd3b3bce8803128b0b17a8375e4e0c528b95bcd88b959c5bb9bd5ca1fd73330170be6fe2680c1a14702073d3c1c15f265
AUX gitlab-mailroom.service 773 SHA256 39cea460db7fc505b136a2106902d0515890180e74913bf364aa499368fc5f2e SHA512 f82c63a180add1103e2bd115e67826ad7362a844991ef16f1de7fc6c78bf1955155ecf278fc0d759e674ab85736f3ba2a6650d00e9b3ce683316875efd9efa3c WHIRLPOOL 683c67b12f9666d1c1df5ec61e0072acaecd3aff43d0ff475037e178bc58fd9036ae6d8cd45e922098c842abd057231afd4767ce229d4581356f153b48a06208
AUX gitlab-sidekiq-8.2.init 989 SHA256 5070ae6cb7e9fb9ad3a72cee6fdb94092f77f44b2d4ed7f99d3310aa01cb699f SHA512 647871ce552773295552c406cf9140712235f0da1d953a54cd2d2a27b4a50e2c09e3266614830c22b301c8a3138250a4e7ca77e27ba65ddc51f91ba9621bb4bb WHIRLPOOL dcecd27350ba45e3db1fd57e77fb79a3e264065044a761aaeef32b0275eab4ba5df98a30a9a749b8eae17a5d680d98d164e180ea6986a68838de292443616e87
AUX gitlab-sidekiq-8.init 995 SHA256 179f8f9267f8358827c4c70697bf27dac728451ac7b9dbe0637d397850260fc2 SHA512 fca6c3b86788113f50120ada81859535bcdd3524ebf79e495c532049a5e1cb09b44499268b22610707ea4763bd6b380fe8abfad10520cd17b03802264c34f0bc WHIRLPOOL edc9c083447662bebdde5b0bbb97816f15a3122aa5cae966d1df805aac5a81e51a608cb5447283bda222af3bd28519b653a6ca6b34d1eef84abc37fd719e5955
AUX gitlab-sidekiq.init 972 SHA256 614b405d16e2042d013dae510796620d42461512705fad2a90a7f558e0051c33 SHA512 afd3837ae660d47297c6d65180ae5f3ec6a15c1c8ea23aa5b715ca2fc5b628f3d868adf265c16521e940e5aeb53e4a70a2ec6c0acfacb6b39a1fb5bc669672fd WHIRLPOOL 434ae6e789fc8894a9c83bd538de804784c23072129c79fe0c209848e0c8e1a3d607ce9f7f9da617a25c874ce81d276d010d5ae2d3bf95e25034e9048cbd747a
AUX gitlab-sidekiq.service 1066 SHA256 b9a15ee7498cc5ebecfd51a037ab1e32e66723a1612d5ce9365eefd890b5670e SHA512 33ece22389637b7b4591f4dceedb488fb43a92ca47facb19432f87772bbbf1774d4fb737ace52a6d55533c9e291e343dc56971c6f70fed285a10429d6d97d318 WHIRLPOOL b5a81751b8317bb9244018f9ed82f9793734adbad9983c244429a33d710169eeeed25cdf868d724032866d83bb9676ccbbf616b53363491e15a80e474443f331
AUX gitlab-unicorn-8.2.init 2550 SHA256 839e16d3fc65faf67ed2f7be79a2fe4b2a985045157890bf36e5c32a8334d439 SHA512 80f8595fe92e18de916c00206f67fb190c8636e7165a690c207ae2fbf1f7b4d0ee52a7ed64ed0e74b6fc5a61ca8197db6e1a08dbcd4b7e5ed32e7ec88fe4833f WHIRLPOOL 400b959f4943668230835248775188f1df0a3bd28292166a78f1b2ec8fd3cac368f23cfa52bc071d9a22705c8bb2cf519c55d25be979ed4f32f0f2562b10ad01
AUX gitlab-unicorn-8.init 2556 SHA256 60c9e22f50641020702a8945b5d86ab016b567acd7343aa4ab0f8c97b26b5ca0 SHA512 83bd97aba27ee06bd179a76be565116ab794de029278d1e3cb749b9e3d49d38413a668c12c5972362cc87413d87840d026801fc6717241117f9a54abb16444d1 WHIRLPOOL 78e02983ec8ec7f2e37366910e1d1d813bd90f3c32c43dddd12b78442ba3e584463d019347bde99e6e57814e9af631cc1c20e1333a5bbc876037f10e3bef8b64
AUX gitlab-unicorn.init 1657 SHA256 5fe794938b27d25488affc174e4761f5a3a1f9b15489a05f3839b13e4fd5b5ef SHA512 5e005ec26151afb4cdc8eb83592fad6814bb2a3ac8e9f642de83e70cd8615bdf969803a2479f8f72a70e0ae5ab5559da205965b55b3b4cdfdc9aa74055eef6fe WHIRLPOOL 6c61db597311ac618822fb22d7f51c830e5c011ce8e4c790338b3203a4483f3dd121bbd9cc33d7e1f92a2b0527e59816742f8ef0fd531c4c28c36d886fc94196
AUX gitlab-unicorn.service 773 SHA256 010c9e223a30400d9155b39499eb0d7efad23b66baab9fcd9e365c689086b9bd SHA512 0bf9630aa91ed8f590a7bfa42d09b7ba33f6342b43b3d191c792c11157f8926c2a2ac2390eebd8179637e29b5bf68233d4699d62463497a0fd45b9bdbdd9167b WHIRLPOOL fbc709a5550dcc548a35c22c812dafe52ee507f5678b57c22c709ee89a399ae9109e2f56b7a13135d4140f1e024ebc4effe4aa4de13e0f36691da2a0737d9792
AUX gitlab-workhorse.service 930 SHA256 09348a52fec333b4b19828752e0484400c1efa9dfb644723fcf8e80537e294b6 SHA512 6332024fe0049287899cf482b6e4439e9dd90da14e489d08aa8e5e79cb7872efcc517d99b69fa23b011b382acb1e5926496a78f08af5d2d64daa515b869a0c6a WHIRLPOOL 3749c6719b2a35c7de29763cd616e1e9cc30a85aa1630ffc46440334459b5922503d52629556c125a6dd6574bdc5f23f1b2a7f2a85e2270a415b22246e0b6bae
AUX gitlab.conf 27 SHA256 cd9be088bbb67a5400407fc6f63c061eb224f16748b7d0812ff2c101f43ca263 SHA512 909c49fee6d050c1e94b2559ff2a9d54c5c346492be0e2920b50d56d69eaddbed67e3ac12e012d2a9601b5596640ebf33c8dc68fc588a03ca370d963294be37f WHIRLPOOL fa436e8d7d2643d450259d26b6e7b24dae69df47ed22e5ef2a567f37aa785fbf3b0eb1129ae7c8bf8986c29559fc3b744a34064375e5245dce2b10053cd715d9
DIST gitlab-ce-7.14.3.tar.gz 6393535 SHA256 3814a3bdff9610b269be15b8cf35701fcdd78a5a80fb1b366269acc49b23f5e4 SHA512 f2088c151b424cbca0fbc65073c1198ea9c3619570ca3543cf5f0ddd193a6105941608df418eeb506bde83f2c0bbd34cea267caaed70092afcca54219e84004d WHIRLPOOL 70574a135eb426e93086502ad7a0d5b73e1070a19c529852fe2aa60c2081d27bbb4289340b73b469ecfd489779cc409bb56de263e47aaa07859ed0a14dd51f44
DIST gitlab-ce-8.0.5.tar.gz 8238566 SHA256 476185a191bfe8757ca1a981419ff5d31449136e76029daa77e89086539d30c6 SHA512 af9d11f0ed744d0c92c9329ba94fe51534996f18dbb2c110d70912cd3ce9e60c3a127b7c8597c95b010b0e2251f98aabdddc314ddae53ab26a44c19b4ba7a7d7 WHIRLPOOL 6e4bc8c43cbfe215efd21a87a5d0395abde4f9998564fc0295d946ffa6a7021d2b5bc2ea625482fb400088bcc57431b3969a6c9dfa0f2121420356d153d297f0
@ -17,5 +20,5 @@ DIST gitlab-ce-8.1.4.tar.gz 8761954 SHA256 619ac3b8c83ac2e3dfa81054b5ae0e76ae814
EBUILD gitlab-ce-7.14.3.ebuild 10996 SHA256 a632476e8fe87ec1a478d2229f9e27cbe9e7cc86351e411d9f15105178a4c69f SHA512 a8646de0798d7dae299e500e0a42e6b093e229cb666614b895b979decb1d4b6b398ec2b2f1d19e07cc115f2acb16536426d1769b65412bc51349ac1b262b3053 WHIRLPOOL 2ba4e53846507899b3e6ebb38063e11ee92904262b8a6e00817ab50d6634ed0f0b1013f4a0d8a1cbb26e18c4008e5ab457d3cbd0fdc5f92e5c6214cb45c692f5
EBUILD gitlab-ce-8.0.5.ebuild 11185 SHA256 1240818953ae8f61b6c88c91c3c1dd32fb7d03c8a62964f5d3ad2e98ff5dad11 SHA512 fd411dd3cd8a4dd1ee0040438fe5da01f81ccf4f97b7b7b3157fcbb35bfacbfd0eda8754fb01e0061e6b0c5bd0e752b0eaff4d663d11b764623e7baafb4f56da WHIRLPOOL 9514cd8f83c7fbaba82b49352cb9b8e62d1a5317a09bfea85ce945abd1402e634a88f6eb033494729519ac6fc1282c18bfc8224b9bbe6f41ac89a1286b1d5d0a
EBUILD gitlab-ce-8.1.4.ebuild 11177 SHA256 6b920132ff2c4926f2ed3edb3fff7cdf3e88c0314f8a0a9c077cdaae9fad4a0e SHA512 617656f6fd52d0c4751e0726983fc7d2c1532e8bc44761dbbe5bfb7f489e18ef66a68769bb0f7736c9d49d536e8103a5486e92869a9bba4d1aa92c4068eedf6e WHIRLPOOL 1c8a0968a1fa7b95ceb47f66610a72585666cc5b2f7f3157d1f5c04f98a2c89d79ac1875a28c57b3116105d2e0af17dabcecaa00159af42166565ae7fa88647e
EBUILD gitlab-ce-9999.ebuild 10961 SHA256 2c34721fd4e0bb41e0b9ef08eafbb043d416261e50266b1e0c4cf3b2af63c9d4 SHA512 679b01c7619f9fe23e3c817fcea77c4855664c35669c57c617860205e6b6a6f9b979096fd5defe1c454c6bba17f8c82ea718ce2b8997ab2c6a22a937e9bb781d WHIRLPOOL f7d9214f7013ab89a954e64defd0730263bdede9a90106c6cab9c26067e17ad65278c67246a5998a91c1229187e5c4e90dca803b7fb34c096bc7802b24704922
EBUILD gitlab-ce-9999.ebuild 10960 SHA256 e238f53a45c9bc50650a522ad9624e9487c06e24d433b2b0b73cd18885bcd764 SHA512 2e2e4bcccd684c126a6ad010d17e1b4c576125e6ddefa4a60fb6319ebe76c672d09118feaa5c86c2763faad9f954167880d7b6f762e5daeab11b6eea4df3d604 WHIRLPOOL b3d910221a814d0a2d66ca5d92d6e2090911cbabbcee580467edb7a0d2d67d1791f6e9f79d5178b67b24b85b3447997f7483debb623b1ef1a957558b2d3592fd
MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1

View file

@ -0,0 +1,43 @@
#!/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-workhorse
}
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

@ -0,0 +1,97 @@
#!/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@"}
: ${mail_room_pidfile:="/run/gitlab/mail_room.pid"}
: ${mail_room_logfile:="/var/log/gitlab/mail_room.log"}
: ${mail_room_config:="/etc/gitlab/mail_room.yml"}
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}"
mail_room_command="/usr/bin/bundle"
mail_room_command_args="exec mail_room -q -c ${mail_room_config} >> ${mail_room_logfile} 2>&1"
depend() {
provide gitlab
need redis
use net gitlab-workhorse
}
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 $?
if [ -e /etc/default/gitlab ]; then
. /etc/default/gitlab
if [ "${mail_room_enabled}" == "true" ]; then
ebegin "Starting ${name} - mail_room"
start-stop-daemon --start \
--background --quiet \
--chdir "${gitlab_base}" \
--user=${gitlab_user} \
--pidfile="${mail_room_pidfile}" \
--env RAILS_ENV=${rails_env} \
--exec ${mail_room_command} -- ${mail_room_command_args}
eend $?
fi
fi
}
stop() {
ebegin "Stopping ${name} - mail_room"
start-stop-daemon --stop \
--signal QUIT \
--pidfile=${mail_room_pidfile} \
--exec ${mail_room_command}
eend $?
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

@ -0,0 +1,25 @@
#####################################################
#
# GitLab version : 8.2 - 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 Workhorse
Requires=gitlab-unicorn.service
Wants=gitlab-unicorn.service
After=gitlab-unicorn.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab
SyslogIdentifier=gitlab-workhorse
PIDFile=/run/gitlab/gitlab-workhorse.pid
ExecStart=/opt/gitlab/bin/daemon_with_pidfile /run/gitlab/gitlab-workhorse.pid /usr/bin/gitlab-workhorse -listenUmask 0 -listenNetwork unix -listenAddr /run/gitlab/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 /var/lib/git/repositories/ >> /var/log/gitlab/gitlab-workhorse.log 2>&1
[Install]
WantedBy=multi-user.target

View file

@ -52,9 +52,9 @@ CDEPEND="
dev-util/cmake
virtual/pkgconfig"
DEPEND="${GEMS_DEPEND}
>=dev-vcs/gitlab-shell-2.6.6
>=dev-vcs/gitlab-shell-2.6.7
dev-vcs/git
>=dev-vcs/gitlab-git-http-server-0.3.0
>=dev-vcs/gitlab-workhorse-0.4.2
kerberos? ( !app-crypt/heimdal )
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )"
RDEPEND="${DEPEND}
@ -208,12 +208,12 @@ all_ruby_install() {
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_dounit "${FILESDIR}/gitlab-workhorse.service"
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
else
local rcscript=gitlab-sidekiq-8.init
use unicorn && rcscript=gitlab-unicorn-8.init
local rcscript=gitlab-sidekiq-8.2.init
use unicorn && rcscript=gitlab-unicorn-8.2.init
cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \