diff --git a/apidocs/index.html b/apidocs/index.html index 3251c7d52..58fa3c30a 100644 --- a/apidocs/index.html +++ b/apidocs/index.html @@ -1 +1 @@ - + diff --git a/release/1.10/apidocs/allclasses-index.html b/release/1.10/apidocs/allclasses-index.html new file mode 100644 index 000000000..43739c5e2 --- /dev/null +++ b/release/1.10/apidocs/allclasses-index.html @@ -0,0 +1,251 @@ + + + + + +All Classes (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes

+
+
+
+
+
+
Class
+
Description
+ +
+
Base Producer class providing including/excluding.
+
+ +
+
Binary package control file.
+
+ +
+
A ChangeSet basically reflect a release as defined in the changes file.
+
+ +
+
Reflecting a changes file
+
+ +
 
+ +
+
Compression method used for the data file.
+
+ +
+
Plug in your favorite log implementation.
+
+ +
+
A field of a control file.
+
+ +
+
The format of a field.
+
+ +
+
A control file as specified by the Debian policy.
+
+ +
+
Ant "data" element acting as a factory for DataProducers.
+
+ +
+
Maven "data" element acting as a factory for DataProducers.
+
+ +
+
A DataConsumer consumes Data produced from a producer.
+
+ +
+
Provides Data to a DataConsumer.
+
+ +
+
Providing data from an archive keeping permissions and ownerships.
+
+ +
+
DataProducer iterating over a directory.
+
+ +
+
DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+ +
+
Data producer that places multiple files into a single + destination directory.
+
+ +
+
DataProducer providing data from an Ant fileset.
+
+ +
+
DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+ +
 
+ +
+
AntTask for creating debian archives.
+
+ +
+
A generic class for creating Debian archives.
+
+ +
+
Creates Debian package
+
+ +
 
+ +
 
+ +
+
Convenience class to provide digest info and length of a stream.
+
+ +
+
Defines a symbolic or hard link.
+
+ +
+
Reads permissions and ownerships from a "ls -laR > mapping.txt" dump and + maps entries accordingly.
+
+ +
 
+ +
+
Ant "mapper" element acting as factory for the entry mapper.
+
+ +
+
Maps one entry to another.
+
+ +
+
Maven "mapper" element acting as factory for the entry mapper.
+
+ +
+
Resolve variables based on a Map.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
Something went wrong while building the package
+
+ +
+
Applies a uniform set of permissions and ownership to all entries.
+
+ +
+
An output stream that calculates the signature of the input data as it + is written
+
+ +
+
Signing with OpenPGP.
+
+ +
+
Simple utilities to deal with symbolic links
+
+ +
 
+ +
+
Gets the changes from a changes file.
+
+ +
+
Simple utils functions.
+
+ +
+
Interface for resolving variables.
+
+
+
+
+
+ +
+
+ + diff --git a/release/1.10/apidocs/allpackages-index.html b/release/1.10/apidocs/allpackages-index.html new file mode 100644 index 000000000..06bcdbcc6 --- /dev/null +++ b/release/1.10/apidocs/allpackages-index.html @@ -0,0 +1,88 @@ + + + + + +All Packages (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+ +
+ +
+
+ + diff --git a/release/1.10/apidocs/element-list b/release/1.10/apidocs/element-list new file mode 100644 index 000000000..5f470cd59 --- /dev/null +++ b/release/1.10/apidocs/element-list @@ -0,0 +1,9 @@ +org.vafer.jdeb +org.vafer.jdeb.ant +org.vafer.jdeb.changes +org.vafer.jdeb.debian +org.vafer.jdeb.mapping +org.vafer.jdeb.maven +org.vafer.jdeb.producers +org.vafer.jdeb.signing +org.vafer.jdeb.utils diff --git a/release/1.10/apidocs/help-doc.html b/release/1.10/apidocs/help-doc.html new file mode 100644 index 000000000..24c32000d --- /dev/null +++ b/release/1.10/apidocs/help-doc.html @@ -0,0 +1,162 @@ + + + + + +API Help (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+

Overview

+

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enums
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Types
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
+
+
    +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Annotation Type

+

Each annotation type has its own separate page with the following sections:

+
    +
  • Annotation Type Declaration
  • +
  • Annotation Type Description
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
  • Element Details
  • +
+
+
+

Enum

+

Each enum has its own separate page with the following sections:

+
    +
  • Enum Declaration
  • +
  • Enum Description
  • +
  • Enum Constant Summary
  • +
  • Enum Constant Details
  • +
+
+
+

Use

+

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its "Use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
  • +
+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.

+
+
+

Serialized Form

+

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.

+
+
+

Search

+

You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:

+
    +
  • j.l.obj will match "java.lang.Object"
  • +
  • InpStr will match "java.io.InputStream"
  • +
  • HM.cK will match "java.util.HashMap.containsKey(Object)"
  • +
+

Refer to the Javadoc Search Specification for a full description of search features.

+
+
+This help file applies to API documentation generated by the standard doclet.
+ +
+
+ + diff --git a/release/1.10/apidocs/index-all.html b/release/1.10/apidocs/index-all.html new file mode 100644 index 000000000..395912fac --- /dev/null +++ b/release/1.10/apidocs/index-all.html @@ -0,0 +1,977 @@ + + + + + +Index (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I J L M N O P R S T U V W X 
All Classes|All Packages|Serialized Form +

A

+
+
AbstractDataProducer - Class in org.vafer.jdeb.producers
+
+
Base Producer class providing including/excluding.
+
+
AbstractDataProducer(String[], String[], Mapper[]) - Constructor for class org.vafer.jdeb.producers.AbstractDataProducer
+
 
+
addData(Data) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
addFileSet(FileSet) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
addLink(Link) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
addMapper(Mapper) - Method in class org.vafer.jdeb.ant.Data
+
 
+
addTarFileSet(Tar.TarFileSet) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
+

B

+
+
bigNumberMode() - Method in class org.vafer.jdeb.TarOptions
+
 
+
bigNumberMode(String) - Method in class org.vafer.jdeb.TarOptions
+
 
+
BinaryPackageControlFile - Class in org.vafer.jdeb.debian
+
+
Binary package control file.
+
+
BinaryPackageControlFile() - Constructor for class org.vafer.jdeb.debian.BinaryPackageControlFile
+
 
+
BinaryPackageControlFile(InputStream) - Constructor for class org.vafer.jdeb.debian.BinaryPackageControlFile
+
 
+
BinaryPackageControlFile(String) - Constructor for class org.vafer.jdeb.debian.BinaryPackageControlFile
+
 
+
BZIP2 - Enum constant in enum org.vafer.jdeb.Compression
+
 
+
+

C

+
+
ChangeSet - Class in org.vafer.jdeb.changes
+
+
A ChangeSet basically reflect a release as defined in the changes file.
+
+
ChangeSet(String, String, Date, String, String, String, String[]) - Constructor for class org.vafer.jdeb.changes.ChangeSet
+
 
+
ChangesFile - Class in org.vafer.jdeb.debian
+
+
Reflecting a changes file
+
+
ChangesFile() - Constructor for class org.vafer.jdeb.debian.ChangesFile
+
 
+
ChangesProvider - Interface in org.vafer.jdeb.changes
+
 
+
clearSign(InputStream, OutputStream) - Method in class org.vafer.jdeb.signing.PGPSigner
+
+
Creates a clear sign signature over the input data.
+
+
clearSign(String, OutputStream) - Method in class org.vafer.jdeb.signing.PGPSigner
+
+
Creates a clear sign signature over the input data.
+
+
compression() - Method in class org.vafer.jdeb.TarOptions
+
 
+
compression(Compression) - Method in class org.vafer.jdeb.TarOptions
+
 
+
Compression - Enum in org.vafer.jdeb
+
+
Compression method used for the data file.
+
+
Console - Interface in org.vafer.jdeb
+
+
Plug in your favorite log implementation.
+
+
ControlField - Class in org.vafer.jdeb.debian
+
+
A field of a control file.
+
+
ControlField(String) - Constructor for class org.vafer.jdeb.debian.ControlField
+
 
+
ControlField(String, boolean) - Constructor for class org.vafer.jdeb.debian.ControlField
+
 
+
ControlField(String, boolean, ControlField.Type) - Constructor for class org.vafer.jdeb.debian.ControlField
+
 
+
ControlField(String, boolean, ControlField.Type, boolean) - Constructor for class org.vafer.jdeb.debian.ControlField
+
 
+
ControlField.Type - Enum in org.vafer.jdeb.debian
+
+
The format of a field.
+
+
ControlFile - Class in org.vafer.jdeb.debian
+
+
A control file as specified by the Debian policy.
+
+
ControlFile() - Constructor for class org.vafer.jdeb.debian.ControlFile
+
 
+
convertToDebianVersion(String, boolean, String, String, Date) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Convert the project version to a version suitable for a Debian package.
+
+
copy(InputStream, OutputStream) - Static method in class org.vafer.jdeb.utils.Utils
+
 
+
createDeb(Compression) - Method in class org.vafer.jdeb.DebMaker
+
+
Create the debian archive with from the provided control files and data producers.
+
+
createMapper() - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
createMapper() - Method in class org.vafer.jdeb.maven.Mapper
+
 
+
createSignedDeb(Compression, PGPSignatureGenerator, PGPSigner) - Method in class org.vafer.jdeb.DebMaker
+
+
Create the debian archive with from the provided control files and data producers.
+
+
+

D

+
+
Data - Class in org.vafer.jdeb.ant
+
+
Ant "data" element acting as a factory for DataProducers.
+
+
Data - Class in org.vafer.jdeb.maven
+
+
Maven "data" element acting as a factory for DataProducers.
+
+
Data() - Constructor for class org.vafer.jdeb.ant.Data
+
 
+
Data() - Constructor for class org.vafer.jdeb.maven.Data
+
 
+
DataConsumer - Interface in org.vafer.jdeb
+
+
A DataConsumer consumes Data produced from a producer.
+
+
DataProducer - Interface in org.vafer.jdeb
+
+
Provides Data to a DataConsumer.
+
+
DataProducerArchive - Class in org.vafer.jdeb.producers
+
+
Providing data from an archive keeping permissions and ownerships.
+
+
DataProducerArchive(File, String[], String[], Mapper[]) - Constructor for class org.vafer.jdeb.producers.DataProducerArchive
+
 
+
DataProducerDirectory - Class in org.vafer.jdeb.producers
+
+
DataProducer iterating over a directory.
+
+
DataProducerDirectory(File, String[], String[], Mapper[]) - Constructor for class org.vafer.jdeb.producers.DataProducerDirectory
+
 
+
DataProducerFile - Class in org.vafer.jdeb.producers
+
+
DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+
DataProducerFile(File, String, String[], String[], Mapper[]) - Constructor for class org.vafer.jdeb.producers.DataProducerFile
+
 
+
DataProducerFiles - Class in org.vafer.jdeb.producers
+
+
Data producer that places multiple files into a single + destination directory.
+
+
DataProducerFiles(String[], String, Mapper[]) - Constructor for class org.vafer.jdeb.producers.DataProducerFiles
+
 
+
DataProducerFileSet - Class in org.vafer.jdeb.producers
+
+
DataProducer providing data from an Ant fileset.
+
+
DataProducerFileSet(FileSet) - Constructor for class org.vafer.jdeb.producers.DataProducerFileSet
+
 
+
DataProducerLink - Class in org.vafer.jdeb.producers
+
+
DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+
DataProducerLink(String, String, boolean, String[], String[], Mapper[]) - Constructor for class org.vafer.jdeb.producers.DataProducerLink
+
 
+
DataProducerPathTemplate - Class in org.vafer.jdeb.producers
+
 
+
DataProducerPathTemplate(String[], String[], String[], Mapper[]) - Constructor for class org.vafer.jdeb.producers.DataProducerPathTemplate
+
 
+
DebAntTask - Class in org.vafer.jdeb.ant
+
+
AntTask for creating debian archives.
+
+
DebAntTask() - Constructor for class org.vafer.jdeb.ant.DebAntTask
+
 
+
DebMaker - Class in org.vafer.jdeb
+
+
A generic class for creating Debian archives.
+
+
DebMaker(Console, Collection<DataProducer>, Collection<DataProducer>) - Constructor for class org.vafer.jdeb.DebMaker
+
 
+
DebMojo - Class in org.vafer.jdeb.maven
+
+
Creates Debian package
+
+
DebMojo() - Constructor for class org.vafer.jdeb.maven.DebMojo
+
 
+
debug(String) - Method in interface org.vafer.jdeb.Console
+
 
+
defaultString(String, String) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Return fallback if first string is null or empty
+
+
+

E

+
+
execute() - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
execute() - Method in class org.vafer.jdeb.maven.DebMojo
+
+
Main entry point
+
+
+

F

+
+
FAIL - Enum constant in enum org.vafer.jdeb.ant.MissingSourceBehavior
+
 
+
FAIL - Enum constant in enum org.vafer.jdeb.maven.MissingSourceBehavior
+
 
+
FilteredFile - Class in org.vafer.jdeb.utils
+
 
+
FilteredFile(InputStream, VariableResolver) - Constructor for class org.vafer.jdeb.utils.FilteredFile
+
 
+
FOLDED - Enum constant in enum org.vafer.jdeb.debian.ControlField.Type
+
+
Value on multiple lines, space characters are ignored
+
+
format(String) - Method in class org.vafer.jdeb.debian.ControlField
+
+
Returns the field with the specified value properly formatted.
+
+
formatDate(Date) - Static method in class org.vafer.jdeb.debian.ChangesFile
+
 
+
+

G

+
+
generateASCIISignature() - Method in class org.vafer.jdeb.utils.PGPSignatureOutputStream
+
 
+
generateSignature() - Method in class org.vafer.jdeb.utils.PGPSignatureOutputStream
+
 
+
get(String) - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
get(String) - Method in class org.vafer.jdeb.utils.MapVariableResolver
+
 
+
get(String) - Method in interface org.vafer.jdeb.utils.VariableResolver
+
 
+
getChangedBy() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
getChanges() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
getChangesSets() - Method in interface org.vafer.jdeb.changes.ChangesProvider
+
 
+
getChangesSets() - Method in class org.vafer.jdeb.changes.TextfileChangesProvider
+
 
+
getConffile() - Method in class org.vafer.jdeb.ant.Data
+
 
+
getConffile() - Method in class org.vafer.jdeb.maven.Data
+
 
+
getDate() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
getDigest() - Method in class org.vafer.jdeb.DebMaker
+
 
+
getDistribution() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
getEncoding() - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
getExtension() - Method in enum org.vafer.jdeb.Compression
+
+
Returns the extension of the compression method
+
+
getFields() - Method in class org.vafer.jdeb.debian.BinaryPackageControlFile
+
 
+
getFields() - Method in class org.vafer.jdeb.debian.ChangesFile
+
 
+
getFields() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
getGid() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getGroup() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getHexDigest() - Method in class org.vafer.jdeb.utils.InformationOutputStream
+
 
+
getKnownPGPSecureRingLocations() - Static method in class org.vafer.jdeb.utils.Utils
+
+
Get the known locations where the secure keyring can be located.
+
+
getMandatoryFields() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
getMode() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getName() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getName() - Method in class org.vafer.jdeb.debian.ControlField
+
 
+
getPackage() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
getPrivateKey() - Method in class org.vafer.jdeb.signing.PGPSigner
+
+
Returns the private key.
+
+
getSecretKey() - Method in class org.vafer.jdeb.signing.PGPSigner
+
+
Returns the secret key.
+
+
getShortDescription() - Method in class org.vafer.jdeb.debian.BinaryPackageControlFile
+
+
Returns the short description of the package.
+
+
getSize() - Method in class org.vafer.jdeb.utils.InformationOutputStream
+
 
+
getTarget() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getType() - Method in class org.vafer.jdeb.ant.Data
+
 
+
getType() - Method in class org.vafer.jdeb.debian.ControlField
+
 
+
getUid() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getUrgency() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
getUserDefinedFieldLetter() - Method in class org.vafer.jdeb.debian.BinaryPackageControlFile
+
 
+
getUserDefinedFieldLetter() - Method in class org.vafer.jdeb.debian.ChangesFile
+
 
+
getUserDefinedFieldLetter() - Method in class org.vafer.jdeb.debian.ControlFile
+
+
Returns the letter expected in the prefix of a user defined field + in order to include the field in this control file.
+
+
getUserDefinedFieldName(String) - Method in class org.vafer.jdeb.debian.ControlFile
+
+
Returns the user defined field without its prefix.
+
+
getUserDefinedFieldNames() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
getUserDefinedFields() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
getUsername() - Method in class org.vafer.jdeb.ant.Link
+
 
+
getVersion() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
guessKeyRingFile() - Static method in class org.vafer.jdeb.utils.Utils
+
+
Tries to guess location of the user secure keyring using various + heuristics.
+
+
GZIP - Enum constant in enum org.vafer.jdeb.Compression
+
 
+
+

H

+
+
hasBom() - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
hasUnixLineEndings() - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
+

I

+
+
IGNORE - Enum constant in enum org.vafer.jdeb.ant.MissingSourceBehavior
+
 
+
IGNORE - Enum constant in enum org.vafer.jdeb.maven.MissingSourceBehavior
+
 
+
info(String) - Method in interface org.vafer.jdeb.Console
+
 
+
InformationInputStream - Class in org.vafer.jdeb.utils
+
 
+
InformationInputStream(InputStream) - Constructor for class org.vafer.jdeb.utils.InformationInputStream
+
 
+
InformationOutputStream - Class in org.vafer.jdeb.utils
+
+
Convenience class to provide digest info and length of a stream.
+
+
InformationOutputStream(OutputStream, MessageDigest) - Constructor for class org.vafer.jdeb.utils.InformationOutputStream
+
 
+
initialize(BinaryPackageControlFile) - Method in class org.vafer.jdeb.debian.ChangesFile
+
+
Initializes the fields on the changes file with the values of the specified + binary package control file.
+
+
initializeVariableResolver(Map<String, String>) - Method in class org.vafer.jdeb.maven.DebMojo
+
 
+
INSTANCE - Static variable in class org.vafer.jdeb.mapping.NullMapper
+
 
+
invalidFields() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
isBlank(CharSequence) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Check if a CharSequence is whitespace, empty ("") or null.
+
+
isFirstLineEmpty() - Method in class org.vafer.jdeb.debian.ControlField
+
 
+
isIncluded(String) - Method in class org.vafer.jdeb.producers.AbstractDataProducer
+
 
+
isMandatory() - Method in class org.vafer.jdeb.debian.ControlField
+
 
+
isNullOrEmpty(String) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Returns true if string is null or empty.
+
+
isShell() - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
isSymbolic() - Method in class org.vafer.jdeb.ant.Link
+
 
+
isSymbolicLink(File) - Static method in class org.vafer.jdeb.utils.SymlinkUtils
+
 
+
isUserDefinedField(String) - Method in class org.vafer.jdeb.debian.ControlFile
+
+
Tells if the specified field name is a user defined field.
+
+
isValid() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
+

J

+
+
joinLocalPath(String...) - Static method in class org.vafer.jdeb.utils.Utils
+
 
+
joinUnixPath(String...) - Static method in class org.vafer.jdeb.utils.Utils
+
 
+
+

L

+
+
Link - Class in org.vafer.jdeb.ant
+
+
Defines a symbolic or hard link.
+
+
Link() - Constructor for class org.vafer.jdeb.ant.Link
+
 
+
longFileMode() - Method in class org.vafer.jdeb.TarOptions
+
 
+
longFileMode(String) - Method in class org.vafer.jdeb.TarOptions
+
 
+
lookupIfEmpty(String, Map<String, String>, String) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Extracts value from map if given value is null.
+
+
LsMapper - Class in org.vafer.jdeb.mapping
+
+
Reads permissions and ownerships from a "ls -laR > mapping.txt" dump and + maps entries accordingly.
+
+
LsMapper(InputStream) - Constructor for class org.vafer.jdeb.mapping.LsMapper
+
 
+
LsMapper.ParseError - Exception in org.vafer.jdeb.mapping
+
 
+
+

M

+
+
makeDeb() - Method in class org.vafer.jdeb.DebMaker
+
 
+
map(TarArchiveEntry) - Method in class org.vafer.jdeb.mapping.LsMapper
+
 
+
map(TarArchiveEntry) - Method in interface org.vafer.jdeb.mapping.Mapper
+
 
+
map(TarArchiveEntry) - Method in class org.vafer.jdeb.mapping.NullMapper
+
 
+
map(TarArchiveEntry) - Method in class org.vafer.jdeb.mapping.PermMapper
+
 
+
map(TarArchiveEntry) - Method in class org.vafer.jdeb.producers.AbstractDataProducer
+
 
+
Mapper - Class in org.vafer.jdeb.ant
+
+
Ant "mapper" element acting as factory for the entry mapper.
+
+
Mapper - Class in org.vafer.jdeb.maven
+
+
Maven "mapper" element acting as factory for the entry mapper.
+
+
Mapper - Interface in org.vafer.jdeb.mapping
+
+
Maps one entry to another.
+
+
Mapper() - Constructor for class org.vafer.jdeb.ant.Mapper
+
 
+
Mapper() - Constructor for class org.vafer.jdeb.maven.Mapper
+
 
+
MapVariableResolver - Class in org.vafer.jdeb.utils
+
+
Resolve variables based on a Map.
+
+
MapVariableResolver(Map<String, String>) - Constructor for class org.vafer.jdeb.utils.MapVariableResolver
+
 
+
MissingSourceBehavior - Enum in org.vafer.jdeb.ant
+
 
+
MissingSourceBehavior - Enum in org.vafer.jdeb.maven
+
 
+
movePath(String, String) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Construct new path by replacing file directory part.
+
+
MULTILINE - Enum constant in enum org.vafer.jdeb.debian.ControlField.Type
+
+
Value on multiple lines, space characters are preserved
+
+
+

N

+
+
NONE - Enum constant in enum org.vafer.jdeb.Compression
+
 
+
NullMapper - Class in org.vafer.jdeb.mapping
+
 
+
+

O

+
+
onEachDir(TarArchiveEntry) - Method in interface org.vafer.jdeb.DataConsumer
+
 
+
onEachFile(InputStream, TarArchiveEntry) - Method in interface org.vafer.jdeb.DataConsumer
+
 
+
onEachLink(TarArchiveEntry) - Method in interface org.vafer.jdeb.DataConsumer
+
 
+
org.vafer.jdeb - package org.vafer.jdeb
+
 
+
org.vafer.jdeb.ant - package org.vafer.jdeb.ant
+
 
+
org.vafer.jdeb.changes - package org.vafer.jdeb.changes
+
 
+
org.vafer.jdeb.debian - package org.vafer.jdeb.debian
+
 
+
org.vafer.jdeb.mapping - package org.vafer.jdeb.mapping
+
 
+
org.vafer.jdeb.maven - package org.vafer.jdeb.maven
+
 
+
org.vafer.jdeb.producers - package org.vafer.jdeb.producers
+
 
+
org.vafer.jdeb.signing - package org.vafer.jdeb.signing
+
 
+
org.vafer.jdeb.utils - package org.vafer.jdeb.utils
+
 
+
OutputTimestampResolver - Class in org.vafer.jdeb.utils
+
 
+
OutputTimestampResolver(Console) - Constructor for class org.vafer.jdeb.utils.OutputTimestampResolver
+
 
+
+

P

+
+
PackagingException - Exception in org.vafer.jdeb
+
+
Something went wrong while building the package
+
+
PackagingException() - Constructor for exception org.vafer.jdeb.PackagingException
+
 
+
PackagingException(String) - Constructor for exception org.vafer.jdeb.PackagingException
+
 
+
PackagingException(String, Throwable) - Constructor for exception org.vafer.jdeb.PackagingException
+
 
+
PackagingException(Throwable) - Constructor for exception org.vafer.jdeb.PackagingException
+
 
+
parse(InputStream) - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
parse(String) - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
ParseError(String) - Constructor for exception org.vafer.jdeb.mapping.LsMapper.ParseError
+
 
+
PermMapper - Class in org.vafer.jdeb.mapping
+
+
Applies a uniform set of permissions and ownership to all entries.
+
+
PermMapper(int, int, String, String, int, int, int, String) - Constructor for class org.vafer.jdeb.mapping.PermMapper
+
 
+
PermMapper(int, int, String, String, String, String, int, String) - Constructor for class org.vafer.jdeb.mapping.PermMapper
+
 
+
PGPSignatureOutputStream - Class in org.vafer.jdeb.utils
+
+
An output stream that calculates the signature of the input data as it + is written
+
+
PGPSignatureOutputStream(PGPSignatureGenerator) - Constructor for class org.vafer.jdeb.utils.PGPSignatureOutputStream
+
 
+
PGPSigner - Class in org.vafer.jdeb.signing
+
+
Signing with OpenPGP.
+
+
PGPSigner(InputStream, String, String, int) - Constructor for class org.vafer.jdeb.signing.PGPSigner
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.ant.Data
+
 
+
produce(DataConsumer) - Method in interface org.vafer.jdeb.DataProducer
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.maven.Data
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerArchive
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerDirectory
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerFile
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerFiles
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerFileSet
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerLink
+
 
+
produce(DataConsumer) - Method in class org.vafer.jdeb.producers.DataProducerPathTemplate
+
 
+
produceDir(DataConsumer, String) - Method in class org.vafer.jdeb.producers.AbstractDataProducer
+
 
+
produceFile(DataConsumer, File, String) - Method in class org.vafer.jdeb.producers.AbstractDataProducer
+
 
+
+

R

+
+
read() - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
read(byte[], int, int) - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
readPropertiesFromActiveProfiles(String, String...) - Method in class org.vafer.jdeb.maven.DebMojo
+
+
Read properties from the active profiles.
+
+
readSymbolicLink(File) - Static method in class org.vafer.jdeb.utils.SymlinkUtils
+
 
+
replaceVariables(VariableResolver, String, String, String) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Substitute the variables in the given expression with the + values from the resolver
+
+
resolveOutputTimestamp(String) - Method in class org.vafer.jdeb.utils.OutputTimestampResolver
+
 
+
+

S

+
+
save(OutputStream) - Method in class org.vafer.jdeb.changes.TextfileChangesProvider
+
 
+
set(String, String) - Method in class org.vafer.jdeb.debian.BinaryPackageControlFile
+
 
+
set(String, String) - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
setChanges(ChangeSet[]) - Method in class org.vafer.jdeb.debian.ChangesFile
+
 
+
setChangesIn(File) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setChangesIn(File) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setChangesOut(File) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setChangesOut(File) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setChangesSave(File) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setChangesSave(File) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setCloseReplaceToken(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setCloseReplaceToken(String) - Method in class org.vafer.jdeb.maven.DebMojo
+
 
+
setCloseToken(String) - Method in class org.vafer.jdeb.utils.FilteredFile
+
 
+
setCompression(String) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setCompression(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setConffile(boolean) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setConffile(Boolean) - Method in class org.vafer.jdeb.ant.Data
+
 
+
setControl(File) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setControl(File) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setData(Data[]) - Method in class org.vafer.jdeb.maven.DebMojo
+
 
+
setDeb(File) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setDepends(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setDescription(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setDestfile(File) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setDigest(String) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setDigest(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setDirMode(String) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setDst(String) - Method in class org.vafer.jdeb.ant.Data
+
 
+
setDst(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setExcludes(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setFileMode(String) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setGid(int) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setGid(int) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setGroup(String) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setGroup(String) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setHomepage(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setIncludes(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setKey(String) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setKey(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setKeyring(File) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setKeyring(File) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setLinkName(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setLinkTarget(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setMissingSrc(String) - Method in class org.vafer.jdeb.ant.Data
+
 
+
setMissingSrc(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setMode(String) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setName(String) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setOpenReplaceToken(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setOpenReplaceToken(String) - Method in class org.vafer.jdeb.maven.DebMojo
+
 
+
setOpenToken(String) - Method in class org.vafer.jdeb.utils.FilteredFile
+
 
+
setOutputTimestampMs(Long) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setPackage(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setPassphrase(String) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
setPassphrase(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setPrefix(String) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setResolver(VariableResolver) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setSection(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setSignChanges(boolean) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setSignMethod(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setSignPackage(boolean) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setSignRole(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setSrc(File) - Method in class org.vafer.jdeb.ant.Data
+
 
+
setSrc(File) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setSrc(File) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setStrip(int) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setSymbolic(boolean) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setSymlink(boolean) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setTarBigNumberMode(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setTarget(String) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setTarLongFileMode(String) - Method in class org.vafer.jdeb.DebMaker
+
 
+
setType(String) - Method in class org.vafer.jdeb.ant.Data
+
 
+
setType(String) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setType(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
setUid(int) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setUid(int) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setUser(String) - Method in class org.vafer.jdeb.ant.Mapper
+
 
+
setUsername(String) - Method in class org.vafer.jdeb.ant.Link
+
 
+
setVerbose(boolean) - Method in class org.vafer.jdeb.ant.DebAntTask
+
 
+
SIMPLE - Enum constant in enum org.vafer.jdeb.debian.ControlField.Type
+
+
Value on a single line
+
+
splitPatterns(String) - Method in class org.vafer.jdeb.maven.Data
+
 
+
stripLeadingSlash(String) - Static method in class org.vafer.jdeb.utils.Utils
+
 
+
stripPath(int, String) - Static method in class org.vafer.jdeb.utils.Utils
+
 
+
SymlinkUtils - Class in org.vafer.jdeb.utils
+
+
Simple utilities to deal with symbolic links
+
+
+

T

+
+
TarOptions - Class in org.vafer.jdeb
+
 
+
TarOptions() - Constructor for class org.vafer.jdeb.TarOptions
+
 
+
TextfileChangesProvider - Class in org.vafer.jdeb.changes
+
+
Gets the changes from a changes file.
+
+
TextfileChangesProvider(InputStream, BinaryPackageControlFile) - Constructor for class org.vafer.jdeb.changes.TextfileChangesProvider
+
 
+
toCompressedOutputStream(OutputStream) - Method in enum org.vafer.jdeb.Compression
+
 
+
toEnum(String) - Static method in enum org.vafer.jdeb.Compression
+
+
Returns the compression method corresponding to the specified name.
+
+
toHex(byte[]) - Static method in class org.vafer.jdeb.utils.Utils
+
 
+
toMode(String) - Static method in class org.vafer.jdeb.mapping.PermMapper
+
 
+
toString() - Method in class org.vafer.jdeb.changes.ChangeSet
+
 
+
toString() - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
toString() - Method in class org.vafer.jdeb.utils.FilteredFile
+
 
+
toString() - Method in class org.vafer.jdeb.utils.InformationInputStream
+
 
+
toString(ControlField...) - Method in class org.vafer.jdeb.debian.ControlFile
+
 
+
toUnixLineEndings(InputStream) - Static method in class org.vafer.jdeb.utils.Utils
+
+
Replaces new line delimiters in the input stream with the Unix line feed.
+
+
+

U

+
+
userDefinedFieldNames - Variable in class org.vafer.jdeb.debian.ControlFile
+
 
+
userDefinedFields - Variable in class org.vafer.jdeb.debian.ControlFile
+
 
+
Utils - Class in org.vafer.jdeb.utils
+
+
Simple utils functions.
+
+
Utils() - Constructor for class org.vafer.jdeb.utils.Utils
+
 
+
+

V

+
+
validate() - Method in class org.vafer.jdeb.DebMaker
+
+
Validates the input parameters.
+
+
valueOf(String) - Static method in enum org.vafer.jdeb.ant.MissingSourceBehavior
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.vafer.jdeb.Compression
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.vafer.jdeb.debian.ControlField.Type
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum org.vafer.jdeb.maven.MissingSourceBehavior
+
+
Returns the enum constant of this type with the specified name.
+
+
values - Variable in class org.vafer.jdeb.debian.ControlFile
+
 
+
values() - Static method in enum org.vafer.jdeb.ant.MissingSourceBehavior
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.vafer.jdeb.Compression
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.vafer.jdeb.debian.ControlField.Type
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum org.vafer.jdeb.maven.MissingSourceBehavior
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
VariableResolver - Interface in org.vafer.jdeb.utils
+
+
Interface for resolving variables.
+
+
+

W

+
+
warn(String) - Method in interface org.vafer.jdeb.Console
+
 
+
write(byte[]) - Method in class org.vafer.jdeb.utils.PGPSignatureOutputStream
+
 
+
write(byte[], int, int) - Method in class org.vafer.jdeb.utils.InformationOutputStream
+
 
+
write(byte[], int, int) - Method in class org.vafer.jdeb.utils.PGPSignatureOutputStream
+
 
+
write(int) - Method in class org.vafer.jdeb.utils.InformationOutputStream
+
 
+
write(int) - Method in class org.vafer.jdeb.utils.PGPSignatureOutputStream
+
 
+
+

X

+
+
XZ - Enum constant in enum org.vafer.jdeb.Compression
+
 
+
+A B C D E F G H I J L M N O P R S T U V W X 
All Classes|All Packages|Serialized Form
+ +
+
+ + diff --git a/release/1.10/apidocs/index.html b/release/1.10/apidocs/index.html new file mode 100644 index 000000000..08b2b93e6 --- /dev/null +++ b/release/1.10/apidocs/index.html @@ -0,0 +1,90 @@ + + + + + +Overview (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

jdeb 1.10 API

+
+ +
+ +
+
+ + diff --git a/release/1.10/apidocs/jquery-ui.overrides.css b/release/1.10/apidocs/jquery-ui.overrides.css new file mode 100644 index 000000000..f89acb632 --- /dev/null +++ b/release/1.10/apidocs/jquery-ui.overrides.css @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; +} diff --git a/release/1.10/apidocs/member-search-index.js b/release/1.10/apidocs/member-search-index.js new file mode 100644 index 000000000..8ea1129ce --- /dev/null +++ b/release/1.10/apidocs/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"org.vafer.jdeb.producers","c":"AbstractDataProducer","l":"AbstractDataProducer(String[], String[], Mapper[])","u":"%3Cinit%3E(java.lang.String[],java.lang.String[],org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"addData(Data)","u":"addData(org.vafer.jdeb.ant.Data)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"addFileSet(FileSet)","u":"addFileSet(org.apache.tools.ant.types.FileSet)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"addLink(Link)","u":"addLink(org.vafer.jdeb.ant.Link)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"addMapper(Mapper)","u":"addMapper(org.vafer.jdeb.ant.Mapper)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"addTarFileSet(Tar.TarFileSet)","u":"addTarFileSet(org.apache.tools.ant.taskdefs.Tar.TarFileSet)"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"bigNumberMode()"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"bigNumberMode(String)","u":"bigNumberMode(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"BinaryPackageControlFile()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"BinaryPackageControlFile(InputStream)","u":"%3Cinit%3E(java.io.InputStream)"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"BinaryPackageControlFile(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.vafer.jdeb","c":"Compression","l":"BZIP2"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"ChangeSet(String, String, Date, String, String, String, String[])","u":"%3Cinit%3E(java.lang.String,java.lang.String,java.util.Date,java.lang.String,java.lang.String,java.lang.String,java.lang.String[])"},{"p":"org.vafer.jdeb.debian","c":"ChangesFile","l":"ChangesFile()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.signing","c":"PGPSigner","l":"clearSign(InputStream, OutputStream)","u":"clearSign(java.io.InputStream,java.io.OutputStream)"},{"p":"org.vafer.jdeb.signing","c":"PGPSigner","l":"clearSign(String, OutputStream)","u":"clearSign(java.lang.String,java.io.OutputStream)"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"compression()"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"compression(Compression)","u":"compression(org.vafer.jdeb.Compression)"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"ControlField(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"ControlField(String, boolean)","u":"%3Cinit%3E(java.lang.String,boolean)"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"ControlField(String, boolean, ControlField.Type)","u":"%3Cinit%3E(java.lang.String,boolean,org.vafer.jdeb.debian.ControlField.Type)"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"ControlField(String, boolean, ControlField.Type, boolean)","u":"%3Cinit%3E(java.lang.String,boolean,org.vafer.jdeb.debian.ControlField.Type,boolean)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"ControlFile()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"convertToDebianVersion(String, boolean, String, String, Date)","u":"convertToDebianVersion(java.lang.String,boolean,java.lang.String,java.lang.String,java.util.Date)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"copy(InputStream, OutputStream)","u":"copy(java.io.InputStream,java.io.OutputStream)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"createDeb(Compression)","u":"createDeb(org.vafer.jdeb.Compression)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"createMapper()"},{"p":"org.vafer.jdeb.maven","c":"Mapper","l":"createMapper()"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"createSignedDeb(Compression, PGPSignatureGenerator, PGPSigner)","u":"createSignedDeb(org.vafer.jdeb.Compression,org.bouncycastle.openpgp.PGPSignatureGenerator,org.vafer.jdeb.signing.PGPSigner)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"Data()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"Data()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.producers","c":"DataProducerArchive","l":"DataProducerArchive(File, String[], String[], Mapper[])","u":"%3Cinit%3E(java.io.File,java.lang.String[],java.lang.String[],org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.producers","c":"DataProducerDirectory","l":"DataProducerDirectory(File, String[], String[], Mapper[])","u":"%3Cinit%3E(java.io.File,java.lang.String[],java.lang.String[],org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.producers","c":"DataProducerFile","l":"DataProducerFile(File, String, String[], String[], Mapper[])","u":"%3Cinit%3E(java.io.File,java.lang.String,java.lang.String[],java.lang.String[],org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.producers","c":"DataProducerFiles","l":"DataProducerFiles(String[], String, Mapper[])","u":"%3Cinit%3E(java.lang.String[],java.lang.String,org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.producers","c":"DataProducerFileSet","l":"DataProducerFileSet(FileSet)","u":"%3Cinit%3E(org.apache.tools.ant.types.FileSet)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerLink","l":"DataProducerLink(String, String, boolean, String[], String[], Mapper[])","u":"%3Cinit%3E(java.lang.String,java.lang.String,boolean,java.lang.String[],java.lang.String[],org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.producers","c":"DataProducerPathTemplate","l":"DataProducerPathTemplate(String[], String[], String[], Mapper[])","u":"%3Cinit%3E(java.lang.String[],java.lang.String[],java.lang.String[],org.vafer.jdeb.mapping.Mapper[])"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"DebAntTask()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"DebMaker(Console, Collection, Collection)","u":"%3Cinit%3E(org.vafer.jdeb.Console,java.util.Collection,java.util.Collection)"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"DebMojo()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb","c":"Console","l":"debug(String)","u":"debug(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"defaultString(String, String)","u":"defaultString(java.lang.String,java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"execute()"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"execute()"},{"p":"org.vafer.jdeb.ant","c":"MissingSourceBehavior","l":"FAIL"},{"p":"org.vafer.jdeb.maven","c":"MissingSourceBehavior","l":"FAIL"},{"p":"org.vafer.jdeb.utils","c":"FilteredFile","l":"FilteredFile(InputStream, VariableResolver)","u":"%3Cinit%3E(java.io.InputStream,org.vafer.jdeb.utils.VariableResolver)"},{"p":"org.vafer.jdeb.debian","c":"ControlField.Type","l":"FOLDED"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"format(String)","u":"format(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ChangesFile","l":"formatDate(Date)","u":"formatDate(java.util.Date)"},{"p":"org.vafer.jdeb.utils","c":"PGPSignatureOutputStream","l":"generateASCIISignature()"},{"p":"org.vafer.jdeb.utils","c":"PGPSignatureOutputStream","l":"generateSignature()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"get(String)","u":"get(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"MapVariableResolver","l":"get(String)","u":"get(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"VariableResolver","l":"get(String)","u":"get(java.lang.String)"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getChangedBy()"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getChanges()"},{"p":"org.vafer.jdeb.changes","c":"ChangesProvider","l":"getChangesSets()"},{"p":"org.vafer.jdeb.changes","c":"TextfileChangesProvider","l":"getChangesSets()"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"getConffile()"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"getConffile()"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getDate()"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"getDigest()"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getDistribution()"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"getEncoding()"},{"p":"org.vafer.jdeb","c":"Compression","l":"getExtension()"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"getFields()"},{"p":"org.vafer.jdeb.debian","c":"ChangesFile","l":"getFields()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"getFields()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getGid()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getGroup()"},{"p":"org.vafer.jdeb.utils","c":"InformationOutputStream","l":"getHexDigest()"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"getKnownPGPSecureRingLocations()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"getMandatoryFields()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getMode()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getName()"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"getName()"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getPackage()"},{"p":"org.vafer.jdeb.signing","c":"PGPSigner","l":"getPrivateKey()"},{"p":"org.vafer.jdeb.signing","c":"PGPSigner","l":"getSecretKey()"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"getShortDescription()"},{"p":"org.vafer.jdeb.utils","c":"InformationOutputStream","l":"getSize()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getTarget()"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"getType()"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"getType()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getUid()"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getUrgency()"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"getUserDefinedFieldLetter()"},{"p":"org.vafer.jdeb.debian","c":"ChangesFile","l":"getUserDefinedFieldLetter()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"getUserDefinedFieldLetter()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"getUserDefinedFieldName(String)","u":"getUserDefinedFieldName(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"getUserDefinedFieldNames()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"getUserDefinedFields()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"getUsername()"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"getVersion()"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"guessKeyRingFile()"},{"p":"org.vafer.jdeb","c":"Compression","l":"GZIP"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"hasBom()"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"hasUnixLineEndings()"},{"p":"org.vafer.jdeb.ant","c":"MissingSourceBehavior","l":"IGNORE"},{"p":"org.vafer.jdeb.maven","c":"MissingSourceBehavior","l":"IGNORE"},{"p":"org.vafer.jdeb","c":"Console","l":"info(String)","u":"info(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"InformationInputStream(InputStream)","u":"%3Cinit%3E(java.io.InputStream)"},{"p":"org.vafer.jdeb.utils","c":"InformationOutputStream","l":"InformationOutputStream(OutputStream, MessageDigest)","u":"%3Cinit%3E(java.io.OutputStream,java.security.MessageDigest)"},{"p":"org.vafer.jdeb.debian","c":"ChangesFile","l":"initialize(BinaryPackageControlFile)","u":"initialize(org.vafer.jdeb.debian.BinaryPackageControlFile)"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"initializeVariableResolver(Map)","u":"initializeVariableResolver(java.util.Map)"},{"p":"org.vafer.jdeb.mapping","c":"NullMapper","l":"INSTANCE"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"invalidFields()"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"isBlank(CharSequence)","u":"isBlank(java.lang.CharSequence)"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"isFirstLineEmpty()"},{"p":"org.vafer.jdeb.producers","c":"AbstractDataProducer","l":"isIncluded(String)","u":"isIncluded(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlField","l":"isMandatory()"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"isNullOrEmpty(String)","u":"isNullOrEmpty(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"isShell()"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"isSymbolic()"},{"p":"org.vafer.jdeb.utils","c":"SymlinkUtils","l":"isSymbolicLink(File)","u":"isSymbolicLink(java.io.File)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"isUserDefinedField(String)","u":"isUserDefinedField(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"isValid()"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"joinLocalPath(String...)","u":"joinLocalPath(java.lang.String...)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"joinUnixPath(String...)","u":"joinUnixPath(java.lang.String...)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"Link()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"longFileMode()"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"longFileMode(String)","u":"longFileMode(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"lookupIfEmpty(String, Map, String)","u":"lookupIfEmpty(java.lang.String,java.util.Map,java.lang.String)"},{"p":"org.vafer.jdeb.mapping","c":"LsMapper","l":"LsMapper(InputStream)","u":"%3Cinit%3E(java.io.InputStream)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"makeDeb()"},{"p":"org.vafer.jdeb.mapping","c":"LsMapper","l":"map(TarArchiveEntry)","u":"map(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb.mapping","c":"Mapper","l":"map(TarArchiveEntry)","u":"map(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb.mapping","c":"NullMapper","l":"map(TarArchiveEntry)","u":"map(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb.mapping","c":"PermMapper","l":"map(TarArchiveEntry)","u":"map(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb.producers","c":"AbstractDataProducer","l":"map(TarArchiveEntry)","u":"map(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"Mapper()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.maven","c":"Mapper","l":"Mapper()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.utils","c":"MapVariableResolver","l":"MapVariableResolver(Map)","u":"%3Cinit%3E(java.util.Map)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"movePath(String, String)","u":"movePath(java.lang.String,java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlField.Type","l":"MULTILINE"},{"p":"org.vafer.jdeb","c":"Compression","l":"NONE"},{"p":"org.vafer.jdeb","c":"DataConsumer","l":"onEachDir(TarArchiveEntry)","u":"onEachDir(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb","c":"DataConsumer","l":"onEachFile(InputStream, TarArchiveEntry)","u":"onEachFile(java.io.InputStream,org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb","c":"DataConsumer","l":"onEachLink(TarArchiveEntry)","u":"onEachLink(org.apache.commons.compress.archivers.tar.TarArchiveEntry)"},{"p":"org.vafer.jdeb.utils","c":"OutputTimestampResolver","l":"OutputTimestampResolver(Console)","u":"%3Cinit%3E(org.vafer.jdeb.Console)"},{"p":"org.vafer.jdeb","c":"PackagingException","l":"PackagingException()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb","c":"PackagingException","l":"PackagingException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.vafer.jdeb","c":"PackagingException","l":"PackagingException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"org.vafer.jdeb","c":"PackagingException","l":"PackagingException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"parse(InputStream)","u":"parse(java.io.InputStream)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"parse(String)","u":"parse(java.lang.String)"},{"p":"org.vafer.jdeb.mapping","c":"LsMapper.ParseError","l":"ParseError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.vafer.jdeb.mapping","c":"PermMapper","l":"PermMapper(int, int, String, String, int, int, int, String)","u":"%3Cinit%3E(int,int,java.lang.String,java.lang.String,int,int,int,java.lang.String)"},{"p":"org.vafer.jdeb.mapping","c":"PermMapper","l":"PermMapper(int, int, String, String, String, String, int, String)","u":"%3Cinit%3E(int,int,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"PGPSignatureOutputStream","l":"PGPSignatureOutputStream(PGPSignatureGenerator)","u":"%3Cinit%3E(org.bouncycastle.openpgp.PGPSignatureGenerator)"},{"p":"org.vafer.jdeb.signing","c":"PGPSigner","l":"PGPSigner(InputStream, String, String, int)","u":"%3Cinit%3E(java.io.InputStream,java.lang.String,java.lang.String,int)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb","c":"DataProducer","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerArchive","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerDirectory","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerFile","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerFiles","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerFileSet","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerLink","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"DataProducerPathTemplate","l":"produce(DataConsumer)","u":"produce(org.vafer.jdeb.DataConsumer)"},{"p":"org.vafer.jdeb.producers","c":"AbstractDataProducer","l":"produceDir(DataConsumer, String)","u":"produceDir(org.vafer.jdeb.DataConsumer,java.lang.String)"},{"p":"org.vafer.jdeb.producers","c":"AbstractDataProducer","l":"produceFile(DataConsumer, File, String)","u":"produceFile(org.vafer.jdeb.DataConsumer,java.io.File,java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"read()"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"read(byte[], int, int)","u":"read(byte[],int,int)"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"readPropertiesFromActiveProfiles(String, String...)","u":"readPropertiesFromActiveProfiles(java.lang.String,java.lang.String...)"},{"p":"org.vafer.jdeb.utils","c":"SymlinkUtils","l":"readSymbolicLink(File)","u":"readSymbolicLink(java.io.File)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"replaceVariables(VariableResolver, String, String, String)","u":"replaceVariables(org.vafer.jdeb.utils.VariableResolver,java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"OutputTimestampResolver","l":"resolveOutputTimestamp(String)","u":"resolveOutputTimestamp(java.lang.String)"},{"p":"org.vafer.jdeb.changes","c":"TextfileChangesProvider","l":"save(OutputStream)","u":"save(java.io.OutputStream)"},{"p":"org.vafer.jdeb.debian","c":"BinaryPackageControlFile","l":"set(String, String)","u":"set(java.lang.String,java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"set(String, String)","u":"set(java.lang.String,java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ChangesFile","l":"setChanges(ChangeSet[])","u":"setChanges(org.vafer.jdeb.changes.ChangeSet[])"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setChangesIn(File)","u":"setChangesIn(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setChangesIn(File)","u":"setChangesIn(java.io.File)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setChangesOut(File)","u":"setChangesOut(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setChangesOut(File)","u":"setChangesOut(java.io.File)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setChangesSave(File)","u":"setChangesSave(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setChangesSave(File)","u":"setChangesSave(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setCloseReplaceToken(String)","u":"setCloseReplaceToken(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"setCloseReplaceToken(String)","u":"setCloseReplaceToken(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"FilteredFile","l":"setCloseToken(String)","u":"setCloseToken(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setCompression(String)","u":"setCompression(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setCompression(String)","u":"setCompression(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setConffile(boolean)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"setConffile(Boolean)","u":"setConffile(java.lang.Boolean)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setControl(File)","u":"setControl(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setControl(File)","u":"setControl(java.io.File)"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"setData(Data[])","u":"setData(org.vafer.jdeb.maven.Data[])"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setDeb(File)","u":"setDeb(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setDepends(String)","u":"setDepends(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setDescription(String)","u":"setDescription(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setDestfile(File)","u":"setDestfile(java.io.File)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setDigest(String)","u":"setDigest(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setDigest(String)","u":"setDigest(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setDirMode(String)","u":"setDirMode(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"setDst(String)","u":"setDst(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setDst(String)","u":"setDst(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setExcludes(String)","u":"setExcludes(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setFileMode(String)","u":"setFileMode(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setGid(int)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setGid(int)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setGroup(String)","u":"setGroup(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setGroup(String)","u":"setGroup(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setHomepage(String)","u":"setHomepage(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setIncludes(String)","u":"setIncludes(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setKey(String)","u":"setKey(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setKey(String)","u":"setKey(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setKeyring(File)","u":"setKeyring(java.io.File)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setKeyring(File)","u":"setKeyring(java.io.File)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setLinkName(String)","u":"setLinkName(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setLinkTarget(String)","u":"setLinkTarget(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"setMissingSrc(String)","u":"setMissingSrc(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setMissingSrc(String)","u":"setMissingSrc(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setMode(String)","u":"setMode(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setOpenReplaceToken(String)","u":"setOpenReplaceToken(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"DebMojo","l":"setOpenReplaceToken(String)","u":"setOpenReplaceToken(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"FilteredFile","l":"setOpenToken(String)","u":"setOpenToken(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setOutputTimestampMs(Long)","u":"setOutputTimestampMs(java.lang.Long)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setPackage(String)","u":"setPackage(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setPassphrase(String)","u":"setPassphrase(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setPassphrase(String)","u":"setPassphrase(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setPrefix(String)","u":"setPrefix(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setResolver(VariableResolver)","u":"setResolver(org.vafer.jdeb.utils.VariableResolver)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setSection(String)","u":"setSection(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setSignChanges(boolean)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setSignMethod(String)","u":"setSignMethod(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setSignPackage(boolean)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setSignRole(String)","u":"setSignRole(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"setSrc(File)","u":"setSrc(java.io.File)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setSrc(File)","u":"setSrc(java.io.File)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setSrc(File)","u":"setSrc(java.io.File)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setStrip(int)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setSymbolic(boolean)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setSymlink(boolean)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setTarBigNumberMode(String)","u":"setTarBigNumberMode(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setTarget(String)","u":"setTarget(java.lang.String)"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"setTarLongFileMode(String)","u":"setTarLongFileMode(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Data","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setUid(int)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setUid(int)"},{"p":"org.vafer.jdeb.ant","c":"Mapper","l":"setUser(String)","u":"setUser(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"Link","l":"setUsername(String)","u":"setUsername(java.lang.String)"},{"p":"org.vafer.jdeb.ant","c":"DebAntTask","l":"setVerbose(boolean)"},{"p":"org.vafer.jdeb.debian","c":"ControlField.Type","l":"SIMPLE"},{"p":"org.vafer.jdeb.maven","c":"Data","l":"splitPatterns(String)","u":"splitPatterns(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"stripLeadingSlash(String)","u":"stripLeadingSlash(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"stripPath(int, String)","u":"stripPath(int,java.lang.String)"},{"p":"org.vafer.jdeb","c":"TarOptions","l":"TarOptions()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb.changes","c":"TextfileChangesProvider","l":"TextfileChangesProvider(InputStream, BinaryPackageControlFile)","u":"%3Cinit%3E(java.io.InputStream,org.vafer.jdeb.debian.BinaryPackageControlFile)"},{"p":"org.vafer.jdeb","c":"Compression","l":"toCompressedOutputStream(OutputStream)","u":"toCompressedOutputStream(java.io.OutputStream)"},{"p":"org.vafer.jdeb","c":"Compression","l":"toEnum(String)","u":"toEnum(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"toHex(byte[])"},{"p":"org.vafer.jdeb.mapping","c":"PermMapper","l":"toMode(String)","u":"toMode(java.lang.String)"},{"p":"org.vafer.jdeb.changes","c":"ChangeSet","l":"toString()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"toString()"},{"p":"org.vafer.jdeb.utils","c":"FilteredFile","l":"toString()"},{"p":"org.vafer.jdeb.utils","c":"InformationInputStream","l":"toString()"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"toString(ControlField...)","u":"toString(org.vafer.jdeb.debian.ControlField...)"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"toUnixLineEndings(InputStream)","u":"toUnixLineEndings(java.io.InputStream)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"userDefinedFieldNames"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"userDefinedFields"},{"p":"org.vafer.jdeb.utils","c":"Utils","l":"Utils()","u":"%3Cinit%3E()"},{"p":"org.vafer.jdeb","c":"DebMaker","l":"validate()"},{"p":"org.vafer.jdeb.ant","c":"MissingSourceBehavior","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"org.vafer.jdeb","c":"Compression","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlField.Type","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"org.vafer.jdeb.maven","c":"MissingSourceBehavior","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"org.vafer.jdeb.debian","c":"ControlFile","l":"values"},{"p":"org.vafer.jdeb.ant","c":"MissingSourceBehavior","l":"values()"},{"p":"org.vafer.jdeb","c":"Compression","l":"values()"},{"p":"org.vafer.jdeb.debian","c":"ControlField.Type","l":"values()"},{"p":"org.vafer.jdeb.maven","c":"MissingSourceBehavior","l":"values()"},{"p":"org.vafer.jdeb","c":"Console","l":"warn(String)","u":"warn(java.lang.String)"},{"p":"org.vafer.jdeb.utils","c":"PGPSignatureOutputStream","l":"write(byte[])"},{"p":"org.vafer.jdeb.utils","c":"InformationOutputStream","l":"write(byte[], int, int)","u":"write(byte[],int,int)"},{"p":"org.vafer.jdeb.utils","c":"PGPSignatureOutputStream","l":"write(byte[], int, int)","u":"write(byte[],int,int)"},{"p":"org.vafer.jdeb.utils","c":"InformationOutputStream","l":"write(int)"},{"p":"org.vafer.jdeb.utils","c":"PGPSignatureOutputStream","l":"write(int)"},{"p":"org.vafer.jdeb","c":"Compression","l":"XZ"}];updateSearchResults(); \ No newline at end of file diff --git a/release/1.10/apidocs/module-search-index.js b/release/1.10/apidocs/module-search-index.js new file mode 100644 index 000000000..0d59754fc --- /dev/null +++ b/release/1.10/apidocs/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/release/1.10/apidocs/org/vafer/jdeb/Compression.html b/release/1.10/apidocs/org/vafer/jdeb/Compression.html new file mode 100644 index 000000000..8dfd79867 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/Compression.html @@ -0,0 +1,287 @@ + + + + + +Compression (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Compression

+
+
java.lang.Object +
java.lang.Enum<Compression> +
org.vafer.jdeb.Compression
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Compression>, java.lang.constant.Constable
+
+
+
public enum Compression +extends Enum<Compression>
+
Compression method used for the data file.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Compression[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Compression valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getExtension

      +
      public String getExtension()
      +
      Returns the extension of the compression method
      +
      +
    • +
    • +
      +

      toCompressedOutputStream

      +
      public OutputStream toCompressedOutputStream(OutputStream out) + throws org.apache.commons.compress.compressors.CompressorException
      +
      +
      Throws:
      +
      org.apache.commons.compress.compressors.CompressorException
      +
      +
      +
    • +
    • +
      +

      toEnum

      +
      public static Compression toEnum(String name)
      +
      Returns the compression method corresponding to the specified name. + The matching is case insensitive.
      +
      +
      Parameters:
      +
      name - the name of the compression method
      +
      Returns:
      +
      the compression method, or null if not recognized
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/Console.html b/release/1.10/apidocs/org/vafer/jdeb/Console.html new file mode 100644 index 000000000..ba783f674 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/Console.html @@ -0,0 +1,151 @@ + + + + + +Console (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Console

+
+
+
+
public interface Console
+
Plug in your favorite log implementation.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    debug​(String message)
    +
     
    +
    void
    +
    info​(String message)
    +
     
    +
    void
    +
    warn​(String message)
    +
     
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/DataConsumer.html b/release/1.10/apidocs/org/vafer/jdeb/DataConsumer.html new file mode 100644 index 000000000..94833845c --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/DataConsumer.html @@ -0,0 +1,168 @@ + + + + + +DataConsumer (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface DataConsumer

+
+
+
+
public interface DataConsumer
+
A DataConsumer consumes Data produced from a producer.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onEachDir​(org.apache.commons.compress.archivers.tar.TarArchiveEntry dirEntry)
    +
     
    +
    void
    +
    onEachFile​(InputStream input, + org.apache.commons.compress.archivers.tar.TarArchiveEntry fileEntry)
    +
     
    +
    void
    +
    onEachLink​(org.apache.commons.compress.archivers.tar.TarArchiveEntry linkEntry)
    +
     
    +
    +
    +
    +
    +
  • +
+
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/DataProducer.html b/release/1.10/apidocs/org/vafer/jdeb/DataProducer.html new file mode 100644 index 000000000..a3a70aaab --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/DataProducer.html @@ -0,0 +1,142 @@ + + + + + +DataProducer (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface DataProducer

+
+
+
+
All Known Implementing Classes:
+
AbstractDataProducer, Data, Data, DataProducerArchive, DataProducerDirectory, DataProducerFile, DataProducerFiles, DataProducerFileSet, DataProducerLink, DataProducerPathTemplate
+
+
+
public interface DataProducer
+
Provides Data to a DataConsumer.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    produce​(DataConsumer receiver)
    +
     
    +
    +
    +
    +
    +
  • +
+
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/DebMaker.html b/release/1.10/apidocs/org/vafer/jdeb/DebMaker.html new file mode 100644 index 000000000..3e10b9876 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/DebMaker.html @@ -0,0 +1,475 @@ + + + + + +DebMaker (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DebMaker

+
+
java.lang.Object +
org.vafer.jdeb.DebMaker
+
+
+
+
public class DebMaker +extends Object
+
A generic class for creating Debian archives. Even supports signed changes + files.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/PackagingException.html b/release/1.10/apidocs/org/vafer/jdeb/PackagingException.html new file mode 100644 index 000000000..da12a86ec --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/PackagingException.html @@ -0,0 +1,177 @@ + + + + + +PackagingException (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PackagingException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.vafer.jdeb.PackagingException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public final class PackagingException +extends Exception
+
Something went wrong while building the package
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/TarOptions.html b/release/1.10/apidocs/org/vafer/jdeb/TarOptions.html new file mode 100644 index 000000000..fbd69a478 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/TarOptions.html @@ -0,0 +1,211 @@ + + + + + +TarOptions (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TarOptions

+
+
java.lang.Object +
org.vafer.jdeb.TarOptions
+
+
+
+
public class TarOptions +extends Object
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/Data.html b/release/1.10/apidocs/org/vafer/jdeb/ant/Data.html new file mode 100644 index 000000000..d2e445df5 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/Data.html @@ -0,0 +1,289 @@ + + + + + +Data (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Data

+
+
java.lang.Object +
org.apache.tools.ant.ProjectComponent +
org.apache.tools.ant.types.DataType +
org.apache.tools.ant.types.PatternSet +
org.vafer.jdeb.ant.Data
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Cloneable, DataProducer
+
+
+
public final class Data +extends org.apache.tools.ant.types.PatternSet +implements DataProducer
+
Ant "data" element acting as a factory for DataProducers. + So far Archive and Directory producers are supported. + Both support the usual ant pattern set matching.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from class org.apache.tools.ant.types.PatternSet

    +org.apache.tools.ant.types.PatternSet.NameEntry, org.apache.tools.ant.types.PatternSet.PatternFileNameEntry
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    +

    Fields inherited from class org.apache.tools.ant.types.DataType

    +checked, ref
    +
    +

    Fields inherited from class org.apache.tools.ant.ProjectComponent

    +description, location, project
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    addMapper​(Mapper mapper)
    +
     
    + + +
     
    + + +
     
    +
    void
    +
    produce​(DataConsumer pReceiver)
    +
     
    +
    void
    +
    setConffile​(Boolean conffile)
    +
     
    +
    void
    +
    setDst​(String destinationName)
    +
     
    +
    void
    +
    setMissingSrc​(String missingSrc)
    +
     
    +
    void
    +
    setSrc​(File src)
    +
     
    +
    void
    +
    setType​(String type)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class org.apache.tools.ant.types.PatternSet

    +addConfiguredInvert, addConfiguredPatternset, append, clone, createExclude, createExcludesFile, createInclude, createIncludesFile, getExcludePatterns, getIncludePatterns, hasPatterns, setExcludes, setExcludesfile, setIncludes, setIncludesfile, setRefid, toString
    +
    +

    Methods inherited from class org.apache.tools.ant.types.DataType

    +checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
    +
    +

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    +getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
    +
    +

    Methods inherited from class java.lang.Object

    +equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/DebAntTask.html b/release/1.10/apidocs/org/vafer/jdeb/ant/DebAntTask.html new file mode 100644 index 000000000..e1346a768 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/DebAntTask.html @@ -0,0 +1,340 @@ + + + + + +DebAntTask (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DebAntTask

+
+
java.lang.Object +
org.apache.tools.ant.ProjectComponent +
org.apache.tools.ant.Task +
org.apache.tools.ant.taskdefs.MatchingTask +
org.vafer.jdeb.ant.DebAntTask
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer
+
+
+
public class DebAntTask +extends org.apache.tools.ant.taskdefs.MatchingTask
+
AntTask for creating debian archives.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    +

    Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask

    +fileset
    +
    +

    Fields inherited from class org.apache.tools.ant.Task

    +target, taskName, taskType, wrapper
    +
    +

    Fields inherited from class org.apache.tools.ant.ProjectComponent

    +description, location, project
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    addData​(Data data)
    +
     
    +
    void
    +
    addFileSet​(org.apache.tools.ant.types.FileSet fileset)
    +
     
    +
    void
    +
    addLink​(Link link)
    +
     
    +
    void
    +
    addTarFileSet​(org.apache.tools.ant.taskdefs.Tar.TarFileSet fileset)
    +
     
    +
    void
    + +
     
    +
    void
    +
    setChangesIn​(File changes)
    +
     
    +
    void
    +
    setChangesOut​(File changes)
    +
     
    +
    void
    +
    setChangesSave​(File changes)
    +
     
    +
    void
    +
    setCompression​(String compression)
    +
     
    +
    void
    +
    setControl​(File control)
    +
     
    +
    void
    +
    setDestfile​(File deb)
    +
     
    +
    void
    +
    setDigest​(String digest)
    +
     
    +
    void
    +
    setKey​(String key)
    +
     
    +
    void
    +
    setKeyring​(File keyring)
    +
     
    +
    void
    +
    setPassphrase​(String passphrase)
    +
     
    +
    void
    +
    setVerbose​(boolean verbose)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask

    +add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
    +
    +

    Methods inherited from class org.apache.tools.ant.Task

    +bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
    +
    +

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    +clone, getDescription, getLocation, getProject, setDescription, setLocation
    +
    +

    Methods inherited from class java.lang.Object

    +equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setDestfile

      +
      public void setDestfile(File deb)
      +
      +
    • +
    • +
      +

      setControl

      +
      public void setControl(File control)
      +
      +
    • +
    • +
      +

      setChangesIn

      +
      public void setChangesIn(File changes)
      +
      +
    • +
    • +
      +

      setChangesOut

      +
      public void setChangesOut(File changes)
      +
      +
    • +
    • +
      +

      setChangesSave

      +
      public void setChangesSave(File changes)
      +
      +
    • +
    • +
      +

      setKeyring

      +
      public void setKeyring(File keyring)
      +
      +
    • +
    • +
      +

      setKey

      +
      public void setKey(String key)
      +
      +
    • +
    • +
      +

      setPassphrase

      +
      public void setPassphrase(String passphrase)
      +
      +
    • +
    • +
      +

      setCompression

      +
      public void setCompression(String compression)
      +
      +
    • +
    • +
      +

      setVerbose

      +
      public void setVerbose(boolean verbose)
      +
      +
    • +
    • +
      +

      addFileSet

      +
      public void addFileSet(org.apache.tools.ant.types.FileSet fileset)
      +
      +
    • +
    • +
      +

      addTarFileSet

      +
      public void addTarFileSet(org.apache.tools.ant.taskdefs.Tar.TarFileSet fileset)
      +
      +
    • +
    • +
      +

      addData

      +
      public void addData(Data data)
      +
      +
    • +
    • +
      +

      addLink

      +
      public void addLink(Link link)
      +
      +
    • +
    • +
      +

      setDigest

      +
      public void setDigest(String digest)
      +
      +
    • +
    • +
      +

      execute

      +
      public void execute()
      +
      +
      Overrides:
      +
      execute in class org.apache.tools.ant.Task
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/Link.html b/release/1.10/apidocs/org/vafer/jdeb/ant/Link.html new file mode 100644 index 000000000..4c41e09a9 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/Link.html @@ -0,0 +1,302 @@ + + + + + +Link (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Link

+
+
java.lang.Object +
org.vafer.jdeb.ant.Link
+
+
+
+
public final class Link +extends Object
+
Defines a symbolic or hard link.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Link

      +
      public Link()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/Mapper.html b/release/1.10/apidocs/org/vafer/jdeb/ant/Mapper.html new file mode 100644 index 000000000..a7ee2d2d8 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/Mapper.html @@ -0,0 +1,263 @@ + + + + + +Mapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Mapper

+
+
java.lang.Object +
org.vafer.jdeb.ant.Mapper
+
+
+
+
public final class Mapper +extends Object
+
Ant "mapper" element acting as factory for the entry mapper. + Supported types: ls, perm
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/MissingSourceBehavior.html b/release/1.10/apidocs/org/vafer/jdeb/ant/MissingSourceBehavior.html new file mode 100644 index 000000000..aeb0d2a48 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/MissingSourceBehavior.html @@ -0,0 +1,225 @@ + + + + + +MissingSourceBehavior (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum MissingSourceBehavior

+
+
java.lang.Object +
java.lang.Enum<MissingSourceBehavior> +
org.vafer.jdeb.ant.MissingSourceBehavior
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<MissingSourceBehavior>, java.lang.constant.Constable
+
+
+ +
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static MissingSourceBehavior[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static MissingSourceBehavior valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Data.html b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Data.html new file mode 100644 index 000000000..191833a03 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Data.html @@ -0,0 +1,90 @@ + + + + + +Uses of Class org.vafer.jdeb.ant.Data (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.ant.Data

+
+
Packages that use Data
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/DebAntTask.html b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/DebAntTask.html new file mode 100644 index 000000000..4e12abb4a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/DebAntTask.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.ant.DebAntTask (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.ant.DebAntTask

+
+No usage of org.vafer.jdeb.ant.DebAntTask
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Link.html b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Link.html new file mode 100644 index 000000000..b7387ff5f --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Link.html @@ -0,0 +1,90 @@ + + + + + +Uses of Class org.vafer.jdeb.ant.Link (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.ant.Link

+
+
Packages that use Link
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Mapper.html b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Mapper.html new file mode 100644 index 000000000..092583ec0 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/Mapper.html @@ -0,0 +1,90 @@ + + + + + +Uses of Class org.vafer.jdeb.ant.Mapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.ant.Mapper

+
+
Packages that use Mapper
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/MissingSourceBehavior.html b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/MissingSourceBehavior.html new file mode 100644 index 000000000..7b0c97ce7 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/class-use/MissingSourceBehavior.html @@ -0,0 +1,98 @@ + + + + + +Uses of Enum org.vafer.jdeb.ant.MissingSourceBehavior (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
org.vafer.jdeb.ant.MissingSourceBehavior

+
+
Packages that use MissingSourceBehavior
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/ant/package-summary.html new file mode 100644 index 000000000..b73e39748 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/package-summary.html @@ -0,0 +1,103 @@ + + + + + +org.vafer.jdeb.ant (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.ant

+
+
+
package org.vafer.jdeb.ant
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Ant "data" element acting as a factory for DataProducers.
    +
    + +
    +
    AntTask for creating debian archives.
    +
    + +
    +
    Defines a symbolic or hard link.
    +
    + +
    +
    Ant "mapper" element acting as factory for the entry mapper.
    +
    +
    +
  • +
  • +
    Enum Summary
    +
    +
    Enum
    +
    Description
    + +
     
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/ant/package-tree.html new file mode 100644 index 000000000..b402d5d7d --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/package-tree.html @@ -0,0 +1,116 @@ + + + + + +org.vafer.jdeb.ant Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.ant

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • org.vafer.jdeb.ant.Link
    • +
    • org.vafer.jdeb.ant.Mapper
    • +
    • org.apache.tools.ant.ProjectComponent (implements java.lang.Cloneable) +
        +
      • org.apache.tools.ant.types.DataType (implements java.lang.Cloneable) +
          +
        • org.apache.tools.ant.types.PatternSet (implements java.lang.Cloneable) + +
        • +
        +
      • +
      • org.apache.tools.ant.Task +
          +
        • org.apache.tools.ant.taskdefs.MatchingTask (implements org.apache.tools.ant.types.selectors.SelectorContainer) + +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/ant/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/ant/package-use.html new file mode 100644 index 000000000..2421ded63 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/ant/package-use.html @@ -0,0 +1,99 @@ + + + + + +Uses of Package org.vafer.jdeb.ant (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.ant

+
+
Packages that use org.vafer.jdeb.ant
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/ChangeSet.html b/release/1.10/apidocs/org/vafer/jdeb/changes/ChangeSet.html new file mode 100644 index 000000000..fdce45f1c --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/ChangeSet.html @@ -0,0 +1,261 @@ + + + + + +ChangeSet (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChangeSet

+
+
java.lang.Object +
org.vafer.jdeb.changes.ChangeSet
+
+
+
+
public final class ChangeSet +extends Object
+
A ChangeSet basically reflect a release as defined in the changes file. + +
+ package (version) distribution(s); urgency=urgency
+        [optional blank line(s), stripped]
+   * change details
+     more change details
+        [blank line(s), included in output of dpkg-parsechangelog]
+   * even more change details
+        [optional blank line(s), stripped]
+  -- maintainer name <email address>[two spaces]  date
+ 
+
+
See Also:
+
Debian Policy Manual - Debian changelog
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/ChangesProvider.html b/release/1.10/apidocs/org/vafer/jdeb/changes/ChangesProvider.html new file mode 100644 index 000000000..289dbb6c8 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/ChangesProvider.html @@ -0,0 +1,136 @@ + + + + + +ChangesProvider (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ChangesProvider

+
+
+
+
All Known Implementing Classes:
+
TextfileChangesProvider
+
+
+
public interface ChangesProvider
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
     
    +
    +
    +
    +
    +
  • +
+
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/TextfileChangesProvider.html b/release/1.10/apidocs/org/vafer/jdeb/changes/TextfileChangesProvider.html new file mode 100644 index 000000000..3abe20296 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/TextfileChangesProvider.html @@ -0,0 +1,205 @@ + + + + + +TextfileChangesProvider (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TextfileChangesProvider

+
+
java.lang.Object +
org.vafer.jdeb.changes.TextfileChangesProvider
+
+
+
+
All Implemented Interfaces:
+
ChangesProvider
+
+
+
public final class TextfileChangesProvider +extends Object +implements ChangesProvider
+
Gets the changes from a changes file. The first entry are the current changes. + The release line will be added. Example: + + release date=22:13 19.08.2007,version=1.5+r90114,urgency=low,by=Torsten Curdt <torsten@vafer.org> + * debian changes support + release date=20:13 17.08.2007,version=1.4+r89114,urgency=low,by=Torsten Curdt <torsten@vafer.org> + * debian changes support
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/ChangeSet.html b/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/ChangeSet.html new file mode 100644 index 000000000..ee9366ed5 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/ChangeSet.html @@ -0,0 +1,109 @@ + + + + + +Uses of Class org.vafer.jdeb.changes.ChangeSet (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.changes.ChangeSet

+
+
Packages that use ChangeSet
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/ChangesProvider.html b/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/ChangesProvider.html new file mode 100644 index 000000000..560094f9b --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/ChangesProvider.html @@ -0,0 +1,92 @@ + + + + + +Uses of Interface org.vafer.jdeb.changes.ChangesProvider (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
org.vafer.jdeb.changes.ChangesProvider

+
+
Packages that use ChangesProvider
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/TextfileChangesProvider.html b/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/TextfileChangesProvider.html new file mode 100644 index 000000000..86694cfb7 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/class-use/TextfileChangesProvider.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.changes.TextfileChangesProvider (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.changes.TextfileChangesProvider

+
+No usage of org.vafer.jdeb.changes.TextfileChangesProvider
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/changes/package-summary.html new file mode 100644 index 000000000..a72a05a1c --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/package-summary.html @@ -0,0 +1,95 @@ + + + + + +org.vafer.jdeb.changes (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.changes

+
+
+
package org.vafer.jdeb.changes
+
+
    +
  • +
    Interface Summary
    +
    +
    Interface
    +
    Description
    + +
     
    +
    +
  • +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    A ChangeSet basically reflect a release as defined in the changes file.
    +
    + +
    +
    Gets the changes from a changes file.
    +
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/changes/package-tree.html new file mode 100644 index 000000000..dbcb121ef --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/package-tree.html @@ -0,0 +1,86 @@ + + + + + +org.vafer.jdeb.changes Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.changes

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/changes/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/changes/package-use.html new file mode 100644 index 000000000..b20666e2f --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/changes/package-use.html @@ -0,0 +1,106 @@ + + + + + +Uses of Package org.vafer.jdeb.changes (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.changes

+
+
Packages that use org.vafer.jdeb.changes
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/Compression.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/Compression.html new file mode 100644 index 000000000..2d753d9e8 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/Compression.html @@ -0,0 +1,127 @@ + + + + + +Uses of Enum org.vafer.jdeb.Compression (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
org.vafer.jdeb.Compression

+
+
Packages that use Compression
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/Console.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/Console.html new file mode 100644 index 000000000..a7ad5ca59 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/Console.html @@ -0,0 +1,108 @@ + + + + + +Uses of Interface org.vafer.jdeb.Console (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
org.vafer.jdeb.Console

+
+
Packages that use Console
+
+
Package
+
Description
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/DataConsumer.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/DataConsumer.html new file mode 100644 index 000000000..7b78b7c60 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/DataConsumer.html @@ -0,0 +1,165 @@ + + + + + +Uses of Interface org.vafer.jdeb.DataConsumer (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
org.vafer.jdeb.DataConsumer

+
+
Packages that use DataConsumer
+ +
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/DataProducer.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/DataProducer.html new file mode 100644 index 000000000..3f91f3c4e --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/DataProducer.html @@ -0,0 +1,182 @@ + + + + + +Uses of Interface org.vafer.jdeb.DataProducer (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
org.vafer.jdeb.DataProducer

+
+
Packages that use DataProducer
+ +
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/DebMaker.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/DebMaker.html new file mode 100644 index 000000000..7a18260a7 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/DebMaker.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.DebMaker (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.DebMaker

+
+No usage of org.vafer.jdeb.DebMaker
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/PackagingException.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/PackagingException.html new file mode 100644 index 000000000..22f36dfb8 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/PackagingException.html @@ -0,0 +1,107 @@ + + + + + +Uses of Class org.vafer.jdeb.PackagingException (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.PackagingException

+
+
Packages that use PackagingException
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/class-use/TarOptions.html b/release/1.10/apidocs/org/vafer/jdeb/class-use/TarOptions.html new file mode 100644 index 000000000..265ff8772 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/class-use/TarOptions.html @@ -0,0 +1,96 @@ + + + + + +Uses of Class org.vafer.jdeb.TarOptions (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.TarOptions

+
+
Packages that use TarOptions
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/BinaryPackageControlFile.html b/release/1.10/apidocs/org/vafer/jdeb/debian/BinaryPackageControlFile.html new file mode 100644 index 000000000..b8d34e66b --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/BinaryPackageControlFile.html @@ -0,0 +1,278 @@ + + + + + +BinaryPackageControlFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BinaryPackageControlFile

+
+
java.lang.Object +
org.vafer.jdeb.debian.ControlFile +
org.vafer.jdeb.debian.BinaryPackageControlFile
+
+
+
+
+
public final class BinaryPackageControlFile +extends ControlFile
+
Binary package control file.
+
+
See Also:
+
Debian Policy Manual - Binary package control files
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/ChangesFile.html b/release/1.10/apidocs/org/vafer/jdeb/debian/ChangesFile.html new file mode 100644 index 000000000..a5e886d7e --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/ChangesFile.html @@ -0,0 +1,253 @@ + + + + + +ChangesFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChangesFile

+
+
java.lang.Object +
org.vafer.jdeb.debian.ControlFile +
org.vafer.jdeb.debian.ChangesFile
+
+
+
+
+
public final class ChangesFile +extends ControlFile
+
Reflecting a changes file
+
+
See Also:
+
Debian Policy Manual - Debian changes files
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/ControlField.Type.html b/release/1.10/apidocs/org/vafer/jdeb/debian/ControlField.Type.html new file mode 100644 index 000000000..adcdf91bd --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/ControlField.Type.html @@ -0,0 +1,247 @@ + + + + + +ControlField.Type (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum ControlField.Type

+
+
java.lang.Object +
java.lang.Enum<ControlField.Type> +
org.vafer.jdeb.debian.ControlField.Type
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<ControlField.Type>, java.lang.constant.Constable
+
+
+
Enclosing class:
+
ControlField
+
+
+
public static enum ControlField.Type +extends Enum<ControlField.Type>
+
The format of a field.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static ControlField.Type[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static ControlField.Type valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/ControlField.html b/release/1.10/apidocs/org/vafer/jdeb/debian/ControlField.html new file mode 100644 index 000000000..ca2d55681 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/ControlField.html @@ -0,0 +1,264 @@ + + + + + +ControlField (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ControlField

+
+
java.lang.Object +
org.vafer.jdeb.debian.ControlField
+
+
+
+
public class ControlField +extends Object
+
A field of a control file. This class is immutable.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/ControlFile.html b/release/1.10/apidocs/org/vafer/jdeb/debian/ControlFile.html new file mode 100644 index 000000000..b3e801637 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/ControlFile.html @@ -0,0 +1,407 @@ + + + + + +ControlFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ControlFile

+
+
java.lang.Object +
org.vafer.jdeb.debian.ControlFile
+
+
+
+
Direct Known Subclasses:
+
BinaryPackageControlFile, ChangesFile
+
+
+
public abstract class ControlFile +extends Object
+
A control file as specified by the Debian policy.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/BinaryPackageControlFile.html b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/BinaryPackageControlFile.html new file mode 100644 index 000000000..3ab381909 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/BinaryPackageControlFile.html @@ -0,0 +1,135 @@ + + + + + +Uses of Class org.vafer.jdeb.debian.BinaryPackageControlFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.debian.BinaryPackageControlFile

+
+
Packages that use BinaryPackageControlFile
+
+
Package
+
Description
+ +
 
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ChangesFile.html b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ChangesFile.html new file mode 100644 index 000000000..84503e10f --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ChangesFile.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.debian.ChangesFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.debian.ChangesFile

+
+No usage of org.vafer.jdeb.debian.ChangesFile
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlField.Type.html b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlField.Type.html new file mode 100644 index 000000000..c7561a915 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlField.Type.html @@ -0,0 +1,118 @@ + + + + + +Uses of Enum org.vafer.jdeb.debian.ControlField.Type (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
org.vafer.jdeb.debian.ControlField.Type

+
+
Packages that use ControlField.Type
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlField.html b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlField.html new file mode 100644 index 000000000..cf3d0059d --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlField.html @@ -0,0 +1,123 @@ + + + + + +Uses of Class org.vafer.jdeb.debian.ControlField (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.debian.ControlField

+
+
Packages that use ControlField
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlFile.html b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlFile.html new file mode 100644 index 000000000..80075f26c --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/class-use/ControlFile.html @@ -0,0 +1,97 @@ + + + + + +Uses of Class org.vafer.jdeb.debian.ControlFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.debian.ControlFile

+
+
Packages that use ControlFile
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/debian/package-summary.html new file mode 100644 index 000000000..4cf3e2852 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/package-summary.html @@ -0,0 +1,105 @@ + + + + + +org.vafer.jdeb.debian (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.debian

+
+
+
package org.vafer.jdeb.debian
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/debian/package-tree.html new file mode 100644 index 000000000..b9e58e0f1 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/package-tree.html @@ -0,0 +1,99 @@ + + + + + +org.vafer.jdeb.debian Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.debian

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/debian/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/debian/package-use.html new file mode 100644 index 000000000..dad20d670 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/debian/package-use.html @@ -0,0 +1,131 @@ + + + + + +Uses of Package org.vafer.jdeb.debian (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.debian

+
+
Packages that use org.vafer.jdeb.debian
+
+
Package
+
Description
+ +
 
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/LsMapper.ParseError.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/LsMapper.ParseError.html new file mode 100644 index 000000000..df4026188 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/LsMapper.ParseError.html @@ -0,0 +1,154 @@ + + + + + +LsMapper.ParseError (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LsMapper.ParseError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.vafer.jdeb.mapping.LsMapper.ParseError
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
LsMapper
+
+
+
public static final class LsMapper.ParseError +extends Exception
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/LsMapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/LsMapper.html new file mode 100644 index 000000000..3f47e72d4 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/LsMapper.html @@ -0,0 +1,199 @@ + + + + + +LsMapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LsMapper

+
+
java.lang.Object +
org.vafer.jdeb.mapping.LsMapper
+
+
+
+
All Implemented Interfaces:
+
Mapper
+
+
+
public final class LsMapper +extends Object +implements Mapper
+
Reads permissions and ownerships from a "ls -laR > mapping.txt" dump and + maps entries accordingly.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static class 
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    LsMapper​(InputStream pInput)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    org.apache.commons.compress.archivers.tar.TarArchiveEntry
    +
    map​(org.apache.commons.compress.archivers.tar.TarArchiveEntry pEntry)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/Mapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/Mapper.html new file mode 100644 index 000000000..5a35c8f0a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/Mapper.html @@ -0,0 +1,137 @@ + + + + + +Mapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Mapper

+
+
+
+
All Known Implementing Classes:
+
LsMapper, NullMapper, PermMapper
+
+
+
public interface Mapper
+
Maps one entry to another. So you modify ownerships permissions etc in a Mapper.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    org.apache.commons.compress.archivers.tar.TarArchiveEntry
    +
    map​(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
    +
     
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      map

      +
      org.apache.commons.compress.archivers.tar.TarArchiveEntry map(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/NullMapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/NullMapper.html new file mode 100644 index 000000000..28d91b026 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/NullMapper.html @@ -0,0 +1,177 @@ + + + + + +NullMapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NullMapper

+
+
java.lang.Object +
org.vafer.jdeb.mapping.NullMapper
+
+
+
+
All Implemented Interfaces:
+
Mapper
+
+
+
public final class NullMapper +extends Object +implements Mapper
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static Mapper
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    org.apache.commons.compress.archivers.tar.TarArchiveEntry
    +
    map​(org.apache.commons.compress.archivers.tar.TarArchiveEntry pEntry)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      map

      +
      public org.apache.commons.compress.archivers.tar.TarArchiveEntry map(org.apache.commons.compress.archivers.tar.TarArchiveEntry pEntry)
      +
      +
      Specified by:
      +
      map in interface Mapper
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/PermMapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/PermMapper.html new file mode 100644 index 000000000..36e8b24e1 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/PermMapper.html @@ -0,0 +1,221 @@ + + + + + +PermMapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PermMapper

+
+
java.lang.Object +
org.vafer.jdeb.mapping.PermMapper
+
+
+
+
All Implemented Interfaces:
+
Mapper
+
+
+
public final class PermMapper +extends Object +implements Mapper
+
Applies a uniform set of permissions and ownership to all entries.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    PermMapper​(int uid, + int gid, + String user, + String group, + int fileMode, + int dirMode, + int strip, + String prefix)
    +
     
    +
    PermMapper​(int uid, + int gid, + String user, + String group, + String fileMode, + String dirMode, + int strip, + String prefix)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    org.apache.commons.compress.archivers.tar.TarArchiveEntry
    +
    map​(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
    +
     
    +
    static int
    +
    toMode​(String modeString)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toMode

      +
      public static int toMode(String modeString)
      +
      +
    • +
    • +
      +

      map

      +
      public org.apache.commons.compress.archivers.tar.TarArchiveEntry map(org.apache.commons.compress.archivers.tar.TarArchiveEntry entry)
      +
      +
      Specified by:
      +
      map in interface Mapper
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/LsMapper.ParseError.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/LsMapper.ParseError.html new file mode 100644 index 000000000..5a172ba5a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/LsMapper.ParseError.html @@ -0,0 +1,90 @@ + + + + + +Uses of Class org.vafer.jdeb.mapping.LsMapper.ParseError (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.mapping.LsMapper.ParseError

+
+
Packages that use LsMapper.ParseError
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/LsMapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/LsMapper.html new file mode 100644 index 000000000..e38f51f33 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/LsMapper.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.mapping.LsMapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.mapping.LsMapper

+
+No usage of org.vafer.jdeb.mapping.LsMapper
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/Mapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/Mapper.html new file mode 100644 index 000000000..9c687cdfb --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/Mapper.html @@ -0,0 +1,198 @@ + + + + + +Uses of Interface org.vafer.jdeb.mapping.Mapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
org.vafer.jdeb.mapping.Mapper

+
+
Packages that use Mapper
+ +
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/NullMapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/NullMapper.html new file mode 100644 index 000000000..8a8c086a2 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/NullMapper.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.mapping.NullMapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.mapping.NullMapper

+
+No usage of org.vafer.jdeb.mapping.NullMapper
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/PermMapper.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/PermMapper.html new file mode 100644 index 000000000..d0ba5dbed --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/class-use/PermMapper.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.mapping.PermMapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.mapping.PermMapper

+
+No usage of org.vafer.jdeb.mapping.PermMapper
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/package-summary.html new file mode 100644 index 000000000..341f80968 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/package-summary.html @@ -0,0 +1,109 @@ + + + + + +org.vafer.jdeb.mapping (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.mapping

+
+
+
package org.vafer.jdeb.mapping
+
+
    +
  • +
    Interface Summary
    +
    +
    Interface
    +
    Description
    + +
    +
    Maps one entry to another.
    +
    +
    +
  • +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Reads permissions and ownerships from a "ls -laR > mapping.txt" dump and + maps entries accordingly.
    +
    + +
     
    + +
    +
    Applies a uniform set of permissions and ownership to all entries.
    +
    +
    +
  • +
  • +
    Exception Summary
    +
    +
    Exception
    +
    Description
    + +
     
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/package-tree.html new file mode 100644 index 000000000..d1ebf33c0 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/package-tree.html @@ -0,0 +1,96 @@ + + + + + +org.vafer.jdeb.mapping Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.mapping

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+
    +
  • org.vafer.jdeb.mapping.Mapper
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/mapping/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/mapping/package-use.html new file mode 100644 index 000000000..5c187f501 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/mapping/package-use.html @@ -0,0 +1,136 @@ + + + + + +Uses of Package org.vafer.jdeb.mapping (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.mapping

+
+
Packages that use org.vafer.jdeb.mapping
+ +
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/Data.html b/release/1.10/apidocs/org/vafer/jdeb/maven/Data.html new file mode 100644 index 000000000..f0f9657cd --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/Data.html @@ -0,0 +1,289 @@ + + + + + +Data (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Data

+
+
java.lang.Object +
org.vafer.jdeb.maven.Data
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
public final class Data +extends Object +implements DataProducer
+
Maven "data" element acting as a factory for DataProducers. So far Archive and + Directory producers are supported. Both support the usual ant pattern set + matching.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/DebMojo.html b/release/1.10/apidocs/org/vafer/jdeb/maven/DebMojo.html new file mode 100644 index 000000000..291175bbf --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/DebMojo.html @@ -0,0 +1,259 @@ + + + + + +DebMojo (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DebMojo

+
+
java.lang.Object +
org.apache.maven.plugin.AbstractMojo +
org.vafer.jdeb.maven.DebMojo
+
+
+
+
+
All Implemented Interfaces:
+
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
+
+
+
@Mojo(name="jdeb", + defaultPhase=PACKAGE, + threadSafe=true) +public class DebMojo +extends org.apache.maven.plugin.AbstractMojo
+
Creates Debian package
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DebMojo

      +
      public DebMojo()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setOpenReplaceToken

      +
      public void setOpenReplaceToken(String openReplaceToken)
      +
      +
    • +
    • +
      +

      setCloseReplaceToken

      +
      public void setCloseReplaceToken(String closeReplaceToken)
      +
      +
    • +
    • +
      +

      setData

      +
      protected void setData(Data[] dataSet)
      +
      +
    • +
    • +
      +

      initializeVariableResolver

      + +
      +
    • +
    • +
      +

      execute

      +
      public void execute() + throws org.apache.maven.plugin.MojoExecutionException
      +
      Main entry point
      +
      +
      Throws:
      +
      org.apache.maven.plugin.MojoExecutionException - on error
      +
      +
      +
    • +
    • +
      +

      readPropertiesFromActiveProfiles

      +
      public Map<String,​String> readPropertiesFromActiveProfiles(String prefix, + String... properties)
      +
      Read properties from the active profiles. + + Goes through all active profiles (in the order the + profiles are defined in settings.xml) and extracts + the desired properties (if present). The prefix is + used when looking up properties in the profile but + not in the returned map.
      +
      +
      Parameters:
      +
      prefix - The prefix to use or null if no prefix should be used
      +
      properties - The properties to read
      +
      Returns:
      +
      A map containing the values for the properties that were found
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/Mapper.html b/release/1.10/apidocs/org/vafer/jdeb/maven/Mapper.html new file mode 100644 index 000000000..078412b91 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/Mapper.html @@ -0,0 +1,173 @@ + + + + + +Mapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Mapper

+
+
java.lang.Object +
org.vafer.jdeb.maven.Mapper
+
+
+
+
public final class Mapper +extends Object
+
Maven "mapper" element acting as factory for the entry mapper. + Supported types: ls, perm
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/MissingSourceBehavior.html b/release/1.10/apidocs/org/vafer/jdeb/maven/MissingSourceBehavior.html new file mode 100644 index 000000000..ecd269fc2 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/MissingSourceBehavior.html @@ -0,0 +1,225 @@ + + + + + +MissingSourceBehavior (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum MissingSourceBehavior

+
+
java.lang.Object +
java.lang.Enum<MissingSourceBehavior> +
org.vafer.jdeb.maven.MissingSourceBehavior
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<MissingSourceBehavior>, java.lang.constant.Constable
+
+
+ +
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static MissingSourceBehavior[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static MissingSourceBehavior valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/Data.html b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/Data.html new file mode 100644 index 000000000..54ab5a14a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/Data.html @@ -0,0 +1,90 @@ + + + + + +Uses of Class org.vafer.jdeb.maven.Data (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.maven.Data

+
+
Packages that use Data
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/DebMojo.html b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/DebMojo.html new file mode 100644 index 000000000..799dd3096 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/DebMojo.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.maven.DebMojo (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.maven.DebMojo

+
+No usage of org.vafer.jdeb.maven.DebMojo
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/Mapper.html b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/Mapper.html new file mode 100644 index 000000000..cd0b2dcc4 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/Mapper.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.maven.Mapper (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.maven.Mapper

+
+No usage of org.vafer.jdeb.maven.Mapper
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/MissingSourceBehavior.html b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/MissingSourceBehavior.html new file mode 100644 index 000000000..245b9709a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/class-use/MissingSourceBehavior.html @@ -0,0 +1,98 @@ + + + + + +Uses of Enum org.vafer.jdeb.maven.MissingSourceBehavior (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
org.vafer.jdeb.maven.MissingSourceBehavior

+
+
Packages that use MissingSourceBehavior
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/maven/package-summary.html new file mode 100644 index 000000000..450776ef4 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/package-summary.html @@ -0,0 +1,99 @@ + + + + + +org.vafer.jdeb.maven (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.maven

+
+
+
package org.vafer.jdeb.maven
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Maven "data" element acting as a factory for DataProducers.
    +
    + +
    +
    Creates Debian package
    +
    + +
    +
    Maven "mapper" element acting as factory for the entry mapper.
    +
    +
    +
  • +
  • +
    Enum Summary
    +
    +
    Enum
    +
    Description
    + +
     
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/maven/package-tree.html new file mode 100644 index 000000000..d1369f88d --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/package-tree.html @@ -0,0 +1,99 @@ + + + + + +org.vafer.jdeb.maven Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.maven

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • org.apache.maven.plugin.AbstractMojo (implements org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo) + +
    • +
    • org.vafer.jdeb.maven.Data (implements org.vafer.jdeb.DataProducer)
    • +
    • org.vafer.jdeb.maven.Mapper
    • +
    +
  • +
+
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/maven/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/maven/package-use.html new file mode 100644 index 000000000..76b4670c2 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/maven/package-use.html @@ -0,0 +1,91 @@ + + + + + +Uses of Package org.vafer.jdeb.maven (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.maven

+
+
Packages that use org.vafer.jdeb.maven
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/package-summary.html new file mode 100644 index 000000000..7698263c9 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/package-summary.html @@ -0,0 +1,125 @@ + + + + + +org.vafer.jdeb (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb

+
+
+
package org.vafer.jdeb
+
+
    +
  • +
    Interface Summary
    +
    +
    Interface
    +
    Description
    + +
    +
    Plug in your favorite log implementation.
    +
    + +
    +
    A DataConsumer consumes Data produced from a producer.
    +
    + +
    +
    Provides Data to a DataConsumer.
    +
    +
    +
  • +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    A generic class for creating Debian archives.
    +
    + +
     
    +
    +
  • +
  • +
    Enum Summary
    +
    +
    Enum
    +
    Description
    + +
    +
    Compression method used for the data file.
    +
    +
    +
  • +
  • +
    Exception Summary
    +
    +
    Exception
    +
    Description
    + +
    +
    Something went wrong while building the package
    +
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/package-tree.html new file mode 100644 index 000000000..4aeb0f2f5 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/package-tree.html @@ -0,0 +1,111 @@ + + + + + +org.vafer.jdeb Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/package-use.html new file mode 100644 index 000000000..6785a6633 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/package-use.html @@ -0,0 +1,179 @@ + + + + + +Uses of Package org.vafer.jdeb (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb

+
+
Packages that use org.vafer.jdeb
+ +
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/AbstractDataProducer.html b/release/1.10/apidocs/org/vafer/jdeb/producers/AbstractDataProducer.html new file mode 100644 index 000000000..686a27d27 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/AbstractDataProducer.html @@ -0,0 +1,226 @@ + + + + + +AbstractDataProducer (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AbstractDataProducer

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
Direct Known Subclasses:
+
DataProducerArchive, DataProducerDirectory, DataProducerFile, DataProducerFiles, DataProducerLink, DataProducerPathTemplate
+
+
+
public abstract class AbstractDataProducer +extends Object +implements DataProducer
+
Base Producer class providing including/excluding.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerArchive.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerArchive.html new file mode 100644 index 000000000..4e1d10732 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerArchive.html @@ -0,0 +1,190 @@ + + + + + +DataProducerArchive (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerArchive

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer +
org.vafer.jdeb.producers.DataProducerArchive
+
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
public final class DataProducerArchive +extends AbstractDataProducer +implements DataProducer
+
Providing data from an archive keeping permissions and ownerships.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerDirectory.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerDirectory.html new file mode 100644 index 000000000..d1b6cbdab --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerDirectory.html @@ -0,0 +1,191 @@ + + + + + +DataProducerDirectory (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerDirectory

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer +
org.vafer.jdeb.producers.DataProducerDirectory
+
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
public final class DataProducerDirectory +extends AbstractDataProducer +implements DataProducer
+
DataProducer iterating over a directory. + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFile.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFile.html new file mode 100644 index 000000000..d28e64d47 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFile.html @@ -0,0 +1,193 @@ + + + + + +DataProducerFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerFile

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer +
org.vafer.jdeb.producers.DataProducerFile
+
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
public final class DataProducerFile +extends AbstractDataProducer +implements DataProducer
+
DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFileSet.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFileSet.html new file mode 100644 index 000000000..5c5ccc732 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFileSet.html @@ -0,0 +1,180 @@ + + + + + +DataProducerFileSet (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerFileSet

+
+
java.lang.Object +
org.vafer.jdeb.producers.DataProducerFileSet
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
public final class DataProducerFileSet +extends Object +implements DataProducer
+
DataProducer providing data from an Ant fileset. TarFileSets are also + supported with their permissions.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFiles.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFiles.html new file mode 100644 index 000000000..42947ddb9 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerFiles.html @@ -0,0 +1,186 @@ + + + + + +DataProducerFiles (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerFiles

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer +
org.vafer.jdeb.producers.DataProducerFiles
+
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+ +
Data producer that places multiple files into a single + destination directory.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerLink.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerLink.html new file mode 100644 index 000000000..b480edc9a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerLink.html @@ -0,0 +1,195 @@ + + + + + +DataProducerLink (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerLink

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer +
org.vafer.jdeb.producers.DataProducerLink
+
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+
public final class DataProducerLink +extends AbstractDataProducer +implements DataProducer
+
DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerPathTemplate.html b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerPathTemplate.html new file mode 100644 index 000000000..3e08f45f3 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/DataProducerPathTemplate.html @@ -0,0 +1,189 @@ + + + + + +DataProducerPathTemplate (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DataProducerPathTemplate

+
+
java.lang.Object +
org.vafer.jdeb.producers.AbstractDataProducer +
org.vafer.jdeb.producers.DataProducerPathTemplate
+
+
+
+
+
All Implemented Interfaces:
+
DataProducer
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/AbstractDataProducer.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/AbstractDataProducer.html new file mode 100644 index 000000000..82d147819 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/AbstractDataProducer.html @@ -0,0 +1,118 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.AbstractDataProducer (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.AbstractDataProducer

+
+
Packages that use AbstractDataProducer
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerArchive.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerArchive.html new file mode 100644 index 000000000..1943b0c68 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerArchive.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerArchive (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerArchive

+
+No usage of org.vafer.jdeb.producers.DataProducerArchive
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerDirectory.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerDirectory.html new file mode 100644 index 000000000..bbf667b52 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerDirectory.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerDirectory (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerDirectory

+
+No usage of org.vafer.jdeb.producers.DataProducerDirectory
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFile.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFile.html new file mode 100644 index 000000000..fb8e14e95 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFile.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerFile

+
+No usage of org.vafer.jdeb.producers.DataProducerFile
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFileSet.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFileSet.html new file mode 100644 index 000000000..467d5e494 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFileSet.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerFileSet (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerFileSet

+
+No usage of org.vafer.jdeb.producers.DataProducerFileSet
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFiles.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFiles.html new file mode 100644 index 000000000..60968ead7 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerFiles.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerFiles (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerFiles

+
+No usage of org.vafer.jdeb.producers.DataProducerFiles
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerLink.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerLink.html new file mode 100644 index 000000000..0299c61ea --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerLink.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerLink (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerLink

+
+No usage of org.vafer.jdeb.producers.DataProducerLink
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerPathTemplate.html b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerPathTemplate.html new file mode 100644 index 000000000..89a0ad645 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/class-use/DataProducerPathTemplate.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.producers.DataProducerPathTemplate (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.producers.DataProducerPathTemplate

+
+No usage of org.vafer.jdeb.producers.DataProducerPathTemplate
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/producers/package-summary.html new file mode 100644 index 000000000..51a1e068b --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/package-summary.html @@ -0,0 +1,111 @@ + + + + + +org.vafer.jdeb.producers (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.producers

+
+
+
package org.vafer.jdeb.producers
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Base Producer class providing including/excluding.
    +
    + +
    +
    Providing data from an archive keeping permissions and ownerships.
    +
    + +
    +
    DataProducer iterating over a directory.
    +
    + +
    +
    DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
    +
    + +
    +
    Data producer that places multiple files into a single + destination directory.
    +
    + +
    +
    DataProducer providing data from an Ant fileset.
    +
    + +
    +
    DataProducer representing a single file + For cross-platform permissions and ownerships you probably want to use a Mapper, too.
    +
    + +
     
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/producers/package-tree.html new file mode 100644 index 000000000..cc163d9fd --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/package-tree.html @@ -0,0 +1,89 @@ + + + + + +org.vafer.jdeb.producers Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.producers

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/producers/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/producers/package-use.html new file mode 100644 index 000000000..76bea1e94 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/producers/package-use.html @@ -0,0 +1,89 @@ + + + + + +Uses of Package org.vafer.jdeb.producers (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.producers

+
+
Packages that use org.vafer.jdeb.producers
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/signing/PGPSigner.html b/release/1.10/apidocs/org/vafer/jdeb/signing/PGPSigner.html new file mode 100644 index 000000000..084cd5ebe --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/signing/PGPSigner.html @@ -0,0 +1,243 @@ + + + + + +PGPSigner (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PGPSigner

+
+
java.lang.Object +
org.vafer.jdeb.signing.PGPSigner
+
+
+
+
public class PGPSigner +extends Object
+
Signing with OpenPGP.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      clearSign

      +
      public void clearSign(String input, + OutputStream output) + throws IOException, +org.bouncycastle.openpgp.PGPException
      +
      Creates a clear sign signature over the input data. (Not detached)
      +
      +
      Parameters:
      +
      input - the content to be signed
      +
      output - the output destination of the signature
      +
      Throws:
      +
      IOException
      +
      org.bouncycastle.openpgp.PGPException
      +
      +
      +
    • +
    • +
      +

      clearSign

      +
      public void clearSign(InputStream input, + OutputStream output) + throws IOException, +org.bouncycastle.openpgp.PGPException
      +
      Creates a clear sign signature over the input data. (Not detached)
      +
      +
      Parameters:
      +
      input - the content to be signed
      +
      output - the output destination of the signature
      +
      Throws:
      +
      IOException
      +
      org.bouncycastle.openpgp.PGPException
      +
      +
      +
    • +
    • +
      +

      getSecretKey

      +
      public org.bouncycastle.openpgp.PGPSecretKey getSecretKey()
      +
      Returns the secret key.
      +
      +
    • +
    • +
      +

      getPrivateKey

      +
      public org.bouncycastle.openpgp.PGPPrivateKey getPrivateKey()
      +
      Returns the private key.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/signing/class-use/PGPSigner.html b/release/1.10/apidocs/org/vafer/jdeb/signing/class-use/PGPSigner.html new file mode 100644 index 000000000..6a890f686 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/signing/class-use/PGPSigner.html @@ -0,0 +1,94 @@ + + + + + +Uses of Class org.vafer.jdeb.signing.PGPSigner (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.signing.PGPSigner

+
+
Packages that use PGPSigner
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/signing/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/signing/package-summary.html new file mode 100644 index 000000000..7d60c393f --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/signing/package-summary.html @@ -0,0 +1,82 @@ + + + + + +org.vafer.jdeb.signing (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.signing

+
+
+
package org.vafer.jdeb.signing
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Signing with OpenPGP.
    +
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/signing/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/signing/package-tree.html new file mode 100644 index 000000000..ca16fdfbf --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/signing/package-tree.html @@ -0,0 +1,79 @@ + + + + + +org.vafer.jdeb.signing Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.signing

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/signing/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/signing/package-use.html new file mode 100644 index 000000000..d6f84f4e2 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/signing/package-use.html @@ -0,0 +1,89 @@ + + + + + +Uses of Package org.vafer.jdeb.signing (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.signing

+
+
Packages that use org.vafer.jdeb.signing
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/FilteredFile.html b/release/1.10/apidocs/org/vafer/jdeb/utils/FilteredFile.html new file mode 100644 index 000000000..17d8eb31e --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/FilteredFile.html @@ -0,0 +1,195 @@ + + + + + +FilteredFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FilteredFile

+
+
java.lang.Object +
org.vafer.jdeb.utils.FilteredFile
+
+
+
+
public class FilteredFile +extends Object
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/InformationInputStream.html b/release/1.10/apidocs/org/vafer/jdeb/utils/InformationInputStream.html new file mode 100644 index 000000000..4e3883ab9 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/InformationInputStream.html @@ -0,0 +1,265 @@ + + + + + +InformationInputStream (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InformationInputStream

+
+
java.lang.Object +
java.io.InputStream +
java.io.FilterInputStream +
org.vafer.jdeb.utils.InformationInputStream
+
+
+
+
+
+
All Implemented Interfaces:
+
Closeable, AutoCloseable
+
+
+
public final class InformationInputStream +extends FilterInputStream
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/InformationOutputStream.html b/release/1.10/apidocs/org/vafer/jdeb/utils/InformationOutputStream.html new file mode 100644 index 000000000..64c8248c6 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/InformationOutputStream.html @@ -0,0 +1,244 @@ + + + + + +InformationOutputStream (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InformationOutputStream

+
+ +
+
+
All Implemented Interfaces:
+
Closeable, Flushable, AutoCloseable
+
+
+ +
Convenience class to provide digest info and length of a stream. + + ATTENTION: don't use outside of jdeb
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/MapVariableResolver.html b/release/1.10/apidocs/org/vafer/jdeb/utils/MapVariableResolver.html new file mode 100644 index 000000000..2526fe9b6 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/MapVariableResolver.html @@ -0,0 +1,178 @@ + + + + + +MapVariableResolver (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MapVariableResolver

+
+
java.lang.Object +
org.vafer.jdeb.utils.MapVariableResolver
+
+
+
+
All Implemented Interfaces:
+
VariableResolver
+
+
+
public final class MapVariableResolver +extends Object +implements VariableResolver
+
Resolve variables based on a Map. + + ATTENTION: don't use outside of jdeb
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/OutputTimestampResolver.html b/release/1.10/apidocs/org/vafer/jdeb/utils/OutputTimestampResolver.html new file mode 100644 index 000000000..f463c3c06 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/OutputTimestampResolver.html @@ -0,0 +1,166 @@ + + + + + +OutputTimestampResolver (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class OutputTimestampResolver

+
+
java.lang.Object +
org.vafer.jdeb.utils.OutputTimestampResolver
+
+
+
+
public class OutputTimestampResolver +extends Object
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/PGPSignatureOutputStream.html b/release/1.10/apidocs/org/vafer/jdeb/utils/PGPSignatureOutputStream.html new file mode 100644 index 000000000..8525e60c2 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/PGPSignatureOutputStream.html @@ -0,0 +1,248 @@ + + + + + +PGPSignatureOutputStream (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PGPSignatureOutputStream

+
+
java.lang.Object +
java.io.OutputStream +
org.vafer.jdeb.utils.PGPSignatureOutputStream
+
+
+
+
+
All Implemented Interfaces:
+
Closeable, Flushable, AutoCloseable
+
+
+ +
An output stream that calculates the signature of the input data as it + is written
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PGPSignatureOutputStream

      +
      public PGPSignatureOutputStream(org.bouncycastle.openpgp.PGPSignatureGenerator signatureGenerator)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/SymlinkUtils.html b/release/1.10/apidocs/org/vafer/jdeb/utils/SymlinkUtils.html new file mode 100644 index 000000000..aeacae1c8 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/SymlinkUtils.html @@ -0,0 +1,159 @@ + + + + + +SymlinkUtils (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SymlinkUtils

+
+
java.lang.Object +
org.vafer.jdeb.utils.SymlinkUtils
+
+
+
+
public final class SymlinkUtils +extends Object
+
Simple utilities to deal with symbolic links
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/Utils.html b/release/1.10/apidocs/org/vafer/jdeb/utils/Utils.html new file mode 100644 index 000000000..709376b9d --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/Utils.html @@ -0,0 +1,432 @@ + + + + + +Utils (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Utils

+
+
java.lang.Object +
org.vafer.jdeb.utils.Utils
+
+
+
+
public final class Utils +extends Object
+
Simple utils functions. + + ATTENTION: don't use outside of jdeb
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Utils

      +
      public Utils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      copy

      +
      public static int copy(InputStream pInput, + OutputStream pOutput) + throws IOException
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      toHex

      +
      public static String toHex(byte[] bytes)
      +
      +
    • +
    • +
      +

      stripPath

      +
      public static String stripPath(int p, + String s)
      +
      +
    • +
    • +
      +

      joinUnixPath

      +
      public static String joinUnixPath(String... paths)
      +
      +
    • +
    • +
      +

      joinLocalPath

      +
      public static String joinLocalPath(String... paths)
      +
      +
    • +
    • +
      +

      stripLeadingSlash

      +
      public static String stripLeadingSlash(String s)
      +
      +
    • +
    • +
      +

      replaceVariables

      +
      public static String replaceVariables(VariableResolver pResolver, + String pExpression, + String pOpen, + String pClose)
      +
      Substitute the variables in the given expression with the + values from the resolver
      +
      +
      Parameters:
      +
      pResolver -
      +
      pExpression -
      +
      +
      +
    • +
    • +
      +

      toUnixLineEndings

      +
      public static byte[] toUnixLineEndings(InputStream input) + throws IOException
      +
      Replaces new line delimiters in the input stream with the Unix line feed.
      +
      +
      Parameters:
      +
      input -
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      convertToDebianVersion

      +
      public static String convertToDebianVersion(String version, + boolean apply, + String envName, + String template, + Date timestamp)
      +
      Convert the project version to a version suitable for a Debian package. + -SNAPSHOT suffixes are replaced with a timestamp (~yyyyMMddHHmmss). + The separator before a rc, alpha or beta version is replaced with '~' + such that the version is always ordered before the final or GA release.
      +
      +
      Parameters:
      +
      version - the project version to convert to a Debian package version
      +
      template - the template used to replace -SNAPSHOT, the timestamp format is in brackets, + the rest of the string is preserved (prefix[yyMMdd]suffix -> prefix151230suffix)
      +
      timestamp - the UTC date used as the timestamp to replace the SNAPSHOT suffix.
      +
      +
      +
    • +
    • +
      +

      movePath

      +
      public static String movePath(String file, + String target)
      +
      Construct new path by replacing file directory part. No + files are actually modified.
      +
      +
      Parameters:
      +
      file - path to move
      +
      target - new path directory
      +
      +
      +
    • +
    • +
      +

      lookupIfEmpty

      +
      public static String lookupIfEmpty(String value, + Map<String,​String> props, + String key)
      +
      Extracts value from map if given value is null.
      +
      +
      Parameters:
      +
      value - current value
      +
      props - properties to extract value from
      +
      key - property name to extract
      +
      Returns:
      +
      initial value or value extracted from map
      +
      +
      +
    • +
    • +
      +

      getKnownPGPSecureRingLocations

      + +
      Get the known locations where the secure keyring can be located. + Looks through known locations of the GNU PG secure keyring.
      +
      +
      Returns:
      +
      The location of the PGP secure keyring if it was found, + null otherwise
      +
      +
      +
    • +
    • +
      +

      guessKeyRingFile

      +
      public static File guessKeyRingFile() + throws FileNotFoundException
      +
      Tries to guess location of the user secure keyring using various + heuristics.
      +
      +
      Returns:
      +
      path to the keyring file
      +
      Throws:
      +
      FileNotFoundException - if no keyring file found
      +
      +
      +
    • +
    • +
      +

      isNullOrEmpty

      +
      public static boolean isNullOrEmpty(String str)
      +
      Returns true if string is null or empty.
      +
      +
    • +
    • +
      +

      defaultString

      +
      public static String defaultString(String str, + String fallback)
      +
      Return fallback if first string is null or empty
      +
      +
    • +
    • +
      +

      isBlank

      +
      public static boolean isBlank(CharSequence cs)
      +
      Check if a CharSequence is whitespace, empty ("") or null. + +
      + StringUtils.isBlank(null)      = true
      + StringUtils.isBlank("")        = true
      + StringUtils.isBlank(" ")       = true
      + StringUtils.isBlank("bob")     = false
      + StringUtils.isBlank("  bob  ") = false
      + 
      +
      +
      Parameters:
      +
      cs - the CharSequence to check, may be null
      +
      Returns:
      +
      true if the CharSequence is null, empty or whitespace
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/VariableResolver.html b/release/1.10/apidocs/org/vafer/jdeb/utils/VariableResolver.html new file mode 100644 index 000000000..857f2ec45 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/VariableResolver.html @@ -0,0 +1,140 @@ + + + + + +VariableResolver (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface VariableResolver

+
+
+
+
All Known Implementing Classes:
+
MapVariableResolver
+
+
+
public interface VariableResolver
+
Interface for resolving variables. + See Utils.replaceVariables() + + ATTENTION: don't use outside of jdeb
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    get​(String pKey)
    +
     
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/FilteredFile.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/FilteredFile.html new file mode 100644 index 000000000..f1ad949a8 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/FilteredFile.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.FilteredFile (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.FilteredFile

+
+No usage of org.vafer.jdeb.utils.FilteredFile
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/InformationInputStream.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/InformationInputStream.html new file mode 100644 index 000000000..8b2520867 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/InformationInputStream.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.InformationInputStream (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.InformationInputStream

+
+No usage of org.vafer.jdeb.utils.InformationInputStream
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/InformationOutputStream.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/InformationOutputStream.html new file mode 100644 index 000000000..6311fa71a --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/InformationOutputStream.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.InformationOutputStream (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.InformationOutputStream

+
+No usage of org.vafer.jdeb.utils.InformationOutputStream
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/MapVariableResolver.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/MapVariableResolver.html new file mode 100644 index 000000000..c297dea74 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/MapVariableResolver.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.MapVariableResolver (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.MapVariableResolver

+
+No usage of org.vafer.jdeb.utils.MapVariableResolver
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/OutputTimestampResolver.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/OutputTimestampResolver.html new file mode 100644 index 000000000..3b9781bc0 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/OutputTimestampResolver.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.OutputTimestampResolver (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.OutputTimestampResolver

+
+No usage of org.vafer.jdeb.utils.OutputTimestampResolver
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/PGPSignatureOutputStream.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/PGPSignatureOutputStream.html new file mode 100644 index 000000000..1e489ab0c --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/PGPSignatureOutputStream.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.PGPSignatureOutputStream (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.PGPSignatureOutputStream

+
+No usage of org.vafer.jdeb.utils.PGPSignatureOutputStream
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/SymlinkUtils.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/SymlinkUtils.html new file mode 100644 index 000000000..83e615168 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/SymlinkUtils.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.SymlinkUtils (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.SymlinkUtils

+
+No usage of org.vafer.jdeb.utils.SymlinkUtils
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/Utils.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/Utils.html new file mode 100644 index 000000000..b4c1ee916 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/Utils.html @@ -0,0 +1,65 @@ + + + + + +Uses of Class org.vafer.jdeb.utils.Utils (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.vafer.jdeb.utils.Utils

+
+No usage of org.vafer.jdeb.utils.Utils
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/VariableResolver.html b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/VariableResolver.html new file mode 100644 index 000000000..338bc6f3f --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/class-use/VariableResolver.html @@ -0,0 +1,149 @@ + + + + + +Uses of Interface org.vafer.jdeb.utils.VariableResolver (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Interface
org.vafer.jdeb.utils.VariableResolver

+
+
Packages that use VariableResolver
+
+
Package
+
Description
+ +
 
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/package-summary.html b/release/1.10/apidocs/org/vafer/jdeb/utils/package-summary.html new file mode 100644 index 000000000..10a06eb40 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/package-summary.html @@ -0,0 +1,116 @@ + + + + + +org.vafer.jdeb.utils (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.vafer.jdeb.utils

+
+
+
package org.vafer.jdeb.utils
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/package-tree.html b/release/1.10/apidocs/org/vafer/jdeb/utils/package-tree.html new file mode 100644 index 000000000..e08141ef1 --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/package-tree.html @@ -0,0 +1,112 @@ + + + + + +org.vafer.jdeb.utils Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.vafer.jdeb.utils

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/org/vafer/jdeb/utils/package-use.html b/release/1.10/apidocs/org/vafer/jdeb/utils/package-use.html new file mode 100644 index 000000000..30d19cd2c --- /dev/null +++ b/release/1.10/apidocs/org/vafer/jdeb/utils/package-use.html @@ -0,0 +1,119 @@ + + + + + +Uses of Package org.vafer.jdeb.utils (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.vafer.jdeb.utils

+
+
Packages that use org.vafer.jdeb.utils
+
+
Package
+
Description
+ +
 
+ +
 
+ +
 
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/overview-summary.html b/release/1.10/apidocs/overview-summary.html new file mode 100644 index 000000000..2668c2d65 --- /dev/null +++ b/release/1.10/apidocs/overview-summary.html @@ -0,0 +1,27 @@ + + + + + +jdeb 1.10 API + + + + + + + + + + + +
+ +

index.html

+
+ + diff --git a/release/1.10/apidocs/overview-tree.html b/release/1.10/apidocs/overview-tree.html new file mode 100644 index 000000000..825631106 --- /dev/null +++ b/release/1.10/apidocs/overview-tree.html @@ -0,0 +1,209 @@ + + + + + +Class Hierarchy (jdeb 1.10 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/release/1.10/apidocs/package-search-index.js b/release/1.10/apidocs/package-search-index.js new file mode 100644 index 000000000..56bcd9429 --- /dev/null +++ b/release/1.10/apidocs/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.vafer.jdeb"},{"l":"org.vafer.jdeb.ant"},{"l":"org.vafer.jdeb.changes"},{"l":"org.vafer.jdeb.debian"},{"l":"org.vafer.jdeb.mapping"},{"l":"org.vafer.jdeb.maven"},{"l":"org.vafer.jdeb.producers"},{"l":"org.vafer.jdeb.signing"},{"l":"org.vafer.jdeb.utils"}];updateSearchResults(); \ No newline at end of file diff --git a/release/1.10/apidocs/resources/glass.png b/release/1.10/apidocs/resources/glass.png new file mode 100644 index 000000000..a7f591f46 Binary files /dev/null and b/release/1.10/apidocs/resources/glass.png differ diff --git a/release/1.10/apidocs/resources/x.png b/release/1.10/apidocs/resources/x.png new file mode 100644 index 000000000..30548a756 Binary files /dev/null and b/release/1.10/apidocs/resources/x.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/release/1.10/apidocs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 000000000..34abd18f3 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/release/1.10/apidocs/script-dir/images/ui-bg_glass_65_dadada_1x400.png new file mode 100644 index 000000000..f058a9385 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-bg_glass_65_dadada_1x400.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/release/1.10/apidocs/script-dir/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 000000000..2ce04c165 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/release/1.10/apidocs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 000000000..a90afb8bf Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/release/1.10/apidocs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 000000000..dbe091f6d Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/release/1.10/apidocs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 000000000..5dc3593e4 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-icons_222222_256x240.png b/release/1.10/apidocs/script-dir/images/ui-icons_222222_256x240.png new file mode 100644 index 000000000..e723e17cb Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-icons_222222_256x240.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-icons_2e83ff_256x240.png b/release/1.10/apidocs/script-dir/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 000000000..1f5f49756 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-icons_2e83ff_256x240.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-icons_454545_256x240.png b/release/1.10/apidocs/script-dir/images/ui-icons_454545_256x240.png new file mode 100644 index 000000000..618f5b0ca Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-icons_454545_256x240.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-icons_888888_256x240.png b/release/1.10/apidocs/script-dir/images/ui-icons_888888_256x240.png new file mode 100644 index 000000000..ee5e33f27 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-icons_888888_256x240.png differ diff --git a/release/1.10/apidocs/script-dir/images/ui-icons_cd0a0a_256x240.png b/release/1.10/apidocs/script-dir/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 000000000..7e8ebc180 Binary files /dev/null and b/release/1.10/apidocs/script-dir/images/ui-icons_cd0a0a_256x240.png differ diff --git a/release/1.10/apidocs/script-dir/jquery-3.5.1.min.js b/release/1.10/apidocs/script-dir/jquery-3.5.1.min.js new file mode 100644 index 000000000..b0614034a --- /dev/null +++ b/release/1.10/apidocs/script-dir/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
    ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/release/1.10/apidocs/script-dir/jquery-ui.structure.min.css b/release/1.10/apidocs/script-dir/jquery-ui.structure.min.css new file mode 100644 index 000000000..e8808927f --- /dev/null +++ b/release/1.10/apidocs/script-dir/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.12.1 - 2018-12-06 +* http://jqueryui.com +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/release/1.10/apidocs/script.js b/release/1.10/apidocs/script.js new file mode 100644 index 000000000..864989cf4 --- /dev/null +++ b/release/1.10/apidocs/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/release/1.10/apidocs/search.js b/release/1.10/apidocs/search.js new file mode 100644 index 000000000..c58651872 --- /dev/null +++ b/release/1.10/apidocs/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search"); + var reset = $("#reset"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
    • " + item.category + "
    • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
    • ").appendTo(ul); + var div = $("
      ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
      " + + item.d + "
      "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && camelCaseMatcher.flags.indexOf("i") === -1) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search").focus(); + } + } + }); +}); diff --git a/release/1.10/apidocs/serialized-form.html b/release/1.10/apidocs/serialized-form.html new file mode 100644 index 000000000..f4f25066f --- /dev/null +++ b/release/1.10/apidocs/serialized-form.html @@ -0,0 +1,99 @@ + + + + + +Serialized Form (jdeb 1.10 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Serialized Form

      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/Compression.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/Compression.html new file mode 100644 index 000000000..d97505c64 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/Compression.html @@ -0,0 +1,158 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb;
      +018
      +019import java.io.OutputStream;
      +020
      +021import org.apache.commons.compress.compressors.CompressorException;
      +022import org.apache.commons.compress.compressors.CompressorStreamFactory;
      +023
      +024/**
      +025 * Compression method used for the data file.
      +026 */
      +027public enum Compression {
      +028
      +029    NONE(""),
      +030    GZIP(".gz"),
      +031    BZIP2(".bz2"),
      +032    XZ(".xz");
      +033
      +034    private String extension;
      +035
      +036    Compression(String extension) {
      +037        this.extension = extension;
      +038    }
      +039
      +040    /**
      +041     * Returns the extension of the compression method
      +042     */
      +043    public String getExtension() {
      +044        return extension;
      +045    }
      +046
      +047    public OutputStream toCompressedOutputStream(OutputStream out) throws CompressorException {
      +048        switch (this) {
      +049            case GZIP:
      +050                return new CompressorStreamFactory().createCompressorOutputStream("gz", out);
      +051            case BZIP2:
      +052                return new CompressorStreamFactory().createCompressorOutputStream("bzip2", out);
      +053            case XZ:
      +054                return new CompressorStreamFactory().createCompressorOutputStream("xz", out);
      +055            default:
      +056                return out;
      +057        }
      +058    }
      +059
      +060    /**
      +061     * Returns the compression method corresponding to the specified name.
      +062     * The matching is case insensitive.
      +063     *
      +064     * @param name the name of the compression method
      +065     * @return the compression method, or null if not recognized
      +066     */
      +067    public static Compression toEnum(String name) {
      +068        if ("gzip".equalsIgnoreCase(name) || "gz".equalsIgnoreCase(name)) {
      +069            return GZIP;
      +070        } else if ("bzip2".equalsIgnoreCase(name) || "bz2".equalsIgnoreCase(name)) {
      +071            return BZIP2;
      +072        } else if ("xz".equalsIgnoreCase(name)) {
      +073            return XZ;
      +074        } else if ("none".equalsIgnoreCase(name)) {
      +075            return NONE;
      +076        } else {
      +077            return null;
      +078        }
      +079    }
      +080}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/Console.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/Console.html new file mode 100644 index 000000000..a5c32dbd0 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/Console.html @@ -0,0 +1,108 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb;
      +018
      +019/**
      +020 * Plug in your favorite log implementation.
      +021 */
      +022public interface Console {
      +023
      +024    void debug( String message );
      +025
      +026    void info( String message );
      +027
      +028    void warn( String message );
      +029
      +030}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/DataConsumer.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/DataConsumer.html new file mode 100644 index 000000000..7d06a5849 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/DataConsumer.html @@ -0,0 +1,112 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb;
      +017
      +018import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +019
      +020import java.io.IOException;
      +021import java.io.InputStream;
      +022
      +023/**
      +024 * A DataConsumer consumes Data produced from a producer.
      +025 */
      +026public interface DataConsumer {
      +027
      +028    void onEachDir( TarArchiveEntry dirEntry ) throws IOException;
      +029
      +030    void onEachFile( InputStream input, TarArchiveEntry fileEntry ) throws IOException;
      +031
      +032    void onEachLink( TarArchiveEntry linkEntry ) throws IOException;
      +033
      +034}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/DataProducer.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/DataProducer.html new file mode 100644 index 000000000..7319b488f --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/DataProducer.html @@ -0,0 +1,105 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb;
      +017
      +018import java.io.IOException;
      +019
      +020/**
      +021 * Provides Data to a DataConsumer.
      +022 */
      +023public interface DataProducer {
      +024
      +025    void produce( DataConsumer receiver ) throws IOException;
      +026
      +027}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/DebMaker.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/DebMaker.html new file mode 100644 index 000000000..5c3a2c441 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/DebMaker.html @@ -0,0 +1,802 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb;
      +018
      +019import org.apache.commons.compress.archivers.ar.ArArchiveEntry;
      +020import org.apache.commons.compress.archivers.ar.ArArchiveOutputStream;
      +021import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +022import org.apache.commons.io.FileUtils;
      +023import org.apache.commons.io.FilenameUtils;
      +024import org.apache.commons.io.IOUtils;
      +025import org.apache.commons.lang3.StringUtils;
      +026import org.bouncycastle.bcpg.HashAlgorithmTags;
      +027import org.bouncycastle.crypto.digests.MD5Digest;
      +028import org.bouncycastle.jce.provider.BouncyCastleProvider;
      +029import org.bouncycastle.openpgp.PGPSignature;
      +030import org.bouncycastle.openpgp.PGPSignatureGenerator;
      +031import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder;
      +032import org.bouncycastle.util.encoders.Hex;
      +033import org.vafer.jdeb.changes.ChangeSet;
      +034import org.vafer.jdeb.changes.ChangesProvider;
      +035import org.vafer.jdeb.changes.TextfileChangesProvider;
      +036import org.vafer.jdeb.debian.BinaryPackageControlFile;
      +037import org.vafer.jdeb.debian.ChangesFile;
      +038import org.vafer.jdeb.signing.PGPSigner;
      +039import org.vafer.jdeb.utils.PGPSignatureOutputStream;
      +040import org.vafer.jdeb.utils.Utils;
      +041import org.vafer.jdeb.utils.VariableResolver;
      +042
      +043import java.io.ByteArrayOutputStream;
      +044import java.io.File;
      +045import java.io.FileInputStream;
      +046import java.io.FileOutputStream;
      +047import java.io.IOException;
      +048import java.io.InputStream;
      +049import java.math.BigInteger;
      +050import java.nio.charset.StandardCharsets;
      +051import java.security.MessageDigest;
      +052import java.security.NoSuchAlgorithmException;
      +053import java.security.Security;
      +054import java.text.SimpleDateFormat;
      +055import java.util.ArrayList;
      +056import java.util.Collection;
      +057import java.util.Date;
      +058import java.util.List;
      +059import java.util.Locale;
      +060import java.util.concurrent.TimeUnit;
      +061
      +062/**
      +063 * A generic class for creating Debian archives. Even supports signed changes
      +064 * files.
      +065 */
      +066public class DebMaker {
      +067
      +068    private static final int DEFAULT_MODE = 33188;
      +069
      +070    /** A console to output log message with */
      +071    private Console console;
      +072
      +073    /** The Debian package produced */
      +074    private File deb;
      +075
      +076    /** The directory containing the control files to build the package */
      +077    private File control;
      +078
      +079    /** The name of the package. Default value if not specified in the control file */
      +080    private String packageName;
      +081
      +082    /** The section of the package. Default value if not specified in the control file */
      +083    private String section = "java";
      +084
      +085    /** The dependencies of the package. */
      +086    private String depends;
      +087
      +088    /** The description of the package. Default value if not specified in the control file */
      +089    private String description;
      +090
      +091    /** The homepage of the application. Default value if not specified in the control file */
      +092    private String homepage;
      +093
      +094    /** The file containing the PGP keys */
      +095    private File keyring;
      +096
      +097    /** The key to use in the keyring */
      +098    private String key;
      +099
      +100    /** The passphrase for the key to sign the changes file */
      +101    private String passphrase;
      +102
      +103    /** The file to read the changes from */
      +104    private File changesIn;
      +105
      +106    /** The file where to write the changes to */
      +107    private File changesOut;
      +108
      +109    /** The file where to write the changes of the changes input to */
      +110    private File changesSave;
      +111
      +112    /** The compression method used for the data file (none, gzip, bzip2 or xz) */
      +113    private String compression = "gzip";
      +114
      +115    /** Whether to sign the package that is created */
      +116    private boolean signPackage;
      +117
      +118    /** Whether to sign the changes file that is created */
      +119    private boolean signChanges;
      +120
      +121    /** Defines which utility is used to verify the signed package */
      +122    private String signMethod;
      +123
      +124    /** Defines the role to sign with */
      +125    private String signRole;
      +126
      +127    /** Defines the longFileMode of the tar file that is built */
      +128    private String tarLongFileMode;
      +129
      +130    /** Defines the bigNumberMode of the tar file that is built */
      +131    private String tarBigNumberMode;
      +132
      +133    private Long outputTimestampMs;
      +134
      +135    private VariableResolver variableResolver;
      +136    private String openReplaceToken;
      +137    private String closeReplaceToken;
      +138
      +139    private final Collection<DataProducer> dataProducers = new ArrayList<>();
      +140
      +141    private final Collection<DataProducer> conffilesProducers = new ArrayList<>();
      +142    private String digest = "SHA256";
      +143
      +144    public DebMaker(Console console, Collection<DataProducer> dataProducers, Collection<DataProducer> conffileProducers) {
      +145        this.console = console;
      +146        if (dataProducers != null) {
      +147            this.dataProducers.addAll(dataProducers);
      +148        }
      +149        if (conffileProducers != null) {
      +150            this.conffilesProducers.addAll(conffileProducers);
      +151        }
      +152
      +153        Security.addProvider(new BouncyCastleProvider());
      +154    }
      +155
      +156    public void setDeb(File deb) {
      +157        this.deb = deb;
      +158    }
      +159
      +160    public void setControl(File control) {
      +161        this.control = control;
      +162    }
      +163
      +164    public void setPackage(String packageName) {
      +165        this.packageName = packageName;
      +166    }
      +167
      +168    public void setSection(String section) {
      +169        this.section = section;
      +170    }
      +171
      +172    public void setDepends(String depends) {
      +173        this.depends = depends;
      +174    }
      +175
      +176    public void setDescription(String description) {
      +177        this.description = description;
      +178    }
      +179
      +180    public void setHomepage(String homepage) {
      +181        this.homepage = homepage;
      +182    }
      +183
      +184    public void setChangesIn(File changes) {
      +185        this.changesIn = changes;
      +186    }
      +187
      +188    public void setChangesOut(File changes) {
      +189        this.changesOut = changes;
      +190    }
      +191
      +192    public void setChangesSave(File changes) {
      +193        this.changesSave = changes;
      +194    }
      +195
      +196    public void setSignPackage(boolean signPackage) {
      +197        this.signPackage = signPackage;
      +198    }
      +199
      +200    public void setSignChanges(boolean signChanges) {
      +201        this.signChanges = signChanges;
      +202    }
      +203
      +204    public void setSignMethod(String signMethod) {
      +205        this.signMethod = signMethod;
      +206    }
      +207
      +208    public void setSignRole(String signRole) {
      +209        this.signRole = signRole;
      +210    }
      +211
      +212    public void setKeyring(File keyring) {
      +213        this.keyring = keyring;
      +214    }
      +215
      +216    public void setKey(String key) {
      +217        this.key = key;
      +218    }
      +219
      +220    public void setPassphrase(String passphrase) {
      +221        this.passphrase = passphrase;
      +222    }
      +223
      +224    public void setCompression(String compression) {
      +225        this.compression = compression;
      +226    }
      +227
      +228    public void setResolver(VariableResolver variableResolver) {
      +229        this.variableResolver = variableResolver;
      +230    }
      +231
      +232    private boolean isWritableFile(File file) {
      +233        return !file.exists() || file.isFile() && file.canWrite();
      +234    }
      +235
      +236    public String getDigest() {
      +237        return digest;
      +238    }
      +239
      +240    public void setDigest(String digest) {
      +241        this.digest = digest;
      +242    }
      +243
      +244    public void setTarLongFileMode(String tarLongFileMode) {
      +245        this.tarLongFileMode = tarLongFileMode;
      +246    }
      +247
      +248    public void setTarBigNumberMode(String tarBigNumberMode) {
      +249        this.tarBigNumberMode = tarBigNumberMode;
      +250    }
      +251
      +252    public void setOutputTimestampMs(Long outputTimestampMs) {
      +253        this.outputTimestampMs = outputTimestampMs;
      +254    }
      +255
      +256    /**
      +257     * Validates the input parameters.
      +258     */
      +259    public void validate() throws PackagingException {
      +260        if (control == null || !control.isDirectory()) {
      +261            throw new PackagingException("The 'control' attribute doesn't point to a directory. " + control);
      +262        }
      +263
      +264        if (changesIn != null) {
      +265
      +266            if (changesIn.exists() && (!changesIn.isFile() || !changesIn.canRead())) {
      +267                throw new PackagingException("The 'changesIn' setting needs to point to a readable file. " + changesIn + " was not found/readable.");
      +268            }
      +269
      +270            if (changesOut != null && !isWritableFile(changesOut)) {
      +271                throw new PackagingException("Cannot write the output for 'changesOut' to " + changesOut);
      +272            }
      +273
      +274            if (changesSave != null && !isWritableFile(changesSave)) {
      +275                throw new PackagingException("Cannot write the output for 'changesSave' to " + changesSave);
      +276            }
      +277
      +278        } else {
      +279            if (changesOut != null || changesSave != null) {
      +280                throw new PackagingException("The 'changesOut' or 'changesSave' settings may only be used when there is a 'changesIn' specified.");
      +281            }
      +282        }
      +283
      +284        if (Compression.toEnum(compression) == null) {
      +285            throw new PackagingException("The compression method '" + compression + "' is not supported (expected 'none', 'gzip', 'bzip2' or 'xz')");
      +286        }
      +287
      +288        if (deb == null) {
      +289            throw new PackagingException("You need to specify where the deb file is supposed to be created.");
      +290        }
      +291
      +292        getDigestCode(digest);
      +293    }
      +294
      +295    static int getDigestCode(String digestName) throws PackagingException {
      +296        if ("SHA1".equals(digestName)) {
      +297            return HashAlgorithmTags.SHA1;
      +298        } else if ("MD2".equals(digestName)) {
      +299            return HashAlgorithmTags.MD2;
      +300        } else if ("MD5".equals(digestName)) {
      +301            return HashAlgorithmTags.MD5;
      +302        } else if ("RIPEMD160".equals(digestName)) {
      +303            return HashAlgorithmTags.RIPEMD160;
      +304        } else if ("SHA256".equals(digestName)) {
      +305            return HashAlgorithmTags.SHA256;
      +306        } else if ("SHA384".equals(digestName)) {
      +307            return HashAlgorithmTags.SHA384;
      +308        } else if ("SHA512".equals(digestName)) {
      +309            return HashAlgorithmTags.SHA512;
      +310        } else if ("SHA224".equals(digestName)) {
      +311            return HashAlgorithmTags.SHA224;
      +312        } else {
      +313            throw new PackagingException("unknown hash algorithm tag in digestName: " + digestName);
      +314        }
      +315    }
      +316
      +317    public void makeDeb() throws PackagingException {
      +318        BinaryPackageControlFile packageControlFile;
      +319        try {
      +320            console.info("Creating debian package: " + deb);
      +321
      +322            // If we should sign the package
      +323            if (signPackage) {
      +324
      +325                if (keyring == null || !keyring.exists()) {
      +326                    console.warn("Signing requested, but no keyring supplied");
      +327                }
      +328
      +329                if (key == null) {
      +330                    console.warn("Signing requested, but no key supplied");
      +331                }
      +332
      +333                if (passphrase == null) {
      +334                    console.warn("Signing requested, but no passphrase supplied");
      +335                }
      +336
      +337                PGPSigner signer;
      +338                try (FileInputStream keyRingInput = new FileInputStream(keyring)) {
      +339                    signer = new PGPSigner(keyRingInput, key, passphrase, getDigestCode(digest));
      +340                }
      +341
      +342                PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(signer.getSecretKey().getPublicKey().getAlgorithm(), getDigestCode(digest)));
      +343                signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, signer.getPrivateKey());
      +344
      +345                packageControlFile = createSignedDeb(Compression.toEnum(compression), signatureGenerator, signer);
      +346            } else {
      +347                packageControlFile = createDeb(Compression.toEnum(compression));
      +348            }
      +349
      +350        } catch (Exception e) {
      +351            throw new PackagingException("Failed to create debian package " + deb, e);
      +352        }
      +353
      +354        makeChangesFiles(packageControlFile);
      +355    }
      +356
      +357    private void makeChangesFiles(final BinaryPackageControlFile packageControlFile) throws PackagingException {
      +358        if (changesOut == null) {
      +359            changesOut = new File(deb.getParentFile(), FilenameUtils.getBaseName(deb.getName()) + ".changes");
      +360        }
      +361
      +362        ChangesProvider changesProvider;
      +363        FileOutputStream out = null;
      +364
      +365        try {
      +366            console.info("Creating changes file: " + changesOut);
      +367
      +368            out = new FileOutputStream(changesOut);
      +369
      +370            if (changesIn != null && changesIn.exists()) {
      +371                // read the changes form a textfile provider
      +372                changesProvider = new TextfileChangesProvider(new FileInputStream(changesIn), packageControlFile);
      +373            } else {
      +374                // create an empty changelog
      +375                changesProvider = new ChangesProvider() {
      +376                    public ChangeSet[] getChangesSets() {
      +377                        return new ChangeSet[] {
      +378                                new ChangeSet(packageControlFile.get("Package"),
      +379                                        packageControlFile.get("Version"),
      +380                                        new Date(),
      +381                                        packageControlFile.get("Distribution"),
      +382                                        packageControlFile.get("Urgency"),
      +383                                        packageControlFile.get("Maintainer"),
      +384                                        new String[0])
      +385                        };
      +386                    }
      +387                };
      +388            }
      +389
      +390            ChangesFileBuilder builder = new ChangesFileBuilder();
      +391            ChangesFile changesFile = builder.createChanges(packageControlFile, deb, changesProvider);
      +392
      +393            //(signChanges || signPackage) - for backward compatibility. signPackage is signing both changes and deb.
      +394            if ((signChanges || signPackage) && keyring != null && key != null && passphrase != null) {
      +395                console.info("Signing the changes file with the key " + key);
      +396                PGPSigner signer = new PGPSigner(new FileInputStream(keyring), key, passphrase, getDigestCode(digest));
      +397                signer.clearSign(changesFile.toString(), out);
      +398            } else {
      +399                out.write(changesFile.toString().getBytes(StandardCharsets.UTF_8));
      +400            }
      +401            out.flush();
      +402
      +403        } catch (Exception e) {
      +404            throw new PackagingException("Failed to create the Debian changes file " + changesOut, e);
      +405        } finally {
      +406            IOUtils.closeQuietly(out);
      +407        }
      +408
      +409        if (changesSave == null || !(changesProvider instanceof TextfileChangesProvider)) {
      +410            return;
      +411        }
      +412
      +413        try {
      +414            console.info("Saving changes to file: " + changesSave);
      +415
      +416            ((TextfileChangesProvider) changesProvider).save(new FileOutputStream(changesSave));
      +417
      +418        } catch (Exception e) {
      +419            throw new PackagingException("Failed to save debian changes file " + changesSave, e);
      +420        }
      +421    }
      +422
      +423    private List<String> populateConffiles(Collection<DataProducer> producers) {
      +424        final List<String> result = new ArrayList<>();
      +425
      +426        if (producers == null || producers.isEmpty()) {
      +427            return result;
      +428        }
      +429
      +430        final DataConsumer receiver = new DataConsumer() {
      +431            public void onEachFile(InputStream input, TarArchiveEntry entry)  {
      +432                String tempConffileItem = entry.getName();
      +433
      +434                // Make sure the conffile path is absolute
      +435                if (tempConffileItem.startsWith(".")) {
      +436                    tempConffileItem = tempConffileItem.substring(1);
      +437                }
      +438                if (!tempConffileItem.startsWith("/")) {
      +439                    tempConffileItem = "/" + tempConffileItem;
      +440                }
      +441
      +442                console.info("Adding conffile: " + tempConffileItem);
      +443                result.add(tempConffileItem);
      +444            }
      +445
      +446            public void onEachLink(TarArchiveEntry entry)  {
      +447            }
      +448
      +449            public void onEachDir(TarArchiveEntry tarArchiveEntry)  {
      +450            }
      +451        };
      +452
      +453        try {
      +454            for (DataProducer data : producers) {
      +455                data.produce(receiver);
      +456            }
      +457        } catch(Exception e) {
      +458            //
      +459        }
      +460
      +461        return result;
      +462    }
      +463
      +464    /**
      +465     * Create the debian archive with from the provided control files and data producers.
      +466     *
      +467     * @param compression   the compression method used for the data file
      +468     * @return BinaryPackageControlFile
      +469     * @throws PackagingException
      +470     */
      +471    public BinaryPackageControlFile createDeb(Compression compression) throws PackagingException {
      +472        return createSignedDeb(compression, null, null);
      +473    }
      +474    /**
      +475     * Create the debian archive with from the provided control files and data producers.
      +476     *
      +477     * @param compression   the compression method used for the data file (gzip, bzip2 or anything else for no compression)
      +478     * @param signatureGenerator   the signature generator
      +479     *
      +480     * @return PackageDescriptor
      +481     * @throws PackagingException
      +482     */
      +483    public BinaryPackageControlFile createSignedDeb(Compression compression, final PGPSignatureGenerator signatureGenerator, PGPSigner signer ) throws PackagingException {
      +484        File tempData = null;
      +485        File tempControl = null;
      +486
      +487        try {
      +488            tempData = File.createTempFile("deb", "data");
      +489            tempControl = File.createTempFile("deb", "control");
      +490
      +491            console.debug("Building data");
      +492            DataBuilder dataBuilder = new DataBuilder(console, outputTimestampMs);
      +493            StringBuilder md5s = new StringBuilder();
      +494            TarOptions options = new TarOptions()
      +495                .compression(compression)
      +496                .longFileMode(tarLongFileMode)
      +497                .bigNumberMode(tarBigNumberMode);
      +498            BigInteger size = dataBuilder.buildData(dataProducers, tempData, md5s, options);
      +499
      +500            console.info("Building conffiles");
      +501            List<String> tempConffiles = populateConffiles(conffilesProducers);
      +502
      +503            console.debug("Building control");
      +504            ControlBuilder controlBuilder = new ControlBuilder(console, variableResolver, openReplaceToken, closeReplaceToken, outputTimestampMs);
      +505            BinaryPackageControlFile packageControlFile = controlBuilder.createPackageControlFile(new File(control, "control"), size);
      +506            if (packageControlFile.get("Package") == null) {
      +507                packageControlFile.set("Package", packageName);
      +508            }
      +509            if (packageControlFile.get("Section") == null) {
      +510                packageControlFile.set("Section", section);
      +511            }
      +512            if (packageControlFile.get("Description") == null) {
      +513                packageControlFile.set("Description", description);
      +514            }
      +515            if (packageControlFile.get("Depends") == null) {
      +516                // Only add a depends entry to the control file if the field in this object has actually been set
      +517                if (depends != null && depends.length() > 0) {
      +518                    packageControlFile.set("Depends", depends);
      +519                }
      +520            }
      +521            if (packageControlFile.get("Homepage") == null) {
      +522                packageControlFile.set("Homepage", homepage);
      +523            }
      +524
      +525            controlBuilder.buildControl(packageControlFile, control.listFiles(), tempConffiles , md5s, tempControl);
      +526
      +527            if (!packageControlFile.isValid()) {
      +528                throw new PackagingException("Control file fields are invalid " + packageControlFile.invalidFields() +
      +529                        ". The following fields are mandatory: " + packageControlFile.getMandatoryFields() +
      +530                        ". Please check your pom.xml/build.xml and your control file.");
      +531            }
      +532
      +533            deb.getParentFile().mkdirs();
      +534
      +535            ArArchiveOutputStream ar = new ArArchiveOutputStream(new FileOutputStream(deb));
      +536
      +537            String binaryName = "debian-binary";
      +538            String binaryContent = "2.0\n";
      +539            String controlName = "control.tar.gz";
      +540            String dataName = "data.tar" + compression.getExtension();
      +541
      +542            addTo(ar, binaryName, binaryContent);
      +543            addTo(ar, controlName, tempControl);
      +544            addTo(ar, dataName, tempData);
      +545
      +546            if (signatureGenerator != null) {
      +547                console.info("Signing package with key " + key);
      +548
      +549                if(signRole == null) {
      +550                    signRole = "origin";
      +551                }
      +552
      +553                // Use debsig-verify as default
      +554                if (!"dpkg-sig".equals(signMethod)) {
      +555                    // Sign file to verify with debsig-verify
      +556                    PGPSignatureOutputStream sigStream = new PGPSignatureOutputStream(signatureGenerator);
      +557
      +558                    addTo(sigStream, binaryContent);
      +559                    addTo(sigStream, tempControl);
      +560                    addTo(sigStream, tempData);
      +561                    addTo(ar, "_gpg" + signRole, sigStream.generateASCIISignature());
      +562
      +563                } else {
      +564
      +565                    // Sign file to verify with dpkg-sig --verify
      +566                    final String outputStr =
      +567                            "Version: 4\n" +
      +568                                    "Signer: \n" +
      +569                                    "Date: " + new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.ENGLISH).format(new Date()) + "\n" +
      +570                                    "Role: " + signRole +"\n" +
      +571                                    "Files: \n" +
      +572                                    addFile(binaryName, binaryContent) +
      +573                                    addFile(controlName, tempControl) +
      +574                                    addFile(dataName, tempData);
      +575
      +576                    ByteArrayOutputStream message = new ByteArrayOutputStream();
      +577                    signer.clearSign(outputStr, message);
      +578
      +579                    addTo(ar, "_gpg" + signRole, message.toString());
      +580                }
      +581            }
      +582
      +583            ar.close();
      +584
      +585            return packageControlFile;
      +586
      +587        } catch (Exception e) {
      +588            throw new PackagingException("Could not create deb package", e);
      +589        } finally {
      +590            if (tempData != null) {
      +591                if (!tempData.delete()) {
      +592                    console.warn("Could not delete the temporary file " + tempData);
      +593                }
      +594            }
      +595            if (tempControl != null) {
      +596                if (!tempControl.delete()) {
      +597                    console.warn("Could not delete the temporary file " + tempControl);
      +598                }
      +599            }
      +600        }
      +601    }
      +602
      +603    private String addFile(String name, String input){
      +604        return addLine(md5Hash(input), sha1Hash(input), input.length(), name);
      +605    }
      +606
      +607    private String addFile(String name, File input){
      +608        return addLine(md5Hash(input), sha1Hash(input), input.length(), name);
      +609    }
      +610
      +611    private String addLine(String md5, String sha1, long size, String name){
      +612        return "\t" + md5 + " " + sha1 + " " + size + " " + name + "\n";
      +613    }
      +614
      +615    private String md5Hash(String input){
      +616        return md5Hash(input.getBytes());
      +617    }
      +618
      +619    private String md5Hash(File input){
      +620        try {
      +621            return md5Hash(FileUtils.readFileToByteArray(input));
      +622        } catch (IOException e) {
      +623            // TODO Auto-generated catch block
      +624            e.printStackTrace();
      +625        }
      +626
      +627        return null;
      +628    }
      +629
      +630    private String md5Hash(byte[] input){
      +631        //update the input of MD5
      +632        MD5Digest md5 = new MD5Digest();
      +633        md5.update(input, 0, input.length);
      +634
      +635        //get the output/ digest size and hash it
      +636        byte[] digest = new byte[md5.getDigestSize()];
      +637        md5.doFinal(digest, 0);
      +638
      +639        return new String(Hex.encode(digest));
      +640    }
      +641
      +642    private String sha1Hash(String input){
      +643        return sha1Hash(input.getBytes());
      +644    }
      +645
      +646    private String sha1Hash(File input){
      +647        try {
      +648            return sha1Hash(FileUtils.readFileToByteArray(input));
      +649        } catch (IOException e) {
      +650            // TODO Auto-generated catch block
      +651            e.printStackTrace();
      +652        }
      +653
      +654        return null;
      +655    }
      +656
      +657    private String sha1Hash(byte[] input){
      +658        try
      +659        {
      +660            //prepare the input
      +661            MessageDigest hash = MessageDigest.getInstance(digest);
      +662            hash.update(input);
      +663
      +664            //proceed ....
      +665            byte[] digest = hash.digest();
      +666
      +667            return new String(Hex.encode(digest));
      +668        }
      +669        catch (NoSuchAlgorithmException e)
      +670        {
      +671            System.err.println("No such algorithm");
      +672            e.printStackTrace();
      +673        }
      +674
      +675        return null;
      +676    }
      +677
      +678    private void addTo(ArArchiveOutputStream pOutput, String pName, String pContent) throws IOException {
      +679        final byte[] content = pContent.getBytes();
      +680        ArArchiveEntry archiveEntry = createArArchiveEntry(pName, content.length);
      +681
      +682        pOutput.putArchiveEntry(archiveEntry);
      +683        pOutput.write(content);
      +684        pOutput.closeArchiveEntry();
      +685    }
      +686
      +687    private void addTo(ArArchiveOutputStream pOutput, String pName, File pContent) throws IOException {
      +688        ArArchiveEntry archiveEntry = createArArchiveEntry(pName, pContent.length());
      +689
      +690        pOutput.putArchiveEntry(archiveEntry);
      +691                try (InputStream input = new FileInputStream(pContent)) {
      +692            Utils.copy(input, pOutput);
      +693        }
      +694
      +695        pOutput.closeArchiveEntry();
      +696    }
      +697
      +698    private void addTo(final PGPSignatureOutputStream pOutput, final String pContent) throws IOException {
      +699        final byte[] content = pContent.getBytes();
      +700        pOutput.write(content);
      +701    }
      +702
      +703    private void addTo(final PGPSignatureOutputStream pOutput, final File pContent) throws IOException {
      +704        try (InputStream input = new FileInputStream(pContent)) {
      +705            Utils.copy(input, pOutput);
      +706        }
      +707    }
      +708
      +709    public void setOpenReplaceToken(String openReplaceToken) {
      +710        this.openReplaceToken = openReplaceToken;
      +711    }
      +712
      +713    public void setCloseReplaceToken(String closeReplaceToken) {
      +714        this.closeReplaceToken = closeReplaceToken;
      +715    }
      +716
      +717    private ArArchiveEntry createArArchiveEntry(String pName, long contentLength) {
      +718        if (outputTimestampMs != null) {
      +719            return new ArArchiveEntry(pName, contentLength, 0, 0, DEFAULT_MODE, outputTimestampMs / TimeUnit.SECONDS.toMillis(1));
      +720        }
      +721
      +722        return new ArArchiveEntry(pName, contentLength);
      +723    }
      +724}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/PackagingException.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/PackagingException.html new file mode 100644 index 000000000..e485a3363 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/PackagingException.html @@ -0,0 +1,119 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb;
      +017
      +018/**
      +019 * Something went wrong while building the package
      +020 */
      +021public final class PackagingException extends Exception {
      +022
      +023    private static final long serialVersionUID = 1L;
      +024
      +025    public PackagingException() {
      +026        super();
      +027    }
      +028
      +029    public PackagingException( String message, Throwable cause ) {
      +030        super(message, cause);
      +031    }
      +032
      +033    public PackagingException( String message ) {
      +034        super(message);
      +035    }
      +036
      +037    public PackagingException( Throwable cause ) {
      +038        super(cause);
      +039    }
      +040
      +041}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/TarOptions.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/TarOptions.html new file mode 100644 index 000000000..e91498b0b --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/TarOptions.html @@ -0,0 +1,132 @@ + + + + +Source code + + + + + + +
      +
      +
      001package org.vafer.jdeb;
      +002
      +003import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
      +004
      +005public class TarOptions {
      +006
      +007    private Compression compression = Compression.GZIP;
      +008    private int longFileMode = TarArchiveOutputStream.LONGFILE_GNU;
      +009    private int bigNumberMode = TarArchiveOutputStream.BIGNUMBER_STAR;
      +010
      +011    public TarOptions compression(Compression compression) {
      +012        this.compression = compression;
      +013
      +014        return this;
      +015    }
      +016
      +017    public TarOptions longFileMode(String input) {
      +018        if ("posix".equals(input)) {
      +019            longFileMode = TarArchiveOutputStream.LONGFILE_POSIX;
      +020        } else if ("error".equals(input)) {
      +021            longFileMode = TarArchiveOutputStream.LONGFILE_ERROR;
      +022        } else if ("truncate".equals(input)) {
      +023            longFileMode = TarArchiveOutputStream.LONGFILE_TRUNCATE;
      +024        } else {
      +025            longFileMode = TarArchiveOutputStream.LONGFILE_GNU;
      +026        }
      +027
      +028        return this;
      +029    }
      +030
      +031    public TarOptions bigNumberMode(String input) {
      +032        if ("error".equals(input)) {
      +033            bigNumberMode = TarArchiveOutputStream.BIGNUMBER_ERROR;
      +034        } else if ("posix".equals(input)) {
      +035            bigNumberMode = TarArchiveOutputStream.BIGNUMBER_POSIX;
      +036        } else {
      +037            bigNumberMode = TarArchiveOutputStream.BIGNUMBER_STAR;
      +038        }
      +039
      +040        return this;
      +041    }
      +042
      +043    public int longFileMode() {
      +044        return longFileMode;
      +045    }
      +046
      +047    public int bigNumberMode() {
      +048        return bigNumberMode;
      +049    }
      +050
      +051    public Compression compression() {
      +052        return compression;
      +053    }
      +054}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Data.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Data.html new file mode 100644 index 000000000..de9db8f71 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Data.html @@ -0,0 +1,206 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.ant;
      +017
      +018import java.io.File;
      +019import java.io.FileNotFoundException;
      +020import java.io.IOException;
      +021import java.util.ArrayList;
      +022import java.util.Collection;
      +023import java.util.Iterator;
      +024
      +025import org.apache.tools.ant.types.PatternSet;
      +026import org.vafer.jdeb.DataConsumer;
      +027import org.vafer.jdeb.DataProducer;
      +028import org.vafer.jdeb.producers.DataProducerArchive;
      +029import org.vafer.jdeb.producers.DataProducerDirectory;
      +030import org.vafer.jdeb.producers.DataProducerFile;
      +031
      +032import static org.vafer.jdeb.ant.MissingSourceBehavior.*;
      +033
      +034/**
      +035 * Ant "data" element acting as a factory for DataProducers.
      +036 * So far Archive and Directory producers are supported.
      +037 * Both support the usual ant pattern set matching.
      +038 */
      +039public final class Data extends PatternSet implements DataProducer {
      +040
      +041    private final Collection<Mapper> mapperWrapper = new ArrayList<>();
      +042
      +043    private File src;
      +044
      +045    private String type;
      +046
      +047    private Boolean conffile;
      +048
      +049    private String destinationName;
      +050
      +051    private MissingSourceBehavior missingSrc = FAIL;
      +052
      +053    public void setSrc(File src) {
      +054        this.src = src;
      +055    }
      +056
      +057    public String getType() {
      +058        return type;
      +059    }
      +060
      +061    public void setType(String type) {
      +062        this.type = type;
      +063    }
      +064
      +065    public void setConffile(Boolean conffile) {
      +066        this.conffile = conffile;
      +067    }
      +068
      +069    public Boolean getConffile() {
      +070        return this.conffile;
      +071    }
      +072
      +073    public void setDst(String destinationName) {
      +074        this.destinationName = destinationName;
      +075    }
      +076
      +077    public void addMapper(Mapper mapper) {
      +078        mapperWrapper.add(mapper);
      +079    }
      +080
      +081
      +082    public void setMissingSrc( String missingSrc ) {
      +083        this.missingSrc = MissingSourceBehavior.valueOf(missingSrc.trim().toUpperCase());
      +084    }
      +085
      +086    public void produce( final DataConsumer pReceiver ) throws IOException {
      +087
      +088        if (src == null || !src.exists()) {
      +089            if (missingSrc == IGNORE) {
      +090                return;
      +091            } else {
      +092                throw new FileNotFoundException("Data source not found : " + src);
      +093            }
      +094        }
      +095
      +096        org.vafer.jdeb.mapping.Mapper[] mappers = new org.vafer.jdeb.mapping.Mapper[mapperWrapper.size()];
      +097        final Iterator<Mapper> it = mapperWrapper.iterator();
      +098        for (int i = 0; i < mappers.length; i++) {
      +099            mappers[i] = it.next().createMapper();
      +100        }
      +101
      +102        if ("file".equalsIgnoreCase(type)) {
      +103            new DataProducerFile(
      +104                src,
      +105                destinationName,
      +106                getIncludePatterns(getProject()),
      +107                getExcludePatterns(getProject()),
      +108                mappers
      +109            ).produce(pReceiver);
      +110
      +111        } else if ("archive".equalsIgnoreCase(type)) {
      +112            new DataProducerArchive(
      +113                src,
      +114                getIncludePatterns(getProject()),
      +115                getExcludePatterns(getProject()),
      +116                mappers
      +117            ).produce(pReceiver);
      +118
      +119        } else if ("directory".equalsIgnoreCase(type)) {
      +120            new DataProducerDirectory(
      +121                src,
      +122                getIncludePatterns(getProject()),
      +123                getExcludePatterns(getProject()),
      +124                mappers
      +125            ).produce(pReceiver);
      +126        }
      +127    }
      +128}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/DebAntTask.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/DebAntTask.html new file mode 100644 index 000000000..234fd7205 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/DebAntTask.html @@ -0,0 +1,268 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.ant;
      +018
      +019import java.io.File;
      +020import java.util.ArrayList;
      +021import java.util.Arrays;
      +022import java.util.Collection;
      +023
      +024import org.apache.tools.ant.BuildException;
      +025import org.apache.tools.ant.Project;
      +026import org.apache.tools.ant.taskdefs.MatchingTask;
      +027import org.apache.tools.ant.taskdefs.Tar;
      +028import org.apache.tools.ant.types.FileSet;
      +029import org.vafer.jdeb.Console;
      +030import org.vafer.jdeb.DataProducer;
      +031import org.vafer.jdeb.DebMaker;
      +032import org.vafer.jdeb.PackagingException;
      +033import org.vafer.jdeb.producers.DataProducerFileSet;
      +034import org.vafer.jdeb.utils.OutputTimestampResolver;
      +035
      +036/**
      +037 * AntTask for creating debian archives.
      +038 */
      +039public class DebAntTask extends MatchingTask {
      +040
      +041    /** The Debian package produced */
      +042    private File deb;
      +043
      +044    /** The directory containing the control files to build the package */
      +045    private File control;
      +046
      +047    /** The file containing the PGP keys */
      +048    private File keyring;
      +049
      +050    /** The key to use in the keyring */
      +051    private String key;
      +052
      +053    /** The passphrase for the key to sign the changes file */
      +054    private String passphrase;
      +055
      +056    /** The file to read the changes from */
      +057    private File changesIn;
      +058
      +059    /** The file where to write the changes to */
      +060    private File changesOut;
      +061
      +062    /** The file where to write the changes of the changes input to */
      +063    private File changesSave;
      +064
      +065    /** The compression method used for the data file (none, gzip, bzip2 or xz) */
      +066    private String compression = "gzip";
      +067
      +068    /**
      +069     * The digest algorithm to use.
      +070     *
      +071     * @see org.bouncycastle.bcpg.HashAlgorithmTags
      +072     */
      +073    private String digest = "SHA256";
      +074
      +075    /** Trigger the verbose mode detailing all operations */
      +076    private boolean verbose;
      +077
      +078    private Collection<Link> links = new ArrayList<>();
      +079
      +080    private Collection<DataProducer> dataProducers = new ArrayList<>();
      +081    private Collection<DataProducer> conffilesProducers = new ArrayList<>();
      +082
      +083
      +084    public void setDestfile( File deb ) {
      +085        this.deb = deb;
      +086    }
      +087
      +088    public void setControl( File control ) {
      +089        this.control = control;
      +090    }
      +091
      +092    public void setChangesIn( File changes ) {
      +093        this.changesIn = changes;
      +094    }
      +095
      +096    public void setChangesOut( File changes ) {
      +097        this.changesOut = changes;
      +098    }
      +099
      +100    public void setChangesSave( File changes ) {
      +101        this.changesSave = changes;
      +102    }
      +103
      +104    public void setKeyring( File keyring ) {
      +105        this.keyring = keyring;
      +106    }
      +107
      +108    public void setKey( String key ) {
      +109        this.key = key;
      +110    }
      +111
      +112    public void setPassphrase( String passphrase ) {
      +113        this.passphrase = passphrase;
      +114    }
      +115
      +116    public void setCompression( String compression ) {
      +117        this.compression = compression;
      +118    }
      +119
      +120    public void setVerbose( boolean verbose ) {
      +121        this.verbose = verbose;
      +122    }
      +123
      +124    public void addFileSet( FileSet fileset ) {
      +125        dataProducers.add(new DataProducerFileSet(fileset));
      +126    }
      +127
      +128    public void addTarFileSet( Tar.TarFileSet fileset ) {
      +129        dataProducers.add(new DataProducerFileSet(fileset));
      +130    }
      +131
      +132    public void addData( Data data ) {
      +133        dataProducers.add(data);
      +134    }
      +135
      +136    public void addLink( Link link ) {
      +137        links.add(link);
      +138    }
      +139
      +140    public void setDigest(String digest) {
      +141        this.digest = digest;
      +142    }
      +143
      +144    public void execute() {
      +145        // add the data producers for the links
      +146        for (Link link : links) {
      +147            dataProducers.add(link.toDataProducer());
      +148        }
      +149
      +150        // validate the type of the <data> elements
      +151        for (DataProducer dataProducer : dataProducers) {
      +152            if (dataProducer instanceof Data) {
      +153                Data data = (Data) dataProducer;
      +154                if (data.getType() == null) {
      +155                    throw new BuildException("The type of the data element wasn't specified (expected 'file', 'directory' or 'archive')");
      +156                } else if (!Arrays.asList("file", "directory", "archive").contains(data.getType().toLowerCase())) {
      +157                    throw new BuildException("The type '" + data.getType() + "' of the data element is unknown (expected 'file', 'directory' or 'archive')");
      +158                }
      +159                if (data.getConffile() != null && data.getConffile()) {
      +160                    conffilesProducers.add(dataProducer);
      +161                }
      +162            }
      +163        }
      +164
      +165        Console console = new TaskConsole(this, verbose);
      +166
      +167        DebMaker debMaker = new DebMaker(console, dataProducers, conffilesProducers);
      +168        debMaker.setDeb(deb);
      +169        debMaker.setControl(control);
      +170        debMaker.setChangesIn(changesIn);
      +171        debMaker.setChangesOut(changesOut);
      +172        debMaker.setChangesSave(changesSave);
      +173        debMaker.setKeyring(keyring);
      +174        debMaker.setKey(key);
      +175        debMaker.setPassphrase(passphrase);
      +176        debMaker.setCompression(compression);
      +177        debMaker.setDigest(digest);
      +178        Long outputTimestampMs = new OutputTimestampResolver(console).resolveOutputTimestamp(null);
      +179        debMaker.setOutputTimestampMs(outputTimestampMs);
      +180
      +181        try {
      +182            debMaker.validate();
      +183            debMaker.makeDeb();
      +184
      +185        } catch (PackagingException e) {
      +186            log("Failed to create the Debian package " + deb, e, Project.MSG_ERR);
      +187            throw new BuildException("Failed to create the Debian package " + deb, e);
      +188        }
      +189    }
      +190}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Link.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Link.html new file mode 100644 index 000000000..b4c909140 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Link.html @@ -0,0 +1,184 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.ant;
      +018
      +019import org.apache.commons.compress.archivers.zip.UnixStat;
      +020import org.vafer.jdeb.DataProducer;
      +021import org.vafer.jdeb.mapping.PermMapper;
      +022import org.vafer.jdeb.producers.DataProducerLink;
      +023
      +024/**
      +025 * Defines a symbolic or hard link.
      +026 */
      +027public final class Link {
      +028
      +029    private String name;
      +030    private String target;
      +031    private boolean symbolic = true;
      +032    private String username = "root";
      +033    private String group = "root";
      +034    private int uid = 0;
      +035    private int gid = 0;
      +036    private int mode = UnixStat.LINK_FLAG | UnixStat.DEFAULT_LINK_PERM;
      +037
      +038    DataProducer toDataProducer() {
      +039        org.vafer.jdeb.mapping.Mapper mapper = new PermMapper(uid, gid, username, group, mode, mode, 0, null);
      +040        return new DataProducerLink(name, target, symbolic, null, null, new org.vafer.jdeb.mapping.Mapper[]{mapper});
      +041    }
      +042
      +043    public String getName() {
      +044        return name;
      +045    }
      +046
      +047    public void setName(String name) {
      +048        this.name = name;
      +049    }
      +050
      +051    public String getTarget() {
      +052        return target;
      +053    }
      +054
      +055    public void setTarget(String target) {
      +056        this.target = target;
      +057    }
      +058
      +059    public boolean isSymbolic() {
      +060        return symbolic;
      +061    }
      +062
      +063    public void setSymbolic(boolean symbolic) {
      +064        this.symbolic = symbolic;
      +065    }
      +066
      +067    public String getUsername() {
      +068        return username;
      +069    }
      +070
      +071    public void setUsername(String username) {
      +072        this.username = username;
      +073    }
      +074
      +075    public String getGroup() {
      +076        return group;
      +077    }
      +078
      +079    public void setGroup(String group) {
      +080        this.group = group;
      +081    }
      +082
      +083    public int getUid() {
      +084        return uid;
      +085    }
      +086
      +087    public void setUid(int uid) {
      +088        this.uid = uid;
      +089    }
      +090
      +091    public int getGid() {
      +092        return gid;
      +093    }
      +094
      +095    public void setGid(int gid) {
      +096        this.gid = gid;
      +097    }
      +098
      +099    public int getMode() {
      +100        return mode;
      +101    }
      +102
      +103    public void setMode(String mode) {
      +104        this.mode = UnixStat.LINK_FLAG | Integer.parseInt(mode, 8);
      +105    }
      +106}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Mapper.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Mapper.html new file mode 100644 index 000000000..5cfea6f11 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/Mapper.html @@ -0,0 +1,180 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.ant;
      +017
      +018import java.io.File;
      +019import java.io.FileInputStream;
      +020import java.io.IOException;
      +021
      +022import org.vafer.jdeb.mapping.LsMapper;
      +023import org.vafer.jdeb.mapping.PermMapper;
      +024
      +025/**
      +026 * Ant "mapper" element acting as factory for the entry mapper.
      +027 * Supported types: ls, perm
      +028 */
      +029public final class Mapper {
      +030
      +031    private String mapperType = "perm";
      +032    private File src;
      +033
      +034    private String prefix;
      +035    private int strip;
      +036    private int uid = -1;
      +037    private int gid = -1;
      +038    private String user;
      +039    private String group;
      +040    private String fileMode;
      +041    private String dirMode;
      +042
      +043    public void setType( final String pType ) {
      +044        mapperType = pType;
      +045    }
      +046
      +047    public void setSrc( final File pSrc ) {
      +048        src = pSrc;
      +049    }
      +050
      +051
      +052    public void setPrefix( final String pPrefix ) {
      +053        prefix = pPrefix;
      +054    }
      +055
      +056    public void setStrip( final int pStrip ) {
      +057        strip = pStrip;
      +058    }
      +059
      +060
      +061    public void setUid( final int pUid ) {
      +062        uid = pUid;
      +063    }
      +064
      +065    public void setGid( final int pGid ) {
      +066        gid = pGid;
      +067    }
      +068
      +069    public void setUser( final String pUser ) {
      +070        user = pUser;
      +071    }
      +072
      +073    public void setGroup( final String pGroup ) {
      +074        group = pGroup;
      +075    }
      +076
      +077    public void setFileMode( final String pFileMode ) {
      +078        fileMode = pFileMode;
      +079    }
      +080
      +081    public void setDirMode( final String pDirMode ) {
      +082        dirMode = pDirMode;
      +083    }
      +084
      +085    public org.vafer.jdeb.mapping.Mapper createMapper() throws IOException {
      +086
      +087        if ("perm".equalsIgnoreCase(mapperType)) {
      +088            return new PermMapper(uid, gid, user, group, fileMode, dirMode, strip, prefix);
      +089        }
      +090
      +091        if ("ls".equalsIgnoreCase(mapperType)) {
      +092            try {
      +093                return new LsMapper(new FileInputStream(src));
      +094            } catch (Exception e) {
      +095                e.printStackTrace();
      +096            }
      +097        }
      +098
      +099        throw new IOException("Unknown mapper type '" + mapperType + "'");
      +100    }
      +101
      +102}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/MissingSourceBehavior.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/MissingSourceBehavior.html new file mode 100644 index 000000000..82166ba19 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/ant/MissingSourceBehavior.html @@ -0,0 +1,99 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.ant;
      +018
      +019public enum MissingSourceBehavior {
      +020    IGNORE, FAIL
      +021}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/ChangeSet.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/ChangeSet.html new file mode 100644 index 000000000..bf32ecd6d --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/ChangeSet.html @@ -0,0 +1,182 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.changes;
      +018
      +019import java.util.Date;
      +020
      +021/**
      +022 * A ChangeSet basically reflect a release as defined in the changes file.
      +023 *
      +024 * <pre>
      +025 * package (version) distribution(s); urgency=urgency
      +026 *        [optional blank line(s), stripped]
      +027 *   * change details
      +028 *     more change details
      +029 *        [blank line(s), included in output of dpkg-parsechangelog]
      +030 *   * even more change details
      +031 *        [optional blank line(s), stripped]
      +032 *  -- maintainer name &lt;email address&gt;[two spaces]  date
      +033 * </pre>
      +034 *
      +035 * @see <a href="http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog">Debian Policy Manual - Debian changelog</a>
      +036 */
      +037public final class ChangeSet {
      +038
      +039    private final String packageName;
      +040    private final String version;
      +041    private final Date date;
      +042    private final String distribution;
      +043    private final String urgency;
      +044    private final String changedBy;
      +045    private final String[] changes;
      +046
      +047    public ChangeSet(String packageName, String version, Date date, String distribution, String urgency, String changedBy, String[] changes) {
      +048        this.packageName = packageName;
      +049        this.version = version;
      +050        this.date = date;
      +051        this.distribution = distribution;
      +052        this.urgency = urgency;
      +053        this.changedBy = changedBy;
      +054        this.changes = changes;
      +055    }
      +056
      +057    public String getPackage() {
      +058        return packageName;
      +059    }
      +060
      +061    public String getVersion() {
      +062        return version;
      +063    }
      +064
      +065    public Date getDate() {
      +066        return date;
      +067    }
      +068
      +069    public String getDistribution() {
      +070        return distribution;
      +071    }
      +072
      +073    public String getUrgency() {
      +074        return urgency;
      +075    }
      +076
      +077    public String getChangedBy() {
      +078        return changedBy;
      +079    }
      +080
      +081    public String[] getChanges() {
      +082        return changes;
      +083    }
      +084
      +085    public String toString() {
      +086        StringBuilder sb = new StringBuilder();
      +087
      +088        sb.append(getTitle()).append('\n');
      +089
      +090        if (changes.length > 0) {
      +091            sb.append("\n");
      +092        }
      +093
      +094        for (String change : changes) {
      +095            sb.append("  * ").append(change).append('\n');
      +096        }
      +097
      +098        return sb.toString();
      +099    }
      +100
      +101    private String getTitle() {
      +102        return getPackage() + " (" + getVersion() + ") " + getDistribution() + "; urgency=" + getUrgency();
      +103    }
      +104}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/ChangesProvider.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/ChangesProvider.html new file mode 100644 index 000000000..2cbe09fa0 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/ChangesProvider.html @@ -0,0 +1,100 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.changes;
      +017
      +018public interface ChangesProvider {
      +019
      +020    ChangeSet[] getChangesSets();
      +021
      +022}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/TextfileChangesProvider.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/TextfileChangesProvider.html new file mode 100644 index 000000000..cdb3014d1 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/changes/TextfileChangesProvider.html @@ -0,0 +1,220 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.changes;
      +018
      +019import java.io.BufferedReader;
      +020import java.io.BufferedWriter;
      +021import java.io.IOException;
      +022import java.io.InputStream;
      +023import java.io.InputStreamReader;
      +024import java.io.OutputStream;
      +025import java.io.OutputStreamWriter;
      +026import java.text.DateFormat;
      +027import java.text.ParseException;
      +028import java.text.SimpleDateFormat;
      +029import java.util.ArrayList;
      +030import java.util.Collection;
      +031import java.util.Date;
      +032
      +033import org.vafer.jdeb.debian.BinaryPackageControlFile;
      +034
      +035/**
      +036 * Gets the changes from a changes file. The first entry are the current changes.
      +037 * The release line will be added. Example:
      +038 *
      +039 * release date=22:13 19.08.2007,version=1.5+r90114,urgency=low,by=Torsten Curdt &lt;torsten@vafer.org&gt;
      +040 *   * debian changes support
      +041 * release date=20:13 17.08.2007,version=1.4+r89114,urgency=low,by=Torsten Curdt &lt;torsten@vafer.org&gt;
      +042 *   * debian changes support
      +043 *
      +044 */
      +045public final class TextfileChangesProvider implements ChangesProvider {
      +046
      +047    private final ChangeSet[] changeSets;
      +048
      +049    private DateFormat fmt = new SimpleDateFormat("HH:mm dd.MM.yyyy");
      +050
      +051    public TextfileChangesProvider( final InputStream pInput, final BinaryPackageControlFile packageControlFile ) throws IOException, ParseException {
      +052
      +053        final BufferedReader reader = new BufferedReader(new InputStreamReader(pInput));
      +054
      +055        String packageName = packageControlFile.get("Package");
      +056        String version = packageControlFile.get("Version");
      +057        Date date = new Date();
      +058        String distribution = packageControlFile.get("Distribution");
      +059        String urgency = packageControlFile.get("Urgency");
      +060        String changedBy = packageControlFile.get("Maintainer");
      +061        Collection<String> changesColl = new ArrayList<>();
      +062        Collection<ChangeSet> changeSetColl = new ArrayList<>();
      +063
      +064
      +065        while (true) {
      +066            final String line = reader.readLine();
      +067            if (line == null) {
      +068                final String[] changes = changesColl.toArray(new String[changesColl.size()]);
      +069                final ChangeSet changeSet = new ChangeSet(packageName, version, date, distribution, urgency, changedBy, changes);
      +070                changeSetColl.add(changeSet);
      +071                break;
      +072            }
      +073
      +074            if (line.startsWith("release ")) {
      +075
      +076                if (changesColl.size() > 0) {
      +077                    final String[] changes = changesColl.toArray(new String[changesColl.size()]);
      +078                    final ChangeSet changeSet = new ChangeSet(packageName, version, date, distribution, urgency, changedBy, changes);
      +079                    changeSetColl.add(changeSet);
      +080                    changesColl.clear();
      +081                }
      +082
      +083                final String[] tokens = line.substring("release ".length()).split(",");
      +084                for (String token : tokens) {
      +085                    final String[] lr = token.trim().split("=");
      +086                    final String key = lr[0];
      +087                    final String value = lr[1];
      +088
      +089                    if ("urgency".equals(key)) {
      +090                        urgency = value;
      +091                    } else if ("by".equals(key)) {
      +092                        changedBy = value;
      +093                    } else if ("date".equals(key)) {
      +094                        date = fmt.parse(value);
      +095                    } else if ("version".equals(key)) {
      +096                        version = value;
      +097                    } else if ("distribution".equals(key)) {
      +098                        distribution = value;
      +099                    }
      +100                }
      +101                continue;
      +102            }
      +103
      +104            if (line.startsWith(" * ")) {
      +105                changesColl.add(line.substring(" * ".length()));
      +106                continue;
      +107            }
      +108
      +109            throw new ParseException("Unknown line syntax [" + line + "]", 0);
      +110        }
      +111
      +112        reader.close();
      +113
      +114        changeSets = changeSetColl.toArray(new ChangeSet[changeSetColl.size()]);
      +115    }
      +116
      +117    public void save(OutputStream pOutput) throws IOException {
      +118        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(pOutput));
      +119
      +120        for (ChangeSet changeSet : changeSets) {
      +121            writer.write("release ");
      +122            writer.write("date=" + fmt.format(changeSet.getDate()) + ",");
      +123            writer.write("version=" + changeSet.getVersion() + ",");
      +124            writer.write("urgency=" + changeSet.getUrgency() + ",");
      +125            writer.write("by=" + changeSet.getChangedBy() + ",");
      +126            writer.write("distribution=" + changeSet.getDistribution());
      +127            writer.write("\n");
      +128
      +129            for (String change : changeSet.getChanges()) {
      +130                writer.write(" * ");
      +131                writer.write(change);
      +132                writer.write("\n");
      +133            }
      +134        }
      +135
      +136        writer.close();
      +137    }
      +138
      +139    public ChangeSet[] getChangesSets() {
      +140        return changeSets;
      +141    }
      +142}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/BinaryPackageControlFile.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/BinaryPackageControlFile.html new file mode 100644 index 000000000..5c262a0e0 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/BinaryPackageControlFile.html @@ -0,0 +1,170 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.debian;
      +018
      +019import java.io.IOException;
      +020import java.io.InputStream;
      +021import java.text.ParseException;
      +022
      +023/**
      +024 * Binary package control file.
      +025 *
      +026 * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-binarycontrolfiles">Debian Policy Manual - Binary package control files</a>
      +027 */
      +028public final class BinaryPackageControlFile extends ControlFile {
      +029
      +030    private static final ControlField[] FIELDS = {
      +031            new ControlField("Package", true),
      +032            new ControlField("Source"),
      +033            new ControlField("Version", true),
      +034            new ControlField("Section", true),
      +035            new ControlField("Priority", true),
      +036            new ControlField("Architecture", true),
      +037            new ControlField("Essential"),
      +038            new ControlField("Depends"),
      +039            new ControlField("Pre-Depends"),
      +040            new ControlField("Recommends"),
      +041            new ControlField("Suggests"),
      +042            new ControlField("Breaks"),
      +043            new ControlField("Enhances"),
      +044            new ControlField("Conflicts"),
      +045            new ControlField("Provides"),
      +046            new ControlField("Replaces"),
      +047            new ControlField("Installed-Size"),
      +048            new ControlField("Maintainer", true),
      +049            new ControlField("Description", true, ControlField.Type.MULTILINE),
      +050            new ControlField("Homepage"),
      +051            new ControlField("Multi-Arch")
      +052    };
      +053
      +054    public BinaryPackageControlFile() {
      +055        set("Architecture", "all");
      +056        set("Priority", "optional");
      +057    }
      +058
      +059    public BinaryPackageControlFile(String input) throws IOException, ParseException {
      +060        parse(input);
      +061    }
      +062
      +063    public BinaryPackageControlFile(InputStream input) throws IOException, ParseException {
      +064        parse(input);
      +065    }
      +066
      +067    public void set(final String field, final String value) {
      +068        super.set(field, value);
      +069    }
      +070
      +071    protected ControlField[] getFields() {
      +072        return FIELDS;
      +073    }
      +074
      +075    /**
      +076     * Returns the short description of the package. The short description
      +077     * consists in the first line of the Description field.
      +078     *
      +079     * @return
      +080     */
      +081    public String getShortDescription() {
      +082        if (get("Description") == null) {
      +083            return null;
      +084        }
      +085
      +086        return get("Description").split("\n")[0];
      +087    }
      +088
      +089    protected char getUserDefinedFieldLetter() {
      +090        return 'B';
      +091    }
      +092}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ChangesFile.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ChangesFile.html new file mode 100644 index 000000000..c0b4f25f3 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ChangesFile.html @@ -0,0 +1,193 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.debian;
      +018
      +019import org.vafer.jdeb.utils.Utils;
      +020import org.vafer.jdeb.changes.ChangeSet;
      +021
      +022import java.text.DateFormat;
      +023import java.text.SimpleDateFormat;
      +024import java.util.Date;
      +025import java.util.Locale;
      +026import java.util.Map.Entry;
      +027
      +028/**
      +029 * Reflecting a changes file
      +030 *
      +031 * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-debianchangesfiles">Debian Policy Manual - Debian changes files</a>
      +032 */
      +033public final class ChangesFile extends ControlFile {
      +034
      +035    private static final ControlField[] FIELDS = {
      +036        new ControlField("Format", true),
      +037        new ControlField("Date", true),
      +038        new ControlField("Source", true),
      +039        new ControlField("Binary", true),
      +040        new ControlField("Architecture", true),
      +041        new ControlField("Version", true),
      +042        new ControlField("Distribution", true),
      +043        new ControlField("Urgency", true),
      +044        new ControlField("Maintainer", true),
      +045        new ControlField("Changed-By"),
      +046        new ControlField("Description", true, ControlField.Type.MULTILINE, true),
      +047        new ControlField("Changes", true, ControlField.Type.MULTILINE, true),
      +048        new ControlField("Closes"),
      +049        new ControlField("Checksums-Sha1", true, ControlField.Type.MULTILINE, true),
      +050        new ControlField("Checksums-Sha256", true, ControlField.Type.MULTILINE, true),
      +051        new ControlField("Files", true, ControlField.Type.MULTILINE, true)
      +052    };
      +053
      +054    public ChangesFile() {
      +055        set("Format", "1.8");
      +056        set("Urgency", "low");
      +057        set("Distribution", "stable");
      +058    }
      +059
      +060    /**
      +061     * Initializes the fields on the changes file with the values of the specified
      +062     * binary package control file.
      +063     *
      +064     * @param packageControlFile
      +065     */
      +066    public void initialize(BinaryPackageControlFile packageControlFile) {
      +067        set("Binary",       packageControlFile.get("Package"));
      +068        set("Source",       Utils.defaultString(packageControlFile.get("Source"), packageControlFile.get("Package")));
      +069        set("Architecture", packageControlFile.get("Architecture"));
      +070        set("Version",      packageControlFile.get("Version"));
      +071        set("Maintainer",   packageControlFile.get("Maintainer"));
      +072        set("Distribution", packageControlFile.get("Distribution"));
      +073
      +074        for (Entry<String, String> entry : packageControlFile.getUserDefinedFields().entrySet()) {
      +075            set(entry.getKey(), entry.getValue());
      +076        }
      +077
      +078        StringBuilder description = new StringBuilder();
      +079        description.append(packageControlFile.get("Package"));
      +080        if (packageControlFile.get("Description") != null) {
      +081            description.append(" - ");
      +082            description.append(packageControlFile.getShortDescription());
      +083        }
      +084        set("Description",  description.toString());
      +085    }
      +086
      +087    public void setChanges(ChangeSet[] changeSets) {
      +088        StringBuilder sb = new StringBuilder();
      +089
      +090        if (changeSets.length > 0) {
      +091            final ChangeSet mostRecentChangeSet = changeSets[0];
      +092            set("Urgency", mostRecentChangeSet.getUrgency());
      +093            set("Changed-By", mostRecentChangeSet.getChangedBy());
      +094
      +095            for (ChangeSet changeSet : changeSets) {
      +096                sb.append(changeSet.toString());
      +097            }
      +098        }
      +099
      +100        set("Changes", sb.toString());
      +101    }
      +102
      +103    protected ControlField[] getFields() {
      +104        return FIELDS;
      +105    }
      +106
      +107    protected char getUserDefinedFieldLetter() {
      +108        return 'C';
      +109    }
      +110
      +111    public static String formatDate(Date date) {
      +112        final DateFormat format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH); // RFC 2822 format
      +113        return format.format(date);
      +114    }
      +115}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlField.Type.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlField.Type.html new file mode 100644 index 000000000..42f6965bc --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlField.Type.html @@ -0,0 +1,206 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.debian;
      +018
      +019import java.io.BufferedReader;
      +020import java.io.IOException;
      +021import java.io.StringReader;
      +022
      +023/**
      +024 * A field of a control file. This class is immutable.
      +025 */
      +026public class ControlField {
      +027
      +028    /**
      +029     * The format of a field.
      +030     */
      +031    public enum Type {
      +032        /** Value on a single line */
      +033        SIMPLE,
      +034        /** Value on multiple lines, space characters are ignored */
      +035        FOLDED,
      +036        /** Value on multiple lines, space characters are preserved */
      +037        MULTILINE
      +038    }
      +039
      +040    /** The name of the field */
      +041    private final String name;
      +042
      +043    /** Tells if the field is mandatory */
      +044    private final boolean mandatory;
      +045
      +046    /** The type of the field */
      +047    private final Type type;
      +048
      +049    /** Tells is the first line of the field must be empty (for MULTILINE values only) */
      +050    private final boolean firstLineEmpty;
      +051
      +052
      +053    public ControlField(String name) {
      +054        this(name, false);
      +055    }
      +056
      +057    public ControlField(String name, boolean mandatory) {
      +058        this(name, mandatory, Type.SIMPLE);
      +059    }
      +060
      +061    public ControlField(String name, boolean mandatory, Type type) {
      +062        this(name, mandatory, type, false);
      +063    }
      +064
      +065    public ControlField(String name, boolean mandatory, Type type, boolean firstLineEmpty) {
      +066        this.name = name;
      +067        this.mandatory = mandatory;
      +068        this.type = type;
      +069        this.firstLineEmpty = firstLineEmpty;
      +070    }
      +071
      +072    public String getName() {
      +073        return name;
      +074    }
      +075
      +076    public boolean isMandatory() {
      +077        return mandatory;
      +078    }
      +079
      +080    public Type getType() {
      +081        return type;
      +082    }
      +083
      +084    public boolean isFirstLineEmpty() {
      +085        return firstLineEmpty;
      +086    }
      +087
      +088    /**
      +089     * Returns the field with the specified value properly formatted. Multiline
      +090     * values are automatically indented, and dots are added on the empty lines.
      +091     *
      +092     * <pre>
      +093     * Field-Name: value
      +094     * </pre>
      +095     */
      +096    public String format(String value) {
      +097        StringBuilder s = new StringBuilder();
      +098
      +099        if (value != null && value.trim().length() > 0) {
      +100            boolean continuationLine = false;
      +101
      +102            s.append(getName()).append(":");
      +103            if (isFirstLineEmpty()) {
      +104                s.append("\n");
      +105                continuationLine = true;
      +106            }
      +107
      +108            try {
      +109                BufferedReader reader = new BufferedReader(new StringReader(value));
      +110                String line;
      +111                while ((line = reader.readLine()) != null) {
      +112                    if (continuationLine && line.trim().length() == 0) {
      +113                        // put a dot on the empty continuation lines
      +114                        s.append(" .\n");
      +115                    } else {
      +116                        s.append(" ").append(line).append("\n");
      +117                    }
      +118
      +119                    continuationLine = true;
      +120                }
      +121            } catch (IOException e) {
      +122                e.printStackTrace();
      +123            }
      +124        }
      +125
      +126        return s.toString();
      +127    }
      +128}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlField.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlField.html new file mode 100644 index 000000000..7c249e6d6 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlField.html @@ -0,0 +1,206 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.debian;
      +018
      +019import java.io.BufferedReader;
      +020import java.io.IOException;
      +021import java.io.StringReader;
      +022
      +023/**
      +024 * A field of a control file. This class is immutable.
      +025 */
      +026public class ControlField {
      +027
      +028    /**
      +029     * The format of a field.
      +030     */
      +031    public enum Type {
      +032        /** Value on a single line */
      +033        SIMPLE,
      +034        /** Value on multiple lines, space characters are ignored */
      +035        FOLDED,
      +036        /** Value on multiple lines, space characters are preserved */
      +037        MULTILINE
      +038    }
      +039
      +040    /** The name of the field */
      +041    private final String name;
      +042
      +043    /** Tells if the field is mandatory */
      +044    private final boolean mandatory;
      +045
      +046    /** The type of the field */
      +047    private final Type type;
      +048
      +049    /** Tells is the first line of the field must be empty (for MULTILINE values only) */
      +050    private final boolean firstLineEmpty;
      +051
      +052
      +053    public ControlField(String name) {
      +054        this(name, false);
      +055    }
      +056
      +057    public ControlField(String name, boolean mandatory) {
      +058        this(name, mandatory, Type.SIMPLE);
      +059    }
      +060
      +061    public ControlField(String name, boolean mandatory, Type type) {
      +062        this(name, mandatory, type, false);
      +063    }
      +064
      +065    public ControlField(String name, boolean mandatory, Type type, boolean firstLineEmpty) {
      +066        this.name = name;
      +067        this.mandatory = mandatory;
      +068        this.type = type;
      +069        this.firstLineEmpty = firstLineEmpty;
      +070    }
      +071
      +072    public String getName() {
      +073        return name;
      +074    }
      +075
      +076    public boolean isMandatory() {
      +077        return mandatory;
      +078    }
      +079
      +080    public Type getType() {
      +081        return type;
      +082    }
      +083
      +084    public boolean isFirstLineEmpty() {
      +085        return firstLineEmpty;
      +086    }
      +087
      +088    /**
      +089     * Returns the field with the specified value properly formatted. Multiline
      +090     * values are automatically indented, and dots are added on the empty lines.
      +091     *
      +092     * <pre>
      +093     * Field-Name: value
      +094     * </pre>
      +095     */
      +096    public String format(String value) {
      +097        StringBuilder s = new StringBuilder();
      +098
      +099        if (value != null && value.trim().length() > 0) {
      +100            boolean continuationLine = false;
      +101
      +102            s.append(getName()).append(":");
      +103            if (isFirstLineEmpty()) {
      +104                s.append("\n");
      +105                continuationLine = true;
      +106            }
      +107
      +108            try {
      +109                BufferedReader reader = new BufferedReader(new StringReader(value));
      +110                String line;
      +111                while ((line = reader.readLine()) != null) {
      +112                    if (continuationLine && line.trim().length() == 0) {
      +113                        // put a dot on the empty continuation lines
      +114                        s.append(" .\n");
      +115                    } else {
      +116                        s.append(" ").append(line).append("\n");
      +117                    }
      +118
      +119                    continuationLine = true;
      +120                }
      +121            } catch (IOException e) {
      +122                e.printStackTrace();
      +123            }
      +124        }
      +125
      +126        return s.toString();
      +127    }
      +128}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlFile.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlFile.html new file mode 100644 index 000000000..a0dd5d58e --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/debian/ControlFile.html @@ -0,0 +1,308 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.debian;
      +018
      +019import java.io.BufferedReader;
      +020import java.io.ByteArrayInputStream;
      +021import java.io.IOException;
      +022import java.io.InputStream;
      +023import java.io.InputStreamReader;
      +024import java.text.ParseException;
      +025import java.util.ArrayList;
      +026import java.util.Arrays;
      +027import java.util.HashSet;
      +028import java.util.LinkedHashMap;
      +029import java.util.List;
      +030import java.util.Map;
      +031import java.util.Set;
      +032
      +033import static java.nio.charset.StandardCharsets.*;
      +034
      +035/**
      +036 * A control file as specified by the <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html">Debian policy</a>.
      +037 */
      +038public abstract class ControlFile {
      +039
      +040    protected final Map<String, String> values = new LinkedHashMap<>();
      +041    protected final Map<String, String> userDefinedFields = new LinkedHashMap<>();
      +042    protected final Set<ControlField> userDefinedFieldNames = new HashSet<>();
      +043
      +044    public void parse(String input) throws IOException, ParseException {
      +045        parse(new ByteArrayInputStream(input.getBytes(UTF_8)));
      +046    }
      +047
      +048    public void parse(InputStream input) throws IOException, ParseException {
      +049        BufferedReader reader = new BufferedReader(new InputStreamReader(input, UTF_8));
      +050        StringBuilder buffer = new StringBuilder();
      +051        String field = null;
      +052        int linenr = 0;
      +053        while (true) {
      +054            final String line = reader.readLine();
      +055
      +056            if (line == null) {
      +057                // flush value of the previous field
      +058                set(field, buffer.toString());
      +059                break;
      +060            }
      +061
      +062            linenr++;
      +063
      +064            if (line.length() == 0) {
      +065                throw new ParseException("Empty line", linenr);
      +066            }
      +067
      +068            final char first = line.charAt(0);
      +069            if (first == '#') {
      +070                // ignore commented out lines
      +071                continue;
      +072            }
      +073
      +074            if (Character.isLetter(first)) {
      +075
      +076                // new field
      +077
      +078                // flush value of the previous field
      +079                set(field, buffer.toString());
      +080                buffer = new StringBuilder();
      +081
      +082
      +083                final int i = line.indexOf(':');
      +084
      +085                if (i < 0) {
      +086                    throw new ParseException("Line misses ':' delimiter", linenr);
      +087                }
      +088
      +089                field = line.substring(0, i);
      +090                buffer.append(line.substring(i + 1).trim());
      +091
      +092                continue;
      +093            }
      +094
      +095            // continuing old value, lines with only a dot are ignored
      +096            buffer.append('\n');
      +097            if (!".".equals(line.substring(1).trim())) {
      +098                buffer.append(line.substring(1));
      +099            }
      +100        }
      +101        reader.close();
      +102
      +103    }
      +104
      +105    public void set(String field, final String value) {
      +106        if (field != null && isUserDefinedField(field)) {
      +107            userDefinedFields.put(field, value);
      +108            String fieldName = getUserDefinedFieldName(field);
      +109
      +110            if (fieldName != null) {
      +111                userDefinedFieldNames.add(new ControlField(fieldName));
      +112            }
      +113
      +114            field = fieldName;
      +115        }
      +116
      +117        if (field != null && !"".equals(field)) {
      +118            values.put(field, value);
      +119        }
      +120    }
      +121
      +122    public String get(String field) {
      +123        return values.get(field);
      +124    }
      +125
      +126    protected abstract ControlField[] getFields();
      +127
      +128    protected Map<String, String> getUserDefinedFields() {
      +129        return userDefinedFields;
      +130    }
      +131
      +132    protected Set<ControlField> getUserDefinedFieldNames() {
      +133        return userDefinedFieldNames;
      +134    }
      +135
      +136    public List<String> getMandatoryFields() {
      +137        List<String> fields = new ArrayList<>();
      +138
      +139        for (ControlField field : getFields()) {
      +140            if (field.isMandatory()) {
      +141                fields.add(field.getName());
      +142            }
      +143        }
      +144
      +145        return fields;
      +146    }
      +147
      +148    public boolean isValid() {
      +149        return invalidFields().size() == 0;
      +150    }
      +151
      +152    public Set<String> invalidFields() {
      +153        Set<String> invalid = new HashSet<>();
      +154
      +155        for (ControlField field : getFields()) {
      +156            if (field.isMandatory() && get(field.getName()) == null) {
      +157                invalid.add(field.getName());
      +158            }
      +159        }
      +160
      +161        return invalid;
      +162    }
      +163
      +164    public String toString(ControlField... fields) {
      +165        StringBuilder s = new StringBuilder();
      +166        for (ControlField field : fields) {
      +167            String value = values.get(field.getName());
      +168            s.append(field.format(value));
      +169        }
      +170        return s.toString();
      +171    }
      +172
      +173    public String toString() {
      +174        List<ControlField> fields = new ArrayList<>();
      +175        fields.addAll(Arrays.asList(getFields()));
      +176        fields.addAll(getUserDefinedFieldNames());
      +177        return toString(fields.toArray(new ControlField[fields.size()]));
      +178    }
      +179
      +180    /**
      +181     * Returns the letter expected in the prefix of a user defined field
      +182     * in order to include the field in this control file.
      +183     *
      +184     * @return The letter returned is:
      +185     * <ul>
      +186     *   <li>B: for a binary package</li>
      +187     *   <li>S: for a source package</li>
      +188     *   <li>C: for a changes file</li>
      +189     * </ul>
      +190     *
      +191     * @since 1.1
      +192     * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7">Debian Policy - User-defined fields</a>
      +193     */
      +194    protected abstract char getUserDefinedFieldLetter();
      +195
      +196    /**
      +197     * Tells if the specified field name is a user defined field.
      +198     * User-defined fields must begin with an 'X', followed by one or more
      +199     * letters that specify the output file and a hyphen.
      +200     *
      +201     * @param field the name of the field
      +202     *
      +203     * @since 1.1
      +204     * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7">Debian Policy - User-defined fields</a>
      +205     */
      +206    protected boolean isUserDefinedField(String field) {
      +207        return field.startsWith("X") && field.indexOf("-") > 0;
      +208    }
      +209
      +210    /**
      +211     * Returns the user defined field without its prefix.
      +212     *
      +213     * @param field the name of the user defined field
      +214     * @return the user defined field without the prefix, or null if the fields
      +215     *         doesn't apply to this control file.
      +216     * @since 1.1
      +217     */
      +218    protected String getUserDefinedFieldName(String field) {
      +219        int index = field.indexOf('-');
      +220        char letter = getUserDefinedFieldLetter();
      +221
      +222        for (int i = 0; i < index; ++i) {
      +223            if (field.charAt(i) == letter) {
      +224                return field.substring(index + 1);
      +225            }
      +226        }
      +227
      +228        return null;
      +229    }
      +230}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/LsMapper.ParseError.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/LsMapper.ParseError.html new file mode 100644 index 000000000..ff9271e45 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/LsMapper.ParseError.html @@ -0,0 +1,301 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.mapping;
      +017
      +018import java.io.BufferedReader;
      +019import java.io.IOException;
      +020import java.io.InputStream;
      +021import java.io.InputStreamReader;
      +022import java.util.HashMap;
      +023import java.util.Map;
      +024import java.util.regex.Matcher;
      +025import java.util.regex.Pattern;
      +026
      +027import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +028
      +029/**
      +030 * Reads permissions and ownerships from a "ls -laR &gt; mapping.txt" dump and
      +031 * maps entries accordingly.
      +032 */
      +033public final class LsMapper implements Mapper {
      +034
      +035    private final Map<String, TarArchiveEntry> mapping;
      +036
      +037
      +038    public final static class ParseError extends Exception {
      +039
      +040        private static final long serialVersionUID = 1L;
      +041
      +042        public ParseError( String message ) {
      +043            super(message);
      +044        }
      +045    }
      +046
      +047
      +048    public LsMapper( final InputStream pInput ) throws IOException, ParseError {
      +049        mapping = parse(pInput);
      +050    }
      +051
      +052    /*
      +053./trunk/target/test-classes/org/vafer/dependency:
      +054total 176
      +055drwxr-xr-x   23 tcurdt  tcurdt   782 Jun 25 03:48 .
      +056drwxr-xr-x    3 tcurdt  tcurdt   102 Jun 25 03:48 ..
      +057-rw-r--r--    1 tcurdt  tcurdt  2934 Jun 25 03:48 DependenciesTestCase.class
      +058-rw-r--r--    1 tcurdt  tcurdt   786 Jun 25 03:48 JarCombiningTestCase$1.class
      +059-rw-r--r--    1 tcurdt  tcurdt  2176 Jun 25 03:48 WarTestCase.class
      +060drwxr-xr-x    4 tcurdt  tcurdt   136 Jun 25 03:48 classes
      +061
      +062./trunk/target/test-classes/org/vafer/dependency/classes:
      +063     */
      +064
      +065    final private Pattern basePattern = Pattern.compile("^\\./(.*):$");
      +066    final private Pattern totalPattern = Pattern.compile("^total ([0-9]+)$");
      +067    final private Pattern dirPattern = Pattern.compile("^d([rwx-]{9})\\s+([0-9]+)\\s+(\\S*)\\s+(\\S*)\\s+([0-9]+)\\s+(.*)\\s+[.]{1,2}$");
      +068    final private Pattern filePattern = Pattern.compile("^([d-])([rwx-]{9})\\s+([0-9]+)\\s+(\\S*)\\s+(\\S*)\\s+([0-9]+)\\s+(.*)\\s+(.*)$");
      +069    final private Pattern newlinePattern = Pattern.compile("$");
      +070
      +071    private String readBase( final BufferedReader reader ) throws IOException, ParseError {
      +072        final String line = reader.readLine();
      +073        if (line == null) {
      +074            return null;
      +075        }
      +076        final Matcher matcher = basePattern.matcher(line);
      +077        if (!matcher.matches()) {
      +078            throw new ParseError("expected base line but got \"" + line + "\"");
      +079        }
      +080        return matcher.group(1);
      +081    }
      +082
      +083    private String readTotal( final BufferedReader reader ) throws IOException, ParseError {
      +084        final String line = reader.readLine();
      +085        final Matcher matcher = totalPattern.matcher(line);
      +086        if (!matcher.matches()) {
      +087            throw new ParseError("expected total line but got \"" + line + "\"");
      +088        }
      +089        return matcher.group(1);
      +090    }
      +091
      +092    private TarArchiveEntry readDir( final BufferedReader reader, final String base ) throws IOException, ParseError {
      +093        final String current = reader.readLine();
      +094        final Matcher currentMatcher = dirPattern.matcher(current);
      +095        if (!currentMatcher.matches()) {
      +096            throw new ParseError("expected dirline but got \"" + current + "\"");
      +097        }
      +098
      +099        final String parent = reader.readLine();
      +100        final Matcher parentMatcher = dirPattern.matcher(parent);
      +101        if (!parentMatcher.matches()) {
      +102            throw new ParseError("expected dirline but got \"" + parent + "\"");
      +103        }
      +104
      +105        final TarArchiveEntry entry = new TarArchiveEntry(base, true);
      +106
      +107        entry.setMode(convertModeFromString(currentMatcher.group(1)));
      +108        entry.setUserName(currentMatcher.group(3));
      +109        entry.setGroupName(currentMatcher.group(4));
      +110
      +111        return entry;
      +112    }
      +113
      +114
      +115    private int convertModeFromString( final String mode ) {
      +116
      +117        final char[] m = mode.toCharArray();
      +118        /*
      +119           -rwxrwxrwx
      +120
      +121           4000    set-user-ID-on-execution bit
      +122           2000    set-user-ID-on-execution bit
      +123           1000    sticky bit
      +124           0400    allow read by owner.
      +125           0200    allow write by owner.
      +126           0100    execute / search
      +127           0040    allow read by group members.
      +128           0020    allow write by group members.
      +129           0010    execute / search
      +130           0004    allow read by others.
      +131           0002    allow write by others.
      +132           0001    execute / search
      +133         */
      +134        // TODO: simplified - needs fixing
      +135        int sum = 0;
      +136        int bit = 1;
      +137        for (int i = m.length - 1; i >= 0; i--) {
      +138            if (m[i] != '-') {
      +139                sum += bit;
      +140            }
      +141            bit += bit;
      +142        }
      +143        return sum;
      +144    }
      +145
      +146    private TarArchiveEntry readFile( final BufferedReader reader, final String base ) throws IOException, ParseError {
      +147
      +148        while (true) {
      +149            final String line = reader.readLine();
      +150
      +151            if (line == null) {
      +152                return null;
      +153            }
      +154
      +155            final Matcher currentMatcher = filePattern.matcher(line);
      +156            if (!currentMatcher.matches()) {
      +157                final Matcher newlineMatcher = newlinePattern.matcher(line);
      +158                if (newlineMatcher.matches()) {
      +159                    return null;
      +160                }
      +161                throw new ParseError("expected file line but got \"" + line + "\"");
      +162            }
      +163
      +164            final String type = currentMatcher.group(1);
      +165            if (type.startsWith("-")) {
      +166                final TarArchiveEntry entry = new TarArchiveEntry(base + "/" + currentMatcher.group(8), true);
      +167
      +168                entry.setMode(convertModeFromString(currentMatcher.group(2)));
      +169                entry.setUserName(currentMatcher.group(4));
      +170                entry.setGroupName(currentMatcher.group(5));
      +171
      +172                return entry;
      +173            }
      +174        }
      +175
      +176    }
      +177
      +178    private Map<String, TarArchiveEntry> parse( final InputStream pInput ) throws IOException, ParseError {
      +179        final Map<String, TarArchiveEntry> mapping = new HashMap<>();
      +180
      +181        final BufferedReader reader = new BufferedReader(new InputStreamReader(pInput));
      +182
      +183        boolean first = true;
      +184        while (true) {
      +185
      +186            final String base;
      +187            if (first) {
      +188                base = "";
      +189                first = false;
      +190            } else {
      +191                base = readBase(reader);
      +192                if (base == null) {
      +193                    break;
      +194                }
      +195            }
      +196
      +197            readTotal(reader);
      +198            final TarArchiveEntry dir = readDir(reader, base);
      +199            mapping.put(dir.getName(), dir);
      +200
      +201            while (true) {
      +202                final TarArchiveEntry file = readFile(reader, base);
      +203
      +204                if (file == null) {
      +205                    break;
      +206                }
      +207
      +208                mapping.put(file.getName(), file);
      +209            }
      +210        }
      +211
      +212        return mapping;
      +213    }
      +214
      +215    public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +216        final TarArchiveEntry entry = mapping.get(pEntry.getName());
      +217        if (entry != null) {
      +218            return entry;
      +219        }
      +220        return pEntry;
      +221    }
      +222
      +223}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/LsMapper.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/LsMapper.html new file mode 100644 index 000000000..233d252cb --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/LsMapper.html @@ -0,0 +1,301 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.mapping;
      +017
      +018import java.io.BufferedReader;
      +019import java.io.IOException;
      +020import java.io.InputStream;
      +021import java.io.InputStreamReader;
      +022import java.util.HashMap;
      +023import java.util.Map;
      +024import java.util.regex.Matcher;
      +025import java.util.regex.Pattern;
      +026
      +027import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +028
      +029/**
      +030 * Reads permissions and ownerships from a "ls -laR &gt; mapping.txt" dump and
      +031 * maps entries accordingly.
      +032 */
      +033public final class LsMapper implements Mapper {
      +034
      +035    private final Map<String, TarArchiveEntry> mapping;
      +036
      +037
      +038    public final static class ParseError extends Exception {
      +039
      +040        private static final long serialVersionUID = 1L;
      +041
      +042        public ParseError( String message ) {
      +043            super(message);
      +044        }
      +045    }
      +046
      +047
      +048    public LsMapper( final InputStream pInput ) throws IOException, ParseError {
      +049        mapping = parse(pInput);
      +050    }
      +051
      +052    /*
      +053./trunk/target/test-classes/org/vafer/dependency:
      +054total 176
      +055drwxr-xr-x   23 tcurdt  tcurdt   782 Jun 25 03:48 .
      +056drwxr-xr-x    3 tcurdt  tcurdt   102 Jun 25 03:48 ..
      +057-rw-r--r--    1 tcurdt  tcurdt  2934 Jun 25 03:48 DependenciesTestCase.class
      +058-rw-r--r--    1 tcurdt  tcurdt   786 Jun 25 03:48 JarCombiningTestCase$1.class
      +059-rw-r--r--    1 tcurdt  tcurdt  2176 Jun 25 03:48 WarTestCase.class
      +060drwxr-xr-x    4 tcurdt  tcurdt   136 Jun 25 03:48 classes
      +061
      +062./trunk/target/test-classes/org/vafer/dependency/classes:
      +063     */
      +064
      +065    final private Pattern basePattern = Pattern.compile("^\\./(.*):$");
      +066    final private Pattern totalPattern = Pattern.compile("^total ([0-9]+)$");
      +067    final private Pattern dirPattern = Pattern.compile("^d([rwx-]{9})\\s+([0-9]+)\\s+(\\S*)\\s+(\\S*)\\s+([0-9]+)\\s+(.*)\\s+[.]{1,2}$");
      +068    final private Pattern filePattern = Pattern.compile("^([d-])([rwx-]{9})\\s+([0-9]+)\\s+(\\S*)\\s+(\\S*)\\s+([0-9]+)\\s+(.*)\\s+(.*)$");
      +069    final private Pattern newlinePattern = Pattern.compile("$");
      +070
      +071    private String readBase( final BufferedReader reader ) throws IOException, ParseError {
      +072        final String line = reader.readLine();
      +073        if (line == null) {
      +074            return null;
      +075        }
      +076        final Matcher matcher = basePattern.matcher(line);
      +077        if (!matcher.matches()) {
      +078            throw new ParseError("expected base line but got \"" + line + "\"");
      +079        }
      +080        return matcher.group(1);
      +081    }
      +082
      +083    private String readTotal( final BufferedReader reader ) throws IOException, ParseError {
      +084        final String line = reader.readLine();
      +085        final Matcher matcher = totalPattern.matcher(line);
      +086        if (!matcher.matches()) {
      +087            throw new ParseError("expected total line but got \"" + line + "\"");
      +088        }
      +089        return matcher.group(1);
      +090    }
      +091
      +092    private TarArchiveEntry readDir( final BufferedReader reader, final String base ) throws IOException, ParseError {
      +093        final String current = reader.readLine();
      +094        final Matcher currentMatcher = dirPattern.matcher(current);
      +095        if (!currentMatcher.matches()) {
      +096            throw new ParseError("expected dirline but got \"" + current + "\"");
      +097        }
      +098
      +099        final String parent = reader.readLine();
      +100        final Matcher parentMatcher = dirPattern.matcher(parent);
      +101        if (!parentMatcher.matches()) {
      +102            throw new ParseError("expected dirline but got \"" + parent + "\"");
      +103        }
      +104
      +105        final TarArchiveEntry entry = new TarArchiveEntry(base, true);
      +106
      +107        entry.setMode(convertModeFromString(currentMatcher.group(1)));
      +108        entry.setUserName(currentMatcher.group(3));
      +109        entry.setGroupName(currentMatcher.group(4));
      +110
      +111        return entry;
      +112    }
      +113
      +114
      +115    private int convertModeFromString( final String mode ) {
      +116
      +117        final char[] m = mode.toCharArray();
      +118        /*
      +119           -rwxrwxrwx
      +120
      +121           4000    set-user-ID-on-execution bit
      +122           2000    set-user-ID-on-execution bit
      +123           1000    sticky bit
      +124           0400    allow read by owner.
      +125           0200    allow write by owner.
      +126           0100    execute / search
      +127           0040    allow read by group members.
      +128           0020    allow write by group members.
      +129           0010    execute / search
      +130           0004    allow read by others.
      +131           0002    allow write by others.
      +132           0001    execute / search
      +133         */
      +134        // TODO: simplified - needs fixing
      +135        int sum = 0;
      +136        int bit = 1;
      +137        for (int i = m.length - 1; i >= 0; i--) {
      +138            if (m[i] != '-') {
      +139                sum += bit;
      +140            }
      +141            bit += bit;
      +142        }
      +143        return sum;
      +144    }
      +145
      +146    private TarArchiveEntry readFile( final BufferedReader reader, final String base ) throws IOException, ParseError {
      +147
      +148        while (true) {
      +149            final String line = reader.readLine();
      +150
      +151            if (line == null) {
      +152                return null;
      +153            }
      +154
      +155            final Matcher currentMatcher = filePattern.matcher(line);
      +156            if (!currentMatcher.matches()) {
      +157                final Matcher newlineMatcher = newlinePattern.matcher(line);
      +158                if (newlineMatcher.matches()) {
      +159                    return null;
      +160                }
      +161                throw new ParseError("expected file line but got \"" + line + "\"");
      +162            }
      +163
      +164            final String type = currentMatcher.group(1);
      +165            if (type.startsWith("-")) {
      +166                final TarArchiveEntry entry = new TarArchiveEntry(base + "/" + currentMatcher.group(8), true);
      +167
      +168                entry.setMode(convertModeFromString(currentMatcher.group(2)));
      +169                entry.setUserName(currentMatcher.group(4));
      +170                entry.setGroupName(currentMatcher.group(5));
      +171
      +172                return entry;
      +173            }
      +174        }
      +175
      +176    }
      +177
      +178    private Map<String, TarArchiveEntry> parse( final InputStream pInput ) throws IOException, ParseError {
      +179        final Map<String, TarArchiveEntry> mapping = new HashMap<>();
      +180
      +181        final BufferedReader reader = new BufferedReader(new InputStreamReader(pInput));
      +182
      +183        boolean first = true;
      +184        while (true) {
      +185
      +186            final String base;
      +187            if (first) {
      +188                base = "";
      +189                first = false;
      +190            } else {
      +191                base = readBase(reader);
      +192                if (base == null) {
      +193                    break;
      +194                }
      +195            }
      +196
      +197            readTotal(reader);
      +198            final TarArchiveEntry dir = readDir(reader, base);
      +199            mapping.put(dir.getName(), dir);
      +200
      +201            while (true) {
      +202                final TarArchiveEntry file = readFile(reader, base);
      +203
      +204                if (file == null) {
      +205                    break;
      +206                }
      +207
      +208                mapping.put(file.getName(), file);
      +209            }
      +210        }
      +211
      +212        return mapping;
      +213    }
      +214
      +215    public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +216        final TarArchiveEntry entry = mapping.get(pEntry.getName());
      +217        if (entry != null) {
      +218            return entry;
      +219        }
      +220        return pEntry;
      +221    }
      +222
      +223}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/Mapper.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/Mapper.html new file mode 100644 index 000000000..c7af15187 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/Mapper.html @@ -0,0 +1,106 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.mapping;
      +017
      +018import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +019
      +020
      +021/**
      +022 * Maps one entry to another. So you modify ownerships permissions etc in a Mapper.
      +023 */
      +024public interface Mapper {
      +025
      +026    TarArchiveEntry map( final TarArchiveEntry entry );
      +027
      +028}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/NullMapper.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/NullMapper.html new file mode 100644 index 000000000..975b035a3 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/NullMapper.html @@ -0,0 +1,109 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.mapping;
      +017
      +018import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +019
      +020public final class NullMapper implements Mapper {
      +021
      +022    public static final Mapper INSTANCE = new NullMapper();
      +023
      +024    private NullMapper() {
      +025    }
      +026
      +027    public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +028        return pEntry;
      +029    }
      +030
      +031}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/PermMapper.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/PermMapper.html new file mode 100644 index 000000000..48b443f27 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/mapping/PermMapper.html @@ -0,0 +1,169 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.mapping;
      +017
      +018import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +019import org.vafer.jdeb.utils.Utils;
      +020
      +021/**
      +022 * Applies a uniform set of permissions and ownership to all entries.
      +023 */
      +024public final class PermMapper implements Mapper {
      +025
      +026    private final int strip;
      +027    private final String prefix;
      +028    private int uid = -1;
      +029    private int gid = -1;
      +030    private String user;
      +031    private String group;
      +032    private int fileMode = -1;
      +033    private int dirMode = -1;
      +034
      +035    public static int toMode( String modeString ) {
      +036        int mode = -1;
      +037        if (modeString != null && modeString.length() > 0) {
      +038            mode = Integer.parseInt(modeString, 8);
      +039        }
      +040        return mode;
      +041    }
      +042
      +043    public PermMapper( int uid, int gid, String user, String group, int fileMode, int dirMode, int strip, String prefix ) {
      +044        this.strip = strip;
      +045        this.prefix = (prefix == null) ? "" : prefix;
      +046        this.uid = uid;
      +047        this.gid = gid;
      +048        this.user = user;
      +049        this.group = group;
      +050        this.fileMode = fileMode;
      +051        this.dirMode = dirMode;
      +052    }
      +053
      +054    public PermMapper( int uid, int gid, String user, String group, String fileMode, String dirMode, int strip, String prefix ) {
      +055        this(uid, gid, user, group, toMode(fileMode), toMode(dirMode), strip, prefix);
      +056    }
      +057
      +058    public TarArchiveEntry map( final TarArchiveEntry entry ) {
      +059        entry.setName(Utils.stripLeadingSlash(Utils.joinUnixPath(
      +060            prefix,
      +061            Utils.stripPath(strip, entry.getName())
      +062        )));
      +063
      +064        // Set ownership
      +065        if (uid > -1) {
      +066            entry.setUserId(uid);
      +067        }
      +068        if (gid > -1) {
      +069            entry.setGroupId(gid);
      +070        }
      +071        if (user != null) {
      +072            entry.setUserName(user);
      +073        }
      +074        if (group != null) {
      +075            entry.setGroupName(group);
      +076        }
      +077
      +078        // Set permissions
      +079        if (entry.isDirectory()) {
      +080            if (dirMode > -1) {
      +081                entry.setMode(dirMode);
      +082            }
      +083        } else {
      +084            if (fileMode > -1) {
      +085                entry.setMode(fileMode);
      +086            }
      +087        }
      +088
      +089        return entry;
      +090    }
      +091}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/Data.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/Data.html new file mode 100644 index 000000000..f1505036a --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/Data.html @@ -0,0 +1,294 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.maven;
      +018
      +019import java.io.File;
      +020import java.io.FileNotFoundException;
      +021import java.io.IOException;
      +022import java.util.ArrayList;
      +023import java.util.List;
      +024import java.util.StringTokenizer;
      +025
      +026import org.apache.maven.plugins.annotations.Parameter;
      +027import org.vafer.jdeb.DataConsumer;
      +028import org.vafer.jdeb.DataProducer;
      +029import org.vafer.jdeb.producers.DataProducerArchive;
      +030import org.vafer.jdeb.producers.DataProducerDirectory;
      +031import org.vafer.jdeb.producers.DataProducerFile;
      +032import org.vafer.jdeb.producers.DataProducerFiles;
      +033import org.vafer.jdeb.producers.DataProducerLink;
      +034import org.vafer.jdeb.producers.DataProducerPathTemplate;
      +035
      +036import static org.vafer.jdeb.maven.MissingSourceBehavior.*;
      +037
      +038/**
      +039 * Maven "data" element acting as a factory for DataProducers. So far Archive and
      +040 * Directory producers are supported. Both support the usual ant pattern set
      +041 * matching.
      +042 */
      +043public final class Data implements DataProducer {
      +044
      +045    @Parameter
      +046    private File src;
      +047
      +048    public void setSrc( File src ) {
      +049        this.src = src;
      +050    }
      +051
      +052    @Parameter
      +053    private String dst;
      +054
      +055    public void setDst( String dst ) {
      +056        this.dst = dst;
      +057    }
      +058
      +059    @Parameter
      +060    private String type;
      +061
      +062    public void setType( String type ) {
      +063        this.type = type;
      +064    }
      +065
      +066    @Parameter
      +067    private MissingSourceBehavior missingSrc = FAIL;
      +068
      +069    public void setMissingSrc( String missingSrc ) {
      +070        this.missingSrc = MissingSourceBehavior.valueOf(missingSrc.trim().toUpperCase());
      +071    }
      +072
      +073    @Parameter
      +074    private String linkName;
      +075
      +076    public void setLinkName(String linkName) {
      +077        this.linkName = linkName;
      +078    }
      +079
      +080    @Parameter
      +081    private String linkTarget;
      +082
      +083    public void setLinkTarget(String linkTarget) {
      +084        this.linkTarget = linkTarget;
      +085    }
      +086
      +087    @Parameter
      +088    private boolean symlink = true;
      +089
      +090    public void setSymlink(boolean symlink) {
      +091        this.symlink = symlink;
      +092    }
      +093
      +094    private boolean conffile = false;
      +095
      +096    /**
      +097     * @parameter expression="${conffile}"
      +098     */
      +099    public void setConffile(boolean conffile) {
      +100        this.conffile = conffile;
      +101    }
      +102
      +103    public boolean getConffile() {
      +104        return this.conffile;
      +105    }
      +106
      +107    @Parameter(alias = "includes")
      +108    private String[] includePatterns;
      +109
      +110    public void setIncludes( String includes ) {
      +111        includePatterns = splitPatterns(includes);
      +112    }
      +113
      +114    @Parameter(alias = "excludes")
      +115    private String[] excludePatterns;
      +116
      +117    public void setExcludes( String excludes ) {
      +118        excludePatterns = splitPatterns(excludes);
      +119    }
      +120
      +121    @Parameter
      +122    private Mapper mapper;
      +123
      +124    @Parameter
      +125    private String[] paths;
      +126
      +127    /* For testing only */
      +128    void setPaths( String[] paths ) {
      +129        this.paths = paths;
      +130    }
      +131
      +132    public String[] splitPatterns( String patterns ) {
      +133        String[] result = null;
      +134        if (patterns != null && patterns.length() > 0) {
      +135            List<String> tokens = new ArrayList<>();
      +136            StringTokenizer tok = new StringTokenizer(patterns, ", ", false);
      +137            while (tok.hasMoreTokens()) {
      +138                tokens.add(tok.nextToken());
      +139            }
      +140            result = tokens.toArray(new String[tokens.size()]);
      +141        }
      +142        return result;
      +143    }
      +144
      +145    public void produce( final DataConsumer pReceiver ) throws IOException {
      +146        org.vafer.jdeb.mapping.Mapper[] mappers = null;
      +147        if (mapper != null) {
      +148            mappers = new org.vafer.jdeb.mapping.Mapper[] { mapper.createMapper() };
      +149        }
      +150
      +151        // link type
      +152
      +153        if (typeIs("link")) {
      +154            if (linkName == null) {
      +155                throw new RuntimeException("linkName is not set");
      +156            }
      +157            if (linkTarget == null) {
      +158                throw new RuntimeException("linkTarget is not set");
      +159            }
      +160
      +161            new DataProducerLink(linkName, linkTarget, symlink, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +162            return;
      +163        }
      +164
      +165        // template type
      +166
      +167        if (typeIs("template")) {
      +168            checkPaths();
      +169            new DataProducerPathTemplate(paths, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +170            return;
      +171        }
      +172
      +173        if (typeIs("files")) {
      +174            checkPaths();
      +175            new DataProducerFiles(paths, dst, mappers).produce(pReceiver);
      +176            return;
      +177        }
      +178
      +179        // Types that require src to exist
      +180
      +181        if (src == null || !src.exists()) {
      +182            if (missingSrc == IGNORE) {
      +183                return;
      +184            } else {
      +185                throw new FileNotFoundException("Data source not found : " + src);
      +186            }
      +187        }
      +188
      +189        if (typeIs("file")) {
      +190            new DataProducerFile(src, dst, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +191            return;
      +192        }
      +193
      +194        if (typeIs("archive")) {
      +195            new DataProducerArchive(src, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +196            return;
      +197        }
      +198
      +199        if (typeIs("directory")) {
      +200            new DataProducerDirectory(src, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +201            return;
      +202        }
      +203
      +204        throw new IOException("Unknown type '" + type + "' (file|directory|archive|template|link) for " + src);
      +205    }
      +206
      +207    private boolean typeIs( final String type ) {
      +208        return type.equalsIgnoreCase(this.type);
      +209    }
      +210
      +211    private void checkPaths() {
      +212        if (paths == null || paths.length == 0) {
      +213            throw new RuntimeException("paths parameter is not set");
      +214        }
      +215    }
      +216}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/DebMojo.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/DebMojo.html new file mode 100644 index 000000000..78400aa7e --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/DebMojo.html @@ -0,0 +1,836 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.maven;
      +018
      +019import java.io.File;
      +020import java.io.FileInputStream;
      +021import java.io.FileNotFoundException;
      +022import java.util.ArrayList;
      +023import java.util.Collection;
      +024import java.util.Collections;
      +025import java.util.HashMap;
      +026import java.util.HashSet;
      +027import java.util.List;
      +028import java.util.Map;
      +029import java.util.Set;
      +030
      +031import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +032import org.apache.commons.compress.archivers.tar.TarConstants;
      +033import org.apache.maven.artifact.Artifact;
      +034import org.apache.maven.execution.MavenSession;
      +035import org.apache.maven.plugin.AbstractMojo;
      +036import org.apache.maven.plugin.MojoExecutionException;
      +037import org.apache.maven.plugins.annotations.Component;
      +038import org.apache.maven.plugins.annotations.LifecyclePhase;
      +039import org.apache.maven.plugins.annotations.Mojo;
      +040import org.apache.maven.plugins.annotations.Parameter;
      +041import org.apache.maven.project.MavenProject;
      +042import org.apache.maven.project.MavenProjectHelper;
      +043import org.apache.maven.settings.Profile;
      +044import org.apache.maven.settings.Settings;
      +045import org.apache.tools.tar.TarEntry;
      +046import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
      +047import org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException;
      +048import org.vafer.jdeb.Console;
      +049import org.vafer.jdeb.DataConsumer;
      +050import org.vafer.jdeb.DataProducer;
      +051import org.vafer.jdeb.DebMaker;
      +052import org.vafer.jdeb.PackagingException;
      +053import org.vafer.jdeb.utils.MapVariableResolver;
      +054import org.vafer.jdeb.utils.OutputTimestampResolver;
      +055import org.vafer.jdeb.utils.SymlinkUtils;
      +056import org.vafer.jdeb.utils.Utils;
      +057import org.vafer.jdeb.utils.VariableResolver;
      +058
      +059import static org.vafer.jdeb.utils.Utils.isBlank;
      +060import static org.vafer.jdeb.utils.Utils.lookupIfEmpty;
      +061
      +062/**
      +063 * Creates Debian package
      +064 */
      +065@Mojo(name = "jdeb", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true)
      +066public class DebMojo extends AbstractMojo {
      +067
      +068    @Component
      +069    private MavenProjectHelper projectHelper;
      +070
      +071    @Component(hint = "jdeb-sec")
      +072    private SecDispatcher secDispatcher;
      +073
      +074    /**
      +075     * Defines the name of deb package.
      +076     */
      +077    @Parameter
      +078    private String name;
      +079
      +080    /**
      +081     * Defines the pattern of the name of final artifacts. Possible
      +082     * substitutions are [[baseDir]] [[buildDir]] [[artifactId]] [[version]]
      +083     * [[extension]] and [[groupId]].
      +084     */
      +085    @Parameter(defaultValue = "[[buildDir]]/[[artifactId]]_[[version]]_all.[[extension]]")
      +086    private String deb;
      +087
      +088    /**
      +089     * Explicitly defines the path to the control directory. At least the
      +090     * control file is mandatory.
      +091     */
      +092    @Parameter(defaultValue = "[[baseDir]]/src/deb/control")
      +093    private String controlDir;
      +094
      +095    /**
      +096     * Explicitly define the file to read the changes from.
      +097     */
      +098    @Parameter(defaultValue = "[[baseDir]]/CHANGES.txt")
      +099    private String changesIn;
      +100
      +101    /**
      +102     * Explicitly define the file where to write the changes to.
      +103     */
      +104    @Parameter(defaultValue = "[[buildDir]]/[[artifactId]]_[[version]]_all.changes")
      +105    private String changesOut;
      +106
      +107    /**
      +108     * Explicitly define the file where to write the changes of the changes input to.
      +109     */
      +110    @Parameter(defaultValue = "[[baseDir]]/CHANGES.txt")
      +111    private String changesSave;
      +112
      +113    /**
      +114     * The compression method used for the data file (none, gzip, bzip2 or xz)
      +115     */
      +116    @Parameter(defaultValue = "gzip")
      +117    private String compression;
      +118
      +119    /**
      +120     * Boolean option whether to attach the artifact to the project
      +121     */
      +122    @Parameter(defaultValue = "true")
      +123    private String attach;
      +124
      +125    /**
      +126     * The location where all package files will be installed. By default, all
      +127     * packages are installed in /opt (see the FHS here:
      +128     * http://www.pathname.com/
      +129     * fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES)
      +130     */
      +131    @Parameter(defaultValue = "/opt/[[artifactId]]")
      +132    private String installDir;
      +133
      +134    /**
      +135     * The type of attached artifact
      +136     */
      +137    @Parameter(defaultValue = "deb")
      +138    private String type;
      +139
      +140    /**
      +141     * The project base directory
      +142     */
      +143    @Parameter(defaultValue = "${basedir}", required = true, readonly = true)
      +144    private File baseDir;
      +145
      +146    /**
      +147     * The Maven Session Object
      +148     */
      +149    @Parameter( defaultValue = "${session}", readonly = true )
      +150    private MavenSession session;
      +151
      +152    /**
      +153     * The Maven Project Object
      +154     */
      +155    @Parameter( defaultValue = "${project}", readonly = true )
      +156    private MavenProject project;
      +157
      +158    /**
      +159     * The build directory
      +160     */
      +161    @Parameter(property = "project.build.directory", required = true, readonly = true)
      +162    private File buildDirectory;
      +163
      +164    /**
      +165     * The classifier of attached artifact
      +166     */
      +167    @Parameter
      +168    private String classifier;
      +169
      +170    /**
      +171     * The digest algorithm to use.
      +172     *
      +173     * @see org.bouncycastle.bcpg.HashAlgorithmTags
      +174     */
      +175    @Parameter(defaultValue = "SHA256")
      +176    private String digest;
      +177
      +178    /**
      +179     * "data" entries used to determine which files should be added to this deb.
      +180     * The "data" entries may specify a tarball (tar.gz, tar.bz2, tgz), a
      +181     * directory, or a normal file. An entry would look something like this in
      +182     * your pom.xml:
      +183     *
      +184     *
      +185     * <pre>
      +186     *   <build>
      +187     *     <plugins>
      +188     *       <plugin>
      +189     *       <artifactId>jdeb</artifactId>
      +190     *       <groupId>org.vafer</groupId>
      +191     *       ...
      +192     *       <configuration>
      +193     *         ...
      +194     *         <dataSet>
      +195     *           <data>
      +196     *             <src>${project.basedir}/target/my_archive.tar.gz</src>
      +197     *             <include>...</include>
      +198     *             <exclude>...</exclude>
      +199     *             <mapper>
      +200     *               <type>perm</type>
      +201     *               <strip>1</strip>
      +202     *               <prefix>/somewhere/else</prefix>
      +203     *               <user>santbj</user>
      +204     *               <group>santbj</group>
      +205     *               <mode>600</mode>
      +206     *             </mapper>
      +207     *           </data>
      +208     *           <data>
      +209     *             <src>${project.build.directory}/data</src>
      +210     *             <include></include>
      +211     *             <exclude>**&#47;.svn</exclude>
      +212     *             <mapper>
      +213     *               <type>ls</type>
      +214     *               <src>mapping.txt</src>
      +215     *             </mapper>
      +216     *           </data>
      +217     *           <data>
      +218     *             <type>link</type>
      +219     *             <linkName>/a/path/on/the/target/fs</linkName>
      +220     *             <linkTarget>/a/sym/link/to/the/scr/file</linkTarget>
      +221     *             <symlink>true</symlink>
      +222     *           </data>
      +223     *           <data>
      +224     *             <src>${project.basedir}/README.txt</src>
      +225     *           </data>
      +226     *         </dataSet>
      +227     *       </configuration>
      +228     *     </plugins>
      +229     *   </build>
      +230     * </pre>
      +231     *
      +232     */
      +233    @Parameter
      +234    private Data[] dataSet;
      +235
      +236//    /**
      +237//     * @deprecated
      +238//     */
      +239//    @Parameter(defaultValue = "false")
      +240//    private boolean timestamped;
      +241
      +242    /**
      +243     * When enabled SNAPSHOT inside the version gets replaced with current timestamp or
      +244     * if set a value of a environment variable.
      +245     */
      +246    @Parameter(defaultValue = "false")
      +247    private boolean snapshotExpand;
      +248
      +249    /**
      +250     * Which environment variable to check for the SNAPSHOT value.
      +251     * If the variable is not set/empty it will default to use the timestamp.
      +252     */
      +253    @Parameter(defaultValue = "SNAPSHOT")
      +254    private String snapshotEnv;
      +255
      +256    /**
      +257     * Template for replacing the SNAPSHOT value. A timestamp format can be provided in brackets.
      +258     * prefix[yyMMdd]suffix -> prefix151230suffix
      +259     */
      +260    @Parameter
      +261    private String snapshotTemplate;
      +262
      +263    /**
      +264     * If verbose is true more build messages are logged.
      +265     */
      +266    @Parameter(defaultValue = "false")
      +267    private boolean verbose;
      +268
      +269    /**
      +270     * Indicates if the execution should be disabled. If <code>true</code>, nothing will occur during execution.
      +271     *
      +272     * @since 1.1
      +273     */
      +274    @Parameter(property = "jdeb.skip", defaultValue = "false")
      +275    private boolean skip;
      +276
      +277    @Parameter(property = "jdeb.skipPOMs", defaultValue = "true")
      +278    private boolean skipPOMs;
      +279
      +280    @Parameter(property = "jdeb.skipSubmodules", defaultValue = "false")
      +281    private boolean skipSubmodules;
      +282
      +283    /**
      +284     * @deprecated
      +285     */
      +286    @Parameter(defaultValue = "true")
      +287    private boolean submodules;
      +288
      +289
      +290    /**
      +291     * If signPackage is true then a origin signature will be placed
      +292     * in the generated package.
      +293     */
      +294    @Parameter(defaultValue = "false")
      +295    private boolean signPackage;
      +296
      +297    /**
      +298     * If signChanges is true then changes file will be signed.
      +299     */
      +300    @Parameter(defaultValue = "false")
      +301    private boolean signChanges;
      +302
      +303    /**
      +304     * Defines which utility is used to verify the signed package
      +305     */
      +306    @Parameter(defaultValue = "debsig-verify")
      +307    private String signMethod;
      +308
      +309    /**
      +310     * Defines the role to sign with
      +311     */
      +312    @Parameter(defaultValue = "origin")
      +313    private String signRole;
      +314
      +315    /**
      +316     * The keyring to use for signing operations.
      +317     */
      +318    @Parameter
      +319    private String keyring;
      +320
      +321    /**
      +322     * The key to use for signing operations.
      +323     */
      +324    @Parameter
      +325    private String key;
      +326
      +327    /**
      +328     * The passphrase to use for signing operations.
      +329     */
      +330    @Parameter
      +331    private String passphrase;
      +332
      +333    /**
      +334     * The prefix to use when reading signing variables
      +335     * from settings.
      +336     */
      +337    @Parameter(defaultValue = "jdeb.")
      +338    private String signCfgPrefix;
      +339
      +340    /**
      +341     * The settings.
      +342     */
      +343    @Parameter(defaultValue = "${settings}")
      +344    private Settings settings;
      +345
      +346    @Parameter(defaultValue = "")
      +347    private String propertyPrefix;
      +348
      +349    /**
      +350     * Sets the long file mode for the resulting tar file.  Valid values are "gnu", "posix", "error" or "truncate"
      +351     * @see org.apache.commons.compress.archivers.tar.TarArchiveOutputStream#setLongFileMode(int)
      +352     */
      +353    @Parameter(defaultValue = "gnu")
      +354    private String tarLongFileMode;
      +355
      +356    /**
      +357     * Sets the big number mode for the resulting tar file.  Valid values are "gnu", "posix" or "error"
      +358     * @see org.apache.commons.compress.archivers.tar.TarArchiveOutputStream#setBigNumberMode(int)
      +359     */
      +360    @Parameter(defaultValue = "gnu")
      +361    private String tarBigNumberMode;
      +362
      +363    /**
      +364     * Timestamp for reproducible output archive entries, either formatted as ISO 8601
      +365     * <code>yyyy-MM-dd'T'HH:mm:ssXXX</code> or as an int representing seconds since the epoch (like
      +366     * <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).
      +367     *
      +368     * @since 1.9
      +369     */
      +370    @Parameter(defaultValue = "${project.build.outputTimestamp}")
      +371    private String outputTimestamp;
      +372
      +373    /* end of parameters */
      +374
      +375    private static final String KEY = "key";
      +376    private static final String KEYRING = "keyring";
      +377    private static final String PASSPHRASE = "passphrase";
      +378
      +379    private String openReplaceToken = "[[";
      +380    private String closeReplaceToken = "]]";
      +381    private Console console;
      +382    private Collection<DataProducer> dataProducers = new ArrayList<>();
      +383    private Collection<DataProducer> conffileProducers = new ArrayList<>();
      +384
      +385    public void setOpenReplaceToken( String openReplaceToken ) {
      +386        this.openReplaceToken = openReplaceToken;
      +387    }
      +388
      +389    public void setCloseReplaceToken( String closeReplaceToken ) {
      +390        this.closeReplaceToken = closeReplaceToken;
      +391    }
      +392
      +393    protected void setData( Data[] dataSet ) {
      +394        this.dataSet = dataSet;
      +395        dataProducers.clear();
      +396        conffileProducers.clear();
      +397        if (dataSet != null) {
      +398            Collections.addAll(dataProducers, dataSet);
      +399
      +400            for (Data item : dataSet) {
      +401                if (item.getConffile()) {
      +402                    conffileProducers.add(item);
      +403                }
      +404            }
      +405        }
      +406    }
      +407
      +408    @SuppressWarnings("unchecked,rawtypes")
      +409    protected VariableResolver initializeVariableResolver( Map<String, String> variables ) {
      +410        variables.putAll((Map) getProject().getProperties());
      +411        variables.putAll((Map) System.getProperties());
      +412        variables.put("name", name != null ? name : getProject().getName());
      +413        variables.put("artifactId", getProject().getArtifactId());
      +414        variables.put("groupId", getProject().getGroupId());
      +415        variables.put("version", getProjectVersion());
      +416        variables.put("description", getProject().getDescription());
      +417        variables.put("extension", "deb");
      +418        variables.put("baseDir", getProject().getBasedir().getAbsolutePath());
      +419        variables.put("buildDir", buildDirectory.getAbsolutePath());
      +420        variables.put("project.version", getProject().getVersion());
      +421
      +422        if (getProject().getInceptionYear() != null) {
      +423            variables.put("project.inceptionYear", getProject().getInceptionYear());
      +424        }
      +425        if (getProject().getOrganization() != null) {
      +426            if (getProject().getOrganization().getName() != null) {
      +427                variables.put("project.organization.name", getProject().getOrganization().getName());
      +428            }
      +429            if (getProject().getOrganization().getUrl() != null) {
      +430                variables.put("project.organization.url", getProject().getOrganization().getUrl());
      +431            }
      +432        }
      +433
      +434        variables.put("url", getProject().getUrl());
      +435
      +436        return new MapVariableResolver(variables);
      +437    }
      +438
      +439    /**
      +440     * Doc some cleanup and conversion on the Maven project version.
      +441     * <ul>
      +442     * <li>any "-" is replaced by "+"</li>
      +443     * <li>"SNAPSHOT" is replaced with the current time and date, prepended by "~"</li>
      +444     * </ul>
      +445     *
      +446     * @return the Maven project version
      +447     */
      +448    private String getProjectVersion() {
      +449        return Utils.convertToDebianVersion(getProject().getVersion(), this.snapshotExpand, this.snapshotEnv, this.snapshotTemplate, session.getStartTime());
      +450    }
      +451
      +452    /**
      +453     * @return whether the artifact is a POM or not
      +454     */
      +455    private boolean isPOM() {
      +456        String type = getProject().getArtifact().getType();
      +457        return "pom".equalsIgnoreCase(type);
      +458    }
      +459
      +460    /**
      +461     * @return whether the artifact is of configured type (i.e. the package to generate is the main artifact)
      +462     */
      +463    private boolean isType() {
      +464        return type.equals(getProject().getArtifact().getType());
      +465    }
      +466
      +467    /**
      +468     * @return whether or not Maven is currently operating in the execution root
      +469     */
      +470    private boolean isSubmodule() {
      +471        // FIXME there must be a better way
      +472        return !session.getExecutionRootDirectory().equalsIgnoreCase(baseDir.toString());
      +473    }
      +474
      +475    /**
      +476     * @return whether or not the main artifact was created
      +477     */
      +478    private boolean hasMainArtifact() {
      +479        final MavenProject project = getProject();
      +480        final Artifact artifact = project.getArtifact();
      +481        return artifact.getFile() != null && artifact.getFile().isFile();
      +482    }
      +483
      +484    /**
      +485     * Main entry point
      +486     *
      +487     * @throws MojoExecutionException on error
      +488     */
      +489    public void execute() throws MojoExecutionException {
      +490
      +491        final MavenProject project = getProject();
      +492
      +493        if (skip) {
      +494            getLog().info("skipping as configured (skip)");
      +495            return;
      +496        }
      +497
      +498        if (skipPOMs && isPOM()) {
      +499            getLog().info("skipping because artifact is a pom (skipPOMs)");
      +500            return;
      +501        }
      +502
      +503        if (skipSubmodules && isSubmodule()) {
      +504            getLog().info("skipping submodule (skipSubmodules)");
      +505            return;
      +506        }
      +507
      +508
      +509        setData(dataSet);
      +510
      +511        console = new MojoConsole(getLog(), verbose);
      +512
      +513        initializeSignProperties();
      +514
      +515        final VariableResolver resolver = initializeVariableResolver(new HashMap<String, String>());
      +516
      +517        final File debFile = new File(Utils.replaceVariables(resolver, deb, openReplaceToken, closeReplaceToken));
      +518        final File controlDirFile = new File(Utils.replaceVariables(resolver, controlDir, openReplaceToken, closeReplaceToken));
      +519        final File installDirFile = new File(Utils.replaceVariables(resolver, installDir, openReplaceToken, closeReplaceToken));
      +520        final File changesInFile = new File(Utils.replaceVariables(resolver, changesIn, openReplaceToken, closeReplaceToken));
      +521        final File changesOutFile = new File(Utils.replaceVariables(resolver, changesOut, openReplaceToken, closeReplaceToken));
      +522        final File changesSaveFile = new File(Utils.replaceVariables(resolver, changesSave, openReplaceToken, closeReplaceToken));
      +523        final File keyringFile = keyring == null ? null : new File(Utils.replaceVariables(resolver, keyring, openReplaceToken, closeReplaceToken));
      +524
      +525        // if there are no producers defined we try to use the artifacts
      +526        if (dataProducers.isEmpty()) {
      +527
      +528            if (hasMainArtifact()) {
      +529                Set<Artifact> artifacts = new HashSet<>();
      +530
      +531                artifacts.add(project.getArtifact());
      +532
      +533                @SuppressWarnings("unchecked")
      +534                final Set<Artifact> projectArtifacts = project.getArtifacts();
      +535
      +536                artifacts.addAll(projectArtifacts);
      +537
      +538                @SuppressWarnings("unchecked")
      +539                final List<Artifact> attachedArtifacts = project.getAttachedArtifacts();
      +540
      +541                artifacts.addAll(attachedArtifacts);
      +542
      +543                for (Artifact artifact : artifacts) {
      +544                    final File file = artifact.getFile();
      +545                    if (file != null) {
      +546                        dataProducers.add(new DataProducer() {
      +547                            public void produce( final DataConsumer receiver ) {
      +548                                try {
      +549                                    final File path = new File(installDirFile.getPath(), file.getName());
      +550                                    final String entryName = path.getPath();
      +551
      +552                                    final boolean symbolicLink = SymlinkUtils.isSymbolicLink(path);
      +553                                    final TarArchiveEntry e;
      +554                                    if (symbolicLink) {
      +555                                        e = new TarArchiveEntry(entryName, TarConstants.LF_SYMLINK);
      +556                                        e.setLinkName(SymlinkUtils.readSymbolicLink(path));
      +557                                    } else {
      +558                                        e = new TarArchiveEntry(entryName, true);
      +559                                    }
      +560
      +561                                    e.setUserId(0);
      +562                                    e.setGroupId(0);
      +563                                    e.setUserName("root");
      +564                                    e.setGroupName("root");
      +565                                    e.setMode(TarEntry.DEFAULT_FILE_MODE);
      +566                                    e.setSize(file.length());
      +567
      +568                                    receiver.onEachFile(new FileInputStream(file), e);
      +569                                } catch (Exception e) {
      +570                                    getLog().error(e);
      +571                                }
      +572                            }
      +573                        });
      +574                    } else {
      +575                        getLog().error("No file for artifact " + artifact);
      +576                    }
      +577                }
      +578            }
      +579        }
      +580
      +581        try {
      +582            DebMaker debMaker = new DebMaker(console, dataProducers, conffileProducers);
      +583            debMaker.setDeb(debFile);
      +584            debMaker.setControl(controlDirFile);
      +585            debMaker.setPackage(getProject().getArtifactId());
      +586            debMaker.setDescription(getProject().getDescription());
      +587            debMaker.setHomepage(getProject().getUrl());
      +588            debMaker.setChangesIn(changesInFile);
      +589            debMaker.setChangesOut(changesOutFile);
      +590            debMaker.setChangesSave(changesSaveFile);
      +591            debMaker.setCompression(compression);
      +592            debMaker.setKeyring(keyringFile);
      +593            debMaker.setKey(key);
      +594            debMaker.setPassphrase(passphrase);
      +595            debMaker.setSignPackage(signPackage);
      +596            debMaker.setSignChanges(signChanges);
      +597            debMaker.setSignMethod(signMethod);
      +598            debMaker.setSignRole(signRole);
      +599            debMaker.setResolver(resolver);
      +600            debMaker.setOpenReplaceToken(openReplaceToken);
      +601            debMaker.setCloseReplaceToken(closeReplaceToken);
      +602            debMaker.setDigest(digest);
      +603            debMaker.setTarBigNumberMode(tarBigNumberMode);
      +604            debMaker.setTarLongFileMode(tarLongFileMode);
      +605            Long outputTimestampMs = new OutputTimestampResolver(console).resolveOutputTimestamp(outputTimestamp);
      +606            debMaker.setOutputTimestampMs(outputTimestampMs);
      +607            debMaker.validate();
      +608            debMaker.makeDeb();
      +609
      +610            // Always attach unless explicitly set to false
      +611            if ("true".equalsIgnoreCase(attach)) {
      +612                console.info("Attaching created debian package " + debFile);
      +613                if (!isType()) {
      +614                    projectHelper.attachArtifact(project, type, classifier, debFile);
      +615                } else {
      +616                    project.getArtifact().setFile(debFile);
      +617                }
      +618            }
      +619
      +620        } catch (PackagingException e) {
      +621            getLog().error("Failed to create debian package " + debFile, e);
      +622            throw new MojoExecutionException("Failed to create debian package " + debFile, e);
      +623        }
      +624
      +625        if (!isBlank(propertyPrefix)) {
      +626          project.getProperties().put(propertyPrefix+"version", getProjectVersion() );
      +627          project.getProperties().put(propertyPrefix+"deb", debFile.getAbsolutePath());
      +628          project.getProperties().put(propertyPrefix+"deb.name", debFile.getName());
      +629          project.getProperties().put(propertyPrefix+"changes", changesOutFile.getAbsolutePath());
      +630          project.getProperties().put(propertyPrefix+"changes.name", changesOutFile.getName());
      +631          project.getProperties().put(propertyPrefix+"changes.txt", changesSaveFile.getAbsolutePath());
      +632          project.getProperties().put(propertyPrefix+"changes.txt.name", changesSaveFile.getName());
      +633        }
      +634
      +635    }
      +636
      +637    /**
      +638     * Initializes unspecified sign properties using available defaults
      +639     * and global settings.
      +640     */
      +641    private void initializeSignProperties() {
      +642        if (!signPackage && !signChanges) {
      +643            return;
      +644        }
      +645
      +646        if (key != null && keyring != null && passphrase != null) {
      +647            return;
      +648        }
      +649
      +650        Map<String, String> properties =
      +651                readPropertiesFromActiveProfiles(signCfgPrefix, KEY, KEYRING, PASSPHRASE);
      +652
      +653        key = lookupIfEmpty(key, properties, KEY);
      +654        keyring = lookupIfEmpty(keyring, properties, KEYRING);
      +655        passphrase = decrypt(lookupIfEmpty(passphrase, properties, PASSPHRASE));
      +656
      +657        if (keyring == null) {
      +658            try {
      +659                keyring = Utils.guessKeyRingFile().getAbsolutePath();
      +660                console.info("Located keyring at " + keyring);
      +661            } catch (FileNotFoundException e) {
      +662                console.warn(e.getMessage());
      +663            }
      +664        }
      +665    }
      +666
      +667    /**
      +668     * Decrypts given passphrase if needed using maven security dispatcher.
      +669     * See http://maven.apache.org/guides/mini/guide-encryption.html for details.
      +670     *
      +671     * @param maybeEncryptedPassphrase possibly encrypted passphrase
      +672     * @return decrypted passphrase
      +673     */
      +674    private String decrypt( final String maybeEncryptedPassphrase ) {
      +675        if (maybeEncryptedPassphrase == null) {
      +676            return null;
      +677        }
      +678
      +679        try {
      +680            final String decrypted = secDispatcher.decrypt(maybeEncryptedPassphrase);
      +681            if (maybeEncryptedPassphrase.equals(decrypted)) {
      +682                console.info("Passphrase was not encrypted");
      +683            } else {
      +684                console.info("Passphrase was successfully decrypted");
      +685            }
      +686            return decrypted;
      +687        } catch (SecDispatcherException e) {
      +688            console.warn("Unable to decrypt passphrase: " + e.getMessage());
      +689        }
      +690
      +691        return maybeEncryptedPassphrase;
      +692    }
      +693
      +694    /**
      +695     *
      +696     * @return the maven project used by this mojo
      +697     */
      +698    private MavenProject getProject() {
      +699        if (project.getExecutionProject() != null) {
      +700            return project.getExecutionProject();
      +701        }
      +702
      +703        return project;
      +704    }
      +705
      +706
      +707
      +708    /**
      +709     * Read properties from the active profiles.
      +710     *
      +711     * Goes through all active profiles (in the order the
      +712     * profiles are defined in settings.xml) and extracts
      +713     * the desired properties (if present). The prefix is
      +714     * used when looking up properties in the profile but
      +715     * not in the returned map.
      +716     *
      +717     * @param prefix The prefix to use or null if no prefix should be used
      +718     * @param properties The properties to read
      +719     *
      +720     * @return A map containing the values for the properties that were found
      +721     */
      +722    public Map<String, String> readPropertiesFromActiveProfiles( final String prefix,
      +723                                                                 final String... properties ) {
      +724        if (settings == null) {
      +725            console.debug("No maven setting injected");
      +726            return Collections.emptyMap();
      +727        }
      +728
      +729        final List<String> activeProfilesList = settings.getActiveProfiles();
      +730        if (activeProfilesList.isEmpty()) {
      +731            console.debug("No active profiles found");
      +732            return Collections.emptyMap();
      +733        }
      +734
      +735        final Map<String, String> map = new HashMap<>();
      +736        final Set<String> activeProfiles = new HashSet<>(activeProfilesList);
      +737
      +738        // Iterate over all active profiles in order
      +739        for (final Profile profile : settings.getProfiles()) {
      +740            // Check if the profile is active
      +741            final String profileId = profile.getId();
      +742            if (activeProfiles.contains(profileId)) {
      +743                console.debug("Trying active profile " + profileId);
      +744                for (final String property : properties) {
      +745                    final String propKey = prefix != null ? prefix + property : property;
      +746                    final String value = profile.getProperties().getProperty(propKey);
      +747                    if (value != null) {
      +748                        console.debug("Found property " + property + " in profile " + profileId);
      +749                        map.put(property, value);
      +750                    }
      +751                }
      +752            }
      +753        }
      +754
      +755        return map;
      +756    }
      +757
      +758}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/Mapper.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/Mapper.html new file mode 100644 index 000000000..ce0a321ca --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/Mapper.html @@ -0,0 +1,161 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.maven;
      +018
      +019import java.io.File;
      +020import java.io.FileInputStream;
      +021import java.io.IOException;
      +022
      +023import org.apache.maven.plugins.annotations.Parameter;
      +024import org.vafer.jdeb.mapping.LsMapper;
      +025import org.vafer.jdeb.mapping.NullMapper;
      +026import org.vafer.jdeb.mapping.PermMapper;
      +027
      +028/**
      +029 * Maven "mapper" element acting as factory for the entry mapper.
      +030 * Supported types: ls, perm
      +031 */
      +032public final class Mapper {
      +033
      +034    @Parameter(required = true)
      +035    private String type;
      +036
      +037    @Parameter
      +038    private int uid = -1;
      +039
      +040    @Parameter
      +041    private int gid = -1;
      +042
      +043    @Parameter
      +044    private String user;
      +045
      +046    @Parameter
      +047    private String group;
      +048
      +049    @Parameter
      +050    private String filemode;
      +051
      +052    @Parameter
      +053    private String dirmode;
      +054
      +055    @Parameter
      +056    private String prefix;
      +057
      +058    @Parameter
      +059    private int strip;
      +060
      +061    @Parameter
      +062    private File src;
      +063
      +064
      +065    public org.vafer.jdeb.mapping.Mapper createMapper() throws IOException {
      +066
      +067        if ("ls".equalsIgnoreCase(type)) {
      +068            try {
      +069                return new LsMapper(new FileInputStream(src));
      +070            } catch (Exception e) {
      +071                e.printStackTrace();
      +072            }
      +073        }
      +074
      +075        if ("perm".equalsIgnoreCase(type)) {
      +076            return new PermMapper(uid, gid, user, group, filemode, dirmode, strip, prefix);
      +077        }
      +078
      +079        /* NullMapper required for DataProducerPathTemplate */
      +080        return NullMapper.INSTANCE;
      +081    }
      +082
      +083}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/MissingSourceBehavior.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/MissingSourceBehavior.html new file mode 100644 index 000000000..19a6ed642 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/maven/MissingSourceBehavior.html @@ -0,0 +1,99 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.maven;
      +018
      +019public enum MissingSourceBehavior {
      +020    IGNORE, FAIL
      +021}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/AbstractDataProducer.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/AbstractDataProducer.html new file mode 100644 index 000000000..ecd0c42c9 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/AbstractDataProducer.html @@ -0,0 +1,179 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +019import org.apache.tools.ant.types.selectors.SelectorUtils;
      +020import org.vafer.jdeb.DataConsumer;
      +021import org.vafer.jdeb.DataProducer;
      +022import org.vafer.jdeb.mapping.Mapper;
      +023
      +024import java.io.File;
      +025import java.io.FileInputStream;
      +026import java.io.IOException;
      +027
      +028/**
      +029 * Base Producer class providing including/excluding.
      +030 */
      +031public abstract class AbstractDataProducer implements DataProducer {
      +032
      +033    private final String[] includes;
      +034    private final String[] excludes;
      +035    private final Mapper[] mappers;
      +036
      +037
      +038    public AbstractDataProducer( final String[] pIncludes, final String[] pExcludes, final Mapper[] pMapper ) {
      +039        excludes = (pExcludes != null) ? pExcludes : new String[0];
      +040        includes = (pIncludes != null) ? pIncludes : new String[] { "**" };
      +041        mappers = (pMapper != null) ? pMapper : new Mapper[0];
      +042    }
      +043
      +044    public boolean isIncluded( final String pName ) {
      +045        if (!isIncluded(pName, includes)) {
      +046            return false;
      +047        }
      +048        if (isExcluded(pName, excludes)) {
      +049            return false;
      +050        }
      +051        return true;
      +052    }
      +053
      +054    private boolean isIncluded( String name, String[] includes ) {
      +055        for (String include : includes) {
      +056            if (SelectorUtils.matchPath(include, name)) {
      +057                return true;
      +058            }
      +059        }
      +060        return false;
      +061    }
      +062
      +063
      +064    private boolean isExcluded( String name, String[] excludes ) {
      +065        for (String exclude : excludes) {
      +066            if (SelectorUtils.matchPath(exclude, name)) {
      +067                return true;
      +068            }
      +069        }
      +070        return false;
      +071    }
      +072
      +073    public void produceDir( final DataConsumer consumer,
      +074                            final String dirName ) throws IOException {
      +075        final String name = dirName.endsWith("/") ? dirName : dirName + "/";
      +076        TarArchiveEntry entry = Producers.defaultDirEntryWithName(name);
      +077        entry = map(entry);
      +078        entry.setSize(0);
      +079        Producers.produceDirEntry(consumer, entry);
      +080    }
      +081
      +082    public void produceFile( final DataConsumer consumer,
      +083                             final File file,
      +084                             final String fileName ) throws IOException {
      +085        TarArchiveEntry fileEntry = Producers.defaultFileEntryWithName(fileName);
      +086        fileEntry.setSize(file.length());
      +087        fileEntry = map(fileEntry);
      +088        Producers.produceInputStreamWithEntry(consumer, new FileInputStream(file), fileEntry);
      +089    }
      +090
      +091    public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +092
      +093        TarArchiveEntry entry = pEntry;
      +094
      +095        for (Mapper mapper : mappers) {
      +096            entry = mapper.map(entry);
      +097        }
      +098
      +099        return entry;
      +100    }
      +101}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerArchive.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerArchive.html new file mode 100644 index 000000000..1940a7df9 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerArchive.html @@ -0,0 +1,225 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import java.io.BufferedInputStream;
      +019import java.io.File;
      +020import java.io.FileInputStream;
      +021import java.io.IOException;
      +022import java.io.InputStream;
      +023
      +024import org.apache.commons.compress.archivers.ArchiveEntry;
      +025import org.apache.commons.compress.archivers.ArchiveException;
      +026import org.apache.commons.compress.archivers.ArchiveInputStream;
      +027import org.apache.commons.compress.archivers.ArchiveStreamFactory;
      +028import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +029import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
      +030import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
      +031import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
      +032import org.apache.commons.compress.compressors.CompressorException;
      +033import org.apache.commons.compress.compressors.CompressorInputStream;
      +034import org.apache.commons.compress.compressors.CompressorStreamFactory;
      +035import org.vafer.jdeb.DataConsumer;
      +036import org.vafer.jdeb.DataProducer;
      +037import org.vafer.jdeb.mapping.Mapper;
      +038
      +039/**
      +040 * Providing data from an archive keeping permissions and ownerships.
      +041 */
      +042public final class DataProducerArchive extends AbstractDataProducer implements DataProducer {
      +043
      +044    private final File archive;
      +045
      +046    public DataProducerArchive( final File pArchive, final String[] pIncludes, final String[] pExcludes, final Mapper[] pMappers ) {
      +047        super(pIncludes, pExcludes, pMappers);
      +048        archive = pArchive;
      +049    }
      +050
      +051    public void produce( final DataConsumer pReceiver ) throws IOException {
      +052
      +053        InputStream is = new BufferedInputStream(new FileInputStream(archive));
      +054
      +055        CompressorInputStream compressorInputStream = null;
      +056
      +057        try {
      +058            compressorInputStream = new CompressorStreamFactory().createCompressorInputStream(is);
      +059        } catch (CompressorException e) {
      +060            // expected if the input file is a zip archive
      +061        }
      +062
      +063        if (compressorInputStream != null) {
      +064            is = new BufferedInputStream(compressorInputStream);
      +065        }
      +066
      +067        ArchiveInputStream archiveInputStream;
      +068
      +069        try {
      +070            archiveInputStream = new ArchiveStreamFactory().createArchiveInputStream(is);
      +071        } catch (ArchiveException e) {
      +072            throw new IOException("Unsupported archive format: " + archive, e);
      +073        }
      +074
      +075        EntryConverter converter;
      +076
      +077        if (archiveInputStream instanceof TarArchiveInputStream) {
      +078
      +079            converter = new EntryConverter() {
      +080                public TarArchiveEntry convert( ArchiveEntry entry ) {
      +081                    return (TarArchiveEntry) entry;
      +082                }
      +083            };
      +084
      +085        } else if (archiveInputStream instanceof ZipArchiveInputStream) {
      +086
      +087            converter = new EntryConverter() {
      +088                public TarArchiveEntry convert( ArchiveEntry entry ) {
      +089                    ZipArchiveEntry src = (ZipArchiveEntry) entry;
      +090                    final TarArchiveEntry dst = new TarArchiveEntry(src.getName(), true);
      +091                    //TODO: if (src.isUnixSymlink()) {
      +092                    //}
      +093
      +094                    dst.setSize(src.getSize());
      +095                    dst.setMode(src.getUnixMode());
      +096                    dst.setModTime(src.getTime());
      +097
      +098                    return dst;
      +099                }
      +100            };
      +101
      +102        } else {
      +103            throw new IOException("Unsupported archive format: " + archive);
      +104        }
      +105
      +106
      +107        try {
      +108            while (true) {
      +109
      +110                ArchiveEntry archiveEntry = archiveInputStream.getNextEntry();
      +111
      +112                if (archiveEntry == null) {
      +113                    break;
      +114                }
      +115
      +116                if (!isIncluded(archiveEntry.getName())) {
      +117                    continue;
      +118                }
      +119
      +120                TarArchiveEntry entry = converter.convert(archiveEntry);
      +121
      +122                entry = map(entry);
      +123
      +124                if (entry.isSymbolicLink()) {
      +125                    pReceiver.onEachLink(entry);
      +126                    continue;
      +127                }
      +128
      +129                if (entry.isDirectory()) {
      +130                    pReceiver.onEachDir(entry);
      +131                    continue;
      +132                }
      +133
      +134                pReceiver.onEachFile(archiveInputStream, entry);
      +135            }
      +136
      +137        } finally {
      +138            if (archiveInputStream != null) {
      +139                archiveInputStream.close();
      +140            }
      +141        }
      +142    }
      +143
      +144    private interface EntryConverter {
      +145        TarArchiveEntry convert( ArchiveEntry entry );
      +146    }
      +147}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerDirectory.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerDirectory.html new file mode 100644 index 000000000..d4eda8414 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerDirectory.html @@ -0,0 +1,175 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import java.io.File;
      +019import java.io.IOException;
      +020
      +021import org.apache.tools.ant.DirectoryScanner;
      +022import org.vafer.jdeb.DataConsumer;
      +023import org.vafer.jdeb.DataProducer;
      +024import org.vafer.jdeb.mapping.Mapper;
      +025import org.vafer.jdeb.utils.Utils;
      +026
      +027/**
      +028 * DataProducer iterating over a directory.
      +029 * For cross-platform permissions and ownerships you probably want to use a Mapper, too.
      +030 */
      +031public final class DataProducerDirectory extends AbstractDataProducer implements DataProducer {
      +032
      +033    private final DirectoryScanner scanner = new DirectoryScanner();
      +034
      +035    public DataProducerDirectory( final File pDir, final String[] pIncludes, final String[] pExcludes, final Mapper[] pMappers ) {
      +036        super(pIncludes, pExcludes, pMappers);
      +037        scanner.setBasedir(pDir);
      +038        scanner.setIncludes(pIncludes);
      +039        scanner.setExcludes(pExcludes);
      +040        scanner.setCaseSensitive(true);
      +041        scanner.setFollowSymlinks(true);
      +042    }
      +043
      +044    public void produce( final DataConsumer pReceiver ) throws IOException {
      +045
      +046        scanner.scan();
      +047
      +048        final File baseDir = scanner.getBasedir();
      +049
      +050        for (String dir : scanner.getIncludedDirectories()) {
      +051            final File file = new File(baseDir, dir);
      +052            String dirname = getFilename(baseDir, file);
      +053
      +054            if ("".equals(dirname)) {
      +055                continue;
      +056            }
      +057
      +058            if ('/' != File.separatorChar) {
      +059                dirname = dirname.replace(File.separatorChar, '/');
      +060            }
      +061
      +062            if (!isIncluded(dirname)) {
      +063                continue;
      +064            }
      +065
      +066            if (!dirname.endsWith("/")) {
      +067                dirname += "/";
      +068            }
      +069
      +070            produceDir(pReceiver, dirname);
      +071        }
      +072
      +073
      +074        for (String f : scanner.getIncludedFiles()) {
      +075            final File file = new File(baseDir, f);
      +076            String filename = getFilename(baseDir, file);
      +077
      +078            if ('/' != File.separatorChar) {
      +079                filename = filename.replace(File.separatorChar, '/');
      +080            }
      +081
      +082            if (!isIncluded(filename)) {
      +083                continue;
      +084            }
      +085
      +086            produceFile(pReceiver, file, filename);
      +087        }
      +088    }
      +089
      +090    private String getFilename( File root, File file ) {
      +091
      +092        final String relativeFilename = file.getAbsolutePath().substring(root.getAbsolutePath().length());
      +093
      +094        return Utils.stripLeadingSlash(relativeFilename);
      +095    }
      +096
      +097}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFile.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFile.html new file mode 100644 index 000000000..e5a1576be --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFile.html @@ -0,0 +1,138 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import java.io.File;
      +019import java.io.FileInputStream;
      +020import java.io.IOException;
      +021
      +022import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +023import org.vafer.jdeb.DataConsumer;
      +024import org.vafer.jdeb.DataProducer;
      +025import org.vafer.jdeb.mapping.Mapper;
      +026
      +027/**
      +028 * DataProducer representing a single file
      +029 * For cross-platform permissions and ownerships you probably want to use a Mapper, too.
      +030 */
      +031public final class DataProducerFile extends AbstractDataProducer implements DataProducer {
      +032
      +033    private final File file;
      +034
      +035    private final String destinationName;
      +036
      +037    public DataProducerFile( final File pFile, String pDestinationName, String[] pIncludes, String[] pExcludes, Mapper[] pMapper ) {
      +038        super(pIncludes, pExcludes, pMapper);
      +039        file = pFile;
      +040        destinationName = pDestinationName;
      +041    }
      +042
      +043    public void produce( final DataConsumer pReceiver ) throws IOException {
      +044        String fileName;
      +045        if (destinationName != null && destinationName.trim().length() > 0) {
      +046            fileName = destinationName.trim();
      +047        } else {
      +048            fileName = file.getName();
      +049        }
      +050
      +051        TarArchiveEntry entry = Producers.defaultFileEntryWithName(fileName);
      +052
      +053        entry = map(entry);
      +054
      +055        entry.setSize(file.length());
      +056
      +057        Producers.produceInputStreamWithEntry(pReceiver, new FileInputStream(file), entry);
      +058    }
      +059
      +060}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFileSet.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFileSet.html new file mode 100644 index 000000000..6c2f9ed33 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFileSet.html @@ -0,0 +1,198 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import java.io.File;
      +019import java.io.FileInputStream;
      +020import java.io.IOException;
      +021import java.io.InputStream;
      +022
      +023import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +024import org.apache.commons.compress.archivers.tar.TarConstants;
      +025import org.apache.tools.ant.DirectoryScanner;
      +026import org.apache.tools.ant.taskdefs.Tar;
      +027import org.apache.tools.ant.types.FileSet;
      +028import org.apache.tools.tar.TarEntry;
      +029import org.vafer.jdeb.DataConsumer;
      +030import org.vafer.jdeb.DataProducer;
      +031import org.vafer.jdeb.utils.SymlinkUtils;
      +032
      +033/**
      +034 * DataProducer providing data from an Ant fileset. TarFileSets are also
      +035 * supported with their permissions.
      +036 */
      +037public final class DataProducerFileSet implements DataProducer {
      +038
      +039    private final FileSet fileset;
      +040
      +041    public DataProducerFileSet( final FileSet fileset ) {
      +042        this.fileset = fileset;
      +043    }
      +044
      +045    public void produce( final DataConsumer pReceiver ) throws IOException {
      +046        String user = Producers.ROOT_NAME;
      +047        int uid = Producers.ROOT_UID;
      +048        String group = Producers.ROOT_NAME;
      +049        int gid = Producers.ROOT_UID;
      +050        int filemode = TarEntry.DEFAULT_FILE_MODE;
      +051        int dirmode = TarEntry.DEFAULT_DIR_MODE;
      +052        String prefix = "";
      +053        String fullpath = "";
      +054
      +055        if (fileset instanceof Tar.TarFileSet) {
      +056            Tar.TarFileSet tarfileset = (Tar.TarFileSet) fileset;
      +057            user = tarfileset.getUserName();
      +058            uid = tarfileset.getUid();
      +059            group = tarfileset.getGroup();
      +060            gid = tarfileset.getGid();
      +061            filemode = tarfileset.getMode();
      +062            dirmode = tarfileset.getDirMode(tarfileset.getProject());
      +063            prefix = tarfileset.getPrefix(tarfileset.getProject());
      +064            fullpath = tarfileset.getFullpath(tarfileset.getProject());
      +065        }
      +066
      +067        final DirectoryScanner scanner = fileset.getDirectoryScanner(fileset.getProject());
      +068        scanner.scan();
      +069
      +070        final File basedir = scanner.getBasedir();
      +071
      +072        if (scanner.getIncludedFilesCount() != 1 || scanner.getIncludedDirsCount() != 0) {
      +073            // the full path attribute only have sense in this context
      +074            // if it's a single-file fileset, we ignore it otherwise
      +075            fullpath = "";
      +076        }
      +077
      +078        for (String directory : scanner.getIncludedDirectories()) {
      +079            String name = directory.replace('\\', '/');
      +080
      +081            final TarArchiveEntry entry = new TarArchiveEntry(prefix + "/" + name);
      +082            entry.setUserName(user);
      +083            entry.setUserId(uid);
      +084            entry.setGroupName(group);
      +085            entry.setGroupId(gid);
      +086            entry.setMode(dirmode);
      +087
      +088            pReceiver.onEachDir(entry);
      +089        }
      +090
      +091        for (String filename : scanner.getIncludedFiles()) {
      +092            final String name = filename.replace('\\', '/');
      +093            final File file = new File(basedir, name);
      +094
      +095            try (InputStream inputStream = new FileInputStream(file)) {
      +096                final String entryName = "".equals(fullpath) ? prefix + "/" + name : fullpath;
      +097
      +098                final File entryPath = new File(entryName);
      +099
      +100                final boolean symbolicLink = SymlinkUtils.isSymbolicLink(entryPath);
      +101                final TarArchiveEntry e;
      +102                if (symbolicLink) {
      +103                    e = new TarArchiveEntry(entryName, TarConstants.LF_SYMLINK);
      +104                    e.setLinkName(SymlinkUtils.readSymbolicLink(entryPath));
      +105                } else {
      +106                    e = new TarArchiveEntry(entryName, true);
      +107                }
      +108
      +109                e.setUserId(uid);
      +110                e.setGroupId(gid);
      +111                e.setUserName(user);
      +112                e.setGroupName(group);
      +113                e.setMode(filemode);
      +114                e.setSize(file.length());
      +115
      +116                pReceiver.onEachFile(inputStream, e);
      +117            }
      +118        }
      +119    }
      +120}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFiles.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFiles.html new file mode 100644 index 000000000..995196d9a --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerFiles.html @@ -0,0 +1,133 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import org.vafer.jdeb.DataConsumer;
      +019import org.vafer.jdeb.mapping.Mapper;
      +020import org.vafer.jdeb.utils.Utils;
      +021
      +022import java.io.File;
      +023import java.io.IOException;
      +024
      +025/**
      +026 * Data producer that places multiple files into a single
      +027 * destination directory.
      +028 */
      +029public class DataProducerFiles extends AbstractDataProducer {
      +030
      +031    private final String[] files;
      +032    private final String destDir;
      +033
      +034    public DataProducerFiles( final String[] files,
      +035                              final String destDir,
      +036                              final Mapper[] mappers ) {
      +037        super(null, null, mappers);
      +038        this.files = files;
      +039        this.destDir = destDir;
      +040    }
      +041
      +042    public void produce( DataConsumer receiver ) throws IOException {
      +043        boolean hasDestDir = !Utils.isNullOrEmpty(destDir);
      +044
      +045        for (String fileName : files) {
      +046            File f = new File(fileName);
      +047
      +048            if (hasDestDir) {
      +049                fileName = Utils.movePath(fileName, destDir);
      +050            }
      +051
      +052            produceFile(receiver, f, fileName);
      +053        }
      +054    }
      +055}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerLink.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerLink.html new file mode 100644 index 000000000..647f43249 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerLink.html @@ -0,0 +1,138 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import java.io.IOException;
      +019
      +020import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +021import org.vafer.jdeb.DataConsumer;
      +022import org.vafer.jdeb.DataProducer;
      +023import org.vafer.jdeb.mapping.Mapper;
      +024
      +025/**
      +026 * DataProducer representing a single file
      +027 * For cross-platform permissions and ownerships you probably want to use a Mapper, too.
      +028 */
      +029public final class DataProducerLink extends AbstractDataProducer implements DataProducer {
      +030
      +031    private final String path;
      +032    private final String linkName;
      +033    private final boolean symlink;
      +034
      +035    public DataProducerLink(final String path, final String linkName, final boolean symlink, String[] pIncludes, String[] pExcludes, Mapper[] pMapper) {
      +036        super(pIncludes, pExcludes, pMapper);
      +037        this.path = path;
      +038        this.symlink = symlink;
      +039        this.linkName = linkName;
      +040    }
      +041
      +042    public void produce( final DataConsumer pReceiver ) throws IOException {
      +043        TarArchiveEntry entry = new TarArchiveEntry(path, symlink ? TarArchiveEntry.LF_SYMLINK : TarArchiveEntry.LF_LINK);
      +044        entry.setLinkName(linkName);
      +045
      +046        entry.setUserId(Producers.ROOT_UID);
      +047        entry.setUserName(Producers.ROOT_NAME);
      +048        entry.setGroupId(Producers.ROOT_UID);
      +049        entry.setGroupName(Producers.ROOT_NAME);
      +050        entry.setMode(TarArchiveEntry.DEFAULT_FILE_MODE);
      +051
      +052        entry = map(entry);
      +053
      +054        entry.setName(path);
      +055        entry.setLinkName(linkName);
      +056
      +057        pReceiver.onEachLink(entry);
      +058    }
      +059
      +060}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerPathTemplate.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerPathTemplate.html new file mode 100644 index 000000000..b9b7fcf4a --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/producers/DataProducerPathTemplate.html @@ -0,0 +1,117 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.producers;
      +017
      +018import java.io.IOException;
      +019
      +020import org.vafer.jdeb.DataConsumer;
      +021import org.vafer.jdeb.DataProducer;
      +022import org.vafer.jdeb.mapping.Mapper;
      +023
      +024public class DataProducerPathTemplate extends AbstractDataProducer implements DataProducer {
      +025
      +026    private final String[] literalPaths;
      +027
      +028    public DataProducerPathTemplate( String[] pLiteralPaths, String[] pIncludes, String[] pExcludes, Mapper[] pMapper ) {
      +029        super(pIncludes, pExcludes, pMapper);
      +030        literalPaths = pLiteralPaths;
      +031    }
      +032
      +033    public void produce( DataConsumer pReceiver ) throws IOException {
      +034        for (String literalPath : literalPaths) {
      +035            produceDir(pReceiver, literalPath);
      +036        }
      +037    }
      +038
      +039}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/signing/PGPSigner.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/signing/PGPSigner.html new file mode 100644 index 000000000..ae6040474 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/signing/PGPSigner.html @@ -0,0 +1,253 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.signing;
      +018
      +019import java.io.ByteArrayInputStream;
      +020import java.io.IOException;
      +021import java.io.InputStream;
      +022import java.io.InputStreamReader;
      +023import java.io.OutputStream;
      +024import java.util.Iterator;
      +025
      +026import org.apache.commons.io.LineIterator;
      +027import org.bouncycastle.bcpg.ArmoredOutputStream;
      +028import org.bouncycastle.bcpg.BCPGOutputStream;
      +029import org.bouncycastle.openpgp.PGPException;
      +030import org.bouncycastle.openpgp.PGPPrivateKey;
      +031import org.bouncycastle.openpgp.PGPSecretKey;
      +032import org.bouncycastle.openpgp.PGPSecretKeyRing;
      +033import org.bouncycastle.openpgp.PGPSecretKeyRingCollection;
      +034import org.bouncycastle.openpgp.PGPSignature;
      +035import org.bouncycastle.openpgp.PGPSignatureGenerator;
      +036import org.bouncycastle.openpgp.PGPUtil;
      +037import org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder;
      +038import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder;
      +039import org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider;
      +040import org.bouncycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator;
      +041
      +042import static java.nio.charset.StandardCharsets.*;
      +043
      +044/**
      +045 * Signing with OpenPGP.
      +046 */
      +047public class PGPSigner {
      +048
      +049    private static final byte[] EOL = "\n".getBytes(UTF_8);
      +050
      +051    private PGPSecretKey secretKey;
      +052    private PGPPrivateKey privateKey;
      +053    private int digest;
      +054
      +055    public PGPSigner(InputStream keyring, String keyId, String passphrase, int digest) throws IOException, PGPException {
      +056        secretKey = getSecretKey(keyring, keyId);
      +057        if(secretKey == null)
      +058        {
      +059            throw new PGPException(String.format("Specified key %s does not exist in key ring %s", keyId, keyring));
      +060        }
      +061        privateKey = secretKey.extractPrivateKey(new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(passphrase.toCharArray()));
      +062        this.digest = digest;
      +063    }
      +064
      +065    /**
      +066     * Creates a clear sign signature over the input data. (Not detached)
      +067     *
      +068     * @param input      the content to be signed
      +069     * @param output     the output destination of the signature
      +070     */
      +071    public void clearSign(String input, OutputStream output) throws IOException, PGPException {
      +072        clearSign(new ByteArrayInputStream(input.getBytes(UTF_8)), output);
      +073    }
      +074
      +075    /**
      +076     * Creates a clear sign signature over the input data. (Not detached)
      +077     *
      +078     * @param input      the content to be signed
      +079     * @param output     the output destination of the signature
      +080     */
      +081    public void clearSign(InputStream input, OutputStream output) throws IOException, PGPException {
      +082
      +083        PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(privateKey.getPublicKeyPacket().getAlgorithm(), digest));
      +084        signatureGenerator.init(PGPSignature.CANONICAL_TEXT_DOCUMENT, privateKey);
      +085
      +086        ArmoredOutputStream armoredOutput = new ArmoredOutputStream(output);
      +087        armoredOutput.beginClearText(digest);
      +088
      +089        LineIterator iterator = new LineIterator(new InputStreamReader(input));
      +090
      +091        while (iterator.hasNext()) {
      +092            String line = iterator.nextLine();
      +093
      +094            // trailing spaces must be removed for signature calculation (see http://tools.ietf.org/html/rfc4880#section-7.1)
      +095            byte[] data = trim(line).getBytes(UTF_8);
      +096
      +097            armoredOutput.write(data);
      +098            armoredOutput.write(EOL);
      +099
      +100            signatureGenerator.update(data);
      +101            if (iterator.hasNext()) {
      +102                signatureGenerator.update(EOL);
      +103            }
      +104        }
      +105
      +106        armoredOutput.endClearText();
      +107
      +108        PGPSignature signature = signatureGenerator.generate();
      +109        signature.encode(new BCPGOutputStream(armoredOutput));
      +110
      +111        armoredOutput.close();
      +112    }
      +113
      +114    /**
      +115     * Returns the secret key.
      +116     */
      +117    public PGPSecretKey getSecretKey()
      +118    {
      +119        return secretKey;
      +120    }
      +121
      +122    /**
      +123     * Returns the private key.
      +124     */
      +125    public PGPPrivateKey getPrivateKey()
      +126    {
      +127        return privateKey;
      +128    }
      +129
      +130    /**
      +131     * Returns the secret key matching the specified identifier.
      +132     *
      +133     * @param input the input stream containing the keyring collection
      +134     * @param keyId the 4 bytes identifier of the key
      +135     */
      +136    private PGPSecretKey getSecretKey(InputStream input, String keyId) throws IOException, PGPException {
      +137        PGPSecretKeyRingCollection keyrings = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(input), new JcaKeyFingerprintCalculator());
      +138
      +139        Iterator<PGPSecretKeyRing> rIt = keyrings.getKeyRings();
      +140
      +141        while (rIt.hasNext()) {
      +142            PGPSecretKeyRing kRing = rIt.next();
      +143            Iterator<PGPSecretKey> kIt = kRing.getSecretKeys();
      +144
      +145            while (kIt.hasNext()) {
      +146                PGPSecretKey key = kIt.next();
      +147
      +148                if (key.isSigningKey() && String.format("%08x", key.getKeyID() & 0xFFFFFFFFL).equals(keyId.toLowerCase())) {
      +149                    return key;
      +150                }
      +151            }
      +152        }
      +153
      +154        return null;
      +155    }
      +156
      +157    /**
      +158     * Trim the trailing spaces.
      +159     *
      +160     * @param line
      +161     */
      +162    private String trim(String line) {
      +163        char[] chars = line.toCharArray();
      +164        int len = chars.length;
      +165
      +166        while (len > 0) {
      +167            if (!Character.isWhitespace(chars[len - 1])) {
      +168                break;
      +169            }
      +170            len--;
      +171        }
      +172
      +173        return line.substring(0, len);
      +174    }
      +175}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/FilteredFile.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/FilteredFile.html new file mode 100644 index 000000000..fb6855adc --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/FilteredFile.html @@ -0,0 +1,142 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.utils;
      +018
      +019import java.io.BufferedReader;
      +020import java.io.IOException;
      +021import java.io.InputStream;
      +022import java.io.InputStreamReader;
      +023import java.util.ArrayList;
      +024import java.util.List;
      +025
      +026public class FilteredFile {
      +027
      +028    private String openToken = "[[";
      +029    private String closeToken = "]]";
      +030    private List<String> lines = new ArrayList<>();
      +031
      +032    public FilteredFile(InputStream in, VariableResolver resolver) throws IOException {
      +033        parse(in, resolver);
      +034    }
      +035
      +036    public void setOpenToken(String token) {
      +037        openToken = token;
      +038    }
      +039
      +040    public void setCloseToken(String token) {
      +041        closeToken = token;
      +042    }
      +043
      +044    private void parse(InputStream in, VariableResolver resolver) throws IOException {
      +045        try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
      +046            String line;
      +047            while ((line = reader.readLine()) != null) {
      +048                if (resolver != null) {
      +049                    lines.add(Utils.replaceVariables(resolver, line, openToken, closeToken));
      +050                } else {
      +051                    lines.add(line);
      +052                }
      +053            }
      +054        }
      +055    }
      +056
      +057    public String toString() {
      +058        StringBuilder builder = new StringBuilder();
      +059        for (String line : lines) {
      +060            builder.append(line).append('\n');
      +061        }
      +062        return builder.toString();
      +063    }
      +064}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/InformationInputStream.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/InformationInputStream.html new file mode 100644 index 000000000..455a69e1d --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/InformationInputStream.html @@ -0,0 +1,265 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016
      +017package org.vafer.jdeb.utils;
      +018
      +019import java.io.FilterInputStream;
      +020import java.io.IOException;
      +021import java.io.InputStream;
      +022import java.util.HashMap;
      +023import java.util.Map;
      +024
      +025public final class InformationInputStream extends FilterInputStream {
      +026
      +027    private long i;
      +028    private long ascii;
      +029    private long nonascii;
      +030    private long cr;
      +031    private long lf;
      +032    private long zero;
      +033
      +034    private final Map<BOM, Integer> bomPositions = new HashMap<>();
      +035    private final Map<Shell, Integer> shellPositions = new HashMap<>();
      +036
      +037    /**
      +038     * Byte Order Marks
      +039     */
      +040    private enum BOM {
      +041        NONE(null),
      +042        UTF8("UTF-8", 0xEF, 0xBB, 0xBF),
      +043        UTF16LE("UTF-16LE", 0xFF, 0xFE),
      +044        UTF16BE("UTF-16BE", 0xFE, 0xFF);
      +045
      +046        int[] sequence;
      +047        String encoding;
      +048
      +049        BOM( String encoding, int... sequence ) {
      +050            this.encoding = encoding;
      +051            this.sequence = sequence;
      +052        }
      +053    }
      +054
      +055    /**
      +056     * Shebang for shell scripts in various encodings.
      +057     */
      +058    private enum Shell {
      +059        NONE,
      +060        ASCII(0x23, 0x21),
      +061        UTF16BE(0x00, 0x23, 0x00, 0x21),
      +062        UTF16LE(0x23, 0x00, 0x21, 0x00);
      +063
      +064        int[] header;
      +065
      +066        Shell( int... header ) {
      +067            this.header = header;
      +068        }
      +069    }
      +070
      +071    private BOM bom = BOM.NONE;
      +072    private Shell shell = Shell.NONE;
      +073
      +074    public InformationInputStream( InputStream in ) {
      +075        super(in);
      +076    }
      +077
      +078    public boolean hasBom() {
      +079        return bom != BOM.NONE;
      +080    }
      +081
      +082    public boolean isShell() {
      +083        return shell != Shell.NONE;
      +084    }
      +085
      +086    public boolean hasUnixLineEndings() {
      +087        return cr == 0;
      +088    }
      +089
      +090    public String getEncoding() {
      +091        String encoding = bom.encoding;
      +092
      +093        if (encoding == null) {
      +094            // guess the encoding from the shebang
      +095            if (shell == Shell.UTF16BE) {
      +096                encoding = BOM.UTF16BE.encoding;
      +097            } else if (shell == Shell.UTF16LE) {
      +098                encoding = BOM.UTF16LE.encoding;
      +099            }
      +100        }
      +101
      +102        return encoding;
      +103    }
      +104
      +105    private void add( int c ) {
      +106        if (i < 10) {
      +107            if (shell == Shell.NONE) {
      +108                for (Shell shell : Shell.values()) {
      +109                    int position = shellPositions.containsKey(shell) ? shellPositions.get(shell) : 0;
      +110                    if (position < shell.header.length) {
      +111                        if (c == shell.header[position]) {
      +112                            shellPositions.put(shell, position + 1);
      +113                        } else {
      +114                            shellPositions.put(shell, 0);
      +115                        }
      +116                    } else {
      +117                        this.shell = shell;
      +118                    }
      +119                }
      +120            }
      +121
      +122            if (bom == BOM.NONE) {
      +123                for (BOM bom : BOM.values()) {
      +124                    int position = bomPositions.containsKey(bom) ? bomPositions.get(bom) : 0;
      +125                    if (position < bom.sequence.length) {
      +126                        if (c == bom.sequence[position] && position == i) {
      +127                            bomPositions.put(bom, position + 1);
      +128                        } else {
      +129                            bomPositions.put(bom, 0);
      +130                        }
      +131                    } else {
      +132                        this.bom = bom;
      +133                    }
      +134                }
      +135            }
      +136        }
      +137
      +138        i++;
      +139
      +140        if (c == '\n') {
      +141            lf++;
      +142            return;
      +143        }
      +144        if (c == '\r') {
      +145            cr++;
      +146            return;
      +147        }
      +148        if (c >= ' ' && c <= '~') {
      +149            ascii++;
      +150            return;
      +151        }
      +152        if (c == 0) {
      +153            zero++;
      +154            return;
      +155        }
      +156        nonascii++;
      +157    }
      +158
      +159    public int read() throws IOException {
      +160        int b = super.read();
      +161        if (b != -1) {
      +162            add(b & 0xFF);
      +163        }
      +164        return b;
      +165    }
      +166
      +167    public int read( byte[] b, int off, int len ) throws IOException {
      +168        int length = super.read(b, off, len);
      +169        for (int i = 0; i < length; i++) {
      +170            add(b[off + i] & 0xFF);
      +171        }
      +172        return length;
      +173    }
      +174
      +175    public String toString() {
      +176        StringBuilder sb = new StringBuilder();
      +177        sb.append("{");
      +178        sb.append("total=").append(i);
      +179        sb.append(",noascii=").append(nonascii);
      +180        sb.append(",ascii=").append(ascii);
      +181        sb.append(",cr=").append(cr);
      +182        sb.append(",lf=").append(lf);
      +183        sb.append(",zero=").append(zero);
      +184        sb.append("}");
      +185        return sb.toString();
      +186    }
      +187}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/InformationOutputStream.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/InformationOutputStream.html new file mode 100644 index 000000000..45270090e --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/InformationOutputStream.html @@ -0,0 +1,134 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.utils;
      +017
      +018import java.io.IOException;
      +019import java.io.OutputStream;
      +020import java.security.DigestOutputStream;
      +021import java.security.MessageDigest;
      +022
      +023/**
      +024 * Convenience class to provide digest info and length of a stream.
      +025 *
      +026 * ATTENTION: don't use outside of jdeb
      +027 */
      +028public class InformationOutputStream extends DigestOutputStream {
      +029
      +030    private final MessageDigest digest;
      +031    private long size;
      +032
      +033    public InformationOutputStream( OutputStream pStream, MessageDigest pDigest ) {
      +034        super(pStream, pDigest);
      +035        digest = pDigest;
      +036        size = 0;
      +037    }
      +038
      +039    public String getHexDigest() {
      +040        return Utils.toHex(digest.digest());
      +041    }
      +042
      +043    public void write( byte[] b, int off, int len ) throws IOException {
      +044        super.write(b, off, len);
      +045        size += len;
      +046    }
      +047
      +048    public void write( int b ) throws IOException {
      +049        super.write(b);
      +050        size++;
      +051    }
      +052
      +053    public long getSize() {
      +054        return size;
      +055    }
      +056}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/MapVariableResolver.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/MapVariableResolver.html new file mode 100644 index 000000000..0f376e499 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/MapVariableResolver.html @@ -0,0 +1,115 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.utils;
      +017
      +018import java.util.Map;
      +019
      +020/**
      +021 * Resolve variables based on a Map.
      +022 *
      +023 * ATTENTION: don't use outside of jdeb
      +024 */
      +025public final class MapVariableResolver implements VariableResolver {
      +026
      +027    private final Map<String, String> map;
      +028
      +029    public MapVariableResolver( Map<String, String> map ) {
      +030        this.map = map;
      +031    }
      +032
      +033    public String get( String key ) {
      +034        return map.get(key);
      +035    }
      +036
      +037}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/OutputTimestampResolver.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/OutputTimestampResolver.html new file mode 100644 index 000000000..b095ffe5d --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/OutputTimestampResolver.html @@ -0,0 +1,128 @@ + + + + +Source code + + + + + + +
      +
      +
      001package org.vafer.jdeb.utils;
      +002
      +003import java.util.Date;
      +004import java.util.concurrent.TimeUnit;
      +005
      +006import org.apache.maven.archiver.MavenArchiver;
      +007import org.vafer.jdeb.Console;
      +008
      +009public class OutputTimestampResolver {
      +010    private final Console console;
      +011    private final EnvironmentVariablesReader envReader;
      +012
      +013    public OutputTimestampResolver(Console console) {
      +014        this(console, new EnvironmentVariablesReader());
      +015    }
      +016
      +017    OutputTimestampResolver(Console console, EnvironmentVariablesReader envReader) {
      +018        this.console = console;
      +019        this.envReader = envReader;
      +020    }
      +021
      +022    public Long resolveOutputTimestamp(String paramValue) {
      +023        if (paramValue != null) {
      +024            Date outputDate = new MavenArchiver().parseOutputTimestamp(paramValue);
      +025            if (outputDate != null) {
      +026                console.info("Accepted outputTimestamp parameter: " + paramValue);
      +027                return outputDate.getTime();
      +028            }
      +029        }
      +030
      +031        String sourceDate = envReader.getSourceDateEpoch();
      +032        if (sourceDate != null && !sourceDate.isEmpty()) {
      +033            try {
      +034                long sourceDateVal = Long.parseLong(sourceDate);
      +035                console.info("Accepted SOURCE_DATE_EPOCH environment variable: " + sourceDate);
      +036                return sourceDateVal * TimeUnit.SECONDS.toMillis(1);
      +037            } catch (NumberFormatException e) {
      +038                throw new IllegalArgumentException("Invalid SOURCE_DATE_EPOCH environment variable value: " + sourceDate, e);
      +039            }
      +040        }
      +041
      +042        return null;
      +043    }
      +044
      +045    static class EnvironmentVariablesReader {
      +046        String getSourceDateEpoch() {
      +047            return System.getenv("SOURCE_DATE_EPOCH");
      +048        }
      +049    }
      +050}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/PGPSignatureOutputStream.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/PGPSignatureOutputStream.html new file mode 100644 index 000000000..4c5b8586b --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/PGPSignatureOutputStream.html @@ -0,0 +1,132 @@ + + + + +Source code + + + + + + +
      +
      +
      001package org.vafer.jdeb.utils;
      +002
      +003import java.io.ByteArrayOutputStream;
      +004import java.io.IOException;
      +005import java.io.OutputStream;
      +006
      +007import org.bouncycastle.bcpg.ArmoredOutputStream;
      +008import org.bouncycastle.openpgp.PGPException;
      +009import org.bouncycastle.openpgp.PGPSignature;
      +010import org.bouncycastle.openpgp.PGPSignatureGenerator;
      +011
      +012/**
      +013 * An output stream that calculates the signature of the input data as it
      +014 * is written
      +015 */
      +016public class PGPSignatureOutputStream extends OutputStream {
      +017    private final PGPSignatureGenerator signatureGenerator;
      +018
      +019    public PGPSignatureOutputStream( PGPSignatureGenerator signatureGenerator ) {
      +020        super();
      +021        this.signatureGenerator = signatureGenerator;
      +022    }
      +023
      +024    public void write( int b ) throws IOException {
      +025        signatureGenerator.update(new byte[] { (byte)b });
      +026    }
      +027
      +028    public void write( byte[] b ) throws IOException {
      +029        signatureGenerator.update(b);
      +030    }
      +031
      +032    public void write( byte[] b, int off, int len ) throws IOException {
      +033        signatureGenerator.update(b, off, len);
      +034    }
      +035
      +036    public PGPSignature generateSignature() throws PGPException {
      +037        return signatureGenerator.generate();
      +038    }
      +039
      +040    public String generateASCIISignature() throws PGPException {
      +041        try {
      +042            PGPSignature signature = generateSignature();
      +043            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      +044            ArmoredOutputStream armorStream = new ArmoredOutputStream(buffer);
      +045            signature.encode(armorStream);
      +046            armorStream.close();
      +047            return buffer.toString();
      +048        } catch(IOException e) {
      +049            //Should never happen since we are just using a memory buffer
      +050            throw new RuntimeException(e);
      +051        }
      +052    }
      +053
      +054}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/SymlinkUtils.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/SymlinkUtils.html new file mode 100644 index 000000000..ac9e90aa1 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/SymlinkUtils.html @@ -0,0 +1,121 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.utils;
      +017
      +018import java.io.File;
      +019import java.io.IOException;
      +020
      +021/**
      +022 * Simple utilities to deal with symbolic links
      +023 */
      +024public final class SymlinkUtils {
      +025    private SymlinkUtils() {
      +026    }
      +027
      +028    public static boolean isSymbolicLink(final File file) throws IOException {
      +029        final File canon;
      +030        if (file.getParent() == null) {
      +031            canon = file;
      +032        } else {
      +033            final File canonDir = file.getParentFile().getCanonicalFile();
      +034            canon = new File(canonDir, file.getName());
      +035        }
      +036        return !canon.getCanonicalFile().equals(canon.getAbsoluteFile());
      +037    }
      +038
      +039    public static String readSymbolicLink(final File file) throws IOException {
      +040        return file.getCanonicalFile().getPath();
      +041    }
      +042
      +043}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/Utils.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/Utils.html new file mode 100644 index 000000000..f25dd6760 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/Utils.html @@ -0,0 +1,520 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.utils;
      +017
      +018import java.io.ByteArrayOutputStream;
      +019import java.io.File;
      +020import java.io.FileNotFoundException;
      +021import java.io.IOException;
      +022import java.io.InputStream;
      +023import java.io.InputStreamReader;
      +024import java.io.OutputStream;
      +025import java.text.SimpleDateFormat;
      +026import java.util.Collection;
      +027import java.util.Date;
      +028import java.util.Iterator;
      +029import java.util.LinkedHashSet;
      +030import java.util.Map;
      +031import java.util.TimeZone;
      +032import java.util.regex.Matcher;
      +033import java.util.regex.Pattern;
      +034
      +035import org.apache.tools.ant.filters.FixCrLfFilter;
      +036import org.apache.tools.ant.util.ReaderInputStream;
      +037
      +038/**
      +039 * Simple utils functions.
      +040 *
      +041 * ATTENTION: don't use outside of jdeb
      +042 */
      +043public final class Utils {
      +044    private static final Pattern BETA_PATTERN = Pattern.compile("^(?:(?:(.*?)([.\\-_]))|(.*[^a-z]))(alpha|a|beta|b|milestone|m|cr|rc)([^a-z].*)?$", Pattern.CASE_INSENSITIVE);
      +045
      +046    private static final Pattern SNAPSHOT_PATTERN = Pattern.compile("(.*)[\\-+]SNAPSHOT");
      +047
      +048    public static int copy( final InputStream pInput, final OutputStream pOutput ) throws IOException {
      +049        final byte[] buffer = new byte[2048];
      +050        int count = 0;
      +051        int n;
      +052        while (-1 != (n = pInput.read(buffer))) {
      +053            pOutput.write(buffer, 0, n);
      +054            count += n;
      +055        }
      +056        return count;
      +057    }
      +058
      +059    public static String toHex( final byte[] bytes ) {
      +060        final StringBuilder sb = new StringBuilder();
      +061
      +062        for (byte b : bytes) {
      +063            sb.append(Integer.toHexString((b >> 4) & 0x0f));
      +064            sb.append(Integer.toHexString(b & 0x0f));
      +065        }
      +066
      +067        return sb.toString();
      +068    }
      +069
      +070    public static String stripPath( final int p, final String s ) {
      +071
      +072        if (p <= 0) {
      +073            return s;
      +074        }
      +075
      +076        int x = 0;
      +077        for (int i = 0; i < p; i++) {
      +078            x = s.indexOf('/', x + 1);
      +079            if (x < 0) {
      +080                return s;
      +081            }
      +082        }
      +083
      +084        return s.substring(x + 1);
      +085    }
      +086
      +087    private static String joinPath(char sep, String ...paths) {
      +088        final StringBuilder sb = new StringBuilder();
      +089        for (String p : paths) {
      +090            if (p == null) continue;
      +091            if (!p.startsWith("/") && sb.length() > 0) {
      +092                sb.append(sep);
      +093            }
      +094            sb.append(p);
      +095        }
      +096        return sb.toString();
      +097    }
      +098
      +099    public static String joinUnixPath(String ...paths) {
      +100        return joinPath('/', paths);
      +101    }
      +102
      +103    public static String joinLocalPath(String ...paths) {
      +104        return joinPath(File.separatorChar, paths);
      +105    }
      +106
      +107    public static String stripLeadingSlash( final String s ) {
      +108        if (s == null) {
      +109            return s;
      +110        }
      +111        if (s.length() == 0) {
      +112            return s;
      +113        }
      +114        if (s.charAt(0) == '/' || s.charAt(0) == '\\') {
      +115            return s.substring(1);
      +116        }
      +117        return s;
      +118    }
      +119
      +120    /**
      +121     * Substitute the variables in the given expression with the
      +122     * values from the resolver
      +123     *
      +124     * @param pResolver
      +125     * @param pExpression
      +126     */
      +127    public static String replaceVariables( final VariableResolver pResolver, final String pExpression, final String pOpen, final String pClose ) {
      +128        final char[] open = pOpen.toCharArray();
      +129        final char[] close = pClose.toCharArray();
      +130
      +131        final StringBuilder out = new StringBuilder();
      +132        StringBuilder sb = new StringBuilder();
      +133        char[] last = null;
      +134        int wo = 0;
      +135        int wc = 0;
      +136        int level = 0;
      +137        for (char c : pExpression.toCharArray()) {
      +138            if (c == open[wo]) {
      +139                if (wc > 0) {
      +140                    sb.append(close, 0, wc);
      +141                }
      +142                wc = 0;
      +143                wo++;
      +144                if (open.length == wo) {
      +145                    // found open
      +146                    if (last == open) {
      +147                        out.append(open);
      +148                    }
      +149                    level++;
      +150                    out.append(sb);
      +151                    sb = new StringBuilder();
      +152                    wo = 0;
      +153                    last = open;
      +154                }
      +155            } else if (c == close[wc]) {
      +156                if (wo > 0) {
      +157                    sb.append(open, 0, wo);
      +158                }
      +159                wo = 0;
      +160                wc++;
      +161                if (close.length == wc) {
      +162                    // found close
      +163                    if (last == open) {
      +164                        final String variable = pResolver.get(sb.toString());
      +165                        if (variable != null) {
      +166                            out.append(variable);
      +167                        } else {
      +168                            out.append(open);
      +169                            out.append(sb);
      +170                            out.append(close);
      +171                        }
      +172                    } else {
      +173                        out.append(sb);
      +174                        out.append(close);
      +175                    }
      +176                    sb = new StringBuilder();
      +177                    level--;
      +178                    wc = 0;
      +179                    last = close;
      +180                }
      +181            } else {
      +182
      +183                if (wo > 0) {
      +184                    sb.append(open, 0, wo);
      +185                }
      +186
      +187                if (wc > 0) {
      +188                    sb.append(close, 0, wc);
      +189                }
      +190
      +191                sb.append(c);
      +192
      +193                wo = wc = 0;
      +194            }
      +195        }
      +196
      +197        if (wo > 0) {
      +198            sb.append(open, 0, wo);
      +199        }
      +200
      +201        if (wc > 0) {
      +202            sb.append(close, 0, wc);
      +203        }
      +204
      +205        if (level > 0) {
      +206            out.append(open);
      +207        }
      +208        out.append(sb);
      +209
      +210        return out.toString();
      +211    }
      +212
      +213    /**
      +214     * Replaces new line delimiters in the input stream with the Unix line feed.
      +215     *
      +216     * @param input
      +217     */
      +218    public static byte[] toUnixLineEndings( InputStream input ) throws IOException {
      +219        String encoding = "ISO-8859-1";
      +220        FixCrLfFilter filter = new FixCrLfFilter(new InputStreamReader(input, encoding));
      +221        filter.setEol(FixCrLfFilter.CrLf.newInstance("unix"));
      +222
      +223        ByteArrayOutputStream filteredFile = new ByteArrayOutputStream();
      +224        Utils.copy(new ReaderInputStream(filter, encoding), filteredFile);
      +225
      +226        return filteredFile.toByteArray();
      +227    }
      +228
      +229    private static String formatSnapshotTemplate( String template, Date timestamp ) {
      +230        int startBracket = template.indexOf('[');
      +231        int endBracket = template.indexOf(']');
      +232        if(startBracket == -1 || endBracket == -1) {
      +233            return template;
      +234        } else {
      +235            // prefix[yyMMdd]suffix
      +236            final String date = new SimpleDateFormat(template.substring(startBracket + 1, endBracket)).format(timestamp);
      +237            String datePrefix = startBracket == 0 ? "" : template.substring(0, startBracket);
      +238            String dateSuffix = endBracket == template.length() ? "" : template.substring(endBracket + 1);
      +239            return datePrefix + date + dateSuffix;
      +240        }
      +241    }
      +242
      +243    /**
      +244     * Convert the project version to a version suitable for a Debian package.
      +245     * -SNAPSHOT suffixes are replaced with a timestamp (~yyyyMMddHHmmss).
      +246     * The separator before a rc, alpha or beta version is replaced with '~'
      +247     * such that the version is always ordered before the final or GA release.
      +248     *
      +249     * @param version the project version to convert to a Debian package version
      +250     * @param template the template used to replace -SNAPSHOT, the timestamp format is in brackets,
      +251     *        the rest of the string is preserved (prefix[yyMMdd]suffix -> prefix151230suffix)
      +252     * @param timestamp the UTC date used as the timestamp to replace the SNAPSHOT suffix.
      +253     */
      +254    public static String convertToDebianVersion( String version, boolean apply, String envName, String template, Date timestamp ) {
      +255        Matcher matcher = SNAPSHOT_PATTERN.matcher(version);
      +256        if (matcher.matches()) {
      +257            version = matcher.group(1) + "~";
      +258
      +259            if (apply) {
      +260                final String envValue = System.getenv(envName);
      +261                if(template != null && template.length() > 0) {
      +262                    version += formatSnapshotTemplate(template, timestamp);
      +263                } else if (envValue != null && envValue.length() > 0) {
      +264                    version += envValue;
      +265                } else {
      +266                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
      +267                    dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
      +268                    version += dateFormat.format(timestamp);
      +269                }
      +270            } else {
      +271                version += "SNAPSHOT";
      +272            }
      +273        } else {
      +274            matcher = BETA_PATTERN.matcher(version);
      +275            if (matcher.matches()) {
      +276                if (matcher.group(1) != null) {
      +277                    version = matcher.group(1) + "~" + matcher.group(4) + matcher.group(5);
      +278                } else {
      +279                    version = matcher.group(3) + "~" + matcher.group(4) + matcher.group(5);
      +280                }
      +281            }
      +282        }
      +283
      +284        // safest upstream_version should only contain full stop, plus, tilde, and alphanumerics
      +285        // https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
      +286        version = version.replaceAll("[^.+~A-Za-z0-9]", "+").replaceAll("\\++", "+");
      +287
      +288        return version;
      +289    }
      +290
      +291    /**
      +292     * Construct new path by replacing file directory part. No
      +293     * files are actually modified.
      +294     * @param file path to move
      +295     * @param target new path directory
      +296     */
      +297    public static String movePath( final String file,
      +298                                   final String target ) {
      +299        final String name = new File(file).getName();
      +300        return target.endsWith("/") ? target + name : target + '/' + name;
      +301    }
      +302
      +303    /**
      +304     * Extracts value from map if given value is null.
      +305     * @param value current value
      +306     * @param props properties to extract value from
      +307     * @param key property name to extract
      +308     * @return initial value or value extracted from map
      +309     */
      +310    public static String lookupIfEmpty( final String value,
      +311                                        final Map<String, String> props,
      +312                                        final String key ) {
      +313        return value != null ? value : props.get(key);
      +314    }
      +315
      +316    /**
      +317    * Get the known locations where the secure keyring can be located.
      +318    * Looks through known locations of the GNU PG secure keyring.
      +319    *
      +320    * @return The location of the PGP secure keyring if it was found,
      +321    *         null otherwise
      +322    */
      +323    public static Collection<String> getKnownPGPSecureRingLocations() {
      +324        final LinkedHashSet<String> locations = new LinkedHashSet<>();
      +325
      +326        final String os = System.getProperty("os.name");
      +327        final boolean runOnWindows = os == null || os.toLowerCase().contains("win");
      +328
      +329        if (runOnWindows) {
      +330            // The user's roaming profile on Windows, via environment
      +331            final String windowsRoaming = System.getenv("APPDATA");
      +332            if (windowsRoaming != null) {
      +333                locations.add(joinLocalPath(windowsRoaming, "gnupg", "secring.gpg"));
      +334            }
      +335
      +336            // The user's local profile on Windows, via environment
      +337            final String windowsLocal = System.getenv("LOCALAPPDATA");
      +338            if (windowsLocal != null) {
      +339                locations.add(joinLocalPath(windowsLocal, "gnupg", "secring.gpg"));
      +340            }
      +341
      +342            // The Windows installation directory
      +343            final String windir = System.getProperty("WINDIR");
      +344            if (windir != null) {
      +345                // Local Profile on Windows 98 and ME
      +346                locations.add(joinLocalPath(windir, "Application Data", "gnupg", "secring.gpg"));
      +347            }
      +348        }
      +349
      +350        final String home = System.getProperty("user.home");
      +351
      +352        if (home != null && runOnWindows) {
      +353            // These are for various flavours of Windows
      +354            // if the environment variables above have failed
      +355
      +356            // Roaming profile on Vista and later
      +357            locations.add(joinLocalPath(home, "AppData", "Roaming", "gnupg", "secring.gpg"));
      +358            // Local profile on Vista and later
      +359            locations.add(joinLocalPath(home, "AppData", "Local", "gnupg", "secring.gpg"));
      +360            // Roaming profile on 2000 and XP
      +361            locations.add(joinLocalPath(home, "Application Data", "gnupg", "secring.gpg"));
      +362            // Local profile on 2000 and XP
      +363            locations.add(joinLocalPath(home, "Local Settings", "Application Data", "gnupg", "secring.gpg"));
      +364        }
      +365
      +366        // *nix, including OS X
      +367        if (home != null) {
      +368            locations.add(joinLocalPath(home, ".gnupg", "secring.gpg"));
      +369        }
      +370
      +371        return locations;
      +372    }
      +373
      +374    /**
      +375     * Tries to guess location of the user secure keyring using various
      +376     * heuristics.
      +377     *
      +378     * @return path to the keyring file
      +379     * @throws FileNotFoundException if no keyring file found
      +380     */
      +381    public static File guessKeyRingFile() throws FileNotFoundException {
      +382        final Collection<String> possibleLocations = getKnownPGPSecureRingLocations();
      +383        for (final String location : possibleLocations) {
      +384            final File candidate = new File(location);
      +385            if (candidate.exists()) {
      +386                return candidate;
      +387            }
      +388        }
      +389        final StringBuilder message = new StringBuilder("Could not locate secure keyring, locations tried: ");
      +390        final Iterator<String> it = possibleLocations.iterator();
      +391        while (it.hasNext()) {
      +392            message.append(it.next());
      +393            if (it.hasNext()) {
      +394                message.append(", ");
      +395            }
      +396        }
      +397        throw new FileNotFoundException(message.toString());
      +398    }
      +399
      +400    /**
      +401     * Returns true if string is null or empty.
      +402     */
      +403    public static boolean isNullOrEmpty(final String str) {
      +404        return str == null || str.length() == 0;
      +405    }
      +406
      +407    /**
      +408    * Return fallback if first string is null or empty
      +409    */
      +410    public static String defaultString(final String str, final String fallback) {
      +411        return isNullOrEmpty(str) ? fallback : str;
      +412    }
      +413
      +414
      +415    /**
      +416     * Check if a CharSequence is whitespace, empty ("") or null.
      +417     *
      +418     * <pre>
      +419     * StringUtils.isBlank(null)      = true
      +420     * StringUtils.isBlank("")        = true
      +421     * StringUtils.isBlank(" ")       = true
      +422     * StringUtils.isBlank("bob")     = false
      +423     * StringUtils.isBlank("  bob  ") = false
      +424     * </pre>
      +425     *
      +426     * @param cs
      +427     *            the CharSequence to check, may be null
      +428     * @return {@code true} if the CharSequence is null, empty or whitespace
      +429     */
      +430    public static boolean isBlank(final CharSequence cs) {
      +431        int strLen;
      +432        if (cs == null || (strLen = cs.length()) == 0) {
      +433            return true;
      +434        }
      +435        for (int i = 0; i < strLen; i++) {
      +436            if (!Character.isWhitespace(cs.charAt(i))) {
      +437                return false;
      +438            }
      +439        }
      +440        return true;
      +441    }
      +442}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/VariableResolver.html b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/VariableResolver.html new file mode 100644 index 000000000..cb064a902 --- /dev/null +++ b/release/1.10/apidocs/src-html/org/vafer/jdeb/utils/VariableResolver.html @@ -0,0 +1,105 @@ + + + + +Source code + + + + + + +
      +
      +
      001/*
      +002 * Copyright 2007-2021 The jdeb developers.
      +003 *
      +004 * Licensed under the Apache License, Version 2.0 (the "License");
      +005 * you may not use this file except in compliance with the License.
      +006 * You may obtain a copy of the License at
      +007 *
      +008 *      http://www.apache.org/licenses/LICENSE-2.0
      +009 *
      +010 * Unless required by applicable law or agreed to in writing, software
      +011 * distributed under the License is distributed on an "AS IS" BASIS,
      +012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +013 * See the License for the specific language governing permissions and
      +014 * limitations under the License.
      +015 */
      +016package org.vafer.jdeb.utils;
      +017
      +018/**
      +019 * Interface for resolving variables.
      +020 * See Utils.replaceVariables()
      +021 *
      +022 * ATTENTION: don't use outside of jdeb
      +023 */
      +024
      +025public interface VariableResolver {
      +026    String get( final String pKey );
      +027}
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + diff --git a/release/1.10/apidocs/stylesheet.css b/release/1.10/apidocs/stylesheet.css new file mode 100644 index 000000000..932e56cde --- /dev/null +++ b/release/1.10/apidocs/stylesheet.css @@ -0,0 +1,827 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 0 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +/* + * Styles for tables. + */ +.summary-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.summary-table { + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} + +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-deprecated-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-deprecated-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-deprecated-item-name a:link, .col-deprecated-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .interface-name { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment, div.block div.block span.emphasized-phrase, +div.block div.block span.interface-name { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +#search { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/release/1.10/apidocs/tag-search-index.js b/release/1.10/apidocs/tag-search-index.js new file mode 100644 index 000000000..f38b3cb3c --- /dev/null +++ b/release/1.10/apidocs/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/release/1.10/apidocs/type-search-index.js b/release/1.10/apidocs/type-search-index.js new file mode 100644 index 000000000..f999b3814 --- /dev/null +++ b/release/1.10/apidocs/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"p":"org.vafer.jdeb.producers","l":"AbstractDataProducer"},{"l":"All Classes","u":"allclasses-index.html"},{"p":"org.vafer.jdeb.debian","l":"BinaryPackageControlFile"},{"p":"org.vafer.jdeb.changes","l":"ChangeSet"},{"p":"org.vafer.jdeb.debian","l":"ChangesFile"},{"p":"org.vafer.jdeb.changes","l":"ChangesProvider"},{"p":"org.vafer.jdeb","l":"Compression"},{"p":"org.vafer.jdeb","l":"Console"},{"p":"org.vafer.jdeb.debian","l":"ControlField"},{"p":"org.vafer.jdeb.debian","l":"ControlFile"},{"p":"org.vafer.jdeb.ant","l":"Data"},{"p":"org.vafer.jdeb.maven","l":"Data"},{"p":"org.vafer.jdeb","l":"DataConsumer"},{"p":"org.vafer.jdeb","l":"DataProducer"},{"p":"org.vafer.jdeb.producers","l":"DataProducerArchive"},{"p":"org.vafer.jdeb.producers","l":"DataProducerDirectory"},{"p":"org.vafer.jdeb.producers","l":"DataProducerFile"},{"p":"org.vafer.jdeb.producers","l":"DataProducerFiles"},{"p":"org.vafer.jdeb.producers","l":"DataProducerFileSet"},{"p":"org.vafer.jdeb.producers","l":"DataProducerLink"},{"p":"org.vafer.jdeb.producers","l":"DataProducerPathTemplate"},{"p":"org.vafer.jdeb.ant","l":"DebAntTask"},{"p":"org.vafer.jdeb","l":"DebMaker"},{"p":"org.vafer.jdeb.maven","l":"DebMojo"},{"p":"org.vafer.jdeb.utils","l":"FilteredFile"},{"p":"org.vafer.jdeb.utils","l":"InformationInputStream"},{"p":"org.vafer.jdeb.utils","l":"InformationOutputStream"},{"p":"org.vafer.jdeb.ant","l":"Link"},{"p":"org.vafer.jdeb.mapping","l":"LsMapper"},{"p":"org.vafer.jdeb.ant","l":"Mapper"},{"p":"org.vafer.jdeb.maven","l":"Mapper"},{"p":"org.vafer.jdeb.mapping","l":"Mapper"},{"p":"org.vafer.jdeb.utils","l":"MapVariableResolver"},{"p":"org.vafer.jdeb.ant","l":"MissingSourceBehavior"},{"p":"org.vafer.jdeb.maven","l":"MissingSourceBehavior"},{"p":"org.vafer.jdeb.mapping","l":"NullMapper"},{"p":"org.vafer.jdeb.utils","l":"OutputTimestampResolver"},{"p":"org.vafer.jdeb","l":"PackagingException"},{"p":"org.vafer.jdeb.mapping","l":"LsMapper.ParseError"},{"p":"org.vafer.jdeb.mapping","l":"PermMapper"},{"p":"org.vafer.jdeb.utils","l":"PGPSignatureOutputStream"},{"p":"org.vafer.jdeb.signing","l":"PGPSigner"},{"p":"org.vafer.jdeb.utils","l":"SymlinkUtils"},{"p":"org.vafer.jdeb","l":"TarOptions"},{"p":"org.vafer.jdeb.changes","l":"TextfileChangesProvider"},{"p":"org.vafer.jdeb.debian","l":"ControlField.Type"},{"p":"org.vafer.jdeb.utils","l":"Utils"},{"p":"org.vafer.jdeb.utils","l":"VariableResolver"}];updateSearchResults(); \ No newline at end of file diff --git a/release/1.10/xref/allclasses-frame.html b/release/1.10/xref/allclasses-frame.html new file mode 100644 index 000000000..f4cf761d4 --- /dev/null +++ b/release/1.10/xref/allclasses-frame.html @@ -0,0 +1,75 @@ + + + + + + + All Classes + + + +

      All Classes

      + + + diff --git a/release/1.10/xref/index.html b/release/1.10/xref/index.html new file mode 100644 index 000000000..6197fdf99 --- /dev/null +++ b/release/1.10/xref/index.html @@ -0,0 +1,75 @@ + + + + + + + jdeb 1.10 Reference + + + + + + + + + + <h1>Frame Alert</h1> + <p> + You don't have frames. Go <a href="overview-summary.html">here</a> + </p> + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ChangesFileBuilder.html b/release/1.10/xref/org/vafer/jdeb/ChangesFileBuilder.html new file mode 100644 index 000000000..729e58e18 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ChangesFileBuilder.html @@ -0,0 +1,93 @@ + + + +ChangesFileBuilder xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb;
      +18  
      +19  import java.io.File;
      +20  import java.io.IOException;
      +21  import java.security.MessageDigest;
      +22  import java.security.NoSuchAlgorithmException;
      +23  import java.util.Date;
      +24  
      +25  import org.apache.commons.io.FileUtils;
      +26  import org.apache.commons.io.output.NullOutputStream;
      +27  import org.vafer.jdeb.changes.ChangesProvider;
      +28  import org.vafer.jdeb.debian.BinaryPackageControlFile;
      +29  import org.vafer.jdeb.debian.ChangesFile;
      +30  import org.vafer.jdeb.utils.InformationOutputStream;
      +31  
      +32  /**
      +33   * Builds the Debian changes file.
      +34   */
      +35  class ChangesFileBuilder {
      +36  
      +37      public ChangesFile createChanges(BinaryPackageControlFile packageControlFile, File binaryPackage, ChangesProvider changesProvider) throws IOException, PackagingException {
      +38  
      +39          ChangesFile changesFile = new ChangesFile();
      +40          changesFile.setChanges(changesProvider.getChangesSets());
      +41          changesFile.initialize(packageControlFile);
      +42  
      +43          changesFile.set("Date", ChangesFile.formatDate(new Date()));
      +44  
      +45          try {
      +46              // compute the checksums of the binary package
      +47              InformationOutputStream md5output = new InformationOutputStream(NullOutputStream.NULL_OUTPUT_STREAM, MessageDigest.getInstance("MD5"));
      +48              InformationOutputStream sha1output = new InformationOutputStream(md5output, MessageDigest.getInstance("SHA1"));
      +49              InformationOutputStream sha256output = new InformationOutputStream(sha1output, MessageDigest.getInstance("SHA-256"));
      +50  
      +51              FileUtils.copyFile(binaryPackage, sha256output);
      +52  
      +53              // Checksums-Sha1:
      +54              //  56ef4c6249dc3567fd2967f809c42d1f9b61adf7 45964 jdeb.deb
      +55              changesFile.set("Checksums-Sha1", sha1output.getHexDigest() + " " + binaryPackage.length() + " " + binaryPackage.getName());
      +56  
      +57              // Checksums-Sha256:
      +58              //  38c6fa274eb9299a69b739bcbdbd05c7ffd1d8d6472f4245ed732a25c0e5d616 45964 jdeb.deb
      +59              changesFile.set("Checksums-Sha256", sha256output.getHexDigest() + " " + binaryPackage.length() + " " + binaryPackage.getName());
      +60  
      +61              StringBuilder files = new StringBuilder(md5output.getHexDigest());
      +62              files.append(' ').append(binaryPackage.length());
      +63              files.append(' ').append(packageControlFile.get("Section"));
      +64              files.append(' ').append(packageControlFile.get("Priority"));
      +65              files.append(' ').append(binaryPackage.getName());
      +66              changesFile.set("Files", files.toString());
      +67  
      +68          } catch (NoSuchAlgorithmException e) {
      +69              throw new PackagingException("Unable to compute the checksums for " + binaryPackage, e);
      +70          }
      +71  
      +72          if (!changesFile.isValid()) {
      +73              throw new PackagingException("Changes file fields are invalid " + changesFile.invalidFields() +
      +74                  ". The following fields are mandatory: " + changesFile.getMandatoryFields() +
      +75                  ". Please check your pom.xml/build.xml and your control file.");
      +76          }
      +77  
      +78          return changesFile;
      +79      }
      +80  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/Compression.html b/release/1.10/xref/org/vafer/jdeb/Compression.html new file mode 100644 index 000000000..9852e64f5 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/Compression.html @@ -0,0 +1,93 @@ + + + +Compression xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb;
      +18  
      +19  import java.io.OutputStream;
      +20  
      +21  import org.apache.commons.compress.compressors.CompressorException;
      +22  import org.apache.commons.compress.compressors.CompressorStreamFactory;
      +23  
      +24  /**
      +25   * Compression method used for the data file.
      +26   */
      +27  public enum Compression {
      +28  
      +29      NONE(""),
      +30      GZIP(".gz"),
      +31      BZIP2(".bz2"),
      +32      XZ(".xz");
      +33  
      +34      private String extension;
      +35  
      +36      Compression(String extension) {
      +37          this.extension = extension;
      +38      }
      +39  
      +40      /**
      +41       * Returns the extension of the compression method
      +42       */
      +43      public String getExtension() {
      +44          return extension;
      +45      }
      +46  
      +47      public OutputStream toCompressedOutputStream(OutputStream out) throws CompressorException {
      +48          switch (this) {
      +49              case GZIP:
      +50                  return new CompressorStreamFactory().createCompressorOutputStream("gz", out);
      +51              case BZIP2:
      +52                  return new CompressorStreamFactory().createCompressorOutputStream("bzip2", out);
      +53              case XZ:
      +54                  return new CompressorStreamFactory().createCompressorOutputStream("xz", out);
      +55              default:
      +56                  return out;
      +57          }
      +58      }
      +59  
      +60      /**
      +61       * Returns the compression method corresponding to the specified name.
      +62       * The matching is case insensitive.
      +63       *
      +64       * @param name the name of the compression method
      +65       * @return the compression method, or null if not recognized
      +66       */
      +67      public static Compression toEnum(String name) {
      +68          if ("gzip".equalsIgnoreCase(name) || "gz".equalsIgnoreCase(name)) {
      +69              return GZIP;
      +70          } else if ("bzip2".equalsIgnoreCase(name) || "bz2".equalsIgnoreCase(name)) {
      +71              return BZIP2;
      +72          } else if ("xz".equalsIgnoreCase(name)) {
      +73              return XZ;
      +74          } else if ("none".equalsIgnoreCase(name)) {
      +75              return NONE;
      +76          } else {
      +77              return null;
      +78          }
      +79      }
      +80  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/Console.html b/release/1.10/xref/org/vafer/jdeb/Console.html new file mode 100644 index 000000000..bd84d110c --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/Console.html @@ -0,0 +1,43 @@ + + + +Console xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb;
      +18  
      +19  /**
      +20   * Plug in your favorite log implementation.
      +21   */
      +22  public interface Console {
      +23  
      +24      void debug( String message );
      +25  
      +26      void info( String message );
      +27  
      +28      void warn( String message );
      +29  
      +30  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ControlBuilder.html b/release/1.10/xref/org/vafer/jdeb/ControlBuilder.html new file mode 100644 index 000000000..044125841 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ControlBuilder.html @@ -0,0 +1,265 @@ + + + +ControlBuilder xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb;
      +18  
      +19  import java.io.ByteArrayInputStream;
      +20  import java.io.File;
      +21  import java.io.FileInputStream;
      +22  import java.io.FileNotFoundException;
      +23  import java.io.FileOutputStream;
      +24  import java.io.IOException;
      +25  import java.io.InputStream;
      +26  import java.math.BigInteger;
      +27  import java.text.ParseException;
      +28  import java.util.Arrays;
      +29  import java.util.Comparator;
      +30  import java.util.HashSet;
      +31  import java.util.List;
      +32  import java.util.Set;
      +33  import java.util.zip.GZIPOutputStream;
      +34  
      +35  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +36  import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
      +37  import org.apache.commons.io.IOUtils;
      +38  import org.apache.commons.io.output.NullOutputStream;
      +39  import org.apache.tools.ant.DirectoryScanner;
      +40  import org.vafer.jdeb.debian.BinaryPackageControlFile;
      +41  import org.vafer.jdeb.mapping.PermMapper;
      +42  import org.vafer.jdeb.utils.FilteredFile;
      +43  import org.vafer.jdeb.utils.InformationInputStream;
      +44  import org.vafer.jdeb.utils.Utils;
      +45  import org.vafer.jdeb.utils.VariableResolver;
      +46  
      +47  import static java.nio.charset.StandardCharsets.*;
      +48  
      +49  /**
      +50   * Builds the control archive of the Debian package.
      +51   */
      +52  class ControlBuilder {
      +53  
      +54      /** The name of the package maintainer scripts */
      +55      private static final Set<String> MAINTAINER_SCRIPTS = new HashSet<>(Arrays.asList("preinst", "postinst", "prerm", "postrm", "config"));
      +56  
      +57      /** The name of the other control files subject to token substitution */
      +58      private static final Set<String> CONFIGURATION_FILENAMES = new HashSet<>(Arrays.asList("conffiles", "templates", "triggers", "copyright"));
      +59  
      +60      private Console console;
      +61      private VariableResolver resolver;
      +62      private final String openReplaceToken;
      +63      private final String closeReplaceToken;
      +64      private final Long outputTimestampMs;
      +65  
      +66      ControlBuilder(Console console, VariableResolver resolver, String openReplaceToken, String closeReplaceToken, Long outputTimestampMs) {
      +67          this.console = console;
      +68          this.resolver = resolver;
      +69          this.openReplaceToken = openReplaceToken;
      +70          this.closeReplaceToken = closeReplaceToken;
      +71          this.outputTimestampMs = outputTimestampMs;
      +72      }
      +73  
      +74      /**
      +75       * Build control archive of the deb
      +76       *
      +77       * @param packageControlFile the package control file
      +78       * @param controlFiles the other control information files (maintainer scripts, etc)
      +79       * @param conffiles    the configuration files
      +80       * @param checksums the md5 checksums of the files in the data archive
      +81       * @param output
      +82       * @return
      +83       * @throws java.io.FileNotFoundException
      +84       * @throws java.io.IOException
      +85       * @throws java.text.ParseException
      +86       */
      +87      void buildControl(BinaryPackageControlFile packageControlFile, File[] controlFiles, List<String> conffiles, StringBuilder checksums, File output) throws IOException, ParseException {
      +88          final File dir = output.getParentFile();
      +89          if (dir != null && (!dir.exists() || !dir.isDirectory())) {
      +90              throw new IOException("Cannot write control file at '" + output.getAbsolutePath() + "'");
      +91          }
      +92  
      +93          final TarArchiveOutputStream outputStream = new TarArchiveOutputStream(new GZIPOutputStream(new FileOutputStream(output)));
      +94          outputStream.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
      +95  
      +96          boolean foundConffiles = false;
      +97  
      +98          // sort files to have consistent/reproducible builds
      +99  		Arrays.sort(controlFiles, Comparator.comparing(File::toString));
      +100 
      +101 		// create the final package control file out of the "control" file, copy all other files, ignore the directories
      +102         for (File file : controlFiles) {
      +103             if (file.isDirectory()) {
      +104                 // warn about the misplaced directory, except for directories ignored by default (.svn, cvs, etc)
      +105                 if (!isDefaultExcludes(file)) {
      +106                     console.warn("Found directory '" + file + "' in the control directory. Maybe you are pointing to wrong dir?");
      +107                 }
      +108                 continue;
      +109             }
      +110 
      +111             if ("conffiles".equals(file.getName())) {
      +112                 foundConffiles = true;
      +113             }
      +114 
      +115             if (CONFIGURATION_FILENAMES.contains(file.getName()) || MAINTAINER_SCRIPTS.contains(file.getName())) {
      +116                 FilteredFile configurationFile = new FilteredFile(new FileInputStream(file), resolver);
      +117                 configurationFile.setOpenToken(openReplaceToken);
      +118                 configurationFile.setCloseToken(closeReplaceToken);
      +119                 addControlEntry(file.getName(), configurationFile.toString(), outputStream);
      +120 
      +121             } else if (!"control".equals(file.getName())) {
      +122                 // initialize the information stream to guess the type of the file
      +123                 InformationInputStream infoStream = new InformationInputStream(new FileInputStream(file));
      +124                 Utils.copy(infoStream, NullOutputStream.NULL_OUTPUT_STREAM);
      +125                 infoStream.close();
      +126 
      +127                 // fix line endings for shell scripts
      +128                 InputStream in = new FileInputStream(file);
      +129                 if (infoStream.isShell() && !infoStream.hasUnixLineEndings()) {
      +130                     byte[] buf = Utils.toUnixLineEndings(in);
      +131                     in = new ByteArrayInputStream(buf);
      +132                 }
      +133 
      +134                 addControlEntry(file.getName(), IOUtils.toString(in), outputStream);
      +135 
      +136                 in.close();
      +137             }
      +138         }
      +139 
      +140         if (foundConffiles) {
      +141             console.info("Found file 'conffiles' in the control directory. Skipping conffiles generation.");
      +142         } else if ((conffiles != null) && (conffiles.size() > 0)) {
      +143             addControlEntry("conffiles", createPackageConffilesFile(conffiles), outputStream);
      +144         } else {
      +145             console.info("Skipping 'conffiles' generation. No entries defined in maven/pom or ant/build.xml.");
      +146         }
      +147 
      +148         if (packageControlFile == null) {
      +149             throw new FileNotFoundException("No 'control' file found in " + controlFiles.toString());
      +150         }
      +151 
      +152         addControlEntry("control", packageControlFile.toString(), outputStream);
      +153         addControlEntry("md5sums", checksums.toString(), outputStream);
      +154 
      +155         outputStream.close();
      +156     }
      +157 
      +158     private String createPackageConffilesFile(final List<String> conffiles) {
      +159         StringBuilder content = new StringBuilder();
      +160 
      +161         if (conffiles != null && !conffiles.isEmpty()) {
      +162             for (String nextFileName : conffiles) {
      +163                 content.append(nextFileName).append("\n");
      +164             }
      +165         }
      +166 
      +167         return content.toString();
      +168     }
      +169 
      +170 
      +171     /**
      +172      * Creates a package control file from the specified file and adds the
      +173      * <tt>Date</tt>, <tt>Distribution</tt> and <tt>Urgency</tt> fields if missing.
      +174      * The <tt>Installed-Size</tt> field is also initialized to the actual size of
      +175      * the package. The <tt>Maintainer</tt> field is overridden by the <tt>DEBEMAIL</tt>
      +176      * and <tt>DEBFULLNAME</tt> environment variables if defined.
      +177      *
      +178      * @param file       the control file
      +179      * @param pDataSize  the size of the installed package
      +180      */
      +181     public BinaryPackageControlFile createPackageControlFile(File file, BigInteger pDataSize) throws IOException, ParseException {
      +182         FilteredFile controlFile = new FilteredFile(new FileInputStream(file), resolver);
      +183         BinaryPackageControlFile packageControlFile = new BinaryPackageControlFile(controlFile.toString());
      +184 
      +185         if (packageControlFile.get("Distribution") == null) {
      +186             packageControlFile.set("Distribution", "unknown");
      +187         }
      +188 
      +189         if (packageControlFile.get("Urgency") == null) {
      +190             packageControlFile.set("Urgency", "low");
      +191         }
      +192 
      +193         packageControlFile.set("Installed-Size", pDataSize.divide(BigInteger.valueOf(1024)).toString());
      +194 
      +195         // override the Version if the DEBVERSION environment variable is defined
      +196         final String debVersion = System.getenv("DEBVERSION");
      +197         if (debVersion != null) {
      +198             packageControlFile.set("Version", debVersion);
      +199             console.debug("Using version'" + debVersion + "' from the environment variables.");
      +200         }
      +201 
      +202 
      +203         // override the Maintainer field if the DEBFULLNAME and DEBEMAIL environment variables are defined
      +204         final String debFullName = System.getenv("DEBFULLNAME");
      +205         final String debEmail = System.getenv("DEBEMAIL");
      +206 
      +207         if (debFullName != null && debEmail != null) {
      +208             final String maintainer = debFullName + " <" + debEmail + ">";
      +209             packageControlFile.set("Maintainer", maintainer);
      +210             console.debug("Using maintainer '" + maintainer + "' from the environment variables.");
      +211         }
      +212 
      +213         return packageControlFile;
      +214     }
      +215 
      +216 
      +217     private void addControlEntry(final String pName, final String pContent, final TarArchiveOutputStream pOutput) throws IOException {
      +218         final byte[] data = pContent.getBytes(UTF_8);
      +219 
      +220         final TarArchiveEntry entry = new TarArchiveEntry("./" + pName, true);
      +221         entry.setSize(data.length);
      +222         entry.setNames("root", "root");
      +223         if (outputTimestampMs != null) {
      +224             entry.setModTime(outputTimestampMs);
      +225         }
      +226 
      +227         if (MAINTAINER_SCRIPTS.contains(pName)) {
      +228             entry.setMode(PermMapper.toMode("755"));
      +229         } else {
      +230             entry.setMode(PermMapper.toMode("644"));
      +231         }
      +232 
      +233         pOutput.putArchiveEntry(entry);
      +234         pOutput.write(data);
      +235         pOutput.closeArchiveEntry();
      +236     }
      +237 
      +238     /**
      +239      * Tells if the specified directory is ignored by default (.svn, cvs, etc)
      +240      *
      +241      * @param directory
      +242      */
      +243     private boolean isDefaultExcludes(File directory) {
      +244         for (String pattern : DirectoryScanner.getDefaultExcludes()) {
      +245             if (DirectoryScanner.match(pattern, directory.getAbsolutePath().replace("\\", "/"))) {
      +246                 return true;
      +247             }
      +248         }
      +249 
      +250         return false;
      +251     }
      +252 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/DataBuilder.html b/release/1.10/xref/org/vafer/jdeb/DataBuilder.html new file mode 100644 index 000000000..1d5ec1c67 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/DataBuilder.html @@ -0,0 +1,346 @@ + + + +DataBuilder xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb;
      +18  
      +19  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +20  import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
      +21  import org.apache.commons.compress.archivers.tar.TarConstants;
      +22  import org.apache.commons.compress.archivers.zip.ZipEncoding;
      +23  import org.apache.commons.compress.archivers.zip.ZipEncodingHelper;
      +24  import org.apache.commons.compress.compressors.CompressorException;
      +25  import org.vafer.jdeb.utils.Utils;
      +26  
      +27  import java.io.File;
      +28  import java.io.FileOutputStream;
      +29  import java.io.IOException;
      +30  import java.io.InputStream;
      +31  import java.math.BigInteger;
      +32  import java.nio.ByteBuffer;
      +33  import java.security.DigestOutputStream;
      +34  import java.security.MessageDigest;
      +35  import java.security.NoSuchAlgorithmException;
      +36  import java.util.ArrayList;
      +37  import java.util.Collection;
      +38  import java.util.List;
      +39  
      +40  /**
      +41   * Builds the data archive of the Debian package.
      +42   */
      +43  class DataBuilder {
      +44  
      +45      private Console console;
      +46  
      +47      private ZipEncoding encoding;
      +48  
      +49      private final Long outputTimestampMs;
      +50  
      +51      private static final class Total {
      +52          private BigInteger count = BigInteger.valueOf(0);
      +53  
      +54          public void add( long size ) {
      +55              count = count.add(BigInteger.valueOf(size));
      +56          }
      +57  
      +58          public String toString() {
      +59              return "" + count;
      +60          }
      +61      }
      +62  
      +63      DataBuilder(Console console, Long outputTimestampMs) {
      +64          this.console = console;
      +65          this.encoding = ZipEncodingHelper.getZipEncoding(null);
      +66          this.outputTimestampMs = outputTimestampMs;
      +67      }
      +68  
      +69      private void checkField(String name, int length) throws IOException {
      +70          if (name != null) {
      +71              ByteBuffer b = encoding.encode(name);
      +72              if (b.limit() > length) {
      +73                  throw new IllegalArgumentException("Field '" + name + "' too long, maximum is " + length);
      +74              }
      +75          }
      +76      }
      +77  
      +78      /**
      +79       * Build the data archive of the deb from the provided DataProducers
      +80       *
      +81       * @param producers
      +82       * @param output
      +83       * @param checksums
      +84       * @param options Options used to build the data file
      +85       * @return
      +86       * @throws java.security.NoSuchAlgorithmException
      +87       * @throws java.io.IOException
      +88       * @throws org.apache.commons.compress.compressors.CompressorException
      +89       */
      +90      BigInteger buildData(Collection<DataProducer> producers, File output, final StringBuilder checksums, TarOptions options) throws NoSuchAlgorithmException, IOException, CompressorException {
      +91  
      +92          final File dir = output.getParentFile();
      +93          if (dir != null && (!dir.exists() || !dir.isDirectory())) {
      +94              throw new IOException("Cannot write data file at '" + output.getAbsolutePath() + "'");
      +95          }
      +96  
      +97          final TarArchiveOutputStream tarOutputStream = new TarArchiveOutputStream(
      +98              options.compression().toCompressedOutputStream(new FileOutputStream(output))
      +99          );
      +100         tarOutputStream.setLongFileMode(options.longFileMode());
      +101         tarOutputStream.setBigNumberMode(options.bigNumberMode());
      +102 
      +103         final MessageDigest digest = MessageDigest.getInstance("MD5");
      +104 
      +105         final Total dataSize = new Total();
      +106 
      +107         final List<String> addedDirectories = new ArrayList<>();
      +108         final DataConsumer receiver = new DataConsumer() {
      +109 
      +110             public void onEachDir(TarArchiveEntry dirEntry) throws IOException {
      +111                 // Check link name
      +112                 checkField(dirEntry.getLinkName(), TarConstants.NAMELEN);
      +113                 // Check user name
      +114                 checkField(dirEntry.getUserName(), TarConstants.UNAMELEN);
      +115                 // Check group name
      +116                 checkField(dirEntry.getUserName(), TarConstants.GNAMELEN);
      +117 
      +118                 dirEntry.setName(fixPathTar(dirEntry.getName()));
      +119 
      +120                 createParentDirectories(dirEntry.getName(), dirEntry.getUserName(), dirEntry.getLongUserId(), dirEntry.getGroupName(), dirEntry.getLongGroupId());
      +121 
      +122                 // The directory passed in explicitly by the caller also gets the passed-in mode.  (Unlike
      +123                 // the parent directories for now.  See related comments at "int mode =" in
      +124                 // createParentDirectories, including about a possible bug.)
      +125                 createDirectory(dirEntry.getName(), dirEntry.getUserName(), dirEntry.getLongUserId(), dirEntry.getGroupName(), dirEntry.getLongGroupId(), dirEntry.getMode(), 0);
      +126 
      +127                 console.debug("dir: " + dirEntry.getName());
      +128             }
      +129 
      +130             public void onEachFile(InputStream input, TarArchiveEntry fileEntry) throws IOException {
      +131                 // Check link name
      +132                 checkField(fileEntry.getLinkName(), TarConstants.NAMELEN);
      +133                 // Check user name
      +134                 checkField(fileEntry.getUserName(), TarConstants.UNAMELEN);
      +135                 // Check group name
      +136                 checkField(fileEntry.getGroupName(), TarConstants.GNAMELEN);
      +137 
      +138                 // For md5sum
      +139                 String rawFileEntryName = fileEntry.getName();
      +140 
      +141                 fileEntry.setName(fixPathTar(fileEntry.getName()));
      +142                 if (outputTimestampMs != null) {
      +143                     fileEntry.setModTime(outputTimestampMs);
      +144                 }
      +145 
      +146                 createParentDirectories(fileEntry.getName(), fileEntry.getUserName(), fileEntry.getLongUserId(), fileEntry.getGroupName(), fileEntry.getLongGroupId());
      +147 
      +148                 tarOutputStream.putArchiveEntry(fileEntry);
      +149 
      +150                 dataSize.add(fileEntry.getSize());
      +151                 digest.reset();
      +152 
      +153                 Utils.copy(input, new DigestOutputStream(tarOutputStream, digest));
      +154 
      +155                 final String md5 = Utils.toHex(digest.digest());
      +156 
      +157                 tarOutputStream.closeArchiveEntry();
      +158 
      +159                 console.debug(
      +160                     "file:" + fileEntry.getName() +
      +161                         " size:" + fileEntry.getSize() +
      +162                         " mode:" + fileEntry.getMode() +
      +163                         " linkname:" + fileEntry.getLinkName() +
      +164                         " username:" + fileEntry.getUserName() +
      +165                         " userid:" + fileEntry.getLongUserId() +
      +166                         " groupname:" + fileEntry.getGroupName() +
      +167                         " groupid:" + fileEntry.getLongGroupId() +
      +168                         " modtime:" + fileEntry.getModTime() +
      +169                         " md5: " + md5
      +170                 );
      +171 
      +172                 // append to file md5 list, two spaces to be compatible with GNU coreutils md5sum
      +173                 checksums.append(md5).append("  ").append(fixPathMd5(rawFileEntryName)).append('\n');
      +174             }
      +175 
      +176             public void onEachLink(TarArchiveEntry entry) throws IOException {
      +177                 // Check user name
      +178                 checkField(entry.getUserName(), TarConstants.UNAMELEN);
      +179                 // Check group name
      +180                 checkField(entry.getGroupName(), TarConstants.GNAMELEN);
      +181 
      +182                 entry.setName(fixPathTar(entry.getName()));
      +183                 if (outputTimestampMs != null) {
      +184                     entry.setModTime(outputTimestampMs);
      +185                 }
      +186 
      +187                 createParentDirectories(entry.getName(), entry.getUserName(), entry.getLongUserId(), entry.getGroupName(), entry.getLongGroupId());
      +188 
      +189                 tarOutputStream.putArchiveEntry(entry);
      +190                 tarOutputStream.closeArchiveEntry();
      +191 
      +192                 console.debug(
      +193                     "link:" + entry.getName() +
      +194                     " mode:" + entry.getMode() +
      +195                     " linkname:" + entry.getLinkName() +
      +196                     " username:" + entry.getUserName() +
      +197                     " userid:" + entry.getLongUserId() +
      +198                     " groupname:" + entry.getGroupName() +
      +199                     " groupid:" + entry.getLongGroupId()
      +200                  );
      +201             }
      +202 
      +203 
      +204             private void createDirectory( String directory, String user, long uid, String group, long gid, int mode, long size ) throws IOException {
      +205                 // All dirs should end with "/" when created, or the test DebAndTaskTestCase.testTarFileSet() thinks its a file
      +206                 // and so thinks it has the wrong permission.
      +207                 // This consistency also helps when checking if a directory already exists in addedDirectories.
      +208 
      +209                 if (!directory.endsWith("/")) {
      +210                     directory += "/";
      +211                 }
      +212 
      +213                 if (!addedDirectories.contains(directory)) {
      +214                     TarArchiveEntry entry = new TarArchiveEntry(directory, true);
      +215                     entry.setUserName(user);
      +216                     entry.setUserId(uid);
      +217                     entry.setGroupName(group);
      +218                     entry.setGroupId(gid);
      +219                     entry.setMode(mode);
      +220                     entry.setSize(size);
      +221 
      +222                     if (outputTimestampMs != null) {
      +223                         entry.setModTime(outputTimestampMs);
      +224                     }
      +225 
      +226                     tarOutputStream.putArchiveEntry(entry);
      +227                     tarOutputStream.closeArchiveEntry();
      +228                     addedDirectories.add(directory); // so addedDirectories consistently have "/" for finding duplicates.
      +229                 }
      +230             }
      +231 
      +232             private void createParentDirectories( String filename, String user, long uid, String group, long gid ) throws IOException {
      +233                 String dirname = fixPathTar(new File(filename).getParent());
      +234 
      +235                 // Debian packages must have parent directories created
      +236                 // before sub-directories or files can be installed.
      +237                 // For example, if an entry of ./usr/lib/foo/bar existed
      +238                 // in a .deb package, but the ./usr/lib/foo directory didn't
      +239                 // exist, the package installation would fail.  The .deb must
      +240                 // then have an entry for ./usr/lib/foo and then ./usr/lib/foo/bar
      +241 
      +242                 if (dirname == null) {
      +243                     return;
      +244                 }
      +245 
      +246                 // The loop below will create entries for all parent directories
      +247                 // to ensure that .deb packages will install correctly.
      +248                 String[] pathParts = dirname.split("/");
      +249                 String parentDir = "./";
      +250                 for (int i = 1; i < pathParts.length; i++) {
      +251                     parentDir += pathParts[i] + "/";
      +252                     // Make it so the dirs can be traversed by users.
      +253                     // We could instead try something more granular, like setting the directory
      +254                     // permission to 'rx' for each of the 3 user/group/other read permissions
      +255                     // found on the file being added (ie, only if "other" has read
      +256                     // permission on the main node, then add o+rx permission on all the containing
      +257                     // directories, same w/ user & group), and then also we'd have to
      +258                     // check the parentDirs collection of those already added to
      +259                     // see if those permissions need to be similarly updated.  (Note, it hasn't
      +260                     // been demonstrated, but there might be a bug if a user specifically
      +261                     // requests a directory with certain permissions,
      +262                     // that has already been auto-created because it was a parent, and if so, go set
      +263                     // the user-requested mode on that directory instead of this automatic one.)
      +264                     // But for now, keeping it simple by making every dir a+rx.   Examples are:
      +265                     // drw-r----- fs/fs   # what you get with setMode(mode)
      +266                     // drwxr-xr-x fs/fs   # Usable. Too loose?
      +267                     int mode = TarArchiveEntry.DEFAULT_DIR_MODE;
      +268 
      +269                     createDirectory(parentDir, user, uid, group, gid, mode, 0);
      +270                 }
      +271             }
      +272         };
      +273 
      +274         try {
      +275             for (DataProducer data : producers) {
      +276                 data.produce(receiver);
      +277             }
      +278         } finally {
      +279             tarOutputStream.close();
      +280         }
      +281 
      +282         console.debug("Total size: " + dataSize);
      +283 
      +284         return dataSize.count;
      +285     }
      +286 
      +287     private String fixPathBase( String path ) {
      +288         if (path == null || path.equals(".")) {
      +289             return path;
      +290         }
      +291 
      +292         // If we're receiving directory names from Windows, then we'll convert to use slash
      +293         // This does eliminate the ability to use of a backslash in a directory name on *NIX,
      +294         // but in practice, this is a non-issue
      +295         if (path.contains("\\")) {
      +296             path = path.replace('\\', '/');
      +297         }
      +298         return path;
      +299     }
      +300 
      +301     private String fixPathTar( String path ) {
      +302         if (path == null || path.equals(".")) {
      +303             return path;
      +304         }
      +305 
      +306         path = fixPathBase(path);
      +307 
      +308         // ensure the path is like : ./foo/bar
      +309         if (path.startsWith("/")) {
      +310             path = "." + path;
      +311         } else if (!path.startsWith("./")) {
      +312             path = "./" + path;
      +313         }
      +314         return path;
      +315     }
      +316 
      +317     private String fixPathMd5( String path ) {
      +318         if (path == null || path.equals(".")) {
      +319             return path;
      +320         }
      +321 
      +322         path = fixPathBase(path);
      +323 
      +324         // ensure the path is like : foo/bar
      +325         if (path.startsWith("/")) {
      +326             path = path.substring(1);
      +327         } else if (path.startsWith("./")) {
      +328             path = path.substring(2);
      +329         }
      +330         return path;
      +331     }
      +332 
      +333 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/DataConsumer.html b/release/1.10/xref/org/vafer/jdeb/DataConsumer.html new file mode 100644 index 000000000..0e72b80f8 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/DataConsumer.html @@ -0,0 +1,47 @@ + + + +DataConsumer xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb;
      +17  
      +18  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +19  
      +20  import java.io.IOException;
      +21  import java.io.InputStream;
      +22  
      +23  /**
      +24   * A DataConsumer consumes Data produced from a producer.
      +25   */
      +26  public interface DataConsumer {
      +27  
      +28      void onEachDir( TarArchiveEntry dirEntry ) throws IOException;
      +29  
      +30      void onEachFile( InputStream input, TarArchiveEntry fileEntry ) throws IOException;
      +31  
      +32      void onEachLink( TarArchiveEntry linkEntry ) throws IOException;
      +33  
      +34  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/DataProducer.html b/release/1.10/xref/org/vafer/jdeb/DataProducer.html new file mode 100644 index 000000000..952a40d1b --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/DataProducer.html @@ -0,0 +1,40 @@ + + + +DataProducer xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb;
      +17  
      +18  import java.io.IOException;
      +19  
      +20  /**
      +21   * Provides Data to a DataConsumer.
      +22   */
      +23  public interface DataProducer {
      +24  
      +25      void produce( DataConsumer receiver ) throws IOException;
      +26  
      +27  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/DebMaker.html b/release/1.10/xref/org/vafer/jdeb/DebMaker.html new file mode 100644 index 000000000..12069f668 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/DebMaker.html @@ -0,0 +1,737 @@ + + + +DebMaker xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb;
      +18  
      +19  import org.apache.commons.compress.archivers.ar.ArArchiveEntry;
      +20  import org.apache.commons.compress.archivers.ar.ArArchiveOutputStream;
      +21  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +22  import org.apache.commons.io.FileUtils;
      +23  import org.apache.commons.io.FilenameUtils;
      +24  import org.apache.commons.io.IOUtils;
      +25  import org.apache.commons.lang3.StringUtils;
      +26  import org.bouncycastle.bcpg.HashAlgorithmTags;
      +27  import org.bouncycastle.crypto.digests.MD5Digest;
      +28  import org.bouncycastle.jce.provider.BouncyCastleProvider;
      +29  import org.bouncycastle.openpgp.PGPSignature;
      +30  import org.bouncycastle.openpgp.PGPSignatureGenerator;
      +31  import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder;
      +32  import org.bouncycastle.util.encoders.Hex;
      +33  import org.vafer.jdeb.changes.ChangeSet;
      +34  import org.vafer.jdeb.changes.ChangesProvider;
      +35  import org.vafer.jdeb.changes.TextfileChangesProvider;
      +36  import org.vafer.jdeb.debian.BinaryPackageControlFile;
      +37  import org.vafer.jdeb.debian.ChangesFile;
      +38  import org.vafer.jdeb.signing.PGPSigner;
      +39  import org.vafer.jdeb.utils.PGPSignatureOutputStream;
      +40  import org.vafer.jdeb.utils.Utils;
      +41  import org.vafer.jdeb.utils.VariableResolver;
      +42  
      +43  import java.io.ByteArrayOutputStream;
      +44  import java.io.File;
      +45  import java.io.FileInputStream;
      +46  import java.io.FileOutputStream;
      +47  import java.io.IOException;
      +48  import java.io.InputStream;
      +49  import java.math.BigInteger;
      +50  import java.nio.charset.StandardCharsets;
      +51  import java.security.MessageDigest;
      +52  import java.security.NoSuchAlgorithmException;
      +53  import java.security.Security;
      +54  import java.text.SimpleDateFormat;
      +55  import java.util.ArrayList;
      +56  import java.util.Collection;
      +57  import java.util.Date;
      +58  import java.util.List;
      +59  import java.util.Locale;
      +60  import java.util.concurrent.TimeUnit;
      +61  
      +62  /**
      +63   * A generic class for creating Debian archives. Even supports signed changes
      +64   * files.
      +65   */
      +66  public class DebMaker {
      +67  
      +68      private static final int DEFAULT_MODE = 33188;
      +69  
      +70      /** A console to output log message with */
      +71      private Console console;
      +72  
      +73      /** The Debian package produced */
      +74      private File deb;
      +75  
      +76      /** The directory containing the control files to build the package */
      +77      private File control;
      +78  
      +79      /** The name of the package. Default value if not specified in the control file */
      +80      private String packageName;
      +81  
      +82      /** The section of the package. Default value if not specified in the control file */
      +83      private String section = "java";
      +84  
      +85      /** The dependencies of the package. */
      +86      private String depends;
      +87  
      +88      /** The description of the package. Default value if not specified in the control file */
      +89      private String description;
      +90  
      +91      /** The homepage of the application. Default value if not specified in the control file */
      +92      private String homepage;
      +93  
      +94      /** The file containing the PGP keys */
      +95      private File keyring;
      +96  
      +97      /** The key to use in the keyring */
      +98      private String key;
      +99  
      +100     /** The passphrase for the key to sign the changes file */
      +101     private String passphrase;
      +102 
      +103     /** The file to read the changes from */
      +104     private File changesIn;
      +105 
      +106     /** The file where to write the changes to */
      +107     private File changesOut;
      +108 
      +109     /** The file where to write the changes of the changes input to */
      +110     private File changesSave;
      +111 
      +112     /** The compression method used for the data file (none, gzip, bzip2 or xz) */
      +113     private String compression = "gzip";
      +114 
      +115     /** Whether to sign the package that is created */
      +116     private boolean signPackage;
      +117 
      +118     /** Whether to sign the changes file that is created */
      +119     private boolean signChanges;
      +120 
      +121     /** Defines which utility is used to verify the signed package */
      +122     private String signMethod;
      +123 
      +124     /** Defines the role to sign with */
      +125     private String signRole;
      +126 
      +127     /** Defines the longFileMode of the tar file that is built */
      +128     private String tarLongFileMode;
      +129 
      +130     /** Defines the bigNumberMode of the tar file that is built */
      +131     private String tarBigNumberMode;
      +132 
      +133     private Long outputTimestampMs;
      +134 
      +135     private VariableResolver variableResolver;
      +136     private String openReplaceToken;
      +137     private String closeReplaceToken;
      +138 
      +139     private final Collection<DataProducer> dataProducers = new ArrayList<>();
      +140 
      +141     private final Collection<DataProducer> conffilesProducers = new ArrayList<>();
      +142     private String digest = "SHA256";
      +143 
      +144     public DebMaker(Console console, Collection<DataProducer> dataProducers, Collection<DataProducer> conffileProducers) {
      +145         this.console = console;
      +146         if (dataProducers != null) {
      +147             this.dataProducers.addAll(dataProducers);
      +148         }
      +149         if (conffileProducers != null) {
      +150             this.conffilesProducers.addAll(conffileProducers);
      +151         }
      +152 
      +153         Security.addProvider(new BouncyCastleProvider());
      +154     }
      +155 
      +156     public void setDeb(File deb) {
      +157         this.deb = deb;
      +158     }
      +159 
      +160     public void setControl(File control) {
      +161         this.control = control;
      +162     }
      +163 
      +164     public void setPackage(String packageName) {
      +165         this.packageName = packageName;
      +166     }
      +167 
      +168     public void setSection(String section) {
      +169         this.section = section;
      +170     }
      +171 
      +172     public void setDepends(String depends) {
      +173         this.depends = depends;
      +174     }
      +175 
      +176     public void setDescription(String description) {
      +177         this.description = description;
      +178     }
      +179 
      +180     public void setHomepage(String homepage) {
      +181         this.homepage = homepage;
      +182     }
      +183 
      +184     public void setChangesIn(File changes) {
      +185         this.changesIn = changes;
      +186     }
      +187 
      +188     public void setChangesOut(File changes) {
      +189         this.changesOut = changes;
      +190     }
      +191 
      +192     public void setChangesSave(File changes) {
      +193         this.changesSave = changes;
      +194     }
      +195 
      +196     public void setSignPackage(boolean signPackage) {
      +197         this.signPackage = signPackage;
      +198     }
      +199 
      +200     public void setSignChanges(boolean signChanges) {
      +201         this.signChanges = signChanges;
      +202     }
      +203 
      +204     public void setSignMethod(String signMethod) {
      +205         this.signMethod = signMethod;
      +206     }
      +207 
      +208     public void setSignRole(String signRole) {
      +209         this.signRole = signRole;
      +210     }
      +211 
      +212     public void setKeyring(File keyring) {
      +213         this.keyring = keyring;
      +214     }
      +215 
      +216     public void setKey(String key) {
      +217         this.key = key;
      +218     }
      +219 
      +220     public void setPassphrase(String passphrase) {
      +221         this.passphrase = passphrase;
      +222     }
      +223 
      +224     public void setCompression(String compression) {
      +225         this.compression = compression;
      +226     }
      +227 
      +228     public void setResolver(VariableResolver variableResolver) {
      +229         this.variableResolver = variableResolver;
      +230     }
      +231 
      +232     private boolean isWritableFile(File file) {
      +233         return !file.exists() || file.isFile() && file.canWrite();
      +234     }
      +235 
      +236     public String getDigest() {
      +237         return digest;
      +238     }
      +239 
      +240     public void setDigest(String digest) {
      +241         this.digest = digest;
      +242     }
      +243 
      +244     public void setTarLongFileMode(String tarLongFileMode) {
      +245         this.tarLongFileMode = tarLongFileMode;
      +246     }
      +247 
      +248     public void setTarBigNumberMode(String tarBigNumberMode) {
      +249         this.tarBigNumberMode = tarBigNumberMode;
      +250     }
      +251 
      +252     public void setOutputTimestampMs(Long outputTimestampMs) {
      +253         this.outputTimestampMs = outputTimestampMs;
      +254     }
      +255 
      +256     /**
      +257      * Validates the input parameters.
      +258      */
      +259     public void validate() throws PackagingException {
      +260         if (control == null || !control.isDirectory()) {
      +261             throw new PackagingException("The 'control' attribute doesn't point to a directory. " + control);
      +262         }
      +263 
      +264         if (changesIn != null) {
      +265 
      +266             if (changesIn.exists() && (!changesIn.isFile() || !changesIn.canRead())) {
      +267                 throw new PackagingException("The 'changesIn' setting needs to point to a readable file. " + changesIn + " was not found/readable.");
      +268             }
      +269 
      +270             if (changesOut != null && !isWritableFile(changesOut)) {
      +271                 throw new PackagingException("Cannot write the output for 'changesOut' to " + changesOut);
      +272             }
      +273 
      +274             if (changesSave != null && !isWritableFile(changesSave)) {
      +275                 throw new PackagingException("Cannot write the output for 'changesSave' to " + changesSave);
      +276             }
      +277 
      +278         } else {
      +279             if (changesOut != null || changesSave != null) {
      +280                 throw new PackagingException("The 'changesOut' or 'changesSave' settings may only be used when there is a 'changesIn' specified.");
      +281             }
      +282         }
      +283 
      +284         if (Compression.toEnum(compression) == null) {
      +285             throw new PackagingException("The compression method '" + compression + "' is not supported (expected 'none', 'gzip', 'bzip2' or 'xz')");
      +286         }
      +287 
      +288         if (deb == null) {
      +289             throw new PackagingException("You need to specify where the deb file is supposed to be created.");
      +290         }
      +291 
      +292         getDigestCode(digest);
      +293     }
      +294 
      +295     static int getDigestCode(String digestName) throws PackagingException {
      +296         if ("SHA1".equals(digestName)) {
      +297             return HashAlgorithmTags.SHA1;
      +298         } else if ("MD2".equals(digestName)) {
      +299             return HashAlgorithmTags.MD2;
      +300         } else if ("MD5".equals(digestName)) {
      +301             return HashAlgorithmTags.MD5;
      +302         } else if ("RIPEMD160".equals(digestName)) {
      +303             return HashAlgorithmTags.RIPEMD160;
      +304         } else if ("SHA256".equals(digestName)) {
      +305             return HashAlgorithmTags.SHA256;
      +306         } else if ("SHA384".equals(digestName)) {
      +307             return HashAlgorithmTags.SHA384;
      +308         } else if ("SHA512".equals(digestName)) {
      +309             return HashAlgorithmTags.SHA512;
      +310         } else if ("SHA224".equals(digestName)) {
      +311             return HashAlgorithmTags.SHA224;
      +312         } else {
      +313             throw new PackagingException("unknown hash algorithm tag in digestName: " + digestName);
      +314         }
      +315     }
      +316 
      +317     public void makeDeb() throws PackagingException {
      +318         BinaryPackageControlFile packageControlFile;
      +319         try {
      +320             console.info("Creating debian package: " + deb);
      +321 
      +322             // If we should sign the package
      +323             if (signPackage) {
      +324 
      +325                 if (keyring == null || !keyring.exists()) {
      +326                     console.warn("Signing requested, but no keyring supplied");
      +327                 }
      +328 
      +329                 if (key == null) {
      +330                     console.warn("Signing requested, but no key supplied");
      +331                 }
      +332 
      +333                 if (passphrase == null) {
      +334                     console.warn("Signing requested, but no passphrase supplied");
      +335                 }
      +336 
      +337                 PGPSigner signer;
      +338                 try (FileInputStream keyRingInput = new FileInputStream(keyring)) {
      +339                     signer = new PGPSigner(keyRingInput, key, passphrase, getDigestCode(digest));
      +340                 }
      +341 
      +342                 PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(signer.getSecretKey().getPublicKey().getAlgorithm(), getDigestCode(digest)));
      +343                 signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, signer.getPrivateKey());
      +344 
      +345                 packageControlFile = createSignedDeb(Compression.toEnum(compression), signatureGenerator, signer);
      +346             } else {
      +347                 packageControlFile = createDeb(Compression.toEnum(compression));
      +348             }
      +349 
      +350         } catch (Exception e) {
      +351             throw new PackagingException("Failed to create debian package " + deb, e);
      +352         }
      +353 
      +354         makeChangesFiles(packageControlFile);
      +355     }
      +356 
      +357     private void makeChangesFiles(final BinaryPackageControlFile packageControlFile) throws PackagingException {
      +358         if (changesOut == null) {
      +359             changesOut = new File(deb.getParentFile(), FilenameUtils.getBaseName(deb.getName()) + ".changes");
      +360         }
      +361 
      +362         ChangesProvider changesProvider;
      +363         FileOutputStream out = null;
      +364 
      +365         try {
      +366             console.info("Creating changes file: " + changesOut);
      +367 
      +368             out = new FileOutputStream(changesOut);
      +369 
      +370             if (changesIn != null && changesIn.exists()) {
      +371                 // read the changes form a textfile provider
      +372                 changesProvider = new TextfileChangesProvider(new FileInputStream(changesIn), packageControlFile);
      +373             } else {
      +374                 // create an empty changelog
      +375                 changesProvider = new ChangesProvider() {
      +376                     public ChangeSet[] getChangesSets() {
      +377                         return new ChangeSet[] {
      +378                                 new ChangeSet(packageControlFile.get("Package"),
      +379                                         packageControlFile.get("Version"),
      +380                                         new Date(),
      +381                                         packageControlFile.get("Distribution"),
      +382                                         packageControlFile.get("Urgency"),
      +383                                         packageControlFile.get("Maintainer"),
      +384                                         new String[0])
      +385                         };
      +386                     }
      +387                 };
      +388             }
      +389 
      +390             ChangesFileBuilder builder = new ChangesFileBuilder();
      +391             ChangesFile changesFile = builder.createChanges(packageControlFile, deb, changesProvider);
      +392 
      +393             //(signChanges || signPackage) - for backward compatibility. signPackage is signing both changes and deb.
      +394             if ((signChanges || signPackage) && keyring != null && key != null && passphrase != null) {
      +395                 console.info("Signing the changes file with the key " + key);
      +396                 PGPSigner signer = new PGPSigner(new FileInputStream(keyring), key, passphrase, getDigestCode(digest));
      +397                 signer.clearSign(changesFile.toString(), out);
      +398             } else {
      +399                 out.write(changesFile.toString().getBytes(StandardCharsets.UTF_8));
      +400             }
      +401             out.flush();
      +402 
      +403         } catch (Exception e) {
      +404             throw new PackagingException("Failed to create the Debian changes file " + changesOut, e);
      +405         } finally {
      +406             IOUtils.closeQuietly(out);
      +407         }
      +408 
      +409         if (changesSave == null || !(changesProvider instanceof TextfileChangesProvider)) {
      +410             return;
      +411         }
      +412 
      +413         try {
      +414             console.info("Saving changes to file: " + changesSave);
      +415 
      +416             ((TextfileChangesProvider) changesProvider).save(new FileOutputStream(changesSave));
      +417 
      +418         } catch (Exception e) {
      +419             throw new PackagingException("Failed to save debian changes file " + changesSave, e);
      +420         }
      +421     }
      +422 
      +423     private List<String> populateConffiles(Collection<DataProducer> producers) {
      +424         final List<String> result = new ArrayList<>();
      +425 
      +426         if (producers == null || producers.isEmpty()) {
      +427             return result;
      +428         }
      +429 
      +430         final DataConsumer receiver = new DataConsumer() {
      +431             public void onEachFile(InputStream input, TarArchiveEntry entry)  {
      +432                 String tempConffileItem = entry.getName();
      +433 
      +434                 // Make sure the conffile path is absolute
      +435                 if (tempConffileItem.startsWith(".")) {
      +436                     tempConffileItem = tempConffileItem.substring(1);
      +437                 }
      +438                 if (!tempConffileItem.startsWith("/")) {
      +439                     tempConffileItem = "/" + tempConffileItem;
      +440                 }
      +441 
      +442                 console.info("Adding conffile: " + tempConffileItem);
      +443                 result.add(tempConffileItem);
      +444             }
      +445 
      +446             public void onEachLink(TarArchiveEntry entry)  {
      +447             }
      +448 
      +449             public void onEachDir(TarArchiveEntry tarArchiveEntry)  {
      +450             }
      +451         };
      +452 
      +453         try {
      +454             for (DataProducer data : producers) {
      +455                 data.produce(receiver);
      +456             }
      +457         } catch(Exception e) {
      +458             //
      +459         }
      +460 
      +461         return result;
      +462     }
      +463 
      +464     /**
      +465      * Create the debian archive with from the provided control files and data producers.
      +466      *
      +467      * @param compression   the compression method used for the data file
      +468      * @return BinaryPackageControlFile
      +469      * @throws PackagingException
      +470      */
      +471     public BinaryPackageControlFile createDeb(Compression compression) throws PackagingException {
      +472         return createSignedDeb(compression, null, null);
      +473     }
      +474     /**
      +475      * Create the debian archive with from the provided control files and data producers.
      +476      *
      +477      * @param compression   the compression method used for the data file (gzip, bzip2 or anything else for no compression)
      +478      * @param signatureGenerator   the signature generator
      +479      *
      +480      * @return PackageDescriptor
      +481      * @throws PackagingException
      +482      */
      +483     public BinaryPackageControlFile createSignedDeb(Compression compression, final PGPSignatureGenerator signatureGenerator, PGPSigner signer ) throws PackagingException {
      +484         File tempData = null;
      +485         File tempControl = null;
      +486 
      +487         try {
      +488             tempData = File.createTempFile("deb", "data");
      +489             tempControl = File.createTempFile("deb", "control");
      +490 
      +491             console.debug("Building data");
      +492             DataBuilder dataBuilder = new DataBuilder(console, outputTimestampMs);
      +493             StringBuilder md5s = new StringBuilder();
      +494             TarOptions options = new TarOptions()
      +495                 .compression(compression)
      +496                 .longFileMode(tarLongFileMode)
      +497                 .bigNumberMode(tarBigNumberMode);
      +498             BigInteger size = dataBuilder.buildData(dataProducers, tempData, md5s, options);
      +499 
      +500             console.info("Building conffiles");
      +501             List<String> tempConffiles = populateConffiles(conffilesProducers);
      +502 
      +503             console.debug("Building control");
      +504             ControlBuilder controlBuilder = new ControlBuilder(console, variableResolver, openReplaceToken, closeReplaceToken, outputTimestampMs);
      +505             BinaryPackageControlFile packageControlFile = controlBuilder.createPackageControlFile(new File(control, "control"), size);
      +506             if (packageControlFile.get("Package") == null) {
      +507                 packageControlFile.set("Package", packageName);
      +508             }
      +509             if (packageControlFile.get("Section") == null) {
      +510                 packageControlFile.set("Section", section);
      +511             }
      +512             if (packageControlFile.get("Description") == null) {
      +513                 packageControlFile.set("Description", description);
      +514             }
      +515             if (packageControlFile.get("Depends") == null) {
      +516                 // Only add a depends entry to the control file if the field in this object has actually been set
      +517                 if (depends != null && depends.length() > 0) {
      +518                     packageControlFile.set("Depends", depends);
      +519                 }
      +520             }
      +521             if (packageControlFile.get("Homepage") == null) {
      +522                 packageControlFile.set("Homepage", homepage);
      +523             }
      +524 
      +525             controlBuilder.buildControl(packageControlFile, control.listFiles(), tempConffiles , md5s, tempControl);
      +526 
      +527             if (!packageControlFile.isValid()) {
      +528                 throw new PackagingException("Control file fields are invalid " + packageControlFile.invalidFields() +
      +529                         ". The following fields are mandatory: " + packageControlFile.getMandatoryFields() +
      +530                         ". Please check your pom.xml/build.xml and your control file.");
      +531             }
      +532 
      +533             deb.getParentFile().mkdirs();
      +534 
      +535             ArArchiveOutputStream ar = new ArArchiveOutputStream(new FileOutputStream(deb));
      +536 
      +537             String binaryName = "debian-binary";
      +538             String binaryContent = "2.0\n";
      +539             String controlName = "control.tar.gz";
      +540             String dataName = "data.tar" + compression.getExtension();
      +541 
      +542             addTo(ar, binaryName, binaryContent);
      +543             addTo(ar, controlName, tempControl);
      +544             addTo(ar, dataName, tempData);
      +545 
      +546             if (signatureGenerator != null) {
      +547                 console.info("Signing package with key " + key);
      +548 
      +549                 if(signRole == null) {
      +550                     signRole = "origin";
      +551                 }
      +552 
      +553                 // Use debsig-verify as default
      +554                 if (!"dpkg-sig".equals(signMethod)) {
      +555                     // Sign file to verify with debsig-verify
      +556                     PGPSignatureOutputStream sigStream = new PGPSignatureOutputStream(signatureGenerator);
      +557 
      +558                     addTo(sigStream, binaryContent);
      +559                     addTo(sigStream, tempControl);
      +560                     addTo(sigStream, tempData);
      +561                     addTo(ar, "_gpg" + signRole, sigStream.generateASCIISignature());
      +562 
      +563                 } else {
      +564 
      +565                     // Sign file to verify with dpkg-sig --verify
      +566                     final String outputStr =
      +567                             "Version: 4\n" +
      +568                                     "Signer: \n" +
      +569                                     "Date: " + new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.ENGLISH).format(new Date()) + "\n" +
      +570                                     "Role: " + signRole +"\n" +
      +571                                     "Files: \n" +
      +572                                     addFile(binaryName, binaryContent) +
      +573                                     addFile(controlName, tempControl) +
      +574                                     addFile(dataName, tempData);
      +575 
      +576                     ByteArrayOutputStream message = new ByteArrayOutputStream();
      +577                     signer.clearSign(outputStr, message);
      +578 
      +579                     addTo(ar, "_gpg" + signRole, message.toString());
      +580                 }
      +581             }
      +582 
      +583             ar.close();
      +584 
      +585             return packageControlFile;
      +586 
      +587         } catch (Exception e) {
      +588             throw new PackagingException("Could not create deb package", e);
      +589         } finally {
      +590             if (tempData != null) {
      +591                 if (!tempData.delete()) {
      +592                     console.warn("Could not delete the temporary file " + tempData);
      +593                 }
      +594             }
      +595             if (tempControl != null) {
      +596                 if (!tempControl.delete()) {
      +597                     console.warn("Could not delete the temporary file " + tempControl);
      +598                 }
      +599             }
      +600         }
      +601     }
      +602 
      +603     private String addFile(String name, String input){
      +604         return addLine(md5Hash(input), sha1Hash(input), input.length(), name);
      +605     }
      +606 
      +607     private String addFile(String name, File input){
      +608         return addLine(md5Hash(input), sha1Hash(input), input.length(), name);
      +609     }
      +610 
      +611     private String addLine(String md5, String sha1, long size, String name){
      +612         return "\t" + md5 + " " + sha1 + " " + size + " " + name + "\n";
      +613     }
      +614 
      +615     private String md5Hash(String input){
      +616         return md5Hash(input.getBytes());
      +617     }
      +618 
      +619     private String md5Hash(File input){
      +620         try {
      +621             return md5Hash(FileUtils.readFileToByteArray(input));
      +622         } catch (IOException e) {
      +623             // TODO Auto-generated catch block
      +624             e.printStackTrace();
      +625         }
      +626 
      +627         return null;
      +628     }
      +629 
      +630     private String md5Hash(byte[] input){
      +631         //update the input of MD5
      +632         MD5Digest md5 = new MD5Digest();
      +633         md5.update(input, 0, input.length);
      +634 
      +635         //get the output/ digest size and hash it
      +636         byte[] digest = new byte[md5.getDigestSize()];
      +637         md5.doFinal(digest, 0);
      +638 
      +639         return new String(Hex.encode(digest));
      +640     }
      +641 
      +642     private String sha1Hash(String input){
      +643         return sha1Hash(input.getBytes());
      +644     }
      +645 
      +646     private String sha1Hash(File input){
      +647         try {
      +648             return sha1Hash(FileUtils.readFileToByteArray(input));
      +649         } catch (IOException e) {
      +650             // TODO Auto-generated catch block
      +651             e.printStackTrace();
      +652         }
      +653 
      +654         return null;
      +655     }
      +656 
      +657     private String sha1Hash(byte[] input){
      +658         try
      +659         {
      +660             //prepare the input
      +661             MessageDigest hash = MessageDigest.getInstance(digest);
      +662             hash.update(input);
      +663 
      +664             //proceed ....
      +665             byte[] digest = hash.digest();
      +666 
      +667             return new String(Hex.encode(digest));
      +668         }
      +669         catch (NoSuchAlgorithmException e)
      +670         {
      +671             System.err.println("No such algorithm");
      +672             e.printStackTrace();
      +673         }
      +674 
      +675         return null;
      +676     }
      +677 
      +678     private void addTo(ArArchiveOutputStream pOutput, String pName, String pContent) throws IOException {
      +679         final byte[] content = pContent.getBytes();
      +680         ArArchiveEntry archiveEntry = createArArchiveEntry(pName, content.length);
      +681 
      +682         pOutput.putArchiveEntry(archiveEntry);
      +683         pOutput.write(content);
      +684         pOutput.closeArchiveEntry();
      +685     }
      +686 
      +687     private void addTo(ArArchiveOutputStream pOutput, String pName, File pContent) throws IOException {
      +688         ArArchiveEntry archiveEntry = createArArchiveEntry(pName, pContent.length());
      +689 
      +690         pOutput.putArchiveEntry(archiveEntry);
      +691 		try (InputStream input = new FileInputStream(pContent)) {
      +692             Utils.copy(input, pOutput);
      +693         }
      +694 
      +695         pOutput.closeArchiveEntry();
      +696     }
      +697 
      +698     private void addTo(final PGPSignatureOutputStream pOutput, final String pContent) throws IOException {
      +699         final byte[] content = pContent.getBytes();
      +700         pOutput.write(content);
      +701     }
      +702 
      +703     private void addTo(final PGPSignatureOutputStream pOutput, final File pContent) throws IOException {
      +704         try (InputStream input = new FileInputStream(pContent)) {
      +705             Utils.copy(input, pOutput);
      +706         }
      +707     }
      +708 
      +709     public void setOpenReplaceToken(String openReplaceToken) {
      +710         this.openReplaceToken = openReplaceToken;
      +711     }
      +712 
      +713     public void setCloseReplaceToken(String closeReplaceToken) {
      +714         this.closeReplaceToken = closeReplaceToken;
      +715     }
      +716 
      +717     private ArArchiveEntry createArArchiveEntry(String pName, long contentLength) {
      +718         if (outputTimestampMs != null) {
      +719             return new ArArchiveEntry(pName, contentLength, 0, 0, DEFAULT_MODE, outputTimestampMs / TimeUnit.SECONDS.toMillis(1));
      +720         }
      +721 
      +722         return new ArArchiveEntry(pName, contentLength);
      +723     }
      +724 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/PackagingException.html b/release/1.10/xref/org/vafer/jdeb/PackagingException.html new file mode 100644 index 000000000..94e423056 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/PackagingException.html @@ -0,0 +1,54 @@ + + + +PackagingException xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb;
      +17  
      +18  /**
      +19   * Something went wrong while building the package
      +20   */
      +21  public final class PackagingException extends Exception {
      +22  
      +23      private static final long serialVersionUID = 1L;
      +24  
      +25      public PackagingException() {
      +26          super();
      +27      }
      +28  
      +29      public PackagingException( String message, Throwable cause ) {
      +30          super(message, cause);
      +31      }
      +32  
      +33      public PackagingException( String message ) {
      +34          super(message);
      +35      }
      +36  
      +37      public PackagingException( Throwable cause ) {
      +38          super(cause);
      +39      }
      +40  
      +41  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/TarOptions.html b/release/1.10/xref/org/vafer/jdeb/TarOptions.html new file mode 100644 index 000000000..92f3a8708 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/TarOptions.html @@ -0,0 +1,67 @@ + + + +TarOptions xref + + + +
      +1   package org.vafer.jdeb;
      +2   
      +3   import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
      +4   
      +5   public class TarOptions {
      +6   
      +7       private Compression compression = Compression.GZIP;
      +8       private int longFileMode = TarArchiveOutputStream.LONGFILE_GNU;
      +9       private int bigNumberMode = TarArchiveOutputStream.BIGNUMBER_STAR;
      +10  
      +11      public TarOptions compression(Compression compression) {
      +12          this.compression = compression;
      +13  
      +14          return this;
      +15      }
      +16  
      +17      public TarOptions longFileMode(String input) {
      +18          if ("posix".equals(input)) {
      +19              longFileMode = TarArchiveOutputStream.LONGFILE_POSIX;
      +20          } else if ("error".equals(input)) {
      +21              longFileMode = TarArchiveOutputStream.LONGFILE_ERROR;
      +22          } else if ("truncate".equals(input)) {
      +23              longFileMode = TarArchiveOutputStream.LONGFILE_TRUNCATE;
      +24          } else {
      +25              longFileMode = TarArchiveOutputStream.LONGFILE_GNU;
      +26          }
      +27  
      +28          return this;
      +29      }
      +30  
      +31      public TarOptions bigNumberMode(String input) {
      +32          if ("error".equals(input)) {
      +33              bigNumberMode = TarArchiveOutputStream.BIGNUMBER_ERROR;
      +34          } else if ("posix".equals(input)) {
      +35              bigNumberMode = TarArchiveOutputStream.BIGNUMBER_POSIX;
      +36          } else {
      +37              bigNumberMode = TarArchiveOutputStream.BIGNUMBER_STAR;
      +38          }
      +39  
      +40          return this;
      +41      }
      +42  
      +43      public int longFileMode() {
      +44          return longFileMode;
      +45      }
      +46  
      +47      public int bigNumberMode() {
      +48          return bigNumberMode;
      +49      }
      +50  
      +51      public Compression compression() {
      +52          return compression;
      +53      }
      +54  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/Data.html b/release/1.10/xref/org/vafer/jdeb/ant/Data.html new file mode 100644 index 000000000..6fc35fd07 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/Data.html @@ -0,0 +1,141 @@ + + + +Data xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.ant;
      +17  
      +18  import java.io.File;
      +19  import java.io.FileNotFoundException;
      +20  import java.io.IOException;
      +21  import java.util.ArrayList;
      +22  import java.util.Collection;
      +23  import java.util.Iterator;
      +24  
      +25  import org.apache.tools.ant.types.PatternSet;
      +26  import org.vafer.jdeb.DataConsumer;
      +27  import org.vafer.jdeb.DataProducer;
      +28  import org.vafer.jdeb.producers.DataProducerArchive;
      +29  import org.vafer.jdeb.producers.DataProducerDirectory;
      +30  import org.vafer.jdeb.producers.DataProducerFile;
      +31  
      +32  import static org.vafer.jdeb.ant.MissingSourceBehavior.*;
      +33  
      +34  /**
      +35   * Ant "data" element acting as a factory for DataProducers.
      +36   * So far Archive and Directory producers are supported.
      +37   * Both support the usual ant pattern set matching.
      +38   */
      +39  public final class Data extends PatternSet implements DataProducer {
      +40  
      +41      private final Collection<Mapper> mapperWrapper = new ArrayList<>();
      +42  
      +43      private File src;
      +44  
      +45      private String type;
      +46  
      +47      private Boolean conffile;
      +48  
      +49      private String destinationName;
      +50  
      +51      private MissingSourceBehavior missingSrc = FAIL;
      +52  
      +53      public void setSrc(File src) {
      +54          this.src = src;
      +55      }
      +56  
      +57      public String getType() {
      +58          return type;
      +59      }
      +60  
      +61      public void setType(String type) {
      +62          this.type = type;
      +63      }
      +64  
      +65      public void setConffile(Boolean conffile) {
      +66          this.conffile = conffile;
      +67      }
      +68  
      +69      public Boolean getConffile() {
      +70          return this.conffile;
      +71      }
      +72  
      +73      public void setDst(String destinationName) {
      +74          this.destinationName = destinationName;
      +75      }
      +76  
      +77      public void addMapper(Mapper mapper) {
      +78          mapperWrapper.add(mapper);
      +79      }
      +80  
      +81  
      +82      public void setMissingSrc( String missingSrc ) {
      +83          this.missingSrc = MissingSourceBehavior.valueOf(missingSrc.trim().toUpperCase());
      +84      }
      +85  
      +86      public void produce( final DataConsumer pReceiver ) throws IOException {
      +87  
      +88          if (src == null || !src.exists()) {
      +89              if (missingSrc == IGNORE) {
      +90                  return;
      +91              } else {
      +92                  throw new FileNotFoundException("Data source not found : " + src);
      +93              }
      +94          }
      +95  
      +96          org.vafer.jdeb.mapping.Mapper[] mappers = new org.vafer.jdeb.mapping.Mapper[mapperWrapper.size()];
      +97          final Iterator<Mapper> it = mapperWrapper.iterator();
      +98          for (int i = 0; i < mappers.length; i++) {
      +99              mappers[i] = it.next().createMapper();
      +100         }
      +101 
      +102         if ("file".equalsIgnoreCase(type)) {
      +103             new DataProducerFile(
      +104                 src,
      +105                 destinationName,
      +106                 getIncludePatterns(getProject()),
      +107                 getExcludePatterns(getProject()),
      +108                 mappers
      +109             ).produce(pReceiver);
      +110 
      +111         } else if ("archive".equalsIgnoreCase(type)) {
      +112             new DataProducerArchive(
      +113                 src,
      +114                 getIncludePatterns(getProject()),
      +115                 getExcludePatterns(getProject()),
      +116                 mappers
      +117             ).produce(pReceiver);
      +118 
      +119         } else if ("directory".equalsIgnoreCase(type)) {
      +120             new DataProducerDirectory(
      +121                 src,
      +122                 getIncludePatterns(getProject()),
      +123                 getExcludePatterns(getProject()),
      +124                 mappers
      +125             ).produce(pReceiver);
      +126         }
      +127     }
      +128 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/DebAntTask.html b/release/1.10/xref/org/vafer/jdeb/ant/DebAntTask.html new file mode 100644 index 000000000..45b001c94 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/DebAntTask.html @@ -0,0 +1,203 @@ + + + +DebAntTask xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.ant;
      +18  
      +19  import java.io.File;
      +20  import java.util.ArrayList;
      +21  import java.util.Arrays;
      +22  import java.util.Collection;
      +23  
      +24  import org.apache.tools.ant.BuildException;
      +25  import org.apache.tools.ant.Project;
      +26  import org.apache.tools.ant.taskdefs.MatchingTask;
      +27  import org.apache.tools.ant.taskdefs.Tar;
      +28  import org.apache.tools.ant.types.FileSet;
      +29  import org.vafer.jdeb.Console;
      +30  import org.vafer.jdeb.DataProducer;
      +31  import org.vafer.jdeb.DebMaker;
      +32  import org.vafer.jdeb.PackagingException;
      +33  import org.vafer.jdeb.producers.DataProducerFileSet;
      +34  import org.vafer.jdeb.utils.OutputTimestampResolver;
      +35  
      +36  /**
      +37   * AntTask for creating debian archives.
      +38   */
      +39  public class DebAntTask extends MatchingTask {
      +40  
      +41      /** The Debian package produced */
      +42      private File deb;
      +43  
      +44      /** The directory containing the control files to build the package */
      +45      private File control;
      +46  
      +47      /** The file containing the PGP keys */
      +48      private File keyring;
      +49  
      +50      /** The key to use in the keyring */
      +51      private String key;
      +52  
      +53      /** The passphrase for the key to sign the changes file */
      +54      private String passphrase;
      +55  
      +56      /** The file to read the changes from */
      +57      private File changesIn;
      +58  
      +59      /** The file where to write the changes to */
      +60      private File changesOut;
      +61  
      +62      /** The file where to write the changes of the changes input to */
      +63      private File changesSave;
      +64  
      +65      /** The compression method used for the data file (none, gzip, bzip2 or xz) */
      +66      private String compression = "gzip";
      +67  
      +68      /**
      +69       * The digest algorithm to use.
      +70       *
      +71       * @see org.bouncycastle.bcpg.HashAlgorithmTags
      +72       */
      +73      private String digest = "SHA256";
      +74  
      +75      /** Trigger the verbose mode detailing all operations */
      +76      private boolean verbose;
      +77  
      +78      private Collection<Link> links = new ArrayList<>();
      +79  
      +80      private Collection<DataProducer> dataProducers = new ArrayList<>();
      +81      private Collection<DataProducer> conffilesProducers = new ArrayList<>();
      +82  
      +83  
      +84      public void setDestfile( File deb ) {
      +85          this.deb = deb;
      +86      }
      +87  
      +88      public void setControl( File control ) {
      +89          this.control = control;
      +90      }
      +91  
      +92      public void setChangesIn( File changes ) {
      +93          this.changesIn = changes;
      +94      }
      +95  
      +96      public void setChangesOut( File changes ) {
      +97          this.changesOut = changes;
      +98      }
      +99  
      +100     public void setChangesSave( File changes ) {
      +101         this.changesSave = changes;
      +102     }
      +103 
      +104     public void setKeyring( File keyring ) {
      +105         this.keyring = keyring;
      +106     }
      +107 
      +108     public void setKey( String key ) {
      +109         this.key = key;
      +110     }
      +111 
      +112     public void setPassphrase( String passphrase ) {
      +113         this.passphrase = passphrase;
      +114     }
      +115 
      +116     public void setCompression( String compression ) {
      +117         this.compression = compression;
      +118     }
      +119 
      +120     public void setVerbose( boolean verbose ) {
      +121         this.verbose = verbose;
      +122     }
      +123 
      +124     public void addFileSet( FileSet fileset ) {
      +125         dataProducers.add(new DataProducerFileSet(fileset));
      +126     }
      +127 
      +128     public void addTarFileSet( Tar.TarFileSet fileset ) {
      +129         dataProducers.add(new DataProducerFileSet(fileset));
      +130     }
      +131 
      +132     public void addData( Data data ) {
      +133         dataProducers.add(data);
      +134     }
      +135 
      +136     public void addLink( Link link ) {
      +137         links.add(link);
      +138     }
      +139 
      +140     public void setDigest(String digest) {
      +141         this.digest = digest;
      +142     }
      +143 
      +144     public void execute() {
      +145         // add the data producers for the links
      +146         for (Link link : links) {
      +147             dataProducers.add(link.toDataProducer());
      +148         }
      +149 
      +150         // validate the type of the <data> elements
      +151         for (DataProducer dataProducer : dataProducers) {
      +152             if (dataProducer instanceof Data) {
      +153                 Data data = (Data) dataProducer;
      +154                 if (data.getType() == null) {
      +155                     throw new BuildException("The type of the data element wasn't specified (expected 'file', 'directory' or 'archive')");
      +156                 } else if (!Arrays.asList("file", "directory", "archive").contains(data.getType().toLowerCase())) {
      +157                     throw new BuildException("The type '" + data.getType() + "' of the data element is unknown (expected 'file', 'directory' or 'archive')");
      +158                 }
      +159                 if (data.getConffile() != null && data.getConffile()) {
      +160                     conffilesProducers.add(dataProducer);
      +161                 }
      +162             }
      +163         }
      +164 
      +165         Console console = new TaskConsole(this, verbose);
      +166 
      +167         DebMaker debMaker = new DebMaker(console, dataProducers, conffilesProducers);
      +168         debMaker.setDeb(deb);
      +169         debMaker.setControl(control);
      +170         debMaker.setChangesIn(changesIn);
      +171         debMaker.setChangesOut(changesOut);
      +172         debMaker.setChangesSave(changesSave);
      +173         debMaker.setKeyring(keyring);
      +174         debMaker.setKey(key);
      +175         debMaker.setPassphrase(passphrase);
      +176         debMaker.setCompression(compression);
      +177         debMaker.setDigest(digest);
      +178         Long outputTimestampMs = new OutputTimestampResolver(console).resolveOutputTimestamp(null);
      +179         debMaker.setOutputTimestampMs(outputTimestampMs);
      +180 
      +181         try {
      +182             debMaker.validate();
      +183             debMaker.makeDeb();
      +184 
      +185         } catch (PackagingException e) {
      +186             log("Failed to create the Debian package " + deb, e, Project.MSG_ERR);
      +187             throw new BuildException("Failed to create the Debian package " + deb, e);
      +188         }
      +189     }
      +190 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/Link.html b/release/1.10/xref/org/vafer/jdeb/ant/Link.html new file mode 100644 index 000000000..227e5f55c --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/Link.html @@ -0,0 +1,119 @@ + + + +Link xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.ant;
      +18  
      +19  import org.apache.commons.compress.archivers.zip.UnixStat;
      +20  import org.vafer.jdeb.DataProducer;
      +21  import org.vafer.jdeb.mapping.PermMapper;
      +22  import org.vafer.jdeb.producers.DataProducerLink;
      +23  
      +24  /**
      +25   * Defines a symbolic or hard link.
      +26   */
      +27  public final class Link {
      +28  
      +29      private String name;
      +30      private String target;
      +31      private boolean symbolic = true;
      +32      private String username = "root";
      +33      private String group = "root";
      +34      private int uid = 0;
      +35      private int gid = 0;
      +36      private int mode = UnixStat.LINK_FLAG | UnixStat.DEFAULT_LINK_PERM;
      +37  
      +38      DataProducer toDataProducer() {
      +39          org.vafer.jdeb.mapping.Mapper mapper = new PermMapper(uid, gid, username, group, mode, mode, 0, null);
      +40          return new DataProducerLink(name, target, symbolic, null, null, new org.vafer.jdeb.mapping.Mapper[]{mapper});
      +41      }
      +42  
      +43      public String getName() {
      +44          return name;
      +45      }
      +46  
      +47      public void setName(String name) {
      +48          this.name = name;
      +49      }
      +50  
      +51      public String getTarget() {
      +52          return target;
      +53      }
      +54  
      +55      public void setTarget(String target) {
      +56          this.target = target;
      +57      }
      +58  
      +59      public boolean isSymbolic() {
      +60          return symbolic;
      +61      }
      +62  
      +63      public void setSymbolic(boolean symbolic) {
      +64          this.symbolic = symbolic;
      +65      }
      +66  
      +67      public String getUsername() {
      +68          return username;
      +69      }
      +70  
      +71      public void setUsername(String username) {
      +72          this.username = username;
      +73      }
      +74  
      +75      public String getGroup() {
      +76          return group;
      +77      }
      +78  
      +79      public void setGroup(String group) {
      +80          this.group = group;
      +81      }
      +82  
      +83      public int getUid() {
      +84          return uid;
      +85      }
      +86  
      +87      public void setUid(int uid) {
      +88          this.uid = uid;
      +89      }
      +90  
      +91      public int getGid() {
      +92          return gid;
      +93      }
      +94  
      +95      public void setGid(int gid) {
      +96          this.gid = gid;
      +97      }
      +98  
      +99      public int getMode() {
      +100         return mode;
      +101     }
      +102 
      +103     public void setMode(String mode) {
      +104         this.mode = UnixStat.LINK_FLAG | Integer.parseInt(mode, 8);
      +105     }
      +106 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/Mapper.html b/release/1.10/xref/org/vafer/jdeb/ant/Mapper.html new file mode 100644 index 000000000..2b84f8f20 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/Mapper.html @@ -0,0 +1,115 @@ + + + +Mapper xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.ant;
      +17  
      +18  import java.io.File;
      +19  import java.io.FileInputStream;
      +20  import java.io.IOException;
      +21  
      +22  import org.vafer.jdeb.mapping.LsMapper;
      +23  import org.vafer.jdeb.mapping.PermMapper;
      +24  
      +25  /**
      +26   * Ant "mapper" element acting as factory for the entry mapper.
      +27   * Supported types: ls, perm
      +28   */
      +29  public final class Mapper {
      +30  
      +31      private String mapperType = "perm";
      +32      private File src;
      +33  
      +34      private String prefix;
      +35      private int strip;
      +36      private int uid = -1;
      +37      private int gid = -1;
      +38      private String user;
      +39      private String group;
      +40      private String fileMode;
      +41      private String dirMode;
      +42  
      +43      public void setType( final String pType ) {
      +44          mapperType = pType;
      +45      }
      +46  
      +47      public void setSrc( final File pSrc ) {
      +48          src = pSrc;
      +49      }
      +50  
      +51  
      +52      public void setPrefix( final String pPrefix ) {
      +53          prefix = pPrefix;
      +54      }
      +55  
      +56      public void setStrip( final int pStrip ) {
      +57          strip = pStrip;
      +58      }
      +59  
      +60  
      +61      public void setUid( final int pUid ) {
      +62          uid = pUid;
      +63      }
      +64  
      +65      public void setGid( final int pGid ) {
      +66          gid = pGid;
      +67      }
      +68  
      +69      public void setUser( final String pUser ) {
      +70          user = pUser;
      +71      }
      +72  
      +73      public void setGroup( final String pGroup ) {
      +74          group = pGroup;
      +75      }
      +76  
      +77      public void setFileMode( final String pFileMode ) {
      +78          fileMode = pFileMode;
      +79      }
      +80  
      +81      public void setDirMode( final String pDirMode ) {
      +82          dirMode = pDirMode;
      +83      }
      +84  
      +85      public org.vafer.jdeb.mapping.Mapper createMapper() throws IOException {
      +86  
      +87          if ("perm".equalsIgnoreCase(mapperType)) {
      +88              return new PermMapper(uid, gid, user, group, fileMode, dirMode, strip, prefix);
      +89          }
      +90  
      +91          if ("ls".equalsIgnoreCase(mapperType)) {
      +92              try {
      +93                  return new LsMapper(new FileInputStream(src));
      +94              } catch (Exception e) {
      +95                  e.printStackTrace();
      +96              }
      +97          }
      +98  
      +99          throw new IOException("Unknown mapper type '" + mapperType + "'");
      +100     }
      +101 
      +102 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/MissingSourceBehavior.html b/release/1.10/xref/org/vafer/jdeb/ant/MissingSourceBehavior.html new file mode 100644 index 000000000..45f81e911 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/MissingSourceBehavior.html @@ -0,0 +1,34 @@ + + + +MissingSourceBehavior xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.ant;
      +18  
      +19  public enum MissingSourceBehavior {
      +20      IGNORE, FAIL
      +21  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/TaskConsole.html b/release/1.10/xref/org/vafer/jdeb/ant/TaskConsole.html new file mode 100644 index 000000000..e17e28cda --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/TaskConsole.html @@ -0,0 +1,64 @@ + + + +TaskConsole xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.ant;
      +18  
      +19  import org.apache.tools.ant.Project;
      +20  import org.apache.tools.ant.Task;
      +21  import org.vafer.jdeb.Console;
      +22  
      +23  /**
      +24   * Console implementation for Ant tasks. debug messages are only displayed
      +25   * when the <tt>verbose</tt> parameter is true.
      +26   */
      +27  class TaskConsole implements Console {
      +28  
      +29      private final Task task;
      +30      private final boolean verbose;
      +31  
      +32      public TaskConsole(Task task, boolean verbose) {
      +33          this.task = task;
      +34          this.verbose = verbose;
      +35      }
      +36  
      +37      public void debug(String message) {
      +38          if (verbose) {
      +39              task.log(message);
      +40          }
      +41      }
      +42  
      +43      public void info(String message) {
      +44          task.log(message);
      +45      }
      +46  
      +47      public void warn(String message) {
      +48          task.log(message, Project.MSG_WARN);
      +49      }
      +50  
      +51  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/ant/package-frame.html b/release/1.10/xref/org/vafer/jdeb/ant/package-frame.html new file mode 100644 index 000000000..d564bb030 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/package-frame.html @@ -0,0 +1,36 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.ant + + + +

      org.vafer.jdeb.ant

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/ant/package-summary.html b/release/1.10/xref/org/vafer/jdeb/ant/package-summary.html new file mode 100644 index 000000000..70432e4bb --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/ant/package-summary.html @@ -0,0 +1,132 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.ant + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.ant

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/changes/ChangeSet.html b/release/1.10/xref/org/vafer/jdeb/changes/ChangeSet.html new file mode 100644 index 000000000..7a36884a4 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/changes/ChangeSet.html @@ -0,0 +1,117 @@ + + + +ChangeSet xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.changes;
      +18  
      +19  import java.util.Date;
      +20  
      +21  /**
      +22   * A ChangeSet basically reflect a release as defined in the changes file.
      +23   *
      +24   * <pre>
      +25   * package (version) distribution(s); urgency=urgency
      +26   *        [optional blank line(s), stripped]
      +27   *   * change details
      +28   *     more change details
      +29   *        [blank line(s), included in output of dpkg-parsechangelog]
      +30   *   * even more change details
      +31   *        [optional blank line(s), stripped]
      +32   *  -- maintainer name &lt;email address&gt;[two spaces]  date
      +33   * </pre>
      +34   *
      +35   * @see <a href="http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog">Debian Policy Manual - Debian changelog</a>
      +36   */
      +37  public final class ChangeSet {
      +38  
      +39      private final String packageName;
      +40      private final String version;
      +41      private final Date date;
      +42      private final String distribution;
      +43      private final String urgency;
      +44      private final String changedBy;
      +45      private final String[] changes;
      +46  
      +47      public ChangeSet(String packageName, String version, Date date, String distribution, String urgency, String changedBy, String[] changes) {
      +48          this.packageName = packageName;
      +49          this.version = version;
      +50          this.date = date;
      +51          this.distribution = distribution;
      +52          this.urgency = urgency;
      +53          this.changedBy = changedBy;
      +54          this.changes = changes;
      +55      }
      +56  
      +57      public String getPackage() {
      +58          return packageName;
      +59      }
      +60  
      +61      public String getVersion() {
      +62          return version;
      +63      }
      +64  
      +65      public Date getDate() {
      +66          return date;
      +67      }
      +68  
      +69      public String getDistribution() {
      +70          return distribution;
      +71      }
      +72  
      +73      public String getUrgency() {
      +74          return urgency;
      +75      }
      +76  
      +77      public String getChangedBy() {
      +78          return changedBy;
      +79      }
      +80  
      +81      public String[] getChanges() {
      +82          return changes;
      +83      }
      +84  
      +85      public String toString() {
      +86          StringBuilder sb = new StringBuilder();
      +87  
      +88          sb.append(getTitle()).append('\n');
      +89  
      +90          if (changes.length > 0) {
      +91              sb.append("\n");
      +92          }
      +93  
      +94          for (String change : changes) {
      +95              sb.append("  * ").append(change).append('\n');
      +96          }
      +97  
      +98          return sb.toString();
      +99      }
      +100 
      +101     private String getTitle() {
      +102         return getPackage() + " (" + getVersion() + ") " + getDistribution() + "; urgency=" + getUrgency();
      +103     }
      +104 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/changes/ChangesProvider.html b/release/1.10/xref/org/vafer/jdeb/changes/ChangesProvider.html new file mode 100644 index 000000000..888b4b918 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/changes/ChangesProvider.html @@ -0,0 +1,35 @@ + + + +ChangesProvider xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.changes;
      +17  
      +18  public interface ChangesProvider {
      +19  
      +20      ChangeSet[] getChangesSets();
      +21  
      +22  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/changes/TextfileChangesProvider.html b/release/1.10/xref/org/vafer/jdeb/changes/TextfileChangesProvider.html new file mode 100644 index 000000000..d15da9cc6 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/changes/TextfileChangesProvider.html @@ -0,0 +1,155 @@ + + + +TextfileChangesProvider xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.changes;
      +18  
      +19  import java.io.BufferedReader;
      +20  import java.io.BufferedWriter;
      +21  import java.io.IOException;
      +22  import java.io.InputStream;
      +23  import java.io.InputStreamReader;
      +24  import java.io.OutputStream;
      +25  import java.io.OutputStreamWriter;
      +26  import java.text.DateFormat;
      +27  import java.text.ParseException;
      +28  import java.text.SimpleDateFormat;
      +29  import java.util.ArrayList;
      +30  import java.util.Collection;
      +31  import java.util.Date;
      +32  
      +33  import org.vafer.jdeb.debian.BinaryPackageControlFile;
      +34  
      +35  /**
      +36   * Gets the changes from a changes file. The first entry are the current changes.
      +37   * The release line will be added. Example:
      +38   *
      +39   * release date=22:13 19.08.2007,version=1.5+r90114,urgency=low,by=Torsten Curdt &lt;torsten@vafer.org&gt;
      +40   *   * debian changes support
      +41   * release date=20:13 17.08.2007,version=1.4+r89114,urgency=low,by=Torsten Curdt &lt;torsten@vafer.org&gt;
      +42   *   * debian changes support
      +43   *
      +44   */
      +45  public final class TextfileChangesProvider implements ChangesProvider {
      +46  
      +47      private final ChangeSet[] changeSets;
      +48  
      +49      private DateFormat fmt = new SimpleDateFormat("HH:mm dd.MM.yyyy");
      +50  
      +51      public TextfileChangesProvider( final InputStream pInput, final BinaryPackageControlFile packageControlFile ) throws IOException, ParseException {
      +52  
      +53          final BufferedReader reader = new BufferedReader(new InputStreamReader(pInput));
      +54  
      +55          String packageName = packageControlFile.get("Package");
      +56          String version = packageControlFile.get("Version");
      +57          Date date = new Date();
      +58          String distribution = packageControlFile.get("Distribution");
      +59          String urgency = packageControlFile.get("Urgency");
      +60          String changedBy = packageControlFile.get("Maintainer");
      +61          Collection<String> changesColl = new ArrayList<>();
      +62          Collection<ChangeSet> changeSetColl = new ArrayList<>();
      +63  
      +64  
      +65          while (true) {
      +66              final String line = reader.readLine();
      +67              if (line == null) {
      +68                  final String[] changes = changesColl.toArray(new String[changesColl.size()]);
      +69                  final ChangeSet changeSet = new ChangeSet(packageName, version, date, distribution, urgency, changedBy, changes);
      +70                  changeSetColl.add(changeSet);
      +71                  break;
      +72              }
      +73  
      +74              if (line.startsWith("release ")) {
      +75  
      +76                  if (changesColl.size() > 0) {
      +77                      final String[] changes = changesColl.toArray(new String[changesColl.size()]);
      +78                      final ChangeSet changeSet = new ChangeSet(packageName, version, date, distribution, urgency, changedBy, changes);
      +79                      changeSetColl.add(changeSet);
      +80                      changesColl.clear();
      +81                  }
      +82  
      +83                  final String[] tokens = line.substring("release ".length()).split(",");
      +84                  for (String token : tokens) {
      +85                      final String[] lr = token.trim().split("=");
      +86                      final String key = lr[0];
      +87                      final String value = lr[1];
      +88  
      +89                      if ("urgency".equals(key)) {
      +90                          urgency = value;
      +91                      } else if ("by".equals(key)) {
      +92                          changedBy = value;
      +93                      } else if ("date".equals(key)) {
      +94                          date = fmt.parse(value);
      +95                      } else if ("version".equals(key)) {
      +96                          version = value;
      +97                      } else if ("distribution".equals(key)) {
      +98                          distribution = value;
      +99                      }
      +100                 }
      +101                 continue;
      +102             }
      +103 
      +104             if (line.startsWith(" * ")) {
      +105                 changesColl.add(line.substring(" * ".length()));
      +106                 continue;
      +107             }
      +108 
      +109             throw new ParseException("Unknown line syntax [" + line + "]", 0);
      +110         }
      +111 
      +112         reader.close();
      +113 
      +114         changeSets = changeSetColl.toArray(new ChangeSet[changeSetColl.size()]);
      +115     }
      +116 
      +117     public void save(OutputStream pOutput) throws IOException {
      +118         BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(pOutput));
      +119 
      +120         for (ChangeSet changeSet : changeSets) {
      +121             writer.write("release ");
      +122             writer.write("date=" + fmt.format(changeSet.getDate()) + ",");
      +123             writer.write("version=" + changeSet.getVersion() + ",");
      +124             writer.write("urgency=" + changeSet.getUrgency() + ",");
      +125             writer.write("by=" + changeSet.getChangedBy() + ",");
      +126             writer.write("distribution=" + changeSet.getDistribution());
      +127             writer.write("\n");
      +128 
      +129             for (String change : changeSet.getChanges()) {
      +130                 writer.write(" * ");
      +131                 writer.write(change);
      +132                 writer.write("\n");
      +133             }
      +134         }
      +135 
      +136         writer.close();
      +137     }
      +138 
      +139     public ChangeSet[] getChangesSets() {
      +140         return changeSets;
      +141     }
      +142 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/changes/package-frame.html b/release/1.10/xref/org/vafer/jdeb/changes/package-frame.html new file mode 100644 index 000000000..b95d2a36c --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/changes/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.changes + + + +

      org.vafer.jdeb.changes

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/changes/package-summary.html b/release/1.10/xref/org/vafer/jdeb/changes/package-summary.html new file mode 100644 index 000000000..1267cfdfa --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/changes/package-summary.html @@ -0,0 +1,117 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.changes + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.changes

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/debian/BinaryPackageControlFile.html b/release/1.10/xref/org/vafer/jdeb/debian/BinaryPackageControlFile.html new file mode 100644 index 000000000..1f0d4840b --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/debian/BinaryPackageControlFile.html @@ -0,0 +1,105 @@ + + + +BinaryPackageControlFile xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.debian;
      +18  
      +19  import java.io.IOException;
      +20  import java.io.InputStream;
      +21  import java.text.ParseException;
      +22  
      +23  /**
      +24   * Binary package control file.
      +25   *
      +26   * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-binarycontrolfiles">Debian Policy Manual - Binary package control files</a>
      +27   */
      +28  public final class BinaryPackageControlFile extends ControlFile {
      +29  
      +30      private static final ControlField[] FIELDS = {
      +31              new ControlField("Package", true),
      +32              new ControlField("Source"),
      +33              new ControlField("Version", true),
      +34              new ControlField("Section", true),
      +35              new ControlField("Priority", true),
      +36              new ControlField("Architecture", true),
      +37              new ControlField("Essential"),
      +38              new ControlField("Depends"),
      +39              new ControlField("Pre-Depends"),
      +40              new ControlField("Recommends"),
      +41              new ControlField("Suggests"),
      +42              new ControlField("Breaks"),
      +43              new ControlField("Enhances"),
      +44              new ControlField("Conflicts"),
      +45              new ControlField("Provides"),
      +46              new ControlField("Replaces"),
      +47              new ControlField("Installed-Size"),
      +48              new ControlField("Maintainer", true),
      +49              new ControlField("Description", true, ControlField.Type.MULTILINE),
      +50              new ControlField("Homepage"),
      +51              new ControlField("Multi-Arch")
      +52      };
      +53  
      +54      public BinaryPackageControlFile() {
      +55          set("Architecture", "all");
      +56          set("Priority", "optional");
      +57      }
      +58  
      +59      public BinaryPackageControlFile(String input) throws IOException, ParseException {
      +60          parse(input);
      +61      }
      +62  
      +63      public BinaryPackageControlFile(InputStream input) throws IOException, ParseException {
      +64          parse(input);
      +65      }
      +66  
      +67      public void set(final String field, final String value) {
      +68          super.set(field, value);
      +69      }
      +70  
      +71      protected ControlField[] getFields() {
      +72          return FIELDS;
      +73      }
      +74  
      +75      /**
      +76       * Returns the short description of the package. The short description
      +77       * consists in the first line of the Description field.
      +78       *
      +79       * @return
      +80       */
      +81      public String getShortDescription() {
      +82          if (get("Description") == null) {
      +83              return null;
      +84          }
      +85  
      +86          return get("Description").split("\n")[0];
      +87      }
      +88  
      +89      protected char getUserDefinedFieldLetter() {
      +90          return 'B';
      +91      }
      +92  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/debian/ChangesFile.html b/release/1.10/xref/org/vafer/jdeb/debian/ChangesFile.html new file mode 100644 index 000000000..48b93d972 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/debian/ChangesFile.html @@ -0,0 +1,128 @@ + + + +ChangesFile xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.debian;
      +18  
      +19  import org.vafer.jdeb.utils.Utils;
      +20  import org.vafer.jdeb.changes.ChangeSet;
      +21  
      +22  import java.text.DateFormat;
      +23  import java.text.SimpleDateFormat;
      +24  import java.util.Date;
      +25  import java.util.Locale;
      +26  import java.util.Map.Entry;
      +27  
      +28  /**
      +29   * Reflecting a changes file
      +30   *
      +31   * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-debianchangesfiles">Debian Policy Manual - Debian changes files</a>
      +32   */
      +33  public final class ChangesFile extends ControlFile {
      +34  
      +35      private static final ControlField[] FIELDS = {
      +36          new ControlField("Format", true),
      +37          new ControlField("Date", true),
      +38          new ControlField("Source", true),
      +39          new ControlField("Binary", true),
      +40          new ControlField("Architecture", true),
      +41          new ControlField("Version", true),
      +42          new ControlField("Distribution", true),
      +43          new ControlField("Urgency", true),
      +44          new ControlField("Maintainer", true),
      +45          new ControlField("Changed-By"),
      +46          new ControlField("Description", true, ControlField.Type.MULTILINE, true),
      +47          new ControlField("Changes", true, ControlField.Type.MULTILINE, true),
      +48          new ControlField("Closes"),
      +49          new ControlField("Checksums-Sha1", true, ControlField.Type.MULTILINE, true),
      +50          new ControlField("Checksums-Sha256", true, ControlField.Type.MULTILINE, true),
      +51          new ControlField("Files", true, ControlField.Type.MULTILINE, true)
      +52      };
      +53  
      +54      public ChangesFile() {
      +55          set("Format", "1.8");
      +56          set("Urgency", "low");
      +57          set("Distribution", "stable");
      +58      }
      +59  
      +60      /**
      +61       * Initializes the fields on the changes file with the values of the specified
      +62       * binary package control file.
      +63       *
      +64       * @param packageControlFile
      +65       */
      +66      public void initialize(BinaryPackageControlFile packageControlFile) {
      +67          set("Binary",       packageControlFile.get("Package"));
      +68          set("Source",       Utils.defaultString(packageControlFile.get("Source"), packageControlFile.get("Package")));
      +69          set("Architecture", packageControlFile.get("Architecture"));
      +70          set("Version",      packageControlFile.get("Version"));
      +71          set("Maintainer",   packageControlFile.get("Maintainer"));
      +72          set("Distribution", packageControlFile.get("Distribution"));
      +73  
      +74          for (Entry<String, String> entry : packageControlFile.getUserDefinedFields().entrySet()) {
      +75              set(entry.getKey(), entry.getValue());
      +76          }
      +77  
      +78          StringBuilder description = new StringBuilder();
      +79          description.append(packageControlFile.get("Package"));
      +80          if (packageControlFile.get("Description") != null) {
      +81              description.append(" - ");
      +82              description.append(packageControlFile.getShortDescription());
      +83          }
      +84          set("Description",  description.toString());
      +85      }
      +86  
      +87      public void setChanges(ChangeSet[] changeSets) {
      +88          StringBuilder sb = new StringBuilder();
      +89  
      +90          if (changeSets.length > 0) {
      +91              final ChangeSet mostRecentChangeSet = changeSets[0];
      +92              set("Urgency", mostRecentChangeSet.getUrgency());
      +93              set("Changed-By", mostRecentChangeSet.getChangedBy());
      +94  
      +95              for (ChangeSet changeSet : changeSets) {
      +96                  sb.append(changeSet.toString());
      +97              }
      +98          }
      +99  
      +100         set("Changes", sb.toString());
      +101     }
      +102 
      +103     protected ControlField[] getFields() {
      +104         return FIELDS;
      +105     }
      +106 
      +107     protected char getUserDefinedFieldLetter() {
      +108         return 'C';
      +109     }
      +110 
      +111     public static String formatDate(Date date) {
      +112         final DateFormat format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH); // RFC 2822 format
      +113         return format.format(date);
      +114     }
      +115 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/debian/ControlField.html b/release/1.10/xref/org/vafer/jdeb/debian/ControlField.html new file mode 100644 index 000000000..dff0ebfcd --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/debian/ControlField.html @@ -0,0 +1,141 @@ + + + +ControlField xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.debian;
      +18  
      +19  import java.io.BufferedReader;
      +20  import java.io.IOException;
      +21  import java.io.StringReader;
      +22  
      +23  /**
      +24   * A field of a control file. This class is immutable.
      +25   */
      +26  public class ControlField {
      +27  
      +28      /**
      +29       * The format of a field.
      +30       */
      +31      public enum Type {
      +32          /** Value on a single line */
      +33          SIMPLE,
      +34          /** Value on multiple lines, space characters are ignored */
      +35          FOLDED,
      +36          /** Value on multiple lines, space characters are preserved */
      +37          MULTILINE
      +38      }
      +39  
      +40      /** The name of the field */
      +41      private final String name;
      +42  
      +43      /** Tells if the field is mandatory */
      +44      private final boolean mandatory;
      +45  
      +46      /** The type of the field */
      +47      private final Type type;
      +48  
      +49      /** Tells is the first line of the field must be empty (for MULTILINE values only) */
      +50      private final boolean firstLineEmpty;
      +51  
      +52  
      +53      public ControlField(String name) {
      +54          this(name, false);
      +55      }
      +56  
      +57      public ControlField(String name, boolean mandatory) {
      +58          this(name, mandatory, Type.SIMPLE);
      +59      }
      +60  
      +61      public ControlField(String name, boolean mandatory, Type type) {
      +62          this(name, mandatory, type, false);
      +63      }
      +64  
      +65      public ControlField(String name, boolean mandatory, Type type, boolean firstLineEmpty) {
      +66          this.name = name;
      +67          this.mandatory = mandatory;
      +68          this.type = type;
      +69          this.firstLineEmpty = firstLineEmpty;
      +70      }
      +71  
      +72      public String getName() {
      +73          return name;
      +74      }
      +75  
      +76      public boolean isMandatory() {
      +77          return mandatory;
      +78      }
      +79  
      +80      public Type getType() {
      +81          return type;
      +82      }
      +83  
      +84      public boolean isFirstLineEmpty() {
      +85          return firstLineEmpty;
      +86      }
      +87  
      +88      /**
      +89       * Returns the field with the specified value properly formatted. Multiline
      +90       * values are automatically indented, and dots are added on the empty lines.
      +91       *
      +92       * <pre>
      +93       * Field-Name: value
      +94       * </pre>
      +95       */
      +96      public String format(String value) {
      +97          StringBuilder s = new StringBuilder();
      +98  
      +99          if (value != null && value.trim().length() > 0) {
      +100             boolean continuationLine = false;
      +101 
      +102             s.append(getName()).append(":");
      +103             if (isFirstLineEmpty()) {
      +104                 s.append("\n");
      +105                 continuationLine = true;
      +106             }
      +107 
      +108             try {
      +109                 BufferedReader reader = new BufferedReader(new StringReader(value));
      +110                 String line;
      +111                 while ((line = reader.readLine()) != null) {
      +112                     if (continuationLine && line.trim().length() == 0) {
      +113                         // put a dot on the empty continuation lines
      +114                         s.append(" .\n");
      +115                     } else {
      +116                         s.append(" ").append(line).append("\n");
      +117                     }
      +118 
      +119                     continuationLine = true;
      +120                 }
      +121             } catch (IOException e) {
      +122                 e.printStackTrace();
      +123             }
      +124         }
      +125 
      +126         return s.toString();
      +127     }
      +128 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/debian/ControlFile.html b/release/1.10/xref/org/vafer/jdeb/debian/ControlFile.html new file mode 100644 index 000000000..fe0eede59 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/debian/ControlFile.html @@ -0,0 +1,243 @@ + + + +ControlFile xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.debian;
      +18  
      +19  import java.io.BufferedReader;
      +20  import java.io.ByteArrayInputStream;
      +21  import java.io.IOException;
      +22  import java.io.InputStream;
      +23  import java.io.InputStreamReader;
      +24  import java.text.ParseException;
      +25  import java.util.ArrayList;
      +26  import java.util.Arrays;
      +27  import java.util.HashSet;
      +28  import java.util.LinkedHashMap;
      +29  import java.util.List;
      +30  import java.util.Map;
      +31  import java.util.Set;
      +32  
      +33  import static java.nio.charset.StandardCharsets.*;
      +34  
      +35  /**
      +36   * A control file as specified by the <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html">Debian policy</a>.
      +37   */
      +38  public abstract class ControlFile {
      +39  
      +40      protected final Map<String, String> values = new LinkedHashMap<>();
      +41      protected final Map<String, String> userDefinedFields = new LinkedHashMap<>();
      +42      protected final Set<ControlField> userDefinedFieldNames = new HashSet<>();
      +43  
      +44      public void parse(String input) throws IOException, ParseException {
      +45          parse(new ByteArrayInputStream(input.getBytes(UTF_8)));
      +46      }
      +47  
      +48      public void parse(InputStream input) throws IOException, ParseException {
      +49          BufferedReader reader = new BufferedReader(new InputStreamReader(input, UTF_8));
      +50          StringBuilder buffer = new StringBuilder();
      +51          String field = null;
      +52          int linenr = 0;
      +53          while (true) {
      +54              final String line = reader.readLine();
      +55  
      +56              if (line == null) {
      +57                  // flush value of the previous field
      +58                  set(field, buffer.toString());
      +59                  break;
      +60              }
      +61  
      +62              linenr++;
      +63  
      +64              if (line.length() == 0) {
      +65                  throw new ParseException("Empty line", linenr);
      +66              }
      +67  
      +68              final char first = line.charAt(0);
      +69              if (first == '#') {
      +70                  // ignore commented out lines
      +71                  continue;
      +72              }
      +73  
      +74              if (Character.isLetter(first)) {
      +75  
      +76                  // new field
      +77  
      +78                  // flush value of the previous field
      +79                  set(field, buffer.toString());
      +80                  buffer = new StringBuilder();
      +81  
      +82  
      +83                  final int i = line.indexOf(':');
      +84  
      +85                  if (i < 0) {
      +86                      throw new ParseException("Line misses ':' delimiter", linenr);
      +87                  }
      +88  
      +89                  field = line.substring(0, i);
      +90                  buffer.append(line.substring(i + 1).trim());
      +91  
      +92                  continue;
      +93              }
      +94  
      +95              // continuing old value, lines with only a dot are ignored
      +96              buffer.append('\n');
      +97              if (!".".equals(line.substring(1).trim())) {
      +98                  buffer.append(line.substring(1));
      +99              }
      +100         }
      +101         reader.close();
      +102 
      +103     }
      +104 
      +105     public void set(String field, final String value) {
      +106         if (field != null && isUserDefinedField(field)) {
      +107             userDefinedFields.put(field, value);
      +108             String fieldName = getUserDefinedFieldName(field);
      +109 
      +110             if (fieldName != null) {
      +111                 userDefinedFieldNames.add(new ControlField(fieldName));
      +112             }
      +113 
      +114             field = fieldName;
      +115         }
      +116 
      +117         if (field != null && !"".equals(field)) {
      +118             values.put(field, value);
      +119         }
      +120     }
      +121 
      +122     public String get(String field) {
      +123         return values.get(field);
      +124     }
      +125 
      +126     protected abstract ControlField[] getFields();
      +127 
      +128     protected Map<String, String> getUserDefinedFields() {
      +129         return userDefinedFields;
      +130     }
      +131 
      +132     protected Set<ControlField> getUserDefinedFieldNames() {
      +133         return userDefinedFieldNames;
      +134     }
      +135 
      +136     public List<String> getMandatoryFields() {
      +137         List<String> fields = new ArrayList<>();
      +138 
      +139         for (ControlField field : getFields()) {
      +140             if (field.isMandatory()) {
      +141                 fields.add(field.getName());
      +142             }
      +143         }
      +144 
      +145         return fields;
      +146     }
      +147 
      +148     public boolean isValid() {
      +149         return invalidFields().size() == 0;
      +150     }
      +151 
      +152     public Set<String> invalidFields() {
      +153         Set<String> invalid = new HashSet<>();
      +154 
      +155         for (ControlField field : getFields()) {
      +156             if (field.isMandatory() && get(field.getName()) == null) {
      +157                 invalid.add(field.getName());
      +158             }
      +159         }
      +160 
      +161         return invalid;
      +162     }
      +163 
      +164     public String toString(ControlField... fields) {
      +165         StringBuilder s = new StringBuilder();
      +166         for (ControlField field : fields) {
      +167             String value = values.get(field.getName());
      +168             s.append(field.format(value));
      +169         }
      +170         return s.toString();
      +171     }
      +172 
      +173     public String toString() {
      +174         List<ControlField> fields = new ArrayList<>();
      +175         fields.addAll(Arrays.asList(getFields()));
      +176         fields.addAll(getUserDefinedFieldNames());
      +177         return toString(fields.toArray(new ControlField[fields.size()]));
      +178     }
      +179 
      +180     /**
      +181      * Returns the letter expected in the prefix of a user defined field
      +182      * in order to include the field in this control file.
      +183      *
      +184      * @return The letter returned is:
      +185      * <ul>
      +186      *   <li>B: for a binary package</li>
      +187      *   <li>S: for a source package</li>
      +188      *   <li>C: for a changes file</li>
      +189      * </ul>
      +190      *
      +191      * @since 1.1
      +192      * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7">Debian Policy - User-defined fields</a>
      +193      */
      +194     protected abstract char getUserDefinedFieldLetter();
      +195 
      +196     /**
      +197      * Tells if the specified field name is a user defined field.
      +198      * User-defined fields must begin with an 'X', followed by one or more
      +199      * letters that specify the output file and a hyphen.
      +200      *
      +201      * @param field the name of the field
      +202      *
      +203      * @since 1.1
      +204      * @see <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7">Debian Policy - User-defined fields</a>
      +205      */
      +206     protected boolean isUserDefinedField(String field) {
      +207         return field.startsWith("X") && field.indexOf("-") > 0;
      +208     }
      +209 
      +210     /**
      +211      * Returns the user defined field without its prefix.
      +212      *
      +213      * @param field the name of the user defined field
      +214      * @return the user defined field without the prefix, or null if the fields
      +215      *         doesn't apply to this control file.
      +216      * @since 1.1
      +217      */
      +218     protected String getUserDefinedFieldName(String field) {
      +219         int index = field.indexOf('-');
      +220         char letter = getUserDefinedFieldLetter();
      +221 
      +222         for (int i = 0; i < index; ++i) {
      +223             if (field.charAt(i) == letter) {
      +224                 return field.substring(index + 1);
      +225             }
      +226         }
      +227 
      +228         return null;
      +229     }
      +230 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/debian/package-frame.html b/release/1.10/xref/org/vafer/jdeb/debian/package-frame.html new file mode 100644 index 000000000..f1bf72254 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/debian/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.debian + + + +

      org.vafer.jdeb.debian

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/debian/package-summary.html b/release/1.10/xref/org/vafer/jdeb/debian/package-summary.html new file mode 100644 index 000000000..b30b86269 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/debian/package-summary.html @@ -0,0 +1,127 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.debian + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.debian

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/mapping/LsMapper.html b/release/1.10/xref/org/vafer/jdeb/mapping/LsMapper.html new file mode 100644 index 000000000..60e347ea3 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/mapping/LsMapper.html @@ -0,0 +1,236 @@ + + + +LsMapper xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.mapping;
      +17  
      +18  import java.io.BufferedReader;
      +19  import java.io.IOException;
      +20  import java.io.InputStream;
      +21  import java.io.InputStreamReader;
      +22  import java.util.HashMap;
      +23  import java.util.Map;
      +24  import java.util.regex.Matcher;
      +25  import java.util.regex.Pattern;
      +26  
      +27  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +28  
      +29  /**
      +30   * Reads permissions and ownerships from a "ls -laR &gt; mapping.txt" dump and
      +31   * maps entries accordingly.
      +32   */
      +33  public final class LsMapper implements Mapper {
      +34  
      +35      private final Map<String, TarArchiveEntry> mapping;
      +36  
      +37  
      +38      public final static class ParseError extends Exception {
      +39  
      +40          private static final long serialVersionUID = 1L;
      +41  
      +42          public ParseError( String message ) {
      +43              super(message);
      +44          }
      +45      }
      +46  
      +47  
      +48      public LsMapper( final InputStream pInput ) throws IOException, ParseError {
      +49          mapping = parse(pInput);
      +50      }
      +51  
      +52      /*
      +53  ./trunk/target/test-classes/org/vafer/dependency:
      +54  total 176
      +55  drwxr-xr-x   23 tcurdt  tcurdt   782 Jun 25 03:48 .
      +56  drwxr-xr-x    3 tcurdt  tcurdt   102 Jun 25 03:48 ..
      +57  -rw-r--r--    1 tcurdt  tcurdt  2934 Jun 25 03:48 DependenciesTestCase.class
      +58  -rw-r--r--    1 tcurdt  tcurdt   786 Jun 25 03:48 JarCombiningTestCase$1.class
      +59  -rw-r--r--    1 tcurdt  tcurdt  2176 Jun 25 03:48 WarTestCase.class
      +60  drwxr-xr-x    4 tcurdt  tcurdt   136 Jun 25 03:48 classes
      +61  
      +62  ./trunk/target/test-classes/org/vafer/dependency/classes:
      +63       */
      +64  
      +65      final private Pattern basePattern = Pattern.compile("^\\./(.*):$");
      +66      final private Pattern totalPattern = Pattern.compile("^total ([0-9]+)$");
      +67      final private Pattern dirPattern = Pattern.compile("^d([rwx-]{9})\\s+([0-9]+)\\s+(\\S*)\\s+(\\S*)\\s+([0-9]+)\\s+(.*)\\s+[.]{1,2}$");
      +68      final private Pattern filePattern = Pattern.compile("^([d-])([rwx-]{9})\\s+([0-9]+)\\s+(\\S*)\\s+(\\S*)\\s+([0-9]+)\\s+(.*)\\s+(.*)$");
      +69      final private Pattern newlinePattern = Pattern.compile("$");
      +70  
      +71      private String readBase( final BufferedReader reader ) throws IOException, ParseError {
      +72          final String line = reader.readLine();
      +73          if (line == null) {
      +74              return null;
      +75          }
      +76          final Matcher matcher = basePattern.matcher(line);
      +77          if (!matcher.matches()) {
      +78              throw new ParseError("expected base line but got \"" + line + "\"");
      +79          }
      +80          return matcher.group(1);
      +81      }
      +82  
      +83      private String readTotal( final BufferedReader reader ) throws IOException, ParseError {
      +84          final String line = reader.readLine();
      +85          final Matcher matcher = totalPattern.matcher(line);
      +86          if (!matcher.matches()) {
      +87              throw new ParseError("expected total line but got \"" + line + "\"");
      +88          }
      +89          return matcher.group(1);
      +90      }
      +91  
      +92      private TarArchiveEntry readDir( final BufferedReader reader, final String base ) throws IOException, ParseError {
      +93          final String current = reader.readLine();
      +94          final Matcher currentMatcher = dirPattern.matcher(current);
      +95          if (!currentMatcher.matches()) {
      +96              throw new ParseError("expected dirline but got \"" + current + "\"");
      +97          }
      +98  
      +99          final String parent = reader.readLine();
      +100         final Matcher parentMatcher = dirPattern.matcher(parent);
      +101         if (!parentMatcher.matches()) {
      +102             throw new ParseError("expected dirline but got \"" + parent + "\"");
      +103         }
      +104 
      +105         final TarArchiveEntry entry = new TarArchiveEntry(base, true);
      +106 
      +107         entry.setMode(convertModeFromString(currentMatcher.group(1)));
      +108         entry.setUserName(currentMatcher.group(3));
      +109         entry.setGroupName(currentMatcher.group(4));
      +110 
      +111         return entry;
      +112     }
      +113 
      +114 
      +115     private int convertModeFromString( final String mode ) {
      +116 
      +117         final char[] m = mode.toCharArray();
      +118         /*
      +119            -rwxrwxrwx
      +120 
      +121            4000    set-user-ID-on-execution bit
      +122            2000    set-user-ID-on-execution bit
      +123            1000    sticky bit
      +124            0400    allow read by owner.
      +125            0200    allow write by owner.
      +126            0100    execute / search
      +127            0040    allow read by group members.
      +128            0020    allow write by group members.
      +129            0010    execute / search
      +130            0004    allow read by others.
      +131            0002    allow write by others.
      +132            0001    execute / search
      +133          */
      +134         // TODO: simplified - needs fixing
      +135         int sum = 0;
      +136         int bit = 1;
      +137         for (int i = m.length - 1; i >= 0; i--) {
      +138             if (m[i] != '-') {
      +139                 sum += bit;
      +140             }
      +141             bit += bit;
      +142         }
      +143         return sum;
      +144     }
      +145 
      +146     private TarArchiveEntry readFile( final BufferedReader reader, final String base ) throws IOException, ParseError {
      +147 
      +148         while (true) {
      +149             final String line = reader.readLine();
      +150 
      +151             if (line == null) {
      +152                 return null;
      +153             }
      +154 
      +155             final Matcher currentMatcher = filePattern.matcher(line);
      +156             if (!currentMatcher.matches()) {
      +157                 final Matcher newlineMatcher = newlinePattern.matcher(line);
      +158                 if (newlineMatcher.matches()) {
      +159                     return null;
      +160                 }
      +161                 throw new ParseError("expected file line but got \"" + line + "\"");
      +162             }
      +163 
      +164             final String type = currentMatcher.group(1);
      +165             if (type.startsWith("-")) {
      +166                 final TarArchiveEntry entry = new TarArchiveEntry(base + "/" + currentMatcher.group(8), true);
      +167 
      +168                 entry.setMode(convertModeFromString(currentMatcher.group(2)));
      +169                 entry.setUserName(currentMatcher.group(4));
      +170                 entry.setGroupName(currentMatcher.group(5));
      +171 
      +172                 return entry;
      +173             }
      +174         }
      +175 
      +176     }
      +177 
      +178     private Map<String, TarArchiveEntry> parse( final InputStream pInput ) throws IOException, ParseError {
      +179         final Map<String, TarArchiveEntry> mapping = new HashMap<>();
      +180 
      +181         final BufferedReader reader = new BufferedReader(new InputStreamReader(pInput));
      +182 
      +183         boolean first = true;
      +184         while (true) {
      +185 
      +186             final String base;
      +187             if (first) {
      +188                 base = "";
      +189                 first = false;
      +190             } else {
      +191                 base = readBase(reader);
      +192                 if (base == null) {
      +193                     break;
      +194                 }
      +195             }
      +196 
      +197             readTotal(reader);
      +198             final TarArchiveEntry dir = readDir(reader, base);
      +199             mapping.put(dir.getName(), dir);
      +200 
      +201             while (true) {
      +202                 final TarArchiveEntry file = readFile(reader, base);
      +203 
      +204                 if (file == null) {
      +205                     break;
      +206                 }
      +207 
      +208                 mapping.put(file.getName(), file);
      +209             }
      +210         }
      +211 
      +212         return mapping;
      +213     }
      +214 
      +215     public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +216         final TarArchiveEntry entry = mapping.get(pEntry.getName());
      +217         if (entry != null) {
      +218             return entry;
      +219         }
      +220         return pEntry;
      +221     }
      +222 
      +223 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/mapping/Mapper.html b/release/1.10/xref/org/vafer/jdeb/mapping/Mapper.html new file mode 100644 index 000000000..f8a44d466 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/mapping/Mapper.html @@ -0,0 +1,41 @@ + + + +Mapper xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.mapping;
      +17  
      +18  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +19  
      +20  
      +21  /**
      +22   * Maps one entry to another. So you modify ownerships permissions etc in a Mapper.
      +23   */
      +24  public interface Mapper {
      +25  
      +26      TarArchiveEntry map( final TarArchiveEntry entry );
      +27  
      +28  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/mapping/NullMapper.html b/release/1.10/xref/org/vafer/jdeb/mapping/NullMapper.html new file mode 100644 index 000000000..7ef606664 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/mapping/NullMapper.html @@ -0,0 +1,44 @@ + + + +NullMapper xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.mapping;
      +17  
      +18  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +19  
      +20  public final class NullMapper implements Mapper {
      +21  
      +22      public static final Mapper INSTANCE = new NullMapper();
      +23  
      +24      private NullMapper() {
      +25      }
      +26  
      +27      public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +28          return pEntry;
      +29      }
      +30  
      +31  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/mapping/PermMapper.html b/release/1.10/xref/org/vafer/jdeb/mapping/PermMapper.html new file mode 100644 index 000000000..88fdd6caa --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/mapping/PermMapper.html @@ -0,0 +1,104 @@ + + + +PermMapper xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.mapping;
      +17  
      +18  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +19  import org.vafer.jdeb.utils.Utils;
      +20  
      +21  /**
      +22   * Applies a uniform set of permissions and ownership to all entries.
      +23   */
      +24  public final class PermMapper implements Mapper {
      +25  
      +26      private final int strip;
      +27      private final String prefix;
      +28      private int uid = -1;
      +29      private int gid = -1;
      +30      private String user;
      +31      private String group;
      +32      private int fileMode = -1;
      +33      private int dirMode = -1;
      +34  
      +35      public static int toMode( String modeString ) {
      +36          int mode = -1;
      +37          if (modeString != null && modeString.length() > 0) {
      +38              mode = Integer.parseInt(modeString, 8);
      +39          }
      +40          return mode;
      +41      }
      +42  
      +43      public PermMapper( int uid, int gid, String user, String group, int fileMode, int dirMode, int strip, String prefix ) {
      +44          this.strip = strip;
      +45          this.prefix = (prefix == null) ? "" : prefix;
      +46          this.uid = uid;
      +47          this.gid = gid;
      +48          this.user = user;
      +49          this.group = group;
      +50          this.fileMode = fileMode;
      +51          this.dirMode = dirMode;
      +52      }
      +53  
      +54      public PermMapper( int uid, int gid, String user, String group, String fileMode, String dirMode, int strip, String prefix ) {
      +55          this(uid, gid, user, group, toMode(fileMode), toMode(dirMode), strip, prefix);
      +56      }
      +57  
      +58      public TarArchiveEntry map( final TarArchiveEntry entry ) {
      +59          entry.setName(Utils.stripLeadingSlash(Utils.joinUnixPath(
      +60              prefix,
      +61              Utils.stripPath(strip, entry.getName())
      +62          )));
      +63  
      +64          // Set ownership
      +65          if (uid > -1) {
      +66              entry.setUserId(uid);
      +67          }
      +68          if (gid > -1) {
      +69              entry.setGroupId(gid);
      +70          }
      +71          if (user != null) {
      +72              entry.setUserName(user);
      +73          }
      +74          if (group != null) {
      +75              entry.setGroupName(group);
      +76          }
      +77  
      +78          // Set permissions
      +79          if (entry.isDirectory()) {
      +80              if (dirMode > -1) {
      +81                  entry.setMode(dirMode);
      +82              }
      +83          } else {
      +84              if (fileMode > -1) {
      +85                  entry.setMode(fileMode);
      +86              }
      +87          }
      +88  
      +89          return entry;
      +90      }
      +91  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/mapping/package-frame.html b/release/1.10/xref/org/vafer/jdeb/mapping/package-frame.html new file mode 100644 index 000000000..58bc7db1a --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/mapping/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.mapping + + + +

      org.vafer.jdeb.mapping

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/mapping/package-summary.html b/release/1.10/xref/org/vafer/jdeb/mapping/package-summary.html new file mode 100644 index 000000000..c0c267aab --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/mapping/package-summary.html @@ -0,0 +1,127 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.mapping + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.mapping

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/maven/Data.html b/release/1.10/xref/org/vafer/jdeb/maven/Data.html new file mode 100644 index 000000000..801d6a899 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/Data.html @@ -0,0 +1,229 @@ + + + +Data xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.maven;
      +18  
      +19  import java.io.File;
      +20  import java.io.FileNotFoundException;
      +21  import java.io.IOException;
      +22  import java.util.ArrayList;
      +23  import java.util.List;
      +24  import java.util.StringTokenizer;
      +25  
      +26  import org.apache.maven.plugins.annotations.Parameter;
      +27  import org.vafer.jdeb.DataConsumer;
      +28  import org.vafer.jdeb.DataProducer;
      +29  import org.vafer.jdeb.producers.DataProducerArchive;
      +30  import org.vafer.jdeb.producers.DataProducerDirectory;
      +31  import org.vafer.jdeb.producers.DataProducerFile;
      +32  import org.vafer.jdeb.producers.DataProducerFiles;
      +33  import org.vafer.jdeb.producers.DataProducerLink;
      +34  import org.vafer.jdeb.producers.DataProducerPathTemplate;
      +35  
      +36  import static org.vafer.jdeb.maven.MissingSourceBehavior.*;
      +37  
      +38  /**
      +39   * Maven "data" element acting as a factory for DataProducers. So far Archive and
      +40   * Directory producers are supported. Both support the usual ant pattern set
      +41   * matching.
      +42   */
      +43  public final class Data implements DataProducer {
      +44  
      +45      @Parameter
      +46      private File src;
      +47  
      +48      public void setSrc( File src ) {
      +49          this.src = src;
      +50      }
      +51  
      +52      @Parameter
      +53      private String dst;
      +54  
      +55      public void setDst( String dst ) {
      +56          this.dst = dst;
      +57      }
      +58  
      +59      @Parameter
      +60      private String type;
      +61  
      +62      public void setType( String type ) {
      +63          this.type = type;
      +64      }
      +65  
      +66      @Parameter
      +67      private MissingSourceBehavior missingSrc = FAIL;
      +68  
      +69      public void setMissingSrc( String missingSrc ) {
      +70          this.missingSrc = MissingSourceBehavior.valueOf(missingSrc.trim().toUpperCase());
      +71      }
      +72  
      +73      @Parameter
      +74      private String linkName;
      +75  
      +76      public void setLinkName(String linkName) {
      +77          this.linkName = linkName;
      +78      }
      +79  
      +80      @Parameter
      +81      private String linkTarget;
      +82  
      +83      public void setLinkTarget(String linkTarget) {
      +84          this.linkTarget = linkTarget;
      +85      }
      +86  
      +87      @Parameter
      +88      private boolean symlink = true;
      +89  
      +90      public void setSymlink(boolean symlink) {
      +91          this.symlink = symlink;
      +92      }
      +93  
      +94      private boolean conffile = false;
      +95  
      +96      /**
      +97       * @parameter expression="${conffile}"
      +98       */
      +99      public void setConffile(boolean conffile) {
      +100         this.conffile = conffile;
      +101     }
      +102 
      +103     public boolean getConffile() {
      +104         return this.conffile;
      +105     }
      +106 
      +107     @Parameter(alias = "includes")
      +108     private String[] includePatterns;
      +109 
      +110     public void setIncludes( String includes ) {
      +111         includePatterns = splitPatterns(includes);
      +112     }
      +113 
      +114     @Parameter(alias = "excludes")
      +115     private String[] excludePatterns;
      +116 
      +117     public void setExcludes( String excludes ) {
      +118         excludePatterns = splitPatterns(excludes);
      +119     }
      +120 
      +121     @Parameter
      +122     private Mapper mapper;
      +123 
      +124     @Parameter
      +125     private String[] paths;
      +126 
      +127     /* For testing only */
      +128     void setPaths( String[] paths ) {
      +129         this.paths = paths;
      +130     }
      +131 
      +132     public String[] splitPatterns( String patterns ) {
      +133         String[] result = null;
      +134         if (patterns != null && patterns.length() > 0) {
      +135             List<String> tokens = new ArrayList<>();
      +136             StringTokenizer tok = new StringTokenizer(patterns, ", ", false);
      +137             while (tok.hasMoreTokens()) {
      +138                 tokens.add(tok.nextToken());
      +139             }
      +140             result = tokens.toArray(new String[tokens.size()]);
      +141         }
      +142         return result;
      +143     }
      +144 
      +145     public void produce( final DataConsumer pReceiver ) throws IOException {
      +146         org.vafer.jdeb.mapping.Mapper[] mappers = null;
      +147         if (mapper != null) {
      +148             mappers = new org.vafer.jdeb.mapping.Mapper[] { mapper.createMapper() };
      +149         }
      +150 
      +151         // link type
      +152 
      +153         if (typeIs("link")) {
      +154             if (linkName == null) {
      +155                 throw new RuntimeException("linkName is not set");
      +156             }
      +157             if (linkTarget == null) {
      +158                 throw new RuntimeException("linkTarget is not set");
      +159             }
      +160 
      +161             new DataProducerLink(linkName, linkTarget, symlink, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +162             return;
      +163         }
      +164 
      +165         // template type
      +166 
      +167         if (typeIs("template")) {
      +168             checkPaths();
      +169             new DataProducerPathTemplate(paths, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +170             return;
      +171         }
      +172 
      +173         if (typeIs("files")) {
      +174             checkPaths();
      +175             new DataProducerFiles(paths, dst, mappers).produce(pReceiver);
      +176             return;
      +177         }
      +178 
      +179         // Types that require src to exist
      +180 
      +181         if (src == null || !src.exists()) {
      +182             if (missingSrc == IGNORE) {
      +183                 return;
      +184             } else {
      +185                 throw new FileNotFoundException("Data source not found : " + src);
      +186             }
      +187         }
      +188 
      +189         if (typeIs("file")) {
      +190             new DataProducerFile(src, dst, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +191             return;
      +192         }
      +193 
      +194         if (typeIs("archive")) {
      +195             new DataProducerArchive(src, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +196             return;
      +197         }
      +198 
      +199         if (typeIs("directory")) {
      +200             new DataProducerDirectory(src, includePatterns, excludePatterns, mappers).produce(pReceiver);
      +201             return;
      +202         }
      +203 
      +204         throw new IOException("Unknown type '" + type + "' (file|directory|archive|template|link) for " + src);
      +205     }
      +206 
      +207     private boolean typeIs( final String type ) {
      +208         return type.equalsIgnoreCase(this.type);
      +209     }
      +210 
      +211     private void checkPaths() {
      +212         if (paths == null || paths.length == 0) {
      +213             throw new RuntimeException("paths parameter is not set");
      +214         }
      +215     }
      +216 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/maven/DebMojo.html b/release/1.10/xref/org/vafer/jdeb/maven/DebMojo.html new file mode 100644 index 000000000..9562b66f5 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/DebMojo.html @@ -0,0 +1,771 @@ + + + +DebMojo xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.maven;
      +18  
      +19  import java.io.File;
      +20  import java.io.FileInputStream;
      +21  import java.io.FileNotFoundException;
      +22  import java.util.ArrayList;
      +23  import java.util.Collection;
      +24  import java.util.Collections;
      +25  import java.util.HashMap;
      +26  import java.util.HashSet;
      +27  import java.util.List;
      +28  import java.util.Map;
      +29  import java.util.Set;
      +30  
      +31  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +32  import org.apache.commons.compress.archivers.tar.TarConstants;
      +33  import org.apache.maven.artifact.Artifact;
      +34  import org.apache.maven.execution.MavenSession;
      +35  import org.apache.maven.plugin.AbstractMojo;
      +36  import org.apache.maven.plugin.MojoExecutionException;
      +37  import org.apache.maven.plugins.annotations.Component;
      +38  import org.apache.maven.plugins.annotations.LifecyclePhase;
      +39  import org.apache.maven.plugins.annotations.Mojo;
      +40  import org.apache.maven.plugins.annotations.Parameter;
      +41  import org.apache.maven.project.MavenProject;
      +42  import org.apache.maven.project.MavenProjectHelper;
      +43  import org.apache.maven.settings.Profile;
      +44  import org.apache.maven.settings.Settings;
      +45  import org.apache.tools.tar.TarEntry;
      +46  import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
      +47  import org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException;
      +48  import org.vafer.jdeb.Console;
      +49  import org.vafer.jdeb.DataConsumer;
      +50  import org.vafer.jdeb.DataProducer;
      +51  import org.vafer.jdeb.DebMaker;
      +52  import org.vafer.jdeb.PackagingException;
      +53  import org.vafer.jdeb.utils.MapVariableResolver;
      +54  import org.vafer.jdeb.utils.OutputTimestampResolver;
      +55  import org.vafer.jdeb.utils.SymlinkUtils;
      +56  import org.vafer.jdeb.utils.Utils;
      +57  import org.vafer.jdeb.utils.VariableResolver;
      +58  
      +59  import static org.vafer.jdeb.utils.Utils.isBlank;
      +60  import static org.vafer.jdeb.utils.Utils.lookupIfEmpty;
      +61  
      +62  /**
      +63   * Creates Debian package
      +64   */
      +65  @Mojo(name = "jdeb", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true)
      +66  public class DebMojo extends AbstractMojo {
      +67  
      +68      @Component
      +69      private MavenProjectHelper projectHelper;
      +70  
      +71      @Component(hint = "jdeb-sec")
      +72      private SecDispatcher secDispatcher;
      +73  
      +74      /**
      +75       * Defines the name of deb package.
      +76       */
      +77      @Parameter
      +78      private String name;
      +79  
      +80      /**
      +81       * Defines the pattern of the name of final artifacts. Possible
      +82       * substitutions are [[baseDir]] [[buildDir]] [[artifactId]] [[version]]
      +83       * [[extension]] and [[groupId]].
      +84       */
      +85      @Parameter(defaultValue = "[[buildDir]]/[[artifactId]]_[[version]]_all.[[extension]]")
      +86      private String deb;
      +87  
      +88      /**
      +89       * Explicitly defines the path to the control directory. At least the
      +90       * control file is mandatory.
      +91       */
      +92      @Parameter(defaultValue = "[[baseDir]]/src/deb/control")
      +93      private String controlDir;
      +94  
      +95      /**
      +96       * Explicitly define the file to read the changes from.
      +97       */
      +98      @Parameter(defaultValue = "[[baseDir]]/CHANGES.txt")
      +99      private String changesIn;
      +100 
      +101     /**
      +102      * Explicitly define the file where to write the changes to.
      +103      */
      +104     @Parameter(defaultValue = "[[buildDir]]/[[artifactId]]_[[version]]_all.changes")
      +105     private String changesOut;
      +106 
      +107     /**
      +108      * Explicitly define the file where to write the changes of the changes input to.
      +109      */
      +110     @Parameter(defaultValue = "[[baseDir]]/CHANGES.txt")
      +111     private String changesSave;
      +112 
      +113     /**
      +114      * The compression method used for the data file (none, gzip, bzip2 or xz)
      +115      */
      +116     @Parameter(defaultValue = "gzip")
      +117     private String compression;
      +118 
      +119     /**
      +120      * Boolean option whether to attach the artifact to the project
      +121      */
      +122     @Parameter(defaultValue = "true")
      +123     private String attach;
      +124 
      +125     /**
      +126      * The location where all package files will be installed. By default, all
      +127      * packages are installed in /opt (see the FHS here:
      +128      * http://www.pathname.com/
      +129      * fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES)
      +130      */
      +131     @Parameter(defaultValue = "/opt/[[artifactId]]")
      +132     private String installDir;
      +133 
      +134     /**
      +135      * The type of attached artifact
      +136      */
      +137     @Parameter(defaultValue = "deb")
      +138     private String type;
      +139 
      +140     /**
      +141      * The project base directory
      +142      */
      +143     @Parameter(defaultValue = "${basedir}", required = true, readonly = true)
      +144     private File baseDir;
      +145 
      +146     /**
      +147      * The Maven Session Object
      +148      */
      +149     @Parameter( defaultValue = "${session}", readonly = true )
      +150     private MavenSession session;
      +151 
      +152     /**
      +153      * The Maven Project Object
      +154      */
      +155     @Parameter( defaultValue = "${project}", readonly = true )
      +156     private MavenProject project;
      +157 
      +158     /**
      +159      * The build directory
      +160      */
      +161     @Parameter(property = "project.build.directory", required = true, readonly = true)
      +162     private File buildDirectory;
      +163 
      +164     /**
      +165      * The classifier of attached artifact
      +166      */
      +167     @Parameter
      +168     private String classifier;
      +169 
      +170     /**
      +171      * The digest algorithm to use.
      +172      *
      +173      * @see org.bouncycastle.bcpg.HashAlgorithmTags
      +174      */
      +175     @Parameter(defaultValue = "SHA256")
      +176     private String digest;
      +177 
      +178     /**
      +179      * "data" entries used to determine which files should be added to this deb.
      +180      * The "data" entries may specify a tarball (tar.gz, tar.bz2, tgz), a
      +181      * directory, or a normal file. An entry would look something like this in
      +182      * your pom.xml:
      +183      *
      +184      *
      +185      * <pre>
      +186      *   <build>
      +187      *     <plugins>
      +188      *       <plugin>
      +189      *       <artifactId>jdeb</artifactId>
      +190      *       <groupId>org.vafer</groupId>
      +191      *       ...
      +192      *       <configuration>
      +193      *         ...
      +194      *         <dataSet>
      +195      *           <data>
      +196      *             <src>${project.basedir}/target/my_archive.tar.gz</src>
      +197      *             <include>...</include>
      +198      *             <exclude>...</exclude>
      +199      *             <mapper>
      +200      *               <type>perm</type>
      +201      *               <strip>1</strip>
      +202      *               <prefix>/somewhere/else</prefix>
      +203      *               <user>santbj</user>
      +204      *               <group>santbj</group>
      +205      *               <mode>600</mode>
      +206      *             </mapper>
      +207      *           </data>
      +208      *           <data>
      +209      *             <src>${project.build.directory}/data</src>
      +210      *             <include></include>
      +211      *             <exclude>**&#47;.svn</exclude>
      +212      *             <mapper>
      +213      *               <type>ls</type>
      +214      *               <src>mapping.txt</src>
      +215      *             </mapper>
      +216      *           </data>
      +217      *           <data>
      +218      *             <type>link</type>
      +219      *             <linkName>/a/path/on/the/target/fs</linkName>
      +220      *             <linkTarget>/a/sym/link/to/the/scr/file</linkTarget>
      +221      *             <symlink>true</symlink>
      +222      *           </data>
      +223      *           <data>
      +224      *             <src>${project.basedir}/README.txt</src>
      +225      *           </data>
      +226      *         </dataSet>
      +227      *       </configuration>
      +228      *     </plugins>
      +229      *   </build>
      +230      * </pre>
      +231      *
      +232      */
      +233     @Parameter
      +234     private Data[] dataSet;
      +235 
      +236 //    /**
      +237 //     * @deprecated
      +238 //     */
      +239 //    @Parameter(defaultValue = "false")
      +240 //    private boolean timestamped;
      +241 
      +242     /**
      +243      * When enabled SNAPSHOT inside the version gets replaced with current timestamp or
      +244      * if set a value of a environment variable.
      +245      */
      +246     @Parameter(defaultValue = "false")
      +247     private boolean snapshotExpand;
      +248 
      +249     /**
      +250      * Which environment variable to check for the SNAPSHOT value.
      +251      * If the variable is not set/empty it will default to use the timestamp.
      +252      */
      +253     @Parameter(defaultValue = "SNAPSHOT")
      +254     private String snapshotEnv;
      +255 
      +256     /**
      +257      * Template for replacing the SNAPSHOT value. A timestamp format can be provided in brackets.
      +258      * prefix[yyMMdd]suffix -> prefix151230suffix
      +259      */
      +260     @Parameter
      +261     private String snapshotTemplate;
      +262 
      +263     /**
      +264      * If verbose is true more build messages are logged.
      +265      */
      +266     @Parameter(defaultValue = "false")
      +267     private boolean verbose;
      +268 
      +269     /**
      +270      * Indicates if the execution should be disabled. If <code>true</code>, nothing will occur during execution.
      +271      *
      +272      * @since 1.1
      +273      */
      +274     @Parameter(property = "jdeb.skip", defaultValue = "false")
      +275     private boolean skip;
      +276 
      +277     @Parameter(property = "jdeb.skipPOMs", defaultValue = "true")
      +278     private boolean skipPOMs;
      +279 
      +280     @Parameter(property = "jdeb.skipSubmodules", defaultValue = "false")
      +281     private boolean skipSubmodules;
      +282 
      +283     /**
      +284      * @deprecated
      +285      */
      +286     @Parameter(defaultValue = "true")
      +287     private boolean submodules;
      +288 
      +289 
      +290     /**
      +291      * If signPackage is true then a origin signature will be placed
      +292      * in the generated package.
      +293      */
      +294     @Parameter(defaultValue = "false")
      +295     private boolean signPackage;
      +296 
      +297     /**
      +298      * If signChanges is true then changes file will be signed.
      +299      */
      +300     @Parameter(defaultValue = "false")
      +301     private boolean signChanges;
      +302 
      +303     /**
      +304      * Defines which utility is used to verify the signed package
      +305      */
      +306     @Parameter(defaultValue = "debsig-verify")
      +307     private String signMethod;
      +308 
      +309     /**
      +310      * Defines the role to sign with
      +311      */
      +312     @Parameter(defaultValue = "origin")
      +313     private String signRole;
      +314 
      +315     /**
      +316      * The keyring to use for signing operations.
      +317      */
      +318     @Parameter
      +319     private String keyring;
      +320 
      +321     /**
      +322      * The key to use for signing operations.
      +323      */
      +324     @Parameter
      +325     private String key;
      +326 
      +327     /**
      +328      * The passphrase to use for signing operations.
      +329      */
      +330     @Parameter
      +331     private String passphrase;
      +332 
      +333     /**
      +334      * The prefix to use when reading signing variables
      +335      * from settings.
      +336      */
      +337     @Parameter(defaultValue = "jdeb.")
      +338     private String signCfgPrefix;
      +339 
      +340     /**
      +341      * The settings.
      +342      */
      +343     @Parameter(defaultValue = "${settings}")
      +344     private Settings settings;
      +345 
      +346     @Parameter(defaultValue = "")
      +347     private String propertyPrefix;
      +348 
      +349     /**
      +350      * Sets the long file mode for the resulting tar file.  Valid values are "gnu", "posix", "error" or "truncate"
      +351      * @see org.apache.commons.compress.archivers.tar.TarArchiveOutputStream#setLongFileMode(int)
      +352      */
      +353     @Parameter(defaultValue = "gnu")
      +354     private String tarLongFileMode;
      +355 
      +356     /**
      +357      * Sets the big number mode for the resulting tar file.  Valid values are "gnu", "posix" or "error"
      +358      * @see org.apache.commons.compress.archivers.tar.TarArchiveOutputStream#setBigNumberMode(int)
      +359      */
      +360     @Parameter(defaultValue = "gnu")
      +361     private String tarBigNumberMode;
      +362 
      +363     /**
      +364      * Timestamp for reproducible output archive entries, either formatted as ISO 8601
      +365      * <code>yyyy-MM-dd'T'HH:mm:ssXXX</code> or as an int representing seconds since the epoch (like
      +366      * <a href="https://reproducible-builds.org/docs/source-date-epoch/">SOURCE_DATE_EPOCH</a>).
      +367      *
      +368      * @since 1.9
      +369      */
      +370     @Parameter(defaultValue = "${project.build.outputTimestamp}")
      +371     private String outputTimestamp;
      +372 
      +373     /* end of parameters */
      +374 
      +375     private static final String KEY = "key";
      +376     private static final String KEYRING = "keyring";
      +377     private static final String PASSPHRASE = "passphrase";
      +378 
      +379     private String openReplaceToken = "[[";
      +380     private String closeReplaceToken = "]]";
      +381     private Console console;
      +382     private Collection<DataProducer> dataProducers = new ArrayList<>();
      +383     private Collection<DataProducer> conffileProducers = new ArrayList<>();
      +384 
      +385     public void setOpenReplaceToken( String openReplaceToken ) {
      +386         this.openReplaceToken = openReplaceToken;
      +387     }
      +388 
      +389     public void setCloseReplaceToken( String closeReplaceToken ) {
      +390         this.closeReplaceToken = closeReplaceToken;
      +391     }
      +392 
      +393     protected void setData( Data[] dataSet ) {
      +394         this.dataSet = dataSet;
      +395         dataProducers.clear();
      +396         conffileProducers.clear();
      +397         if (dataSet != null) {
      +398             Collections.addAll(dataProducers, dataSet);
      +399 
      +400             for (Data item : dataSet) {
      +401                 if (item.getConffile()) {
      +402                     conffileProducers.add(item);
      +403                 }
      +404             }
      +405         }
      +406     }
      +407 
      +408     @SuppressWarnings("unchecked,rawtypes")
      +409     protected VariableResolver initializeVariableResolver( Map<String, String> variables ) {
      +410         variables.putAll((Map) getProject().getProperties());
      +411         variables.putAll((Map) System.getProperties());
      +412         variables.put("name", name != null ? name : getProject().getName());
      +413         variables.put("artifactId", getProject().getArtifactId());
      +414         variables.put("groupId", getProject().getGroupId());
      +415         variables.put("version", getProjectVersion());
      +416         variables.put("description", getProject().getDescription());
      +417         variables.put("extension", "deb");
      +418         variables.put("baseDir", getProject().getBasedir().getAbsolutePath());
      +419         variables.put("buildDir", buildDirectory.getAbsolutePath());
      +420         variables.put("project.version", getProject().getVersion());
      +421 
      +422         if (getProject().getInceptionYear() != null) {
      +423             variables.put("project.inceptionYear", getProject().getInceptionYear());
      +424         }
      +425         if (getProject().getOrganization() != null) {
      +426             if (getProject().getOrganization().getName() != null) {
      +427                 variables.put("project.organization.name", getProject().getOrganization().getName());
      +428             }
      +429             if (getProject().getOrganization().getUrl() != null) {
      +430                 variables.put("project.organization.url", getProject().getOrganization().getUrl());
      +431             }
      +432         }
      +433 
      +434         variables.put("url", getProject().getUrl());
      +435 
      +436         return new MapVariableResolver(variables);
      +437     }
      +438 
      +439     /**
      +440      * Doc some cleanup and conversion on the Maven project version.
      +441      * <ul>
      +442      * <li>any "-" is replaced by "+"</li>
      +443      * <li>"SNAPSHOT" is replaced with the current time and date, prepended by "~"</li>
      +444      * </ul>
      +445      *
      +446      * @return the Maven project version
      +447      */
      +448     private String getProjectVersion() {
      +449         return Utils.convertToDebianVersion(getProject().getVersion(), this.snapshotExpand, this.snapshotEnv, this.snapshotTemplate, session.getStartTime());
      +450     }
      +451 
      +452     /**
      +453      * @return whether the artifact is a POM or not
      +454      */
      +455     private boolean isPOM() {
      +456         String type = getProject().getArtifact().getType();
      +457         return "pom".equalsIgnoreCase(type);
      +458     }
      +459 
      +460     /**
      +461      * @return whether the artifact is of configured type (i.e. the package to generate is the main artifact)
      +462      */
      +463     private boolean isType() {
      +464         return type.equals(getProject().getArtifact().getType());
      +465     }
      +466 
      +467     /**
      +468      * @return whether or not Maven is currently operating in the execution root
      +469      */
      +470     private boolean isSubmodule() {
      +471         // FIXME there must be a better way
      +472         return !session.getExecutionRootDirectory().equalsIgnoreCase(baseDir.toString());
      +473     }
      +474 
      +475     /**
      +476      * @return whether or not the main artifact was created
      +477      */
      +478     private boolean hasMainArtifact() {
      +479         final MavenProject project = getProject();
      +480         final Artifact artifact = project.getArtifact();
      +481         return artifact.getFile() != null && artifact.getFile().isFile();
      +482     }
      +483 
      +484     /**
      +485      * Main entry point
      +486      *
      +487      * @throws MojoExecutionException on error
      +488      */
      +489     public void execute() throws MojoExecutionException {
      +490 
      +491         final MavenProject project = getProject();
      +492 
      +493         if (skip) {
      +494             getLog().info("skipping as configured (skip)");
      +495             return;
      +496         }
      +497 
      +498         if (skipPOMs && isPOM()) {
      +499             getLog().info("skipping because artifact is a pom (skipPOMs)");
      +500             return;
      +501         }
      +502 
      +503         if (skipSubmodules && isSubmodule()) {
      +504             getLog().info("skipping submodule (skipSubmodules)");
      +505             return;
      +506         }
      +507 
      +508 
      +509         setData(dataSet);
      +510 
      +511         console = new MojoConsole(getLog(), verbose);
      +512 
      +513         initializeSignProperties();
      +514 
      +515         final VariableResolver resolver = initializeVariableResolver(new HashMap<String, String>());
      +516 
      +517         final File debFile = new File(Utils.replaceVariables(resolver, deb, openReplaceToken, closeReplaceToken));
      +518         final File controlDirFile = new File(Utils.replaceVariables(resolver, controlDir, openReplaceToken, closeReplaceToken));
      +519         final File installDirFile = new File(Utils.replaceVariables(resolver, installDir, openReplaceToken, closeReplaceToken));
      +520         final File changesInFile = new File(Utils.replaceVariables(resolver, changesIn, openReplaceToken, closeReplaceToken));
      +521         final File changesOutFile = new File(Utils.replaceVariables(resolver, changesOut, openReplaceToken, closeReplaceToken));
      +522         final File changesSaveFile = new File(Utils.replaceVariables(resolver, changesSave, openReplaceToken, closeReplaceToken));
      +523         final File keyringFile = keyring == null ? null : new File(Utils.replaceVariables(resolver, keyring, openReplaceToken, closeReplaceToken));
      +524 
      +525         // if there are no producers defined we try to use the artifacts
      +526         if (dataProducers.isEmpty()) {
      +527 
      +528             if (hasMainArtifact()) {
      +529                 Set<Artifact> artifacts = new HashSet<>();
      +530 
      +531                 artifacts.add(project.getArtifact());
      +532 
      +533                 @SuppressWarnings("unchecked")
      +534                 final Set<Artifact> projectArtifacts = project.getArtifacts();
      +535 
      +536                 artifacts.addAll(projectArtifacts);
      +537 
      +538                 @SuppressWarnings("unchecked")
      +539                 final List<Artifact> attachedArtifacts = project.getAttachedArtifacts();
      +540 
      +541                 artifacts.addAll(attachedArtifacts);
      +542 
      +543                 for (Artifact artifact : artifacts) {
      +544                     final File file = artifact.getFile();
      +545                     if (file != null) {
      +546                         dataProducers.add(new DataProducer() {
      +547                             public void produce( final DataConsumer receiver ) {
      +548                                 try {
      +549                                     final File path = new File(installDirFile.getPath(), file.getName());
      +550                                     final String entryName = path.getPath();
      +551 
      +552                                     final boolean symbolicLink = SymlinkUtils.isSymbolicLink(path);
      +553                                     final TarArchiveEntry e;
      +554                                     if (symbolicLink) {
      +555                                         e = new TarArchiveEntry(entryName, TarConstants.LF_SYMLINK);
      +556                                         e.setLinkName(SymlinkUtils.readSymbolicLink(path));
      +557                                     } else {
      +558                                         e = new TarArchiveEntry(entryName, true);
      +559                                     }
      +560 
      +561                                     e.setUserId(0);
      +562                                     e.setGroupId(0);
      +563                                     e.setUserName("root");
      +564                                     e.setGroupName("root");
      +565                                     e.setMode(TarEntry.DEFAULT_FILE_MODE);
      +566                                     e.setSize(file.length());
      +567 
      +568                                     receiver.onEachFile(new FileInputStream(file), e);
      +569                                 } catch (Exception e) {
      +570                                     getLog().error(e);
      +571                                 }
      +572                             }
      +573                         });
      +574                     } else {
      +575                         getLog().error("No file for artifact " + artifact);
      +576                     }
      +577                 }
      +578             }
      +579         }
      +580 
      +581         try {
      +582             DebMaker debMaker = new DebMaker(console, dataProducers, conffileProducers);
      +583             debMaker.setDeb(debFile);
      +584             debMaker.setControl(controlDirFile);
      +585             debMaker.setPackage(getProject().getArtifactId());
      +586             debMaker.setDescription(getProject().getDescription());
      +587             debMaker.setHomepage(getProject().getUrl());
      +588             debMaker.setChangesIn(changesInFile);
      +589             debMaker.setChangesOut(changesOutFile);
      +590             debMaker.setChangesSave(changesSaveFile);
      +591             debMaker.setCompression(compression);
      +592             debMaker.setKeyring(keyringFile);
      +593             debMaker.setKey(key);
      +594             debMaker.setPassphrase(passphrase);
      +595             debMaker.setSignPackage(signPackage);
      +596             debMaker.setSignChanges(signChanges);
      +597             debMaker.setSignMethod(signMethod);
      +598             debMaker.setSignRole(signRole);
      +599             debMaker.setResolver(resolver);
      +600             debMaker.setOpenReplaceToken(openReplaceToken);
      +601             debMaker.setCloseReplaceToken(closeReplaceToken);
      +602             debMaker.setDigest(digest);
      +603             debMaker.setTarBigNumberMode(tarBigNumberMode);
      +604             debMaker.setTarLongFileMode(tarLongFileMode);
      +605             Long outputTimestampMs = new OutputTimestampResolver(console).resolveOutputTimestamp(outputTimestamp);
      +606             debMaker.setOutputTimestampMs(outputTimestampMs);
      +607             debMaker.validate();
      +608             debMaker.makeDeb();
      +609 
      +610             // Always attach unless explicitly set to false
      +611             if ("true".equalsIgnoreCase(attach)) {
      +612                 console.info("Attaching created debian package " + debFile);
      +613                 if (!isType()) {
      +614                     projectHelper.attachArtifact(project, type, classifier, debFile);
      +615                 } else {
      +616                     project.getArtifact().setFile(debFile);
      +617                 }
      +618             }
      +619 
      +620         } catch (PackagingException e) {
      +621             getLog().error("Failed to create debian package " + debFile, e);
      +622             throw new MojoExecutionException("Failed to create debian package " + debFile, e);
      +623         }
      +624 
      +625         if (!isBlank(propertyPrefix)) {
      +626           project.getProperties().put(propertyPrefix+"version", getProjectVersion() );
      +627           project.getProperties().put(propertyPrefix+"deb", debFile.getAbsolutePath());
      +628           project.getProperties().put(propertyPrefix+"deb.name", debFile.getName());
      +629           project.getProperties().put(propertyPrefix+"changes", changesOutFile.getAbsolutePath());
      +630           project.getProperties().put(propertyPrefix+"changes.name", changesOutFile.getName());
      +631           project.getProperties().put(propertyPrefix+"changes.txt", changesSaveFile.getAbsolutePath());
      +632           project.getProperties().put(propertyPrefix+"changes.txt.name", changesSaveFile.getName());
      +633         }
      +634 
      +635     }
      +636 
      +637     /**
      +638      * Initializes unspecified sign properties using available defaults
      +639      * and global settings.
      +640      */
      +641     private void initializeSignProperties() {
      +642         if (!signPackage && !signChanges) {
      +643             return;
      +644         }
      +645 
      +646         if (key != null && keyring != null && passphrase != null) {
      +647             return;
      +648         }
      +649 
      +650         Map<String, String> properties =
      +651                 readPropertiesFromActiveProfiles(signCfgPrefix, KEY, KEYRING, PASSPHRASE);
      +652 
      +653         key = lookupIfEmpty(key, properties, KEY);
      +654         keyring = lookupIfEmpty(keyring, properties, KEYRING);
      +655         passphrase = decrypt(lookupIfEmpty(passphrase, properties, PASSPHRASE));
      +656 
      +657         if (keyring == null) {
      +658             try {
      +659                 keyring = Utils.guessKeyRingFile().getAbsolutePath();
      +660                 console.info("Located keyring at " + keyring);
      +661             } catch (FileNotFoundException e) {
      +662                 console.warn(e.getMessage());
      +663             }
      +664         }
      +665     }
      +666 
      +667     /**
      +668      * Decrypts given passphrase if needed using maven security dispatcher.
      +669      * See http://maven.apache.org/guides/mini/guide-encryption.html for details.
      +670      *
      +671      * @param maybeEncryptedPassphrase possibly encrypted passphrase
      +672      * @return decrypted passphrase
      +673      */
      +674     private String decrypt( final String maybeEncryptedPassphrase ) {
      +675         if (maybeEncryptedPassphrase == null) {
      +676             return null;
      +677         }
      +678 
      +679         try {
      +680             final String decrypted = secDispatcher.decrypt(maybeEncryptedPassphrase);
      +681             if (maybeEncryptedPassphrase.equals(decrypted)) {
      +682                 console.info("Passphrase was not encrypted");
      +683             } else {
      +684                 console.info("Passphrase was successfully decrypted");
      +685             }
      +686             return decrypted;
      +687         } catch (SecDispatcherException e) {
      +688             console.warn("Unable to decrypt passphrase: " + e.getMessage());
      +689         }
      +690 
      +691         return maybeEncryptedPassphrase;
      +692     }
      +693 
      +694     /**
      +695      *
      +696      * @return the maven project used by this mojo
      +697      */
      +698     private MavenProject getProject() {
      +699         if (project.getExecutionProject() != null) {
      +700             return project.getExecutionProject();
      +701         }
      +702 
      +703         return project;
      +704     }
      +705 
      +706 
      +707 
      +708     /**
      +709      * Read properties from the active profiles.
      +710      *
      +711      * Goes through all active profiles (in the order the
      +712      * profiles are defined in settings.xml) and extracts
      +713      * the desired properties (if present). The prefix is
      +714      * used when looking up properties in the profile but
      +715      * not in the returned map.
      +716      *
      +717      * @param prefix The prefix to use or null if no prefix should be used
      +718      * @param properties The properties to read
      +719      *
      +720      * @return A map containing the values for the properties that were found
      +721      */
      +722     public Map<String, String> readPropertiesFromActiveProfiles( final String prefix,
      +723                                                                  final String... properties ) {
      +724         if (settings == null) {
      +725             console.debug("No maven setting injected");
      +726             return Collections.emptyMap();
      +727         }
      +728 
      +729         final List<String> activeProfilesList = settings.getActiveProfiles();
      +730         if (activeProfilesList.isEmpty()) {
      +731             console.debug("No active profiles found");
      +732             return Collections.emptyMap();
      +733         }
      +734 
      +735         final Map<String, String> map = new HashMap<>();
      +736         final Set<String> activeProfiles = new HashSet<>(activeProfilesList);
      +737 
      +738         // Iterate over all active profiles in order
      +739         for (final Profile profile : settings.getProfiles()) {
      +740             // Check if the profile is active
      +741             final String profileId = profile.getId();
      +742             if (activeProfiles.contains(profileId)) {
      +743                 console.debug("Trying active profile " + profileId);
      +744                 for (final String property : properties) {
      +745                     final String propKey = prefix != null ? prefix + property : property;
      +746                     final String value = profile.getProperties().getProperty(propKey);
      +747                     if (value != null) {
      +748                         console.debug("Found property " + property + " in profile " + profileId);
      +749                         map.put(property, value);
      +750                     }
      +751                 }
      +752             }
      +753         }
      +754 
      +755         return map;
      +756     }
      +757 
      +758 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/maven/Mapper.html b/release/1.10/xref/org/vafer/jdeb/maven/Mapper.html new file mode 100644 index 000000000..6fc9b3820 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/Mapper.html @@ -0,0 +1,96 @@ + + + +Mapper xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.maven;
      +18  
      +19  import java.io.File;
      +20  import java.io.FileInputStream;
      +21  import java.io.IOException;
      +22  
      +23  import org.apache.maven.plugins.annotations.Parameter;
      +24  import org.vafer.jdeb.mapping.LsMapper;
      +25  import org.vafer.jdeb.mapping.NullMapper;
      +26  import org.vafer.jdeb.mapping.PermMapper;
      +27  
      +28  /**
      +29   * Maven "mapper" element acting as factory for the entry mapper.
      +30   * Supported types: ls, perm
      +31   */
      +32  public final class Mapper {
      +33  
      +34      @Parameter(required = true)
      +35      private String type;
      +36  
      +37      @Parameter
      +38      private int uid = -1;
      +39  
      +40      @Parameter
      +41      private int gid = -1;
      +42  
      +43      @Parameter
      +44      private String user;
      +45  
      +46      @Parameter
      +47      private String group;
      +48  
      +49      @Parameter
      +50      private String filemode;
      +51  
      +52      @Parameter
      +53      private String dirmode;
      +54  
      +55      @Parameter
      +56      private String prefix;
      +57  
      +58      @Parameter
      +59      private int strip;
      +60  
      +61      @Parameter
      +62      private File src;
      +63  
      +64  
      +65      public org.vafer.jdeb.mapping.Mapper createMapper() throws IOException {
      +66  
      +67          if ("ls".equalsIgnoreCase(type)) {
      +68              try {
      +69                  return new LsMapper(new FileInputStream(src));
      +70              } catch (Exception e) {
      +71                  e.printStackTrace();
      +72              }
      +73          }
      +74  
      +75          if ("perm".equalsIgnoreCase(type)) {
      +76              return new PermMapper(uid, gid, user, group, filemode, dirmode, strip, prefix);
      +77          }
      +78  
      +79          /* NullMapper required for DataProducerPathTemplate */
      +80          return NullMapper.INSTANCE;
      +81      }
      +82  
      +83  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/maven/MissingSourceBehavior.html b/release/1.10/xref/org/vafer/jdeb/maven/MissingSourceBehavior.html new file mode 100644 index 000000000..6c705d681 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/MissingSourceBehavior.html @@ -0,0 +1,34 @@ + + + +MissingSourceBehavior xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.maven;
      +18  
      +19  public enum MissingSourceBehavior {
      +20      IGNORE, FAIL
      +21  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/maven/MojoConsole.html b/release/1.10/xref/org/vafer/jdeb/maven/MojoConsole.html new file mode 100644 index 000000000..f7c2203f7 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/MojoConsole.html @@ -0,0 +1,62 @@ + + + +MojoConsole xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.maven;
      +18  
      +19  import org.apache.maven.plugin.logging.Log;
      +20  import org.vafer.jdeb.Console;
      +21  
      +22  /**
      +23   * Console implementation for Maven plugins. debug messages are only displayed
      +24   * when the <tt>verbose</tt> parameter is true.
      +25   */
      +26  class MojoConsole implements Console {
      +27  
      +28      private final Log log;
      +29      private final boolean verbose;
      +30  
      +31      public MojoConsole(Log log, boolean verbose) {
      +32          this.log = log;
      +33          this.verbose = verbose;
      +34      }
      +35  
      +36      public void debug(String message) {
      +37          if (verbose) {
      +38              log.info(message);
      +39          }
      +40      }
      +41  
      +42      public void info(String message) {
      +43          log.info(message);
      +44      }
      +45  
      +46      public void warn(String message) {
      +47          log.warn(message);
      +48      }
      +49  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/maven/package-frame.html b/release/1.10/xref/org/vafer/jdeb/maven/package-frame.html new file mode 100644 index 000000000..ef464b185 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.maven + + + +

      org.vafer.jdeb.maven

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/maven/package-summary.html b/release/1.10/xref/org/vafer/jdeb/maven/package-summary.html new file mode 100644 index 000000000..b528d510d --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/maven/package-summary.html @@ -0,0 +1,127 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.maven + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.maven

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/package-frame.html b/release/1.10/xref/org/vafer/jdeb/package-frame.html new file mode 100644 index 000000000..b4d60ab6f --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/package-frame.html @@ -0,0 +1,51 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb + + + +

      org.vafer.jdeb

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/package-summary.html b/release/1.10/xref/org/vafer/jdeb/package-summary.html new file mode 100644 index 000000000..effa7f9fd --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/package-summary.html @@ -0,0 +1,157 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/producers/AbstractDataProducer.html b/release/1.10/xref/org/vafer/jdeb/producers/AbstractDataProducer.html new file mode 100644 index 000000000..09560e8d6 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/AbstractDataProducer.html @@ -0,0 +1,114 @@ + + + +AbstractDataProducer xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +19  import org.apache.tools.ant.types.selectors.SelectorUtils;
      +20  import org.vafer.jdeb.DataConsumer;
      +21  import org.vafer.jdeb.DataProducer;
      +22  import org.vafer.jdeb.mapping.Mapper;
      +23  
      +24  import java.io.File;
      +25  import java.io.FileInputStream;
      +26  import java.io.IOException;
      +27  
      +28  /**
      +29   * Base Producer class providing including/excluding.
      +30   */
      +31  public abstract class AbstractDataProducer implements DataProducer {
      +32  
      +33      private final String[] includes;
      +34      private final String[] excludes;
      +35      private final Mapper[] mappers;
      +36  
      +37  
      +38      public AbstractDataProducer( final String[] pIncludes, final String[] pExcludes, final Mapper[] pMapper ) {
      +39          excludes = (pExcludes != null) ? pExcludes : new String[0];
      +40          includes = (pIncludes != null) ? pIncludes : new String[] { "**" };
      +41          mappers = (pMapper != null) ? pMapper : new Mapper[0];
      +42      }
      +43  
      +44      public boolean isIncluded( final String pName ) {
      +45          if (!isIncluded(pName, includes)) {
      +46              return false;
      +47          }
      +48          if (isExcluded(pName, excludes)) {
      +49              return false;
      +50          }
      +51          return true;
      +52      }
      +53  
      +54      private boolean isIncluded( String name, String[] includes ) {
      +55          for (String include : includes) {
      +56              if (SelectorUtils.matchPath(include, name)) {
      +57                  return true;
      +58              }
      +59          }
      +60          return false;
      +61      }
      +62  
      +63  
      +64      private boolean isExcluded( String name, String[] excludes ) {
      +65          for (String exclude : excludes) {
      +66              if (SelectorUtils.matchPath(exclude, name)) {
      +67                  return true;
      +68              }
      +69          }
      +70          return false;
      +71      }
      +72  
      +73      public void produceDir( final DataConsumer consumer,
      +74                              final String dirName ) throws IOException {
      +75          final String name = dirName.endsWith("/") ? dirName : dirName + "/";
      +76          TarArchiveEntry entry = Producers.defaultDirEntryWithName(name);
      +77          entry = map(entry);
      +78          entry.setSize(0);
      +79          Producers.produceDirEntry(consumer, entry);
      +80      }
      +81  
      +82      public void produceFile( final DataConsumer consumer,
      +83                               final File file,
      +84                               final String fileName ) throws IOException {
      +85          TarArchiveEntry fileEntry = Producers.defaultFileEntryWithName(fileName);
      +86          fileEntry.setSize(file.length());
      +87          fileEntry = map(fileEntry);
      +88          Producers.produceInputStreamWithEntry(consumer, new FileInputStream(file), fileEntry);
      +89      }
      +90  
      +91      public TarArchiveEntry map( final TarArchiveEntry pEntry ) {
      +92  
      +93          TarArchiveEntry entry = pEntry;
      +94  
      +95          for (Mapper mapper : mappers) {
      +96              entry = mapper.map(entry);
      +97          }
      +98  
      +99          return entry;
      +100     }
      +101 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerArchive.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerArchive.html new file mode 100644 index 000000000..a9d07f7ed --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerArchive.html @@ -0,0 +1,160 @@ + + + +DataProducerArchive xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import java.io.BufferedInputStream;
      +19  import java.io.File;
      +20  import java.io.FileInputStream;
      +21  import java.io.IOException;
      +22  import java.io.InputStream;
      +23  
      +24  import org.apache.commons.compress.archivers.ArchiveEntry;
      +25  import org.apache.commons.compress.archivers.ArchiveException;
      +26  import org.apache.commons.compress.archivers.ArchiveInputStream;
      +27  import org.apache.commons.compress.archivers.ArchiveStreamFactory;
      +28  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +29  import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
      +30  import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
      +31  import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
      +32  import org.apache.commons.compress.compressors.CompressorException;
      +33  import org.apache.commons.compress.compressors.CompressorInputStream;
      +34  import org.apache.commons.compress.compressors.CompressorStreamFactory;
      +35  import org.vafer.jdeb.DataConsumer;
      +36  import org.vafer.jdeb.DataProducer;
      +37  import org.vafer.jdeb.mapping.Mapper;
      +38  
      +39  /**
      +40   * Providing data from an archive keeping permissions and ownerships.
      +41   */
      +42  public final class DataProducerArchive extends AbstractDataProducer implements DataProducer {
      +43  
      +44      private final File archive;
      +45  
      +46      public DataProducerArchive( final File pArchive, final String[] pIncludes, final String[] pExcludes, final Mapper[] pMappers ) {
      +47          super(pIncludes, pExcludes, pMappers);
      +48          archive = pArchive;
      +49      }
      +50  
      +51      public void produce( final DataConsumer pReceiver ) throws IOException {
      +52  
      +53          InputStream is = new BufferedInputStream(new FileInputStream(archive));
      +54  
      +55          CompressorInputStream compressorInputStream = null;
      +56  
      +57          try {
      +58              compressorInputStream = new CompressorStreamFactory().createCompressorInputStream(is);
      +59          } catch (CompressorException e) {
      +60              // expected if the input file is a zip archive
      +61          }
      +62  
      +63          if (compressorInputStream != null) {
      +64              is = new BufferedInputStream(compressorInputStream);
      +65          }
      +66  
      +67          ArchiveInputStream archiveInputStream;
      +68  
      +69          try {
      +70              archiveInputStream = new ArchiveStreamFactory().createArchiveInputStream(is);
      +71          } catch (ArchiveException e) {
      +72              throw new IOException("Unsupported archive format: " + archive, e);
      +73          }
      +74  
      +75          EntryConverter converter;
      +76  
      +77          if (archiveInputStream instanceof TarArchiveInputStream) {
      +78  
      +79              converter = new EntryConverter() {
      +80                  public TarArchiveEntry convert( ArchiveEntry entry ) {
      +81                      return (TarArchiveEntry) entry;
      +82                  }
      +83              };
      +84  
      +85          } else if (archiveInputStream instanceof ZipArchiveInputStream) {
      +86  
      +87              converter = new EntryConverter() {
      +88                  public TarArchiveEntry convert( ArchiveEntry entry ) {
      +89                      ZipArchiveEntry src = (ZipArchiveEntry) entry;
      +90                      final TarArchiveEntry dst = new TarArchiveEntry(src.getName(), true);
      +91                      //TODO: if (src.isUnixSymlink()) {
      +92                      //}
      +93  
      +94                      dst.setSize(src.getSize());
      +95                      dst.setMode(src.getUnixMode());
      +96                      dst.setModTime(src.getTime());
      +97  
      +98                      return dst;
      +99                  }
      +100             };
      +101 
      +102         } else {
      +103             throw new IOException("Unsupported archive format: " + archive);
      +104         }
      +105 
      +106 
      +107         try {
      +108             while (true) {
      +109 
      +110                 ArchiveEntry archiveEntry = archiveInputStream.getNextEntry();
      +111 
      +112                 if (archiveEntry == null) {
      +113                     break;
      +114                 }
      +115 
      +116                 if (!isIncluded(archiveEntry.getName())) {
      +117                     continue;
      +118                 }
      +119 
      +120                 TarArchiveEntry entry = converter.convert(archiveEntry);
      +121 
      +122                 entry = map(entry);
      +123 
      +124                 if (entry.isSymbolicLink()) {
      +125                     pReceiver.onEachLink(entry);
      +126                     continue;
      +127                 }
      +128 
      +129                 if (entry.isDirectory()) {
      +130                     pReceiver.onEachDir(entry);
      +131                     continue;
      +132                 }
      +133 
      +134                 pReceiver.onEachFile(archiveInputStream, entry);
      +135             }
      +136 
      +137         } finally {
      +138             if (archiveInputStream != null) {
      +139                 archiveInputStream.close();
      +140             }
      +141         }
      +142     }
      +143 
      +144     private interface EntryConverter {
      +145         TarArchiveEntry convert( ArchiveEntry entry );
      +146     }
      +147 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerDirectory.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerDirectory.html new file mode 100644 index 000000000..2b40cf689 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerDirectory.html @@ -0,0 +1,110 @@ + + + +DataProducerDirectory xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import java.io.File;
      +19  import java.io.IOException;
      +20  
      +21  import org.apache.tools.ant.DirectoryScanner;
      +22  import org.vafer.jdeb.DataConsumer;
      +23  import org.vafer.jdeb.DataProducer;
      +24  import org.vafer.jdeb.mapping.Mapper;
      +25  import org.vafer.jdeb.utils.Utils;
      +26  
      +27  /**
      +28   * DataProducer iterating over a directory.
      +29   * For cross-platform permissions and ownerships you probably want to use a Mapper, too.
      +30   */
      +31  public final class DataProducerDirectory extends AbstractDataProducer implements DataProducer {
      +32  
      +33      private final DirectoryScanner scanner = new DirectoryScanner();
      +34  
      +35      public DataProducerDirectory( final File pDir, final String[] pIncludes, final String[] pExcludes, final Mapper[] pMappers ) {
      +36          super(pIncludes, pExcludes, pMappers);
      +37          scanner.setBasedir(pDir);
      +38          scanner.setIncludes(pIncludes);
      +39          scanner.setExcludes(pExcludes);
      +40          scanner.setCaseSensitive(true);
      +41          scanner.setFollowSymlinks(true);
      +42      }
      +43  
      +44      public void produce( final DataConsumer pReceiver ) throws IOException {
      +45  
      +46          scanner.scan();
      +47  
      +48          final File baseDir = scanner.getBasedir();
      +49  
      +50          for (String dir : scanner.getIncludedDirectories()) {
      +51              final File file = new File(baseDir, dir);
      +52              String dirname = getFilename(baseDir, file);
      +53  
      +54              if ("".equals(dirname)) {
      +55                  continue;
      +56              }
      +57  
      +58              if ('/' != File.separatorChar) {
      +59                  dirname = dirname.replace(File.separatorChar, '/');
      +60              }
      +61  
      +62              if (!isIncluded(dirname)) {
      +63                  continue;
      +64              }
      +65  
      +66              if (!dirname.endsWith("/")) {
      +67                  dirname += "/";
      +68              }
      +69  
      +70              produceDir(pReceiver, dirname);
      +71          }
      +72  
      +73  
      +74          for (String f : scanner.getIncludedFiles()) {
      +75              final File file = new File(baseDir, f);
      +76              String filename = getFilename(baseDir, file);
      +77  
      +78              if ('/' != File.separatorChar) {
      +79                  filename = filename.replace(File.separatorChar, '/');
      +80              }
      +81  
      +82              if (!isIncluded(filename)) {
      +83                  continue;
      +84              }
      +85  
      +86              produceFile(pReceiver, file, filename);
      +87          }
      +88      }
      +89  
      +90      private String getFilename( File root, File file ) {
      +91  
      +92          final String relativeFilename = file.getAbsolutePath().substring(root.getAbsolutePath().length());
      +93  
      +94          return Utils.stripLeadingSlash(relativeFilename);
      +95      }
      +96  
      +97  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFile.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFile.html new file mode 100644 index 000000000..79a2c8d89 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFile.html @@ -0,0 +1,73 @@ + + + +DataProducerFile xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import java.io.File;
      +19  import java.io.FileInputStream;
      +20  import java.io.IOException;
      +21  
      +22  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +23  import org.vafer.jdeb.DataConsumer;
      +24  import org.vafer.jdeb.DataProducer;
      +25  import org.vafer.jdeb.mapping.Mapper;
      +26  
      +27  /**
      +28   * DataProducer representing a single file
      +29   * For cross-platform permissions and ownerships you probably want to use a Mapper, too.
      +30   */
      +31  public final class DataProducerFile extends AbstractDataProducer implements DataProducer {
      +32  
      +33      private final File file;
      +34  
      +35      private final String destinationName;
      +36  
      +37      public DataProducerFile( final File pFile, String pDestinationName, String[] pIncludes, String[] pExcludes, Mapper[] pMapper ) {
      +38          super(pIncludes, pExcludes, pMapper);
      +39          file = pFile;
      +40          destinationName = pDestinationName;
      +41      }
      +42  
      +43      public void produce( final DataConsumer pReceiver ) throws IOException {
      +44          String fileName;
      +45          if (destinationName != null && destinationName.trim().length() > 0) {
      +46              fileName = destinationName.trim();
      +47          } else {
      +48              fileName = file.getName();
      +49          }
      +50  
      +51          TarArchiveEntry entry = Producers.defaultFileEntryWithName(fileName);
      +52  
      +53          entry = map(entry);
      +54  
      +55          entry.setSize(file.length());
      +56  
      +57          Producers.produceInputStreamWithEntry(pReceiver, new FileInputStream(file), entry);
      +58      }
      +59  
      +60  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFileSet.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFileSet.html new file mode 100644 index 000000000..6931265d7 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFileSet.html @@ -0,0 +1,133 @@ + + + +DataProducerFileSet xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import java.io.File;
      +19  import java.io.FileInputStream;
      +20  import java.io.IOException;
      +21  import java.io.InputStream;
      +22  
      +23  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +24  import org.apache.commons.compress.archivers.tar.TarConstants;
      +25  import org.apache.tools.ant.DirectoryScanner;
      +26  import org.apache.tools.ant.taskdefs.Tar;
      +27  import org.apache.tools.ant.types.FileSet;
      +28  import org.apache.tools.tar.TarEntry;
      +29  import org.vafer.jdeb.DataConsumer;
      +30  import org.vafer.jdeb.DataProducer;
      +31  import org.vafer.jdeb.utils.SymlinkUtils;
      +32  
      +33  /**
      +34   * DataProducer providing data from an Ant fileset. TarFileSets are also
      +35   * supported with their permissions.
      +36   */
      +37  public final class DataProducerFileSet implements DataProducer {
      +38  
      +39      private final FileSet fileset;
      +40  
      +41      public DataProducerFileSet( final FileSet fileset ) {
      +42          this.fileset = fileset;
      +43      }
      +44  
      +45      public void produce( final DataConsumer pReceiver ) throws IOException {
      +46          String user = Producers.ROOT_NAME;
      +47          int uid = Producers.ROOT_UID;
      +48          String group = Producers.ROOT_NAME;
      +49          int gid = Producers.ROOT_UID;
      +50          int filemode = TarEntry.DEFAULT_FILE_MODE;
      +51          int dirmode = TarEntry.DEFAULT_DIR_MODE;
      +52          String prefix = "";
      +53          String fullpath = "";
      +54  
      +55          if (fileset instanceof Tar.TarFileSet) {
      +56              Tar.TarFileSet tarfileset = (Tar.TarFileSet) fileset;
      +57              user = tarfileset.getUserName();
      +58              uid = tarfileset.getUid();
      +59              group = tarfileset.getGroup();
      +60              gid = tarfileset.getGid();
      +61              filemode = tarfileset.getMode();
      +62              dirmode = tarfileset.getDirMode(tarfileset.getProject());
      +63              prefix = tarfileset.getPrefix(tarfileset.getProject());
      +64              fullpath = tarfileset.getFullpath(tarfileset.getProject());
      +65          }
      +66  
      +67          final DirectoryScanner scanner = fileset.getDirectoryScanner(fileset.getProject());
      +68          scanner.scan();
      +69  
      +70          final File basedir = scanner.getBasedir();
      +71  
      +72          if (scanner.getIncludedFilesCount() != 1 || scanner.getIncludedDirsCount() != 0) {
      +73              // the full path attribute only have sense in this context
      +74              // if it's a single-file fileset, we ignore it otherwise
      +75              fullpath = "";
      +76          }
      +77  
      +78          for (String directory : scanner.getIncludedDirectories()) {
      +79              String name = directory.replace('\\', '/');
      +80  
      +81              final TarArchiveEntry entry = new TarArchiveEntry(prefix + "/" + name);
      +82              entry.setUserName(user);
      +83              entry.setUserId(uid);
      +84              entry.setGroupName(group);
      +85              entry.setGroupId(gid);
      +86              entry.setMode(dirmode);
      +87  
      +88              pReceiver.onEachDir(entry);
      +89          }
      +90  
      +91          for (String filename : scanner.getIncludedFiles()) {
      +92              final String name = filename.replace('\\', '/');
      +93              final File file = new File(basedir, name);
      +94  
      +95              try (InputStream inputStream = new FileInputStream(file)) {
      +96                  final String entryName = "".equals(fullpath) ? prefix + "/" + name : fullpath;
      +97  
      +98                  final File entryPath = new File(entryName);
      +99  
      +100                 final boolean symbolicLink = SymlinkUtils.isSymbolicLink(entryPath);
      +101                 final TarArchiveEntry e;
      +102                 if (symbolicLink) {
      +103                     e = new TarArchiveEntry(entryName, TarConstants.LF_SYMLINK);
      +104                     e.setLinkName(SymlinkUtils.readSymbolicLink(entryPath));
      +105                 } else {
      +106                     e = new TarArchiveEntry(entryName, true);
      +107                 }
      +108 
      +109                 e.setUserId(uid);
      +110                 e.setGroupId(gid);
      +111                 e.setUserName(user);
      +112                 e.setGroupName(group);
      +113                 e.setMode(filemode);
      +114                 e.setSize(file.length());
      +115 
      +116                 pReceiver.onEachFile(inputStream, e);
      +117             }
      +118         }
      +119     }
      +120 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFiles.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFiles.html new file mode 100644 index 000000000..25fb675d3 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerFiles.html @@ -0,0 +1,68 @@ + + + +DataProducerFiles xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import org.vafer.jdeb.DataConsumer;
      +19  import org.vafer.jdeb.mapping.Mapper;
      +20  import org.vafer.jdeb.utils.Utils;
      +21  
      +22  import java.io.File;
      +23  import java.io.IOException;
      +24  
      +25  /**
      +26   * Data producer that places multiple files into a single
      +27   * destination directory.
      +28   */
      +29  public class DataProducerFiles extends AbstractDataProducer {
      +30  
      +31      private final String[] files;
      +32      private final String destDir;
      +33  
      +34      public DataProducerFiles( final String[] files,
      +35                                final String destDir,
      +36                                final Mapper[] mappers ) {
      +37          super(null, null, mappers);
      +38          this.files = files;
      +39          this.destDir = destDir;
      +40      }
      +41  
      +42      public void produce( DataConsumer receiver ) throws IOException {
      +43          boolean hasDestDir = !Utils.isNullOrEmpty(destDir);
      +44  
      +45          for (String fileName : files) {
      +46              File f = new File(fileName);
      +47  
      +48              if (hasDestDir) {
      +49                  fileName = Utils.movePath(fileName, destDir);
      +50              }
      +51  
      +52              produceFile(receiver, f, fileName);
      +53          }
      +54      }
      +55  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerLink.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerLink.html new file mode 100644 index 000000000..c255bc650 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerLink.html @@ -0,0 +1,73 @@ + + + +DataProducerLink xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import java.io.IOException;
      +19  
      +20  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +21  import org.vafer.jdeb.DataConsumer;
      +22  import org.vafer.jdeb.DataProducer;
      +23  import org.vafer.jdeb.mapping.Mapper;
      +24  
      +25  /**
      +26   * DataProducer representing a single file
      +27   * For cross-platform permissions and ownerships you probably want to use a Mapper, too.
      +28   */
      +29  public final class DataProducerLink extends AbstractDataProducer implements DataProducer {
      +30  
      +31      private final String path;
      +32      private final String linkName;
      +33      private final boolean symlink;
      +34  
      +35      public DataProducerLink(final String path, final String linkName, final boolean symlink, String[] pIncludes, String[] pExcludes, Mapper[] pMapper) {
      +36          super(pIncludes, pExcludes, pMapper);
      +37          this.path = path;
      +38          this.symlink = symlink;
      +39          this.linkName = linkName;
      +40      }
      +41  
      +42      public void produce( final DataConsumer pReceiver ) throws IOException {
      +43          TarArchiveEntry entry = new TarArchiveEntry(path, symlink ? TarArchiveEntry.LF_SYMLINK : TarArchiveEntry.LF_LINK);
      +44          entry.setLinkName(linkName);
      +45  
      +46          entry.setUserId(Producers.ROOT_UID);
      +47          entry.setUserName(Producers.ROOT_NAME);
      +48          entry.setGroupId(Producers.ROOT_UID);
      +49          entry.setGroupName(Producers.ROOT_NAME);
      +50          entry.setMode(TarArchiveEntry.DEFAULT_FILE_MODE);
      +51  
      +52          entry = map(entry);
      +53  
      +54          entry.setName(path);
      +55          entry.setLinkName(linkName);
      +56  
      +57          pReceiver.onEachLink(entry);
      +58      }
      +59  
      +60  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/DataProducerPathTemplate.html b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerPathTemplate.html new file mode 100644 index 000000000..c645f6643 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/DataProducerPathTemplate.html @@ -0,0 +1,52 @@ + + + +DataProducerPathTemplate xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import java.io.IOException;
      +19  
      +20  import org.vafer.jdeb.DataConsumer;
      +21  import org.vafer.jdeb.DataProducer;
      +22  import org.vafer.jdeb.mapping.Mapper;
      +23  
      +24  public class DataProducerPathTemplate extends AbstractDataProducer implements DataProducer {
      +25  
      +26      private final String[] literalPaths;
      +27  
      +28      public DataProducerPathTemplate( String[] pLiteralPaths, String[] pIncludes, String[] pExcludes, Mapper[] pMapper ) {
      +29          super(pIncludes, pExcludes, pMapper);
      +30          literalPaths = pLiteralPaths;
      +31      }
      +32  
      +33      public void produce( DataConsumer pReceiver ) throws IOException {
      +34          for (String literalPath : literalPaths) {
      +35              produceDir(pReceiver, literalPath);
      +36          }
      +37      }
      +38  
      +39  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/Producers.html b/release/1.10/xref/org/vafer/jdeb/producers/Producers.html new file mode 100644 index 000000000..80e3fe662 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/Producers.html @@ -0,0 +1,109 @@ + + + +Producers xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.producers;
      +17  
      +18  import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
      +19  
      +20  import org.apache.commons.io.IOUtils;
      +21  import org.vafer.jdeb.DataConsumer;
      +22  
      +23  import java.io.IOException;
      +24  import java.io.InputStream;
      +25  
      +26  /**
      +27   * Package-private utility class with common producers functionality.
      +28   */
      +29  class Producers {
      +30  
      +31      final static int ROOT_UID = 0;
      +32      final static String ROOT_NAME = "root";
      +33  
      +34      private Producers() {}
      +35  
      +36  
      +37      /**
      +38       * Creates a tar file entry with defaults parameters.
      +39       * @param fileName the entry name
      +40       * @return file entry with reasonable defaults
      +41       */
      +42      static TarArchiveEntry defaultFileEntryWithName( final String fileName ) {
      +43          TarArchiveEntry entry = new TarArchiveEntry(fileName, true);
      +44          entry.setUserId(ROOT_UID);
      +45          entry.setUserName(ROOT_NAME);
      +46          entry.setGroupId(ROOT_UID);
      +47          entry.setGroupName(ROOT_NAME);
      +48          entry.setMode(TarArchiveEntry.DEFAULT_FILE_MODE);
      +49          return entry;
      +50      }
      +51  
      +52      /**
      +53       * Creates a tar directory entry with defaults parameters.
      +54       * @param dirName the directory name
      +55       * @return dir entry with reasonable defaults
      +56       */
      +57      static TarArchiveEntry defaultDirEntryWithName( final String dirName ) {
      +58          TarArchiveEntry entry = new TarArchiveEntry(dirName, true);
      +59          entry.setUserId(ROOT_UID);
      +60          entry.setUserName(ROOT_NAME);
      +61          entry.setGroupId(ROOT_UID);
      +62          entry.setGroupName(ROOT_NAME);
      +63          entry.setMode(TarArchiveEntry.DEFAULT_DIR_MODE);
      +64          return entry;
      +65      }
      +66  
      +67      /**
      +68       * Forwards tar archive entry entry to a consumer.
      +69       * @param consumer the consumer
      +70       * @param dirEntry the entry to pass
      +71       * @throws IOException
      +72       */
      +73      static void produceDirEntry( final DataConsumer consumer,
      +74                                   final TarArchiveEntry dirEntry ) throws IOException {
      +75          consumer.onEachDir(dirEntry);
      +76      }
      +77  
      +78  
      +79      /**
      +80       * Feeds input stream to data consumer using metadata from tar entry.
      +81       * @param consumer the consumer
      +82       * @param inputStream the stream to feed
      +83       * @param entry the entry to use for metadata
      +84       * @throws IOException on consume error
      +85       */
      +86      static void produceInputStreamWithEntry( final DataConsumer consumer,
      +87                                               final InputStream inputStream,
      +88                                               final TarArchiveEntry entry ) throws IOException {
      +89          try {
      +90              consumer.onEachFile(inputStream, entry);
      +91          } finally {
      +92              IOUtils.closeQuietly(inputStream);
      +93          }
      +94      }
      +95  
      +96  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/producers/package-frame.html b/release/1.10/xref/org/vafer/jdeb/producers/package-frame.html new file mode 100644 index 000000000..fffd0cd27 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/package-frame.html @@ -0,0 +1,48 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.producers + + + +

      org.vafer.jdeb.producers

      + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/producers/package-summary.html b/release/1.10/xref/org/vafer/jdeb/producers/package-summary.html new file mode 100644 index 000000000..a7f4af8f9 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/producers/package-summary.html @@ -0,0 +1,152 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.producers + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.producers

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/signing/PGPSigner.html b/release/1.10/xref/org/vafer/jdeb/signing/PGPSigner.html new file mode 100644 index 000000000..aa6035861 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/signing/PGPSigner.html @@ -0,0 +1,188 @@ + + + +PGPSigner xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.signing;
      +18  
      +19  import java.io.ByteArrayInputStream;
      +20  import java.io.IOException;
      +21  import java.io.InputStream;
      +22  import java.io.InputStreamReader;
      +23  import java.io.OutputStream;
      +24  import java.util.Iterator;
      +25  
      +26  import org.apache.commons.io.LineIterator;
      +27  import org.bouncycastle.bcpg.ArmoredOutputStream;
      +28  import org.bouncycastle.bcpg.BCPGOutputStream;
      +29  import org.bouncycastle.openpgp.PGPException;
      +30  import org.bouncycastle.openpgp.PGPPrivateKey;
      +31  import org.bouncycastle.openpgp.PGPSecretKey;
      +32  import org.bouncycastle.openpgp.PGPSecretKeyRing;
      +33  import org.bouncycastle.openpgp.PGPSecretKeyRingCollection;
      +34  import org.bouncycastle.openpgp.PGPSignature;
      +35  import org.bouncycastle.openpgp.PGPSignatureGenerator;
      +36  import org.bouncycastle.openpgp.PGPUtil;
      +37  import org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder;
      +38  import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder;
      +39  import org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider;
      +40  import org.bouncycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator;
      +41  
      +42  import static java.nio.charset.StandardCharsets.*;
      +43  
      +44  /**
      +45   * Signing with OpenPGP.
      +46   */
      +47  public class PGPSigner {
      +48  
      +49      private static final byte[] EOL = "\n".getBytes(UTF_8);
      +50  
      +51      private PGPSecretKey secretKey;
      +52      private PGPPrivateKey privateKey;
      +53      private int digest;
      +54  
      +55      public PGPSigner(InputStream keyring, String keyId, String passphrase, int digest) throws IOException, PGPException {
      +56          secretKey = getSecretKey(keyring, keyId);
      +57          if(secretKey == null)
      +58          {
      +59              throw new PGPException(String.format("Specified key %s does not exist in key ring %s", keyId, keyring));
      +60          }
      +61          privateKey = secretKey.extractPrivateKey(new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(passphrase.toCharArray()));
      +62          this.digest = digest;
      +63      }
      +64  
      +65      /**
      +66       * Creates a clear sign signature over the input data. (Not detached)
      +67       *
      +68       * @param input      the content to be signed
      +69       * @param output     the output destination of the signature
      +70       */
      +71      public void clearSign(String input, OutputStream output) throws IOException, PGPException {
      +72          clearSign(new ByteArrayInputStream(input.getBytes(UTF_8)), output);
      +73      }
      +74  
      +75      /**
      +76       * Creates a clear sign signature over the input data. (Not detached)
      +77       *
      +78       * @param input      the content to be signed
      +79       * @param output     the output destination of the signature
      +80       */
      +81      public void clearSign(InputStream input, OutputStream output) throws IOException, PGPException {
      +82  
      +83          PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(privateKey.getPublicKeyPacket().getAlgorithm(), digest));
      +84          signatureGenerator.init(PGPSignature.CANONICAL_TEXT_DOCUMENT, privateKey);
      +85  
      +86          ArmoredOutputStream armoredOutput = new ArmoredOutputStream(output);
      +87          armoredOutput.beginClearText(digest);
      +88  
      +89          LineIterator iterator = new LineIterator(new InputStreamReader(input));
      +90  
      +91          while (iterator.hasNext()) {
      +92              String line = iterator.nextLine();
      +93  
      +94              // trailing spaces must be removed for signature calculation (see http://tools.ietf.org/html/rfc4880#section-7.1)
      +95              byte[] data = trim(line).getBytes(UTF_8);
      +96  
      +97              armoredOutput.write(data);
      +98              armoredOutput.write(EOL);
      +99  
      +100             signatureGenerator.update(data);
      +101             if (iterator.hasNext()) {
      +102                 signatureGenerator.update(EOL);
      +103             }
      +104         }
      +105 
      +106         armoredOutput.endClearText();
      +107 
      +108         PGPSignature signature = signatureGenerator.generate();
      +109         signature.encode(new BCPGOutputStream(armoredOutput));
      +110 
      +111         armoredOutput.close();
      +112     }
      +113 
      +114     /**
      +115      * Returns the secret key.
      +116      */
      +117     public PGPSecretKey getSecretKey()
      +118     {
      +119         return secretKey;
      +120     }
      +121 
      +122     /**
      +123      * Returns the private key.
      +124      */
      +125     public PGPPrivateKey getPrivateKey()
      +126     {
      +127         return privateKey;
      +128     }
      +129 
      +130     /**
      +131      * Returns the secret key matching the specified identifier.
      +132      *
      +133      * @param input the input stream containing the keyring collection
      +134      * @param keyId the 4 bytes identifier of the key
      +135      */
      +136     private PGPSecretKey getSecretKey(InputStream input, String keyId) throws IOException, PGPException {
      +137         PGPSecretKeyRingCollection keyrings = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(input), new JcaKeyFingerprintCalculator());
      +138 
      +139         Iterator<PGPSecretKeyRing> rIt = keyrings.getKeyRings();
      +140 
      +141         while (rIt.hasNext()) {
      +142             PGPSecretKeyRing kRing = rIt.next();
      +143             Iterator<PGPSecretKey> kIt = kRing.getSecretKeys();
      +144 
      +145             while (kIt.hasNext()) {
      +146                 PGPSecretKey key = kIt.next();
      +147 
      +148                 if (key.isSigningKey() && String.format("%08x", key.getKeyID() & 0xFFFFFFFFL).equals(keyId.toLowerCase())) {
      +149                     return key;
      +150                 }
      +151             }
      +152         }
      +153 
      +154         return null;
      +155     }
      +156 
      +157     /**
      +158      * Trim the trailing spaces.
      +159      *
      +160      * @param line
      +161      */
      +162     private String trim(String line) {
      +163         char[] chars = line.toCharArray();
      +164         int len = chars.length;
      +165 
      +166         while (len > 0) {
      +167             if (!Character.isWhitespace(chars[len - 1])) {
      +168                 break;
      +169             }
      +170             len--;
      +171         }
      +172 
      +173         return line.substring(0, len);
      +174     }
      +175 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/signing/package-frame.html b/release/1.10/xref/org/vafer/jdeb/signing/package-frame.html new file mode 100644 index 000000000..8b98c47dd --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/signing/package-frame.html @@ -0,0 +1,21 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.signing + + + +

      org.vafer.jdeb.signing

      +
      +

      Classes

      + +
      + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/signing/package-summary.html b/release/1.10/xref/org/vafer/jdeb/signing/package-summary.html new file mode 100644 index 000000000..53f3b7a26 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/signing/package-summary.html @@ -0,0 +1,107 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.signing + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.signing

      +
      +
      +
        +
      • + + + + + + + + + + + + +
        Class Summary 
        Class
        + PGPSigner +
        +
      • +
      +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/utils/FilteredFile.html b/release/1.10/xref/org/vafer/jdeb/utils/FilteredFile.html new file mode 100644 index 000000000..73fac821e --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/FilteredFile.html @@ -0,0 +1,77 @@ + + + +FilteredFile xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.utils;
      +18  
      +19  import java.io.BufferedReader;
      +20  import java.io.IOException;
      +21  import java.io.InputStream;
      +22  import java.io.InputStreamReader;
      +23  import java.util.ArrayList;
      +24  import java.util.List;
      +25  
      +26  public class FilteredFile {
      +27  
      +28      private String openToken = "[[";
      +29      private String closeToken = "]]";
      +30      private List<String> lines = new ArrayList<>();
      +31  
      +32      public FilteredFile(InputStream in, VariableResolver resolver) throws IOException {
      +33          parse(in, resolver);
      +34      }
      +35  
      +36      public void setOpenToken(String token) {
      +37          openToken = token;
      +38      }
      +39  
      +40      public void setCloseToken(String token) {
      +41          closeToken = token;
      +42      }
      +43  
      +44      private void parse(InputStream in, VariableResolver resolver) throws IOException {
      +45          try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
      +46              String line;
      +47              while ((line = reader.readLine()) != null) {
      +48                  if (resolver != null) {
      +49                      lines.add(Utils.replaceVariables(resolver, line, openToken, closeToken));
      +50                  } else {
      +51                      lines.add(line);
      +52                  }
      +53              }
      +54          }
      +55      }
      +56  
      +57      public String toString() {
      +58          StringBuilder builder = new StringBuilder();
      +59          for (String line : lines) {
      +60              builder.append(line).append('\n');
      +61          }
      +62          return builder.toString();
      +63      }
      +64  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/InformationInputStream.html b/release/1.10/xref/org/vafer/jdeb/utils/InformationInputStream.html new file mode 100644 index 000000000..9a3b2d5ff --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/InformationInputStream.html @@ -0,0 +1,200 @@ + + + +InformationInputStream xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  
      +17  package org.vafer.jdeb.utils;
      +18  
      +19  import java.io.FilterInputStream;
      +20  import java.io.IOException;
      +21  import java.io.InputStream;
      +22  import java.util.HashMap;
      +23  import java.util.Map;
      +24  
      +25  public final class InformationInputStream extends FilterInputStream {
      +26  
      +27      private long i;
      +28      private long ascii;
      +29      private long nonascii;
      +30      private long cr;
      +31      private long lf;
      +32      private long zero;
      +33  
      +34      private final Map<BOM, Integer> bomPositions = new HashMap<>();
      +35      private final Map<Shell, Integer> shellPositions = new HashMap<>();
      +36  
      +37      /**
      +38       * Byte Order Marks
      +39       */
      +40      private enum BOM {
      +41          NONE(null),
      +42          UTF8("UTF-8", 0xEF, 0xBB, 0xBF),
      +43          UTF16LE("UTF-16LE", 0xFF, 0xFE),
      +44          UTF16BE("UTF-16BE", 0xFE, 0xFF);
      +45  
      +46          int[] sequence;
      +47          String encoding;
      +48  
      +49          BOM( String encoding, int... sequence ) {
      +50              this.encoding = encoding;
      +51              this.sequence = sequence;
      +52          }
      +53      }
      +54  
      +55      /**
      +56       * Shebang for shell scripts in various encodings.
      +57       */
      +58      private enum Shell {
      +59          NONE,
      +60          ASCII(0x23, 0x21),
      +61          UTF16BE(0x00, 0x23, 0x00, 0x21),
      +62          UTF16LE(0x23, 0x00, 0x21, 0x00);
      +63  
      +64          int[] header;
      +65  
      +66          Shell( int... header ) {
      +67              this.header = header;
      +68          }
      +69      }
      +70  
      +71      private BOM bom = BOM.NONE;
      +72      private Shell shell = Shell.NONE;
      +73  
      +74      public InformationInputStream( InputStream in ) {
      +75          super(in);
      +76      }
      +77  
      +78      public boolean hasBom() {
      +79          return bom != BOM.NONE;
      +80      }
      +81  
      +82      public boolean isShell() {
      +83          return shell != Shell.NONE;
      +84      }
      +85  
      +86      public boolean hasUnixLineEndings() {
      +87          return cr == 0;
      +88      }
      +89  
      +90      public String getEncoding() {
      +91          String encoding = bom.encoding;
      +92  
      +93          if (encoding == null) {
      +94              // guess the encoding from the shebang
      +95              if (shell == Shell.UTF16BE) {
      +96                  encoding = BOM.UTF16BE.encoding;
      +97              } else if (shell == Shell.UTF16LE) {
      +98                  encoding = BOM.UTF16LE.encoding;
      +99              }
      +100         }
      +101 
      +102         return encoding;
      +103     }
      +104 
      +105     private void add( int c ) {
      +106         if (i < 10) {
      +107             if (shell == Shell.NONE) {
      +108                 for (Shell shell : Shell.values()) {
      +109                     int position = shellPositions.containsKey(shell) ? shellPositions.get(shell) : 0;
      +110                     if (position < shell.header.length) {
      +111                         if (c == shell.header[position]) {
      +112                             shellPositions.put(shell, position + 1);
      +113                         } else {
      +114                             shellPositions.put(shell, 0);
      +115                         }
      +116                     } else {
      +117                         this.shell = shell;
      +118                     }
      +119                 }
      +120             }
      +121 
      +122             if (bom == BOM.NONE) {
      +123                 for (BOM bom : BOM.values()) {
      +124                     int position = bomPositions.containsKey(bom) ? bomPositions.get(bom) : 0;
      +125                     if (position < bom.sequence.length) {
      +126                         if (c == bom.sequence[position] && position == i) {
      +127                             bomPositions.put(bom, position + 1);
      +128                         } else {
      +129                             bomPositions.put(bom, 0);
      +130                         }
      +131                     } else {
      +132                         this.bom = bom;
      +133                     }
      +134                 }
      +135             }
      +136         }
      +137 
      +138         i++;
      +139 
      +140         if (c == '\n') {
      +141             lf++;
      +142             return;
      +143         }
      +144         if (c == '\r') {
      +145             cr++;
      +146             return;
      +147         }
      +148         if (c >= ' ' && c <= '~') {
      +149             ascii++;
      +150             return;
      +151         }
      +152         if (c == 0) {
      +153             zero++;
      +154             return;
      +155         }
      +156         nonascii++;
      +157     }
      +158 
      +159     public int read() throws IOException {
      +160         int b = super.read();
      +161         if (b != -1) {
      +162             add(b & 0xFF);
      +163         }
      +164         return b;
      +165     }
      +166 
      +167     public int read( byte[] b, int off, int len ) throws IOException {
      +168         int length = super.read(b, off, len);
      +169         for (int i = 0; i < length; i++) {
      +170             add(b[off + i] & 0xFF);
      +171         }
      +172         return length;
      +173     }
      +174 
      +175     public String toString() {
      +176         StringBuilder sb = new StringBuilder();
      +177         sb.append("{");
      +178         sb.append("total=").append(i);
      +179         sb.append(",noascii=").append(nonascii);
      +180         sb.append(",ascii=").append(ascii);
      +181         sb.append(",cr=").append(cr);
      +182         sb.append(",lf=").append(lf);
      +183         sb.append(",zero=").append(zero);
      +184         sb.append("}");
      +185         return sb.toString();
      +186     }
      +187 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/InformationOutputStream.html b/release/1.10/xref/org/vafer/jdeb/utils/InformationOutputStream.html new file mode 100644 index 000000000..f12839755 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/InformationOutputStream.html @@ -0,0 +1,69 @@ + + + +InformationOutputStream xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.utils;
      +17  
      +18  import java.io.IOException;
      +19  import java.io.OutputStream;
      +20  import java.security.DigestOutputStream;
      +21  import java.security.MessageDigest;
      +22  
      +23  /**
      +24   * Convenience class to provide digest info and length of a stream.
      +25   *
      +26   * ATTENTION: don't use outside of jdeb
      +27   */
      +28  public class InformationOutputStream extends DigestOutputStream {
      +29  
      +30      private final MessageDigest digest;
      +31      private long size;
      +32  
      +33      public InformationOutputStream( OutputStream pStream, MessageDigest pDigest ) {
      +34          super(pStream, pDigest);
      +35          digest = pDigest;
      +36          size = 0;
      +37      }
      +38  
      +39      public String getHexDigest() {
      +40          return Utils.toHex(digest.digest());
      +41      }
      +42  
      +43      public void write( byte[] b, int off, int len ) throws IOException {
      +44          super.write(b, off, len);
      +45          size += len;
      +46      }
      +47  
      +48      public void write( int b ) throws IOException {
      +49          super.write(b);
      +50          size++;
      +51      }
      +52  
      +53      public long getSize() {
      +54          return size;
      +55      }
      +56  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/MapVariableResolver.html b/release/1.10/xref/org/vafer/jdeb/utils/MapVariableResolver.html new file mode 100644 index 000000000..65ba111e6 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/MapVariableResolver.html @@ -0,0 +1,50 @@ + + + +MapVariableResolver xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.utils;
      +17  
      +18  import java.util.Map;
      +19  
      +20  /**
      +21   * Resolve variables based on a Map.
      +22   *
      +23   * ATTENTION: don't use outside of jdeb
      +24   */
      +25  public final class MapVariableResolver implements VariableResolver {
      +26  
      +27      private final Map<String, String> map;
      +28  
      +29      public MapVariableResolver( Map<String, String> map ) {
      +30          this.map = map;
      +31      }
      +32  
      +33      public String get( String key ) {
      +34          return map.get(key);
      +35      }
      +36  
      +37  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/OutputTimestampResolver.html b/release/1.10/xref/org/vafer/jdeb/utils/OutputTimestampResolver.html new file mode 100644 index 000000000..5aa0ce726 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/OutputTimestampResolver.html @@ -0,0 +1,63 @@ + + + +OutputTimestampResolver xref + + + +
      +1   package org.vafer.jdeb.utils;
      +2   
      +3   import java.util.Date;
      +4   import java.util.concurrent.TimeUnit;
      +5   
      +6   import org.apache.maven.archiver.MavenArchiver;
      +7   import org.vafer.jdeb.Console;
      +8   
      +9   public class OutputTimestampResolver {
      +10      private final Console console;
      +11      private final EnvironmentVariablesReader envReader;
      +12  
      +13      public OutputTimestampResolver(Console console) {
      +14          this(console, new EnvironmentVariablesReader());
      +15      }
      +16  
      +17      OutputTimestampResolver(Console console, EnvironmentVariablesReader envReader) {
      +18          this.console = console;
      +19          this.envReader = envReader;
      +20      }
      +21  
      +22      public Long resolveOutputTimestamp(String paramValue) {
      +23          if (paramValue != null) {
      +24              Date outputDate = new MavenArchiver().parseOutputTimestamp(paramValue);
      +25              if (outputDate != null) {
      +26                  console.info("Accepted outputTimestamp parameter: " + paramValue);
      +27                  return outputDate.getTime();
      +28              }
      +29          }
      +30  
      +31          String sourceDate = envReader.getSourceDateEpoch();
      +32          if (sourceDate != null && !sourceDate.isEmpty()) {
      +33              try {
      +34                  long sourceDateVal = Long.parseLong(sourceDate);
      +35                  console.info("Accepted SOURCE_DATE_EPOCH environment variable: " + sourceDate);
      +36                  return sourceDateVal * TimeUnit.SECONDS.toMillis(1);
      +37              } catch (NumberFormatException e) {
      +38                  throw new IllegalArgumentException("Invalid SOURCE_DATE_EPOCH environment variable value: " + sourceDate, e);
      +39              }
      +40          }
      +41  
      +42          return null;
      +43      }
      +44  
      +45      static class EnvironmentVariablesReader {
      +46          String getSourceDateEpoch() {
      +47              return System.getenv("SOURCE_DATE_EPOCH");
      +48          }
      +49      }
      +50  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/PGPSignatureOutputStream.html b/release/1.10/xref/org/vafer/jdeb/utils/PGPSignatureOutputStream.html new file mode 100644 index 000000000..092f09015 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/PGPSignatureOutputStream.html @@ -0,0 +1,67 @@ + + + +PGPSignatureOutputStream xref + + + +
      +1   package org.vafer.jdeb.utils;
      +2   
      +3   import java.io.ByteArrayOutputStream;
      +4   import java.io.IOException;
      +5   import java.io.OutputStream;
      +6   
      +7   import org.bouncycastle.bcpg.ArmoredOutputStream;
      +8   import org.bouncycastle.openpgp.PGPException;
      +9   import org.bouncycastle.openpgp.PGPSignature;
      +10  import org.bouncycastle.openpgp.PGPSignatureGenerator;
      +11  
      +12  /**
      +13   * An output stream that calculates the signature of the input data as it
      +14   * is written
      +15   */
      +16  public class PGPSignatureOutputStream extends OutputStream {
      +17      private final PGPSignatureGenerator signatureGenerator;
      +18  
      +19      public PGPSignatureOutputStream( PGPSignatureGenerator signatureGenerator ) {
      +20          super();
      +21          this.signatureGenerator = signatureGenerator;
      +22      }
      +23  
      +24      public void write( int b ) throws IOException {
      +25          signatureGenerator.update(new byte[] { (byte)b });
      +26      }
      +27  
      +28      public void write( byte[] b ) throws IOException {
      +29          signatureGenerator.update(b);
      +30      }
      +31  
      +32      public void write( byte[] b, int off, int len ) throws IOException {
      +33          signatureGenerator.update(b, off, len);
      +34      }
      +35  
      +36      public PGPSignature generateSignature() throws PGPException {
      +37          return signatureGenerator.generate();
      +38      }
      +39  
      +40      public String generateASCIISignature() throws PGPException {
      +41          try {
      +42              PGPSignature signature = generateSignature();
      +43              ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      +44              ArmoredOutputStream armorStream = new ArmoredOutputStream(buffer);
      +45              signature.encode(armorStream);
      +46              armorStream.close();
      +47              return buffer.toString();
      +48          } catch(IOException e) {
      +49              //Should never happen since we are just using a memory buffer
      +50              throw new RuntimeException(e);
      +51          }
      +52      }
      +53  
      +54  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/SymlinkUtils.html b/release/1.10/xref/org/vafer/jdeb/utils/SymlinkUtils.html new file mode 100644 index 000000000..fd5ee225d --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/SymlinkUtils.html @@ -0,0 +1,56 @@ + + + +SymlinkUtils xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.utils;
      +17  
      +18  import java.io.File;
      +19  import java.io.IOException;
      +20  
      +21  /**
      +22   * Simple utilities to deal with symbolic links
      +23   */
      +24  public final class SymlinkUtils {
      +25      private SymlinkUtils() {
      +26      }
      +27  
      +28      public static boolean isSymbolicLink(final File file) throws IOException {
      +29          final File canon;
      +30          if (file.getParent() == null) {
      +31              canon = file;
      +32          } else {
      +33              final File canonDir = file.getParentFile().getCanonicalFile();
      +34              canon = new File(canonDir, file.getName());
      +35          }
      +36          return !canon.getCanonicalFile().equals(canon.getAbsoluteFile());
      +37      }
      +38  
      +39      public static String readSymbolicLink(final File file) throws IOException {
      +40          return file.getCanonicalFile().getPath();
      +41      }
      +42  
      +43  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/Utils.html b/release/1.10/xref/org/vafer/jdeb/utils/Utils.html new file mode 100644 index 000000000..f30dc2316 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/Utils.html @@ -0,0 +1,455 @@ + + + +Utils xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.utils;
      +17  
      +18  import java.io.ByteArrayOutputStream;
      +19  import java.io.File;
      +20  import java.io.FileNotFoundException;
      +21  import java.io.IOException;
      +22  import java.io.InputStream;
      +23  import java.io.InputStreamReader;
      +24  import java.io.OutputStream;
      +25  import java.text.SimpleDateFormat;
      +26  import java.util.Collection;
      +27  import java.util.Date;
      +28  import java.util.Iterator;
      +29  import java.util.LinkedHashSet;
      +30  import java.util.Map;
      +31  import java.util.TimeZone;
      +32  import java.util.regex.Matcher;
      +33  import java.util.regex.Pattern;
      +34  
      +35  import org.apache.tools.ant.filters.FixCrLfFilter;
      +36  import org.apache.tools.ant.util.ReaderInputStream;
      +37  
      +38  /**
      +39   * Simple utils functions.
      +40   *
      +41   * ATTENTION: don't use outside of jdeb
      +42   */
      +43  public final class Utils {
      +44      private static final Pattern BETA_PATTERN = Pattern.compile("^(?:(?:(.*?)([.\\-_]))|(.*[^a-z]))(alpha|a|beta|b|milestone|m|cr|rc)([^a-z].*)?$", Pattern.CASE_INSENSITIVE);
      +45  
      +46      private static final Pattern SNAPSHOT_PATTERN = Pattern.compile("(.*)[\\-+]SNAPSHOT");
      +47  
      +48      public static int copy( final InputStream pInput, final OutputStream pOutput ) throws IOException {
      +49          final byte[] buffer = new byte[2048];
      +50          int count = 0;
      +51          int n;
      +52          while (-1 != (n = pInput.read(buffer))) {
      +53              pOutput.write(buffer, 0, n);
      +54              count += n;
      +55          }
      +56          return count;
      +57      }
      +58  
      +59      public static String toHex( final byte[] bytes ) {
      +60          final StringBuilder sb = new StringBuilder();
      +61  
      +62          for (byte b : bytes) {
      +63              sb.append(Integer.toHexString((b >> 4) & 0x0f));
      +64              sb.append(Integer.toHexString(b & 0x0f));
      +65          }
      +66  
      +67          return sb.toString();
      +68      }
      +69  
      +70      public static String stripPath( final int p, final String s ) {
      +71  
      +72          if (p <= 0) {
      +73              return s;
      +74          }
      +75  
      +76          int x = 0;
      +77          for (int i = 0; i < p; i++) {
      +78              x = s.indexOf('/', x + 1);
      +79              if (x < 0) {
      +80                  return s;
      +81              }
      +82          }
      +83  
      +84          return s.substring(x + 1);
      +85      }
      +86  
      +87      private static String joinPath(char sep, String ...paths) {
      +88          final StringBuilder sb = new StringBuilder();
      +89          for (String p : paths) {
      +90              if (p == null) continue;
      +91              if (!p.startsWith("/") && sb.length() > 0) {
      +92                  sb.append(sep);
      +93              }
      +94              sb.append(p);
      +95          }
      +96          return sb.toString();
      +97      }
      +98  
      +99      public static String joinUnixPath(String ...paths) {
      +100         return joinPath('/', paths);
      +101     }
      +102 
      +103     public static String joinLocalPath(String ...paths) {
      +104         return joinPath(File.separatorChar, paths);
      +105     }
      +106 
      +107     public static String stripLeadingSlash( final String s ) {
      +108         if (s == null) {
      +109             return s;
      +110         }
      +111         if (s.length() == 0) {
      +112             return s;
      +113         }
      +114         if (s.charAt(0) == '/' || s.charAt(0) == '\\') {
      +115             return s.substring(1);
      +116         }
      +117         return s;
      +118     }
      +119 
      +120     /**
      +121      * Substitute the variables in the given expression with the
      +122      * values from the resolver
      +123      *
      +124      * @param pResolver
      +125      * @param pExpression
      +126      */
      +127     public static String replaceVariables( final VariableResolver pResolver, final String pExpression, final String pOpen, final String pClose ) {
      +128         final char[] open = pOpen.toCharArray();
      +129         final char[] close = pClose.toCharArray();
      +130 
      +131         final StringBuilder out = new StringBuilder();
      +132         StringBuilder sb = new StringBuilder();
      +133         char[] last = null;
      +134         int wo = 0;
      +135         int wc = 0;
      +136         int level = 0;
      +137         for (char c : pExpression.toCharArray()) {
      +138             if (c == open[wo]) {
      +139                 if (wc > 0) {
      +140                     sb.append(close, 0, wc);
      +141                 }
      +142                 wc = 0;
      +143                 wo++;
      +144                 if (open.length == wo) {
      +145                     // found open
      +146                     if (last == open) {
      +147                         out.append(open);
      +148                     }
      +149                     level++;
      +150                     out.append(sb);
      +151                     sb = new StringBuilder();
      +152                     wo = 0;
      +153                     last = open;
      +154                 }
      +155             } else if (c == close[wc]) {
      +156                 if (wo > 0) {
      +157                     sb.append(open, 0, wo);
      +158                 }
      +159                 wo = 0;
      +160                 wc++;
      +161                 if (close.length == wc) {
      +162                     // found close
      +163                     if (last == open) {
      +164                         final String variable = pResolver.get(sb.toString());
      +165                         if (variable != null) {
      +166                             out.append(variable);
      +167                         } else {
      +168                             out.append(open);
      +169                             out.append(sb);
      +170                             out.append(close);
      +171                         }
      +172                     } else {
      +173                         out.append(sb);
      +174                         out.append(close);
      +175                     }
      +176                     sb = new StringBuilder();
      +177                     level--;
      +178                     wc = 0;
      +179                     last = close;
      +180                 }
      +181             } else {
      +182 
      +183                 if (wo > 0) {
      +184                     sb.append(open, 0, wo);
      +185                 }
      +186 
      +187                 if (wc > 0) {
      +188                     sb.append(close, 0, wc);
      +189                 }
      +190 
      +191                 sb.append(c);
      +192 
      +193                 wo = wc = 0;
      +194             }
      +195         }
      +196 
      +197         if (wo > 0) {
      +198             sb.append(open, 0, wo);
      +199         }
      +200 
      +201         if (wc > 0) {
      +202             sb.append(close, 0, wc);
      +203         }
      +204 
      +205         if (level > 0) {
      +206             out.append(open);
      +207         }
      +208         out.append(sb);
      +209 
      +210         return out.toString();
      +211     }
      +212 
      +213     /**
      +214      * Replaces new line delimiters in the input stream with the Unix line feed.
      +215      *
      +216      * @param input
      +217      */
      +218     public static byte[] toUnixLineEndings( InputStream input ) throws IOException {
      +219         String encoding = "ISO-8859-1";
      +220         FixCrLfFilter filter = new FixCrLfFilter(new InputStreamReader(input, encoding));
      +221         filter.setEol(FixCrLfFilter.CrLf.newInstance("unix"));
      +222 
      +223         ByteArrayOutputStream filteredFile = new ByteArrayOutputStream();
      +224         Utils.copy(new ReaderInputStream(filter, encoding), filteredFile);
      +225 
      +226         return filteredFile.toByteArray();
      +227     }
      +228 
      +229     private static String formatSnapshotTemplate( String template, Date timestamp ) {
      +230         int startBracket = template.indexOf('[');
      +231         int endBracket = template.indexOf(']');
      +232         if(startBracket == -1 || endBracket == -1) {
      +233             return template;
      +234         } else {
      +235             // prefix[yyMMdd]suffix
      +236             final String date = new SimpleDateFormat(template.substring(startBracket + 1, endBracket)).format(timestamp);
      +237             String datePrefix = startBracket == 0 ? "" : template.substring(0, startBracket);
      +238             String dateSuffix = endBracket == template.length() ? "" : template.substring(endBracket + 1);
      +239             return datePrefix + date + dateSuffix;
      +240         }
      +241     }
      +242 
      +243     /**
      +244      * Convert the project version to a version suitable for a Debian package.
      +245      * -SNAPSHOT suffixes are replaced with a timestamp (~yyyyMMddHHmmss).
      +246      * The separator before a rc, alpha or beta version is replaced with '~'
      +247      * such that the version is always ordered before the final or GA release.
      +248      *
      +249      * @param version the project version to convert to a Debian package version
      +250      * @param template the template used to replace -SNAPSHOT, the timestamp format is in brackets,
      +251      *        the rest of the string is preserved (prefix[yyMMdd]suffix -> prefix151230suffix)
      +252      * @param timestamp the UTC date used as the timestamp to replace the SNAPSHOT suffix.
      +253      */
      +254     public static String convertToDebianVersion( String version, boolean apply, String envName, String template, Date timestamp ) {
      +255         Matcher matcher = SNAPSHOT_PATTERN.matcher(version);
      +256         if (matcher.matches()) {
      +257             version = matcher.group(1) + "~";
      +258 
      +259             if (apply) {
      +260                 final String envValue = System.getenv(envName);
      +261                 if(template != null && template.length() > 0) {
      +262                     version += formatSnapshotTemplate(template, timestamp);
      +263                 } else if (envValue != null && envValue.length() > 0) {
      +264                     version += envValue;
      +265                 } else {
      +266                     SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
      +267                     dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
      +268                     version += dateFormat.format(timestamp);
      +269                 }
      +270             } else {
      +271                 version += "SNAPSHOT";
      +272             }
      +273         } else {
      +274             matcher = BETA_PATTERN.matcher(version);
      +275             if (matcher.matches()) {
      +276                 if (matcher.group(1) != null) {
      +277                     version = matcher.group(1) + "~" + matcher.group(4) + matcher.group(5);
      +278                 } else {
      +279                     version = matcher.group(3) + "~" + matcher.group(4) + matcher.group(5);
      +280                 }
      +281             }
      +282         }
      +283 
      +284         // safest upstream_version should only contain full stop, plus, tilde, and alphanumerics
      +285         // https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
      +286         version = version.replaceAll("[^.+~A-Za-z0-9]", "+").replaceAll("\\++", "+");
      +287 
      +288         return version;
      +289     }
      +290 
      +291     /**
      +292      * Construct new path by replacing file directory part. No
      +293      * files are actually modified.
      +294      * @param file path to move
      +295      * @param target new path directory
      +296      */
      +297     public static String movePath( final String file,
      +298                                    final String target ) {
      +299         final String name = new File(file).getName();
      +300         return target.endsWith("/") ? target + name : target + '/' + name;
      +301     }
      +302 
      +303     /**
      +304      * Extracts value from map if given value is null.
      +305      * @param value current value
      +306      * @param props properties to extract value from
      +307      * @param key property name to extract
      +308      * @return initial value or value extracted from map
      +309      */
      +310     public static String lookupIfEmpty( final String value,
      +311                                         final Map<String, String> props,
      +312                                         final String key ) {
      +313         return value != null ? value : props.get(key);
      +314     }
      +315 
      +316     /**
      +317     * Get the known locations where the secure keyring can be located.
      +318     * Looks through known locations of the GNU PG secure keyring.
      +319     *
      +320     * @return The location of the PGP secure keyring if it was found,
      +321     *         null otherwise
      +322     */
      +323     public static Collection<String> getKnownPGPSecureRingLocations() {
      +324         final LinkedHashSet<String> locations = new LinkedHashSet<>();
      +325 
      +326         final String os = System.getProperty("os.name");
      +327         final boolean runOnWindows = os == null || os.toLowerCase().contains("win");
      +328 
      +329         if (runOnWindows) {
      +330             // The user's roaming profile on Windows, via environment
      +331             final String windowsRoaming = System.getenv("APPDATA");
      +332             if (windowsRoaming != null) {
      +333                 locations.add(joinLocalPath(windowsRoaming, "gnupg", "secring.gpg"));
      +334             }
      +335 
      +336             // The user's local profile on Windows, via environment
      +337             final String windowsLocal = System.getenv("LOCALAPPDATA");
      +338             if (windowsLocal != null) {
      +339                 locations.add(joinLocalPath(windowsLocal, "gnupg", "secring.gpg"));
      +340             }
      +341 
      +342             // The Windows installation directory
      +343             final String windir = System.getProperty("WINDIR");
      +344             if (windir != null) {
      +345                 // Local Profile on Windows 98 and ME
      +346                 locations.add(joinLocalPath(windir, "Application Data", "gnupg", "secring.gpg"));
      +347             }
      +348         }
      +349 
      +350         final String home = System.getProperty("user.home");
      +351 
      +352         if (home != null && runOnWindows) {
      +353             // These are for various flavours of Windows
      +354             // if the environment variables above have failed
      +355 
      +356             // Roaming profile on Vista and later
      +357             locations.add(joinLocalPath(home, "AppData", "Roaming", "gnupg", "secring.gpg"));
      +358             // Local profile on Vista and later
      +359             locations.add(joinLocalPath(home, "AppData", "Local", "gnupg", "secring.gpg"));
      +360             // Roaming profile on 2000 and XP
      +361             locations.add(joinLocalPath(home, "Application Data", "gnupg", "secring.gpg"));
      +362             // Local profile on 2000 and XP
      +363             locations.add(joinLocalPath(home, "Local Settings", "Application Data", "gnupg", "secring.gpg"));
      +364         }
      +365 
      +366         // *nix, including OS X
      +367         if (home != null) {
      +368             locations.add(joinLocalPath(home, ".gnupg", "secring.gpg"));
      +369         }
      +370 
      +371         return locations;
      +372     }
      +373 
      +374     /**
      +375      * Tries to guess location of the user secure keyring using various
      +376      * heuristics.
      +377      *
      +378      * @return path to the keyring file
      +379      * @throws FileNotFoundException if no keyring file found
      +380      */
      +381     public static File guessKeyRingFile() throws FileNotFoundException {
      +382         final Collection<String> possibleLocations = getKnownPGPSecureRingLocations();
      +383         for (final String location : possibleLocations) {
      +384             final File candidate = new File(location);
      +385             if (candidate.exists()) {
      +386                 return candidate;
      +387             }
      +388         }
      +389         final StringBuilder message = new StringBuilder("Could not locate secure keyring, locations tried: ");
      +390         final Iterator<String> it = possibleLocations.iterator();
      +391         while (it.hasNext()) {
      +392             message.append(it.next());
      +393             if (it.hasNext()) {
      +394                 message.append(", ");
      +395             }
      +396         }
      +397         throw new FileNotFoundException(message.toString());
      +398     }
      +399 
      +400     /**
      +401      * Returns true if string is null or empty.
      +402      */
      +403     public static boolean isNullOrEmpty(final String str) {
      +404         return str == null || str.length() == 0;
      +405     }
      +406 
      +407     /**
      +408     * Return fallback if first string is null or empty
      +409     */
      +410     public static String defaultString(final String str, final String fallback) {
      +411         return isNullOrEmpty(str) ? fallback : str;
      +412     }
      +413 
      +414 
      +415     /**
      +416      * Check if a CharSequence is whitespace, empty ("") or null.
      +417      *
      +418      * <pre>
      +419      * StringUtils.isBlank(null)      = true
      +420      * StringUtils.isBlank("")        = true
      +421      * StringUtils.isBlank(" ")       = true
      +422      * StringUtils.isBlank("bob")     = false
      +423      * StringUtils.isBlank("  bob  ") = false
      +424      * </pre>
      +425      *
      +426      * @param cs
      +427      *            the CharSequence to check, may be null
      +428      * @return {@code true} if the CharSequence is null, empty or whitespace
      +429      */
      +430     public static boolean isBlank(final CharSequence cs) {
      +431         int strLen;
      +432         if (cs == null || (strLen = cs.length()) == 0) {
      +433             return true;
      +434         }
      +435         for (int i = 0; i < strLen; i++) {
      +436             if (!Character.isWhitespace(cs.charAt(i))) {
      +437                 return false;
      +438             }
      +439         }
      +440         return true;
      +441     }
      +442 }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/VariableResolver.html b/release/1.10/xref/org/vafer/jdeb/utils/VariableResolver.html new file mode 100644 index 000000000..001f1be6a --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/VariableResolver.html @@ -0,0 +1,40 @@ + + + +VariableResolver xref + + + +
      +1   /*
      +2    * Copyright 2007-2021 The jdeb developers.
      +3    *
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *      http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   */
      +16  package org.vafer.jdeb.utils;
      +17  
      +18  /**
      +19   * Interface for resolving variables.
      +20   * See Utils.replaceVariables()
      +21   *
      +22   * ATTENTION: don't use outside of jdeb
      +23   */
      +24  
      +25  public interface VariableResolver {
      +26      String get( final String pKey );
      +27  }
      +
      +
      + + + diff --git a/release/1.10/xref/org/vafer/jdeb/utils/package-frame.html b/release/1.10/xref/org/vafer/jdeb/utils/package-frame.html new file mode 100644 index 000000000..8edd3da66 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/package-frame.html @@ -0,0 +1,54 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.utils + + + +

      org.vafer.jdeb.utils

      + + + \ No newline at end of file diff --git a/release/1.10/xref/org/vafer/jdeb/utils/package-summary.html b/release/1.10/xref/org/vafer/jdeb/utils/package-summary.html new file mode 100644 index 000000000..8b58ed8c0 --- /dev/null +++ b/release/1.10/xref/org/vafer/jdeb/utils/package-summary.html @@ -0,0 +1,162 @@ + + + + + + + jdeb 1.10 Reference Package org.vafer.jdeb.utils + + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      Package org.vafer.jdeb.utils

      +
      +
      + +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/overview-frame.html b/release/1.10/xref/overview-frame.html new file mode 100644 index 000000000..d50f8f42d --- /dev/null +++ b/release/1.10/xref/overview-frame.html @@ -0,0 +1,48 @@ + + + + + + + jdeb 1.10 Reference + + + +

      jdeb 1.10 Reference

      + + +

       

      + + + diff --git a/release/1.10/xref/overview-summary.html b/release/1.10/xref/overview-summary.html new file mode 100644 index 000000000..d0dc506b4 --- /dev/null +++ b/release/1.10/xref/overview-summary.html @@ -0,0 +1,132 @@ + + + + + + + jdeb 1.10 Reference + + + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + +
      +

      jdeb 1.10 Reference

      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Packages 
      Package
      + org.vafer.jdeb +
      + org.vafer.jdeb.ant +
      + org.vafer.jdeb.changes +
      + org.vafer.jdeb.debian +
      + org.vafer.jdeb.mapping +
      + org.vafer.jdeb.maven +
      + org.vafer.jdeb.producers +
      + org.vafer.jdeb.signing +
      + org.vafer.jdeb.utils +
      +
      + +
      + + + + +
      jdeb 1.10 Reference
      +
      + + + + + \ No newline at end of file diff --git a/release/1.10/xref/stylesheet.css b/release/1.10/xref/stylesheet.css new file mode 100644 index 000000000..9e10f29e1 --- /dev/null +++ b/release/1.10/xref/stylesheet.css @@ -0,0 +1,626 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} + +/* JXR style sheet */ +a.jxr_linenumber:link { + color: #00f; +} + +a.jxr_linenumber:visited { + color: #00a; +} + +a.jxr_linenumber:active, a.jxr_linenumber:hover { + color: #f30 !important; +} + +em.comment { + color: #390; +} + +.string { + color: #009; +} + +#overview { + padding: 2px; + font-size: 90%; + font-family: Helvetica, Arial, sans-serif; +} + +hr { + color: #000; +} + +.jxr_comment +{ + color: #390; +} + +.jxr_javadoccomment +{ + color: #A00; +} + +.jxr_string +{ + color: #009; +} + +.jxr_keyword +{ + color: #000; +} + diff --git a/xref/index.html b/xref/index.html index 7116ded3f..557a62aaa 100644 --- a/xref/index.html +++ b/xref/index.html @@ -1 +1 @@ - +