From Mageia wiki
Jump to: navigation, search
(Creating a new advisory)
Line 1: Line 1:
Updates advisories are managed using [[Mgaadv|mgaadv]]. This page explains how to create an updates advisory.
+
Updates advisories are managed using [[Mgaadv|mgaadv]]. This page explains how to create an update advisory.
  
 
= SVN access =
 
= SVN access =
Line 87: Line 87:
 
$ svn ci -m 'Add advisory for bug 123456'
 
$ svn ci -m 'Add advisory for bug 123456'
 
</pre>
 
</pre>
 +
 +
= Testing the advisory =
 +
You can use ''mgaadv'' and the ''mksite'' command to generate the advisories web site to check that your new advisory is displayed correctly :
 +
<pre>
 +
$ mgaadv mksite
 +
</pre>
 +
Then open a web browser to view the ''out_dir'' directory (defined in mgaadv configuration).
 +
 +
You can also use the ''list'' and ''show'' commands to display a text version of the advisory.

Revision as of 19:54, 16 June 2013

Updates advisories are managed using mgaadv. This page explains how to create an update advisory.

SVN access

To be able to add or edit advisories, you need to have commit access to the svn server. So you must be in the packagers or QA ldap group. You also need to setup your ssh key to be able to access the svn (see Packagers_ssh for details). The following command should work :

$ svn ls svn+ssh://svn.mageia.org/svn/advisories/

Installation

The first step to create advisories is to install the package mga-advisories :

# urpmi mga-advisories

Configuration

Configuration of mgaadv can be done using the command initqaconf :

$ mgaadv initqaconf

This should open a text editor with something like this :

---
advisories_dir: /home/boklm/mageia-advisories/advisories
mode: qa
out_dir: /home/boklm/mageia-advisories/html
status_dir: /home/boklm/mageia-advisories/status

By default it will save advisories in the directory mageia-advisories under your home directory. You can change this if you you want :

  • advisories_dir: the directory where advisories infos are (a checkout of the advisories svn repository)
  • out_dir: the directory where html pages will be saved
  • status_dir: directory where status of the advisories is saved

After saving the file and closing the text editor it should checkout the advisories svn in the advisories_dir directory.

If you want to edit the configuration later, the file is .mga-advisories/mga-advisories.conf in your home directory.

Creating a new advisory

Creating a new advisory is done with the command new :

$ mgaadv new [type] [bugnum]

Replace [type] with the type of advisory (security or bugfix). Replace [bugnum] with the bugzilla number of the bug used to track the update.

It should open a text editor with something like this :

type: bugfix
subject: Updated [package] package fixes [something]
src:
  2:
   core:
     - something-1.0-1.mga2
  3:
   core:
     - something-1.0-1.mga3
description: |
  Advisory text to describe the update.
  Wrap lines at ~75 chars.
references:
 - https://bugs.mageia.org/show_bug.cgi?id=123456

The format of the file is YAML (see the wikipedia page for basic syntax).

You should edit the following infos :

  • subject: a one line summary of the advisory
  • description: a longer description of the update. Text should be wrapped at ~75 chars.
  • src: the list of source packages, in a tree including the mageia release and media
  • references: a list of URLs

When you finished editing the advisory, you need to commit the file on svn. The name of the file is [bugnum].adv in the advisories directory.

Add the new file to svn :

$ svn add 123456.adv

Review changes before you commit :

$ svn diff

Commit :

$ svn ci -m 'Add advisory for bug 123456'

Testing the advisory

You can use mgaadv and the mksite command to generate the advisories web site to check that your new advisory is displayed correctly :

$ mgaadv mksite

Then open a web browser to view the out_dir directory (defined in mgaadv configuration).

You can also use the list and show commands to display a text version of the advisory.