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

Issue 61250 coreutils disable test on musl #61471

Merged
merged 2 commits into from Aug 14, 2019

Conversation

@nh2
Copy link
Contributor

commented May 13, 2019

Motivation for this change

Fixes #61250 (comment)

CC @matthewbauer @tobim

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 nix-review --run "nix-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.

@nh2 nh2 referenced this pull request May 13, 2019
2 of 10 tasks complete

@nh2 nh2 requested review from dtzWill and matthewbauer May 13, 2019

@tobim

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

Nice work tracking that down.
I wonder if coreutils should have tzdata included in buildInputs, so that these are actually executed in sandboxed mode?

@dtzWill

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

Awesome investigation! Minor nit: if only needed for testing, should be added to checkInputs. Although I don't think tzdata will help although I could be wrong.

As for this PR, I would prefer using upstream patch if possible... is it correct that the best patch available is the one from the mailing list? ( https://lists.gnu.org/archive/html/coreutils/2019-05/txtrygo35HvcI.txt or so )

@nh2

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

As for this PR, I would prefer using upstream patch if possible... is it correct that the best patch available is the one from the mailing list?

@dtzWill Right now there's no upstream patch; I understood the posted one as "here's a patch, can you try it", and it looks reasonable to me, but I wouldn't call it upstream just yet.

I just gave a super quick shot with

         ++ optional stdenv.hostPlatform.isMusl (fetchpatch {
            url = https://lists.gnu.org/archive/html/coreutils/2019-05/txtrygo35HvcI.txt;
            name = "0001-tests-avoid-false-positive-in-date-debug-test.patch";
            sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypa"; # made up
         })

but somehow fetchpatch doesn't work in this file, I get

error: anonymous function at /home/niklas/src/haskell/static-haskell-nix/nixpkgs/pkgs/build-support/fetchurl/boot.nix:5:1 called with unexpected argument 'meta', at /home/niklas/src/haskell/static-haskell-nix/nixpkgs/pkgs/build-support/fetchpatch/default.nix:14:1

fetchurl works as normal.

Do you want me to use

         ++ optional stdenv.hostPlatform.isMusl (fetchurl {
            url = https://lists.gnu.org/archive/html/coreutils/2019-05/txtrygo35HvcI.txt;
            sha256 = "0blllqds5vkk16nahnakh8krqkk34x6i8hzlvkxbvlkkm79r5214";
         })

?

I wonder if coreutils should have tzdata included in buildInputs, so that these are actually executed in sandboxed mode?

@tobim Sounds like a reasonable idea, more tests being run sounds good. checkInputs as @dtzWill says seems like the right place for it. You need to check though if that helps as the functionality may look in /etc only, I'm not sure. In any case, that's for a different PR, do you want to take that item @tobim? As I'm quite busy with the swathe of small musl related fixes.

@dtzWill

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

nh2 added a commit to nh2/nixpkgs that referenced this pull request May 16, 2019

@nh2

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

@dtzWill Sounds good, should we merge then?

nh2 added some commits May 13, 2019

coreutils: Refactor test patching.
So that more patches can easily be added and commented.

@nh2 nh2 force-pushed the nh2:issue-61250-coreutils-disable-test-on-musl branch from 3bf3f18 to 29dd25b Aug 10, 2019

@nh2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 10, 2019

I've switched to using the upstream patch from coreutils/coreutils@0251229.

Ready to merge from my side, if it builds fine.

@nh2 nh2 referenced this pull request Aug 10, 2019
40 of 59 tasks complete
@nh2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

@GrahamcOfBorg test pkgsMusl.coreutils

@nh2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

@GrahamcOfBorg build pkgsMusl.coreutils

@nh2

This comment has been minimized.

Copy link
Contributor Author

commented Aug 13, 2019

@GrahamcOfBorg build pkgsMusl.coreutils

(I got building of '/...-gcc-7.4.0.drv' timed out after 3600 seconds, and @samueldr explained the timeout is for the whole build)

@tobim

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

LGTM

@nh2 nh2 merged commit 19b043f into NixOS:master Aug 14, 2019

14 of 18 checks passed

pkgsMusl.coreutils on aarch64-linux Failure
Details
pkgsMusl.coreutils on x86_64-linux Timed out, unknown build status
Details
tests.pkgsMusl.coreutils on aarch64-linux No attempt
Details
tests.pkgsMusl.coreutils on x86_64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
coreutils on aarch64-linux Success
Details
coreutils on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.