veskuh / Tweetian

A feature-rich Twitter app for smartphones developed using Qt/QML
GNU General Public License v3.0
50 stars 26 forks source link

Setup builds for Tweetian on OBS #35

Closed siteshwar closed 10 years ago

siteshwar commented 10 years ago

We should be able to provide latest builds of Tweetian through OBS. All the changes which are required to build on OBS have been requested through #34. This issue tracks setting up an official repository on OBS and triggering builds on git commits.

siteshwar commented 10 years ago

GitHub supports service hooks for OBS. We need to generate an authentication token to authorize our service calls and add a hook for OBS in our repository.


Open Build Service(OBS) is a distribution build system.

By enabling this hook, any Open Build Service instance (running version 2.5 or higher) will list
to push events. OBS Source Service will get execute for a defined package which will update
the sources in OBS and therefore rebuild automatically.
Install Notes

    Prequire
    You need to have a package using a source service to update the sources.
    Check the OBS manual how to set this up.

    Create an authentification token for your account using "osc" commandline tool:
    osc token --create

    You may already specify the package here
    osc token --create PROJECT PACKAGE

    That means the token can only be used for this package. It also means you do not have
    to specify it in github.com. Just using the token is enough.

    Enter your credentials at github.com
        The token which got created (use "osc token" if you lost it)
        optional: Modify the api url, if you do not use the openSUSE Build Service instance.
        optional: Enter the project and package name in case you have a generic token.

    Make sure the "Active" checkbox is ticked, and click "Update Settings".

For more details about OBS, go to http://www.openbuildservice.org
veskuh commented 10 years ago

Currently tweetian sources has Dickson's API key that is intended only for development: https://github.com/veskuh/Tweetian/blob/sailfish-port/qml/tweetian-harmattan/Constant.qml#L66 We should not build & distribute .rpm with that key.

I have created key for Sailfish Tweetian and use it when I've made a publicly available .rpm, but I wouldn't want to include it in the openly available sources.

Having OBS doing builds would be nice, but I wouldn't want API key to be public so we would need to figure out if that is possible. I haven't checked Mer OBS lately, but one option would be to have the API key as separate .patch file in OBS packaging if access to files in packaging can be limited to us developers.

siteshwar commented 10 years ago

We will definitely solve this problem. I brought up this topic on IRC and here are few suggestions which came up during discussion :

  1. Do not include API keys in rpm packages. Instead download the keys when people run Tweetian for the first time on their devices.
  2. Do no include API keys in Tweetian's rpm package. Instead create a separate rpm package (on local system) which contains the keys, upload it to our Tweetian repository on OBS and add this package as dependency of Tweetian in .spec file. A project which does similar stuff can be seen at https://build.merproject.org/package/files?package=droid-hal-device&project=home%3Atswindell%3Ahw%3Atilapia
siteshwar commented 10 years ago

After a discussion on IRC, we have reached to the conclusion that it's good enough to make releases of Tweetian every 2-3 weeks on https://openrepos.net/

You can get Tweetian's latests RPMs from https://openrepos.net/content/veskuh/tweetian-sailfish-os