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

bash: don't rely on patch timestamps in build #117127

Merged
merged 1 commit into from
Mar 27, 2021

Conversation

raboof
Copy link
Member

@raboof raboof commented Mar 21, 2021

Motivation for this change

When, after patching, configure.ac is newer than configure, the
Makefile will try to regenerate configure from configure.ac.

While that might usually be desirable, in this case we want to keep
bootstrapping simple and directly use the configure from the package
so we can avoid a dependency on automake.

Previously, we used the -T parameter to automake to make sure the
timestamps were okay. However, this is brittle when we update: when the
timestamp of the original file changes, and no longer matches the
timestamp of the original file in the patch, patch will show a warning
but otherwise continue without updating the timestamp.

This PR changes things so we only patch configure, so that will always
have a newer timestamp.

Refs #115177

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.

When, after patching, `configure.ac` is newer than `configure`, the
Makefile will try to regenerate `configure` from `configure.ac`.

While that might usually be desirable, in this case we want to keep
bootstrapping simple and directly use the `configure` from the package
so we can avoid a dependency on automake.

Previously, we used the `-T` parameter to automake to make sure the
timestamps were okay. However, this is brittle when we update: when the
timestamp of the original file changes, and no longer matches the
timestamp of the original file in the patch, `patch` will show a warning
but otherwise continue without updating the timestamp.

This PR changes things so we only patch `configure`, so that will always
have a newer timestamp.

Refs NixOS#115177
@andersk
Copy link
Contributor

andersk commented Mar 21, 2021

I assume that the bash change needs to go through staging. Perhaps it can be split from the bash_5 change, which is the only one causing a real problem right now and can go through master.

@raboof
Copy link
Member Author

raboof commented Mar 21, 2021 via email

@SuperSandro2000
Copy link
Member

/rebase staging

@github-actions
Copy link
Contributor

Failed to rebase

@raboof raboof changed the base branch from master to staging March 22, 2021 11:29
@raboof
Copy link
Member Author

raboof commented Mar 22, 2021

broke out the bash_5 part into #117210, retargeted this one to staging

@vcunat vcunat merged commit dabcb87 into NixOS:staging Mar 27, 2021
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.

4 participants