gitlab: 8.16.6 -> 8.17.4 for CVE-2017-0882

This commit is contained in:
Franz Pletz
2017-03-21 13:16:31 +01:00
parent 37c31c635d
commit 29f57ac447
4 changed files with 101 additions and 106 deletions
@@ -1,5 +1,5 @@
{ stdenv, lib, bundler, fetchFromGitHub, bundlerEnv, libiconv, ruby
, tzdata, git, nodejs, procps
{ stdenv, lib, bundler, fetchurl, fetchFromGitHub, bundlerEnv, libiconv, ruby
, tzdata, git, nodejs, procps, dpkg
}:
/* When updating the Gemfile add `gem "activerecord-nulldb-adapter"`
@@ -18,19 +18,27 @@ let
};
};
version = "8.17.4";
gitlabDeb = fetchurl {
url = "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_${version}-ce.0_amd64.deb/download";
sha256 = "1fd6y9lyavzsm2ac10sip01dnvcd73ymcn2rqdljr4sq4f222mry";
};
in
stdenv.mkDerivation rec {
name = "gitlab-${version}";
version = "8.16.6";
buildInputs = [ env ruby bundler tzdata git nodejs procps ];
buildInputs = [
env ruby bundler tzdata git nodejs procps dpkg
];
src = fetchFromGitHub {
owner = "gitlabhq";
repo = "gitlabhq";
rev = "v${version}";
sha256 = "03rzms2frwx4c09l2rig1amlxj965s2iq421i52j8wj2khb7pd7g";
sha256 = "1yrbbf55pz7863xngl2mxwj9w4imdlqvmqywd1zpnswdsjqxa5xj";
};
patches = [
@@ -64,9 +72,15 @@ stdenv.mkDerivation rec {
buildPhase = ''
mv config/gitlab.yml.example config/gitlab.yml
GITLAB_DATABASE_ADAPTER=nulldb \
SKIP_STORAGE_VALIDATION=true \
rake assets:precompile RAILS_ENV=production
dpkg -x ${gitlabDeb} .
mv -v opt/gitlab/embedded/service/gitlab-rails/public/assets public
rm -rf opt
export GITLAB_DATABASE_ADAPTER=nulldb
export SKIP_STORAGE_VALIDATION=true
rake assets:precompile RAILS_ENV=production
mv config/gitlab.yml config/gitlab.yml.example
rm config/secrets.yml
mv config config.dist