java-11-openjdk/CheckVendor.java
Andrew Hughes b4c85aad69 Update to jdk-11.0.10.0+9
Update release notes to 11.0.10.0+9
Use JEP-322 Time-Based Versioning so we can handle a future 11.0.9.1-like release correctly.
Still use 11.0.x rather than 11.0.x.0 for file naming, as the trailing zero is omitted from tags.
Revert configure and built_doc_archive hacks to build 11.0.9.1 from 11.0.9.0 sources, and synced with RHEL version.
Cleanup debug package descriptions and version number placement.
Drop JDK-8250861, JDK-8222286 & JDK-8254177 as applied upstream
Use system harfbuzz now this is supported.
Update tarball generation script to use PR3818 which handles JDK-8171279 changes
Use RSA as default for keytool, as DSA is disabled in all crypto policies except LEGACY
Adjust RH1842572 patch due to context change from JDK-8213400
Following JDK-8005165, class data sharing can be enabled on all JIT architectures
Introduce stapinstall variable to set SystemTap arch directory correctly (e.g. arm64 on aarch64)
Need to support noarch for creating source RPMs for non-scratch builds.
Update build documentation to reflect this is java-11-openjdk, not java-1.8.0-openjdk
Remove redundant closure and immediate reopening of include_normal_build block.
Include a test in the RPM to check the build has the correct vendor information.
Fix location and comment differences from RHEL.
2021-02-01 04:27:53 +00:00

58 lines
1.8 KiB
Java

/* CheckVendor -- Check the vendor properties match specified values.
Copyright (C) 2020 Red Hat, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @test
*/
public class CheckVendor {
public static void main(String[] args) {
if (args.length < 3) {
System.err.println("CheckVendor <VENDOR> <VENDOR-URL> <VENDOR-BUG-URL>");
System.exit(1);
}
String vendor = System.getProperty("java.vendor");
String expectedVendor = args[0];
String vendorURL = System.getProperty("java.vendor.url");
String expectedVendorURL = args[1];
String vendorBugURL = System.getProperty("java.vendor.url.bug");
String expectedVendorBugURL = args[2];
if (!expectedVendor.equals(vendor)) {
System.err.printf("Invalid vendor %s, expected %s\n",
vendor, expectedVendor);
System.exit(2);
}
if (!expectedVendorURL.equals(vendorURL)) {
System.err.printf("Invalid vendor URL %s, expected %s\n",
vendorURL, expectedVendorURL);
System.exit(3);
}
if (!expectedVendorBugURL.equals(vendorBugURL)) {
System.err.printf("Invalid vendor bug URL%s, expected %s\n",
vendorBugURL, expectedVendorBugURL);
System.exit(4);
}
System.err.printf("Vendor information verified as %s, %s, %s\n",
vendor, vendorURL, vendorBugURL);
}
}