[opensuse-kernel] combine shell script and .spec file into one .spec file to do the whole job.
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs. Can someone help at joining the two together and list what the new .spec file would look like. The reason I ask is I can run the script locally and its builds the rpms and I want obs to do the building instead. Here is start when script was run[3] Here is a copy of the make rpm-pkg .spec file[2] Here is a sample log of a successful build with a script [4] I posted on packaging and kernel as this is a but of a mix of both. Thanks for your help Cheers Glenn [1] {shell script this works ok locally} ======================================== version="35" cd /usr/src rm -rf linux-2.6.$version linux cp -v /media/disk/kernel/2.6.$version/final/linux-2.6.$version.tar.bz2 . rm linux-2.6.35.tar bunzip2 -v linux-2.6.$version.tar.bz2 tar -xvf linux-2.6.$version.tar ln -s linux-2.6.$version linux cp -v /boot/config-$(uname -r) /usr/src/linux-2.6.$version/.config cd /usr/src/linux patch -p1 < /patch/reiser4-for-2.6.$version.patch cp -v /source/new.config /usr/src/linux-2.6.35/.config make rpm-pkg | tee reiser4enabledkernel.log [2] {.spec file content part of make rpm-pkg} # cat kernel.spec =============================================================== Name: kernel Summary: The Linux Kernel Version: 2.6.3512desktop Release: 1 License: GPL Group: System Environment/Kernel Vendor: The Linux Community URL: http://www.kernel.org Source: kernel-2.6.3512desktop.tar.gz BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root Provides: kernel-2.6.35-12-desktop %define __spec_install_post /usr/lib/rpm/brp-compress || : %define debug_package %{nil} %description The Linux Kernel, the operating system core itself %prep %setup -q %build make clean && make %{?_smp_mflags} %install %ifarch ia64 mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules mkdir -p $RPM_BUILD_ROOT/lib/firmware %else mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules mkdir -p $RPM_BUILD_ROOT/lib/firmware %endif INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} KBUILD_SRC= modules_install %ifarch ia64 cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/efi/vmlinuz-2.6.35-12-desktop ln -s efi/vmlinuz-2.6.35-12-desktop $RPM_BUILD_ROOT/boot/ %else %ifarch ppc64 cp vmlinux arch/powerpc/boot cp arch/powerpc/boot/$KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-2.6.35-12-desktop %else cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-2.6.35-12-desktop %endif %endif cp System.map $RPM_BUILD_ROOT/boot/System.map-2.6.35-12-desktop cp .config $RPM_BUILD_ROOT/boot/config-2.6.35-12-desktop %ifnarch ppc64 cp vmlinux vmlinux.orig bzip2 -9 vmlinux mv vmlinux.bz2 $RPM_BUILD_ROOT/boot/vmlinux-2.6.35-12-desktop.bz2 mv vmlinux.orig vmlinux %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr (-, root, root) %dir /lib/modules /lib/modules/2.6.35-12-desktop /lib/firmware /boot/* [3] {start when script was run} =============================== /bin/sh /media/disk/src/linux-2.6.35/scripts/package/mkspec > /media/disk/src/linux-2.6.35/kernel.spec make clean set -e; cd ..; ln -sf /media/disk/src/linux-2.6.35 kernel-2.6.3512desktop /bin/sh /media/disk/src/linux-2.6.35/scripts/setlocalversion --save-scmversion set -e; cd ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel-2.6.3512desktop.tar.gz kernel-2.6.3512desktop/. set -e; cd ..; rm kernel-2.6.3512desktop rm -f /media/disk/src/linux-2.6.35/.scmversion set -e; \ /bin/sh /media/disk/src/linux-2.6.35/scripts/mkversion > /media/disk/src/linux-2.6.35/.tmp_version set -e; \ mv -f /media/disk/src/linux-2.6.35/.tmp_version /media/disk/src/linux-2.6.35/.version rpmbuild --target x86_64 -ta ../kernel-2.6.3512desktop.tar.gz Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.pNRVVF + umask 022 [4] {content of local compilation} ================================== https://build.opensuse.org/package/view_file?file=reiser4enabledkernel.log&package=reiser4&project=home%3Adoiggl -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
What are you trying to do here? Why can't you just add the reiser4 patch to patches.addon? - -Jeff
Can someone help at joining the two together and list what the new .spec file would look like. The reason I ask is I can run the script locally and its builds the rpms and I want obs to do the building instead. Here is start when script was run[3] Here is a copy of the make rpm-pkg .spec file[2] Here is a sample log of a successful build with a script [4] I posted on packaging and kernel as this is a but of a mix of both. Thanks for your help Cheers Glenn
[1] {shell script this works ok locally} ======================================== version="35" cd /usr/src rm -rf linux-2.6.$version linux cp -v /media/disk/kernel/2.6.$version/final/linux-2.6.$version.tar.bz2 . rm linux-2.6.35.tar bunzip2 -v linux-2.6.$version.tar.bz2 tar -xvf linux-2.6.$version.tar ln -s linux-2.6.$version linux cp -v /boot/config-$(uname -r) /usr/src/linux-2.6.$version/.config cd /usr/src/linux patch -p1 < /patch/reiser4-for-2.6.$version.patch cp -v /source/new.config /usr/src/linux-2.6.35/.config make rpm-pkg | tee reiser4enabledkernel.log
[2] {.spec file content part of make rpm-pkg} # cat kernel.spec =============================================================== Name: kernel Summary: The Linux Kernel Version: 2.6.3512desktop Release: 1 License: GPL Group: System Environment/Kernel Vendor: The Linux Community URL: http://www.kernel.org Source: kernel-2.6.3512desktop.tar.gz BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root Provides: kernel-2.6.35-12-desktop %define __spec_install_post /usr/lib/rpm/brp-compress || : %define debug_package %{nil}
%description The Linux Kernel, the operating system core itself
%prep %setup -q
%build make clean && make %{?_smp_mflags}
%install %ifarch ia64 mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules mkdir -p $RPM_BUILD_ROOT/lib/firmware %else mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules mkdir -p $RPM_BUILD_ROOT/lib/firmware %endif INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} KBUILD_SRC= modules_install %ifarch ia64 cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/efi/vmlinuz-2.6.35-12-desktop ln -s efi/vmlinuz-2.6.35-12-desktop $RPM_BUILD_ROOT/boot/ %else %ifarch ppc64 cp vmlinux arch/powerpc/boot cp arch/powerpc/boot/$KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-2.6.35-12-desktop %else cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-2.6.35-12-desktop %endif %endif cp System.map $RPM_BUILD_ROOT/boot/System.map-2.6.35-12-desktop cp .config $RPM_BUILD_ROOT/boot/config-2.6.35-12-desktop %ifnarch ppc64 cp vmlinux vmlinux.orig bzip2 -9 vmlinux mv vmlinux.bz2 $RPM_BUILD_ROOT/boot/vmlinux-2.6.35-12-desktop.bz2 mv vmlinux.orig vmlinux %endif
%clean rm -rf $RPM_BUILD_ROOT
%files %defattr (-, root, root) %dir /lib/modules /lib/modules/2.6.35-12-desktop /lib/firmware /boot/*
[3] {start when script was run} =============================== /bin/sh /media/disk/src/linux-2.6.35/scripts/package/mkspec > /media/disk/src/linux-2.6.35/kernel.spec make clean set -e; cd ..; ln -sf /media/disk/src/linux-2.6.35 kernel-2.6.3512desktop /bin/sh /media/disk/src/linux-2.6.35/scripts/setlocalversion --save-scmversion set -e; cd ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel-2.6.3512desktop.tar.gz kernel-2.6.3512desktop/. set -e; cd ..; rm kernel-2.6.3512desktop rm -f /media/disk/src/linux-2.6.35/.scmversion set -e; \ /bin/sh /media/disk/src/linux-2.6.35/scripts/mkversion > /media/disk/src/linux-2.6.35/.tmp_version set -e; \ mv -f /media/disk/src/linux-2.6.35/.tmp_version /media/disk/src/linux-2.6.35/.version rpmbuild --target x86_64 -ta ../kernel-2.6.3512desktop.tar.gz Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.pNRVVF + umask 022
[4] {content of local compilation} ================================== https://build.opensuse.org/package/view_file?file=reiser4enabledkernel.log&package=reiser4&project=home%3Adoiggl
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxi5tEACgkQLPWxlyuTD7Kb7wCfZod6VuK3PZzJfpFk4Neou7pe SZIAn2qPXAsP2MbGTqc9A8EK/AG8Fsqa =oyB4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wed, 11 Aug 2010 14:07:13 -0400, Jeff Mahoney
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
What are you trying to do here? Why can't you just add the reiser4 patch to patches.addon?
- -Jeff
Thanks I did not know how the easiest method to accomplish this. So far I've done this # cat patches.addon/series patches.addon/reiser4-for-2.6.34.patch # tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/series patches.addon/reiser4-for-2.6.34.patch # # bzip2 -v patches.addon.tar patches.addon.tar: 5.341:1, 1.498 bits/byte, 81.28% saved, 2406400 in, 450569 out. # ll patches.addon.tar.bz2 -rw-r--r-- 1 root root 450569 Aug 12 23:16 patches.addon.tar.bz2 - The project is at https://build.opensuse.org/package/files?package=reiser4&project=home%3Adoiggl - Im using this spec file https://build.opensuse.org/package/view_file?file=reiser4.spec&package=reiser4&project=home%3Adoiggl Is this correct so far Thanks Glenn -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wed, 11 Aug 2010 14:07:13 -0400, Jeff Mahoney
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
What are you trying to do here? Why can't you just add the reiser4
On Thu, 12 Aug 2010 23:55:06 +1000,
to patches.addon?
- -Jeff
Thanks I did not know how the easiest method to accomplish this. So far I've done this
# cat patches.addon/series patches.addon/reiser4-for-2.6.34.patch # tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/series patches.addon/reiser4-for-2.6.34.patch # # bzip2 -v patches.addon.tar patches.addon.tar: 5.341:1, 1.498 bits/byte, 81.28% saved, 2406400 in, 450569 out. # ll patches.addon.tar.bz2 -rw-r--r-- 1 root root 450569 Aug 12 23:16 patches.addon.tar.bz2
- The project is at
https://build.opensuse.org/package/files?package=reiser4&project=home%3Adoiggl
- Im using this spec file
https://build.opensuse.org/package/view_file?file=reiser4.spec&package=reiser4&project=home%3Adoiggl
Hello The default setup line is incorrect here. %prep %setup -q Result: + rm -rf kernel-2.6.35.1 + /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/linux-2.6.35.1.tar.bz2 + /bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd kernel-2.6.35.1 /var/tmp/rpm-tmp.Bw6eha: line 32: cd: kernel-2.6.35.1: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.Bw6eha (%prep) The top level directory of linux-2.6.35.1.tar.bz2 is linux-2.6.35.1/ How can I change the setup -q line so it does 'cd linux-2.6.35.1' and not 'cd kernel-2.6.35.1' project files -> https://build.opensuse.org/package/files?package=reiser4&project=home%3Adoiggl spec file ->https://build.opensuse.org/package/view_file?file=reiser4.spec&package=reiser4&project=home%3Adoiggl last log -> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=reiser4&project=home%3Adoiggl&repository=openSUSE_11.3 Thanks Glenn -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/12/2010 12:28 PM, doiggl@velocitynet.com.au wrote:
On Wed, 11 Aug 2010 14:07:13 -0400, Jeff Mahoney
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
What are you trying to do here? Why can't you just add the reiser4
On Thu, 12 Aug 2010 23:55:06 +1000,
wrote: patch to patches.addon?
- -Jeff
Thanks I did not know how the easiest method to accomplish this. So far I've done this
# cat patches.addon/series patches.addon/reiser4-for-2.6.34.patch # tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/series patches.addon/reiser4-for-2.6.34.patch
The current spec implementation doesn't look at the series file inside the patches.addon.tar.bz2 tarball. You still need to add your patch to the series.conf file for it to be patched in.
# bzip2 -v patches.addon.tar patches.addon.tar: 5.341:1, 1.498 bits/byte, 81.28% saved, 2406400 in, 450569 out. # ll patches.addon.tar.bz2 -rw-r--r-- 1 root root 450569 Aug 12 23:16 patches.addon.tar.bz2
- The project is at
https://build.opensuse.org/package/files?package=reiser4&project=home%3Adoiggl
- Im using this spec file
https://build.opensuse.org/package/view_file?file=reiser4.spec&package=reiser4&project=home%3Adoiggl
Hello The default setup line is incorrect here.
It may well be, but this is the wrong place to report it. We have our own spec files for our kernel packages and don't use or care about problems with the spec file that ships with the upstream kernel package. - -Jeff
%prep %setup -q
Result: + rm -rf kernel-2.6.35.1 + /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/linux-2.6.35.1.tar.bz2 + /bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd kernel-2.6.35.1 /var/tmp/rpm-tmp.Bw6eha: line 32: cd: kernel-2.6.35.1: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.Bw6eha (%prep)
The top level directory of linux-2.6.35.1.tar.bz2 is linux-2.6.35.1/
How can I change the setup -q line so it does 'cd linux-2.6.35.1' and not 'cd kernel-2.6.35.1'
project files -> https://build.opensuse.org/package/files?package=reiser4&project=home%3Adoiggl spec file ->https://build.opensuse.org/package/view_file?file=reiser4.spec&package=reiser4&project=home%3Adoiggl last log -> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=reiser4&project=home%3Adoiggl&repository=openSUSE_11.3
Thanks Glenn
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxkKj0ACgkQLPWxlyuTD7KbvwCdFuSTnvDfZurFULFg1FMEM+m2 Q7gAniHxde9zit9ErHubbFH83jSVT+fE =3UoY -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
I've just added a section to README.SUSE to describe the process involved in adding custom patches. Here it is. - -Jeff HOW TO ADD CUSTOM PATCHES Typically patches are added to the appropriate patches.* directory (e.g. patches.fixes) and to series.conf. When the kernel-source package is exported from the git repository, the patch will be automatically added to the appropriate patch tarball. If your goal is to create a kernel with only a few additional patches and you don't want to be bothered with using the git repository, there is an easier way. The kernel-source SRPM ships with two empty archives that can be be filled and automatically expanded when building the kernel. You can use these to add your own patches and config options without disturbing the rest of the kernel package. This is useful if you are using the openSUSE Build Service and link to the main kernel-source project instead of creating your own branch. The advantage to this is that your project will automatically receive all the changes that go into the main project without any further effort. To add a patch using this mechanism, just add it to the patches.addon.tar.bz2 archive and add an entry to the series.conf file. The archive will be expanded automatically with the other kernel patches when the source tree is constructed. Some patches may add new Kconfig options. The config.addon.tar.bz2 archive contains the same hierarchy as config.tar.bz2, but is under config.addon. You can add your new config options to files named after their config/ counterparts. For example, the file used to configure the i386 default kernel is named config/i386/default. To add config options to that kernel, you would create a new file called config.addon/i386/default with the options as formatted in a normal Linux kernel .config file. This is important because the kernel build is non-interactive and will fail if it encounters new config options without entries in the config file. - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxkL8sACgkQLPWxlyuTD7JhDQCff7emjApXkrZDJxqgyhwbbN6w vGkAnjVL7FXEZyyj8sKE1wzcGMz6dvla =THyb -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On 12.8.2010 19:07, Jeff Mahoney wrote:
On 08/12/2010 12:28 PM, doiggl@velocitynet.com.au wrote:
# cat patches.addon/series patches.addon/reiser4-for-2.6.34.patch # tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/series patches.addon/reiser4-for-2.6.34.patch
The current spec implementation doesn't look at the series file inside the patches.addon.tar.bz2 tarball. You still need to add your patch to the series.conf file for it to be patched in.
The above works since 11.3, see rpm/apply-patches in openSUSE-11.3 and master. Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Thu, 12 Aug 2010 13:30:51 -0400, Jeff Mahoney
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
I've just added a section to README.SUSE to describe the process involved in adding custom patches.
Here it is.
- -Jeff
HOW TO ADD CUSTOM PATCHES
Typically patches are added to the appropriate patches.* directory (e.g. patches.fixes) and to series.conf. When the kernel-source package is exported from the git repository, the patch will be automatically added to the appropriate patch tarball.
If your goal is to create a kernel with only a few additional patches and you don't want to be bothered with using the git repository, there is an easier way.
The kernel-source SRPM ships with two empty archives that can be be filled and automatically expanded when building the kernel. You can use these to add your own patches and config options without disturbing the rest of the kernel package. This is useful if you are using the openSUSE Build Service and link to the main kernel-source project instead of creating your own branch. The advantage to this is that your project will automatically receive all the changes that go into the main project without any further effort.
To add a patch using this mechanism, just add it to the patches.addon.tar.bz2 archive and add an entry to the series.conf file. The archive will be expanded automatically with the other kernel patches when the source tree is constructed.
Some patches may add new Kconfig options. The config.addon.tar.bz2 archive contains the same hierarchy as config.tar.bz2, but is under config.addon. You can add your new config options to files named after their config/ counterparts.
For example, the file used to configure the i386 default kernel is named config/i386/default. To add config options to that kernel, you would create a new file called config.addon/i386/default with the options as formatted in a normal Linux kernel .config file. This is important because the kernel build is non-interactive and will fail if it encounters new config options without entries in the config file.
- -- Jeff Mahoney SUSE Labs
Hello, Thanks for the info. I want to use this option with one patch. Referring to: The kernel-source SRPM ships with two empty archives that can be be filled and automatically expanded when building the kernel. You can use these to add your own patches and config options without disturbing the rest of the kernel package. This is useful if you are using the openSUSE Build Service and link to the main kernel-source project instead of creating your own branch. The advantage to this is that your project will automatically receive all the changes that go into the main project without any further effort. To add a patch using this mechanism, just add it to the patches.addon.tar.bz2 archive and add an entry to the series.conf file. The archive will be expanded automatically with the other kernel patches when the source tree is constructed. Using the readme info and the spec file [1] from 11.3 with these files[2]. - This is what I've done so far. # tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/reiser4-for-2.6.34.patch # bzip2 -v patches.addon.tar patches.addon.tar: 5.316:1, 1.505 bits/byte, 81.19% saved, 2396160 in, 450745 out. I will use a copy of series.conf [3] for (x86 and x86_84 architecture). Questions - Which line/section do I add the extra reiser4-for-2.6.34.patch line to and what should the line look like? - If I cannot use that series.conf [3] what should series.conf look with the reiser4-for-2.6.34.patch line added in ? [1] https://build.opensuse.org/package/view_file?file=kernel-vanilla.spec&package=kernel-vanilla&project=home%3Adoiggl [2] https://build.opensuse.org/package/files?package=kernel-vanilla&project=home%3Adoiggl [3] https://build.opensuse.org/package/view_file?file=series.conf&package=kernel-vanilla&project=home%3Adoiggl Cheers Glenn -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/13/2010 08:57 AM, doiggl@velocitynet.com.au wrote:
On Thu, 12 Aug 2010 13:30:51 -0400, Jeff Mahoney
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/09/2010 10:43 AM, doiggl@velocitynet.com.au wrote:
Hello, I need help to combine this shell script [1] and .spec file [2]into one .spec file to do the whole job and run from obs.
I've just added a section to README.SUSE to describe the process involved in adding custom patches.
Here it is.
- -Jeff
HOW TO ADD CUSTOM PATCHES
Typically patches are added to the appropriate patches.* directory (e.g. patches.fixes) and to series.conf. When the kernel-source package is exported from the git repository, the patch will be automatically added to the appropriate patch tarball.
If your goal is to create a kernel with only a few additional patches and you don't want to be bothered with using the git repository, there is an easier way.
The kernel-source SRPM ships with two empty archives that can be be filled and automatically expanded when building the kernel. You can use these to add your own patches and config options without disturbing the rest of the kernel package. This is useful if you are using the openSUSE Build Service and link to the main kernel-source project instead of creating your own branch. The advantage to this is that your project will automatically receive all the changes that go into the main project without any further effort.
To add a patch using this mechanism, just add it to the patches.addon.tar.bz2 archive and add an entry to the series.conf file. The archive will be expanded automatically with the other kernel patches when the source tree is constructed.
Some patches may add new Kconfig options. The config.addon.tar.bz2 archive contains the same hierarchy as config.tar.bz2, but is under config.addon. You can add your new config options to files named after their config/ counterparts.
For example, the file used to configure the i386 default kernel is named config/i386/default. To add config options to that kernel, you would create a new file called config.addon/i386/default with the options as formatted in a normal Linux kernel .config file. This is important because the kernel build is non-interactive and will fail if it encounters new config options without entries in the config file.
- -- Jeff Mahoney SUSE Labs
Hello, Thanks for the info. I want to use this option with one patch.
Referring to: The kernel-source SRPM ships with two empty archives that can be be filled and automatically expanded when building the kernel. You can use these to add your own patches and config options without disturbing the rest of the kernel package. This is useful if you are using the openSUSE Build Service and link to the main kernel-source project instead of creating your own branch. The advantage to this is that your project will automatically receive all the changes that go into the main project without any further effort.
To add a patch using this mechanism, just add it to the patches.addon.tar.bz2 archive and add an entry to the series.conf file. The archive will be expanded automatically with the other kernel patches when the source tree is constructed.
Using the readme info and the spec file [1] from 11.3 with these files[2].
- This is what I've done so far.
# tar -cvf patches.addon.tar patches.addon patches.addon/ patches.addon/reiser4-for-2.6.34.patch
# bzip2 -v patches.addon.tar patches.addon.tar: 5.316:1, 1.505 bits/byte, 81.19% saved, 2396160 in, 450745 out.
I will use a copy of series.conf [3] for (x86 and x86_84 architecture). Questions - Which line/section do I add the extra reiser4-for-2.6.34.patch line to and what should the line look like? - If I cannot use that series.conf [3] what should series.conf look with the reiser4-for-2.6.34.patch line added in ?
It's probably easiest if you just add it to the very end. That way you can be sure that you don't change the context of any patches that are applied before it. Michal posted separately saying that the 11.3/master kernel-source packages actually do process patches.addon/series, so having a series file in the tarball may be enough. BTW, you can't use kernel-vanilla in the way you're trying. Your patch just won't get applied at all. You need to use an openSUSE kernel flavor as a base. If you want to use kernel-vanilla then the above instructions won't work and you'll need to add it to patches.rpmify.tar.bz2 and to the series.conf. The format of series.conf should be self-explanatory once you look at it. - -Jeff
[1] https://build.opensuse.org/package/view_file?file=kernel-vanilla.spec&package=kernel-vanilla&project=home%3Adoiggl [2] https://build.opensuse.org/package/files?package=kernel-vanilla&project=home%3Adoiggl [3] https://build.opensuse.org/package/view_file?file=series.conf&package=kernel-vanilla&project=home%3Adoiggl
Cheers Glenn
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxlUI0ACgkQLPWxlyuTD7LMbQCbBnwjTKp9dJFmHPbJMW+tbpu0 juAAoJAIy+AERwrddZ5HLNeN/+qsGn+a =UArc -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (3)
-
doiggl@velocitynet.com.au
-
Jeff Mahoney
-
Michal Marek