Difference between revisions of "Updates builder"

From Rosalab Wiki
Jump to: navigation, search
(First version)
 
(+ notes about launcher)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Updates-builder is a tool to automatically check for package updates and build them in ABF.
+
{{Prog|Updates-builder}} is a tool to automatically check for package updates and build them in ABF.
 +
 
 +
== Source code ==
 +
 
 +
Source code can be found here:
 +
https://abf.rosalinux.ru/dsilakov/updates_builder/tree/master?
 +
 
  
 
== Example ==
 
== Example ==
Let's take "alleyoop" package as an example - we have version 0.9.7 and want to look for updates:
+
Let's take {{Pkg|alleyoop}} package as an example - we have version 0.9.7 and want to look for updates:
  
 
  $ updates_builder.py --run-one alleyoop
 
  $ updates_builder.py --run-one alleyoop
Line 12: Line 18:
 
  done
 
  done
  
Wow, update is available! updates_builder has downloaded the new tarball, pushed it to ABF file store, updated .abf.yml and spec files and initiated a new build.
+
Wow, update is available! {{Prog|updates_builder}} has downloaded the new tarball, pushed it to ABF file store, updated .abf.yml and spec files and initiated a new build.
  
All changes are applied in a separaet branch called 'auto_update'. The build is initiated for rosa2012.1 platform, but the result is pushed to import_personal repository. Moreover, currently resulting packages are not published
+
All changes are applied in a separate branch called '''auto_update'''. The build is initiated for '''rosa2012.1''' platform, but the result is pushed to '''import_personal''' repository. Moreover, currently resulting packages are not published
 
- you should go to container to download them.
 
- you should go to container to download them.
  
The next step is to check if the package has been built successfully (if you subscribed to ABF notifications, you will receive a mail about build results). If the built succeeded then you can download the resulting package and check if it works properly. If yes, then merge it to the repository
+
The next step is to check if the package has been built successfully (if you subscribed to ABF notifications, you will receive a mail about build results). If the built succeeded then you can download the resulting package and check if it works properly. If yes, then merge it to the repository.
  
First, let's checkout the alleyoop project itself using abf-console-client:
+
First, let's checkout the {{Pkg|alleyoop}} project itself using {{Prog|abf-console-client}}:
 
  $ abf get alleyoop; cd alleyoop
 
  $ abf get alleyoop; cd alleyoop
 
  $ git checkout auto_update
 
  $ git checkout auto_update
  
Take a look at the updated .abf.yml and spec file and add/commit chanegs if necessary.
+
Take a look at the updated .abf.yml and spec file and add/commit changes if necessary.
  
