Il 31/07/2016 15:57, toogley ha scritto:
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]________________________-
before you should changes spec file in this way
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 Source2: %{name}-script Patch0: test.patch BuildArch: noarch BuildRequires: gradle-local
# main deps BuildRequires: ant BuildRequires: apache-commons-cli BuildRequires: groovy # build deps BuildRequires: gradle-local # test deps BuildRequires: apache-ivy BuildRequires: junit
Requires: java-devel %description Gant is a tool for scripting Ant tasks using Groovy instead of XML [...] %package javadoc 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
sed -i '/metaInf/d' $PWD/build.gradle
%build %gradle_build --skip-javadoc --xmvn-debug %install
%mvn_install -J gant/build/docs/javadoc
%files -f .mfiles
%doc README.md %license LICENCE.txt
%files javadoc -f .mfiles-javadoc
%license LICENCE.txt try to change %autosetup with %setup and as i wrote in the previous emails disable useless 'gant_groovy2.0', 'gant_groovy2.1', 'gant_groovy2.2', 'gant_groovy2.3' tasks we don't have old groovy 2.x release Regards .g
_________________[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
-- java-devel mailing list java-devel@xxxxxxxxxxxxxxxxxxxxxxx https://lists.fedoraproject.org/admin/lists/java-devel@xxxxxxxxxxxxxxxxxxxxxxx