Duncan Mac-Vicar P.


Archive for the ‘rpmmd’ tag

enhancerepo 0.3.1 cooking in build service: deltarpm support

without comments

A new version of enhancerepo (0.3.1) is cooking itself in the build service.

The new feature is deltarpm metadata generation support and also some kind of smart deltarpm generation.

This means, enhancerepo can look which package has several versions in the repository, and generate delta rpms for N steps to the older versions. The default is one step, that is, only a delta rpm to the newest to the previous one. And then it can generate the metadata for you too (and add it to the index and such).

Example run:

# enhancerepo --disk-usage --keywords --eulas --create-deltas 2 --deltas -- /space/repo/duncan2
Adding eula: /space/repo/duncan2/zapping-0.9.6-72.eula to zapping-0.9.6-72-i586
Adding eula: /space/repo/duncan2/zaptel.eula to zaptel-1.2.10-70-i586
Adding keyword: /space/repo/duncan2/zaptel-debuginfo.keywords to zaptel-debuginfo-1.2.10-70-i586
Preparing disk usage...
Creating delta - amarok-1.4.10-3-i586 -> amarok-1.4.10-17-i586 (1/2)
Creating delta - amarok-1.4.9.1-53-i586 -> amarok-1.4.10-17-i586 (2/2)
Saving /space/repo/duncan2/repodata/susedata.xml.gz ..
Adding /space/repo/duncan2/repodata/susedata.xml.gz to /space/repo/duncan2/repodata/repomd.xml index
repodata/susedata.xml.gz already exists. Replacing.
Saving /space/repo/duncan2/repodata/deltainfo.xml.gz ..
Adding /space/repo/duncan2/repodata/deltainfo.xml.gz to /space/repo/duncan2/repodata/repomd.xml index
repodata/deltainfo.xml.gz already exists. Replacing.
Saving /space/repo/duncan2/repodata/repomd.xml ..

Some important notes:

  • It now requires ruby-rpm, which is available on the devel:languages:ruby:extensions repository.
  • Be careful with running createrepo on top of a directory with deltarpms. createrepo will index them incorrectly as packages (So clean deltarpms, run createrepo, and then generate deltas with enhancerepo on top).
  • I did not test this release as much as the latest :-)

Written by duncan

September 30th, 2008 at 6:35 pm

Posted in Software

Tagged with , , , ,

Introducing enhancerepo 0.3

with one comment

Introduction

You may know that we are slowly heading to use the rpmmd format as the default one. We already do for the build service since the beginning, and the only remaining part is the media.

Therefore, we have been following an strategy of, at the same time, extending rpmmd with our own extensions, but at the same time, talk to the yum people in order to think in more long term about changes in the format.

Right now, in the openSUSE 11.1Beta code, you find the following extensions:

  • updateinfo.xml (patches, same Format as Fedora)
  • deltainfo.xml (delta-rpms, same format as yum-presto, different name)
  • suseinfo.xml (repository extra data)
  • susedata.xml (package extra data, like eulas and disk usage per mount point)

Apart of that, we sign our repositories.

Even for testing our own stuff, it became tedious to add extra metadata to repositories created with createrepo.

enhancerepo

Enhancerepo allows you to inject all the extra metadata to repositories in an easy way. It takes care of updating the index and compressing the files.

Features

  • Sign repositories
  • Generate eulas from text files with certain name conventions (package.eula)
  • Generate keywords from text files with certain name conventions (package.eula)
  • Add disk usage per mount point information
  • Add repository expiration time (for outdated mirror autodetection)
  • (expermental and incomplete) generation of updateinfo.xml

Usage

Usage
-----
enhancerepo [OPTION] ... DIR

-h, --help:

   show help

--sign keyid

   Generates signature for the repository
   using key keyid

--updates

   Add updates from *.updates files
   and generate updateinfo.xml

SUSE specific repository data (suseinfo.xml):
--expire time

  Set repository expiration hint
  (Can be used to detect dead mirrors)

--repo-product prodname:

   Adds product compatibility information

--repo-keyword keyword

   Tags repository with keyword

SUSE specific package data (susedata.xml)
--eulas

   Drop packagename.eula files and
   the attributes will be added to susedata.xml

--keywords

   Drop packagename.keywords files and
   the attributes will be added to susedata.xml

--disk-usage

   Add disk usage information
   the attributes will be added to susedata.xml

Note: your .eula or .keywords file will be added to a package if it
matches its name. If you want to add the attributes to a specific
package, name the file name-version, name-version-release or
name-version-release.arch

DIR: The repo base directory ( where repodata/ directory is located )

Download

Packages available here.

git clone git://git.opensuse.org/projects/enhancerepo

Written by duncan

September 26th, 2008 at 3:30 pm

Posted in Software

Tagged with , , ,