1
0

Accepting request 289830 from home:Mailaender:branches:Java:packages

- Drop patches
  * depgen.patch
  * javapackages-2.0.1-fix-bashisms.patch
  * javapackages-2.0.1-java9.patch
  * maven_depmap-no-attribute-exit.patch
- Remove hacky workarounds
- Fix rpmlint errors
- Enable maven-local
- Avoid unsatisfiable dependencies
- Enable unit tests
- Update to version 4.4.0

OBS-URL: https://build.opensuse.org/request/show/289830
OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=20
This commit is contained in:
Tomáš Chvátal 2015-03-16 16:26:42 +00:00 committed by Git OBS Bridge
parent bbc4d90adb
commit 6783b53ef7
9 changed files with 125 additions and 527 deletions

View File

@ -1,9 +0,0 @@
Index: javapackages-2.0.1/depgenerators/javadoc.req
===================================================================
--- javapackages-2.0.1.orig/depgenerators/javadoc.req
+++ javapackages-2.0.1/depgenerators/javadoc.req
@@ -1,3 +1,4 @@
#!/bin/sh
+cat >/dev/null
# always required for javadocs
echo jpackage-utils

View File

@ -1,389 +0,0 @@
diff -Ndur javapackages-2.0.1/bin/check-binary-files javapackages-2.0.1-fix-bashisms/bin/check-binary-files
--- javapackages-2.0.1/bin/check-binary-files 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/check-binary-files 2014-10-13 02:46:47.702606713 +0300
@@ -108,8 +108,7 @@
while read line; do
- echo $line | grep ^% >& /dev/null
- if [ $? -eq 0 ] || [ "$line" = "" ]; then
+ if [ -z "$line" -o "${line#%}" != "$line" ]; then
continue
fi
@@ -145,7 +144,7 @@
if [ ! -z $_ARCHIVE_FILE ]; then
rm -rf $_ARCHIVE_EXTRACTION_DIR
mkdir -p $_ARCHIVE_EXTRACTION_DIR
- pushd $_ARCHIVE_EXTRACTION_DIR >& /dev/null
+ cd $_ARCHIVE_EXTRACTION_DIR
tar xf $_WORKING_DIR/`basename $_ARCHIVE_FILE`
fi
@@ -159,18 +158,18 @@
_compression_flag=""
- echo $_ARCHIVE_FILE | grep gz$ >& /dev/null
+ echo $_ARCHIVE_FILE | grep -q gz$
if [ $? -eq 0 ]; then
_compression_flag=z
fi
- echo $_ARCHIVE_FILE | grep bz2$ >& /dev/null
+ echo $_ARCHIVE_FILE | grep -q bz2$
if [ $? -eq 0 ]; then
_compression_flag=f
fi
tar cf$_compression_flag $_WORKING_DIR/$_arch_name-clean.$_arch_ext *
- popd >& /dev/null
+ cd - > /dev/null
rm -rf $_ARCHIVE_EXTRACTION_DIR
fi
diff -Ndur javapackages-2.0.1/bin/clean-binary-files javapackages-2.0.1-fix-bashisms/bin/clean-binary-files
--- javapackages-2.0.1/bin/clean-binary-files 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/clean-binary-files 2014-10-13 02:46:32.588605896 +0300
@@ -104,7 +104,7 @@
_old_ifs=$IFS
IFS='|'
- echo $1 | grep -E "\\.jar$" >& /dev/null
+ echo $1 | grep -q -E "\\.jar$"
if [ $? -eq 0 ]; then
# Check if the item is in the exclusion list
@@ -162,7 +162,7 @@
IFS='|'
for filename in $_KEEP_LIST; do
- grep ^$filename $_ON_DISK_FILELIST >& /dev/null
+ grep -q ^$filename $_ON_DISK_FILELIST
if [ $? -gt 0 ]; then
echo "Cannot find file $filename from exclusions list. Aborting."
@@ -174,7 +174,7 @@
done
for filename in $_REMOVE_LIST; do
- grep ^$filename $_ON_DISK_FILELIST >& /dev/null
+ grep -q ^$filename $_ON_DISK_FILELIST
if [ $? -gt 0 ]; then
echo "Cannot find file $filename from exclusions list. Aborting."
@@ -257,7 +257,7 @@
return 0;
fi
- echo $1 | grep -E "\\.jar$" >& /dev/null
+ echo $1 | grep -q -E "\\.jar$"
if [ ! $? -eq 0 ]; then
return 0
fi
@@ -342,8 +342,7 @@
while read line; do
- echo $line | grep ^% >& /dev/null
- if [ $? -eq 0 ] || [ "$line" = "" ]; then
+ if [ -z "$line" -o "${line#%}" != "$line" ]; then
continue
fi
@@ -386,7 +385,7 @@
;;
-f) # Instruction file (DELETE MODE)
- if [ $2 == "-" ]; then
+ if [ "$2" = "-" ]; then
while read command; do
@@ -407,8 +406,7 @@
while read line; do
- echo $line | grep ^% >& /dev/null
- if [ $? -eq 0 ] || [ "$line" = "" ]; then
+ if [ -z "$line" -o "${line#%}" != "$line" ]; then
continue
fi
@@ -484,7 +482,7 @@
if [ ! -z $_ARCHIVE_FILE ]; then
rm -rf $_ARCHIVE_EXTRACTION_DIR
mkdir -p $_ARCHIVE_EXTRACTION_DIR
- pushd $_ARCHIVE_EXTRACTION_DIR >& /dev/null
+ cd $_ARCHIVE_EXTRACTION_DIR
tar xf $_WORKING_DIR/`basename $_ARCHIVE_FILE`
fi
@@ -576,19 +574,19 @@
_compression_flag=""
- echo $_ARCHIVE_FILE | grep gz$ >& /dev/null
+ echo $_ARCHIVE_FILE | grep -q gz$
if [ $? -eq 0 ]; then
_compression_flag=z
fi
- echo $_ARCHIVE_FILE | grep bz2$ >& /dev/null
+ echo $_ARCHIVE_FILE | grep -q bz2$
if [ $? -eq 0 ]; then
_compression_flag=f
fi
tar cf$_compression_flag $_WORKING_DIR/$_arch_name-clean.$_arch_ext *
- popd >& /dev/null
+ cd - > /dev/null
rm -rf $_ARCHIVE_EXTRACTION_DIR
fi
diff -Ndur javapackages-2.0.1/bin/create-jar-links javapackages-2.0.1-fix-bashisms/bin/create-jar-links
--- javapackages-2.0.1/bin/create-jar-links 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/create-jar-links 2014-10-13 02:45:39.860603045 +0300
@@ -57,7 +57,7 @@
for file in $_REMOVE_LIST; do
- echo $file | grep -E "\\.jar$" >& /dev/null
+ echo $file | grep -q -E "\\.jar$"
if [ ! $? -eq 0 ]; then
continue
fi
@@ -125,8 +125,7 @@
while read line; do
- echo $line | grep ^% >& /dev/null
- if [ $? -eq 0 ] || [ "$line" = "" ]; then
+ if [ -z "$line" -o "${line#%}" != "$line" ]; then
continue
fi
@@ -176,7 +175,7 @@
if [ ! -z $_ARCHIVE_FILE ]; then
rm -rf $_ARCHIVE_EXTRACTION_DIR
mkdir -p $_ARCHIVE_EXTRACTION_DIR
- pushd $_ARCHIVE_EXTRACTION_DIR >& /dev/null
+ cd $_ARCHIVE_EXTRACTION_DIR
tar xf $_WORKING_DIR/`basename $_ARCHIVE_FILE`
fi
@@ -190,18 +189,18 @@
_compression_flag=""
- echo $_ARCHIVE_FILE | grep gz$ >& /dev/null
+ echo $_ARCHIVE_FILE | grep -q gz$
if [ $? -eq 0 ]; then
_compression_flag=z
fi
- echo $_ARCHIVE_FILE | grep bz2$ >& /dev/null
+ echo $_ARCHIVE_FILE | grep -q bz2$
if [ $? -eq 0 ]; then
_compression_flag=f
fi
tar cf$_compression_flag $_WORKING_DIR/$_arch_name-clean.$_arch_ext *
- popd >& /dev/null
+ cd - > /dev/null
rm -rf $_ARCHIVE_EXTRACTION_DIR
fi
diff -Ndur javapackages-2.0.1/bin/find-jar javapackages-2.0.1-fix-bashisms/bin/find-jar
--- javapackages-2.0.1/bin/find-jar 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/find-jar 2014-10-13 00:58:10.702254350 +0300
@@ -30,7 +30,7 @@
find_jar $1
if [ $? != 0 ]; then
- echo $"Could not find the requested jar or jar directory." >&2
- echo $"Please check the correct JAVA_HOME is set." >&2
+ echo "Could not find the requested jar or jar directory." >&2
+ echo "Please check the correct JAVA_HOME is set." >&2
exit 6
fi
diff -Ndur javapackages-2.0.1/bin/mvn-alias javapackages-2.0.1-fix-bashisms/bin/mvn-alias
--- javapackages-2.0.1/bin/mvn-alias 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/mvn-alias 2014-10-13 02:20:45.576522251 +0300
@@ -35,25 +35,29 @@
exit 1
fi
-IFS=: read -a pattern <<<"$1"
+pattern="$1"
shift
aliases=
while [ $# -gt 0 ]; do
+ g="${1%%:*}"
+ a="${1#*:}"
+ a="${a%%:*}"
+
IFS=: read -a alias <<<"$1"
shift
aliases="$aliases
<alias>
- <groupId>${alias[0]}</groupId>
- <artifactId>${alias[1]}</artifactId>
- <version>${alias[2]}</version>
+ <groupId>$(echo "$1" | cut -d: -f1)</groupId>
+ <artifactId>$(echo "$1" | cut -d: -f2)</artifactId>
+ <version>$(echo "$1" | cut -d: -f3)</version>
</alias>"
done
xml="<artifactGlob>
- <groupId>${pattern[0]}</groupId>
- <artifactId>${pattern[1]}</artifactId>
- <version>${pattern[2]}</version>
+ <groupId>$(echo "$pattern" | cut -d: -f1)</groupId>
+ <artifactId>$(echo "$pattern" | cut -d: -f2)</artifactId>
+ <version>$(echo "$pattern" | cut -d: -f3)</version>
</artifactGlob>
<aliases>$aliases
</aliases>"
diff -Ndur javapackages-2.0.1/bin/mvn-config javapackages-2.0.1-fix-bashisms/bin/mvn-config
--- javapackages-2.0.1/bin/mvn-config 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/mvn-config 2014-10-13 01:04:24.235274546 +0300
@@ -37,7 +37,7 @@
open=
close=
-for node in $(sed "s|/| |g" <<<"${1}"); do
+for node in $(echo "$1" | sed "s|/| |g"); do
open="${open}<${node}>"
close="</${node}>${close}"
done
diff -Ndur javapackages-2.0.1/bin/mvn-file javapackages-2.0.1-fix-bashisms/bin/mvn-file
--- javapackages-2.0.1/bin/mvn-file 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/mvn-file 2014-10-13 02:22:28.238527802 +0300
@@ -35,20 +35,17 @@
exit 1
fi
-IFS=: read -a pattern <<<"$1"
-shift
-
files=
while [ $# -gt 0 ]; do
files="$files
- <file>$1</file>"
+ <file>$2</file>"
shift
done
xml="<artifactGlob>
- <groupId>${pattern[0]}</groupId>
- <artifactId>${pattern[1]}</artifactId>
- <version>${pattern[2]}</version>
+ <groupId>$(echo "$1" | cut -d: -f1)</groupId>
+ <artifactId>$(echo "$1" | cut -d: -f2)</artifactId>
+ <version>$(echo "$1" | cut -d: -f3)</version>
</artifactGlob>
<files>$files
</files>"
diff -Ndur javapackages-2.0.1/bin/mvn-local javapackages-2.0.1-fix-bashisms/bin/mvn-local
--- javapackages-2.0.1/bin/mvn-local 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/mvn-local 2014-10-13 02:32:44.546561125 +0300
@@ -39,9 +39,12 @@
# resolution from effective POM repository.
XMVN_COMPAT=19-rpmbuild
for arg in "$@"; do
- if egrep -q '^-Dmaven\.local\.effective\.pom=false' <<<"$arg"; then
+ case "$arg" in
+ '-Dmaven.local.effective.pom=false'*)
XMVN_COMPAT=19-rpmbuild-raw
- fi
+ break
+ ;;
+ esac
done
export XMVN_COMPAT
diff -Ndur javapackages-2.0.1/bin/mvn-package javapackages-2.0.1-fix-bashisms/bin/mvn-package
--- javapackages-2.0.1/bin/mvn-package 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/mvn-package 2014-10-13 02:23:15.401530352 +0300
@@ -35,12 +35,10 @@
exit 1
fi
-IFS=: read -a pattern <<<"$1"
-
xml="<artifactGlob>
- <groupId>${pattern[0]}</groupId>
- <artifactId>${pattern[1]}</artifactId>
- <version>${pattern[2]}</version>
+ <groupId>$(echo "$1" | cut -d: -f1)</groupId>
+ <artifactId>$(echo "$1" | cut -d: -f2)</artifactId>
+ <version>$(echo "$1" | cut -d: -f3)</version>
</artifactGlob>
<targetPackage>$2</targetPackage>"
diff -Ndur javapackages-2.0.1/bin/mvn-rpmbuild javapackages-2.0.1-fix-bashisms/bin/mvn-rpmbuild
--- javapackages-2.0.1/bin/mvn-rpmbuild 2013-07-26 10:25:31.000000000 +0300
+++ javapackages-2.0.1-fix-bashisms/bin/mvn-rpmbuild 2014-10-13 02:35:13.131569158 +0300
@@ -38,24 +38,28 @@
# Support local depmaps
depmap=
for arg in "$@"; do
- if egrep -q '^-Dmaven\.local\.depmap\.file=' <<<"$arg"; then
- depmap=$(sed 's/[^=]*=//' <<<"$arg")
+ case "$arg" in
+ '-Dmaven.local.depmap.file='*)
+ depmap=$(echo "$arg" | sed 's/[^=]*=//')
depmap="
<!-- Use local depmap file. -->
<metadataRepositories>
<repository>$depmap</repository>
</metadataRepositories>"
- fi
+ ;;
+ esac
done
# Local repository
repo=".m2"
repo_arg="-Dmaven.repo.local=$PWD/.m2/"
for arg in "$@"; do
- if egrep -q '^-Dmaven\.repo\.local=' <<<"$arg"; then
+ case "$arg" in
+ '-Dmaven.repo.local='*)
repo_arg=
- repo=$(sed 's/[^=]*=//' <<<"$arg")
- fi
+ repo=$(echo "$arg" | sed 's/[^=]*=//')
+ ;;
+ esac
done
export MAVEN_OPTS="$MAVEN_OPTS $repo_arg"
@@ -77,9 +81,12 @@
# resolution from effective POM repository.
XMVN_COMPAT=19-rpmbuild
for arg in "$@"; do
- if egrep -q '^-Dmaven\.local\.effective\.pom=false' <<<"$arg"; then
+ case "$arg" in
+ '-Dmaven.local.effective.pom=false'*)
XMVN_COMPAT=19-rpmbuild-raw
- fi
+ break
+ ;;
+ esac
done
export XMVN_COMPAT
@@ -88,7 +95,7 @@
# used without giving groupId prefix.
for groupId in org/apache/maven/plugins org/codehaus/mojo; do
mkdir -p "$repo"/${groupId}
- ln -sf /etc/maven/metadata-${groupId////-}.xml \
+ ln -sf /etc/maven/metadata-$(echo "$groupId" | tr / -).xml \
"$repo"/${groupId}/maven-metadata-central.xml
done

View File

@ -1,11 +0,0 @@
--- javapackages-2.0.1/install 2013-07-26 09:25:31.000000000 +0200
+++ javapackages-2.0.1/install 2014-12-08 14:00:11.726036951 +0100
@@ -94,7 +94,7 @@
dir "${rpmconfigdir}/fileattrs"
-for ver in 1.5.0 1.6.0 1.7.0 1.8.0; do
+for ver in 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0; do
dir "${javadir}-${ver}"
dir "${jnidir}-${ver}"
done

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cd8159ac1cd2a04c7d704dfc6a9a5e660c8cffc49a4bcd565d216f27a7c62d4c
size 85376

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e6afc39570619b72532aabd0cb84feb892920f977444d67eb2e34755c74e1b9
size 184360

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Fri Jan 23 20:59:04 UTC 2015 - mailaender@opensuse.org
- Drop patches
* depgen.patch
* javapackages-2.0.1-fix-bashisms.patch
* javapackages-2.0.1-java9.patch
* maven_depmap-no-attribute-exit.patch
- Remove hacky workarounds
- Fix rpmlint errors
- Enable maven-local
- Avoid unsatisfiable dependencies
- Enable unit tests
- Update to version 4.4.0
-------------------------------------------------------------------
Mon Dec 8 13:02:05 UTC 2014 - fstrba@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package javapackages-tools
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,35 +16,34 @@
#
# temporary turn off maven-local build to not add unsatisfied dependencies
# to Factory - remove them on maven submission
%bcond_with mavenlocal
Name: javapackages-tools
Version: 2.0.1
Version: 4.4.0
Release: 0
Summary: Macros and scripts for Java packaging support
License: BSD-3-Clause
Group: Development/Languages/Java
Url: https://git.fedorahosted.org/cgit/javapackages.git/
Source0: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
Url: https://fedorahosted.org/released/javapackages/doc/
Source: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
#PATCH-FIX-SUSE: SUSE does store jvm related things in libdir - ie /usr/lib64 on 64bits
# where Fedora use jpackage convention - usr/lib everywhere
Patch0: suse-use-libdir.patch
# PATCH-FIX-UPSTREAM Drain stdin in dependency generator
Patch1: depgen.patch
# PATCH-FIX-SLE maven_depmap-no-attribute-exit.patch - fix ZipFile instance has no attribute '__exit__'
Patch2: maven_depmap-no-attribute-exit.patch
Patch3: javapackages-2.0.1-fix-bashisms.patch
# PATCH-FIX-OPENSUSE javapackages-2.0.1-java9.patch - add directories for java9
Patch4: javapackages-2.0.1-java9.patch
#BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ant
BuildRequires: asciidoc
BuildRequires: dia
BuildRequires: fdupes
BuildRequires: python-lxml
BuildRequires: python-nose
BuildRequires: python-pyxb
BuildRequires: python-setuptools
BuildRequires: python-six
BuildRequires: rpm
BuildRequires: source-highlight
BuildRequires: xmlto
BuildRequires: xz
BuildRequires: pkgconfig(python)
Requires: coreutils
# for xsltproc
@ -65,87 +64,89 @@ Obsoletes: jpackage-utils <= 1.7.5
%description
This package provides macros and scripts to support Java packaging.
%if %{with mavenlocal}
%package -n maven-local
Summary: Macros and scripts for Maven packaging support
Group: Development/Languages/Java
Requires: %{name} = %{version}-%{release}
Requires: maven
Requires: xmvn
# POM files needed by maven itself
Requires: apache-commons-parent
Requires: apache-parent
Requires: geronimo-parent-poms
Requires: httpcomponents-project
Requires: jboss-parent
Requires: jvnet-parent
Requires: maven-parent
Requires: maven-plugins-pom
Requires: mojo-parent
Requires: plexus-components-pom
Requires: plexus-pom
Requires: plexus-tools-pom
Requires: sonatype-oss-parent
Requires: weld-parent
# Common Maven plugins required by almost every build. It wouldn't make
# sense to explicitly require them in every package built with Maven.
Requires: maven-assembly-plugin
Requires: maven-compiler-plugin
Requires: maven-enforcer-plugin
Requires: maven-jar-plugin
Requires: maven-javadoc-plugin
Requires: maven-surefire-plugin
# Tests based on JUnit are very common and JUnit itself is small.
# Include JUnit provider for Surefire just for convenience.
Requires: maven-surefire-provider-junit
# testng is quite common as well
Requires: maven-surefire-provider-testng
Requires: javapackages-local = %{version}-%{release}
%description -n maven-local
This package provides macros and scripts to support packaging Maven artifacts.
%endif
%package -n ivy-local
Summary: Local mode for Apache Ivy
Group: Development/Languages/Java
Requires: %{name} = %{version}-%{release}
Requires: javapackages-local = %{version}-%{release}
%description -n ivy-local
This package implements local mode fow Apache Ivy, which allows
artifact resolution using XMvn resolver.
%package -n python-javapackages
Summary: Module for handling various files for Java packaging
Group: Development/Languages/Java
Requires: python-lxml
%description -n python-javapackages
Module for handling, querying and manipulating of various files for Java
packaging in Linux distributions
%package doc
Summary: Guide for Java packaging
Group: Development/Languages/Java
%description doc
User guide for Java packaging and using utilities from javapackages-tools
%package -n javapackages-local
Summary: Non-essential macros and scripts for Java packaging support
Group: Development/Languages/Java
Requires: %{name} = %{version}-%{release}
%description -n javapackages-local
This package provides non-essential macros and scripts to support Java packaging.
%prep
%setup -q -n javapackages-%{version}
%patch0 -p1
%patch1 -p1
%if 0%{?suse_version} == 1110
%patch2 -p1
%endif
%patch3 -p1
%patch4 -p1
%build
%{configure}
%{configure} --rpmconfigdir=%{_sysconfdir}/rpm/
./build
%install
# temporary hack to avoid rpm crash
sed -i -e "s,^.*fileattrs/javadoc.attr,# out," install
./install
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
%if %{without mavenlocal}
cd %{buildroot}
rm etc/rpm/macros.xmvn \
etc/maven/metadata-org-apache-maven-plugins.xml \
etc/maven/metadata-org-codehaus-mojo.xml \
usr/share/java-utils/xmvn_config_editor.sh \
usr/bin/mvn-* \
usr/share/xmvn/configuration*.xml
cd -
%endif
rm -rf %{buildroot}%{_datadir}/fedora-review/
mv files-common files-common-old
cat files-common-old | grep -v '^%dir /etc/java$' | grep -v '^%dir /usr/share/java$' > files-common
%fdupes %{buildroot}/%{_prefix}
%check
./check
%files -f files-common
%defattr(-,root,root,-)
%doc LICENSE
%dir %{_sysconfdir}/rpm/macros.d
%files -n javapackages-local -f files-local
%defattr(-,root,root,-)
%if %{with mavenlocal}
%files -n maven-local -f files-maven
%endif
%defattr(-,root,root,-)
%files -n ivy-local -f files-ivy
%defattr(-,root,root,-)
%files -n python-javapackages
%defattr(-,root,root,-)
%doc LICENSE
%{python_sitelib}/javapackages*
%files doc -f files-doc
%defattr(-,root,root,-)
%doc LICENSE
%changelog

View File

@ -1,15 +0,0 @@
--- javapackages-2.0.1/java-utils/maven_depmap.py 2014-03-10 09:25:02.081196397 -0400
+++ javapackages-2.0.1/java-utils/maven_depmap.py.mod 2014-03-10 09:25:35.499433928 -0400
@@ -236,9 +236,9 @@
# Add a file to a ZIP archive (or JAR, WAR, ...) unless the file
# already exists in the archive. Provided by Tomas Radej.
def append_if_missing(archive_name, file_name, file_contents):
- with ZipFile(archive_name, 'a') as archive:
- if file_name not in archive.namelist():
- archive.writestr(file_name, file_contents)
+ archive = ZipFile(archive_name, 'a')
+ if file_name not in archive.namelist():
+ archive.writestr(file_name, file_contents)
# Inject pom.properties if JAR doesn't have one. This is necessary to
# identify the origin of JAR files that are present in the repository.

View File

@ -1,12 +1,35 @@
Date: Sat, 7 Mar 2015 19:25:15 +0100
Subject: [PATCH] SUSE does store jvm related things in libdir
---
configure | 2 ++
etc/macros.jpackage | 12 ++++++------
configure | 2 ++
macros.d/macros.jpackage | 12 ++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
Index: javapackages-2.0.1/etc/macros.jpackage
===================================================================
--- javapackages-2.0.1.orig/etc/macros.jpackage
+++ javapackages-2.0.1/etc/macros.jpackage
diff --git a/configure b/configure
index da2fd40..54935ce 100755
--- a/configure
+++ b/configure
@@ -41,6 +41,7 @@ prefix
rundir
sysconfdir
rpmconfigdir
+libdir
m2home
@@ -76,6 +77,7 @@ test -z "${localstatedir}" && localstatedir="${prefix}/var"
test -z "${mandir}" && mandir="${datadir}/man"
test -z "${rundir}" && rundir="${localstatedir}/run"
test -z "${sysconfdir}" && sysconfdir="${prefix}/etc"
+test -z "${libdir}" && rpmconfigdir="${prefix}/lib/"
test -z "${rpmconfigdir}" && rpmconfigdir="${prefix}/lib/rpm"
test -z "${m2home}" && m2home="${datadir}/xmvn"
diff --git a/macros.d/macros.jpackage b/macros.d/macros.jpackage
index 62d2dc1..75a5ba3 100644
--- a/macros.d/macros.jpackage
+++ b/macros.d/macros.jpackage
@@ -13,22 +13,22 @@
#
# Root directory where all Java VMs/SDK/JREs are installed.
@ -43,7 +66,7 @@ Index: javapackages-2.0.1/etc/macros.jpackage
#
# Root directory for all common architecture independent parts of Java VM/SDK/JRE's
@@ -81,7 +81,7 @@
@@ -86,7 +86,7 @@
# - jars for Java standard x.y.z (usually symlinks to %{_jnidir}-ext)
# To simplify things only %{_jnidir} is defined.
#
@ -52,23 +75,6 @@ Index: javapackages-2.0.1/etc/macros.jpackage
#
# Root directory where all javadoc is installed. Also already in RH macros.
Index: javapackages-2.0.1/configure
===================================================================
--- javapackages-2.0.1.orig/configure
+++ javapackages-2.0.1/configure
@@ -39,6 +39,7 @@ mandir
prefix
sysconfdir
rpmconfigdir
+libdir
javadir
javadocdir
@@ -68,6 +69,7 @@ test -z "${datadir}" && datadir="${prefi
test -z "${mandir}" && mandir="${datadir}/man"
test -z "${sysconfdir}" && sysconfdir="${prefix}/etc"
test -z "${rpmconfigdir}" && rpmconfigdir="${prefix}/lib/rpm"
+test -z "${libdir}" && libdir="${prefix}/lib"
eval $(sed -n 's/^%_\('"$vars_re"'\)\ *\(.*\)$/\1="\2"/;T;s/%{_\(.*}\)/${\1/;p' etc/macros.jpackage)
--
2.1.4