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

earlyoom: fix version number #46481

Merged
merged 2 commits into from
Sep 10, 2018
Merged

earlyoom: fix version number #46481

merged 2 commits into from
Sep 10, 2018

Conversation

lheckemann
Copy link
Member

Motivation for this change

Before:

$ nix run nixpkgs.earlyoom -c earlyoom -h
earlyoom (unknown version)
Usage: earlyoom [-m PERCENT] [-s PERCENT] [-k|-i] [-h]
-m ... set available memory minimum to PERCENT of total (default 10 %)
-s ... set free swap minimum to PERCENT of total (default 10 %)
-k ... use kernel oom killer instead of own user-space implementation
-i ... user-space oom killer should ignore positive oom_score_adj values
-d ... enable debugging messages
-v ... print version information and exit
-h ... this help text

After:

$ nix run nixpkgs.earlyoom -c earlyoom -h
earlyoom 0.11
Usage: earlyoom [-m PERCENT] [-s PERCENT] [-k|-i] [-h]
-m ... set available memory minimum to PERCENT of total (default 10 %)
-s ... set free swap minimum to PERCENT of total (default 10 %)
-k ... use kernel oom killer instead of own user-space implementation
-i ... user-space oom killer should ignore positive oom_score_adj values
-d ... enable debugging messages
-v ... print version information and exit
-h ... this help text

earlyoom's Makefile attempts to detect the current version using git,
but we don't keep .git in its source, so this fails. We can however
set the VERSION environment variable to override this, as we now do.

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): no change
  • Fits CONTRIBUTING.md.

lheckemann and others added 2 commits September 10, 2018 13:11
earlyoom's Makefile attempts to detect the current version using git,
but we don't keep .git in its source, so this fails. We can however
set the VERSION environment variable to override this, as we now do.
@Mic92
Copy link
Member

Mic92 commented Sep 10, 2018

@GrahamcOfBorg build earlyoom

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: earlyoom

Partial log (click to expand)

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11
shrinking /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11/bin/earlyoom
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11/bin
patching script interpreter paths in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11
checking for references to /build in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11...
/nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: earlyoom

Partial log (click to expand)

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11
shrinking /nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11/bin/earlyoom
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11/bin
patching script interpreter paths in /nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11
checking for references to /build in /nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11...
/nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: earlyoom

Partial log (click to expand)


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

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


@Mic92 Mic92 merged commit ac679e7 into NixOS:master Sep 10, 2018
Mic92 pushed a commit that referenced this pull request Sep 10, 2018
earlyoom's Makefile attempts to detect the current version using git,
but we don't keep .git in its source, so this fails. We can however
set the VERSION environment variable to override this, as we now do.

(cherry picked from commit ac679e7)
@Mic92
Copy link
Member

Mic92 commented Sep 10, 2018

[detached HEAD 12703a0] earlyoom: fix version number (#46481)
Author: Linus Heckemann git@sphalerite.org
Date: Mon Sep 10 13:22:24 2018 +0100
1 file changed, 5 insertions(+), 5 deletions(-)

@lheckemann lheckemann deleted the earlyoom-version branch September 10, 2018 12:24
version = "0.11";
name = "earlyoom-${VERSION}";
# This environment variable is read by make to set the build version.
VERSION = "0.11";
Copy link
Member

Choose a reason for hiding this comment

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

There is also a new release, the ryantm bot might pick it up eventually now that rev is also set properly.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 labels Sep 10, 2018
@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

Merge failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Merge failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Merge failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: earlyoom

Partial log (click to expand)

/nix/store/w3j9xlgwcczz9bbys3xm7c0ypdbjapzp-earlyoom-0.11

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: earlyoom

Partial log (click to expand)


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

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


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: earlyoom

Partial log (click to expand)

  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11
shrinking /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11/bin/earlyoom
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11/bin
patching script interpreter paths in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11
checking for references to /build in /nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11...
/nix/store/gcp7srpzxfzljdyjh1fyg218ysgw3lfg-earlyoom-0.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants