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

semver-tool: init at 2.1.0 #51004

Closed
wants to merge 3 commits into from
Closed

semver-tool: init at 2.1.0 #51004

wants to merge 3 commits into from

Conversation

alyssais
Copy link
Member

Motivation for this change

Requested by @coretemp in #50945.

I chose "semver-tool" as the path for this package because "semver" is extremely generic, and probably more rightly belongs to node-semver (at least judging by GitHub stars), and because "semver-tool" is the name of this project's GitHub repository, and because it was the name used in the package request.

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: semver-tool

Partial log (click to expand)

patching sources
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/n2hjbpkf4c0m48945ivxs3lmsczzw2rg-bash-4.4-p23/bin/bash
test/documentation-test
/nix/store/n2hjbpkf4c0m48945ivxs3lmsczzw2rg-bash-4.4-p23/bin/bash: test/documentation-test: /usr/bin/env: bad interpreter: No such file or directory
make: *** [Makefile:4: test] Error 126
builder for '/nix/store/yc626b3z3gg38r3jlbjba7vpw41vbd93-semver-2.1.0.drv' failed with exit code 2
error: build of '/nix/store/yc626b3z3gg38r3jlbjba7vpw41vbd93-semver-2.1.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: semver-tool

Partial log (click to expand)

updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/n1kfdl37qpzh3xn6klbym1ay6xpxvmw1-bash-4.4-p23/bin/bash
test/documentation-test
/nix/store/n1kfdl37qpzh3xn6klbym1ay6xpxvmw1-bash-4.4-p23/bin/bash: test/documentation-test: /usr/bin/env: bad interpreter: No such file or directory
make: *** [Makefile:4: test] Error 126
builder for '/nix/store/w64gkifs78y8cr3nvprp2ph4zmaf5z14-semver-2.1.0.drv' failed with exit code 2
error: build of '/nix/store/w64gkifs78y8cr3nvprp2ph4zmaf5z14-semver-2.1.0.drv' failed

I chose "semver-tool" as the path for this package because "semver" is
extremely generic, and probably more rightly belongs to node-semver[1]
(at least judging by GitHub stars), and because "semver-tool" is the
name of this project's GitHub repository, and because it was the name
used in the package request[2].

Closes NixOS#50945.

[1]: https://github.com/npm/node-semver
[2]: NixOS#50945
@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: semver-tool

Partial log (click to expand)

patching sources
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/n2hjbpkf4c0m48945ivxs3lmsczzw2rg-bash-4.4-p23/bin/bash
test/documentation-test
/nix/store/n2hjbpkf4c0m48945ivxs3lmsczzw2rg-bash-4.4-p23/bin/bash: test/documentation-test: /usr/bin/env: bad interpreter: No such file or directory
make: *** [Makefile:4: test] Error 126
builder for '/nix/store/fwc61xpzp8f56is3pnzdlacc2s5a5xaw-semver-tool-2.1.0.drv' failed with exit code 2
error: build of '/nix/store/fwc61xpzp8f56is3pnzdlacc2s5a5xaw-semver-tool-2.1.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: semver-tool

Partial log (click to expand)

updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/n1kfdl37qpzh3xn6klbym1ay6xpxvmw1-bash-4.4-p23/bin/bash
test/documentation-test
/nix/store/n1kfdl37qpzh3xn6klbym1ay6xpxvmw1-bash-4.4-p23/bin/bash: test/documentation-test: /usr/bin/env: bad interpreter: No such file or directory
make: *** [Makefile:4: test] Error 126
builder for '/nix/store/xyl1w8v5wsh72xxi36r4a4klxzp9kkfw-semver-tool-2.1.0.drv' failed with exit code 2
error: build of '/nix/store/xyl1w8v5wsh72xxi36r4a4klxzp9kkfw-semver-tool-2.1.0.drv' failed

@worldofpeace
Copy link
Contributor

test/documentation-test
/nix/store/n2hjbpkf4c0m48945ivxs3lmsczzw2rg-bash-4.4-p23/bin/bash: test/documentation-test: /usr/bin/env: bad interpreter: No such file or directory
make: *** [Makefile:4: test] Error 126

Probably need to have patchShebangs ran earlier.

alyssais added a commit to alyssais/semver-tool that referenced this pull request Nov 25, 2018
The user of this package won't necessarily want to install to /usr/local
(indeed, that directory doesn't even exist on my system). Additionally,
package managers would probably like to install the program
elsewhere[1], and without a way to customize the prefix would have to fall back
to either patching the Makefile, or doing the installation manually, both
of which might break down the line.

By introducing a PREFIX variable with a default value of /usr/local, the
installation prefix can be customized, solving these problems.

[1]: Example: NixOS/nixpkgs#51004
@alyssais
Copy link
Member Author

Hardcoded prefix reported upstream: fsaintjacques/semver-tool#24

};

postPatch = ''
patchShebangs .
Copy link
Contributor

Choose a reason for hiding this comment

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

You should only patch the tests – this will patch src/semver with build-time bash as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, didn't occur to me that build-time bash could be different from runtime. But of course they can (eg if crosscompiling, right?).

Copy link
Member Author

@alyssais alyssais Nov 25, 2018

Choose a reason for hiding this comment

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

But then the tests will want to run src/semver unpatched, and that won't work, right?

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: semver-tool

Partial log (click to expand)

build flags: SHELL=/nix/store/n1kfdl37qpzh3xn6klbym1ay6xpxvmw1-bash-4.4-p23/bin/bash
test/documentation-test
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4a8xn421yrv1jn52ar2p2b5wdcjx5dci-semver-tool-2.1.0
strip is /nix/store/6dpnd5aniypn8124mmy8f88s4mq2zl07-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/4a8xn421yrv1jn52ar2p2b5wdcjx5dci-semver-tool-2.1.0/bin
patching script interpreter paths in /nix/store/4a8xn421yrv1jn52ar2p2b5wdcjx5dci-semver-tool-2.1.0
checking for references to /build in /nix/store/4a8xn421yrv1jn52ar2p2b5wdcjx5dci-semver-tool-2.1.0...
/nix/store/4a8xn421yrv1jn52ar2p2b5wdcjx5dci-semver-tool-2.1.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: semver-tool

Partial log (click to expand)

build flags: SHELL=/nix/store/n2hjbpkf4c0m48945ivxs3lmsczzw2rg-bash-4.4-p23/bin/bash
test/documentation-test
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2y17nsbg2xgjf6ik8saqdx3d0yy7bdwf-semver-tool-2.1.0
strip is /nix/store/rpbg8gmqxhz8g61p1plz5d2srs84pvmv-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/2y17nsbg2xgjf6ik8saqdx3d0yy7bdwf-semver-tool-2.1.0/bin
patching script interpreter paths in /nix/store/2y17nsbg2xgjf6ik8saqdx3d0yy7bdwf-semver-tool-2.1.0
checking for references to /build in /nix/store/2y17nsbg2xgjf6ik8saqdx3d0yy7bdwf-semver-tool-2.1.0...
/nix/store/2y17nsbg2xgjf6ik8saqdx3d0yy7bdwf-semver-tool-2.1.0

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

5 participants