problems to apply patches during the rpmbuild build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

i'm currently trying to understand/apply gil_'s patch for gant (i.e. what exactly does fix my issues).

E.g. i want to apply the simple patch below. But if i put that as test.patch to
~/rpmbuild/SOURCES , and change my gant.spec like below, I receive erros -
although the patch itself applies successfully.  I think i have also the correct
path in my patch file, because before the patches are applied, the dictionary is
changed to Gant-1.9.11/ . Also changing the file names in the patchfile doesn't help(
e.g. "--- build.gradle $(date) \n +++ build.gradle-test $(date) " or sth else. )


How can i solve this issue?

--- build.gradle        2014-05-05 17:07:24.000000000 +0200
+++ build.gradle        2016-07-31 15:08:04.902566307 +0200
@@ -194,7 +194,7 @@
   final copyrightString = 'Copyright © 2006–2013  The Codehaus.  All Rights Reserved.'
   javadoc{
     options{
-      overview 'overview.html'
+      overview '../overview.html'
       showAll()
       encoding 'UTF-8'
       setUse true
@@ -210,7 +210,7 @@
     javadoc.options.docTitle = javadoc.title
   }
   groovydoc{
-    overview = 'overview.html'
+    overview = '../overview.html'
     includePrivate = false
     use = true
     windowTitle = packageTitle
@@ -566,7 +566,7 @@
   'LICENCE.txt',
   'README_Install.txt',
   'releaseNotes.txt',
-  'overview.html',
+  '../overview.html',
 ]

 task srcTgz(type: Tar, description: 'Create a tarball of the source.') {

_________________[end snippet]________________________-



%global gmajver 2.3
Name:          gant
Version:       1.9.11
Release:       1%{?dist}
Summary:       Groovy-based build system that uses Ant tasks
Group:         Development/Tools
License:       ASL 2.0
URL:           http://gant.github.io/
Source0:       https://github.com/Gant/Gant/archive/%{version}.tar.gz
Source1:       https://repo1.maven.org/maven2/org/codehaus/gant/gant_groovy%{gmajver}/%{version}/gant_groovy%{gmajver}-%{version}.pom
Source2:       %{name}-script

Patch0: test.patch 

BuildArch:     noarch
BuildRequires: gradle-local
BuildRequires: javapackages-local

BuildRequires: java-devel
BuildRequires: jpackage-utils

BuildRequires: antlr-tool
BuildRequires: objectweb-asm
# main deps
BuildRequires: ant
BuildRequires: apache-commons-cli
BuildRequires: groovy

BuildRequires: gradle

# test deps
BuildRequires: apache-ivy
BuildRequires: junit

Requires:      ant
Requires:      antlr-tool
Requires:      apache-commons-cli
Requires:      groovy
Requires:      objectweb-asm

Requires:      java-devel

%description
Gant is a tool for scripting Ant tasks using Groovy instead of XML [...]

%package javadoc
Group:         Documentation
Summary:       Javadoc for %{name}

%description javadoc
This package contains javadoc for %{name}.

%prep
%autosetup -n Gant-%{version}
find . -name "*.bat" -delete
find . -name "*.class" -delete
find . -name "*.jar" -delete

%patch0 -p0

%build
sed -i '/metaInf/d' $PWD/build.gradle
%gradle_build --skip-javadoc  --xmvn-debug 
%install
%mvn_install -J %{_javadocdir}/%{name}

%files -f .mfiles
#%files javadoc -f .mfiles-javadoc

%changelog
* Thu Oct 04 2012 gil cattaneo <puntogil@xxxxxxxxx> 1.9.8-1
- update to 1.9.8

_________________[end snippet]________________________-


$ rpmbuild -bb gant.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7YlST9
+ umask 022
+ cd /home/toogley/rpmbuild/BUILD
+ cd /home/toogley/rpmbuild/BUILD
+ rm -rf Gant-1.9.11
+ /usr/bin/gzip -dc /home/toogley/rpmbuild/SOURCES/1.9.11.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd Gant-1.9.11
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/toogley/rpmbuild/SOURCES/test.patch
+ /usr/bin/patch -s
+ find . -name '*.bat' -delete
+ find . -name '*.class' -delete
+ find . -name '*.jar' -delete
+ echo 'Patch #0 (test.patch):'
Patch #0 (test.patch):
+ /usr/bin/patch -p0 --fuzz=0
patching file build.gradle
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] y
Hunk #1 FAILED at 194.
Hunk #2 FAILED at 210.
Hunk #3 FAILED at 566.
3 out of 3 hunks FAILED -- saving rejects to file build.gradle.rej
error: Bad exit status from /var/tmp/rpm-tmp.7YlST9 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.7YlST9 (%prep)


$ rpmbuild -bb gant.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.RtJaSm
+ umask 022
+ cd /home/toogley/rpmbuild/BUILD
+ cd /home/toogley/rpmbuild/BUILD
+ rm -rf Gant-1.9.11
+ /usr/bin/gzip -dc /home/toogley/rpmbuild/SOURCES/1.9.11.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd Gant-1.9.11
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/toogley/rpmbuild/SOURCES/test.patch
+ /usr/bin/patch -s
+ find . -name '*.bat' -delete
+ find . -name '*.class' -delete
+ find . -name '*.jar' -delete
+ echo 'Patch #0 (test.patch):'
Patch #0 (test.patch):
+ /usr/bin/patch -p0 --fuzz=0
patching file build.gradle
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file build.gradle.rej
error: Bad exit status from /var/tmp/rpm-tmp.RtJaSm (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.RtJaSm (%prep)


_________________[end snippet]________________________-
--
java-devel mailing list
java-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/java-devel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux