What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Jun 04, 2007 by jmrenouard
Labels: Phase-Requirements, Phase-Support, Featured
UserGuide  

Introduction

This document stand for 'User guide' and explain how to use myrpm to produce rpm packages.

Usage

myrpm.pl OPTION

myrpm.pl is a automatic spec file generator and builder.

Myrpm allow you to install freely software on a rpm compliant system and realize a binary package from a list of file.

This program manages rigths and users. It s a simple tool that simplify packaging in chroot mode.

General Options

  • -h, --help : Print this help.
  • -v, --verbose : Print debug information, verbose mode.
  • -b, --build : Build the package automatically at the end.
  • -a, --archive=filename : RPM Creation based on a archive file
  • -u, --uid=user id or name : User id for archive file
  • -g, --gid=user id or name : Group id for archive file
  • -m, --multiple : Build the several package config, main and doc.
  • -t, --template=filename : Generate the spec skeleton from this template.
  • -x, --exclude="pattern1,pattern2" : Exclude some file patterns.
  • -r, --root-directory=<directory> : Root directory ( / by default ).
  • -d, --directory=<directory> : Directory where is the tree to package
  • by default, list of files is build from the stdin data

Package Options

  • -N, --name=<name> : Package name - This option is mandatory
  • -V, --version=<version> : Package version - This option is mandatory
  • -R, --release=<release> : Package release - This option is mandatory
  • -D, --description=<description> : Package Description.
  • -S, --summary=<summary> : Package Summary.
  • -P, --packager=<packager> : Packager identity.
  • -U, --vendor-url=<vendor url> : Vendor URL.
  • -O, --vendor=<vendor> : Vendor name.
  • -A, --architecture=<archi> : Target architecture.
  • -T, --distribution=<distro> : Target distribution.
  • --requires=<dependency>,... : Dependency list.
  • --build-script=<filename> : Script filename to include in the %build session.
  • --pre-script=<filename> : Script filename to include in the %pre session.
  • --post-script=<filename> : Script filename to include in the %post session.
  • --preun-script=<filename> : Script filename to include in the %preun session.
  • --postun-script=<filename> : Script filename to include in the %postun session.

Basic Example

Realize a kick rpm snapshot of /home/jmrenouard/myrpmBuildDir

myrpm.pl -v -d /home/jmrenouard/myrpmBuildDir -r /home/jmrenouard/myrpmBuildDir -N toto -V 1.0 -R 1 -b

An other version

cd /home/jmrenouard/myrpmBuildDir && myrpm.pl -v -d . -r . -N toto -V 1.0 -R 1 -b

The same with UNIX tools interaction

  • cd /home/jmrenouard/myrpmBuildDir && find pwd -iname "." -print | myrpm.pl -v -r /home/jmrenouard/myrpmBuildDir -N toto -V 1.0 -R 1 -b
  • find /home/jmrenouard/myrpmBuildDir | myrpm.pl -r /home/jmrenouard/myrpmBuildDir -N toto -V 1.0 -R 1

Explanations

This script performs the following operations :

  • Find build the list of all the files in /home/jmrenouard/myrpmBuildDir.
  • myrpm.pl packages all the files /home/jmrenouard/myrpmBuildDir in a package with toto as name.
  • myrpm.pl consider /home/jmrenouard/myrpmBuildDir as the root of all the files so all this files will be installed from the root file system by the rpm program.

Other way to use it

Repackage installed rpm

rpm -ql yum | myrpm.pl -v -N yum -V 2.7 -R 12 -b

Explanations

  • Rpm gives the list of the files in the yum package installed on the system.
  • myrpm.pl packages all the files in a package with yum as name and 1_jmr as release.
  • This is a new way to package modification on a installed system.

Configuration file sample

Myrpm tool is an rpm standard tool configurated. This means that his configuration is directly taken from standard .rpmmacros conf file.

Standard $HOME/.rpmmacros sample

%topdir /home/jmrenouard/redhat
%packager Jean-Marie Renouard<jmrenouard.externe at 123solution.fr>
%vendor Pages Jaunes
%vendor_url http://www.123solution.fr
%distribution Red Hat Enterprise 4
%dist_tag .1
%tmppath /var/tmp

Help to improve this tool

Submit bugs or remarks at http://code.google.com/p/myrpm/issues/list

You can also contact me at Jean-Marie Renouard <jmrenouard at gmail.com>


Sign in to add a comment