Meego Wiki
Views

Quality/Compliance tools

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Apps Compliance Check)
(TODO)
Line 110: Line 110:
= TODO =
= TODO =
-
* re-implement shell scripts with python
 
* add checking for contents of binary packages
* add checking for contents of binary packages
* architecture re-design and code update
* architecture re-design and code update
* use new image format with separated src.rpm pack
* use new image format with separated src.rpm pack
* web UI
* web UI

Revision as of 12:11, 29 October 2010

Contents

Introduction

Compliance tools are used to check MeeGo compliance for MeeGo Distributions or MeeGo Applications. The compliance reference input is the MeeGo core package/file list and a minimal MeeGo reference image created by MIC2, which will contain all the required core packages, as well as src rpms.

For MeeGo distribution compliance checking, the input needs to include the OS image and the src.rpms for all the packages. And for MeeGo Application compliance checking, the input is the application rpm file.

The tools will generate report files (in HTML currently) to show the result.

Installation

Compliance tools can be installed using released rpm and deb packages, or installed by source code.

Packages and Repos

The package in the MeeGo OBS server for this project is devel:tools:building/meego-compliance-tools. And all the rpm and deb packages for release can be generated by the OBS server. The following Linux distributions are supported:

  • Debian 5.0
  • xUbuntu 9.10, 10.04, 10.10
  • Fedora 11, 12, 13
  • openSUSE 11.1, 11.2, 11.3
  • MeeGo 1.0, Trunk (1.2)

The corresponding software repos can be used to install the tools conveniently. Whenever the feature and quality of code are stable enough, the packages and repos will be published at repo.meego.com. For rpm packaging ditros, there are three packages available:

  • meego-compliance-tools (common data, will be installed automatically as the dependency of the two packages below)
  • meego-dist-compliance-tools (for MeeGo distro compliance checking)
  • meego-app-compliance-tools. (for MeeGo application compliance checking)

Source Code

The tools can also be installed by source code. After fetching the code, under the code directory, run:

 $ [sudo] make install

The source code is hosted at:

 meego-compliance-tools@gitorious.org

MIC2

To prepare the images used in compliance tools, you need MIC2 with new features (version 0.22.0 or later).

Features

dist-compliance-tool

It executes compliance checking for MeeGo distributions. The following features are supported:

  • Binary pkg comparison:
    • Exist in target image?
    • Version matches the requirement?
      • flexible version checking: support rules with comparison operators like ">=" in core pkg list
  • Content in source rpm comparison:
    • This step will be skipped if binary rpm checking fails
    • Spec filename
    • Spec content
    • Sources and md5sum
    • Patches and the content

app-compliance-tool

For compliance checking for MeeGo applications, the following features are supported:

  • check if all dependent packages exist in core package list
  • check if the target package can be installed in the minimal image
  • verify the installation location of the application
  • verify the minimal requirement of the desktop file and icon for the application

Usage

Image Preparation

Before using the tools, the reference image needs to be created by using MIC2 (version 0.22.0 or later):

 $ [sudo] mic-image-creator --run-mode=0 --cache=mycachedir --format=fs  --config=<ks file> --package=tar.bz2 --include-source

The sample ks file can be downloaded at:

 media:Meego-minimal-compliance-1.0.99.1.ks

The sample core list file can be downloaded at:

 media:Core-list-1.0.99.1‎

And the ks file and core list should be synced with and conform to the latest MeeGo compliance spec.

To try the dist compliance check tool (dist_compliance.sh), please prepare a target image as the input. The target image can be generated by using the same method as the above.

Devices Compliance Check

The command "dist_complianc" is for checking compliance of MeeGo devices, or distributions.

    Usage: [sudo] dist_compliance [options]
    Options:
       --version             show program's version number and exit
       -h, --help            show this help message and exit
       -c CORELIST, --corelist=CORELIST
                             File to store core list of MeeGo
       -r REFIMAGE, --refimage=REFIMAGE
                             Filepath of reference image
       -t TGTIMAGE, --tgtimage=TGTIMAGE
                             Filepath of target image
       -o OUTDIR, --outdir=OUTDIR
                             Output directory of report

Apps Compliance Check

The command "app_compliance" is for applications compliance checking.

   Usage: [sudo] app_compliance [options] <app-rpm>
   Options:
     --version             show program's version number and exit
     -h, --help            show this help message and exit
     -r REFIMAGE, --refimage=REFIMAGE
                           Filepath of reference image
     -c CORELIST, --corelist=CORELIST
                           File to store core list of MeeGo
     -o OUTDIR, --outdir=OUTDIR
                           Output directory of report

Result Format

Currently, the output of checking tools will be store in HTML files. Screen capture of sample distribution report:

Sample Report

Bug Reoprt

If problems were found in compliance tools, please file bugs in bugs.meego.com. The corresponding section is: "Development Tools/Tools".

TODO

  • add checking for contents of binary packages
  • architecture re-design and code update
  • use new image format with separated src.rpm pack
  • web UI
Personal tools