And now let's switch to rosa2012.1 branch and merge the changes there:
+
And now let's switch to '''rosa2012.1''' branch and merge the changes there:
  
 
  $ git checkout rosa2012.1
 
  $ git checkout rosa2012.1
Line 31: Line 37:
 
  $ abf put -m "LOG Updated to 0.9.8"
 
  $ abf put -m "LOG Updated to 0.9.8"
  
That's all! Now you can initiate a build for rosa2012.1 platform from the rosa2012.1 branch, The package is updated!
+
That's all! Now you can initiate a build for '''rosa2012.1''' platform from the '''rosa2012.1''' branch, The package is updated!
  
 
== Technical Details ==
 
== Technical Details ==
To get information about new software releases, updates_builder uses http://upstream-tracker.org service. If you want updates_builder to monitor some package for which the upstream URL is missing - feel free to contact upstream-tracker.org authors.
+
To get information about new software releases, updates_builder uses http://upstream-tracker.org service. If you want {{Prog|updates_builder}} to monitor some package for which the upstream URL is missing - feel free to contact upstream-tracker.org authors.
 +
 
 +
To work with ABF, {{Prog|updates_builder}} uses [[ABF Console Client]].
 +
 
 +
== How to Use ==
 +
* Make sure your abf-console-client is configured and works well. updates_builder uses its config and client itself.
 +
* To fill the local database (~/.updates_builder yaml file) run "updates_builder.py --load". It will take a minute.
 +
* To rebuild all the loaded packages (that have not been processed yet), run 'updates_builder.py --run', or run 'updates_builder.py --run-one pkg_name' to rebuild only the given package
 +
* If the building task was created - its ID will be stored. You can run 'updates_builder.py --check-status' to take a status of each build list. If it's completed or failed - package will be marked this way in ~/.updates_builder.
 +
* You can also run 'updates_builder.py --check-status --email your@email.ru' and the tool will send results to your email.
 +
 
 +
== Usage in ROSA ==
 +
Updates Builder is launched in ROSA on a regular basis for the packages listed on this page:
 +
 
 +
http://wiki.rosalab.ru/en/index.php/Updates_builder_checklist
 +
 
 +
If the new version is build successfully, the launcher scripts automatically for Pull Request to merge changes to official repository.
 +
 
 +
In case of failure, the scripts analyze the build log and try to fix several common issues such as addition/removal of files, absence of necessary BuildRequires, etc. After performing such changes, the build is triggered once again.
 +
 
 +
Source code of the scripts used to launch Updates Builder, analyze its logs and fix certain kinds of issues can be found here:
 +
 
 +
https://abf.rosalinux.ru/dsilakov/updates_builder_launcher
  
To work with ABF, updates_builder uses [[ABF Console Client]].
 
  
 
[[Category:Package Management]]
 
[[Category:Package Management]]

Latest revision as of 13:32, 17 September 2013

Updates-builder is a tool to automatically check for package updates and build them in ABF.

Source code

Source code can be found here: https://abf.rosalinux.ru/dsilakov/updates_builder/tree/master?


Example

Let's take alleyoop package as an example - we have version 0.9.7 and want to look for updates:

$ updates_builder.py --run-one alleyoop
<...>
alleyoop-0.9.8 https://sourceforge.net/projects/alleyoop/files/alleyoop/alleyoop-0.9.8/alleyoop-0.9.8.tar.gz
<...>
Creating a new spec file
Downloading file https://sourceforge.net/projects/alleyoop/files/alleyoop/alleyoop-0.9.8/alleyoop-0.9.8.tar.gz
done

Wow, update is available! updates_builder has downloaded the new tarball, pushed it to ABF file store, updated .abf.yml and spec files and initiated a new build.

All changes are applied in a separate branch called auto_update. The build is initiated for rosa2012.1 platform, but the result is pushed to import_personal repository. Moreover, currently resulting packages are not published - you should go to container to download them.

The next step is to check if the package has been built successfully (if you subscribed to ABF notifications, you will receive a mail about build results). If the built succeeded then you can download the resulting package and check if it works properly. If yes, then merge it to the repository.

First, let's checkout the alleyoop project itself using abf-console-client:

$ abf get alleyoop; cd alleyoop
$ git checkout auto_update

Take a look at the updated .abf.yml and spec file and add/commit changes if necessary.

And now let's switch to rosa2012.1 branch and merge the changes there:

$ git checkout rosa2012.1
$ git merge auto_update
$ abf put -m "LOG Updated to 0.9.8"

That's all! Now you can initiate a build for rosa2012.1 platform from the rosa2012.1 branch, The package is updated!

Technical Details

To get information about new software releases, updates_builder uses http://upstream-tracker.org service. If you want updates_builder to monitor some package for which the upstream URL is missing - feel free to contact upstream-tracker.org authors.

To work with ABF, updates_builder uses ABF Console Client.

How to Use

  • Make sure your abf-console-client is configured and works well. updates_builder uses its config and client itself.
  • To fill the local database (~/.updates_builder yaml file) run "updates_builder.py --load". It will take a minute.
  • To rebuild all the loaded packages (that have not been processed yet), run 'updates_builder.py --run', or run 'updates_builder.py --run-one pkg_name' to rebuild only the given package
  • If the building task was created - its ID will be stored. You can run 'updates_builder.py --check-status' to take a status of each build list. If it's completed or failed - package will be marked this way in ~/.updates_builder.
  • You can also run 'updates_builder.py --check-status --email your@email.ru' and the tool will send results to your email.

Usage in ROSA

Updates Builder is launched in ROSA on a regular basis for the packages listed on this page:

http://wiki.rosalab.ru/en/index.php/Updates_builder_checklist

If the new version is build successfully, the launcher scripts automatically for Pull Request to merge changes to official repository.

In case of failure, the scripts analyze the build log and try to fix several common issues such as addition/removal of files, absence of necessary BuildRequires, etc. After performing such changes, the build is triggered once again.

Source code of the scripts used to launch Updates Builder, analyze its logs and fix certain kinds of issues can be found here:

https://abf.rosalinux.ru/dsilakov/updates_builder_launcher