Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consul: 0.9.3 -> 1.3.0 with vendored UI #49165

Merged
merged 2 commits into from
Nov 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions nixos/doc/manual/release-notes/rl-1903.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@
has been renamed to <varname>postgresql_9_6</varname>.
</para>
</listitem>
<listitem>
<para>
Package <literal>consul-ui</literal> and passthrough <literal>consul.ui</literal> have been removed.
The package <literal>consul</literal> now uses upstream releases that vendor the UI into the binary.
See <link xlink:href="https://github.com/NixOS/nixpkgs/pull/48714#issuecomment-433454834">#48714</link>
for details.
</para>
</listitem>
<listitem>
<para>
Slurm introduces the new option
Expand Down
7 changes: 4 additions & 3 deletions nixos/modules/services/networking/consul.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ let
dataDir = "/var/lib/consul";
cfg = config.services.consul;

configOptions = { data_dir = dataDir; } //
(if cfg.webUi then { ui_dir = "${cfg.package.ui}"; } else { }) //
cfg.extraConfig;
configOptions = {
data_dir = dataDir;
ui = cfg.webUi;
} // cfg.extraConfig;

configFiles = [ "/etc/consul.json" "/etc/consul-addrs.json" ]
++ cfg.extraConfigFiles;
Expand Down
5 changes: 0 additions & 5 deletions pkgs/servers/consul/Gemfile

This file was deleted.

25 changes: 0 additions & 25 deletions pkgs/servers/consul/Gemfile.lock

This file was deleted.

19 changes: 12 additions & 7 deletions pkgs/servers/consul/default.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{ stdenv, buildGoPackage, consul-ui, fetchFromGitHub }:
{ stdenv, buildGoPackage, fetchFromGitHub }:

buildGoPackage rec {
name = "consul-${version}";
version = "0.9.3";
version = "1.3.0";
rev = "v${version}";

goPackagePath = "github.com/hashicorp/consul";

# Note: Currently only release tags are supported, because they have the Consul UI
# vendored. See
# https://github.com/NixOS/nixpkgs/pull/48714#issuecomment-433454834
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a link to #49082 here, so people know how such a build would look like?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

# If you want to use a non-release commit as `src`, you probably want to improve
# this derivation so that it can build the UI's JavaScript from source.
# See https://github.com/NixOS/nixpkgs/pull/49082 for something like that.
# Or, if you want to patch something that doesn't touch the UI, you may want
# to apply your changes as patches on top of a release commit.
src = fetchFromGitHub {
owner = "hashicorp";
repo = "consul";
inherit rev;
sha256 = "1176frp7kimpycsmz9wrbizf46jgxr8jq7hz5w4q1x90lswvrxv3";
sha256 = "1zv84snvrjm74w3v3rr27linsbxj00m73xd047sb78a4766xs2h0";
};

# Keep consul.ui for backward compatability
passthru.ui = consul-ui;

preBuild = ''
buildFlagsArray+=("-ldflags" "-X github.com/hashicorp/consul/version.GitDescribe=v${version} -X github.com/hashicorp/consul/version.Version=${version} -X github.com/hashicorp/consul/version.VersionPrerelease=")
'';
Expand All @@ -26,6 +31,6 @@ buildGoPackage rec {
homepage = https://www.consul.io/;
platforms = platforms.linux ++ platforms.darwin;
license = licenses.mpl20;
maintainers = with maintainers; [ pradeepchhetri ];
maintainers = with maintainers; [ pradeepchhetri vdemeester nh2 ];
};
}
62 changes: 0 additions & 62 deletions pkgs/servers/consul/gemset.nix

This file was deleted.

17 changes: 0 additions & 17 deletions pkgs/servers/consul/ui-no-bundle-exec.patch

This file was deleted.

41 changes: 0 additions & 41 deletions pkgs/servers/consul/ui.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,6 @@ with pkgs;

consul = callPackage ../servers/consul { };

consul-ui = callPackage ../servers/consul/ui.nix { };

consul-alerts = callPackage ../servers/monitoring/consul-alerts { };

consul-template = callPackage ../tools/system/consul-template { };
Expand Down