Don't try to relativize symlink targets
This commit is contained in:
parent
2af3fb268c
commit
38ca401b57
26
0001-Don-t-try-to-relativize-symlink-targets.patch
Normal file
26
0001-Don-t-try-to-relativize-symlink-targets.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 51259942aacc2a3b02564ae43dfabebb98aebf58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Mon, 23 Sep 2013 14:38:34 +0200
|
||||||
|
Subject: [PATCH] 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
|
||||||
|
|
13
xmvn.spec
13
xmvn.spec
@ -1,11 +1,12 @@
|
|||||||
Name: xmvn
|
Name: xmvn
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Local Extensions for Apache Maven
|
Summary: Local Extensions for Apache Maven
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://mizdebsk.fedorapeople.org/xmvn
|
URL: http://mizdebsk.fedorapeople.org/xmvn
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
|
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
|
||||||
|
Patch0: 0001-Don-t-try-to-relativize-symlink-targets.patch
|
||||||
|
|
||||||
BuildRequires: maven >= 3.1.0
|
BuildRequires: maven >= 3.1.0
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
@ -32,6 +33,7 @@ This package provides %{summary}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
# Add cglib test dependency as a workaround for rhbz#911365
|
# Add cglib test dependency as a workaround for rhbz#911365
|
||||||
#pom_add_dep cglib:cglib::test %{name}-core
|
#pom_add_dep cglib:cglib::test %{name}-core
|
||||||
@ -53,7 +55,6 @@ ln -s %{_datadir}/maven target/dependency/apache-maven-$mver
|
|||||||
rm -rf src/it
|
rm -rf src/it
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%mvn_file ":{xmvn-{core,connector}}" %{name}/@1 ../%{name}/lib/@1
|
|
||||||
%mvn_build -X
|
%mvn_build -X
|
||||||
|
|
||||||
tar --delay-directory-restore -xvf target/*tar.bz2
|
tar --delay-directory-restore -xvf target/*tar.bz2
|
||||||
@ -63,6 +64,7 @@ chmod -R +rwX %{name}-%{version}*
|
|||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
|
|
||||||
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||||
cp -r %{name}-%{version}*/* %{buildroot}%{_datadir}/%{name}/
|
cp -r %{name}-%{version}*/* %{buildroot}%{_datadir}/%{name}/
|
||||||
ln -sf %{_datadir}/maven/bin/mvn %{buildroot}%{_datadir}/%{name}/bin/mvn
|
ln -sf %{_datadir}/maven/bin/mvn %{buildroot}%{_datadir}/%{name}/bin/mvn
|
||||||
ln -sf %{_datadir}/maven/bin/mvnDebug %{buildroot}%{_datadir}/%{name}/bin/mvnDebug
|
ln -sf %{_datadir}/maven/bin/mvnDebug %{buildroot}%{_datadir}/%{name}/bin/mvnDebug
|
||||||
@ -90,11 +92,11 @@ done
|
|||||||
# copy over maven lib directory
|
# copy over maven lib directory
|
||||||
cp -r %{_datadir}/maven/lib/* %{buildroot}%{_datadir}/%{name}/lib/
|
cp -r %{_datadir}/maven/lib/* %{buildroot}%{_datadir}/%{name}/lib/
|
||||||
|
|
||||||
|
# possibly recreate symlinks that can be automated with xmvn-subst
|
||||||
|
%{name}-subst %{buildroot}%{_datadir}/%{name}/
|
||||||
for jar in core connector;do
|
for jar in core connector;do
|
||||||
ln -sf %{_javadir}/%{name}/%{name}-$jar.jar %{buildroot}%{_datadir}/%{name}/lib
|
ln -sf %{_javadir}/%{name}/%{name}-$jar.jar %{buildroot}%{_datadir}/%{name}/lib
|
||||||
done
|
done
|
||||||
# possibly recreate symlinks that can be automated with xmvn-subst
|
|
||||||
%{name}-subst %{buildroot}%{_datadir}/%{name}/
|
|
||||||
|
|
||||||
for tool in subst resolver bisect installer;do
|
for tool in subst resolver bisect installer;do
|
||||||
# sisu doesn't contain pom.properties. Manually replace with symlinks
|
# sisu doesn't contain pom.properties. Manually replace with symlinks
|
||||||
@ -141,6 +143,9 @@ end
|
|||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-2
|
||||||
|
- Don't try to relativize symlink targets
|
||||||
|
|
||||||
* Fri Sep 20 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-1
|
* Fri Sep 20 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-1
|
||||||
- Update to upstream version 1.0.2
|
- Update to upstream version 1.0.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user