Mailinglist Archive: opensuse-packaging (214 mails)

< Previous Next >
Re: [opensuse-packaging] creating/applying a patch
  • From: Cristian Rodríguez <crrodriguez@xxxxxxxxxxxx>
  • Date: Thu, 21 Oct 2010 23:54:16 -0300
  • Message-id: <4CC0FCD8.60109@xxxxxxxxxxxx>
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):

http://en.opensuse.org/openSUSE:Fixing_bugs

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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References