diff --git a/www-apps/gitlab-ce/ChangeLog b/www-apps/gitlab-ce/ChangeLog index b232bd1..4ecb9d0 100644 --- a/www-apps/gitlab-ce/ChangeLog +++ b/www-apps/gitlab-ce/ChangeLog @@ -1,3 +1,22 @@ +*gitlab-ce-9.0.0 (28 Mar 2017) + + 28 Mar 2017; Manuel Friedli +gitlab-ce-9.0.0.ebuild: + www-apps/gitlab-ce: Added ebuild for Gitlab CE 9.0.0, dropping the ~arm + keyword due to the dependency to yarn, which is not available on unstable arm. + + 19 Mar 2017; Manuel Friedli gitlab-ce-9.0.0_rc4.ebuild, + gitlab-ce-9999.ebuild: + www-apps/gitlab-ce: Updated ebuild for gitlab-ce-9999 and also cleaned + dependencies for gitlab-9.0.0_rc4 + +*gitlab-ce-9.0.0_rc4 (19 Mar 2017) + + 19 Mar 2017; Manuel Friedli + +files/02-gitlab-ce-9.0.0-fix-redis-config-path.patch, + +files/05-gitlab-ce-9.0.0-replace-sys-filesystem.patch, + +gitlab-ce-9.0.0_rc4.ebuild, -gitlab-ce-8.17.0_rc3.ebuild: + www-apps/gitlab-ce: Added ebuild for Gitlab CE 9.0.0 RC4 + *gitlab-ce-8.15.8 (21 Mar 2017) *gitlab-ce-8.16.8 (21 Mar 2017) *gitlab-ce-8.17.4 (21 Mar 2017) diff --git a/www-apps/gitlab-ce/Manifest b/www-apps/gitlab-ce/Manifest index c0045d9..ad2f9bc 100644 --- a/www-apps/gitlab-ce/Manifest +++ b/www-apps/gitlab-ce/Manifest @@ -1,10 +1,12 @@ AUX 01-gitlab-ce-8.7.5-fix-sendmail-config.patch 705 SHA256 cfc4ffd896e03cc763601aca5cdd5ac43f85152705cbf5a4e9144a6156d6f77e SHA512 a92659db8cab022185d87f321b037b1731612bf5f89b9df4552dd49b843bb49b6019f8ddda96a6fd6cb6544664a1c3d52ca5fee2c11be8b33698cc713219510f WHIRLPOOL 81a6504a8583bc46ea4005d9f8a2113802439161c40f11d3da46332b8980fc6b9520d81d9e32a6555bcdc893245448ba9151a271c511ae87f6468f588d4804b0 AUX 02-gitlab-ce-8.11.0-fix-redis-config-path.patch 423 SHA256 4878d37082c7e5c0aba239d4432ddec23c083230b816cf1ed6792bfd8f6c56fa SHA512 81a543af308bcd11a93a73368aedc89604078f60c0cacf4f614ff18dc5975b2c0d030ad6565fbb134188c8f6fceb74f2767f706d6f5701092252513f5e18de11 WHIRLPOOL 81f6258f03d234c6298b7bfe2982bdfd5f86dea3405ce03d4391b484a4802f7cbe33606ce4561ca67c16a5826dec131a185fa3189c2115b4a9ec8a3b87a2ee16 +AUX 02-gitlab-ce-9.0.0-fix-redis-config-path.patch 423 SHA256 9de3711c1f06a0561001166f2a44b4c1dc5fa3fa57a5230eb1dcc2b5d394449c SHA512 ae89fa3c6fde777e844e777862415450787ebf83653435cea329d66810c5805d2126d41cb1ce40b15c42371543bc182a59305b8b1b6a7433121340a625300370 WHIRLPOOL d97962907bb1fc610ebc52665a6ce51f40ee932e7ac715279f3c0554f2880a7b220ecbac2c4c97bd4d3dac22b9a025aa729805221ed5e6d15f04f6cd8e210d22 AUX 03-gitlab-ce-8.14.0-database.yml.patch 2172 SHA256 8435bf632aab03057342d5d6d75f016b006da00157c0cce2661416b752f8b75d SHA512 048aa5877ef30e702727b917cf7fb6bd534c497a7c24ab55640635598af293b0567bb9f356c4b91d55291341ced50847909f117f46d3fc9962c2f7a0f7b6bfb9 WHIRLPOOL 87b62f5e326211c2ff9001742a04b71bd94b21f4851778a513f7e1981da193dc16718559be42a0ba21aaa0c2f5b65a2571bc20174c063aa13e6436f0b422f057 AUX 03-gitlab-ce-8.17.0-database.yml.patch 2238 SHA256 c5ec9e8a11fb60a7749b9f8cf553949e78aacf9a8233b39c4986980851196c8e SHA512 1668e2c1d00ef485d2bc5af8d343c9be19f291a627d0041d42b268ec1ad8aedecba99336998e6b1b3ac2f4cd617556d17ab5f1f11f95d696205e3d10d6b74e1c WHIRLPOOL c91a6604f050113c9f584d7bf34ebe660263beb88879382873952d6b1b136ad5b576b813bf9f2f66ee49d6656fb1d24437dca395c2574bd7dab07cd1a3a36a99 AUX 04-gitlab-ce-8.12.7-fix-check-task.patch 917 SHA256 e1adffbd59a418d5e14cbd51ae14d5c1f0364af759c77b6cb485079e0233e90f SHA512 226c3892768dc526dbc9f109aaecdee1eb27c0acb5060ba6db8222410c500336ebcf7184437228480da04ce5de149a14bbb5c1471aed853a280d7f371f271d88 WHIRLPOOL 3ec22dc4d12b5025bddfccdea27a816aca1f818d5138b3dc9a6362e56ec4cd14e5c38c76b64b468f3797e0d2718d38aad4f910abf3f3328a7983832babb7f231 AUX 05-gitlab-ce-8.12.7-replace-sys-filesystem.patch 2387 SHA256 dd0e9987ed4bb3a9c73c6aee1d89434afc51ff663fef2ee4ac93adf1b73b944a SHA512 afa82fb8c8d57633c99373f31678760fa6ecca5e459a9059f5b460b458d1dbf3230108a6b4f394780c26a697881c9b2319f15804cb8d04ad3139127e7c0f4ff8 WHIRLPOOL 90ce708f8cde0a4bcaef9fc002ca00b97a1211559bcabf5481ec71c608bc5b772ecd518ff07a8d626a27e4b21c0f0f51fa37a65503e79664ececd78d5f19e87b AUX 05-gitlab-ce-8.16.0-replace-sys-filesystem.patch 2379 SHA256 cf5e0ea55c99996744422312a46914a8e54b6ab68ac5e67abda444e1170bcd4b SHA512 eb5ea3a9f040c3df64bd8ebb20ed873fb6af17322867c0f5714e3d9ad5ac26b79e9ffaaa4720617513123b651ceccedeb992b64c87b9b945338614c9eeec1468 WHIRLPOOL 2591c1d439447f3e08fe413ab8127b9945f8e4813480093af1da796675903bbb2b8a2205bd1480d383402ef861c348cfa0bd45305e7c1fa20458bfd6b6b327a5 +AUX 05-gitlab-ce-9.0.0-replace-sys-filesystem.patch 2436 SHA256 53fcd9fc123a0fcb671a8cbcb3b2dc61765e32be6836206ae0edea8cf0ae8203 SHA512 21636f298df7e762f59595f39fb50266f8737311f37aa2b9ba96bc29190b8a67eea01b09e3b589d0885da6b27beaa136fa66c7d98408a8e3ecb3ac6baf20d891 WHIRLPOOL e0c709dfc5f72e33207fd7d62a7db5a85c0ed4b6064d5d6a13bcce7d660d9ba144fe09d0985c16c313f06a4e02911729be132086735eac47ddff981874f31acc AUX 06-gitlab-ce-8.17.0-fix-webpack-config.patch 614 SHA256 0c1cdc25032322eff6c279435ba5f3fc349b30de0d55d86fad2616bd2bb7fef4 SHA512 f5ccb4d1849ab395ba4ec3c80735a1fedd9fa7f790c8b114d8dc8d1fc2c431d7b9e5645247485f0b8c1061a00ed61c21a5e50f49af0d76e232182c68868a163f WHIRLPOOL 6968ddefed74607c36cc66dc133dbf4942979d2ae867f819cf2e7e5c9701fe8dd86b266d923e6343971e6904f0ad1f35200971660df139edabcc9e0790fc107c AUX gitlab-8.13.0-sidekiq.service 990 SHA256 183ccbdb19a3dcc74cf1f1f865bf396466e06f7408ff7d3e92359b2a0e83f24c SHA512 c356baf65337739b08a0a4bfe24d3b68f557e9d6d95f479b39ec954ee6c2077e380f99d1e9e9390f5b038e093c0a46562f651512a6578dfa86977580159470a2 WHIRLPOOL 81d9ea9febf47d5fdb9c49a54bbc499bd796fc56bc1c16404fe4c74d00c4bb9fa9631e4cd4cf88d3c30a44c04b74b35a61cd4da9f2139a4abf61e758b4e5949a AUX gitlab-8.13.3-sidekiq.init 1459 SHA256 fdf808f9c0a92d7a77ae8be27c8fc11cec571ec6b5b94e31639028eec19546f1 SHA512 ec2130483b603f2be423c288fd0d55615c831ce995a8a5509f0240f149b3464d8f0a75cade1c736d085fb5f898d109368af62d8fdfb280aa00c4df8c06abb1e9 WHIRLPOOL d3493ac268257386e22c677337c8f9b1050212fce4aa855119b2ccd5f56850a5288d0cdd74e3c2f34552f59f9431c9ab5080e372766b88de003cad5dab015100 @@ -15,12 +17,14 @@ AUX gitlab-workhorse.service 930 SHA256 09348a52fec333b4b19828752e0484400c1efa9d AUX gitlab.conf 27 SHA256 cd9be088bbb67a5400407fc6f63c061eb224f16748b7d0812ff2c101f43ca263 SHA512 909c49fee6d050c1e94b2559ff2a9d54c5c346492be0e2920b50d56d69eaddbed67e3ac12e012d2a9601b5596640ebf33c8dc68fc588a03ca370d963294be37f WHIRLPOOL fa436e8d7d2643d450259d26b6e7b24dae69df47ed22e5ef2a567f37aa785fbf3b0eb1129ae7c8bf8986c29559fc3b744a34064375e5245dce2b10053cd715d9 DIST gitlab-ce-8.15.8.tar.gz 20035995 SHA256 9fafd6478a6d165ab6acd6f89f169fe72d46df547efe1bf3ac8d3a5bc4ffec11 SHA512 db287ea59d94eacd3c1219f458a403239f7aa39bea0d5e82fac80afc7216b96ac394740ab717c3ed26068617e1234105144820e41b0825511e1adc29e8891bfb WHIRLPOOL b03faf4b30b5c82535c0e148edec7fb5ff26405cfa8587b4bd287e834bb5f3eb6ddabd0b5f1472672b4108bdcb6066d63eb1a117e35fedf2c94d63348186afd6 DIST gitlab-ce-8.16.8.tar.gz 20907499 SHA256 b6ca6aebb5facb7b0bf792ac36fa6643098ddcbfd5364bf966311b48a2a0e68e SHA512 a5b77e39133078bc98a5c2d0b463e31c99eaaa44c28c70921546a8dfd45e24ff64bc310f8d067c40b609c3b19d13761afbc6068866e00297cb14b0e343b1a00c WHIRLPOOL 150c5b396703007e3b91f73407f5558045dcf4be74c2a12850e65bb7b5280582a8907312f5c09febb17649f98dbe40dd18968e69ef66d6026d3f69b79e6515c0 -DIST gitlab-ce-8.17.0_rc3.tar.gz 23031572 SHA256 13ac75ce0737e9e9f46fea59828a0a71f3ad9fc4436859bc68938d4719190ba9 SHA512 c5998f7aeefd65ea46ee6357f15bc6e60253742f6007252bf9a1543f29f8973951f8d0f8d60dba87b08dbf5256427e9bf28198274a9dadb92b30b7f5adc76cd1 WHIRLPOOL 86380fedcacbd18f13b12f4792b506421726c4226512471eeeda8d085abc89e6b43f54b0301e0cbdb1f3afe6dade84452690576435220c0afc559bcd5f341df3 DIST gitlab-ce-8.17.4.tar.gz 22825573 SHA256 daa0d5d75295a896f7aa230bd965e12e8525a52c96ec0456ee405d083180e091 SHA512 4d9244c2575e8c4e26515ef55e478b459b24f3d53426a8d2e7cd253a879c9ae2a770e92e0e4a74cc88242b5b3ec81f6081c789426553ee9c8ff161abd138fb45 WHIRLPOOL a3131dc319b4aaa98c81c2c5104672363f16fb393ee0f21e8be670c9df6788c383f5fba8459352a37b49467f42307a1be291eff5b9d550390df04d9004514986 +DIST gitlab-ce-9.0.0.tar.gz 26260333 SHA256 73012a8d31b2d92a49f0957c78525069e11d5d7bf19ca67bcbabd44b37c8c36a SHA512 b8a48bf538691d0bb1b636f4be6b71010583b4784093ec5f5b3196bebeefd9e7fcfc05cfd48523eb2139ff9e0bd458e20e8174d8c8892cb510d55c2fb154ee32 WHIRLPOOL 5d10e6fed7a9de5db7513afaf29940cadf41a37397249a78b2f3dc0aadde25f73e9f4eb3d18f913c8ad13cbdfecec811cf2246c2ef377017dfe3f021b09a2125 +DIST gitlab-ce-9.0.0_rc4.tar.gz 26270878 SHA256 f47ddcf6f4f0336228dd1ef03085c9ea6116157887e8216038d23b69cf7a4d89 SHA512 f4694ebf4ffe38e6c5495f3658eb8003d28b3ac5d67f4533ddc1932afca412a40ea786cd8d99e2891fdf9bacd7b198b29493b97d6d02455d4f4139d4e60a0d63 WHIRLPOOL 81f47820043445e9ff69ae0ad3bcd1e094ab1e3527eec279096ae16a767cec5451b2d94af4dd87cd2939eb2e64368a1a0e543ce40e0e9fd5a716eeef04741c54 EBUILD gitlab-ce-8.15.8.ebuild 11982 SHA256 755bfd6fa532a308d3f458db1456f8de4f2c5f599ab76c18653aad9e038d0697 SHA512 9aa439da7dc61687f1cdce5ff693dd1c8c4edc54aaed288ad0368aa1b64d577a7f3752dee149c200c4d98b43a6347c77251cac9f6d3316b5a6d799a17c3ed583 WHIRLPOOL 02393bfd983341632663096e8b293e3611ac5328a58a50a1c7e800e348e866f37aff53ebe447507a84d5966e019265fde94a30716f43b50228437e04abcd932c EBUILD gitlab-ce-8.16.8.ebuild 11982 SHA256 31537d4a6aeb9ff14ab14c9a27dca51a056e94ee75506ad855a1289f32468694 SHA512 01d536fcfb53a7b39943314a34eeeb9c5b5660604a2fb1a1c2dcd1d7e87d19ab0bbc5bc650feaa1db812047c3783a324d7c8a8bce7dd7381033c3d1ca2e64828 WHIRLPOOL 0f3402e30164ee6d5058c51554cc916d91d5975f438074e3193bf3bdb4e323bca4279c19f00cd7bacd01c2eb6cf13e41a0badabd958e9be58d319224f53403b0 -EBUILD gitlab-ce-8.17.0_rc3.ebuild 12258 SHA256 179da162a7ff3ab1fc9f3173aff30c59a73005622ccb0fe8ada57f950c9d0dd7 SHA512 b5f244a7a7ac980b1e1c1595b88613cf6f3649591a9430dac0db3a174432648b05707b0e3e79450f5882fb7044aca6bb3778a19566ad6c83c5fd30ee8c09893e WHIRLPOOL 49cfbbfedfcafecfa8a775bf0e3a8a9daa2fcce3a819ce92ab07ccaaa4b3881221cce5ebf4ec9333b9ed7a884717d037336dc644d359137e06fe5df3f51e9aaa EBUILD gitlab-ce-8.17.4.ebuild 12928 SHA256 f748d42058293ba4f593fbb36be34ecde332d896d04c610fd3b7e91288c18fbb SHA512 3c2736f9b7df066bb105faffef6ce2b6276fe60a686a7462c630a1b7c7c0296d94e33c7ea25a9f24aa814628f318e2430a3e5ca149783c86ef3fb1132dd01877 WHIRLPOOL cd629ba993df3eaef9c9ec1bf1649aa4cfea5f3787d2207a7016c092bff67175d79c6782d643d4c80b3b5971a98858feaa279a184abc4fd936c7e5c8b291dd28 -EBUILD gitlab-ce-9999.ebuild 12864 SHA256 ae1c00758e08c97414d3fea2ad636be6f01a6d61bac25dad441834316e48152e SHA512 7ee796c04f450733603569cbb7eb351ae145313dec19fbf333563eaad9721af4b03bedd5415471f40bcf42367cdc3eb0cfd6940da6e42284d6e7dae4baebb451 WHIRLPOOL fd1504cf829fdfefc341627f63d3c583304a0b9b7bcfa39b53452f02b13ce859ec3250f0d439711035ef46c7e8adf41c7414fa2a0bb5479fb71c17be8f1340eb -MISC ChangeLog 15411 SHA256 1b2edffef6bc05e7e4895bbcda069f39e95d6882530277761a955a85b37af4d7 SHA512 71b4a0b8e39e97f271e50c7cdc5c189fdcc1cfd0b7fc972ade2ef58b6785ba0371aab302bc729d0ee204537c4b711f34c401165cf699348951ce0539c6a5d457 WHIRLPOOL f6ddab4988e23a2168c9c824129022662a517e6a20c48c12ab754d123249a8e56007134ec02216b3cc580d4460130c2f649e971ec6c74f2754d38e862303b67b +EBUILD gitlab-ce-9.0.0.ebuild 12928 SHA256 55c3b39745547beac38b04d52b1c41caf2965179fa6d23cb0856f886fbe20431 SHA512 1557d9be66a033e1a9e94eb657342035f47f044cc4defd7eff35701554e47372794de5d7e1d1a94aa7ba7355990845ef8ac779aa449f06276ef52cafc9294d55 WHIRLPOOL e665021ba141205db52a8cf4be5a7f38c897967393a6f122fcbe93789008a991bfd2e6ced57873315434183898f21a5f13dc44a662e5cea309fd2f710895235b +EBUILD gitlab-ce-9.0.0_rc4.ebuild 12910 SHA256 8851160b4454845fb33ce0b9a9dd3e070bed07d3a0e5c5f753c77b0ef301ded0 SHA512 9d109a3ea8fa7a7bb33440b4b21bf988745c4eefb62b834ad88825f3ffa28881eceaf402ec09241b74d91e778258c1a18daae6c86254625af4f54bf6189b32f2 WHIRLPOOL 67aa480b4cf1209a3d7af3bffb1f7f774bf2c6d18bf40960478e13459813ebb9472adc5aec3b84252157b0c3e74f9e7f74cb0d57395983c02ba4c976ffae106f +EBUILD gitlab-ce-9999.ebuild 12869 SHA256 4a1e486e7386aa942bbd22c29457850584dab007b64715fc6f316ce5c98fcaf8 SHA512 ed66b809ca6e04956a9d4f5ef027aa9e174bad5cd80131a30fc34a1011f0221483b6fb52e893394b429d70919fc65496711a9c700c630c2ff31665827912df82 WHIRLPOOL b1b2582dcb1f600f199216c1bb532eac524ff3cce594e052039be29547164557997c65573f943c00240ab0986b0f1c1315602c3a65a0986e9f64a2df1827288e +MISC ChangeLog 16217 SHA256 0c9f7b191006123750250bbaa1ee8eed779e4074051fb4b5b29de3cb0c2ef5d2 SHA512 cd1b669ed6bb3c3cd6f44343481d09c2ad4d8df5ab0217676ff49408a46e3b20ff746af78dc647c374c4d5d88f876c2eceb7444f83269fa027a6c40ec7698c9d WHIRLPOOL 94c4744827a3dba8175139cd1d9566ed264619be9f601208b4dec39cf8f2f33a4bd36507263eac7efb2a454cd197bc7ee801090b5cdd423a4aaecf3ee0443579 MISC metadata.xml 665 SHA256 2a0cd67ad42f0cc6d8b88391cf6e3153a9883dab31aae8227c57c95f3f68890d SHA512 64b8fbae373d0a057f705f64c1d097dbfab893bd585e1db65ccdb06cda9569211c9b63fa168ac8de9f6d512a17759ecd20b54d818d2790a6f4c99d0ca73fddc3 WHIRLPOOL a81b21bb46aad9757a502628033eba546c686b83bbf1d651ecabba273c454cfb64574affc180db8358ced87eb638e8ad13d7c79c4cfb9a31e72c577d21ab433e diff --git a/www-apps/gitlab-ce/files/02-gitlab-ce-9.0.0-fix-redis-config-path.patch b/www-apps/gitlab-ce/files/02-gitlab-ce-9.0.0-fix-redis-config-path.patch new file mode 100644 index 0000000..65c7aaf --- /dev/null +++ b/www-apps/gitlab-ce/files/02-gitlab-ce-9.0.0-fix-redis-config-path.patch @@ -0,0 +1,12 @@ +diff --git a/config/mail_room.yml b/config/mail_room.yml +index 88d93d4..688d663 100644 +--- a/config/mail_room.yml ++++ b/config/mail_room.yml +@@ -1,6 +1,6 @@ + :mailboxes: + <% +- require_relative "../lib/gitlab/mail_room" unless defined?(Gitlab::MailRoom) ++ require_relative "/opt/gitlab/lib/gitlab/mail_room" unless defined?(Gitlab::MailRoom) + config = Gitlab::MailRoom.config + + if Gitlab::MailRoom.enabled? diff --git a/www-apps/gitlab-ce/files/05-gitlab-ce-9.0.0-replace-sys-filesystem.patch b/www-apps/gitlab-ce/files/05-gitlab-ce-9.0.0-replace-sys-filesystem.patch new file mode 100644 index 0000000..08e3d3a --- /dev/null +++ b/www-apps/gitlab-ce/files/05-gitlab-ce-9.0.0-replace-sys-filesystem.patch @@ -0,0 +1,80 @@ +diff --git a/Gemfile b/Gemfile +index 2f81332..8d1b7d6 100644 +--- a/Gemfile ++++ b/Gemfile +@@ -349,7 +349,7 @@ gem 'health_check', '~> 2.6.0' + + # System information + gem 'vmstat', '~> 2.3.0' +-gem 'sys-filesystem', '~> 1.1.6' ++gem 'sys-filesystem', '~> 1.1.6', group: :exclude + + # Gitaly GRPC client + gem 'gitaly', '~> 0.2.1' +diff --git a/app/controllers/admin/system_info_controller.rb b/app/controllers/admin/system_info_controller.rb +index 9903972..41af5a2 100644 +--- a/app/controllers/admin/system_info_controller.rb ++++ b/app/controllers/admin/system_info_controller.rb +@@ -1,3 +1,5 @@ ++require 'open3' ++ + class Admin::SystemInfoController < Admin::ApplicationController + EXCLUDED_MOUNT_OPTIONS = [ + 'nobrowse', +@@ -29,10 +31,14 @@ class Admin::SystemInfoController < Admin::ApplicationController + 'vfat' + ].freeze + ++ MOUNT_REGEX = /(\S+) on (\S+) type (\S+) \(([^)]+)\)/ ++ ++ Mount = Struct.new('Mount', :name, :mount_point, :mount_type, :options) ++ FsStat = Struct.new('FsStats', :path, :bytes_total, :bytes_used) ++ + def show + @cpus = Vmstat.cpu rescue nil + @memory = Vmstat.memory rescue nil +- mounts = Sys::Filesystem.mounts + + @disks = [] + mounts.each do |mount| +@@ -42,15 +48,38 @@ class Admin::SystemInfoController < Admin::ApplicationController + next if (EXCLUDED_MOUNT_TYPES & [mount.mount_type]).any? + + begin +- disk = Sys::Filesystem.stat(mount.mount_point) ++ disk = fs_stat(mount.mount_point) + @disks.push({ + bytes_total: disk.bytes_total, + bytes_used: disk.bytes_used, + disk_name: mount.name, + mount_path: disk.path + }) +- rescue Sys::Filesystem::Error ++ rescue IOError + end + end + end ++ ++ def mounts ++ stdout, stderr, status = Open3.capture3('mount') ++ fail IOError, stderr unless status.success? ++ ++ stdout.lines ++ .map { |line| MOUNT_REGEX.match(line) } ++ .compact ++ .map { |match| Mount.new(*match.captures) } ++ end ++ ++ def fs_stat(mount_point) ++ stdout, status = Open3.capture2('stat', '-c', '%s %b %a', '-f', mount_point) ++ fail IOError unless status.success? ++ ++ block_size, blocks_total, blocks_free = stdout.split(' ').map(&:to_i) ++ ++ bytes_total = blocks_total * block_size ++ bytes_free = blocks_free * block_size ++ bytes_used = bytes_total - bytes_free ++ ++ FsStat.new(mount_point, bytes_total, bytes_used) ++ end + end diff --git a/www-apps/gitlab-ce/gitlab-ce-9.0.0.ebuild b/www-apps/gitlab-ce/gitlab-ce-9.0.0.ebuild new file mode 100644 index 0000000..54a483a --- /dev/null +++ b/www-apps/gitlab-ce/gitlab-ce-9.0.0.ebuild @@ -0,0 +1,420 @@ +# Copyright 1999-2017 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 ruby23" + +inherit eutils ruby-ng user systemd + +MY_PV="v${PV/_/-}" +MY_GIT_COMMIT="cf020e66dff606f6ea2d2dbaeb7bef43d446c536" + +GITLAB_PAGES_VERSION="0.4.0" +GITLAB_SHELL_VERSION="5.0.0" +GITLAB_WORKHORSE_VERSION="1.4.1" + +DESCRIPTION="GitLab is a free project and repository management application" +HOMEPAGE="https://about.gitlab.com/" +SRC_URI="https://gitlab.com/gitlab-org/${PN}/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz" +RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}" + +RESTRICT="mirror" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~arm64" +IUSE="kerberos mysql +postgres +unicorn systemd pages 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-4.3.0 + >=sys-apps/yarn-0.17.0 + postgres? ( >=dev-db/postgresql-9.1:* ) + mysql? ( virtual/mysql ) + kerberos? ( virtual/krb5 )" +CDEPEND=" + dev-util/cmake + virtual/pkgconfig" +COMMON_DEPEND=" + ${GEMS_DEPEND} + ~dev-vcs/gitlab-shell-${GITLAB_SHELL_VERSION} + >=dev-vcs/git-2.8.4 + ~dev-vcs/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION} + kerberos? ( !app-crypt/heimdal ) + rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 ) + pages? ( ~www-servers/gitlab-pages-${GITLAB_PAGES_VERSION} )" +DEPEND=" + ${CDEPEND} + ${COMMON_DEPEND}" +RDEPEND=" + ${COMMON_DEPEND} + >=dev-db/redis-2.8 + virtual/mta + systemd? ( sys-apps/systemd:0= )" +# required bundler >= 1.14.2 +ruby_add_bdepend " + virtual/rubygems + >=dev-ruby/bundler-1.13.7" + +# +# fix-sendmail-config: +# Fix default settings to work with ssmtp that doesn't know '-t' argument. +# fix-redis-config-path: +# Point to the absolute location of redis_config.rb +# +RUBY_PATCHES=( + "01-${PN}-8.7.5-fix-sendmail-config.patch" + "02-${PN}-9.0.0-fix-redis-config-path.patch" + "03-${PN}-8.17.0-database.yml.patch" + "04-${PN}-8.12.7-fix-check-task.patch" + "05-${PN}-9.0.0-replace-sys-filesystem.patch" + "06-${PN}-8.17.0-fix-webpack-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}" + +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" + + einfo "Cleaning old gems ..." + ${RUBY} /usr/bin/bundle clean + + # clean gems cache + rm -Rf vendor/bundle/ruby/*/cache + rm -Rf vendor/bundle/ruby/*/bundler/gems/charlock_holmes-dde194609b35/.git + + ## RC script ## + + if use systemd ; then + ewarn "Beware: systemd support has not been tested, use at your own risk!" + systemd_newunit "${FILESDIR}/gitlab-8.13.0-sidekiq.service" "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-8.13.3-sidekiq.init + use unicorn && rcscript=gitlab-8.13.3-unicorn.init + + cp "${FILESDIR}/${rcscript}" "${T}" || die + sed -i \ + -e "s|@USER@|${MY_USER}|" \ + -e "s|@GITLAB_BASE@|${dest}|" \ + -e "s|@LOGS_DIR@|${logs}|" \ + "${T}/${rcscript}" \ + || die "failed to filter ${rcscript}" + + newinitd "${T}/${rcscript}" "${MY_NAME}" + fi + + # fix permissions + fowners -R ${MY_USER}:${MY_USER} ${dest} ${temp} ${logs} +} + +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." + if use postgres; then + elog "Please note: As of GitLab 8.6, users of PostgreSQL need to enable the" + elog "`pg_trgm` extension by running the following command as a PostgreSQL" + elog "super user for *every* GitLab database:" + elog " CREATE EXTENSION IF NOT EXISTS pg_trgm;" + elog "For details, see the documentation at the GitLab website." + fi +} + +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}/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 + + su -l ${MY_USER} -c "git config --global repack.writeBitmaps true" + + # determine whether this is an update or a fresh install. we do this by + # checking whether the ${DEST_DIR}/.git directory exists or not + # + if [ -d "${DEST_DIR}/.git" ]; then + local update=true + else + local update=false + fi + + ## Initialize app ## + + local RAILS_ENV="production" + local RUBY=${RUBY:-/usr/bin/ruby} + local BUNDLE="${RUBY} /usr/bin/bundle" + + # FIXME: this line existed in older ebuilds, but the variable is + # never used. what was it for!? + # local dbname="$(ryaml ${CONF_DIR}/database.yml production database)" + + if [ "${update}" = 'true' ]; then + einfo "Migrating database ..." + exec_rake db:migrate + + # https://github.com/gitlabhq/gitlabhq/issues/5311#issuecomment-31656496 + einfo "Migrating iids ..." + exec_rake migrate_iids + + einfo "Installing npm modules ..." + exec_npm install + + einfo "Cleaning old precompiled assets ..." + exec_rake gitlab:assets:clean + + einfo "Cleaning cache ..." + exec_rake cache:clear + else + # 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 + + einfo "Initializing database ..." + exec_rake gitlab:setup + + einfo "Installing npm modules ..." + exec_npm install + fi + + einfo "Precompiling assests ..." + exec_rake gitlab:assets:compile + + 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." + if use mysql ; then + ewarn "PLEASE also read this document about needed migrations on MySQL:" + ewarn "https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/database_mysql.md" + fi + 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 + if ! use systemd ; then + elog "You may also run" + elog " /etc/init.d/gitlab check" + elog " for convenience." + 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} NODE_ENV=${RAILS_ENV}" + + echo " ${command}" + su -l ${MY_USER} -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; export NODE_PATH=${DEST_DIR}/node_modules + cd ${DEST_DIR} + ${command}" \ + || die "failed to run rake $@" +} + +exec_npm() { + local command="npm $@ --${RAILS_ENV}" + + echo " ${command}" + su -l ${MY_USER} -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; export NODE_PATH=${DEST_DIR}/node_modules + cd ${DEST_DIR} + ${command}" \ + || die "failed to run npm $@" +} diff --git a/www-apps/gitlab-ce/gitlab-ce-8.17.0_rc3.ebuild b/www-apps/gitlab-ce/gitlab-ce-9.0.0_rc4.ebuild similarity index 91% rename from www-apps/gitlab-ce/gitlab-ce-8.17.0_rc3.ebuild rename to www-apps/gitlab-ce/gitlab-ce-9.0.0_rc4.ebuild index 90f5859..3d9809b 100644 --- a/www-apps/gitlab-ce/gitlab-ce-8.17.0_rc3.ebuild +++ b/www-apps/gitlab-ce/gitlab-ce-9.0.0_rc4.ebuild @@ -16,10 +16,11 @@ USE_RUBY="ruby21 ruby23" inherit eutils ruby-ng user systemd MY_PV="v${PV/_/-}" -MY_GIT_COMMIT="f947ed54392d77c66ff5f972b8a9d94dc8d1310b" +MY_GIT_COMMIT="461ea1e425979eaaea12c8ca7c767918c5b4ba54" -GITLAB_SHELL_VERSION="4.1.1" -GITLAB_WORKHORSE_VERSION="1.3.0" +GITLAB_PAGES_VERSION="0.4.0" +GITLAB_SHELL_VERSION="5.0.0" +GITLAB_WORKHORSE_VERSION="1.4.1" DESCRIPTION="GitLab is a free project and repository management application" HOMEPAGE="https://about.gitlab.com/" @@ -31,7 +32,7 @@ RESTRICT="mirror" LICENSE="MIT" SLOT="0" KEYWORDS="" -IUSE="kerberos mysql +postgres +unicorn systemd rugged_use_system_libraries" +IUSE="kerberos mysql +postgres +unicorn systemd pages rugged_use_system_libraries" ## Gems dependencies: # charlock_holmes dev-libs/icu @@ -48,7 +49,8 @@ GEMS_DEPEND=" dev-libs/libxml2 dev-libs/libxslt dev-util/ragel - net-libs/nodejs + >=net-libs/nodejs-4.3.0 + >=sys-apps/yarn-0.17.0 postgres? ( >=dev-db/postgresql-9.1:* ) mysql? ( virtual/mysql ) kerberos? ( virtual/krb5 )" @@ -61,7 +63,8 @@ COMMON_DEPEND=" >=dev-vcs/git-2.8.4 ~dev-vcs/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION} kerberos? ( !app-crypt/heimdal ) - rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 )" + rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 ) + pages? ( ~www-servers/gitlab-pages-${GITLAB_PAGES_VERSION} )" DEPEND=" ${CDEPEND} ${COMMON_DEPEND}" @@ -70,6 +73,7 @@ RDEPEND=" >=dev-db/redis-2.8 virtual/mta systemd? ( sys-apps/systemd:0= )" +# required bundler >= 1.14.2 ruby_add_bdepend " virtual/rubygems >=dev-ruby/bundler-1.13.7" @@ -82,10 +86,11 @@ ruby_add_bdepend " # RUBY_PATCHES=( "01-${PN}-8.7.5-fix-sendmail-config.patch" - "02-${PN}-8.11.0-fix-redis-config-path.patch" + "02-${PN}-9.0.0-fix-redis-config-path.patch" "03-${PN}-8.17.0-database.yml.patch" "04-${PN}-8.12.7-fix-check-task.patch" - "05-${PN}-8.16.0-replace-sys-filesystem.patch" + "05-${PN}-9.0.0-replace-sys-filesystem.patch" + "06-${PN}-8.17.0-fix-webpack-config.patch" ) MY_NAME="gitlab" @@ -333,8 +338,11 @@ pkg_config() { einfo "Migrating iids ..." exec_rake migrate_iids + einfo "Installing npm modules ..." + exec_npm install + einfo "Cleaning old precompiled assets ..." - exec_rake assets:clean + exec_rake gitlab:assets:clean einfo "Cleaning cache ..." exec_rake cache:clear @@ -350,10 +358,13 @@ pkg_config() { einfo "Initializing database ..." exec_rake gitlab:setup + + einfo "Installing npm modules ..." + exec_npm install fi einfo "Precompiling assests ..." - exec_rake assets:precompile + exec_rake gitlab:assets:compile if [ "${update}" = 'true' ]; then ewarn @@ -387,12 +398,23 @@ ryaml() { } exec_rake() { - local command="${BUNDLE} exec rake $@ RAILS_ENV=${RAILS_ENV}" + local command="${BUNDLE} exec rake $@ RAILS_ENV=${RAILS_ENV} NODE_ENV=${RAILS_ENV}" echo " ${command}" su -l ${MY_USER} -c " - export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8 + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; export NODE_PATH=${DEST_DIR}/node_modules cd ${DEST_DIR} ${command}" \ || die "failed to run rake $@" } + +exec_npm() { + local command="npm $@ --${RAILS_ENV}" + + echo " ${command}" + su -l ${MY_USER} -c " + export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; export NODE_PATH=${DEST_DIR}/node_modules + cd ${DEST_DIR} + ${command}" \ + || die "failed to run npm $@" +} diff --git a/www-apps/gitlab-ce/gitlab-ce-9999.ebuild b/www-apps/gitlab-ce/gitlab-ce-9999.ebuild index 19c5063..a150c0c 100644 --- a/www-apps/gitlab-ce/gitlab-ce-9999.ebuild +++ b/www-apps/gitlab-ce/gitlab-ce-9999.ebuild @@ -48,7 +48,8 @@ GEMS_DEPEND=" dev-libs/libxml2 dev-libs/libxslt dev-util/ragel - net-libs/nodejs + >=net-libs/nodejs-4.3.0 + >=sys-apps/yarn-0.17.0 postgres? ( >=dev-db/postgresql-9.1:* ) mysql? ( virtual/mysql ) kerberos? ( virtual/krb5 )" @@ -60,7 +61,6 @@ COMMON_DEPEND=" >=dev-vcs/gitlab-shell-${GITLAB_SHELL_VERSION} >=dev-vcs/git-2.8.4 >=dev-vcs/gitlab-workhorse-${GITLAB_WORKHORSE_VERSION} - >=net-libs/nodejs-4.3.0 kerberos? ( !app-crypt/heimdal ) rugged_use_system_libraries? ( net-libs/http-parser dev-libs/libgit2:0/24 ) pages? ( >=www-servers/gitlab-pages-${GITLAB_PAGES_VERSION} )" @@ -85,10 +85,10 @@ ruby_add_bdepend " # RUBY_PATCHES=( "01-${PN}-8.7.5-fix-sendmail-config.patch" - "02-${PN}-8.11.0-fix-redis-config-path.patch" + "02-${PN}-9.0.0-fix-redis-config-path.patch" "03-${PN}-8.17.0-database.yml.patch" "04-${PN}-8.12.7-fix-check-task.patch" - "05-${PN}-8.16.0-replace-sys-filesystem.patch" + "05-${PN}-9.0.0-replace-sys-filesystem.patch" "06-${PN}-8.17.0-fix-webpack-config.patch" )