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

8311631: When multiple users run tools/jpackage/share/LicenseTest.java, Permission denied for writing /var/tmp/*.files #14802

Closed
wants to merge 4 commits into from

Conversation

yaqsun
Copy link
Contributor

@yaqsun yaqsun commented Jul 7, 2023

The prerequisite is to install the rpmbuild command, when multiple users switch to write /var/tmp/*.files will have the permission forbidden.


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-8311631: When multiple users run tools/jpackage/share/LicenseTest.java, Permission denied for writing /var/tmp/*.files (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14802

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

Using diff file

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

Webrev

Link to Webrev Comment

…a, Permission denied for writing /var/tmp/*.files.
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 7, 2023

👋 Welcome back yaqsun! 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 Jul 7, 2023

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Jul 7, 2023
@yaqsun yaqsun changed the title When multiple users run tools/jpackage/share/LicenseTest.java, Permission denied for writing /var/tmp/*.files 8311631: When multiple users run tools/jpackage/share/LicenseTest.java, Permission denied for writing /var/tmp/*.files Jul 8, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 8, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 8, 2023

Webrevs

@alexeysemenyukoracle
Copy link
Member

The change affects jpackage rpm spec template file. It is misleading to state that this change is Low risk, only test changes.

Copy link
Member

@alexeysemenyukoracle alexeysemenyukoracle left a comment

Choose a reason for hiding this comment

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

How about %{buildroot}? Shouldn't it be user-specific as well?
I'd rather add a clean-up code to delete intermediate files if they for some reason are left behind after running rpmbuild command without altering paths to these files

@yaqsun
Copy link
Contributor Author

yaqsun commented Jul 12, 2023

The change affects jpackage rpm spec template file. It is misleading to state that this change is Low risk, only test changes.

My mistake, I will update the initial comment.

@alexeysemenyukoracle
Copy link
Member

I believe the problem is the use of %{_tmppath} for the root of intermediate files. Should be changed to %{_builddir} or some other user-specific directory

…a, Permission denied for writing /var/tmp/*.files
@alexeysemenyukoracle
Copy link
Member

The fix with %{_builddir} looks better. Did it resolve the issue?

@yaqsun
Copy link
Contributor Author

yaqsun commented Jul 17, 2023

The fix with %{_builddir} looks better. Did it resolve the issue?

Yes, it solved. The root of intermediate files changed to /tmp/jdk.jpackage16701381473798822/BUILD/commonlicensetest.filesystem.files.

@openjdk
Copy link

openjdk bot commented Jul 18, 2023

@yaqsun 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:

8311631: When multiple users run tools/jpackage/share/LicenseTest.java, Permission denied for writing /var/tmp/*.files

Reviewed-by: asemenyuk, almatvee

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 158 new commits pushed to the master branch:

  • 0487aa6: 8312530: Problemlist runtime/os/TestTrimNative.java
  • 8d1ab57: 8301341: LinkedTransferQueue does not respect timeout for poll()
  • bfa76df: 8311978: Shenandoah: Create abstraction over heap metrics for heuristics
  • 3c644dc: 8312044: Simplify toolkit Builder/Writer world
  • f4ba7b2: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final
  • d55d7e8: 8136895: Writer not closed with disk full error, file resource leaked
  • 8042a50: 8309305: sun/security/ssl/SSLSocketImpl/BlockedAsyncClose.java fails with jtreg test timeout
  • 84b325b: 8312182: THPs cause huge RSS due to thread start timing issue
  • 842d632: 8227229: Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6
  • 9e4fc56: 8293114: JVM should trim the native heap
  • ... and 148 more: https://git.openjdk.org/jdk/compare/25cbe85d6f46bed82c7f1266ce52c86943e29d60...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@alexeysemenyukoracle, @sashamatveev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 18, 2023
@yaqsun
Copy link
Contributor Author

yaqsun commented Jul 19, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 19, 2023
@openjdk
Copy link

openjdk bot commented Jul 19, 2023

@yaqsun
Your change (at version fcab800) is now ready to be sponsored by a Committer.

@theaoqi
Copy link
Member

theaoqi commented Jul 22, 2023

@alexeysemenyukoracle , could you help to sponsor this? Thanks!

@theaoqi
Copy link
Member

theaoqi commented Jul 22, 2023

@yaqsun , I suggest you enable GHA and trigger a run, before this patch is merged.

…a, Permission denied for writing /var/tmp/*.files
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Jul 22, 2023
@yaqsun
Copy link
Contributor Author

yaqsun commented Jul 24, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 24, 2023
@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@yaqsun
Your change (at version d739616) is now ready to be sponsored by a Committer.

@alexeysemenyukoracle
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 24, 2023

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

  • d5c6b0d: 8311261: [AIX] TestAlwaysPreTouchStacks.java fails due to java.lang.RuntimeException: Did not find expected NMT output
  • d1cc278: 8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [i4] but found [I4]
  • 3caf64e: 8309238: jdk/jfr/tool/TestView.java failed with "exitValue = 134"
  • 298dda4: 8301457: Code in SendPortZero.java is uncommented even after JDK-8236852 was fixed
  • 7dd4799: 8311847: Fix -Wconversion for assembler.hpp emit_int8,16 callers
  • 197981b: 8311881: jdk/javax/swing/ProgressMonitor/ProgressTest.java does not show the ProgressMonitorInputStream all the time
  • 04f39e1: 8310316: Failing HotSpot Compiler directives are too verbose
  • f3ade38: 8308593: Add Keepalive Extended Socket Options Support for Windows
  • ab821aa: 6442919: JFilechooser popup still left-to-right when JFilechooser is set to right-to-left
  • 0328886: 8311955: c++filt is now ibm-llvm-cxxfilt when using xlc17 / clang on AIX
  • ... and 158 more: https://git.openjdk.org/jdk/compare/25cbe85d6f46bed82c7f1266ce52c86943e29d60...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 24, 2023
@openjdk openjdk bot closed this Jul 24, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jul 24, 2023
@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@alexeysemenyukoracle @yaqsun Pushed as commit fac9f88.

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

@yaqsun yaqsun deleted the 8311631 branch July 25, 2023 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants