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

Teleconsole #48108

Merged
merged 2 commits into from Oct 11, 2018
Merged

Teleconsole #48108

merged 2 commits into from Oct 11, 2018

Conversation

kimburgess
Copy link
Member

Motivation for this change

Adds support for Teleconsole.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

src = fetchFromGitHub {
owner = "gravitational";
repo = "teleconsole";
rev = "93261ac31763bf6a0a31762c22f4cc6946a7c876";
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just do rev = version; here since there's the tag.

fetch = {
type = "git";
url = "https://github.com/gravitational/teleport";
rev = "2cb40abd8ea8fb2915304ea4888b5b9f3e5bc223"; # v2.0.0-alpha.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment that this is asked for here https://github.com/gravitational/teleconsole/blob/09591f227c2a8df4c68af8bc4adfadfc596f4ed2/Makefile#L8 ?

I assume this will be vendored eventually.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

This should be merged into master not release-18.03. You then could backport this into whichever release.

@@ -0,0 +1,28 @@
{ lib, stdenv, buildGoPackage, fetchFromGitHub }:
Copy link
Contributor

Choose a reason for hiding this comment

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

drop lib here.

CGO_ENABLED = 1;
buildFlags = "-ldflags";

meta = with lib; {
Copy link
Contributor

Choose a reason for hiding this comment

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

with stdenv.lib;

@kimburgess kimburgess changed the base branch from release-18.03 to master October 11, 2018 00:27
@kimburgess
Copy link
Member Author

Thanks for the review @worldofpeace - that's all neatened up now.

@worldofpeace
Copy link
Contributor

@kimburgess You're welcome 👍

Lets see if it builds here.
@GrahamcOfBorg build teleconsole

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: teleconsole

Partial log (click to expand)

# github.com/gravitational/teleport/vendor/github.com/kr/pty
go/src/github.com/gravitational/teleport/vendor/github.com/kr/pty/pty_linux.go:34:8: undefined: _C_uint
go/src/github.com/gravitational/teleport/vendor/github.com/kr/pty/pty_linux.go:43:8: undefined: _C_int
# github.com/gravitational/teleport/vendor/github.com/boltdb/bolt
go/src/github.com/gravitational/teleport/vendor/github.com/boltdb/bolt/db.go:85:13: undefined: maxMapSize
# github.com/gravitational/teleport/vendor/github.com/kr/pty
go/src/github.com/gravitational/teleport/vendor/github.com/kr/pty/pty_linux.go:34:8: undefined: _C_uint
go/src/github.com/gravitational/teleport/vendor/github.com/kr/pty/pty_linux.go:43:8: undefined: _C_int
builder for '/nix/store/akq4gyfv3v83pm8rd1sb6za7malsgafm-teleconsole-0.4.0.drv' failed with exit code 5
error: build of '/nix/store/akq4gyfv3v83pm8rd1sb6za7malsgafm-teleconsole-0.4.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: teleconsole

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin
shrinking /nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin/bin/teleconsole
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin/bin
patching script interpreter paths in /nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin
checking for references to /build in /nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin...
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
/nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin

@worldofpeace
Copy link
Contributor

The failure on aarch64-linux has been reported here and here.

So you can mark it broken, so it doesn't get built on that platform, with this meta attribute

broken = stdenv.isAarch64;

Also add a comment with those issues in it.

I didn't read enough to tell if it's fixed in the most recent teleport version.
However if it is, this line should be removed when they vendor a newer version of teleport.

@kimburgess
Copy link
Member Author

Nice catch and issue digging. I'll flag as broken now, then revisit when this all switches over to a more modern teleport backend.

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg build teleconsole

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: teleconsole

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: teleconsole

Partial log (click to expand)

/nix/store/d79ncdhshn72g8gfyb38rr3x4m55hbxc-teleconsole-0.4.0-bin

@infinisil infinisil merged commit e69079b into NixOS:master Oct 11, 2018
@infinisil
Copy link
Member

@kimburgess @worldofpeace Thanks :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants