Mailinglist Archive: opensuse-packaging (80 mails)

< Previous Next >
[opensuse-packaging] how do I apply an extra patch
  • From: <doiggl@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 05 Aug 2010 09:10:47 +0000
  • Message-id: <398f6d9055c924d4eecc2f50bd037a14@xxxxxxxxxxxxxxxxxxxxxxx>
Hello
- What directory do I use to copy in and later apply an extra patch to
this kernel vanilla compilation [1] for this project [2]. I'm using a copy
of the .spec file.

- I know in the process runs a script [3] to copy and apply the patches.
- So what line do I add to spec file to the copy in the .patch to the
correct location ?, before the patch is applied.
The .patch file applies ok on a dry run [4].
Thanks Glenn

[1]
https://build.opensuse.org/package/rawlog?arch=x86_64&package=kernel-vanilla&project=home%3Adoiggl&repository=openSUSE_11.3
[2]
https://build.opensuse.org/package/show?package=kernel-vanilla&project=home%3Adoiggl
[3]
https://build.opensuse.org/package/view_file?file=apply-patches&package=kernel-source&project=openSUSE%3A11.3
[content]
#!/bin/sh
#
# Given a series.conf file and a directory with patches, applies them to
the
# current directory.
# Used by kernel-source.spec.in and kernel-binary.spec.in

USAGE="$0 [--vanilla] <series.conf> <patchdir> [symbol ...]"

set -e
set -o pipefail
vanilla=false
if test "$1" == "--vanilla"; then
vanilla=true
shift
fi
if test $# -lt 2; then
echo "$USAGE" >&2
exit 1
fi
DIR="${0%/*}"
SERIES_CONF=$1
PATCH_DIR=$2
shift 2

trap 'rm -f "$series"' EXIT
series=$(mktemp)
# support for patches in patches.addon/series
cp "$SERIES_CONF" "$series"
if ! $vanilla && test -e "$PATCH_DIR/patches.addon/series"; then
# make it user-friendly and automatically prepend "patches.addon/"
# if there is no "/"
sed -r 's|^([[:space:]]*)([^#[:space:]][^/]*)$|\1patches.addon/\2|' \
"$PATCH_DIR/patches.addon/series" >>"$series"
fi

(
echo "trap 'echo \"*** patch \$_ failed ***\"' ERR"
echo "set -ex"
"$DIR"/guards "$@" <"$series" | \
if $vanilla; then
egrep '^patches\.(kernel\.org|rpmify)/'
else
cat
fi |\
sed "s|^|patch -s -F0 -E -p1 --no-backup-if-mismatch -i $PATCH_DIR/|"
) | sh


[extract from log]
+ cd linux-2.6.34
+ /usr/src/packages/SOURCES/apply-patches --vanilla
/usr/src/packages/SOURCES/series.conf ..
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/tioca-fix-assignment-from-incompatible-pointer-warnings
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/ia64-mca-fix-cast-from-integer-to-pointer-warning
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/dmar-fix-section-mismatch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/ppc-crashdump-typefix
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/powerpc-kvm-build-failure-workaround
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/firmware-path
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/rpm-kernel-config
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/split-package
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/buildhost
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/cloneconfig.diff


[4] patch dry run
# cd /usr/src/
# bunzip2 /tmp/linux-2.6.34.tar.bz2
# ln -s linux-2.6.34 linux
# cd linux
# cp -v /boot/config-$(uname -r) /usr/src/linux/.config
`/boot/config-2.6.34-12-desktop' -> `/usr/src/linux/.config'

# patch -p1 --dry-run < reiser4-for-2.6.34.patch
patching file Documentation/Changes
patching file Documentation/filesystems/reiser4.txt
patching file fs/fs-writeback.c
patching file fs/inode.c
patching file fs/Kconfig
patching file fs/Makefile
patching file fs/reiser4/as_ops.c
patching file fs/reiser4/block_alloc.c
patching file fs/reiser4/block_alloc.h
patching file fs/reiser4/blocknrset.c
patching file fs/reiser4/carry.c
patching file fs/reiser4/carry.h
patching file fs/reiser4/carry_ops.c
patching file fs/reiser4/carry_ops.h
patching file fs/reiser4/context.c
patching file fs/reiser4/context.h
patching file fs/reiser4/coord.c
patching file fs/reiser4/coord.h
patching file fs/reiser4/debug.c
patching file fs/reiser4/debug.h
patching file fs/reiser4/dformat.h
patching file fs/reiser4/dscale.c
patching file fs/reiser4/dscale.h
patching file fs/reiser4/entd.c
patching file fs/reiser4/entd.h
patching file fs/reiser4/eottl.c
patching file fs/reiser4/estimate.c
patching file fs/reiser4/export_ops.c
patching file fs/reiser4/flush.c
patching file fs/reiser4/flush.h
patching file fs/reiser4/flush_queue.c
patching file fs/reiser4/forward.h
patching file fs/reiser4/fsdata.c
patching file fs/reiser4/fsdata.h
patching file fs/reiser4/init_super.c
patching file fs/reiser4/inode.c
patching file fs/reiser4/inode.h
patching file fs/reiser4/ioctl.h
patching file fs/reiser4/jnode.c
patching file fs/reiser4/jnode.h
patching file fs/reiser4/kassign.c
patching file fs/reiser4/kassign.h
patching file fs/reiser4/Kconfig
patching file fs/reiser4/key.c
patching file fs/reiser4/key.h
patching file fs/reiser4/ktxnmgrd.c
patching file fs/reiser4/ktxnmgrd.h
patching file fs/reiser4/lock.c
patching file fs/reiser4/lock.h
patching file fs/reiser4/Makefile
patching file fs/reiser4/oid.c
patching file fs/reiser4/page_cache.c
patching file fs/reiser4/page_cache.h
patching file fs/reiser4/plugin/clHello

--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages