English
Alternatively, if you have a vanilla tarball, you can clean and create symlinks in it's place all at once by: clean-binary-files -e <exclusion file> -d <custom_jar_map> -a abc-1.tar.gz
Based on the initial design specifications for a clean-binary-files, I have created a script that does so (with some added functionality that became evident as necessary during design).
check-binary-files
Cheers, Deepak
clean-binary-files:
create-jar-links:
Due to the complex functionality and flexibility that is expected from the script (set), the syntax seems a bit daunting. Any input with regards to this matter, or any other, would be appreciated.
Example use case
Following this, one can extract the tarball, cd to it, and run: create-jar-links -f <instructions> -d <custom_jar_map>
From: Deepak Bhole <dbhole@redhat.com> To: jpackage-discuss@zarb.org
--help output from each of the scripts:
In %prep for the rpm spec, one would have: check-binary-files -f instructions -a abc-1-clean.tar.gz
Note: If the -a <file> is not given to clean-binary-files, all actions are performed on current directory.
Options:
-a - Archive file on which actions will be performed, as opposed to
current directory
-f - The instructions file to check against.
Options:
-a - Archive file on which actions will be performed, as opposed to
current directory
-p - Preserve original file names (-p to build-jar-repository)
-f - The instructions file to check against.
Options:
-f - The instructions file, specifying which files to keep and which
to remove
-e - The exclusions file, specifying special binary files that are to
be preserved, or non-binary files that are to be removed.
-l - Only list instructions (to put in instructions file), do not delete
anything.
-a - Archive file on which actions will be performed, as opposed to
current directory
-d - A custom jar map file (has priority over the generic one).
-n - No symlinks (i.e. only clean jars, don't run build-jar-repository
afterwards)
-p - Preserve original file names (-p to build-jar-repository)
-s - Silent mode. Won't output commands during cleanup
Suppose there is a vanilla tarball abc-1.tar.gz with some binary files (jars) in it. In the source repo, we would want a clean copy without any jars. We can use the scripts to achieve this:
Then, one can run: clean-binary-files -f instructions -n -a abc-1.tar.gz
The original mail is here: https://www.zarb.org/pipermail/jpackage-discuss/2005-November/009158.html
There are now 3 files: clean-binary-files check-binary-files create-jar-links