Fvennetier (Talk | contribs) (→How to patch an i586 kernel for MeeGo with obslight?) |
Fvennetier (Talk | contribs) |
||
| Line 1: | Line 1: | ||
= OBS Light Deliverable = | = OBS Light Deliverable = | ||
| + | == Where does OBS Light client store its data? == | ||
| + | All data is stored in '''~/OBSLight''' and subdirectories. | ||
| + | |||
== How to patch an i586 kernel for MeeGo with obslight? == | == How to patch an i586 kernel for MeeGo with obslight? == | ||
| - | Create a connection to an OBS server | + | |
| - | + | === Create a connection to an OBS server === | |
*If you don't have a connection to a OBS server you can use [http://susegallery.com/a/e0uuBG/meego-obs an OBS appliance]. | *If you don't have a connection to a OBS server you can use [http://susegallery.com/a/e0uuBG/meego-obs an OBS appliance]. | ||
*If you don't have any package in your project, you can use [[Obstag | obstag and obs2obscopy]] to add some. | *If you don't have any package in your project, you can use [[Obstag | obstag and obs2obscopy]] to add some. | ||
obslight addObsServer --serverApi https://api.meego.com --serverRepo http://download.meego.com/live --user obsuser --password opensuse | obslight addObsServer --serverApi https://api.meego.com --serverRepo http://download.meego.com/live --user obsuser --password opensuse | ||
| - | Create a local project | + | |
| - | *The | + | === Create a local project === |
| + | *The project is created in '''~/OBSLight/MeeGo_1.2_oss/''' | ||
obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer https://api.meego.com --projectArch i586 --projectTarget standard | obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer https://api.meego.com --projectArch i586 --projectTarget standard | ||
| - | Add a package to your local project | + | |
| - | *The | + | === Add a package to your local project === |
| + | *The package is created in '''~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/''' | ||
obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel | obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel | ||
| - | Create your chroot | + | |
| + | === Create your chroot === | ||
*The chroot directory is '''~/OBSLight/MeeGo_1.2_oss/aChroot/'''. | *The chroot directory is '''~/OBSLight/MeeGo_1.2_oss/aChroot/'''. | ||
| - | *The chroot is created with zypper and your | + | *The chroot is created with zypper and your repository is automatically added. |
obslight createChRoot --projectLocalName MeeGo_1.2_oss | obslight createChRoot --projectLocalName MeeGo_1.2_oss | ||
| - | Add a package into your chroot | + | |
| - | *The | + | === Add the source of a package into your chroot === |
| - | *After the installation, a git repository is | + | *The source package is extracted in directory '''/root/rpmbuild/BUILD/kernel-X.X.X/linux-X.X.X'''. |
| + | *After the installation, a git repository is initialized in package's directory. | ||
obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel | obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel | ||
| - | Now you can work into your chroot | + | |
| + | === Now you can work into your chroot === | ||
*The directory '''~/OBSLight/MeeGo_1.2_oss/chrootTransfert/''' is mounted into the chroot in '''/chrootTransfert/'''. | *The directory '''~/OBSLight/MeeGo_1.2_oss/chrootTransfert/''' is mounted into the chroot in '''/chrootTransfert/'''. | ||
| - | *Every | + | *Every script executed in ''aChroot'', is stored in '''/chrootTransfert/''' as '''runMe_YYYY-MM-DD_HHhMMmSS.sh'''. |
obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel | obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel | ||
# cp configs/kernel-x86.config .config | # cp configs/kernel-x86.config .config | ||
# make menuconfig | # make menuconfig | ||
# cp .config config-x86 | # cp .config config-x86 | ||
| - | + | ||
| - | + | === Upstream your work to the OBS server === | |
| + | ==== By making a patch ==== | ||
# exit | # exit | ||
obslight makePatch --projectLocalName $ProjectName --package $Package --patch myKernelPatch.patch | obslight makePatch --projectLocalName $ProjectName --package $Package --patch myKernelPatch.patch | ||
| Line 34: | Line 43: | ||
You must move your patch command '''%patchXXX -p1''' after the command line '''cp $RPM_SOURCE_DIR/config-* .''' | You must move your patch command '''%patchXXX -p1''' after the command line '''cp $RPM_SOURCE_DIR/config-* .''' | ||
| - | + | ==== By copying the new configuration file ==== | |
# cp config-x86 /chrootTransfert/config-x86 | # cp config-x86 /chrootTransfert/config-x86 | ||
# exit | # exit | ||
cp /chrootTransfert/config-x86 ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/ | cp /chrootTransfert/config-x86 ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/ | ||
| - | Now you can commit | + | Now you can commit |
*The command '''addAndCommitChanges''' ckeck the add and the delete files, before commit the package. | *The command '''addAndCommitChanges''' ckeck the add and the delete files, before commit the package. | ||
obslight addAndCommitChanges --projectLocalName $ProjectName --package $Package -m "Patch kernel" | obslight addAndCommitChanges --projectLocalName $ProjectName --package $Package -m "Patch kernel" | ||
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 # cp configs/kernel-x86.config .config # make menuconfig # 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
You must move your patch command %patchXXX -p1 after the command line cp $RPM_SOURCE_DIR/config-* .
# cp config-x86 /chrootTransfert/config-x86 # exit cp /chrootTransfert/config-x86 ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/
Now you can commit
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