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

JDK-8278549: UNIX sun/font coding misses SUSE distro detection on recent distro SUSE 15 #6956

Closed
wants to merge 3 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jan 4, 2022

Hello, please review this adjustment for recent SUSE Linux 15.
The font coding on UNIX, see setOsNameAndVersion in files

src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java
src/java.desktop/unix/classes/sun/font/MFontConfiguration.java

uses the file /etc/SuSE-release to detect SUSE Linux. However on SUSE Linux 15 this file does not exist any more.
Instead /etc/os-release can be used as a replacement on SLES12 and SLES15 :

Example content of /etc/os-release
NAME="SLES"
VERSION="12-SP2"
VERSION_ID="12.2"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2"

There the name and version information is stored (NAME=... , VERSION_ID=...).

Additionally I noticed that there is some code duplication in FcFontConfiguration.java and MFontConfiguration.java , what do you think about moving this to some common place ?

Thanks, Matthias


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8278549: UNIX sun/font coding misses SUSE distro detection on recent distro SUSE 15

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6956/head:pull/6956
$ git checkout pull/6956

Update a local copy of the PR:
$ git checkout pull/6956
$ git pull https://git.openjdk.java.net/jdk pull/6956/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6956

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6956.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 4, 2022

👋 Welcome back mbaesken! 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 openjdk bot added the rfr Pull request is ready for review label Jan 4, 2022
@openjdk
Copy link

openjdk bot commented Jan 4, 2022

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

  • client

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 client client-libs-dev@openjdk.org label Jan 4, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 4, 2022

Webrevs

@@ -295,6 +295,12 @@ private String getVersionString(File f) {
return null;
}

private String getOsinfo(String s) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe call it extractOsInfo?

props.load(fis);
}
osName = props.getProperty("NAME");
osVersion = props.getProperty("VERSION_ID");
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra whitespace.

@MBaesken
Copy link
Member Author

Hi Martin, thanks for your suggestions. I renamed the function and removed the whitespace.
Best regards, Matthias

@MBaesken
Copy link
Member Author

I adjusted MFontConfiguration.java as well.
Best regards, Matthias

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it. I don't know if "JDK-" prefix is allowed in the bug title. Otherwise, looks good.,

@openjdk
Copy link

openjdk bot commented Jan 11, 2022

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

8278549: UNIX sun/font coding misses SUSE distro detection on recent distro SUSE 15

Reviewed-by: mdoerr, lucy

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

  • 35172cd: 8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10
  • 237f861: 8273143: Transition to _thread_in_vm when handling a polling page exception
  • 9209e6d: 8279877: Document IDEA IDE setup in docs/ide.md
  • 0a839b4: 8279801: EC KeyFactory and KeyPairGenerator do not have aliases for OID format
  • 6fcaa32: 8262442: (windows) Use all proxy configuration sources when java.net.useSystemProxies=true
  • c17a012: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java
  • b61a4af: 8259774: Deprecate -XX:FlightRecorderOptions:samplethreads
  • 6933934: 8278597: Remove outdated comments regarding RMISecurityManager in HotSpotAgent.java
  • 4851948: 8279903: Redundant modulo operation in ECDHKeyAgreement
  • 67e3d51: Merge
  • ... and 103 more: https://git.openjdk.java.net/jdk/compare/93c7d90c55034ba8dbcd612366c891ad08c9c54e...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 added the ready Pull request is ready to be integrated label Jan 11, 2022
Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

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

Changes look good to me.
Thanks for making the OS detection "future-proof".

@MBaesken
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 14, 2022

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

  • 965c64b: 8279699: Parallel: More precise boundary in ObjectStartArray::object_starts_in_range
  • 35172cd: 8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10
  • 237f861: 8273143: Transition to _thread_in_vm when handling a polling page exception
  • 9209e6d: 8279877: Document IDEA IDE setup in docs/ide.md
  • 0a839b4: 8279801: EC KeyFactory and KeyPairGenerator do not have aliases for OID format
  • 6fcaa32: 8262442: (windows) Use all proxy configuration sources when java.net.useSystemProxies=true
  • c17a012: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java
  • b61a4af: 8259774: Deprecate -XX:FlightRecorderOptions:samplethreads
  • 6933934: 8278597: Remove outdated comments regarding RMISecurityManager in HotSpotAgent.java
  • 4851948: 8279903: Redundant modulo operation in ECDHKeyAgreement
  • ... and 104 more: https://git.openjdk.java.net/jdk/compare/93c7d90c55034ba8dbcd612366c891ad08c9c54e...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 14, 2022

@MBaesken Pushed as commit 84976b4.

💡 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
client client-libs-dev@openjdk.org integrated Pull request has been integrated
3 participants