Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e79bc5953210
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d5db11ccbd6d
Choose a head ref
  • 3 commits
  • 19 files changed
  • 1 contributor

Commits on Oct 28, 2019

  1. gitlab: 12.3.5 -> 12.4.0

    - gitlab-shell no longer requires ruby for anything else than the
      install script, so the bundlerEnv stuff could be dropped
    
    - gitlab-shell and gitlab-workhorse now report their versions
      correctly
    talyz authored and ehmry committed Oct 28, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5081a6c View commit details
  2. nixos/gitlab: Abort on error and use of unset variables

    Default behavior is to continue executing the script even when one or
    multiple steps fail. We want to abort early if any part of the
    initialization fails to not run with a partially initialized state.
    
    Default behavior also allows dereferencing non-existent variables,
    potentially resulting in hard-to-find bugs.
    talyz authored and ehmry committed Oct 28, 2019
    Copy the full SHA
    041cbd8 View commit details
  3. nixos/gitlab: Remove the old lib symlink in the state directory

    Also, remove the old and unused PermissionsStartOnly definition in the
    gitlab-workhorse systemd service.
    talyz authored and ehmry committed Oct 28, 2019
    Copy the full SHA
    d5db11c View commit details
Showing with 1,224 additions and 1,730 deletions.
  1. +7 −1 nixos/modules/services/misc/gitlab.nix
  2. +7 −7 pkgs/applications/version-management/gitlab/data.json
  3. +2 −2 pkgs/applications/version-management/gitlab/gitaly/default.nix
  4. +2 −29 pkgs/applications/version-management/gitlab/gitaly/deps.nix
  5. +0 −12 pkgs/applications/version-management/gitlab/gitlab-shell/Gemfile
  6. +0 −109 pkgs/applications/version-management/gitlab/gitlab-shell/Gemfile.lock
  7. +12 −52 pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
  8. +262 −64 pkgs/applications/version-management/gitlab/gitlab-shell/deps.nix
  9. +0 −451 pkgs/applications/version-management/gitlab/gitlab-shell/gemset.nix
  10. +0 −42 pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-go.patch
  11. +0 −27 pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch
  12. +57 −0 pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch
  13. +3 −4 pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix
  14. +11 −0 pkgs/applications/version-management/gitlab/remove-hardcoded-locations.patch
  15. +8 −8 pkgs/applications/version-management/gitlab/rubyEnv/Gemfile
  16. +29 −29 pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock
  17. +40 −40 pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix
  18. +0 −5 pkgs/applications/version-management/gitlab/update.py
  19. +784 −848 pkgs/applications/version-management/gitlab/yarnPkgs.nix
