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

ISO/OVA closure size reductions #47296

Merged
merged 2 commits into from Sep 24, 2018
Merged

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Sep 24, 2018

Motivation for this change

A few things to partially address #47292. Gets rid of GCC and Qt4 from the .ova build products (and GCC from the .iso)

  • Properly strips nfs-utils binaries
  • Disables Qt4 in the graphical profile (pretty soon we should make this the default everywhere)

This is already done in
installer/cd-dvd/installation-cd-graphical-kde.nix but not in
profiles/graphical.nix. Related to NixOS#47256.
nfs-utils had a dependency on gcc through
etc/systemd/system-generators/*-server-generator. It was not stripped
correctly because it’s not in an expected path. This adds it to the
strip list.
@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: nfs-utils

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: nfs-utils

Partial log (click to expand)

shrinking /nix/store/2rq388pm63x3ssaq5mqdcz0r4qqri5bp-nfs-utils-2.3.2-lib/lib/libnfsidmap.so.1.0.0
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/2rq388pm63x3ssaq5mqdcz0r4qqri5bp-nfs-utils-2.3.2-lib/lib
patching script interpreter paths in /nix/store/2rq388pm63x3ssaq5mqdcz0r4qqri5bp-nfs-utils-2.3.2-lib
checking for references to /build in /nix/store/2rq388pm63x3ssaq5mqdcz0r4qqri5bp-nfs-utils-2.3.2-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/lijbc1skld49kd43gg9jxarlly2paq23-nfs-utils-2.3.2-man
gzipping man pages under /nix/store/lijbc1skld49kd43gg9jxarlly2paq23-nfs-utils-2.3.2-man/share/man/
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/lijbc1skld49kd43gg9jxarlly2paq23-nfs-utils-2.3.2-man
checking for references to /build in /nix/store/lijbc1skld49kd43gg9jxarlly2paq23-nfs-utils-2.3.2-man...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nfs-utils

Partial log (click to expand)

strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/x6fxp43i7g20nxyh0hk4v5nz8i8w1p41-nfs-utils-2.3.2-lib/lib
patching script interpreter paths in /nix/store/x6fxp43i7g20nxyh0hk4v5nz8i8w1p41-nfs-utils-2.3.2-lib
checking for references to /build in /nix/store/x6fxp43i7g20nxyh0hk4v5nz8i8w1p41-nfs-utils-2.3.2-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/mnz9kzg6ia4krifvng5ymv24ccpajp6j-nfs-utils-2.3.2-man
gzipping man pages under /nix/store/mnz9kzg6ia4krifvng5ymv24ccpajp6j-nfs-utils-2.3.2-man/share/man/
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/mnz9kzg6ia4krifvng5ymv24ccpajp6j-nfs-utils-2.3.2-man
checking for references to /build in /nix/store/mnz9kzg6ia4krifvng5ymv24ccpajp6j-nfs-utils-2.3.2-man...
/nix/store/5p908f1zkzdsmnnvf11mzfjm57mmgv6q-nfs-utils-2.3.2

@xeji
Copy link
Contributor

xeji commented Sep 24, 2018

@GrahamcOfBorg test nfs3
@GrahamcOfBorg test nfs4

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.nfs3

Partial log (click to expand)

syncing
client2: running command: sync
client2: exit status 0
test script finished in 559.75s
cleaning up
killing client2 (pid 623)
killing server (pid 789)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/c05vfdzql2x7rnwgw72zck6h6j6vyk9g-vm-test-run-nfs

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.nfs3

Partial log (click to expand)

syncing
client2: running command: sync
client2: exit status 0
test script finished in 280.82s
cleaning up
killing client2 (pid 662)
killing server (pid 733)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/xzkmlsxg1jzq05z2vmpf3zfjnd4ypgqg-vm-test-run-nfs

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.nfs4

Partial log (click to expand)

syncing
client2: running command: sync
client2: exit status 0
test script finished in 361.22s
cleaning up
killing server (pid 759)
killing client2 (pid 652)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/9ykyipsa1nkxcw1cjrdc73d9y5fhh960-vm-test-run-nfs

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.nfs4

Partial log (click to expand)

syncing
client2: running command: sync
client2: exit status 0
test script finished in 356.02s
cleaning up
killing server (pid 767)
killing client2 (pid 661)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/419619s1w8jx0sk0r8fq5ssi5h4r0xdx-vm-test-run-nfs

@xeji xeji merged commit bc22265 into NixOS:master Sep 24, 2018
@matthewbauer
Copy link
Member Author

Is this okay to merge into master? 101-500 shouldn't be too much...

@xeji
Copy link
Contributor

xeji commented Sep 24, 2018

@matthewbauer should we backport this to 18.09 ?

@xeji
Copy link
Contributor

xeji commented Sep 24, 2018

Yeah, master looks fine.

@@ -83,6 +83,8 @@ in stdenv.mkDerivation rec {
"statdpath=$(TMPDIR)"
];

stripDebugList = [ "lib" "libexec" "bin" "etc/systemd/system-generators" ];

Copy link
Member

Choose a reason for hiding this comment

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

Compiled binaries in etc/** 😱

@vcunat
Copy link
Member

vcunat commented Sep 25, 2018

According to Hydra the graphical ISO has exactly the same size and OVA won't evaluate.

in job ‘nixos.ova.x86_64-linux’:
attribute 'diskInterface' missing, at /nix/store/5k9kk52bv6zsvsyyvpxhm8xmwyn2yjvx-source/pkgs/build-support/vm/default.nix:316:24

@xeji
Copy link
Contributor

xeji commented Sep 25, 2018

The OVA eval error is unrelated, it was caused by #34409 which was reverted a few hours ago.

@vcunat
Copy link
Member

vcunat commented Sep 26, 2018

Right. Hydra shows the OVA size did go down by roughly 25 MiB.

@matthewbauer matthewbauer deleted the closure-size-reductions branch February 22, 2019 04:25
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