The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Contribution in detail

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(Add a section on handling new packages)
(Edit for clarity)
Line 4: Line 4:
  
 
== Summary ==
 
== Summary ==
# branch OBS package
+
# Branch the OBS package in either your local OBS or the community OBS using the MDS remote link.
# clone mer/git package from Mer master repo
+
# Checkout the package from OBS
# checkout OBS package into git repo (how to avoid duplicate download?) OBS and mer/git package should be identical (osc diff / git diff)
+
# Incorporate a bare clone mer/git package from Mer master repo into the osc directory.
# unpack source and apply patches into local build root
+
# Clone the mer/git package from Mer master repo
## now have 3 copies of source: obs co as tarball, git co as tarball, local unpack in chroot
+
# The OBS and mer/git package should be identical.
# take snapshot of chroot (for later diff)
+
# Unpack the source and apply patches (usually in a local build root)
# hack in chroot until ready (potentially needing to install new pkgs for new BRs)
+
# Optionally take a snapshot of chroot (for later diff)
# Create patch
+
# Hack in chroot until ready (potentially needing to install new pkgs for new BRs)
 +
# Create a patch
 
# Modify packaging
 
# Modify packaging
# Submit to cobs
+
# Submit to OBS to verify build
 +
# Build and test and image or other appropriate QA
 +
# Submit to gerrit for CI and review
  
 
== Branch the package to work on it ==
 
== Branch the package to work on it ==
Line 39: Line 42:
 
== Pull the latest Mer version from the gerrit git repo ==
 
== Pull the latest Mer version from the gerrit git repo ==
  
Clone the git repo metadata besides your OSC checkout:
+
Clone the git repo metadata into your OSC checkout using git's --bare option :
  
 
   cd home:Admin:branches:Mer.org:Core:i586/systemd
 
   cd home:Admin:branches:Mer.org:Core:i586/systemd
Line 50: Line 53:
  
 
== Hack ==
 
== Hack ==
You can now edit the code and packaging.
+
You can now edit the code and packaging
  
 
== Build ==
 
== Build ==
Of course you'll need to do one or more builds to verify the code.
+
Of course you'll need to do one or more builds to verify the code in a cycle like this:
  
  osc ar
+
  specify *yaml
  osc ci
+
  osc build i586 *.spec
  osc chroot
+
  osc chroot i586 *.spec
  osc build
+
 
 +
Then a server-side build:
 +
  osc ar
 +
  osc ci
  
 
== Create image ==
 
== Create image ==
  
Use a suitable .ks
+
Use a suitable [[:Category:kickstart|.ks]] with [[:Category:mic2|mic2]]
  
IMG supports a feature called "Extra repositories and packages"
+
 
 +
If you use [[:Category:IMG|IMG]], it supports a feature called "Extra repositories and packages".
 
This allows you to use a standard kickstart and add a specific
 
This allows you to use a standard kickstart and add a specific
 
repository to use for overrides.
 
repository to use for overrides.
Line 76: Line 83:
 
   DEVICE=/dev/sdh
 
   DEVICE=/dev/sdh
 
   curl http://imgw1/images/web/root/1-20111110-090037/meego-nemo-trial-1.2.90.20111110.1000.iso | sudo dd of=$DEVICE bs=4M oflag=direct && sudo eject $DEVICE
 
   curl http://imgw1/images/web/root/1-20111110-090037/meego-nemo-trial-1.2.90.20111110.1000.iso | sudo dd of=$DEVICE bs=4M oflag=direct && sudo eject $DEVICE
 
Diagnostic note:
 
 
Package SOMETHING.rpm is damaged:
 
  /var/tmp/cache/packages/mer-core-i586/noarch/filesystem-2.4.31-1.1.noarch.rpm
 
This means a checksum mismatch was seen and the package was re-downloaded.
 
  
 
== Push for review ==
 
== Push for review ==
  
In the obs/mer build directory:
+
In the obs/mer package directory:
 
   cd home:Admin:branches:Mer.org:Core:i586
 
   cd home:Admin:branches:Mer.org:Core:i586
 +
 +
If this is a new change (ie it hasn't been rejected and corrected) then:
 +
  git commit -s
 +
 +
If it has been rejected once and you're correcting the error then
 
   git commit -s --amend
 
   git commit -s --amend
 +
 +
When you're satisfied:
 
   git push origin HEAD:refs/for/master
 
   git push origin HEAD:refs/for/master
 +
 +
You should get back a message like:
 +
remote: New Changes:
 +
remote:  http://review.merproject.org/XXX
 +
 +
This will now be scheduled for a CI build and test; then it will be
 +
manually reviewed and hopefully, accepted.
  
 
= New Packages =
 
= New Packages =

Revision as of 13:33, 26 January 2012

Contents

Local build of current version

Need prerequisites for osc and build

Summary

  1. Branch the OBS package in either your local OBS or the community OBS using the MDS remote link.
  2. Checkout the package from OBS
  3. Incorporate a bare clone mer/git package from Mer master repo into the osc directory.
  4. Clone the mer/git package from Mer master repo
  5. The OBS and mer/git package should be identical.
  6. Unpack the source and apply patches (usually in a local build root)
  7. Optionally take a snapshot of chroot (for later diff)
  8. Hack in chroot until ready (potentially needing to install new pkgs for new BRs)
  9. Create a patch
  10. Modify packaging
  11. Submit to OBS to verify build
  12. Build and test and image or other appropriate QA
  13. Submit to gerrit for CI and review

Branch the package to work on it

osc -A https://obs branch Mer.org:Core:i586 systemd

A bug in the OBS means that the new branch project will not have the correct repos so add them manually. Even if you add them through the OBS web interface they will miss the arch field.

osc -A https://obs meta prj home:YOURNAME -e
  <repository name="Mer_Core_i586">
   <path repository="Core_i586" project="Mer.org:Core:i586"/>
   <arch>i586</arch>
  </repository>

The repository needs to be set to publish too.

Checkout:

  osc -A https://obs co home:Admin:branches:Mer.org:Core:i586/systemd
  cd home:Admin:branches:Mer.org:Core:i586/systemd
  osc build i586

Pull the latest Mer version from the gerrit git repo

Clone the git repo metadata into your OSC checkout using git's --bare option :

  cd home:Admin:branches:Mer.org:Core:i586/systemd
  git clone --bare ssh://your_username@review.merproject.org:29418/mer-core/systemd .git
  git config -f .git/config core.bare false

Check out the latest content from git:

  git reset --hard

Hack

You can now edit the code and packaging

Build

Of course you'll need to do one or more builds to verify the code in a cycle like this:

 specify *yaml
 osc build i586 *.spec
 osc chroot i586 *.spec

Then a server-side build:

 osc ar
 osc ci

Create image

Use a suitable .ks with mic2


If you use IMG, it supports a feature called "Extra repositories and packages". This allows you to use a standard kickstart and add a specific repository to use for overrides.

Select the OBS and enter the repository/repo eg:

 home:Admin:branches:Mer.org:Core:i586/Mer_Core_i586

Build a suitable image, install and test

 DEVICE=/dev/sdh
 curl http://imgw1/images/web/root/1-20111110-090037/meego-nemo-trial-1.2.90.20111110.1000.iso | sudo dd of=$DEVICE bs=4M oflag=direct && sudo eject $DEVICE

Push for review

In the obs/mer package directory:

  cd home:Admin:branches:Mer.org:Core:i586

If this is a new change (ie it hasn't been rejected and corrected) then:

  git commit -s

If it has been rejected once and you're correcting the error then

  git commit -s --amend

When you're satisfied:

  git push origin HEAD:refs/for/master

You should get back a message like:

remote: New Changes:
remote:   http://review.merproject.org/XXX

This will now be scheduled for a CI build and test; then it will be manually reviewed and hopefully, accepted.

New Packages

Occasionally a new package is required in Mer.

The process is similar to the normal contribution with some minor variations.

  1. Build your package in the community OBS
  2. Propose a new package on irc, mailing list or via a bug to Mer Core/.Project-core
  3. Wait for the git repo to be created
  4. Checkout your package from your OBS project
  5. Prepare a git repo and add your code. Then do a signed-off commit.
  6. Link your local git repository to the remote mer-core/gerrit repository
  7. Push your code for review and CI

So having prepared and built your package on OBS, go to the osc package directory

osc co <PRJ> <PKG>
cd <PRJ>/<PKG>

Then prepare the git repo (skipping the .osc/ dir)

git init .
git add *
git commit -s

Now add the Mer git repository (using your name/package)

git remote add gerrit ssh://<yourlogin>@review.merproject.org:29418/mer-core/<packagename>

A quick way to check all is well is

git remote update

Finally, to push the new code and start a CI run:

git push gerrit HEAD:refs/for/master

You should get back a message like:

remote: New Changes:
remote:   http://review.merproject.org/XXX

This will now be scheduled for a CI build and test; then it will be manually reviewed and hopefully, accepted.

If changes are needed at this point, the code is already in gerrit so it follows the normal modification process.

Personal tools