One of the most frequent kind of ROSA users' requests is request to update some package in our repositories. Unfortunately, we can't satisfy all update requests immediately. However, every community member can easily help us with it, since with our current build infrastructure you can update packages even if you are not programmer or maintainer at all. In many cases basic knowledge of web browser is enough.
Assume that you have noticed a new release of your favorite application and want to update corresponding package in ROSA repositories. Consider for example a popular Atom code editor - right now ROSA repositories provide atom 1.2.0, but 1.3.2 was released several days ago. Let's try to update the ROSA package!
First of all, please register at our ABF build environment at http://abf.io. Registration is free, doesn't require any kind of confirmation and you will be able to log in into ABF just after registration is complete.
Then please find a project corresponding to your package - in our case we need atom project in the import group (always use the import group since it is contains projects built into our official repositories!).
Go to the project found and press "Fork".
In the dialog appeared choose Fork to <your_login>/atom. This will fork the project into your personal namespace where you are free to modify it as you wish. The forking is fast and you will be immediately redirected to a page of the forked project. If you see a message that repository is empty then just reload the page.
NExt step is to switch to the rosa2014.1 branch of the Git repository. If you doesn't understand what this means - don't worry, you just have to choose "rosa2014.1" in dropdown list at the upper-right corner of the page. We use "rosa2014.1" branch starting from ROSA Desktop Fresh R4 and will continue to use it at least in R7.
Now please find a file with the .spec extension among project files (atom.spec in our case), click on it and then click Edit to modify it.
All that you should do in this file is to update Version tag which is usually located near the top of the file. As we can see, currently this tag is set 1.2.0 and we will replace this value with 1.3.2. Please also write some valuable message (e.g., "Updated to version 1.3.2") in the "Commit message" text area. And that's all - save file by means of corresponding button at the bottom of the page.
In the previous step we have prepared ABF to build a new version of our program. Now it is time to click on "New Build" and perform a couple of actions in the page appeared:
Now press "Start Build" and wait for result. If the build fails - well, the easy-way update didn't work in this case and it is time to ask maintainers or improve your own skills and dig deeper into package build procedure. But if the build succeeds, you will be able to download packages with the new version of your application. Feel free to download and test them.
If the new version works fine, feel free to share this updates with the whole ROSA community. To do this, just press the "Pull Request" button at your project page.
Make sure that you have specified "rosa2014.1" branch for both source and target projects, press "Update commits" button if it becomes visible, write some message in the "Description" field and click on "Send Pull Request".
ROSA maintainers will receive you request, review it and likely accept and build the updated package into official repositories.
The package update way described above is not perfect for a couple of reasons. To understand them, let's see in details how the new package is built.
When ABF starts the build, it preliminary downloads all necessary files - for example, source code tarballs. All such files are specified in the Source tags in project spec file. In these tags you are allowed to specify URLs to external resources and if ABF fails to find necessary files in Git or in its internal storage then it will try to download necessary files from Internet.
To be sure, this will work only for projects where Source tags contain valid URLs. If you take a look at atom.spec file from our example you will see the following line there:
This is an URL pointing to tarball at github, but instead of some fixed version a version macro is used. This macro is automatically set to the value of the Version tag and that's why it is enough to only update that tag to initiate a build of a new version. And that's why it is important to http://wiki.rosalab.ru/en/index.php/Blog:ROSA_Planet/Maintaining_URLs_In_RPM_Metadata care about URLs in Source tag values].
The next thing to remember is that it is not a good idea to download any files from Internet during each build. The URL can become invalid, hackers can replace original files with malicious ones and so on. So officially we forgive to use such external downloads in ROSA packages and carefully follow this rule at least in our main repository. So when accepting your pull request, ROSA maintainer will likely download necessary files by himself and put them into ABF file storage. If you wish to help maintainer you can download such files by yourself and upload them to http:///file-store.rosalinux.ru. After upload you will see a page with file names and their hash sums:
Then please add file name and hash sums (colon separated) to the .abf.yml of your project in ABF:
Normally all binary files specified in the Source tags should be uploaded to ABF File Store.