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

8340075: Autoconf bundle cannot run on read-only filesystem #20978

Closed
wants to merge 1 commit into from

Conversation

erikj79
Copy link
Member

@erikj79 erikj79 commented Sep 12, 2024

The autoconf launcher script in the autoconf bundle created by make/devkit/createAutoconf.sh currently writes a config file into the bundle installation dir every time it runs. This prevents it from functioning when installed on a read-only filesystem. We can work around the need for writing to this config file by instead adding a parameter to the command line sent to the actual autoconf executable.

This is what the script adds to the config file (with the $this_script_dir variable expanded):

begin-language: "M4sugar"
args: --prepend-include $this_script_dir/usr/share/autoconf
end-language: "M4sugar"

Looking at the original config file, it has several lines similar to this where the --prepend-include arg points to $PREFIX/usr/share/autoconf (where $PREFIX was specified at autoconf build time). Removing this addition from the config file causes autoconf to fail as it can't find m4sugar.m4 (which is located in $this_script_dir/usr/share/autoconf).

My proposed workaround, is to just add --prepend-include $this_script_dir/usr/share/autoconf as a command line option to the real autoconf script, which we call from the wrapper script. This would have the benefit of also fixing the other instances of this that are present in the config file, but that we aren't using in our configure script.

In addition to this, I made the script conform better to the current standard for these bundle creation scripts. The output should end up in a sub directory of build. No temp dirs should be used instead of the build dir. I also added some automation for setting the target platform tuple based on uname for the most common platforms, and added the ability to override for any others, without having to edit the file.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340075: Autoconf bundle cannot run on read-only filesystem (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20978/head:pull/20978
$ git checkout pull/20978

Update a local copy of the PR:
$ git checkout pull/20978
$ git pull https://git.openjdk.org/jdk.git pull/20978/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20978

View PR using the GUI difftool:
$ git pr show -t 20978

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20978.diff

Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 12, 2024

👋 Welcome back erikj! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 12, 2024

@erikj79 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8340075: Autoconf bundle cannot run on read-only filesystem

Reviewed-by: mikael

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 16 new commits pushed to the master branch:

  • 37bf589: 8339847: Broken link to the dieharder distribution website in SplittableRandom
  • 89c172a: 8340082: Use inline return tag in java.base
  • 1a0a538: 8340120: Remove redundant code in SegmentBulkOperations::mismatch
  • 89ca89c: 8338626: ClassLoaderExt::process_jar_manifest() should allow / separator on Windows
  • 3e0da58: 8333843: Provide guidelines on MemorySegment to read strings with known lengths
  • 3c4d15b: 8334301: Errors in jpackage man page
  • 4d01178: 8339927: Man page update for deprecating jhsdb debugd for removal
  • bd44cf8: 8330302: strace004 can still fail
  • 8a4ea09: 8336492: Regression in lambda serialization
  • 358ff19: 8339727: Open source several AWT focus tests - series 1
  • ... and 6 more: https://git.openjdk.org/jdk/compare/81ff91ef27a6a856ae2c453a9a9b8333b91da3ab...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title JDK-8340075 8340075: Autoconf bundle cannot run on read-only filesystem Sep 12, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 12, 2024
@openjdk
Copy link

openjdk bot commented Sep 12, 2024

@erikj79 The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Sep 12, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 12, 2024

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 13, 2024
@erikj79
Copy link
Member Author

erikj79 commented Sep 13, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Sep 13, 2024

Going to push as commit 3aa8338.
Since your change was applied there have been 16 commits pushed to the master branch:

  • 37bf589: 8339847: Broken link to the dieharder distribution website in SplittableRandom
  • 89c172a: 8340082: Use inline return tag in java.base
  • 1a0a538: 8340120: Remove redundant code in SegmentBulkOperations::mismatch
  • 89ca89c: 8338626: ClassLoaderExt::process_jar_manifest() should allow / separator on Windows
  • 3e0da58: 8333843: Provide guidelines on MemorySegment to read strings with known lengths
  • 3c4d15b: 8334301: Errors in jpackage man page
  • 4d01178: 8339927: Man page update for deprecating jhsdb debugd for removal
  • bd44cf8: 8330302: strace004 can still fail
  • 8a4ea09: 8336492: Regression in lambda serialization
  • 358ff19: 8339727: Open source several AWT focus tests - series 1
  • ... and 6 more: https://git.openjdk.org/jdk/compare/81ff91ef27a6a856ae2c453a9a9b8333b91da3ab...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 13, 2024
@openjdk openjdk bot closed this Sep 13, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 13, 2024
@openjdk
Copy link

openjdk bot commented Sep 13, 2024

@erikj79 Pushed as commit 3aa8338.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

None yet

2 participants