[opensuse-packaging] applying a patch
Hello I am trying to get a kernel that will be patched, then obs to to compile it to generate a .rpm and I need some assistance. - Its based on kernel 2.6.33.x , so Ive set up a link to the sources of the package kernel-source of project Base:Kernel. Details are: <link project='Base:Kernel' package='kernel-source' cicount='copy'/> Questions: - What does the BuildRequires line need so kernel-source-2.6.33.x gets installed (e.g kernel-source-2.6.33-6.2.src.rpm) ? - How can the patch be applied ? , its in patch.bz2 format Project -> https://build.opensuse.org/package/show?package=r4testdot33&project=home%3Adoiggl Assistance appreciated. Thanks Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 31.3.2010 12:26, doiggl@velocitynet.com.au wrote:
Hello I am trying to get a kernel that will be patched, then obs to to compile it to generate a .rpm and I need some assistance.
- Its based on kernel 2.6.33.x , so Ive set up a link to the sources of the package kernel-source of project Base:Kernel. Details are: <link project='Base:Kernel' package='kernel-source' cicount='copy'/>
Hm, I didn't know of Base:Kernel. You could as well link the openSUSE:Factory package directly. Also, you should remove the cicount='copy' here, your package will be different, so it should not copy the release number.
Questions: - What does the BuildRequires line need so kernel-source-2.6.33.x gets installed (e.g kernel-source-2.6.33-6.2.src.rpm) ? - How can the patch be applied ? , its in patch.bz2 format
The patches in the kernel-source package are packaged in the patches.xx.tar.bz2 tarballs, the order in which they are applied is controlled by the series.conf file. There is a special tarball called patches.addon.tar.bz2 and this is where you put patch. Create a tarball like this: $ tar tf patches.addon.tar.bz2 patches.addon/foobar.patch patches.addon/series where the series file contains this line: patches.addon/foobar.patch And add it to your kernel-source package. If you need to apply more patches, simply list them all in the series file, in the order you want to apply them. And finally: The kernel-source package only builds the kernel-source rpms. To build the binary kernel, you need to create a kernel-desktop, kernel-pae, etc links inside your project _with_ cicout=copy for a change. Look at the Kernel:HEAD project to see how the setup should look like. Good luck, Michal -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, Thanks for the info Michal. I did the following ,had to change some items: - I created a kernel-default in my home project - Had to change the linkage after finding a .33 kernel based project. Details: <link project="home:tiwai:kernel:2.6.33" package="kernel-source" cicount="copy"> - copied in the kernel-default.spec to my home kernel-default project - I triggered a compile to see if the kernel builds. The build is in progress. Now to build the extra patch, I did these steps: # cd / # md patches.addon # cd patches.addon # wget -c http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6... # bunzip2 reiser4-for-2.6.33.patch.bz2 # echo patches.addon/reiser4-for-2.6.33.patch > series # cat series patches.addon/reiser4-for-2.6.33.patch # cd / # tar -cvf patches.addon.tar patches.addon # tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/series patches.addon/reiser4-for-2.6.33.patch # bzip2 patches.addon.tar tar tf patches.addon.tar.bz2 patches.addon/ patches.addon/series patches.addon/reiser4-for-2.6.33.patch I added file patches.addon.tar.bz2 to the project I need help in changing the specfile to apply this patch(patches.addon.tar.bz2) Questions - What lines need to be added or changed , what should the lines look like ? Project -> https://build.opensuse.org/package/show?package=kernel-default&project=home%3Adoiggl Specfile -> https://build.opensuse.org/package/view_file?file=kernel-default.spec&package=kernel-default&project=home%3Adoiggl Thanks for the help. Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
I just noticed a failure in the log . . . + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.xen/xen-x86_64-pgd-pin + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.xen/xen-x86_64-pgd-alloc-order + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.xen/xen-x86_64-dump-user-pgt + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.xen/xen-x86_64-note-init-p2m + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.addon/reiser4-for-2.6.33.patch Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] 1 out of 1 hunk ignored -- saving rejects to file include/linux/mm.h.rej 2 out of 3 hunks FAILED -- saving rejects to file mm/filemap.c.rej Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] 1 out of 1 hunk ignored -- saving rejects to file mm/page-writeback.c.rej ++ echo '*** patch ../patches.addon/reiser4-for-2.6.33.patch failed ***' *** patch ../patches.addon/reiser4-for-2.6.33.patch failed *** error: Bad exit status from /var/tmp/rpm-tmp.pd4W4N (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.pd4W4N (%prep) mount: / is busy System halted. last log -> https://build.opensuse.org/package/rawlog?arch=x86_64&package=kernel-default&project=home%3Adoiggl&repository=openSUSE_11.2 Project -> https://build.opensuse.org/package/show?package=kernel-default&project=home%3Adoiggl Specfile -> https://build.opensuse.org/package/view_file?file=kernel-default.spec&package=kernel-default&project=home%3Adoiggl Thanks for the help. Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
I added the following lines to the spec file. Source121: patches.addon.tar.bz2 and -a 121 to the end of the %setup line I triggered a rembuild but i cannot tell if the patch (patches.addon.tar.bz2) got applied. Can you have a look at the log / specfile and see if the patch (patches.addon.tar.bz2) got applied. Specfile -> https://build.opensuse.org/package/view_file?file=kernel-default.spec&package=kernel-default&project=home%3Adoiggl last log ->https://build.opensuse.org/package/rawlog?arch=x86_64&package=kernel-default&project=home%3Adoiggl&repository=openSUSE_11.2 Project ->https://build.opensuse.org/package/show?package=kernel-default&project=home%3Adoiggl Thanks for the help. Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Fri, Apr 02, 2010 at 11:55:52AM +0000, doiggl@velocitynet.com.au wrote:
I added the following lines to the spec file.
Source121: patches.addon.tar.bz2 and -a 121 to the end of the %setup line
I triggered a rembuild but i cannot tell if the patch (patches.addon.tar.bz2) got applied. Can you have a look at the log / specfile and see if the patch (patches.addon.tar.bz2) got applied.
Project ->https://build.opensuse.org/package/show?package=kernel-default&project=home%3Adoiggl
Is the patch listed in series.conf? Ciao, marcus -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Fri, 2 Apr 2010 13:59:52 +0200, Marcus Meissner <meissner@suse.de> wrote:
On Fri, Apr 02, 2010 at 11:55:52AM +0000, doiggl@velocitynet.com.au wrote:
I added the following lines to the spec file.
Source121: patches.addon.tar.bz2 and -a 121 to the end of the %setup line
I triggered a rembuild but i cannot tell if the patch (patches.addon.tar.bz2) got applied. Can you have a look at the log / specfile and see if the patch (patches.addon.tar.bz2) got applied.
Is the patch listed in series.conf?
Ciao, marcus
No - the patch was not listed in the series.conf - So I copied the series.conf to the home project - added the line to series.conf https://build.opensuse.org/package/view_file?file=series.conf&package=kernel-default&project=home%3Adoiggl -Triggered rebuild Specfile ->https://build.opensuse.org/package/view_file?file=kernel-default.spec&package=kernel-default&project=home%3Adoiggl last log ->https://build.opensuse.org/package/rawlog?arch=x86_64&package=kernel-default&project=home%3Adoiggl&repository=openSUSE_11.2 Project ->https://build.opensuse.org/package/show?package=kernel-default&project=home%3Adoiggl Thanks forthe info marcus Cheers Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello,
From the log i see an error. Is there any way to list the contents of the mm/filemap.c.rej file Thanks Glenn
. . + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.suse/kconfig-automate-kernel-desktop + patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../patches.suse/reiser4-exports 2 out of 3 hunks FAILED -- saving rejects to file mm/filemap.c.rej ++ echo '*** patch ../patches.suse/reiser4-exports failed ***' *** patch ../patches.suse/reiser4-exports failed *** error: Bad exit status from /var/tmp/rpm-tmp.F7ZN59 (%prep) last log->https://build.opensuse.org/package/rawlog?arch=x86_64&package=kernel-default&project=home%3Adoiggl&repository=openSUSE_11.2 Specfile->https://build.opensuse.org/package/view_file?file=kernel-default.spec&package=kernel-default&project=home%3Adoiggl Project ->https://build.opensuse.org/package/show?package=kernel-default&project=home%3Adoiggl -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 3.4.2010 06:08, doiggl@velocitynet.com.au wrote:
Hello, From the log i see an error. Is there any way to list the contents of the mm/filemap.c.rej file Thanks Glenn
By building locally. Or by working with the git repository directly (http://en.opensuse.org/Kernel_Git). And you don't need to copy any files, just create a source link and add a patches.addon.tar.bz2 tarball with the patch and the series file in it. This works since the Milestone2 kernel. Michal -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
doiggl@velocitynet.com.au
-
Marcus Meissner
-
Michal Marek