m (→Step6: work as you want into your chroot) |
m (→Method1: by making a patch) |
||
| Line 56: | Line 56: | ||
# exit | # exit | ||
obslight makePatch --projectLocalName $ProjectName --package $Package --patch myKernelPatch.patch | obslight makePatch --projectLocalName $ProjectName --package $Package --patch myKernelPatch.patch | ||
| - | + | *The patch is automatically added to the local spec file. | |
| - | + | *'''myKernelPatch.patch''' is automatically added to the local package directory. | |
| + | *''kernel package specific:'' you must move the patch application command '''%patchXXX -p1''' after the command line '''cp $RPM_SOURCE_DIR/config-* .''' in the local spec file | ||
| + | vi ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/kernel.spec | ||
==== Method2: by copying the new configuration file ==== | ==== Method2: by copying the new configuration file ==== | ||
All data is stored in ~/OBSLight and subdirectories.
obslight addObsServer --serverApi https://api.meego.com --serverRepo http://download.meego.com/live --user obsuser --password opensuse
obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer https://api.meego.com --projectArch i586 --projectTarget standard
obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel
obslight createChRoot --projectLocalName MeeGo_1.2_oss
obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel
obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel
Now you are logged in the chroot. In this how-to we just modify the kernel configuration.
# cp configs/kernel-x86.config .config # make menuconfig
There are two methods.
# cp .config config-x86 # exit obslight makePatch --projectLocalName $ProjectName --package $Package --patch myKernelPatch.patch
vi ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/kernel.spec
# cp .config /chrootTransfert/config-x86 # exit cp /chrootTransfert/config-x86 ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/
obslight addAndCommitChanges --projectLocalName $ProjectName --package $Package -m "Patch kernel"
It's the same approach than with i586 architecture.
obslight addObsServer --serverAPI https://api.meego.com --serverRepos http://download.meego.com/live --user obsuser --passw opensuse obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer https://api.meego.com --projectArchitecture armv8el --projectTarget standard obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900 obslight createChRoot --projectLocalName MeeGo_1.2_oss obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900
Some errors you may encounter:
obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900 # cp configs/kernel-adaptation-n900.config .config # make menuconfig # cp .config config-adaptation-n900 # exit vi ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel-adaptation-n900/kernel-adaptation-n900.spec
You must move your patch command %patchXXX -p1 after the command line cp $RPM_SOURCE_DIR/config-* .
obslight makePatch --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900 --patch myKernelPatch.patch obslight addAndCommitChange --projectLocalName MeeGo_1.2_oss --package kernel-adaptation-n900 -m "Patch kernel"
If the project on your OBS doesn’t provide some dependencies and you must add a repository to your chroot's zypper configuration, you have two choices:
obslight addRepoInChRoot --projectLocalName MeeGo_1.2_oss --url http://download.meego.com/live/MeeGo:/1.2:/non-oss/MeeGo_1.2/ --alias "MeeGo_non-oss"
obslight addRepoInChRoot --projectLocalName MeeGo_1.2_oss --fromProject $ProjectName