Class LinuxRpmBundler
java.lang.Object
jdk.jpackage.internal.LinuxRpmBundler
- All Implemented Interfaces:
Bundler
There are two command line options to configure license information for RPM
packaging: --linux-rpm-license-type and --license-file. Value of
--linux-rpm-license-type command line option configures "License:" section
of RPM spec. Value of --license-file command line option specifies a license
file to be added to the package. License file is a sort of documentation file
but it will be installed even if user selects an option to install the
package without documentation. --linux-rpm-license-type is the primary option
to set license information. --license-file makes little sense in case of RPM
packaging.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final DottedVersion
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Path
buildPackageBundle
(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg, Path outputParentDir) void
Removes temporary files that are used for bundling.protected void
createConfigFiles
(Map<String, String> replacementData, jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg) createReplacementData
(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg) protected void
doValidate
(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg) final Path
Creates a bundle from existing content.final String
getID()
getName()
protected List
<ToolValidator> protected void
initLibProvidersLookup
(LibProvidersLookup libProvidersLookup) boolean
Returns "true" if this bundler is he default for the current platform.boolean
supported
(boolean runtimeInstaller) Returns "true" if this bundler is supported on current platform.toString()
final boolean
Determines if this bundler will execute with the given parameters.protected List
<ConfigException> verifyOutputBundle
(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg, Path packageBundle)
-
Field Details
-
TOOL_RPM
- See Also:
-
TOOL_RPMBUILD
- See Also:
-
TOOL_RPMBUILD_MIN_VERSION
-
-
Constructor Details
-
LinuxRpmBundler
public LinuxRpmBundler()
-
-
Method Details
-
doValidate
protected void doValidate(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg) throws ConfigException - Throws:
ConfigException
-
getToolValidators
-
createConfigFiles
protected void createConfigFiles(Map<String, String> replacementData, jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg) throws IOException- Throws:
IOException
-
buildPackageBundle
protected Path buildPackageBundle(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg, Path outputParentDir) throws PackagerException, IOException - Throws:
PackagerException
IOException
-
createReplacementData
protected Map<String,String> createReplacementData(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg) throws IOException - Throws:
IOException
-
initLibProvidersLookup
-
verifyOutputBundle
protected List<ConfigException> verifyOutputBundle(jdk.jpackage.internal.BuildEnv env, LinuxPackage pkg, Path packageBundle) -
getName
- Returns:
- User Friendly name of this bundler.
-
getID
- Returns:
- Command line identifier of the bundler. Should be unique.
-
supported
public boolean supported(boolean runtimeInstaller) Description copied from interface:Bundler
Returns "true" if this bundler is supported on current platform. -
isDefault
public boolean isDefault()Description copied from interface:Bundler
Returns "true" if this bundler is he default for the current platform. -
validate
Description copied from interface:Bundler
Determines if this bundler will execute with the given parameters.- Parameters:
params
- The parameters to be validate. Validation may modify the map, so if you are going to be using the same map across multiple bundlers you should pass in a deep copy.- Returns:
- true if valid
- Throws:
ConfigException
- If the configuration params are incorrect. The exception may contain advice on how to modify the params map to make it valid.
-
getBundleType
- Returns:
- The bundle type of the bundle that is created by this bundler.
-
execute
public final Path execute(Map<String, ? super Object> params, Path outputParentDir) throws PackagerExceptionDescription copied from interface:Bundler
Creates a bundle from existing content. If a call toBundler.validate(java.util.Map)
date} returns true with the parameters map, then you can expect a valid output. However if an exception was thrown out of validate or it returned false then you should not expect sensible results from this call. It may or may not return a value, and it may or may not throw an exception. But any output should not be considered valid or sane.- Parameters:
params
- The Bundle parameters, Keyed by the id from the ParamInfo. Execution may modify the map, so if you are going to be using the same map across multiple bundlers you should pass in a deep copy.outputParentDir
- The parent dir that the returned bundle will be placed in.- Returns:
- The resulting bundled file For a bundler that produces a single artifact file this will be the location of that artifact (.exe file, .deb file, etc) For a bundler that produces a specific directory format output this will be the location of that specific directory (.app file, etc). For a bundler that produce multiple files, this will be a parent directory of those files (linux and windows images), whose name is not relevant to the result.
- Throws:
PackagerException
-
toString
-
cleanup
-