[opensuse-packaging] creating/applying a patch
Hi, Sorry if this arrives twice, mail server issues.... I am creating a new package and I need to create a patch. I followed what I could find here (the steps describing how to use quilt): http://en.opensuse.org/openSUSE:Fixing_bugs The first step failed as there are no packages yet. Thus I didn't quite know what to do and just remained in my "top level directory", i.e. the directory that contains the .spec file and the tarball. I unpacked the tarball and following the steps outlined I managed to get my patch created. Now I have a patches directory with my patch file (qpidc-0.6-fix-xqill-interface-problem.patch) and a file named "series". In my spec file I added: Patch0: %{short_name}-%{version}-fix-xqill-interface-problem.patch and %prep %setup -q -n %srcdir_name-%{version} %patch0 (the %patch0 line is new) Upon build I get: error: Bad source: /usr/src/packages/SOURCES/qpid-cpp-0.6-fix-xqill-interface-problem.patch: No such file or directory That doesn't really surprise me since I have no idea how this is all supposed to work together. Can someone please guide me through this process? Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU Software Engineer Consultant LINUX rschweikert@novell.com 781-464-8147 Novell Making IT Work As One -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
El 21/10/10 23:28, Robert Schweikert escribió:
Hi,
Sorry if this arrives twice, mail server issues.... I am creating a new package and I need to create a patch. I followed what I could find here (the steps describing how to use quilt):
For the start, grab a recent version of quilt and use the following .quiltrc file cat .quiltrc # Options passed to GNU diff when generating patches QUILT_DIFF_OPTS="--show-c-function" # Options to pass to commands (QUILT_${COMMAND}_ARGS) QUILT_PUSH_ARGS="--color=auto" QUILT_DIFF_ARGS="--no-timestamps --color=auto" QUILT_REFRESH_ARGS="--no-timestamps --backup -p0" QUILT_PATCH_OPTS="--backup" QUILT_NO_DIFF_TIMESTAMP="true" QUILT_NO_DIFF_INDEX="true" QUILT_SETUP_ARGS="-v --fuzz=0" This is particulary helpful nowdays, as the build system barfs when patches do not apply cleanly with fuzz=0
The first step failed as there are no packages yet. Thus I didn't quite know what to do and just remained in my "top level directory", i.e. the directory that contains the .spec file and the tarball. I unpacked the tarball and following the steps outlined I managed to get my patch created.
Now I have a patches directory with my patch file (qpidc-0.6-fix-xqill-interface-problem.patch) and a file named "series".
In my spec file I added:
Patch0: %{short_name}-%{version}-fix-xqill-interface-problem.patch
error: Bad source: /usr/src/packages/SOURCES/qpid-cpp-0.6-fix-xqill-interface-problem.patch: No such file or directory
%{short_name}-%{version}-fix-xqill-interface-problem.patch expands to qpid-cpp-0.6-fix-xqill-interface-problem.patch and that file does not exists, as your patch is called qpidc-0.6-fix-xqill-interface-problem.patch ;) To avoid this problem, I suggest you not to use macros in patch names, in particular do not use %{version} as it would break the build as soon as you update to qqid-0-7 ... if the old patch does not apply in version 0.7, either remove it if already applied or simple refresh it . -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
For the start, grab a recent version of quilt and use the following .quiltrc file
cat .quiltrc
# Options passed to GNU diff when generating patches QUILT_DIFF_OPTS="--show-c-function" # Options to pass to commands (QUILT_${COMMAND}_ARGS) QUILT_PUSH_ARGS="--color=auto" QUILT_DIFF_ARGS="--no-timestamps --color=auto" QUILT_REFRESH_ARGS="--no-timestamps --backup -p0" QUILT_PATCH_OPTS="--backup" QUILT_NO_DIFF_TIMESTAMP="true" QUILT_NO_DIFF_INDEX="true" QUILT_SETUP_ARGS="-v --fuzz=0"
This is particulary helpful nowdays, as the build system barfs when patches do not apply cleanly with fuzz=0 Thanks for this, I no longer have to put -p1 for my patches nor have
On 10/22/2010 04:54 AM, Cristian Rodríguez wrote: people complain about their "timestamps" Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Cristian Rodríguez
-
Dave Plater
-
Robert Schweikert