7bbc863a62
- Update release notes to 17.0.4.0+7 - Switch to EA mode for 17.0.4 pre-release builds. - Print release file during build, which should now include a correct SOURCE value from .src-rev - Update tarball script with IcedTea GitHub URL and .src-rev generation - Include script to generate bug list for release notes - Update tzdata requirement to 2022a to match JDK-8283350 - Move EA designator check to prep so failures can be caught earlier - Make EA designator check non-fatal while upstream is not maintaining it - Need to include the '.S' suffix in debuginfo checks after JDK-8284661 - Explicitly require crypto-policies during build and runtime for system security properties - Make use of the vendor version string to store our version & release rather than an upstream release date - Include a test in the RPM to check the build has the correct vendor information. - Fix issue where CheckVendor.java test erroneously passes when it should fail. - Add proper quoting so '&' is not treated as a special character by the shell. Related: RHEL-45216
66 lines
2.3 KiB
Java
66 lines
2.3 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 < 4) {
|
|
System.err.println("CheckVendor <VENDOR> <VENDOR-URL> <VENDOR-BUG-URL> <VENDOR-VERSION-STRING>");
|
|
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];
|
|
String vendorVersionString = System.getProperty("java.vendor.version");
|
|
String expectedVendorVersionString = args[3];
|
|
|
|
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);
|
|
}
|
|
|
|
if (!expectedVendorVersionString.equals(vendorVersionString)) {
|
|
System.err.printf("Invalid vendor version string %s, expected %s\n",
|
|
vendorVersionString, expectedVendorVersionString);
|
|
System.exit(5);
|
|
}
|
|
|
|
System.err.printf("Vendor information verified as %s, %s, %s, %s\n",
|
|
vendor, vendorURL, vendorBugURL, vendorVersionString);
|
|
}
|
|
}
|