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

mattermost: 4.8.0 -> 4.9.1 #39876

Closed
wants to merge 1 commit into from
Closed

mattermost: 4.8.0 -> 4.9.1 #39876

wants to merge 1 commit into from

Conversation

ryantm
Copy link
Member

@ryantm ryantm commented May 2, 2018

They changed the location of the main command, and it looks like you can build it directly from the top-level, so that simplifies things. Also, they changed how versions are displayed, so we don't need to pass the version number anymore. Unfortunately, it looks like I had to add back in the thing setting the interpreter of the output binary. I haven't had the time to track down why that is necessary again, maybe @Mic92 would know.

  • built on NixOS
  • tested NixOS service

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mattermost

Partial log (click to expand)

/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/github.com/stretchr/testify/.travis.govet.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/github.com/stretchr/testify/.travis.gogenerate.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/github.com/stretchr/testify/.travis.gofmt.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/github.com/olivere/elastic/run-es.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/scripts/test-xprog.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/scripts/prereq-check.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/scripts/license-check.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
/nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/scripts/ldap-check.sh: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/0lc2dsbwwyvlicxs2h69c9nry4v7wifv-mattermost-4.9.1...
/nix/store/cjfhbsd9ff814637x66zciawvssdsa6x-mattermost-4.9.1-bin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mattermost

Partial log (click to expand)

/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/github.com/stretchr/testify/.travis.govet.sh: interpreter directive changed from "/bin/bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/plan9/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/plan9/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/unix/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/unix/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/google.golang.org/appengine/internal/regen.sh: interpreter directive changed from "/bin/bash -e" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash -e"
/nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/gopkg.in/olivere/elastic.v5/run-es.sh: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/blkgn1bdxd2pfzngy43if2rhaqd9qjmr-mattermost-4.9.1...
/nix/store/h1l9sf7b7x6hz9xknj0ngxinvaf97vq3-mattermost-4.9.1-bin

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mattermost

Partial log (click to expand)

/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/plan9/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash"
/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/plan9/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash"
/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: interpreter directive changed from "/bin/sh" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/sh"
/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/unix/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash"
/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/golang.org/x/sys/unix/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash"
/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/google.golang.org/appengine/internal/regen.sh: interpreter directive changed from "/bin/bash -e" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash -e"
/nix/store/1g928zh5q9vhk11qchv5cz213r4pxzjc-mattermost-4.9.1/share/go/src/github.com/mattermost/mattermost-server/vendor/gopkg.in/olivere/elastic.v5/run-es.sh: interpreter directive changed from "/bin/sh" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/sh"
/nix/store/dr80a9mwy52yqaxc9n9lw35mqm4yc08p-stdenv-darwin/setup: line 106: patchelf: command not found
builder for '/nix/store/6ljpsk7mbpg5if41gvqqvng3xsrbzwkn-mattermost-4.9.1.drv' failed with exit code 127
error: build of '/nix/store/6ljpsk7mbpg5if41gvqqvng3xsrbzwkn-mattermost-4.9.1.drv' failed

@ryantm
Copy link
Member Author

ryantm commented May 2, 2018

Darwin doesn't build because it wants patchelf, I wonder if the interpreter was working correctly on darwin when it used to build successfully #37200 (comment)

postInstall = ''
ln -s $bin/bin/platform $bin/bin/mattermost-platform
postFixup = ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $bin/bin/platform
Copy link
Member

Choose a reason for hiding this comment

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

Why is this necessary?

$ /nix/store/6b0jynb0szqj81cxsl8y1ivhswxw3wn9-mattermost-4.9.1-bin/bin/mattermost-platform  --help

works for me

$ ldd /nix/store/6b0jynb0szqj81cxsl8y1ivhswxw3wn9-mattermost-4.9.1-bin/bin/mattermost-platform
        linux-vdso.so.1 (0x00007f866dfe6000)
        libpthread.so.0 => /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/libpthread.so.0 (0x00007f866dba5000)
        libc.so.6 => /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/libc.so.6 (0x00007f866d7f1000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f866ddc4000)

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm glad it works for you, but it doesn't for me:

$ ldd /nix/store/ph0pc99dkpsiz72lwcz173icylzvphkg-mattermost-4.9.1-bin/bin/mattermost-platform
        linux-vdso.so.1 =>  (0x00007fff81928000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6c5f3fd000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6c5f033000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6c5f61a000)

I assume you are building it on NixOS? I'm building it on Ubuntu 16.04 with nix-build version 1.11.13.

@ryantm
Copy link
Member Author

ryantm commented May 3, 2018

@Mic92 Removing the postFixup phase did not work for me on NixOS either:

$ nix-build --version
nix-build (Nix) 2.0
$ nix-build -A mattermost
/nix/store/6b0jynb0szqj81cxsl8y1ivhswxw3wn9-mattermost-4.9.1-bin
$ file /nix/store/6b0jynb0szqj81cxsl8y1ivhswxw3wn9-mattermost-4.9.1-bin/bin/platform
/nix/store/6b0jynb0szqj81cxsl8y1ivhswxw3wn9-mattermost-4.9.1-bin/bin/platform: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped
$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.0, channels(root): "", channels(ryantm): "nixos-17.03-17.03.902.536d3cac2e", nixpkgs: /home/ryantm/p/nixpkgs

ldd fails to run on the binary with "No such file or directory".

With the postFixup phase:

$ nix-build -A mattermost
/nix/store/cjfhbsd9ff814637x66zciawvssdsa6x-mattermost-4.9.1-bin
$ file /nix/store/cjfhbsd9ff814637x66zciawvssdsa6x-mattermost-4.9.1-bin/bin/platform
/nix/store/cjfhbsd9ff814637x66zciawvssdsa6x-mattermost-4.9.1-bin/bin/platform: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ld-linux-x86-64.so.2, not stripped
$ ldd /nix/store/cjfhbsd9ff814637x66zciawvssdsa6x-mattermost-4.9.1-bin/bin/platform
        linux-vdso.so.1 (0x00007fff189ea000)
        libpthread.so.0 => /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/libpthread.so.0 (0x00007f60a420b000)
        libc.so.6 => /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/libc.so.6 (0x00007f60a3e57000)
        /nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27/lib/ld-linux-x86-64.so.2 (0x00007f60a442a000)

@ryantm
Copy link
Member Author

ryantm commented May 3, 2018

I tried deleting the postFixup-removed instantiation and rebuilding it with --option sandbox true and it was still messed up.

@Mic92
Copy link
Member

Mic92 commented May 4, 2018

I had for reasons a symlink in /lib64 for the glibc link loader. That's why I was confused it worked on my machine. The problem is that the platform command is not inside the go project that we are building from source. Instead it is coming from the webApp tarball. Do you where the source for this tarball is? It might be better to build the go binary there, otherwise we have to restrict the platform to x86_64.

@ryantm
Copy link
Member Author

ryantm commented May 4, 2018

Ah, so I thought my changes were building the platform from the src, but it must have just been getting it from the webApp instead. I'll close this and work on fixing it. There's also a version 4.9.2 now anyway.

@ryantm ryantm closed this May 4, 2018
@ryantm ryantm mentioned this pull request May 16, 2018
10 tasks
@ryantm ryantm deleted the mattermost2 branch May 16, 2018 18:56
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

3 participants