Merge branch 'feature/cleanup-gitlab' into 'master'
Feature/cleanup gitlab See merge request !40
This commit is contained in:
commit
de378f4406
68 changed files with 51 additions and 7116 deletions
|
@ -1,40 +1,11 @@
|
|||
AUX gitlab-ci-multi-runner.conf 44 SHA256 0b93ba53d557fbf603b50f6d78eb2c4415b9a79f056142b6edf4a63fc6612d6e SHA512 1f5ff480740b18fc985ae9337b8dc4ddd1bde5253e09042b5542cb9a3db54b9cef1f7b24445c829eb83fcfd8751b693018154f6b97ce0a6e723d5d71d9a27429 WHIRLPOOL fc5218c55917b3303baf649fbafaf1dc50cf52d0ee04852716defe4f21b806f4f313071b1c55920d89da66180405d35da0f7cca73c2617b70bcaa67f725cab2a
|
||||
AUX gitlab-ci-multi-runner.init 696 SHA256 03fc8cf6f5d8883b69122362202779f1ef8c8bcc5e60b828a97fb4b6b98ba315 SHA512 70e77d175239827df7470d716d59a61147390f9ae3b796f38bfd4edf966dabb09a6be4ed620e34a8eeb1345d7e2c32082dcc00d7857193fc02024b9ba12142b6 WHIRLPOOL 53ce6f85bc624b44242bc424f755414c8303ba953cdbcbc15b5e3be7b67f0438278d1689f7ce2bc2ae5c4a296fd706401988d0f889d8c37eabd7955e6becca91
|
||||
DIST gitlab-ci-multi-runner-0.5.5-amd64 11633640 SHA256 00982b6f9cfea548a3e41fad9f50f2c8b221251ea2e7e8ac64563f62663537a3 SHA512 89a9474b5dc0dfd5bf53e4c60f40c43f8db1288e49960dc58d5283a61c22474c682041b3b04a4b4533536deef63cc06a65f0b5440891c5f7951d45508236563a WHIRLPOOL 1375f34887bc09d29ff2009a8344e6ec7c2a7d16f31ca1d063cce30607c003df99f80dd4d01244e991745d0ccdccce76077e6597e5ccb38a89a6cce59324b2b9
|
||||
DIST gitlab-ci-multi-runner-0.5.5-arm 9292840 SHA256 0c1641fe1bff208e9166ad1ea3898652989017711e51b38838c48365de2870f5 SHA512 1d9a6c7200614acfa5c3461187ab9df0fe46bead5284d586ea24e2c7c243422ae096dd6faf40ca2b05d3fe567d589a33a87212449fcc7ff56ec1e759955d44c9 WHIRLPOOL 8ea40c13de87cffd1c77dedba64315133106bdfe0cfb8d87da8932d6abde0e88d6577fb9c8ada090b98a0f65d82e105b57a2236fe24385ed72c62a760f36256a
|
||||
DIST gitlab-ci-multi-runner-0.5.5-x86 9377072 SHA256 d9cfc1fb809a4954b18b9d15cae078c552715ab8d596c5e07db2104131c286fb SHA512 952f60dca6cc5a46bc2906ad38e3f02b97181c48480fd0ea91c00e96a266cf37d105da4af1934b294c72a507cfd8e114c2907df80e4269cb082bc0775e451258 WHIRLPOOL 1d512571520a2901e00f758cdfb33441f885a801c717b06b72b626731b9c7e4637b6796fd21944032a1ab5215228e5f288577c4498a52256321446e8ef7fb8aa
|
||||
DIST gitlab-ci-multi-runner-0.6.0-amd64 11682856 SHA256 d90af42466dfe4d6617ef676a994fce621b8b79d924501d3fec2080fa902ee08 SHA512 3a5e69eff297edb63b52314f32c5ae58f04225182b3c453dea90f6f9b4981727481d7677bcad5a797c7c47d90a3eac5da3cce4fa1e85857f740420bfde8eb5ac WHIRLPOOL 41f15838a1b78011d8e7beef77e747ccd4564f6166b1762668bc1a72592d7ad1bd8bff101fd6ff26502a5e7d576a436b677b6736ba2d39a3380b5de242ad9886
|
||||
DIST gitlab-ci-multi-runner-0.6.0-arm 9335272 SHA256 c05598adf5a8a18ee84439c607f95abdad68549ccaf86ef88b0ecf1d390d92a9 SHA512 f3eed0372aea86a14a143f0ab96b759c09a4070a1aaa0ec977bc49c33645f0e48fb74bee5f3176cd38c8578aef0892d7d439e3f85a7574f8cd2a849e49c9b9cd WHIRLPOOL 869e1978acd3bf3991e37d5e838e786501894653dc1a51fd9cf2334dc1978f94496158d1506b955771a573e0ceb6a5c6bfcfd80e22f76f7e1fbbe8598f216db4
|
||||
DIST gitlab-ci-multi-runner-0.6.0-x86 9417800 SHA256 f89553faf164fd8273bcd8c92c7efed3c73454bf7611379c8dbae1e112f4e52c SHA512 1830d65e208f8477860451cb83605a5ac32fbd773c018bbaf3d830f6eff1ac9864044f9de3a60001865c9b19873c1e7d128236b12a09b075e32d2a83760c4659 WHIRLPOOL 79a032796e174a97cc4cdc47e32cdba6072675b04dd22d476f5e78de59517b3f3f6f7c7075e29ac19fc361ce59323dc1791d70e0167d1f5aac94a2460168a1a6
|
||||
DIST gitlab-ci-multi-runner-0.6.2-amd64 11682856 SHA256 d885a0f4326489460a158c2fb6a37cacf680811969848464b7bace516d94b4e5 SHA512 0ca120a782a826ebbca467bf78f8e493c52f8e252cebc78683fd11a027a7496c0c9ca77027128429e7fa222b4b14c7d272cf121f9fe89de62389784b67b0881f WHIRLPOOL 444acc7d6c658cb3b50ae36c815f15f7e20f189a3be140013b10725589a972e6b7dc1107363659974da2f059b8a20be6b52c53758f677d4bfdefc98e2ffcd5b4
|
||||
DIST gitlab-ci-multi-runner-0.6.2-arm 9335256 SHA256 fb53a8413b40616110ff871499f359a13ae09db4162e26a3bf82aee8adf78907 SHA512 6b733d9e28734650af3d0d519e15c9a240907751b6448cd12221576febe38eed6f4e3b64c6515fc053d664da765aadebd65ae09de483158aa310a8bb3ac6d0bf WHIRLPOOL e0f7d26236a5179ba7d199e23f5500e778244f977f048bf853b72735708450df76bcc7cd4e4dd10098df5084f058564050b1c043a919b2403d9dfa927f82c6a9
|
||||
DIST gitlab-ci-multi-runner-0.6.2-x86 9417800 SHA256 9b429307df68a1ab913b6af40e0ae86101701c51f917016e83b0c27eb682af2c SHA512 e16addd9d6f29060b218bceaaa1dcb9eb2a5c2fb72f211af8dae8bf5c227131086ebd4ed20120f3d9997735710c056e3b8152de80c0b8731f7fca2890573bb53 WHIRLPOOL d871925131a508ea26ba7eac14e8b65bf4318cd4de1008d116155a6ff5830525412b401aababb640de225ddb519d766726ca576cd99793791befbeed6f7b945e
|
||||
DIST gitlab-ci-multi-runner-0.7.1-amd64 11865904 SHA256 f7131cbca6eb5a0551efda15821de397dec24a62cb83aa3a804ddbdb4d47210a SHA512 f35dae19e8182d7140ade989f3f2e34ad4bffbd753ff622e0521ec65c5006546262f70ffc392fd8c77a41ca7760d15850f4e575f0f800fddbd18e8f853179d98 WHIRLPOOL f4f62858d264e9de8677b7052dd522a8c2bf5146b085d56290b0c3ea73226a7d2ba4ee0e8fc5961c7fcef1804da2ecd98761f2719f753115ef4eee98bb568c15
|
||||
DIST gitlab-ci-multi-runner-0.7.1-arm 9481720 SHA256 cf6f868b01ed709e6b9cbbeb78b1fafc19778ba83191e5561b8df4da42cd01bf SHA512 e486fdceb5b6558d14cdb6e9c3f2f548eecbcb90bdaaaee87fe722009622b602943a6e19a74e136c4158508c009b3e78749ce831e3fb50fc7505be8040a12ad7 WHIRLPOOL 989e683e401f0f4c912c6677466176b10681c86548e93c0aadd2c0992cc10c37b1496675936ca9d155502a740e4c43784ac504f994e5763e15295dadf790b5b7
|
||||
DIST gitlab-ci-multi-runner-0.7.1-x86 9573872 SHA256 95f8b6518f13a2b8cab4c21f2ef0a688af143f69af3bde7e9fef171704c2f171 SHA512 c28e7e8ccc2e4bc57f9c17ec3fbdb05d07a7882d91c1fedf556fdb8c598403bf525e083d8eee77922409638efbdfc8b09d3a080ccc9e81c8e8c27be96d8cea9c WHIRLPOOL 35ef5db5daa924ff277b2e8c6a886e1109df9477aab758346c4d268467b06ee3ee4c3f83ec84aed550d26ac8465f42d446898811a0129d717af06d32c9f6ae80
|
||||
DIST gitlab-ci-multi-runner-0.7.2-amd64 11870888 SHA256 2020d38db0ae6c578e50515b433d57672634651d15e4a263328a1ebbb1779606 SHA512 026412a78845b36b8283ac7504961112843cfc91d065d495a26fc1dd7baf6f4db8322528aaa76dcb1b5f92792859876c977c60f94c00817fd3d467cff8202405 WHIRLPOOL aa440bf86efd00d97d5381960b665aca5a41aba3074578cfa128620181a1ce6ef2ff6002cd37dd961ed98ce449c8aae88959e119ad65496479b6a57d9111deec
|
||||
DIST gitlab-ci-multi-runner-0.7.2-arm 9482408 SHA256 29186bc8da12535ecb72609de85faec1e8c4b0813a9edb0800aceff80a4174e5 SHA512 5d93711775eb0169e2c7893f0267db03b15367d2f6c250e58db0d5d22c2b1689fae0f9564a90dab0b9401f6c3f7e0a74c4a354ef189a98d423dc7c0524c49254 WHIRLPOOL cb431216a9282f268a4f42500aaf72f4d0526231aa492e5bbdbd5966d90491a662cfbbc06878c6ff6c421a868bb333dc79a11f85267ff58cca025555613ff754
|
||||
DIST gitlab-ci-multi-runner-0.7.2-x86 9574608 SHA256 d093d4e2abda9cadac69bd376a23c0c1f034aca3da5a2a9a013a5ea2f32f6390 SHA512 76264bd1fc9caaeaaefcc08bf7a06eed49dd48a558aeeac2ffc2854e5ad2d5eb3b5039f82cca20b98c4eedd78412ef3da225078b8cd0fc1546e9af06b25cc73c WHIRLPOOL 460d2ee4e91c0b1ea3840b38c1cababdc3b325e3803dc37b9bf624e3d9c188c818348a2f2942770607355ff55d3ae725cc36f296554c528eaa972165ff0d651c
|
||||
DIST gitlab-ci-multi-runner-1.0.0-amd64 31988096 SHA256 f5d6769979e5588fbba71d977142af5d2cf2d976bad078d81ab5cda1b5d3abc6 SHA512 c05f432914ace89453b6d330af5c794e3e5cbd42d3efc2a0d143253ae1a7616a49a930a052f0e8df7a90340ab22d10f38f5e4fb5a051953785323e367d71034b WHIRLPOOL 1ea6a878237d050a80462aa23a8aef72a44a7787265046e2034074984a21adbd79979e382d001215ff284680fefbebbbbf59257b06a9aa98d56427faf9b25bca
|
||||
DIST gitlab-ci-multi-runner-1.0.0-arm 29439688 SHA256 46ba098f50225bae1f8df964cfbb63ec69feffe65f2854c45449902d06fc9ca4 SHA512 68a895c38dc2b97ec99d19654f2d1cf8ac2859704e690d3973ffc795f4a10a80311987291fcbba141c380c38e219dddcb1f7d469d7d947f0e52b562cca04cf0e WHIRLPOOL 0872c5e4a8de677ae3fc87b1d6cdad59acfc0752c9039092f9c6e1596d0d884604dac4a290f52cb05dd2bc9743981e427c8bffa8267ef0974ce1e4e85f4dc276
|
||||
DIST gitlab-ci-multi-runner-1.0.0-x86 29543784 SHA256 f1ac2550170b24abbc32983aee87b4bb9c86a7c4488e9656107171c408def74b SHA512 7baf3c701734ff146b28960e7a519b1a6882bf3cdb86deaf76bf7e0c6f94a87d4f5da3abb52a0d4bd086cfe8cee38db58fe241b5dda9516078dfd4f36ed1dd62 WHIRLPOOL 18af65b15fd4df599ec2a75b310f2838668fa0b478afe071a73fc8eada67c26a0db61e47fd71a3aafb1b62c61d550dc09c73157dab9854ea204163c0ae5f5301
|
||||
DIST gitlab-ci-multi-runner-1.0.1-amd64 31993904 SHA256 3f2bfd4588b01b88f709df1ae13bdd13488ee86b7e39f3c3287e2086ac7733d8 SHA512 89fd115f7a42ecb41af026ed5c809f223d46ff830317b935320b660b291e3f3ebf12fabd1d57896b77ed9c75a68c1d39591e001ca263d9c0e8476d9da06d9706 WHIRLPOOL 043fd5917a3b533a71dcf8da09f6146d9b073edb57188f6875bac96b260ad50cf71de46cd025ab4b3b339a6455ebb90151e72f28f662f11b7665357fed7850f8
|
||||
DIST gitlab-ci-multi-runner-1.0.1-arm 29445368 SHA256 79dc3aac3539e29b718462a12242c8de1d6133639bb1d9e76a24c2c9505920bf SHA512 84d94546dd8b0aaa2edd049e81b2dc5f1f15b40d0fcbf4572678e078f013a793e10c94b59051b1406a994665c2b30f0df3d4fe9ba04ed1f66814ae87f7dfb248 WHIRLPOOL 3d9e1dc9226b559d556eb59218d2b0cc6311d807fcfe0645dedd1fddb51e4ec85a7a9764d547a8c203444988768ffc54f3c3b4d32dae5f7029f69137a1eeb3b0
|
||||
DIST gitlab-ci-multi-runner-1.0.1-x86 29549472 SHA256 11224f7ff4bd8ee3e8031505b0a5a5a5412ed84df0d01eaca7fcc15f15ebe9a4 SHA512 6fcc49542ccb61d9b914044bb59fbe4a05059195a020fc8691ccd6d2beb397b9b245712fe2597a3481b695a9aebc8d841434f71489c85f14b60889134aaf183c WHIRLPOOL 6ad6cb12941f4fb975fa819bc09f26357fd862365cad4fceb0f81fc7cb30afaa01de3717c07212ea9bdce49f75f54bb57b6bcf8fc4f8c0178815e550841e0c52
|
||||
DIST gitlab-ci-multi-runner-1.0.2-amd64 31998376 SHA256 59c65be59c34d94f8b82e19013450f46fd800d89d1edf60be1fd6ac421dea0d4 SHA512 13409b232d2190604e1b752a322293eb39ba08bff37624d21c1900789a4782a54c6f9aad9a70c3ca66a136b2f4c7ba3900aab1312d9effe0c93e2d9be454d8cc WHIRLPOOL d03b0267172dad13d09b1df2436c8e040f188c80e5afb23476800b4f1db5b77e4d5a20c5458dad39943a89520668bf516eda7017625603f34e30458e890ed472
|
||||
DIST gitlab-ci-multi-runner-1.0.2-arm 29449768 SHA256 057e3e0271f61b39d10ebf478428d608fae4b4902a6dd13fcad6b1e1fb793a38 SHA512 522b7378866830e849117ab5acf2e98892665f75c28614d4921d4c2aa06f2e6b944649eb6cf302be99e900ab46bedf37405c4564b4915d2d7b8e12d3dce68c30 WHIRLPOOL afa8880642fbba0b722ce0c2bddfd68e4f4e02ec3604eee5bbec52a4501155ae6b7eca3dcd7b02cd640cffa63235791e090d06c209f3c3316339f17d48354df3
|
||||
DIST gitlab-ci-multi-runner-1.0.2-x86 29553888 SHA256 8937eae87d0fbad318e7867b94730bfc75e155ebd5a5f6b0783c84cf8418f84d SHA512 998dc0499d6918599f66c2a1ee3356c7bada8b819ef3d1a05449a397bab84f4294a0e875ac1a9d3fc074237d60c39b27cf26a468ccfc1ac3aaf27ffcfeab21a1 WHIRLPOOL 26f5150a7156c9000ac2c5832f948ca98d346cca25c8c6561d2be8472f31cbe19f9c6879a4d05862b95356f0fddb4ba706984b405008f6e2e96364efbb0ceac3
|
||||
DIST gitlab-ci-multi-runner-1.0.4-amd64 31999976 SHA256 c73c22e54c1416ede6580d359af0089d9d8c8e461574543d93af2a84c91b6d38 SHA512 d96497fe6ae646d696ede7ede97a2137bb05a43c5b4c6622cb4dd612ae9d24b091ad7287d22121d7418515880f564a8af99f1d8c58ec7ea6e31a54dcb4e9274c WHIRLPOOL af78d6fdb8356062e1a3fe1e66dc3d69e0755f8ac3758884f1069cfd53b9e133f628bf244778eeefe04d227ed56fb96288e954b20d5e95f641d666534ed31926
|
||||
DIST gitlab-ci-multi-runner-1.0.4-arm 29455296 SHA256 09e17c5f188d99d16acbe06cb01fc39c6856c6f4f8524fa4fd43291ba471beb3 SHA512 f3af90b9884d36853cc5b49b5086bbe5ac97c86b77d07bb3f47cf36c492cc024109ee9cb5135d0d671b5d1cbfb94f7473fd988d9858c6819fd031b5a98c72afa WHIRLPOOL 9107f197164cf2647ccccb4047d0397046ca30ae56be02fe4e8d29ccd2b8d5f0315c0e5fa162e38abce22ddd8ca48d6579f05674478c19b76aa47282268bd15c
|
||||
DIST gitlab-ci-multi-runner-1.0.4-x86 29555368 SHA256 47098bd380f10069829ec4b0082092324b75267e3321a85bafbdc92dc7858382 SHA512 6ae1a5e0c9e8da14f8ee5be24190e78dd5b8af12b07f622435fb15ad1405cc34749247f2b85519ac7381672a0ce7b7d5d9f4e13db189c56feb04351b060a1fa1 WHIRLPOOL a0a4647854c83a4fc24442c36f90399876d8c6d4df8d60760f10fe8d51088cb74b9087564b489c93dbd0038f3550fc0dc5b2da2eb3b08e372b0d71b9b6f8be62
|
||||
EBUILD gitlab-ci-multi-runner-0.5.5-r1.ebuild 2238 SHA256 e5c5c8172052cce018a8bfe17224a379175fade6bae83a06b8649d987ac6d496 SHA512 dafddb480bf34aa1d17eb57a82b7380c376f303a84bd5a1162030541775935e6352c7d51675465203f898e6caea1ef2802dcbcbbc200d8f4d777082c074380df WHIRLPOOL ea427e8a9259348c5b604cf3cd18993b843bc8312326be745d48ea0b77480101124cd0babfcc21e172cb095bc1dae53010fd2c04f6ddbf177933f4af933393c2
|
||||
EBUILD gitlab-ci-multi-runner-0.6.0.ebuild 2238 SHA256 e5c5c8172052cce018a8bfe17224a379175fade6bae83a06b8649d987ac6d496 SHA512 dafddb480bf34aa1d17eb57a82b7380c376f303a84bd5a1162030541775935e6352c7d51675465203f898e6caea1ef2802dcbcbbc200d8f4d777082c074380df WHIRLPOOL ea427e8a9259348c5b604cf3cd18993b843bc8312326be745d48ea0b77480101124cd0babfcc21e172cb095bc1dae53010fd2c04f6ddbf177933f4af933393c2
|
||||
EBUILD gitlab-ci-multi-runner-0.6.2-r1.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
EBUILD gitlab-ci-multi-runner-0.6.2.ebuild 2238 SHA256 e5c5c8172052cce018a8bfe17224a379175fade6bae83a06b8649d987ac6d496 SHA512 dafddb480bf34aa1d17eb57a82b7380c376f303a84bd5a1162030541775935e6352c7d51675465203f898e6caea1ef2802dcbcbbc200d8f4d777082c074380df WHIRLPOOL ea427e8a9259348c5b604cf3cd18993b843bc8312326be745d48ea0b77480101124cd0babfcc21e172cb095bc1dae53010fd2c04f6ddbf177933f4af933393c2
|
||||
EBUILD gitlab-ci-multi-runner-0.7.1.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
EBUILD gitlab-ci-multi-runner-0.7.2.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
EBUILD gitlab-ci-multi-runner-1.0.0.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
EBUILD gitlab-ci-multi-runner-1.0.1.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
EBUILD gitlab-ci-multi-runner-1.0.2.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
EBUILD gitlab-ci-multi-runner-1.0.4.ebuild 2349 SHA256 6432c48b3a7a36c0b28ccab7fb79382061fa9296df9b6dc9ca32d4caa5f20702 SHA512 2a7674d506e79d8570fa8527dd10b87e775a75b4daf41458bcca28f5ad9863145571d4ebf9d9e0d9df015e48c89a7bd4a05d1bc7928223fdc2b7fd528d5282d8 WHIRLPOOL 6df8346401d631b58a3a6e1ce9f2c0e3e8b871e99880099463dcb9b5639d08b3725c7c83e7f96dfe7e8cba4e60abe77e2afbeb2c7ae8ec13cf02b05d1723fd9f
|
||||
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf="/etc/gitlab-runner"
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
disopts -m750
|
||||
dodir ${conf}
|
||||
|
||||
dosym ${conf} ${dest}/.gitlab-runner
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${conf}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf="/etc/gitlab-runner"
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
disopts -m750
|
||||
dodir ${conf}
|
||||
|
||||
dosym ${conf} ${dest}/.gitlab-runner
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${conf}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf="/etc/gitlab-runner"
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
disopts -m750
|
||||
dodir ${conf}
|
||||
|
||||
dosym ${conf} ${dest}/.gitlab-runner
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${conf}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf="/etc/gitlab-runner"
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
disopts -m750
|
||||
dodir ${conf}
|
||||
|
||||
dosym ${conf} ${dest}/.gitlab-runner
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${conf}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="GitLab CI Multi Runner is the new build processor needed for GitLab CI >= 7.12"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner"
|
||||
SRC_URI="x86? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-386 -> ${P}-x86 )
|
||||
amd64? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-amd64 -> ${P}-amd64 )
|
||||
arm? ( https://${PN}-downloads.s3.amazonaws.com/v${PV}/binaries/${PN}-linux-arm -> ${P}-arm )"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~arm"
|
||||
|
||||
DEPEND="dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
net-libs/nodejs
|
||||
virtual/mta"
|
||||
|
||||
MY_NAME="${PN}"
|
||||
MY_USER="gitlab_ci_multi_runner"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${MY_USER}
|
||||
enewuser ${MY_USER} -1 /bin/bash ${DEST_DIR} ${MY_USER}
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
local a="$(usev amd64)$(usev arm)$(usev x86)"
|
||||
mkdir -p "${S}"
|
||||
cp "${DISTDIR}/${P}-${a}" "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
chmod +x "${S}/${PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# nothing to compile, binary all-in-one goodness! (?)
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf="/etc/gitlab-runner"
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
disopts -m750
|
||||
dodir ${conf}
|
||||
|
||||
dosym ${conf} ${dest}/.gitlab-runner
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${conf}
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript="${MY_NAME}.init"
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
newconfd "${FILESDIR}/${MY_NAME}.conf" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "If this is a fresh install of GitLab CI Multi Runner, please configure it"
|
||||
elog "with the following command:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "You need to register the runner with your GitLab CI instance. Please"
|
||||
einfo "Follow the instructions on"
|
||||
einfo
|
||||
einfo "https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md"
|
||||
einfo
|
||||
einfo "Perhaps I'll improve the ebuild later ... kthxbye."
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
AUX fix-Makefile-0.2.10.patch 386 SHA256 16a0441a38a057773859af0a50f6f21fa1220c94dfc7521d2b9f86d9931cafbf SHA512 e18e74cdfa8d540b541e0b00e8a8bc70e2691e9985bc5a4f302848be99bd9765ef5531cb6a92ad807daec85e7c5e5d1f19c6a4223460755de304a1eeb419b87c WHIRLPOOL ce23abcd31287e28a27762b2c51ab906e3eb652f1c3c23011b6257d271f59a72b34d89e9624ab1a9941c62910775c0b8651d11c414a11760417f106800d6ec1c
|
||||
AUX fix-Makefile-0.2.12.patch 386 SHA256 66a4b8e4f883d5147266a7db4f84ffdf7147946ae5222f43adaee04f11a40d6b SHA512 f47adb7ace8f903b8261b83cbc589ebda009e2d1f694ff6fe125cf3cbb80b55d06a61dff815d84d35aa6948976e17ebbe28cff9eb8a5bc4608ad05baa82b3f7c WHIRLPOOL 550e82c1c041fa0a899eda1a598c2d4ea6ffbaf1f8182e1ca66cf24b13a244590a2317a279b9548a47196dfb6e7f1e6ee829b6bab3178b60d183ac5c00156453
|
||||
AUX fix-Makefile-0.3.0.patch 543 SHA256 53d8f0abd912f27dd84a180ebd59ca7e8b646e6e839493f6bf1740b0cbd86cea SHA512 badad53047c9c35481ed7e61b4d2410f3fad3de4cfb5aba107f40a549080e272144f6548b666508bb0d83529211960537abdade639825028762f5c9a87ba1a37 WHIRLPOOL 92e4de7aa6eb1bb40a1c62e183f03d683ccf5cb0e7705b628fe5b37ebccb047df38ad7093ec6d0938c8abfe08c517141999095db61bbe7c25da666d02c753700
|
||||
AUX gitlab-git-http-server.conf 254 SHA256 b0c0a9a0c6db8743f46e38124ad3591f5f4e3b7d0cf1e0ff6a426504d85a1006 SHA512 9a6948e6491727737fb4faf12238e459992f95a8011726badba7202a8e3a409a4fd34d7a78b933e473bf0b6516d54c08b5905e35e304e022b5d9d2a8f7e38e62 WHIRLPOOL 1d2b11f973f7a0249a75df929c1f71f36c59bc0b7537cb7aed598dc40cb0ca581b9443eb499f2894069f3857d89c058fa3fd01418bbdab40b16a9896e83a52d2
|
||||
AUX gitlab-git-http-server.init 689 SHA256 7c3ca271bfaa696fde364ca5915abe0874dfed67601680f3ab91a9560cabb810 SHA512 9d724a4a5c83d12ad817f33ba6d8a68df195e6a91ff75755c24f04678bb8e91f3708900770d87c824418406b3eca5774117e8a5b9e28210f2d8c48726007912b WHIRLPOOL 3078871755f1d425690adb30b4d096f6ed71e5da6aca7f28383ef154d958748536efef6c53e1417c36259591d165a364e1fde64bb8b490287183e02ac1b42571
|
||||
DIST gitlab-git-http-server-0.2.10.tar.bz2 7150 SHA256 13a43078c2fe321c83c4af61db087ed5f1bef443a866dd05704717e197ce8f2a SHA512 faae12473e3994bfed31c7b13ad20e30f74a954db1b622ff911dce9be4dbc1a54a0ee4d0e9706f443928ad72ea810184360c590251e8012a882e8dea1538878b WHIRLPOOL c0b8ad7143bfc40b0540a5dd3466eb26b8698a3aa307a0086020d42968d23f785b4a22309b04f6923e6003efa53dc4a4412ec13fb7ec5c21f54220d04d786032
|
||||
DIST gitlab-git-http-server-0.2.12.tar.bz2 7352 SHA256 0a50682ac246a0f7b27844959da829521df7f86ef7e88fd72d84fb500f09a6a5 SHA512 393ec8fe17310a79e4094eca464bec2f9e4e8508c8bbd911c9f4843b400f28617e35a06b6e41a9c84f8db904f4f20a3386e3473896ad27a1d278260dd4cd3b93 WHIRLPOOL df9fb21fd63db3aac811b1a62eb60225822a6fcc0b874f5b399d2d38f5f3e4c5dcb370c3a1773dd73a67f34cfc21fb6b56144b02987c29f50cef35b33b48f8bc
|
||||
DIST gitlab-git-http-server-0.3.0.tar.bz2 9505 SHA256 84a4c2174a60f90eec2d58ef785a96cb3135a761fcca500c8ce6afc4f3d48e14 SHA512 0d45c28061388343a3f4ad3c0f1fa7ecb4076ff6264b15c12ad237791671e933f93e55c30795f847c9b7f21e709e93232ed826d2d9f45c9afc3e94ce9c961f29 WHIRLPOOL 0f5d1a64ab2945a640615d779d490eabcee250d296455f76661893c6ab41918209c2190cf5c063ab70a6f10558153863a8e65239c35cf60347a08929c8500820
|
||||
EBUILD gitlab-git-http-server-0.2.10.ebuild 866 SHA256 46210d4c292737ea2d5d9b92be12e929f31a43fe4211935482440ac1e16639b9 SHA512 df8d19402f2bf5cfaf05bf023de807ee141535599cb7565afa5c8ae554f41a8ce2bc4f85e301cd1aaa78a4fff1ffb4883ee7e96ea89c1aca8b79a6aa8c9d0da5 WHIRLPOOL ff188332147bb8ce5e1e3bd799c72c15fc5f9d0af5109e0cc5110819778a90fc78d9c899b7de9805e401ec49aed68ce94ef597f80f958ba23dad811f65d5bff9
|
||||
EBUILD gitlab-git-http-server-0.2.12.ebuild 866 SHA256 c70cf7a873960c39b1ca889c4b7b976bf95f37166cd3618848c106c8a3badb80 SHA512 9e43c05e2a889311a4459e2d3e5a811ae8a3ffcc72beed473eba3e2870eabeb07b277c11116ab4fbfea2bdaed97a84eb7f01adc4ddfae8d849412ae5be4bb063 WHIRLPOOL eda75f9da41fa633a1ef1dbf1f7bfa1bfb46deed043f691e61dbc69895efb24c97141566104aac6b102b932c3f8b3213095bdfb392e01bdde1b98a68aa434534
|
||||
EBUILD gitlab-git-http-server-0.3.0.ebuild 868 SHA256 4975d00f95e90a058fda7461c10e60af7a244205ec31968aa1732d1af0a86777 SHA512 3b455d158efcc37afab81c740241d0cfebab83088af2471daebcf8a751c49cd7ee3eb06e1ca9ae9595521955eb05c6453e3701a13a0a18ce40c783517fcda161 WHIRLPOOL da65acb1ba2bd29047f50c9d856124f878a9f938debd463833ba6fb22f086f3d96b8fae5737572e0c4839edeefafb8086f7c7ce95c47891214e71de4219a2263
|
||||
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index f6456e1..c25e29e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.2.10-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
|
||||
gitlab-git-http-server: main.go githandler.go
|
||||
go build -ldflags "-X main.Version ${VERSION}" -o gitlab-git-http-server
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index f6456e1..c25e29e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.2.12-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
|
||||
gitlab-git-http-server: main.go githandler.go
|
||||
go build -ldflags "-X main.Version ${VERSION}" -o gitlab-git-http-server
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index f6456e1..55af079 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.3.0-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
|
||||
gitlab-git-http-server: main.go githandler.go
|
||||
- go build -ldflags "-X main.Version ${VERSION}" -o gitlab-git-http-server
|
||||
+ go build -ldflags "-X main.Version=${VERSION}" -o gitlab-git-http-server
|
||||
|
||||
install: gitlab-git-http-server
|
||||
install gitlab-git-http-server ${PREFIX}/bin/
|
|
@ -1,11 +0,0 @@
|
|||
AUTH_BACKEND=http://localhost:8080
|
||||
LISTEN_ADDR=localhost:8181
|
||||
LISTEN_NETWORK=tcp
|
||||
LISTEN_UMASK=022
|
||||
PPROF_LISTEN_ADDRESS=
|
||||
|
||||
GIT_REPO_PATH=/var/lib/git/repositories
|
||||
|
||||
RUNAS_USER=git
|
||||
RUNAS_GROUP=${RUNAS_USER}
|
||||
LOGFILE=/var/log/gitlab/gitlab-git-http-server.log
|
|
@ -1,16 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
start() {
|
||||
ebegin "Starting gitlab-git-http-server"
|
||||
start-stop-daemon --start --exec /usr/bin/gitlab-git-http-server --pidfile /run/gitlab-git-http-server.pid \
|
||||
--make-pidfile --background --user ${RUNAS_USER}:${RUNAS_GROUP} --stdout "${LOGFILE}" --stderr "${LOGFILE}" \
|
||||
-- -authBackend=${AUTH_BACKEND} -listenAddr=${LISTEN_ADDR} -listenNetwork=${LISTEN_NETWORK} -listenUmask=${LISTEN_UMASK} \
|
||||
-pprofListenAddr=${PPROF_LISTEN_ADDR} ${GIT_REPO_PATH}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping gitlab-git-http-server"
|
||||
start-stop-daemon --stop --exec /usr/bin/gitlab-git-http-server --pidfile /run/gitlab-git-http-server.pid --user ${RUNAS_USER}:${RUNAS_GROUP}
|
||||
eend $?
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab 8"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-git-http-server"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-c846662dced60bb1eef5cc4f59e4e71cc8aa5c5d"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/gitlab-git-http-server.init" "${PN}"
|
||||
newconfd "${FILESDIR}/gitlab-git-http-server.conf" "${PN}"
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab 8"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-git-http-server"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-dda7c98adf850e032fa19c24173cbe567a416065"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/gitlab-git-http-server.init" "${PN}"
|
||||
newconfd "${FILESDIR}/gitlab-git-http-server.conf" "${PN}"
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab 8"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-git-http-server"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-bf2a3cedd9b631939330d2e54241f95a7b478763"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/gitlab-git-http-server.init" "${PN}"
|
||||
newconfd "${FILESDIR}/gitlab-git-http-server.conf" "${PN}"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer>
|
||||
<email>manuel@fritteli.ch</email>
|
||||
<name>Manuel Friedli</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
|
@ -1,12 +1,4 @@
|
|||
AUX gitlab-shell-2.0.0-config-paths.patch 1356 SHA256 442a8e18b4d8e6092db0d39659cba5e41404e90f21070ed50b5460177f28f1b2 SHA512 0445cd42086b2d77825c487d604ddcb11f8fdf4eb8dcdfa1fe1b8e8c24d7b8f273834dbec0bfbb763a35a74605d558cc8d3feaa056eb02a113d18124a764551e WHIRLPOOL 0e3367b229ea4f13818fe2e485dc8da83ad695aec496881cb5eb918b183029b0013518ca64acba1568d93dc418dfaf083c2a86b9f2e3adf9fe15cad038011b30
|
||||
DIST gitlab-shell-2.6.10.tar.gz 35574 SHA256 c83f1cc9371f90fd0c9907c5cc7e64ba77dff228bb3d427afda999f583ba59a5 SHA512 f03b0d4b1e4b6f3e934acd29ca4e7fb478e7891e31d7fa8e6dfb7cb0d4b1dadd14a88254262d2e71691e01742610a86de1039fd738bde0ba05d6d19fe17fbf10 WHIRLPOOL 6c787b5bdfc6fa0e3ce66a4915d3737fa8fc1f47c1be44c0cecdda802e1bee1cf11f0154d6bb63e799458368bc71553f316024895b2465016d699f597cdfb851
|
||||
DIST gitlab-shell-2.6.5.tar.gz 33445 SHA256 586092a62b053adf0b046372aa5983b1170446456cd24e63c145460acc927648 SHA512 52f5c1db5b813dcd68183c6ca02e1fa0eb693040d2e6dedbb903743c285feaddd2a2836726228673eb6da99da07fcd04103e9207443b9f4fb42ba6d1bd4e29db WHIRLPOOL f52937b73942bd2064bc4414f9d4c8b34366dac59912ee926347ba02b7d44c28630a8f530beea82c3df5b6b801db5249080269a9a4e2f8daf33c484a3d203754
|
||||
DIST gitlab-shell-2.6.6.tar.gz 33660 SHA256 0352a5f9247abac00dbd9914371eafef1b8521879479337a5d520adbe3ec7494 SHA512 f41519bb71331ac4a0cf55deb4cae40030a3b1692d9c85007cff73ee4e4b953d134ad06c321dc27d156f17b8a0946da26e07c7d6813def97945fe88dc8def0ab WHIRLPOOL a93f076eceed3a3f00f61d43c146db10ab4e0c8ec3ddc7e33043a8403230067defdfdeb3a1a103fe591c83d473844389ada318acd808ca1132de4e963cee022d
|
||||
DIST gitlab-shell-2.6.8.tar.gz 35191 SHA256 196ac258f036ab6d41439b8149ad46dcaeebae727b69bea53a9747c46757ac1c SHA512 8093476675a63b97a56f50838a27fed1f0f355533177927056acdad5d5da450ff4a82242d9b618bc5f6c289820a01f1aaa924787966779e087ce3c8b2c84507d WHIRLPOOL a8a7a8f6dd0a3e49f2a6b6d03200a320802929d5cc283bbf6eddad90644664a3ca8ff14f9ba7760c8026351801f78ce47ca6a5a95d7bc3ab7c1aaad157423d64
|
||||
DIST gitlab-shell-2.6.9.tar.gz 35487 SHA256 b61839622ca14331b21622b28ff1b28839d86b55c00033b00a4f320df378d8cf SHA512 be5e0c1e6169049d18956229668beca5f6497a090127b204b4ada463bf09ce0df180302b6e85e251cb152716d79ba35975c4842486b9603e7c7001e918e05718 WHIRLPOOL 2430f92b2d370a57f0f68ad6ab227ce50f09af5a2b99bb2556ce38611c70e11a3ca6c27a1da9de219d4f3ef7444e34c380f54c569de65f11dd101953de37b983
|
||||
EBUILD gitlab-shell-2.6.10.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300
|
||||
EBUILD gitlab-shell-2.6.5.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300
|
||||
EBUILD gitlab-shell-2.6.6.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300
|
||||
EBUILD gitlab-shell-2.6.8.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300
|
||||
EBUILD gitlab-shell-2.6.9.ebuild 3496 SHA256 942e2c5af4d03353b4d5b48a46bcf05c837cf1d0375434ff083ceee7e389ff61 SHA512 34600582b7e2defd8470a2a4f70213f598ac540f57ce9748cdaf16192f1e79a59eb950d1b15231d27b8c07649116364208fd12294e89453159a39f2e56048474 WHIRLPOOL a17a4881720eb0a7e68db927a93cb40d852250acb5b2f6daa4625e5338c6dce6707b90683885ead72769bc9a36d0e173178d3df8616ceab4eb32114955aa2300
|
||||
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431
|
||||
|
|
|
@ -1,126 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
USE_RUBY="ruby20 ruby21"
|
||||
|
||||
inherit eutils ruby-ng user
|
||||
|
||||
DESCRIPTION="SSH access and repository management for GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
dev-db/redis
|
||||
virtual/ssh"
|
||||
ruby_add_bdepend "
|
||||
virtual/ruby-ssl"
|
||||
|
||||
MERGE_TYPE="binary"
|
||||
|
||||
RUBY_PATCHES=(
|
||||
"${PN}-2.0.0-config-paths.patch"
|
||||
)
|
||||
|
||||
GIT_USER="git"
|
||||
DEST_DIR="/usr/share/${PN}"
|
||||
DATA_DIR="/var/lib/git"
|
||||
LOGS_DIR="/var/log/gitlab"
|
||||
CONF_FILE="/etc/gitlab-shell.yml"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${GIT_USER}
|
||||
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
|
||||
|
||||
local git_shell=$(egetshell ${GIT_USER})
|
||||
if [ ! ${git_shell} -ef '/bin/bash' ]; then
|
||||
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
|
||||
ewarn "Changing shell to /bin/bash ..."
|
||||
|
||||
usermod -s /bin/bash ${GIT_USER} \
|
||||
|| die "failed to change login shell for ${GIT_USER}"
|
||||
fi
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|/home/git|${DATA_DIR}|" \
|
||||
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
|
||||
config.yml.example || die "failed to filter config.yml.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
|
||||
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
# install lib
|
||||
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
|
||||
|
||||
# install scripts
|
||||
exeinto ${DEST_DIR}/bin; doexe bin/*
|
||||
exeinto ${DEST_DIR}/hooks; doexe hooks/*
|
||||
exeinto ${DEST_DIR}/support; doexe support/*
|
||||
|
||||
# create symlinks to bin
|
||||
local name; for name in $(basename -a bin/gitlab-*); do
|
||||
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
|
||||
done
|
||||
|
||||
insinto $(dirname ${CONF_FILE})
|
||||
newins config.yml.example $(basename ${CONF_FILE})
|
||||
|
||||
# create symlink for .gitlab_shell_secret
|
||||
einfo "creating symlink for .gitlab_shell_secret"
|
||||
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
|
||||
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
|
||||
|
||||
# prepare directories
|
||||
diropts -m750; dodir ${DATA_DIR}
|
||||
diropts -m770; keepdir ${DATA_DIR}/repositories
|
||||
diropts -m755; dodir ${LOGS_DIR}
|
||||
|
||||
# GitLab stupidly expects that gitlab-shell is in home of git user...
|
||||
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# check git home directory
|
||||
local git_home=$(egethome ${GIT_USER})
|
||||
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
|
||||
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
|
||||
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
|
||||
ewarn "either change the authorized_keys location in ${CONF_FILE},"
|
||||
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
|
||||
ewarn "and move ${git_home}/.ssh here."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
local auth_dir="${git_home}/.ssh"
|
||||
|
||||
elog "Initializing authorized_keys file in ${auth_dir}"
|
||||
mkdir -p ${auth_dir}
|
||||
touch ${auth_dir}/authorized_keys
|
||||
chmod -R u=rwX,go=- ${auth_dir}
|
||||
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
|
||||
|
||||
elog
|
||||
elog "GitLab Shell was initialized. Repositories are located in"
|
||||
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
|
||||
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
|
||||
elog
|
||||
elog "You should change your gitlab_url in: ${CONF_FILE}."
|
||||
}
|
|
@ -1,126 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
USE_RUBY="ruby20 ruby21"
|
||||
|
||||
inherit eutils ruby-ng user
|
||||
|
||||
DESCRIPTION="SSH access and repository management for GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
dev-db/redis
|
||||
virtual/ssh"
|
||||
ruby_add_bdepend "
|
||||
virtual/ruby-ssl"
|
||||
|
||||
MERGE_TYPE="binary"
|
||||
|
||||
RUBY_PATCHES=(
|
||||
"${PN}-2.0.0-config-paths.patch"
|
||||
)
|
||||
|
||||
GIT_USER="git"
|
||||
DEST_DIR="/usr/share/${PN}"
|
||||
DATA_DIR="/var/lib/git"
|
||||
LOGS_DIR="/var/log/gitlab"
|
||||
CONF_FILE="/etc/gitlab-shell.yml"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${GIT_USER}
|
||||
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
|
||||
|
||||
local git_shell=$(egetshell ${GIT_USER})
|
||||
if [ ! ${git_shell} -ef '/bin/bash' ]; then
|
||||
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
|
||||
ewarn "Changing shell to /bin/bash ..."
|
||||
|
||||
usermod -s /bin/bash ${GIT_USER} \
|
||||
|| die "failed to change login shell for ${GIT_USER}"
|
||||
fi
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|/home/git|${DATA_DIR}|" \
|
||||
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
|
||||
config.yml.example || die "failed to filter config.yml.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
|
||||
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
# install lib
|
||||
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
|
||||
|
||||
# install scripts
|
||||
exeinto ${DEST_DIR}/bin; doexe bin/*
|
||||
exeinto ${DEST_DIR}/hooks; doexe hooks/*
|
||||
exeinto ${DEST_DIR}/support; doexe support/*
|
||||
|
||||
# create symlinks to bin
|
||||
local name; for name in $(basename -a bin/gitlab-*); do
|
||||
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
|
||||
done
|
||||
|
||||
insinto $(dirname ${CONF_FILE})
|
||||
newins config.yml.example $(basename ${CONF_FILE})
|
||||
|
||||
# create symlink for .gitlab_shell_secret
|
||||
einfo "creating symlink for .gitlab_shell_secret"
|
||||
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
|
||||
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
|
||||
|
||||
# prepare directories
|
||||
diropts -m750; dodir ${DATA_DIR}
|
||||
diropts -m770; keepdir ${DATA_DIR}/repositories
|
||||
diropts -m755; dodir ${LOGS_DIR}
|
||||
|
||||
# GitLab stupidly expects that gitlab-shell is in home of git user...
|
||||
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# check git home directory
|
||||
local git_home=$(egethome ${GIT_USER})
|
||||
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
|
||||
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
|
||||
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
|
||||
ewarn "either change the authorized_keys location in ${CONF_FILE},"
|
||||
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
|
||||
ewarn "and move ${git_home}/.ssh here."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
local auth_dir="${git_home}/.ssh"
|
||||
|
||||
elog "Initializing authorized_keys file in ${auth_dir}"
|
||||
mkdir -p ${auth_dir}
|
||||
touch ${auth_dir}/authorized_keys
|
||||
chmod -R u=rwX,go=- ${auth_dir}
|
||||
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
|
||||
|
||||
elog
|
||||
elog "GitLab Shell was initialized. Repositories are located in"
|
||||
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
|
||||
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
|
||||
elog
|
||||
elog "You should change your gitlab_url in: ${CONF_FILE}."
|
||||
}
|
|
@ -1,126 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
USE_RUBY="ruby20 ruby21"
|
||||
|
||||
inherit eutils ruby-ng user
|
||||
|
||||
DESCRIPTION="SSH access and repository management for GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
dev-db/redis
|
||||
virtual/ssh"
|
||||
ruby_add_bdepend "
|
||||
virtual/ruby-ssl"
|
||||
|
||||
MERGE_TYPE="binary"
|
||||
|
||||
RUBY_PATCHES=(
|
||||
"${PN}-2.0.0-config-paths.patch"
|
||||
)
|
||||
|
||||
GIT_USER="git"
|
||||
DEST_DIR="/usr/share/${PN}"
|
||||
DATA_DIR="/var/lib/git"
|
||||
LOGS_DIR="/var/log/gitlab"
|
||||
CONF_FILE="/etc/gitlab-shell.yml"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${GIT_USER}
|
||||
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
|
||||
|
||||
local git_shell=$(egetshell ${GIT_USER})
|
||||
if [ ! ${git_shell} -ef '/bin/bash' ]; then
|
||||
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
|
||||
ewarn "Changing shell to /bin/bash ..."
|
||||
|
||||
usermod -s /bin/bash ${GIT_USER} \
|
||||
|| die "failed to change login shell for ${GIT_USER}"
|
||||
fi
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|/home/git|${DATA_DIR}|" \
|
||||
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
|
||||
config.yml.example || die "failed to filter config.yml.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
|
||||
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
# install lib
|
||||
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
|
||||
|
||||
# install scripts
|
||||
exeinto ${DEST_DIR}/bin; doexe bin/*
|
||||
exeinto ${DEST_DIR}/hooks; doexe hooks/*
|
||||
exeinto ${DEST_DIR}/support; doexe support/*
|
||||
|
||||
# create symlinks to bin
|
||||
local name; for name in $(basename -a bin/gitlab-*); do
|
||||
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
|
||||
done
|
||||
|
||||
insinto $(dirname ${CONF_FILE})
|
||||
newins config.yml.example $(basename ${CONF_FILE})
|
||||
|
||||
# create symlink for .gitlab_shell_secret
|
||||
einfo "creating symlink for .gitlab_shell_secret"
|
||||
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
|
||||
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
|
||||
|
||||
# prepare directories
|
||||
diropts -m750; dodir ${DATA_DIR}
|
||||
diropts -m770; keepdir ${DATA_DIR}/repositories
|
||||
diropts -m755; dodir ${LOGS_DIR}
|
||||
|
||||
# GitLab stupidly expects that gitlab-shell is in home of git user...
|
||||
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# check git home directory
|
||||
local git_home=$(egethome ${GIT_USER})
|
||||
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
|
||||
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
|
||||
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
|
||||
ewarn "either change the authorized_keys location in ${CONF_FILE},"
|
||||
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
|
||||
ewarn "and move ${git_home}/.ssh here."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
local auth_dir="${git_home}/.ssh"
|
||||
|
||||
elog "Initializing authorized_keys file in ${auth_dir}"
|
||||
mkdir -p ${auth_dir}
|
||||
touch ${auth_dir}/authorized_keys
|
||||
chmod -R u=rwX,go=- ${auth_dir}
|
||||
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
|
||||
|
||||
elog
|
||||
elog "GitLab Shell was initialized. Repositories are located in"
|
||||
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
|
||||
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
|
||||
elog
|
||||
elog "You should change your gitlab_url in: ${CONF_FILE}."
|
||||
}
|
|
@ -1,126 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
USE_RUBY="ruby20 ruby21"
|
||||
|
||||
inherit eutils ruby-ng user
|
||||
|
||||
DESCRIPTION="SSH access and repository management for GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-shell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
dev-db/redis
|
||||
virtual/ssh"
|
||||
ruby_add_bdepend "
|
||||
virtual/ruby-ssl"
|
||||
|
||||
MERGE_TYPE="binary"
|
||||
|
||||
RUBY_PATCHES=(
|
||||
"${PN}-2.0.0-config-paths.patch"
|
||||
)
|
||||
|
||||
GIT_USER="git"
|
||||
DEST_DIR="/usr/share/${PN}"
|
||||
DATA_DIR="/var/lib/git"
|
||||
LOGS_DIR="/var/log/gitlab"
|
||||
CONF_FILE="/etc/gitlab-shell.yml"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${GIT_USER}
|
||||
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
|
||||
|
||||
local git_shell=$(egetshell ${GIT_USER})
|
||||
if [ ! ${git_shell} -ef '/bin/bash' ]; then
|
||||
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
|
||||
ewarn "Changing shell to /bin/bash ..."
|
||||
|
||||
usermod -s /bin/bash ${GIT_USER} \
|
||||
|| die "failed to change login shell for ${GIT_USER}"
|
||||
fi
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|/home/git|${DATA_DIR}|" \
|
||||
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
|
||||
config.yml.example || die "failed to filter config.yml.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
|
||||
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
# install lib
|
||||
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
|
||||
|
||||
# install scripts
|
||||
exeinto ${DEST_DIR}/bin; doexe bin/*
|
||||
exeinto ${DEST_DIR}/hooks; doexe hooks/*
|
||||
exeinto ${DEST_DIR}/support; doexe support/*
|
||||
|
||||
# create symlinks to bin
|
||||
local name; for name in $(basename -a bin/gitlab-*); do
|
||||
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
|
||||
done
|
||||
|
||||
insinto $(dirname ${CONF_FILE})
|
||||
newins config.yml.example $(basename ${CONF_FILE})
|
||||
|
||||
# create symlink for .gitlab_shell_secret
|
||||
einfo "creating symlink for .gitlab_shell_secret"
|
||||
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
|
||||
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
|
||||
|
||||
# prepare directories
|
||||
diropts -m750; dodir ${DATA_DIR}
|
||||
diropts -m770; keepdir ${DATA_DIR}/repositories
|
||||
diropts -m755; dodir ${LOGS_DIR}
|
||||
|
||||
# GitLab stupidly expects that gitlab-shell is in home of git user...
|
||||
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# check git home directory
|
||||
local git_home=$(egethome ${GIT_USER})
|
||||
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
|
||||
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
|
||||
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
|
||||
ewarn "either change the authorized_keys location in ${CONF_FILE},"
|
||||
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
|
||||
ewarn "and move ${git_home}/.ssh here."
|
||||
ewarn
|
||||
fi
|
||||
|
||||
local auth_dir="${git_home}/.ssh"
|
||||
|
||||
elog "Initializing authorized_keys file in ${auth_dir}"
|
||||
mkdir -p ${auth_dir}
|
||||
touch ${auth_dir}/authorized_keys
|
||||
chmod -R u=rwX,go=- ${auth_dir}
|
||||
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
|
||||
|
||||
elog
|
||||
elog "GitLab Shell was initialized. Repositories are located in"
|
||||
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
|
||||
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
|
||||
elog
|
||||
elog "You should change your gitlab_url in: ${CONF_FILE}."
|
||||
}
|
|
@ -1,27 +1,9 @@
|
|||
AUX fix-Makefile-0.4.2.patch 508 SHA256 970bb7ce34fd846902ad83394e929f7162d3c33ddf8307f0538e1f3fb9d1b59f SHA512 77ef8cd1781a1dcd86483ec53db72ad31ea00556c96831f6f4af39c010a4075b503cf5c6a62c787139f92ab651f9a8fefecb8bdab6da38f9a139f89e96c15c86 WHIRLPOOL 33ee8956a2497f7a324f6970e3a8ec83ced3a2364593ce1272cc665c761f2d83a2ab6b73062a333216acb9d345108672181323c3228d94fd1630c29ef4c533e3
|
||||
AUX fix-Makefile-0.5.1.patch 508 SHA256 f63fe5302487d698212b52984f3f51efb3a6768558ae8927044c6a84f1814bc0 SHA512 27916751eda48b5cf4b8a3d650c74ca5031462fec14648a7535def6ebd321d49e1104b84f916109b5fdccdd90f9ee42fdbec587e3ee52f9c649fb49caac283e6 WHIRLPOOL 6f04c95575233eadd8b5f4d3e0ce564591d12e279d9827383292296d118dfc8670e239e2aaa74a3c132cc205b4d6214cb54edc983a5d2270dc005720955c805a
|
||||
AUX fix-Makefile-0.5.4.patch 508 SHA256 3d0eefeafabef0043d9952ba03890fe241cecdbe20354827e187778cf65aea60 SHA512 16c2ae7f5117590bb4f794ac9aa85aa6e66c2edb01219f339d6db8dc91871bf6331e81bec93ce51d0aee5b5e6ef487d3d33a7f33901aafb036035da2444b9bf2 WHIRLPOOL ed054321aba5c546bda4f15750373546fa0ff9b951ee6d901bb7d73d69b3a933583d5897c2ef397348655a3fe6c0e3d4106e645d3ae2cc9e4348b316df82168f
|
||||
AUX fix-Makefile-0.6.1.patch 377 SHA256 ee3352e2f5a3ef9546abffde361ab91cb9e3e652a799e597dd8ae53849b883a9 SHA512 7ca202893f2bdebcfbafcbe451141996ab24758ddbe6698f922e3029a1c4ce25494fc56ffc56d46b0f6ffed97a8745550903eea1dc5469d18f755d015c346486 WHIRLPOOL a3bf269373762cfaf2ccb44da7b368f6474cbc4692146b8ae80080c9cc4457ca05a5a82ef85683ff75a455ee741dd380ec7d24fc76394a28af4e26714cdb7f97
|
||||
AUX fix-Makefile-0.6.2.patch 377 SHA256 f0212d01760418cc669c0727310644b18a3736fac2830d82e38489af6b3a673d SHA512 6d43a4fe8250114bccc9a06cf2d970ec87da3f8fa13024a65cc0af54cce690b52c0a9907d8b219d26a1cc1ae04348e8922f4e5bf35c9b6f2b4e18efaba4b2643 WHIRLPOOL e7e05822830005dd81839510cc38dda599b84204a4eaf90ffa36ae8b96ca9e4f1e54fff34ae7a70bd92ff60d43494b5ee82fcc1b56ac37dfff2bb700a0b4ff40
|
||||
AUX fix-Makefile-0.6.3.patch 377 SHA256 14051ee1b2fa6c4a458b402c486f0b6800004f93ce46410ab7b94142acdf6ca4 SHA512 b127b962667e5e68bece6beb8a26b86425da3f481c8f29a358043d7284796bb3c7563f9272fa27d7b4521e92bac663d55111759a68a6b3729551dbfee43303ba WHIRLPOOL e21c5f0855130ad2efd8526c4fd96e130fdb18eca81590aa0e4d535e3908a182f1bfed9ebfdacfa07698317b76e1584118f48bcdab6af85daac4a8446432a144
|
||||
AUX fix-Makefile-0.6.4.patch 377 SHA256 b9711a6ddb3a6bbcdfc69acae43f26a86f148572535d218f910bdce19683b3c5 SHA512 c7776450f64d0037f24965708490abb553524a9ff17dee90d98ed5ecce17e02a8cf3af872c0aef40e8169d39e318d9673e7d2c2f7555a48b7a2ca71b0131691f WHIRLPOOL c9c78a79ddf7c0060039ac1ffeeb10701a9cd1bba91cdd6e74b1759f166d8ed4137bab38d28d3822167ee9d6e2a6e73557b49b1a9dffa34dca224496492dc3d9
|
||||
AUX fix-Makefile-0.6.5.patch 377 SHA256 e96f13b11f1e05042542dd9bbf507954634b23674e15ea76a97503d484fee7c0 SHA512 13282a291239425aa4de8186dc0db2f8e06c3c1441b71042b3885ff9621ce2f7391e06f08463e671a134022bda74fbe8c836625eb3f8dd38c54b875810afab2f WHIRLPOOL 9d926bef63fc66f08d0b0235116540d6ba8d8a4d071b4305227090e90cf4a5ae58cf720f1c5a93680f391fc8cc818fe72e2c12f19ae004fd7a18df788c64c4ea
|
||||
AUX gitlab-workhorse.conf 248 SHA256 6d11d63aa869cfd8c6f77c3a875984c226db633be899ad7ce97fafe94236eee7 SHA512 234213c8361702bdfeea40bd306b5899de19f34ce985e090a86e01aa601cf4ed23da4dfb75f74fe5986bbea5535a7a6a745406b4f67f79d352bd1c863777c7f1 WHIRLPOOL 8ac1134cde3aee942466d206e703ebd5330f83537d7e29641447f812d857bcc57b07fbf82eab086c0d622750694f64fabf8ffca2ba26a725f61b40fd1941e963
|
||||
AUX gitlab-workhorse.init 653 SHA256 f38c37ed818cb8c25fb800bfcb5448f659e876b78ea33ea7a1ba3c80e73ea95e SHA512 2667997def39e6dc17e6a1d9be06d6e855d5d3e956e64d93bb3e74bbad0a1d427dc034f9c139f3b05e2666abab014404b2c8013c5347f4ec25fbf5ef86e7e88e WHIRLPOOL 63cd7ff80d88676b44c2d6ccdadf74907d5f8e4268f03ee11775c423bf95955f9d3aaeedd79fa6e0486b2d225336eb2ffa165dd7b9ac87ed0c2d403dc7e5afb4
|
||||
DIST gitlab-workhorse-0.4.2.tar.bz2 14206 SHA256 09bd196334c2cde6e86a905df23ad904aaea7f01915b23c7e36cbff40fd0e14d SHA512 dcd2081786729ebcdd19aa1b5763a3ab4cf3e834ba0198827e354f610cbd338367229c2a57576413a3b18ab09a5fb1467eb0c9fe825830269a8990b662bce01a WHIRLPOOL 749803ad942e58e6dcf55dc4dcddf788591af7fe56729c946991e38c70f54aac65b3ba282e9a0106c9e717213ba70ba9c754257aee6bc5fedb3471eb333db4d6
|
||||
DIST gitlab-workhorse-0.5.1.tar.bz2 18396 SHA256 fe5170da871cb48136f35f90963242fe64871185cbf3fcf13129a7f98ff1fc97 SHA512 5d46b047f2aeb7cf174bc3cd5d13e9d6595ddfb2cd80fa174733e3948903552995c4b6ebc2da27a24f50bbb00bf7da44a12b71acb49d90abfe245d2f59a6a3e6 WHIRLPOOL 43ee51fe5db55f1459c0e45ab867cb78f055f811be515af2ba272915df0cd894b899ab9ef9b11e8a53803c1156739d3057fb8d09b9bc3cf36973728dd4a44c8a
|
||||
DIST gitlab-workhorse-0.5.4.tar.bz2 19488 SHA256 aae86bff51ab421a2e529c45c5d3f9223d2ebc23b9a6326416dac9998185488e SHA512 ba555f6aff07826281991cbb66bd2b1f4b92cf3ecb02a6e9f12120e01cd7846eb33eebef3f7fc2e7a531cd498f576d9f2e4529358e0d88b11103f0cd22208d40 WHIRLPOOL 1bbec15e69c674f1fa9205ea74cb8555ff97b3d71dad2815389d8953cc7cfdfdda61bd2e5b36ed871ded913b834546571ab12fee883bfc0f39878d68f84a5135
|
||||
DIST gitlab-workhorse-0.6.1.tar.bz2 25110 SHA256 0e0d9823f6a44d9f4298805f5e8b6539d9d24eb9208c42c04bbbf41843474b16 SHA512 d428f3a7cdc8d4d1de19eba17f22e7ec693d88d6b3a6a4a3fe50064bd833e776ab1504cfcc59b367356ce1a9fd69c77219bd2119db288eaf120d5e4eafb00190 WHIRLPOOL 3720196a97a4a4426463c17dd61f6df54b57b61facaf91903b1315b7e135b852dabdca85665f57cd43ce67f9965939240ce46c40edfd592ae6e59767011bf49f
|
||||
DIST gitlab-workhorse-0.6.2.tar.bz2 25745 SHA256 ecaea12915758a226aa0877ca57bff2c1c32009bc5aa95735fac1dfac1e2d217 SHA512 05ed31336588a7158e4c27dbea22cddeadcb84296ef8809d5824ded2f9cf5a13631997f13843a2da3bed1b9184e92c23f71d4e0382dcc45a8d209d43783b6905 WHIRLPOOL dc9ba82ca9515f569919674b8214f553d66cc08ce45674676646b9d527c7d37f9d72eb01e76c195b1981b3d2b6af378ed77fde8853e953457a2e31c0e0bf4f8e
|
||||
DIST gitlab-workhorse-0.6.3.tar.bz2 26460 SHA256 4b73e28077e0f6d19eb4bed431c90aa029b18519fa6b43ab896400d5a2bd05ee SHA512 0f46da59bc83daa49a2854ce14e449b2a6556efc166a078b20fe95bd573792cf2894a4e67472206c2d56735c1c95dfde615c158d3e430ae701d670316870a29c WHIRLPOOL e09e085cf93817517ad6cdb072c41b9a5a2b6822f2018423ef78fd7e501af3993d0d915ef95c524ae495f12d8c9296f5a460b37bfb0bf1a7d09cfa3d15d92822
|
||||
DIST gitlab-workhorse-0.6.4.tar.bz2 26511 SHA256 cd71a0de525a3bf4e4d66723c1c47263aff37901e2e48a6ec7e8282f369cace7 SHA512 ecb2fd204a58ddee39ea51c38919bfa37ff745ba686c0aa6b31fcac6c3056f318dfe862871713f964e82cf916ca4a7934db094c720befa4c0a4c66722a59f977 WHIRLPOOL 7417f2adb601c0bd28c7e3758e1f03b7f7dc044e0df6794100015687cfd253d2567b7344cff50b8fef999542032d01233a44f724f9b527203e57e5a8b3b65ca0
|
||||
DIST gitlab-workhorse-0.6.5.tar.bz2 26694 SHA256 89deb66ea0a0e4ce80d933ef18778eb28a37bc7f427188313db8f50cf5c78172 SHA512 ac7475f7557dce4807bdc74f0d5c873d0bc602ded7df8a88a3a453ef4814ba493b539faddec13e771dabade8919079597c7147f13c3d6b9a3606b52a7b3536ae WHIRLPOOL d059a346f594bb623ec5bd7aa90660326ac2c36d07536ef43939a38d2d19afb0126e10bced5486a44ac652ace4de95880e84963ab45f0603d8049c106664395e
|
||||
EBUILD gitlab-workhorse-0.4.2.ebuild 866 SHA256 b4377c171ea120bd743f5f7edd222d45260d6fbc290cb263f2e72944335033ce SHA512 24d2c0cb6b71723e8f6349db1b7a501e77a428455506273dd840f715beaf2cb057da0807677a01cde18e4fe3cf98ed7823e83b88a4f4b7711723eef7eaebe20b WHIRLPOOL ec42a052573f4654f808ad7ecffef8f67eb25599127223cf3690cf3e4156f197fac511c4540412394645186ee45a7f4ffee71aeb1803522d57daaa823217d878
|
||||
EBUILD gitlab-workhorse-0.5.1.ebuild 866 SHA256 188539bf1d1f156a37f5044058508e9140f80e648fccdba3c438307a73f14fb9 SHA512 6f8dd6210a522a87e72795ea6b78d4b6a825b8ba6c610c30e04676980ffe49db5e5199d780284ff778e7ba75a633406c95762f16d55b5c15e8d881a3ad8ba567 WHIRLPOOL f713e415daaa8d654b334ed6d991446b6d600192867d6f93e02f9196d1c5454abce92022668ab49e2cc1f084c79da43a6b65d120cec6e627a7dc6f5eaccda651
|
||||
EBUILD gitlab-workhorse-0.5.4.ebuild 866 SHA256 93c056d8226ecd39b57a00e3df876204675b9f0baf3593a2ad9fbe09156a5f81 SHA512 aeb2b5537e0901418554532ef810597aa40b56aa5755b9d7d38d49c3f30f2ed6c1b59b3ae82c97eda4711c76e113245270f556a58f883a6a9aa5d966d0ed429f WHIRLPOOL 9a20dbc894930bcb10f0dc1cce940fd097ac44929ab1c98dbe46ed57c9b319c761306383a642b094cd84d17737a9433d5775c066344190d45bc18554a6f07f47
|
||||
EBUILD gitlab-workhorse-0.6.1.ebuild 866 SHA256 08b63ecdded97a82719876e6efa6e7d185b702b4ecf9eadf9434e2ae2600258e SHA512 fa2297cd59aab9c4c71794977da4842f07a38ac1b3c4a5b7fd21a5d8a28c416b3581fbec6e62900f90094487a5d5b13884002a745e991403e94d925651a01231 WHIRLPOOL 9c087ebfcbb7d2f481b160e6d8e12f79cb5c7375b5786ba1729c117195b2bba20db526d89138de477df56813c9b84d2835f515f554e4435e0477d4e3c182584f
|
||||
EBUILD gitlab-workhorse-0.6.2.ebuild 866 SHA256 92cde2ed28248dbb4f9ebfeed5bc79999fbbb06a64b979c77d7c27896a4f9c85 SHA512 f4e140aeb09c423fae606e50f596991bdf61b1e1ef6c2e966d0dba00a0331c72c075899e1fcb44f28037f4523d54fbf56775cc4c7d59e55de9e0a7e6a5332768 WHIRLPOOL 9c5ba94be5144a6ea5d78536e3d62faa92772c61ea21c3ec6d25db499982651813c9926be7b8fc1ae52d4428e5ced901f69ced3801f902188aeea4d12ea9b4c6
|
||||
EBUILD gitlab-workhorse-0.6.3.ebuild 866 SHA256 dc2863afba82390633afb85cc199dced0234d504ce051fbcbb919b99871e6262 SHA512 2e4982d6219139326a19756e1ea35f7c9cda2c45e0d21391234a48cf9cb7615ea66707d3ca054ca5f8329ff2c208b77972e5f3c02fbefa6b4c63a586481895fd WHIRLPOOL bf3c0ce0379550953c790e24fd5251fe8f8fbfb05caf8a4ddfca00e1ea03108517c92509b90523e872611e70300e4787cc4983c191f805ea96808bc71a0dfb48
|
||||
EBUILD gitlab-workhorse-0.6.4.ebuild 866 SHA256 ca2a291f5d2217676c13d610cb925c649deb64e88cd81bfb26c03a2a4ca1c49d SHA512 8684cf00d8768fc051800ddd099805a3a13995bbafa27a638c71a3cb4fdcfad5b2325ef5c7074d74b951ab2e348b50943dc432858c701b796f1ec323c2e854bb WHIRLPOOL d19614d96eb38249d520459fc4c361812850069f9fc905ffe7590e5d9a54576847ccc35b99b18251426c6e16014ff2e8f7e96dd1d6a6963b11cba7c48395763f
|
||||
EBUILD gitlab-workhorse-0.6.5.ebuild 866 SHA256 eab67140a2cada7e4807126bd2fe081750434fae6c1351842d747f5b11c108dc SHA512 953be4d044d3bbfa0f170e420b5efcb47e247b415fc47f46c4b898a2fbb109564b3e92a7ec166726660a1ac1c325bbf77ca66135a568b91ef664841bb9e6449b WHIRLPOOL 71e0aed5e55f26e3d0fa58390b8ff7639d659c3e78bb20735a408bc89a4a6e9b91ce3213cc19bb5075f10c8d8b83c273a445c53049f9b5c70a7f82fd5e991350
|
||||
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index c2c8c59..419f4d8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.4.2-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
|
||||
gitlab-workhorse: $(wildcard *.go)
|
||||
- go build -ldflags "-X main.Version ${VERSION}" -o gitlab-workhorse
|
||||
+ go build -ldflags "-X main.Version=${VERSION}" -o gitlab-workhorse
|
||||
|
||||
install: gitlab-workhorse
|
||||
install gitlab-workhorse ${PREFIX}/bin/
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index c2c8c59..419f4d8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.5.1-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
|
||||
gitlab-workhorse: $(wildcard *.go)
|
||||
- go build -ldflags "-X main.Version ${VERSION}" -o gitlab-workhorse
|
||||
+ go build -ldflags "-X main.Version=${VERSION}" -o gitlab-workhorse
|
||||
|
||||
install: gitlab-workhorse
|
||||
install gitlab-workhorse ${PREFIX}/bin/
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index c2c8c59..419f4d8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.5.4-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
|
||||
gitlab-workhorse: $(wildcard *.go)
|
||||
- go build -ldflags "-X main.Version ${VERSION}" -o gitlab-workhorse
|
||||
+ go build -ldflags "-X main.Version=${VERSION}" -o gitlab-workhorse
|
||||
|
||||
install: gitlab-workhorse
|
||||
install gitlab-workhorse ${PREFIX}/bin/
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index c81222f..1a90927 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.6.1-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
GOBUILD=go build -ldflags "-X main.Version=${VERSION}"
|
||||
|
||||
all: gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index c81222f..1a90927 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.6.3-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
GOBUILD=go build -ldflags "-X main.Version=${VERSION}"
|
||||
|
||||
all: gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index c81222f..1a90927 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-PREFIX=/usr/local
|
||||
-VERSION=$(shell git describe)-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
+PREFIX=${DESTDIR}/usr
|
||||
+VERSION=0.6.4-$(shell date -u +%Y%m%d.%H%M%S)
|
||||
GOBUILD=go build -ldflags "-X main.Version=${VERSION}"
|
||||
|
||||
all: gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse
|
|
@ -1,38 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.2"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-7a84085b1671f5d6b28408a83ff97a4ff3428b71"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1
|
||||
!dev-vcs/gitlab-git-http-server"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.2"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-bd5ec0015cf9f9f13d6909bd0d2013b9a2fa5aec"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1
|
||||
!dev-vcs/gitlab-git-http-server"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.2"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-58957d60b525e83663f48b119b82160be604111c"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1
|
||||
!dev-vcs/gitlab-git-http-server"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-4464eb25350b18771bf6c2268d250ffba119b135"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1
|
||||
!dev-vcs/gitlab-git-http-server"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-fb0deba81299ab345b6de447113139ce6bf5982b"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1
|
||||
!dev-vcs/gitlab-git-http-server"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils user
|
||||
|
||||
DESCRIPTION="This is the new backend for Git-over-HTTP communication needed for GitLab >= 8.4"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-workhorse"
|
||||
SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.bz2?ref=${PV} -> ${P}.tar.bz2"
|
||||
S="${WORKDIR}/${P}-3f8da4ae570ca6e79c795f343dad278d60edd343"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.5.1
|
||||
!dev-vcs/gitlab-git-http-server"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/fix-Makefile-${PV}.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest=/usr/bin
|
||||
|
||||
diropts -m755
|
||||
dodir ${dest}
|
||||
|
||||
exeinto ${dest}
|
||||
doexe "${S}/${PN}"
|
||||
|
||||
## RC script ##
|
||||
newinitd "${FILESDIR}/${PN}.init" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.conf" "${PN}"
|
||||
}
|
|
@ -1,44 +1,16 @@
|
|||
AUX gitlab-ce-7.13.1-fix-gemfile.patch 1478 SHA256 99050e17841670f03e9430e1f0409cb0194b49ef3235b90c13a4bd66a2648ad6 SHA512 9b0ef71867d4049970295f1ac015e3a4917a24c61edab3452f75f9652e21b94f3dd859247bb28622cd032fe33d4ebcec7b262488841540b48e387f11399c9a8b WHIRLPOOL 9db14e3339e1038dbaff9344f3472c6e23209fa6edbeca35c3108723fd39cb93420361ffdade21fc7019a1e873283524db6e38868ee247ca11a5814832083aa0
|
||||
AUX gitlab-ce-8.0.2-fix-gemfile.patch 1586 SHA256 c91945e0e639b1297519d7165a3aa03fe203a29cde1d195f277be6cba71c67e1 SHA512 6eb15935292902b3090e856e00a972ee2e442eadbf2e42fbde1e4727d75d65e0e06c6be54be8fcd7aeebb5e0616c8d5123f60ebabebd7e02531f0fbc7b03d760 WHIRLPOOL 985e86c5bcb1ea059b41f1f08d3528afd3ab31d71eb81df79a2b454a0e2fb24dbf08b4a1c9197e56864550842baa60599db631bbd2a3603caaea9b7d6743e3d1
|
||||
AUX gitlab-ce-8.1.4-fix-gemfile.patch 1585 SHA256 5e5a17fe241547f79e9992a43dc87c2be09ef5021072002c5172f9bc84858ab6 SHA512 f7de8760a1da1d8829b8b481fe0dafe0c379476406d2e0eac92b3085d4a95bbaa75124e592e724dd78add6cc603c3622ddffed6a337ac93ed510ec96045d7345 WHIRLPOOL 3dde3a4aad28d70cfcc3f379e6c3e29aa86fb508e18e01722877cb1d842ee8580d1a74ed6d2325f8790e27e38bb7b5ffc50adc265337e1557156c9806314a750
|
||||
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 72f9acb269b2e60f7571b2c658f7f29e9c36c6987c9fc8f1d02b9a1bae8ba747 SHA512 cc6ab63f238507bb4a66f48f8df487a8c493afc0e0433ed82c09a7b6dec984a45f465c526cf7be70f485222607af0baa04e7057183f16badcf04950b43fc02f8 WHIRLPOOL 0cda6727f0f0a7a15eb4476c9d651fb5aa6f7ccf9c23a24d040576309c8a30aa6e1790974c82de9656f316c2d9beaf0d1fdd100cab1b7ac7f8cebf2079a13dbe
|
||||
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.init 989 SHA256 72f9acb269b2e60f7571b2c658f7f29e9c36c6987c9fc8f1d02b9a1bae8ba747 SHA512 cc6ab63f238507bb4a66f48f8df487a8c493afc0e0433ed82c09a7b6dec984a45f465c526cf7be70f485222607af0baa04e7057183f16badcf04950b43fc02f8 WHIRLPOOL 0cda6727f0f0a7a15eb4476c9d651fb5aa6f7ccf9c23a24d040576309c8a30aa6e1790974c82de9656f316c2d9beaf0d1fdd100cab1b7ac7f8cebf2079a13dbe
|
||||
AUX gitlab-sidekiq.service 1066 SHA256 b9a15ee7498cc5ebecfd51a037ab1e32e66723a1612d5ce9365eefd890b5670e SHA512 33ece22389637b7b4591f4dceedb488fb43a92ca47facb19432f87772bbbf1774d4fb737ace52a6d55533c9e291e343dc56971c6f70fed285a10429d6d97d318 WHIRLPOOL b5a81751b8317bb9244018f9ed82f9793734adbad9983c244429a33d710169eeeed25cdf868d724032866d83bb9676ccbbf616b53363491e15a80e474443f331
|
||||
AUX gitlab-unicorn-8.2.init 2553 SHA256 9f6d3276d52589a5224c1a9b5a117a0d5d3e83317d756c80de11a5b5d4d45a9d SHA512 2f980ba6206b8e181fa438585630c2c08e5d6ef5596369affe8129b6630c89a43e68529b9a25d03fae6fa5c0fbd29c415570257d1ae92760c2c1f8be1cdf8629 WHIRLPOOL a7f7f26500639a3880b0b5c0ccae88dfdde66bafd6a5cf908787162419fff13ec6a0aee2a179f60ae3e0345ae48e4b7468c49e0872e47c3d9ea91eed3caadc0c
|
||||
AUX gitlab-unicorn-8.init 2559 SHA256 0db9323a34671053860052ff2c4b2087ea687a61c2c70bdfcb1a5733220f17a2 SHA512 61dc10b124f9e3f9c585ff8f645e9fe7bb60b8286a7db32b2bed906079af15367e33399b5e2c0916aa6e88fed00576e14646baa01c0a22db7854fb0f68a082fa WHIRLPOOL ae437a285951441db13328ab9e10ca30f09b1e7ee93d190c4a73358a5f6ca1a08976f4ccd0b7e6eb48a25c73c7ae1728a6daffc5e41c5a4e467439a4c740a71c
|
||||
AUX gitlab-unicorn.init 1657 SHA256 5fe794938b27d25488affc174e4761f5a3a1f9b15489a05f3839b13e4fd5b5ef SHA512 5e005ec26151afb4cdc8eb83592fad6814bb2a3ac8e9f642de83e70cd8615bdf969803a2479f8f72a70e0ae5ab5559da205965b55b3b4cdfdc9aa74055eef6fe WHIRLPOOL 6c61db597311ac618822fb22d7f51c830e5c011ce8e4c790338b3203a4483f3dd121bbd9cc33d7e1f92a2b0527e59816742f8ef0fd531c4c28c36d886fc94196
|
||||
AUX gitlab-unicorn.init 2553 SHA256 9f6d3276d52589a5224c1a9b5a117a0d5d3e83317d756c80de11a5b5d4d45a9d SHA512 2f980ba6206b8e181fa438585630c2c08e5d6ef5596369affe8129b6630c89a43e68529b9a25d03fae6fa5c0fbd29c415570257d1ae92760c2c1f8be1cdf8629 WHIRLPOOL a7f7f26500639a3880b0b5c0ccae88dfdde66bafd6a5cf908787162419fff13ec6a0aee2a179f60ae3e0345ae48e4b7468c49e0872e47c3d9ea91eed3caadc0c
|
||||
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
|
||||
DIST gitlab-ce-8.1.4.tar.gz 8761954 SHA256 619ac3b8c83ac2e3dfa81054b5ae0e76ae81497cf38587410504d6a603181897 SHA512 3973af3480f7e52dc64aec2ef99ff13cac9296fbbc76bfb59387416ee683099109fce361cd1619b4d3fa55032f7e1029b272e07cd15e0b6e353ac6f6c730f2bd WHIRLPOOL d3ce2dfaf013dbd99b023cf9d7ab3494d54d8628093761dd7b9cfe522ac8fb2c00a53d4534843dc292fa38ca1200f2dbe2c376efbd1c40e6e0ca1f9a31762936
|
||||
DIST gitlab-ce-8.2.3.tar.gz 9961014 SHA256 470c10f267ad904ebd6228ccc5007092ab0fdc521277cc6f96ac98959a2b35c2 SHA512 77be97245a266536e1065e689b1e3183cda8b1800553a47f32c6e01d740537831898ec2ed86c9626a57c03e507e9d5d108afb5af0aba3623873973b71c842d7f WHIRLPOOL 44dcfeb1e5dc619e7e78fb7328e50bb3a4b0ac03b1ddbb1fa616e1c79491ce610def90c7bf0d1be541ae63870adc622765ce329e5ddbddafb103a810acdf45f5
|
||||
DIST gitlab-ce-8.3.2.tar.gz 10683322 SHA256 87f6c27043058bba2d879c079f36a81f09f77c8e359ff7cf3bb0f5ebc4dca73e SHA512 a4d05cef4edcdd3ea07858eb52f1fa093a323d6586bcab9e5e2bd78320e56566c496146a89ed24410a551fa5d770a44b018636c11f55eae325cd6ec13de94f77 WHIRLPOOL 2bf74671e58d9f625c385ce2bcd8909bed828108deea17fd4bdbea7bf9d365dda14d1422699582a818fb656ab43cdea7f841c2334de152070dd2acac2f195e05
|
||||
DIST gitlab-ce-8.3.4.tar.gz 10255543 SHA256 15cc1644c05798deafb81be5ae4c313d2d1dc38475ba4b119a5f1d8e905f2c67 SHA512 ce29dbd0b64eee3353e5ea335a738fd0ccc2910167d1d1c4849e7403b91a3b058edb037746b04988a780937abf4fbc33dd769f89a965ec99e8f7042478016f2e WHIRLPOOL 7ed124eaf9ccc913bb18da6fd5f4702cbe756b7a175da6dade53ceb04f35794bd58c8492052b0074ed1fa82e0258213081900ce9157c1ad13eb6f7a18e7c6e2c
|
||||
DIST gitlab-ce-8.4.0.tar.gz 12182652 SHA256 1c3cc61e5cfb9a86d62d62457636de1e277134769037ea2986295e4a7f230d6c SHA512 7314481d985613c6e49f975b75d63fb3815c5150cda5f4e29df282fe28de79eaba9316838a98efb21a7607d260fc29707aaf889354781dab66e55f71410e53ba WHIRLPOOL 358632ac19d4a8581c2d0618c92b744c4e667a57ceeadec811749d2dd9a01e20fc05c45068e96611cc0f946b2979b5e9c8d8d5ddc69ec0d2e4075f12d1cd45d9
|
||||
DIST gitlab-ce-8.4.3.tar.gz 12187867 SHA256 bc11494885c6ad41f2b6a057d7fbec2fd4df10908f591c84c210f4881aa3c23d SHA512 84018eca604ba1639e19cc45b6ef21ad298cf60a66724bc247bf7a7c94ff1131010317d851855f5676687e8c8148602ad199e35f1029ebab24ccbbafd7b866e1 WHIRLPOOL 418afc8ddb262aa7af22bd79cb9febf1a15625f753208fe4f47cbbc3d79df0566e506febe2917bd2176508312d4a5da7245e36233ec2e50c024b811c1d306b00
|
||||
DIST gitlab-ce-8.4.4.tar.gz 12186833 SHA256 f8c403d4cecd82aa2021ed5a6d5d7b4ac8526c7ee7a9bb1c7391f8653bf5a01c SHA512 fe8bd002ea164b384e25303e06ab6a6a97c89180a1898bc8a6d6bb07fcfda6be03a057ad7f92e4c192e0c10aa686b897fe18e864b36c314dcd7fee62dd6758bb WHIRLPOOL 8c79ba70f9b56408f70a4b48554114bcad5a4ac2806dfd8fe63ad060b9887bb6cf3d4f5c2d6e7db20aa65a83e2c33879fd32b9cce7277cd6fdd65acbdb399f40
|
||||
DIST gitlab-ce-8.5.0.tar.gz 14276001 SHA256 a43dd64cfb1e34bf273d31984b52ada09c5a48d5d077f5bd1f21a79960bb1039 SHA512 499d93767df9d3c9c4b68ac663846d49335bd989ee8e93a8d610cb6106900886913912443f908cd316424312df67658df5d6027fda9a5abd787572d4e23e14d1 WHIRLPOOL 225c40c9a1769dbd13ea736f6bdce2a9a3cd5bfca8b27ce9270f55beebd36f5b233858c0dee5f0d80cdf40c5ccc1af651d152743f5ede1f98a8a8496ba36b6d1
|
||||
DIST gitlab-ce-8.5.1.tar.gz 14277708 SHA256 74eca700809ddcbcd3d386ac2042f3b9b85b8f2685df1ef47c253f265096be25 SHA512 107fdeb139cfa7575a9d9c6d0cb27632dbc74b49a178378fd5ca2f7887c847cd5aee96d114f08d7c69ba3c912aaf4f3fed7c03494150819a02acf3edc07e383d WHIRLPOOL 2649d06a908fcc570792f1fac12a18daeb36de08987ef4501b5b756ea785c07b73e01a4a2d4d4eee640619acf209036a4d997b08e302439f96f3675f06949b4a
|
||||
DIST gitlab-ce-8.5.4.tar.gz 15178874 SHA256 5c6d6e3fc0ffed85ab6850b6cd87bc62797410bfa59af06c3450bb435a5400f9 SHA512 826ee6e3101d230337cc69d19096e092594530f918e42289eba497081b5cae646f94a0b3c95cd3aa1f2c874c7037f3d06800723fed7c340e879ad746b34b8456 WHIRLPOOL 7f745bc2a6591b7959a06fb8d14f8f2ed2a25995f7bdd5fe263aad520563e9c4a3b425bea5da5f2647d3919e10c39543a6d7b2d18a8b37955d0c85019c4a14c7
|
||||
DIST gitlab-ce-8.5.5.tar.gz 15179973 SHA256 859ec6142095d459b1587616df6c83063e87a8c7417ab8606100588525d03e2d SHA512 48f69092a68e2b6a748c35f5cea151f08856a7d19ab58a7f0a90d5b37c5276edf640ba42501aa6aec38008463fce21763b6ee650ad2e6e2b89e815d7f3f07b0a WHIRLPOOL 8db633ed71cb514df6fdb4515a74a4732efe5013d36ea140a3195aac82ec069863eb09e6d241f9416d6fe93fdec8c68e894cbeec3e0b6eba24c24c6d3b23849d
|
||||
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-8.2.3.ebuild 11149 SHA256 b9ea26478efe2bb798334178589f94c014550360bcce109af55cf9e9431519f1 SHA512 8cb298285f338c2f45a6b2048d597067ecdb51f3c70ab4c893810029b4773a20b7f058c4262019ae9f88cef5cbaf993726b653d5e214005495acb064bc00d83c WHIRLPOOL bbcfa2b53863fe887b2eaf62d1495463f1590eb5f04856dddb2d95f28a9cec377d29eeac04bb90eeaf8be657a7a71c73edac8ee5fc123f905b694aa2a50aeba9
|
||||
EBUILD gitlab-ce-8.3.2.ebuild 11156 SHA256 3bbee882fafa3f1cf16e5e214c87bcadbb64c0abaf1566930aa548e5198cc361 SHA512 2794d6a92dbf5341c46b7b7504b9099fd3f350de0934599d3d8d59fd26c2515a88dbf850ac7e490929ab2cc897225c40696e98192e863549d3d5e677c5c96927 WHIRLPOOL 3083fec80d5cac025b0bc29fe2035e98e37b06bf7e54c5d54519171e052f7435fef38ac7f63030f828713b1af80e949fd7a117d421231fc01fff93837f885a3c
|
||||
EBUILD gitlab-ce-8.3.4.ebuild 11156 SHA256 6a9d5dffb4228ef4ad3eda9429d9429ab7cc9ce64364d208b38bbd92d2fd5834 SHA512 e9cbfc68f80c737b0f605ac3db4861c50e4a304fec175db699c6eb24a1284180ea83e8a619abc3ba5808374f380d45b42986f646f8feb229af4a329807f2d817 WHIRLPOOL 2afd92aa67b7a8d7495db65830615fd6671b6b8366b2dd0492278e598ea069642c3d394fde77bd4fad6c5f0484f5d2bcb19c4b5a996a1af1db3e390a374653ab
|
||||
EBUILD gitlab-ce-8.4.0.ebuild 11157 SHA256 d79254791765a17fa4885ab35e0f6f2c0423ecf9227cfa71f9f6c8bf6bd6a8f7 SHA512 63d6bc7a29c0e2fe5714ed69c3966a878e60d348aec42bf0db2032873a295c81f0d27a5b5e73001b1dfc238cd635ee873d6ec6e513ace99c88a4494412337aba WHIRLPOOL 4e916bde073bd223a4c0feec794dd6f717433b4c041ace203f263731bb201b14794529d752669e9b5faca07856d1bf62466956cb0532473bb3ae4d171b8655b6
|
||||
EBUILD gitlab-ce-8.4.3.ebuild 11158 SHA256 134fedd2c467d11174a22055e58c822b953f9bdb9902aa0bdf0822c66344d364 SHA512 818c37d814074cb063c91adcfde0f1164fa89cba5a855c442470b5f0e47256f2078326f998b5502c996bf4a2c874cdc068685ad037d1dcf962c2c0bbe683e689 WHIRLPOOL a251afe289ab12dbef9114ebfcb00cf84080766e4d0c1737fa1ece1965210d4544a319af27823b4794c0bddc0cfbf6d3cb896bbe48fa02c623e0b4847b6302d2
|
||||
EBUILD gitlab-ce-8.4.4.ebuild 11158 SHA256 134fedd2c467d11174a22055e58c822b953f9bdb9902aa0bdf0822c66344d364 SHA512 818c37d814074cb063c91adcfde0f1164fa89cba5a855c442470b5f0e47256f2078326f998b5502c996bf4a2c874cdc068685ad037d1dcf962c2c0bbe683e689 WHIRLPOOL a251afe289ab12dbef9114ebfcb00cf84080766e4d0c1737fa1ece1965210d4544a319af27823b4794c0bddc0cfbf6d3cb896bbe48fa02c623e0b4847b6302d2
|
||||
EBUILD gitlab-ce-8.5.0-r1.ebuild 11726 SHA256 4ff8cf27d461028f82b3c463bb59e0161979018f00c97815245ed962b2470d8d SHA512 66c13b9330c71de051c9ef8a78b25661a2e01fbe787747ce78175e202fbac02dfea42b7cc53b45b6d335d88602491f9e8266d4097c3271f12ed7f2f22ab68dc4 WHIRLPOOL 9abfd5c6839a9f542c96a7987b597ad6cd9c02f326fee18f113823775ffe7b9a6d8f23f5bcaf37e769e6eaf849d5756f945701407e9a90f2316889404e0e7b2f
|
||||
EBUILD gitlab-ce-8.5.1.ebuild 11726 SHA256 4ff8cf27d461028f82b3c463bb59e0161979018f00c97815245ed962b2470d8d SHA512 66c13b9330c71de051c9ef8a78b25661a2e01fbe787747ce78175e202fbac02dfea42b7cc53b45b6d335d88602491f9e8266d4097c3271f12ed7f2f22ab68dc4 WHIRLPOOL 9abfd5c6839a9f542c96a7987b597ad6cd9c02f326fee18f113823775ffe7b9a6d8f23f5bcaf37e769e6eaf849d5756f945701407e9a90f2316889404e0e7b2f
|
||||
EBUILD gitlab-ce-8.5.4.ebuild 11726 SHA256 228266c21fffb950f63be36d17ae104c55c263bb92bad34c2b01a1af0a18779a SHA512 b1ce2591a7c77a8ea87c963ddca613014846052f1e1b4d5a81dd53749f013560e86663fc0bc9489f390738b05cbf19dada888d28ac50c33c49e44305e588f12a WHIRLPOOL 5e2737ebbfb75cf99d4d3eac3cafb2ced0eb7fc8829b145550792d119b8c8ee42250d7f8c672da31be86824f9d0f88e9a8fef1a859989f0368cbbe6a2f8cade0
|
||||
EBUILD gitlab-ce-8.5.5.ebuild 11726 SHA256 228266c21fffb950f63be36d17ae104c55c263bb92bad34c2b01a1af0a18779a SHA512 b1ce2591a7c77a8ea87c963ddca613014846052f1e1b4d5a81dd53749f013560e86663fc0bc9489f390738b05cbf19dada888d28ac50c33c49e44305e588f12a WHIRLPOOL 5e2737ebbfb75cf99d4d3eac3cafb2ced0eb7fc8829b145550792d119b8c8ee42250d7f8c672da31be86824f9d0f88e9a8fef1a859989f0368cbbe6a2f8cade0
|
||||
EBUILD gitlab-ce-9999.ebuild 11742 SHA256 1cf7eb55e970f6530edeaa5d86e7aa9235f4b5774579f63e8e484232e4a57b0c SHA512 f68fccacbcc0aafb379adb74e0c64fe9122a04bffabf5e000dd546a344fc677c90e16cd9f2db199fe61e8660933754cd08ee8c75dc9cd657c7cf2b4f61410b2f WHIRLPOOL cbb8fb6595a5f4bf649b09425181e06e73997934512e58f63ad8be6b164422a244e27c626783185a2f223379aeddff1f83f845c0735c03d301e2703446b22fc6
|
||||
EBUILD gitlab-ce-8.4.3.ebuild 11150 SHA256 3bfedaf3d1c08f78b5b05c2a8730ec0f06b9192dd50056e938dd92fda49e7712 SHA512 24e8fec20389714207bba4170b7eeb403f5cee90ec1b063c2b36eb116f37c2878d9cc48c24467d88db872dc5709b4d6b29e28aa2f60f10779a756b452161acf2 WHIRLPOOL f86654172a28cd40436ee30ac0192445bec405f39c65295f53e9c8d73aeac8e03190321da7b1cdc2966d4ab757ca7ff6f472372bd7ed8ea6b6836ce26efe5ef9
|
||||
EBUILD gitlab-ce-8.4.4.ebuild 11150 SHA256 3bfedaf3d1c08f78b5b05c2a8730ec0f06b9192dd50056e938dd92fda49e7712 SHA512 24e8fec20389714207bba4170b7eeb403f5cee90ec1b063c2b36eb116f37c2878d9cc48c24467d88db872dc5709b4d6b29e28aa2f60f10779a756b452161acf2 WHIRLPOOL f86654172a28cd40436ee30ac0192445bec405f39c65295f53e9c8d73aeac8e03190321da7b1cdc2966d4ab757ca7ff6f472372bd7ed8ea6b6836ce26efe5ef9
|
||||
EBUILD gitlab-ce-8.5.5.ebuild 11718 SHA256 cb2a956f2a8fe5fbd47c13958a54ffcc97a3cecb98ee897cb056c8cda1e766a7 SHA512 93933f55e96d34a30fb9de2861e614fbcdef02a858ce440af03d5ecaf1a7d52cf393f71dd107f5d76e1096bdefbd72006451988cfb2090043bc1738824e47814 WHIRLPOOL 697767aa4d02fd130f0ddf65e4fc8082dfa6d89ae6eb652b37051bb7ff3310eb0eace7f4d9b687393f5cc3e628335b2f02deb57e1d280e71f036024c096a38e4
|
||||
EBUILD gitlab-ce-9999.ebuild 11734 SHA256 353e3f8f93d49d08af49538ba1bad91c7920b8cab3ff87d9ab3b027909a9af77 SHA512 95adc839b45d2aa4bf27e961cd851fc25e59502a0b77973dabb84446fe463e706d6a9bc1f4053ef5a571d9efbecaeca87b8eac2b9dc9ba6979035a924b29e0a4 WHIRLPOOL e0d13e1dbeb61066e01a9e95b4760f3a2b429a723323aec3d4275a738fbd3718f1cf922942d0411534829888c28f0d9ac1f01be285c7474584497f2d15f0973c
|
||||
MISC metadata.xml 545 SHA256 1b7fc44d811e1ab7638fe4a40253f49d5f1071872d3020c22c4f67662750cb2f SHA512 86f47d297892bccfefa087d93936296f5647993a9ec8e3f47907a6859cbf385e5bc6f00502d7836c9e8d9efef2b6725bf145b0150924c2082b2bd164469ef6ea WHIRLPOOL 6bfb8a55684d68c8bfa6e025a0be965f7b815394ee0896dd2a13cfb524e3cf3f3149acc9072897e30a1842060389576aac07ea8beb4a8b0bfc3e8eab3723f2a1
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
diff --git a/Gemfile b/Gemfile
|
||||
index 9b7fd18..2bcdb94 100644
|
||||
--- a/Gemfile
|
||||
+++ b/Gemfile
|
||||
@@ -173,6 +173,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'
|
||||
|
||||
@@ -182,9 +185,6 @@ gem 'ace-rails-ap'
|
||||
# Keyboard shortcuts
|
||||
gem 'mousetrap-rails'
|
||||
|
||||
-# Detect and convert string character encoding
|
||||
-gem 'charlock_holmes'
|
||||
-
|
||||
gem "sass-rails", '~> 4.0.5'
|
||||
gem "coffee-rails"
|
||||
gem "uglifier"
|
||||
diff --git a/Gemfile.lock b/Gemfile.lock
|
||||
index 6e57107..5656ef9 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:
|
||||
@@ -97,7 +104,6 @@ GEM
|
||||
json (>= 1.7)
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
- charlock_holmes (0.6.9.4)
|
||||
cliver (0.3.2)
|
||||
coderay (1.1.0)
|
||||
coercible (1.0.0)
|
||||
@@ -756,7 +762,7 @@ DEPENDENCIES
|
||||
capybara (~> 2.4.0)
|
||||
capybara-screenshot (~> 1.0.0)
|
||||
carrierwave
|
||||
- charlock_holmes
|
||||
+ charlock_holmes!
|
||||
coffee-rails
|
||||
colored
|
||||
coveralls (~> 0.8.2)
|
|
@ -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)
|
|
@ -1,56 +0,0 @@
|
|||
diff --git a/Gemfile b/Gemfile
|
||||
index 9254ce2..94acb3d 100644
|
||||
--- a/Gemfile
|
||||
+++ b/Gemfile
|
||||
@@ -174,6 +174,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'
|
||||
|
||||
@@ -183,9 +186,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.7.2'
|
||||
diff --git a/Gemfile.lock b/Gemfile.lock
|
||||
index 5312289..586bd90 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:
|
||||
@@ -108,7 +115,6 @@ GEM
|
||||
json (>= 1.7)
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
- charlock_holmes (0.6.9.4)
|
||||
chunky_png (1.3.4)
|
||||
cliver (0.3.2)
|
||||
coderay (1.1.0)
|
||||
@@ -800,7 +806,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)
|
|
@ -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
|
|
@ -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 gitlab-workhorse
|
||||
use net
|
||||
}
|
||||
|
||||
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 $?
|
||||
}
|
|
@ -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 $?
|
||||
}
|
|
@ -15,7 +15,7 @@ sidekiq_command="/usr/bin/bundle"
|
|||
sidekiq_command_args="exec sidekiq -q ${sidekiq_queues} -P ${sidekiq_pidfile} -L ${sidekiq_logfile}"
|
||||
|
||||
depend() {
|
||||
need redis
|
||||
need redis gitlab-workhorse
|
||||
use net
|
||||
}
|
||||
|
||||
|
|
|
@ -1,97 +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@"}
|
||||
|
||||
: ${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 gitlab-workhorse
|
||||
use net
|
||||
}
|
||||
|
||||
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}" -m \
|
||||
--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 $?
|
||||
}
|
|
@ -1,97 +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@"}
|
||||
|
||||
: ${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-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 $?
|
||||
|
||||
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}" -m \
|
||||
--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 $?
|
||||
}
|
|
@ -13,15 +13,22 @@ description="GitLab on Unicorns"
|
|||
: ${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
|
||||
need redis gitlab-workhorse
|
||||
use net
|
||||
}
|
||||
|
||||
|
@ -49,9 +56,32 @@ start() {
|
|||
--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}" -m \
|
||||
--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} \
|
||||
|
|
|
@ -1,368 +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
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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
|
||||
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/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}-7.13.1-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,incoming_email,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
|
||||
|
||||
# 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_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq.init
|
||||
use unicorn && rcscript=gitlab-unicorn.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 $@"
|
||||
}
|
|
@ -1,372 +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
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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*
|
||||
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/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_dounit "${FILESDIR}/gitlab-mailroom.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 $@"
|
||||
}
|
|
@ -1,372 +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
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.3.0
|
||||
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/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=(
|
||||
"${P}-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,incoming_email,runner,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}
|
||||
|
||||
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_dounit "${FILESDIR}/gitlab-mailroom.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 $@"
|
||||
}
|
|
@ -1,370 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.8
|
||||
dev-vcs/git
|
||||
~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}
|
||||
dev-db/redis
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase!"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 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 $@"
|
||||
}
|
|
@ -1,370 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.9
|
||||
dev-vcs/git
|
||||
~dev-vcs/gitlab-workhorse-0.5.1
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-db/redis-2.8
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase!"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 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 $@"
|
||||
}
|
|
@ -1,370 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.9
|
||||
dev-vcs/git
|
||||
~dev-vcs/gitlab-workhorse-0.5.4
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-db/redis-2.8
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase!"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 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 $@"
|
||||
}
|
|
@ -1,370 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.10
|
||||
dev-vcs/git
|
||||
~dev-vcs/gitlab-workhorse-0.6.1
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/23 )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-db/redis-2.8
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase!"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 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 $@"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
|
@ -207,8 +207,8 @@ all_ruby_install() {
|
|||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.init
|
||||
local rcscript=gitlab-sidekiq.init
|
||||
use unicorn && rcscript=gitlab-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
|
@ -207,8 +207,8 @@ all_ruby_install() {
|
|||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.init
|
||||
local rcscript=gitlab-sidekiq.init
|
||||
use unicorn && rcscript=gitlab-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
|
|
|
@ -1,381 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.10
|
||||
dev-vcs/git
|
||||
>=dev-vcs/gitlab-workhorse-0.6.4
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-db/redis-2.8
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase. Run these commands (as root):"
|
||||
elog
|
||||
elog " cd /opt/gitlab"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 initialize the environment:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog " Note: Do not forget to start Redis server first!"
|
||||
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
|
||||
elog
|
||||
elog "If you want to make sure that the install/upgrade was successful, start"
|
||||
elog "Gitlab now and then run these commands (as root):"
|
||||
elog
|
||||
elog " cd /opt/gitlab"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
|
||||
elog
|
||||
}
|
||||
|
||||
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 $@"
|
||||
}
|
|
@ -1,381 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.10
|
||||
dev-vcs/git
|
||||
>=dev-vcs/gitlab-workhorse-0.6.4
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-db/redis-2.8
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase. Run these commands (as root):"
|
||||
elog
|
||||
elog " cd /opt/gitlab"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 initialize the environment:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog " Note: Do not forget to start Redis server first!"
|
||||
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
|
||||
elog
|
||||
elog "If you want to make sure that the install/upgrade was successful, start"
|
||||
elog "Gitlab now and then run these commands (as root):"
|
||||
elog
|
||||
elog " cd /opt/gitlab"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
|
||||
elog
|
||||
}
|
||||
|
||||
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 $@"
|
||||
}
|
|
@ -1,381 +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"
|
||||
|
||||
inherit eutils ruby-ng user systemd
|
||||
|
||||
MY_PKGNAME="gitlabhq"
|
||||
|
||||
DESCRIPTION="GitLab is a free project and repository management application"
|
||||
HOMEPAGE="https://about.gitlab.com/"
|
||||
SRC_URI="https://github.com/${MY_PKGNAME}/${MY_PKGNAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RUBY_S="${MY_PKGNAME}-${PV}"
|
||||
|
||||
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.10
|
||||
dev-vcs/git
|
||||
>=dev-vcs/gitlab-workhorse-0.6.5
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-db/redis-2.8
|
||||
virtual/mta
|
||||
systemd? ( sys-apps/systemd:0= )"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
#
|
||||
# fix-sendmail-config:
|
||||
# Fix default settings to work with ssmtp that doesn't know '-t' argument.
|
||||
#
|
||||
RUBY_PATCHES=(
|
||||
"${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,mailers,archive_repo,system_hook,project_web_hook,gitlab_shell,incoming_email,runner,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}
|
||||
|
||||
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-workhorse.service"
|
||||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.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 "If this is an update from a previous version, stop your GitLab"
|
||||
elog "instance and issue the following command to perform all required"
|
||||
elog "migrations:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog "PLEASE NOTE: It's HIGHLY recommended to backup your database"
|
||||
elog "before running the config phase. Run these commands (as root):"
|
||||
elog
|
||||
elog " cd /opt/gitlab"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production"
|
||||
elog
|
||||
elog "If this was a fresh install, follow these steps:"
|
||||
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 initialize the environment:"
|
||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
||||
elog " Note: Do not forget to start Redis server first!"
|
||||
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
|
||||
elog
|
||||
elog "If you want to make sure that the install/upgrade was successful, start"
|
||||
elog "Gitlab now and then run these commands (as root):"
|
||||
elog
|
||||
elog " cd /opt/gitlab"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production"
|
||||
elog " sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production"
|
||||
elog
|
||||
}
|
||||
|
||||
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 $@"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
|
@ -207,8 +207,8 @@ all_ruby_install() {
|
|||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.init
|
||||
local rcscript=gitlab-sidekiq.init
|
||||
use unicorn && rcscript=gitlab-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
|
@ -53,7 +53,7 @@ CDEPEND="
|
|||
DEPEND="${GEMS_DEPEND}
|
||||
>=dev-vcs/gitlab-shell-2.6.10
|
||||
dev-vcs/git
|
||||
>=dev-vcs/gitlab-workhorse-0.6.4
|
||||
>=dev-vcs/gitlab-workhorse-0.6.5
|
||||
kerberos? ( !app-crypt/heimdal )
|
||||
rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )"
|
||||
RDEPEND="${DEPEND}
|
||||
|
@ -211,8 +211,8 @@ all_ruby_install() {
|
|||
systemd_dounit "${FILESDIR}/gitlab-mailroom.service"
|
||||
systemd_dotmpfilesd "${FILESDIR}/gitlab.conf"
|
||||
else
|
||||
local rcscript=gitlab-sidekiq-8.2.init
|
||||
use unicorn && rcscript=gitlab-unicorn-8.2.init
|
||||
local rcscript=gitlab-sidekiq.init
|
||||
use unicorn && rcscript=gitlab-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
AUX gitlab-ci-unicorn.init 1700 SHA256 ad75c1774db69d2ceae61983ba7227bb840c761d69eb387eaba120553fcd038a SHA512 fc2005db1523777f96867a3983efcb256ee8a3f62146dfc58af5536c0c869d665870b2f6710fe1d2f014fcb921ec3c79066b67b0189a6b525a7aea7f1afff78a WHIRLPOOL c80e72eb0c8f14c56662f91f2f1b51d1bbc83d956dcd3915c354e95ca5c1231c575b1fec91398c345fa71af61efe654e78f85e9d75be3b5624e65021e7102c28
|
||||
DIST gitlab-ci-7.14.3.tar.gz 1103513 SHA256 89731e2338b08a811472e0e1b64966789021e1c88f880fea9c38e90cc807651b SHA512 74c96c36d892f88f204466e99020dcf1438605bf85714484cdac442b04e6590cd79af2e97c1f738a2c2d32f81e1007d5563e6a32f2f165c6f42e76f4f53da479 WHIRLPOOL 37f13ccfae347d3e67b8de2ebacedcd5ca18edc5149326dbc5a512d3f3531df6b4b87a8430fdfe7280ded1ea694da4898504786a1b157f967214cf52ca72a58b
|
||||
DIST gitlab-ci-8.0.2.tar.gz 1110587 SHA256 002b0df9c1adf8958626e86d965035c7cba33e2e0d9503f624c75f70d31aa306 SHA512 e32245e3ff54ed9b22d43e1164e0f5b289458c27f6993937ae7c30c9a22ba59d587925723822428e8a692cbd5c7542269fdc6db4d0906ab8a319975311fd2b25 WHIRLPOOL f0528f67d4fbe41449c41726d0f3c2bf7d26a2f218ddeb4eaa94f0845854d8684e0a74e63b1c6b65ccc1aeed5dc8e611e48d626329b4eec5ce02289ac16f8a2e
|
||||
DIST gitlab-ci-8.0.3.tar.gz 1110721 SHA256 c5a6735462f180e89a18d2561a0754f3ee127c593768fad288f44482b8bd2b0c SHA512 c0fcaae82a36cd0f8b07c01ecd4bc2a7d1b0d736e34015b39260c56293465b356997f419d2c9c2636c8930898486da0036aadeb156d54232ead945fae2051754 WHIRLPOOL 81a7dcb223f2613472df242bf062ce22d24259eb5cc26c9c21c5d0e0f6d7b79cdf9948d2aa70b7253937f2c76406ee5a01d227491ae453e8061c9cf3ce8f48b0
|
||||
EBUILD gitlab-ci-7.14.3.ebuild 8510 SHA256 c70557e10963ec5b951745c0a815194c45711494f8b8175a1d7dd2191c8f4231 SHA512 fcc78ef97bec6d08dbebfbd7124ba8f8f16044ed672f715b9f044efe09edad1c8f71130dac9a4995ccf0f988ac1258c1fd65ee313e3b602a040201055293b7da WHIRLPOOL e7da5d9019d79f5f6ece60c0778a33cf5ae3d90550c2275731ce3e4ea7e9e65e4257d82d414e5f07f1aedd862149f53fec9a73c638bf00da03ea8f6cf6bb8b51
|
||||
EBUILD gitlab-ci-8.0.2.ebuild 8511 SHA256 533e1a195671902884d95e3a115387200af73e5f4d991fde110405270328b067 SHA512 e3c677c410c0910be10068a66de686fad50d044fe15227611b81aed96e30ea12c2985d36b4848ab9decce4ff44f561a05969ed05fc24bf627dae235a4ce41215 WHIRLPOOL 1a5962ae2a05309bd73b539abb5e84ff300a69be457b15d85c559d0ae49533d5e85e24e4ba542c09d2fa044f367ded74fc8bdf5df69228cf9cffafee79c89419
|
||||
EBUILD gitlab-ci-8.0.3.ebuild 8511 SHA256 533e1a195671902884d95e3a115387200af73e5f4d991fde110405270328b067 SHA512 e3c677c410c0910be10068a66de686fad50d044fe15227611b81aed96e30ea12c2985d36b4848ab9decce4ff44f561a05969ed05fc24bf627dae235a4ce41215 WHIRLPOOL 1a5962ae2a05309bd73b539abb5e84ff300a69be457b15d85c559d0ae49533d5e85e24e4ba542c09d2fa044f367ded74fc8bdf5df69228cf9cffafee79c89419
|
||||
MISC metadata.xml 234 SHA256 f35b97f99a26d73cc441e1d93bfe25aaa4e9f7f6d90c8d05a74f7b7bc5b68472 SHA512 59d8156b3ca3e99c40d5a2a32de7edf2eb53279b2424998862589d6bad77617d23fc852afec0a92f8ac5bb54a88ebc504cc0641029c1936412e90ab03dfdd447 WHIRLPOOL 935a1401910a42f888c991e443a49275ea8b87976c5aa977f670053d97d18754231749749bc92d37d4b5f45ecf65914480942a11b5827b6c08fb24313a428431
|
|
@ -1,68 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
name="GitLab CI"
|
||||
description="GitLab CI on Unicorns"
|
||||
|
||||
: ${gitlab_ci_user:=@USER@}
|
||||
: ${gitlab_ci_base:="@GITLAB_CI_BASE@"}
|
||||
: ${rails_env:=production}
|
||||
|
||||
: ${server_pidfile:="@RUN_DIR@/unicorn.pid"}
|
||||
|
||||
: ${sidekiq_pidfile:="@RUN_DIR@/sidekiq.pid"}
|
||||
: ${sidekiq_logfile:="@LOGS_DIR@/sidekiq.log"}
|
||||
: ${sidekiq_queues:="@QUEUES@"}
|
||||
|
||||
server_command="/usr/bin/bundle"
|
||||
server_command_args="exec unicorn_rails -c ${gitlab_ci_base}/config/unicorn.rb -E ${rails_env} -D"
|
||||
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_command_args="exec sidekiq -q ${sidekiq_queues} -P ${sidekiq_pidfile} -L ${sidekiq_logfile}"
|
||||
|
||||
depend() {
|
||||
provide gitlab-ci
|
||||
need redis
|
||||
use net
|
||||
after bootmisc
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${name} - Unicorn servers"
|
||||
|
||||
checkpath -d -o ${gitlab_ci_user} -m755 "$(dirname "${server_pidfile}")"
|
||||
checkpath -d -o ${gitlab_ci_user} -m755 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_ci_base}" \
|
||||
--user=${gitlab_ci_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_ci_base}" \
|
||||
--user=${gitlab_ci_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 $?
|
||||
}
|
|
@ -1,308 +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
|
||||
|
||||
DESCRIPTION="GitLab CI is a continuous integration server tightly integrated with GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-ci/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="mysql +postgres"
|
||||
|
||||
## Gems dependencies:
|
||||
# charlock_holmes dev-libs/icu
|
||||
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
|
||||
# pg dev-db/postgresql
|
||||
# mysql virtual/mysql
|
||||
#
|
||||
|
||||
GEMS_DEPEND="
|
||||
dev-libs/icu
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
postgres? ( >=dev-db/postgresql-9.1:* )
|
||||
mysql? ( virtual/mysql )"
|
||||
DEPEND="${GEMS_DEPEND}
|
||||
dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-db/redis
|
||||
virtual/mta"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
# no patches needed so far ...
|
||||
#RUBY_PATCHES=(
|
||||
#)
|
||||
|
||||
MY_NAME="gitlab-ci"
|
||||
MY_USER="gitlab_ci"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
CONF_DIR="/etc/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
# When updating ebuild to newer version, check list of the queues in
|
||||
# https://gitlab.com/gitlab-org/gitlab-ci/blob/v${PV}/script/background_jobs
|
||||
SIDEKIQ_QUEUES="runner,common,default"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup gitlab_ci
|
||||
enewuser gitlab_ci -1 /bin/bash ${DEST_DIR} "gitlab_ci,cron,redis"
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|redis://redis.example.com:6379|unix:/run/redis/redis.sock|" \
|
||||
config/resque.yml.example || die "failed to filter resque.yml.example"
|
||||
sed -i -E \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/tmp/(pids\|sockets)|${RUN_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/log|${LOGS_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci|${DEST_DIR}|" \
|
||||
config/unicorn.rb.example || die "failed to filter unicorn.rb.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/tmp/sockets|${RUN_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/public|${DEST_DIR}/public|" \
|
||||
lib/support/nginx/gitlab_ci || die "failed to filter nginx/gitlab_ci"
|
||||
|
||||
# modify default database settings for PostgreSQL
|
||||
sed -i -E \
|
||||
-e 's|(username:).*|\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"
|
||||
# modify default database settings for MySQL
|
||||
sed -i -E \
|
||||
-e "s|/tmp/mysql.sock|/run/mysqld/mysqld.sock|" \
|
||||
config/database.yml.mysql || die "failed to filter database.yml.mysql"
|
||||
|
||||
# rename config files
|
||||
mv config/application.yml.example config/application.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/init.d
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf=${CONF_DIR}
|
||||
local logs=${LOGS_DIR}
|
||||
local temp=${TEMP_DIR}
|
||||
local runs=${RUN_DIR}
|
||||
|
||||
# prepare directories
|
||||
diropts -m750
|
||||
dodir ${logs} ${temp}
|
||||
|
||||
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; do
|
||||
without+="$(use $flag || echo ' '$flag)"
|
||||
done
|
||||
local bundle_args="--deployment ${without:+--without ${without}}"
|
||||
|
||||
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
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
|
||||
fowners ${MY_USER}:${MY_USER} ${conf}/database.yml
|
||||
fperms 640 ${conf}/database.yml
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript=gitlab-ci-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
-e "s|@GITLAB_CI_BASE@|${dest}|" \
|
||||
-e "s|@LOGS_DIR@|${logs}|" \
|
||||
-e "s|@RUN_DIR@|${runs}|" \
|
||||
-e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "1. Configure your GitLab CI's settings in ${CONF_DIR}/application.yml."
|
||||
elog
|
||||
elog "2. Configure your database settings in ${CONF_DIR}/database.yml"
|
||||
elog " for \"production\" environment."
|
||||
elog
|
||||
elog "3. Adjust the webserver settings in ${CONF_DIR}/unicorn.rb"
|
||||
elog
|
||||
elog "4. Then you should create a database for your GitLab CI 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_ci PASSWORD 'gitlab_ci' \\"
|
||||
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
|
||||
elog " createdb -E UTF-8 -O gitlab_ci gitlab_ci_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!"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
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
|
||||
|
||||
local email_from="$(ryaml ${CONF_DIR}/application.yml production gitlab_ci email_from)"
|
||||
local gitlab_ci_home="$(egethome ${MY_USER})"
|
||||
|
||||
# configure Git global settings
|
||||
if [ ! -e "${gitlab_ci_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 CI'" \
|
||||
|| 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
|
||||
|
||||
else
|
||||
local update=false
|
||||
|
||||
einfo "Initializing database ..."
|
||||
exec_rake setup
|
||||
|
||||
einfo "Setting up cron schedules ..."
|
||||
exec_rake whenever -w
|
||||
fi
|
||||
|
||||
if [ "${update}" = 'true' ]; then
|
||||
ewarn
|
||||
ewarn "This configuration script runs only common migration tasks."
|
||||
ewarn "Please read guides on"
|
||||
ewarn " https://gitlab.com/gitlab-org/gitlab-ci/tree/v${PV}/doc/update"
|
||||
ewarn "for any additional migration tasks specific to your previous GitLab CI"
|
||||
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 $@"
|
||||
}
|
|
@ -1,308 +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
|
||||
|
||||
DESCRIPTION="GitLab CI is a continuous integration server tightly integrated with GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-ci/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="mysql +postgres"
|
||||
|
||||
## Gems dependencies:
|
||||
# charlock_holmes dev-libs/icu
|
||||
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
|
||||
# pg dev-db/postgresql
|
||||
# mysql virtual/mysql
|
||||
#
|
||||
|
||||
GEMS_DEPEND="
|
||||
dev-libs/icu
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
postgres? ( >=dev-db/postgresql-9.1:* )
|
||||
mysql? ( virtual/mysql )"
|
||||
DEPEND="${GEMS_DEPEND}
|
||||
dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-db/redis
|
||||
virtual/mta"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
# no patches needed so far ...
|
||||
#RUBY_PATCHES=(
|
||||
#)
|
||||
|
||||
MY_NAME="gitlab-ci"
|
||||
MY_USER="gitlab_ci"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
CONF_DIR="/etc/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
# When updating ebuild to newer version, check list of the queues in
|
||||
# https://gitlab.com/gitlab-org/gitlab-ci/blob/v${PV}/script/background_jobs
|
||||
SIDEKIQ_QUEUES="runner,common,default"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup gitlab_ci
|
||||
enewuser gitlab_ci -1 /bin/bash ${DEST_DIR} "gitlab_ci,cron,redis"
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|redis://redis.example.com:6379|unix:/run/redis/redis.sock|" \
|
||||
config/resque.yml.example || die "failed to filter resque.yml.example"
|
||||
sed -i -E \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/tmp/(pids\|sockets)|${RUN_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/log|${LOGS_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci|${DEST_DIR}|" \
|
||||
config/unicorn.rb.example || die "failed to filter unicorn.rb.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/tmp/sockets|${RUN_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/public|${DEST_DIR}/public|" \
|
||||
lib/support/nginx/gitlab_ci || die "failed to filter nginx/gitlab_ci"
|
||||
|
||||
# modify default database settings for PostgreSQL
|
||||
sed -i -E \
|
||||
-e 's|(username:).*|\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"
|
||||
# modify default database settings for MySQL
|
||||
sed -i -E \
|
||||
-e "s|/tmp/mysql.sock|/run/mysqld/mysqld.sock|" \
|
||||
config/database.yml.mysql || die "failed to filter database.yml.mysql"
|
||||
|
||||
# rename config files
|
||||
mv config/application.yml.example config/application.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/init.d
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf=${CONF_DIR}
|
||||
local logs=${LOGS_DIR}
|
||||
local temp=${TEMP_DIR}
|
||||
local runs=${RUN_DIR}
|
||||
|
||||
# prepare directories
|
||||
diropts -m750
|
||||
dodir ${logs} ${temp}
|
||||
|
||||
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; do
|
||||
without+="$(use $flag || echo ' '$flag)"
|
||||
done
|
||||
local bundle_args="--deployment ${without:+--without ${without}}"
|
||||
|
||||
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
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
|
||||
fowners ${MY_USER}:${MY_USER} ${conf}/database.yml
|
||||
fperms 640 ${conf}/database.yml
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript=gitlab-ci-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
-e "s|@GITLAB_CI_BASE@|${dest}|" \
|
||||
-e "s|@LOGS_DIR@|${logs}|" \
|
||||
-e "s|@RUN_DIR@|${runs}|" \
|
||||
-e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "1. Configure your GitLab CI's settings in ${CONF_DIR}/application.yml."
|
||||
elog
|
||||
elog "2. Configure your database settings in ${CONF_DIR}/database.yml"
|
||||
elog " for \"production\" environment."
|
||||
elog
|
||||
elog "3. Adjust the webserver settings in ${CONF_DIR}/unicorn.rb"
|
||||
elog
|
||||
elog "4. Then you should create a database for your GitLab CI 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_ci PASSWORD 'gitlab_ci' \\"
|
||||
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
|
||||
elog " createdb -E UTF-8 -O gitlab_ci gitlab_ci_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!"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
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
|
||||
|
||||
local email_from="$(ryaml ${CONF_DIR}/application.yml production gitlab_ci email_from)"
|
||||
local gitlab_ci_home="$(egethome ${MY_USER})"
|
||||
|
||||
# configure Git global settings
|
||||
if [ ! -e "${gitlab_ci_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 CI'" \
|
||||
|| 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
|
||||
|
||||
else
|
||||
local update=false
|
||||
|
||||
einfo "Initializing database ..."
|
||||
exec_rake setup
|
||||
|
||||
einfo "Setting up cron schedules ..."
|
||||
exec_rake whenever -w
|
||||
fi
|
||||
|
||||
if [ "${update}" = 'true' ]; then
|
||||
ewarn
|
||||
ewarn "This configuration script runs only common migration tasks."
|
||||
ewarn "Please read guides on"
|
||||
ewarn " https://gitlab.com/gitlab-org/gitlab-ci/tree/v${PV}/doc/update"
|
||||
ewarn "for any additional migration tasks specific to your previous GitLab CI"
|
||||
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 $@"
|
||||
}
|
|
@ -1,308 +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
|
||||
|
||||
DESCRIPTION="GitLab CI is a continuous integration server tightly integrated with GitLab"
|
||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-ci"
|
||||
SRC_URI="https://github.com/gitlabhq/gitlab-ci/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="mysql +postgres"
|
||||
|
||||
## Gems dependencies:
|
||||
# charlock_holmes dev-libs/icu
|
||||
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
|
||||
# pg dev-db/postgresql
|
||||
# mysql virtual/mysql
|
||||
#
|
||||
|
||||
GEMS_DEPEND="
|
||||
dev-libs/icu
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
postgres? ( >=dev-db/postgresql-9.1:* )
|
||||
mysql? ( virtual/mysql )"
|
||||
DEPEND="${GEMS_DEPEND}
|
||||
dev-vcs/git"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-db/redis
|
||||
virtual/mta"
|
||||
ruby_add_bdepend "
|
||||
virtual/rubygems
|
||||
>=dev-ruby/bundler-1.0"
|
||||
|
||||
# no patches needed so far ...
|
||||
#RUBY_PATCHES=(
|
||||
#)
|
||||
|
||||
MY_NAME="gitlab-ci"
|
||||
MY_USER="gitlab_ci"
|
||||
|
||||
DEST_DIR="/opt/${MY_NAME}"
|
||||
CONF_DIR="/etc/${MY_NAME}"
|
||||
LOGS_DIR="/var/log/${MY_NAME}"
|
||||
TEMP_DIR="/var/tmp/${MY_NAME}"
|
||||
RUN_DIR="/run/${MY_NAME}"
|
||||
|
||||
# When updating ebuild to newer version, check list of the queues in
|
||||
# https://gitlab.com/gitlab-org/gitlab-ci/blob/v${PV}/script/background_jobs
|
||||
SIDEKIQ_QUEUES="runner,common,default"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup gitlab_ci
|
||||
enewuser gitlab_ci -1 /bin/bash ${DEST_DIR} "gitlab_ci,cron,redis"
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
|
||||
# fix paths
|
||||
sed -i -E \
|
||||
-e "s|redis://redis.example.com:6379|unix:/run/redis/redis.sock|" \
|
||||
config/resque.yml.example || die "failed to filter resque.yml.example"
|
||||
sed -i -E \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/tmp/(pids\|sockets)|${RUN_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/log|${LOGS_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci|${DEST_DIR}|" \
|
||||
config/unicorn.rb.example || die "failed to filter unicorn.rb.example"
|
||||
|
||||
sed -i \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/tmp/sockets|${RUN_DIR}|" \
|
||||
-e "s|/home/gitlab_ci/gitlab-ci/public|${DEST_DIR}/public|" \
|
||||
lib/support/nginx/gitlab_ci || die "failed to filter nginx/gitlab_ci"
|
||||
|
||||
# modify default database settings for PostgreSQL
|
||||
sed -i -E \
|
||||
-e 's|(username:).*|\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"
|
||||
# modify default database settings for MySQL
|
||||
sed -i -E \
|
||||
-e "s|/tmp/mysql.sock|/run/mysqld/mysqld.sock|" \
|
||||
config/database.yml.mysql || die "failed to filter database.yml.mysql"
|
||||
|
||||
# rename config files
|
||||
mv config/application.yml.example config/application.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/init.d
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
local dest=${DEST_DIR}
|
||||
local conf=${CONF_DIR}
|
||||
local logs=${LOGS_DIR}
|
||||
local temp=${TEMP_DIR}
|
||||
local runs=${RUN_DIR}
|
||||
|
||||
# prepare directories
|
||||
diropts -m750
|
||||
dodir ${logs} ${temp}
|
||||
|
||||
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; do
|
||||
without+="$(use $flag || echo ' '$flag)"
|
||||
done
|
||||
local bundle_args="--deployment ${without:+--without ${without}}"
|
||||
|
||||
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
|
||||
|
||||
# fix permissions
|
||||
fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs}
|
||||
fowners ${MY_USER}:${MY_USER} ${conf}/database.yml
|
||||
fperms 640 ${conf}/database.yml
|
||||
|
||||
## RC script ##
|
||||
|
||||
local rcscript=gitlab-ci-unicorn.init
|
||||
|
||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
||||
sed -i \
|
||||
-e "s|@USER@|${MY_USER}|" \
|
||||
-e "s|@GITLAB_CI_BASE@|${dest}|" \
|
||||
-e "s|@LOGS_DIR@|${logs}|" \
|
||||
-e "s|@RUN_DIR@|${runs}|" \
|
||||
-e "s|@QUEUES@|${SIDEKIQ_QUEUES}|" \
|
||||
"${T}/${rcscript}" \
|
||||
|| die "failed to filter ${rcscript}"
|
||||
|
||||
newinitd "${T}/${rcscript}" "${MY_NAME}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "1. Configure your GitLab CI's settings in ${CONF_DIR}/application.yml."
|
||||
elog
|
||||
elog "2. Configure your database settings in ${CONF_DIR}/database.yml"
|
||||
elog " for \"production\" environment."
|
||||
elog
|
||||
elog "3. Adjust the webserver settings in ${CONF_DIR}/unicorn.rb"
|
||||
elog
|
||||
elog "4. Then you should create a database for your GitLab CI 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_ci PASSWORD 'gitlab_ci' \\"
|
||||
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
|
||||
elog " createdb -E UTF-8 -O gitlab_ci gitlab_ci_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!"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
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
|
||||
|
||||
local email_from="$(ryaml ${CONF_DIR}/application.yml production gitlab_ci email_from)"
|
||||
local gitlab_ci_home="$(egethome ${MY_USER})"
|
||||
|
||||
# configure Git global settings
|
||||
if [ ! -e "${gitlab_ci_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 CI'" \
|
||||
|| 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
|
||||
|
||||
else
|
||||
local update=false
|
||||
|
||||
einfo "Initializing database ..."
|
||||
exec_rake setup
|
||||
|
||||
einfo "Setting up cron schedules ..."
|
||||
exec_rake whenever -w
|
||||
fi
|
||||
|
||||
if [ "${update}" = 'true' ]; then
|
||||
ewarn
|
||||
ewarn "This configuration script runs only common migration tasks."
|
||||
ewarn "Please read guides on"
|
||||
ewarn " https://gitlab.com/gitlab-org/gitlab-ci/tree/v${PV}/doc/update"
|
||||
ewarn "for any additional migration tasks specific to your previous GitLab CI"
|
||||
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 $@"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer>
|
||||
<email>manuel@fritteli.ch</email>
|
||||
<name>Manuel Friedli</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
Loading…
Reference in a new issue