From e7f5ac7098f11bc57c52f6e50455c94d3aa44f3a Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Tue, 1 Oct 2013 09:15:31 +0200 Subject: [PATCH] Update to upstream version 1.1.0 --- .gitignore | 1 + ...-t-try-to-relativize-symlink-targets.patch | 26 --------- ...to-resolve-cannonical-artifact-files.patch | 32 ----------- ...stotre-support-for-relative-symlinks.patch | 41 -------------- ...e-__default-to-install-artifact-to-d.patch | 35 ------------ ...n-t-assume-package-has-a-single-name.patch | 54 ------------------- sources | 2 +- xmvn.spec | 17 ++---- 8 files changed, 7 insertions(+), 201 deletions(-) delete mode 100644 0001-Don-t-try-to-relativize-symlink-targets.patch delete mode 100644 0002-Try-to-resolve-cannonical-artifact-files.patch delete mode 100644 0003-Restotre-support-for-relative-symlinks.patch delete mode 100644 0004-Add-special-value-__default-to-install-artifact-to-d.patch delete mode 100644 0005-Don-t-assume-package-has-a-single-name.patch diff --git a/.gitignore b/.gitignore index 68e560e..e6e8b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /xmvn-1.0.0.tar.xz /xmvn-1.0.1.tar.xz /xmvn-1.0.2.tar.xz +/xmvn-1.1.0.tar.xz diff --git a/0001-Don-t-try-to-relativize-symlink-targets.patch b/0001-Don-t-try-to-relativize-symlink-targets.patch deleted file mode 100644 index 6ffa6df..0000000 --- a/0001-Don-t-try-to-relativize-symlink-targets.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 51259942aacc2a3b02564ae43dfabebb98aebf58 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Mon, 23 Sep 2013 14:38:34 +0200 -Subject: [PATCH 1/3] Don't try to relativize symlink targets - ---- - .../src/main/java/org/fedoraproject/maven/installer/impl/Package.java | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -index 95faa06..1ab04b6 100644 ---- a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -@@ -89,8 +89,7 @@ class Package - public void addSymlink( Path symlink, Path target ) - throws IOException - { -- Path symlinkTarget = symlink.getParent().relativize( target ); -- Path symlinkFile = FileUtils.createAnonymousSymlink( symlinkTarget ); -+ Path symlinkFile = FileUtils.createAnonymousSymlink( target ); - addFile( symlinkFile, symlink, 0644 ); - } - --- -1.8.1.4 - diff --git a/0002-Try-to-resolve-cannonical-artifact-files.patch b/0002-Try-to-resolve-cannonical-artifact-files.patch deleted file mode 100644 index ee15ea2..0000000 --- a/0002-Try-to-resolve-cannonical-artifact-files.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 48a8417d29b0e8f1b4f5c61281a9b5502e6c4913 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Mon, 23 Sep 2013 17:29:28 +0200 -Subject: [PATCH 2/3] Try to resolve cannonical artifact files - ---- - .../java/org/fedoraproject/maven/resolver/impl/DefaultResolver.java | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/resolver/impl/DefaultResolver.java b/xmvn-core/src/main/java/org/fedoraproject/maven/resolver/impl/DefaultResolver.java -index 6bbd26b..9fc61c7 100644 ---- a/xmvn-core/src/main/java/org/fedoraproject/maven/resolver/impl/DefaultResolver.java -+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/resolver/impl/DefaultResolver.java -@@ -46,6 +46,7 @@ import org.fedoraproject.maven.resolver.ResolutionResult; - import org.fedoraproject.maven.resolver.Resolver; - import org.fedoraproject.maven.utils.ArtifactUtils; - import org.fedoraproject.maven.utils.AtomicFileCounter; -+import org.fedoraproject.maven.utils.FileUtils; - import org.fedoraproject.maven.utils.LoggingUtils; - - /** -@@ -241,6 +242,7 @@ public class DefaultResolver - } - - File artifactFile = result.getArtifactFile(); -+ artifactFile = FileUtils.followSymlink( artifactFile ); - logger.debug( "Artifact " + artifact + " was resolved to " + artifactFile ); - if ( request.isProviderNeeded() ) - result.setProvider( rpmdb.lookupFile( artifactFile ) ); --- -1.8.1.4 - diff --git a/0003-Restotre-support-for-relative-symlinks.patch b/0003-Restotre-support-for-relative-symlinks.patch deleted file mode 100644 index 152f8a2..0000000 --- a/0003-Restotre-support-for-relative-symlinks.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 9da9a832135610a40625c73a38222ea995c79ef5 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Mon, 23 Sep 2013 17:47:45 +0200 -Subject: [PATCH 3/3] Restotre support for relative symlinks - ---- - .../org/fedoraproject/maven/installer/impl/Package.java | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -index 1ab04b6..d0e33ba 100644 ---- a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -@@ -86,11 +86,21 @@ class Package - addFile( file, target.getParent(), target.getFileName(), mode ); - } - -- public void addSymlink( Path symlink, Path target ) -+ public void addSymlink( Path symlinkFile, Path symlinkTarget ) - throws IOException - { -- Path symlinkFile = FileUtils.createAnonymousSymlink( target ); -- addFile( symlinkFile, symlink, 0644 ); -+ if ( symlinkFile.isAbsolute() ) -+ throw new IllegalArgumentException( "symlinkFile is absolute path: " + symlinkFile ); -+ if ( symlinkTarget.isAbsolute() ) -+ throw new IllegalArgumentException( "symlinkTarget is absolute path: " + symlinkTarget ); -+ -+ symlinkFile = symlinkFile.normalize(); -+ symlinkTarget = symlinkTarget.normalize(); -+ if ( symlinkFile.getParent() != null ) -+ symlinkTarget = symlinkFile.getParent().relativize( symlinkTarget ); -+ -+ Path symlinkTempFile = FileUtils.createAnonymousSymlink( symlinkTarget ); -+ addFile( symlinkTempFile, symlinkFile, 0644 ); - } - - private Path installDirectory( Path root, Path target ) --- -1.8.1.4 - diff --git a/0004-Add-special-value-__default-to-install-artifact-to-d.patch b/0004-Add-special-value-__default-to-install-artifact-to-d.patch deleted file mode 100644 index d263242..0000000 --- a/0004-Add-special-value-__default-to-install-artifact-to-d.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b922db6aafe2c3680ab0cd340bb63f4b355993f5 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Fri, 27 Sep 2013 14:53:35 +0200 -Subject: [PATCH] Add special value __default to install artifact to default - package - ---- - .../src/main/java/org/fedoraproject/maven/installer/impl/Package.java | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -index d0e33ba..0038e89 100644 ---- a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/Package.java -@@ -43,6 +43,8 @@ class Package - - public static final String MAIN = ""; - -+ private static final String DEFAULT_SUFFIX = "__default"; -+ - private static final String NOINSTALL_SUFFIX = "__noinstall"; - - private boolean pureDevelPackage = true; -@@ -53,7 +55,7 @@ class Package - { - this.settings = settings; - metadata = new FragmentFile( logger ); -- suffix = name.equals( "" ) ? "" : "-" + name; -+ suffix = ( name.equals( "" ) || name.equals( DEFAULT_SUFFIX ) ) ? "" : "-" + name; - } - - private final FragmentFile metadata; --- -1.8.3.1 - diff --git a/0005-Don-t-assume-package-has-a-single-name.patch b/0005-Don-t-assume-package-has-a-single-name.patch deleted file mode 100644 index 9052b17..0000000 --- a/0005-Don-t-assume-package-has-a-single-name.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0a89668a07d873d1942f702a595f438025d526fd Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Mon, 30 Sep 2013 11:05:41 +0200 -Subject: [PATCH] Don't assume package has a single name - -One package can have different names, for example "" and "__default". ---- - .../maven/installer/impl/DefaultInstaller.java | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java -index a3e9f9b..9472c08 100644 ---- a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java -+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java -@@ -97,7 +97,7 @@ public class DefaultInstaller - - private Configuration configuration; - -- private Map packages; -+ private Map packages; - - private PackagingRule ruleForArtifact( Artifact artifact ) - { -@@ -134,13 +134,12 @@ public class DefaultInstaller - String packageName = rule.getTargetPackage(); - if ( StringUtils.isEmpty( packageName ) ) - packageName = Package.MAIN; -- Package pkg = packages.get( packageName ); - -- if ( pkg == null ) -- { -- pkg = new Package( packageName, settings, logger ); -- packages.put( packageName, pkg ); -- } -+ Package pkg = new Package( packageName, settings, logger ); -+ if ( packages.containsKey( pkg ) ) -+ pkg = packages.get( pkg ); -+ else -+ packages.put( pkg, pkg ); - - if ( logger.isDebugEnabled() ) - { -@@ -464,7 +463,7 @@ public class DefaultInstaller - packages = new TreeMap<>(); - - Package mainPackage = new Package( Package.MAIN, settings, logger ); -- packages.put( Package.MAIN, mainPackage ); -+ packages.put( mainPackage, mainPackage ); - - Set artifactSet = request.getArtifacts(); - --- -1.8.3.1 - diff --git a/sources b/sources index 51a6203..d9f88ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -54c6c0524da43a56fffab2427eac1f89 xmvn-1.0.2.tar.xz +33881f6a1f40995db3a1a6b530555947 xmvn-1.1.0.tar.xz diff --git a/xmvn.spec b/xmvn.spec index f1ee5b2..4d3c919 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -1,16 +1,11 @@ Name: xmvn -Version: 1.0.2 -Release: 3%{?dist} +Version: 1.1.0 +Release: 1%{?dist} Summary: Local Extensions for Apache Maven License: ASL 2.0 URL: http://mizdebsk.fedorapeople.org/xmvn BuildArch: noarch Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz -Patch0: 0001-Don-t-try-to-relativize-symlink-targets.patch -Patch1: 0002-Try-to-resolve-cannonical-artifact-files.patch -Patch2: 0003-Restotre-support-for-relative-symlinks.patch -Patch3: 0004-Add-special-value-__default-to-install-artifact-to-d.patch -Patch4: 0005-Don-t-assume-package-has-a-single-name.patch BuildRequires: maven >= 3.1.0 BuildRequires: maven-local @@ -37,11 +32,6 @@ This package provides %{summary}. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -F2 # remove dependency plugin maven-binaries execution # we provide apache-maven by symlink @@ -151,6 +141,9 @@ end %doc LICENSE NOTICE %changelog +* Tue Oct 01 2013 Stanislav Ochotnicky - 1.1.0-1 +- Update to upstream version 1.1.0 + * Fri Sep 27 2013 Stanislav Ochotnicky - 1.0.2-3 - Add __default package specifier support