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

expect: patch configure after the autoreconf phase, not before it #80006

Merged
merged 1 commit into from Feb 16, 2020

Conversation

@basvandijk
Copy link
Member

@basvandijk basvandijk commented Feb 13, 2020

Motivation for this change

Fixes #79863

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@basvandijk basvandijk requested a review from Ma27 Feb 13, 2020
@basvandijk
Copy link
Member Author

@basvandijk basvandijk commented Feb 13, 2020

@GrahamcOfBorg build expect

@basvandijk basvandijk force-pushed the basvandijk:expect-remove-autoreconfHook branch from 90a75e1 to 51c57c5 Feb 13, 2020
@basvandijk
Copy link
Member Author

@basvandijk basvandijk commented Feb 13, 2020

@GrahamcOfBorg build expect

@dtzWill
Copy link
Contributor

@dtzWill dtzWill commented Feb 13, 2020

well the autoreconfHook is certainly at odds with the postPatch:

https://github.com/basvandijk/nixpkgs/blob/51c57c560fcec564136035182e6677ed210a610d/pkgs/tools/misc/expect/default.nix#L17

Can the stty fixup be changed to modify configure.ac or perhaps by setting a variable?

@basvandijk
Copy link
Member Author

@basvandijk basvandijk commented Feb 13, 2020

@dtzWill you're spot on. The only change needed is to change the postPatch into preConfigure so that configure gets patched after the autoreconf phase. I'll force-push an fix.

@basvandijk basvandijk force-pushed the basvandijk:expect-remove-autoreconfHook branch from 51c57c5 to aaa60de Feb 13, 2020
@basvandijk
Copy link
Member Author

@basvandijk basvandijk commented Feb 13, 2020

@GrahamcOfBorg build expect pkgsMusl.libffi

@basvandijk basvandijk changed the title expect: remove autoreconfHook since that causes a wrong path to stty expect: patch configure after the autoreconf phase, not before it Feb 13, 2020
@jonringer
Copy link
Contributor

@jonringer jonringer commented Feb 13, 2020

diff LGTM, but doesn't fix your use case

@jonringer
Copy link
Contributor

@jonringer jonringer commented Feb 13, 2020

x86_64 is still good with these changes:

[97 built, 372 copied (1262.6 MiB), 249.7 MiB DL]
https://github.com/NixOS/nixpkgs/pull/80006
9 package built:
deepin.dde-file-manager deepin.deepin-terminal deepin.startdde dejagnu expect monotone profanity reposurgeon viking
preConfigure = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure
Comment on lines +17 to 18

This comment has been minimized.

@jtojnar

jtojnar Feb 13, 2020
Contributor

Doing this still sounds more natural to me:

Suggested change
preConfigure = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure
postPatch = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure.in

Ideally we would fix this upstream by adding --with-stty configure flag or something.

@Ma27
Ma27 approved these changes Feb 13, 2020
Copy link
Member

@Ma27 Ma27 left a comment

Good catch @dtzWill and thanks for taking care of this @basvandijk! :)

@nh2
Copy link
Contributor

@nh2 nh2 commented Feb 16, 2020

diff LGTM, but doesn't fix your use case

@jonringer What did you refer to here?


This PR fixes the issue for me, see #79863 (comment)

@nh2
nh2 approved these changes Feb 16, 2020
Copy link
Contributor

@nh2 nh2 left a comment

This fixes static-haskell-nix's CI.

@jonringer
Copy link
Contributor

@jonringer jonringer commented Feb 16, 2020

diff LGTM, but doesn't fix your use case

@jonringer What did you refer to here?

This PR fixes the issue for me, see #79863 (comment)

oh, i saw the pkgsMusl.libffi failure for aarch64, but he was referencing x86_64 musl build

@jonringer jonringer merged commit b30dc0f into NixOS:master Feb 16, 2020
19 checks passed
19 checks passed
expect, pkgsMusl.libffi on aarch64-linux Failure
Details
Evaluation Performance Report Evaluator Performance Report
Details
expect on aarch64-linux Success
Details
expect on x86_64-darwin Success
Details
expect on x86_64-linux Success
Details
expect, pkgsMusl.libffi on x86_64-darwin Success
Details
expect, pkgsMusl.libffi on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
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
@jonringer
Copy link
Contributor

@jonringer jonringer commented Feb 16, 2020

I'll open @jtojnar's suggestion in a new pr

@jonringer jonringer mentioned this pull request Feb 16, 2020
6 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.