8 changes: 7 additions & 1 deletion nixos/modules/services/misc/gitlab.nix
Original file line number Diff line number Diff line change
@@ -608,6 +608,8 @@ in {
# objects owners and extensions; for now we tack on what's needed
# here.
systemd.services.postgresql.postStart = mkAfter (optionalString databaseActuallyCreateLocally ''
set -eu
$PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${cfg.databaseName}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${cfg.databaseName}" OWNER "${cfg.databaseUsername}"'
current_owner=$($PSQL -tAc "SELECT pg_catalog.pg_get_userbyid(datdba) FROM pg_catalog.pg_database WHERE datname = '${cfg.databaseName}'")
if [[ "$current_owner" != "${cfg.databaseUsername}" ]]; then
@@ -739,7 +741,6 @@ in {
gitlab-workhorse
];
serviceConfig = {
PermissionsStartOnly = true; # preStart must be run as root
Type = "simple";
User = cfg.user;
Group = cfg.group;
@@ -781,13 +782,18 @@ in {
ExecStartPre = let
preStartFullPrivileges = ''
shopt -s dotglob nullglob
set -eu
chown --no-dereference '${cfg.user}':'${cfg.group}' '${cfg.statePath}'/*
chown --no-dereference '${cfg.user}':'${cfg.group}' '${cfg.statePath}'/config/*
'';
preStart = ''
set -eu
cp -f ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
rm -rf ${cfg.statePath}/db/*
rm -rf ${cfg.statePath}/config/initializers/*
rm -f ${cfg.statePath}/lib
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
14 changes: 7 additions & 7 deletions pkgs/applications/version-management/gitlab/data.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "12.3.5",
"repo_hash": "12ywspgnbwm232vmzbqhkqmwmcrb9pvihsayzmw0cxvhlfwq6995",
"version": "12.4.0",
"repo_hash": "0z2jykjv9sa4akq2qd4bl5ngqk3gpy2xfhxmcbd4d61w6l2jw00f",
"owner": "gitlab-org",
"repo": "gitlab",
"rev": "v12.3.5-ee",
"rev": "v12.4.0-ee",
"passthru": {
"GITALY_SERVER_VERSION": "1.65.1",
"GITLAB_PAGES_VERSION": "1.9.0",
"GITLAB_SHELL_VERSION": "10.0.0",
"GITLAB_WORKHORSE_VERSION": "8.10.0"
"GITALY_SERVER_VERSION": "1.67.0",
"GITLAB_PAGES_VERSION": "1.11.0",
"GITLAB_SHELL_VERSION": "10.2.0",
"GITLAB_WORKHORSE_VERSION": "8.14.0"
}
}
Original file line number Diff line number Diff line change
@@ -17,14 +17,14 @@ let
};
};
in buildGoPackage rec {
version = "1.65.1";
version = "1.67.0";
pname = "gitaly";

src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
sha256 = "1a39i723na2xk4363a7v48ba23vi04qpg0119dw09g13m0k5hjc3";
sha256 = "1mj2l15hnxwqmyc8xn79d6qpmpqbqw2ishalr8qvn83nzdsbk8l3";
};

goPackagePath = "gitlab.com/gitlab-org/gitaly";
31 changes: 2 additions & 29 deletions pkgs/applications/version-management/gitlab/gitaly/deps.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions pkgs/applications/version-management/gitlab/gitlab-shell/Gemfile

This file was deleted.

109 changes: 0 additions & 109 deletions pkgs/applications/version-management/gitlab/gitlab-shell/Gemfile.lock

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,65 +1,25 @@
{ stdenv, ruby, bundler, fetchFromGitLab, buildGoPackage, bundlerEnv }:
{ stdenv, fetchFromGitLab, buildGoPackage, ruby }:

let
version = "10.0.0";
buildGoPackage rec {
pname = "gitlab-shell-go";
version = "10.2.0";
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitlab-shell";
rev = "v${version}";
sha256 = "0n1llkb0jrqxm10l9wqmqxjycydqphgz0chbbf395d8pywyz826x";
sha256 = "1mpzsdqd8mlsh8wccz4s8415w080z55lnifn7l7vd5rflpnyfhcj";
};
rubyEnv = bundlerEnv {
name = "gitlab-shell-env";
inherit ruby;
gemdir = ./.;
};
goPackage = buildGoPackage {
pname = "gitlab-shell-go";
inherit src version;

patches = [ ./remove-hardcoded-locations-go.patch ];

goPackagePath = "gitlab.com/gitlab-org/gitlab-shell";
goDeps = ./deps.nix;

# gitlab-shell depends on an older version of gitaly which
# contains old, vendored versions of some packages; gitlab-shell
# also explicitly depends on newer versions of these libraries,
# but buildGoPackage exposes the vendored versions instead,
# leading to compilation errors. Since the vendored libraries
# aren't used here anyway, we'll just remove them.
postConfigure = ''
rm -r "$NIX_BUILD_TOP/go/src/gitlab.com/gitlab-org/gitaly/vendor/"
'';
};
in
stdenv.mkDerivation {
pname = "gitlab-shell";
inherit src version;

patches = [ ./remove-hardcoded-locations-ruby.patch ];

# gitlab-shell will try to read its config relative to the source
# code by default which doesn't work in nixos because it's a
# read-only filesystem
postPatch = ''
substituteInPlace lib/gitlab_config.rb --replace \
"File.join(ROOT_PATH, 'config.yml')" \
"'/run/gitlab/shell-config.yml'"
'';

buildInputs = [ rubyEnv.wrappedRuby ];

dontBuild = true;
buildInputs = [ ruby ];

installPhase = ''
runHook preInstall
patches = [ ./remove-hardcoded-locations.patch ];

mkdir -p $out/
cp -R . $out/
cp ${goPackage.bin}/bin/* $out/bin/
goPackagePath = "gitlab.com/gitlab-org/gitlab-shell";
goDeps = ./deps.nix;

runHook postInstall
postInstall = ''
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $bin/bin
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $bin/
'';

meta = with stdenv.lib; {
Loading