Development/Tasks/Packaging/Tools/mkcd/Specification
From Mandriva Community Wiki
Contents |
mkcd - designing a new version
This document was originally written by Antoine G. It was then moved here for sharing the specification with external partakers, in particular the Mancoosi team.
TODO
write a new mkcd tool from scratch ! is it really possible ? WHY ?
- mkcd is not really user friendly
- most of mkcd's options are obsoletes/no more used
- it takes more than 18 minutes to build a PWP
- mkcd is not easy to patch (some functions have more than 10 args !)
- mkcd create this own hdlists, and don't use genhdlists2
- mkcd syntax is not so easy to understand
Related to boot
boot/stage2
- use latest Mandriva Installer available
install/extra/advertising install/images all.img boot.iso hd_grub.img MD5SUM
install/stage2 mdkinst.sqfs rescue.sqfs VERSION
isolinux
- create a bootable CD/DVD
- add some extra entries in the isolinux.cfg file
label hdt kernel hdt.c32 append modules=modules.pci
- avoid installation of isolinux on some sector
- isohybrid ISO
bootsplash
- be able to change the theme for a CD/DVD (in arch/isolinux welcome.jpg and back.jpg files)
- be able to get the good theme on a CD/DVD (patch the all.rdz image with Free, PWP, etc...)
Related to packages/extra available
LIST of RPMS
There is one key (signature) per RPM section (example: the Mandriva Powerpack main section is "media main" and it has the key "pubkey_main")
The tool aims at generating a list of packages to be present on a target (CD, DVD etc.) from a set of constraints and options.
The constraints are the following:
- list of wanted packages, possibly in a specific version, with regexp support for identifying the name or version: "binutils, kernel-*2.6.20*, "
- list of wanted categories (defined in a rating file called "rpmsrate" in the case of Mandriva): CAT_KDE, CAT_GNOME etc....
- list of excluded packages, possibly in specific versions: "kde4*1.2 exclude"
- size of the target(s)
- option for taking the package suggests or not
The tool should then generate a list of packages satisfying with the constraints specified, and put the maximum number of highly rated packages and their dependencies on the first target, then on the second etc. The tool should take the latest package version available (if 2 ore more versions are present on a same repository or 2 repositories (main/releases and main/updates for example). The tool should support the architecture of the packages (add some i586 package on a x86_64 repository for instance, very useful for some restricted packages).
Examples
rating and categories file example (rpmsrate)
CAT_XFCE 5 task-xfce-minimal gdm 5 CAT_GRAPHICS || PHOTO ristretto 5 orage xfce4-appfinder 5 pinot 5 deluge 5 qalculate-gtk xfprint gpa 5 thunar-archive-plugin thunar-media-tags-plugin thunar-shares-plugin thunar-thumbnailers 5 gigolo xfswitch-plugin xfce4-screenshooter 4 CAT_THEMES xfwm4-themes xfce4-artwork 4 META_CLASS"download" mandriva-xfce-config-Free 4 META_CLASS"desktop" mandriva-xfce-config-One 4 META_CLASS"powerpack" mandriva-xfce-config-Powerpack 2 task-xfce-plugins
input file example
CAT_XFCE 4 CAT_GNOME 3 kernel-2.6.20* exclude shorewall firefox*-3.0.6 exclude firefox-3.0.10* kernel-server* exclude
The first line "CAT_XFCE 4" means: select all rpm in the Categorie XFCE with a weight >= 4.
output example
main/release xorg-x11-75dpi-fonts-7.3-4mdv2009.0.i586 main/updates xpp2-2.1.10-6.1.5mdv2009.0.i586 main/release xpp3-1.1.3.8-1.4mdv2009.0.i586 main/backports xprop-1.0.4-2mdv2009.0.i586
contrib/release libnm_util-devel-0.7.0.99-2mdv2009.1.i586 contrib/release libnotifymm1.0_7-0.6.1-2mdv2009.1.i586 contrib/release libnotifymm1.0-devel-0.6.1-2mdv2009.1.i586 contrib/release libnox9.0-9.0.2-1mdv2009.1.i586
Relevant EDOS/Mancoosi tools
SODIAC analysis chain documentation
rpmcheck should support uncompressed hdlist, and support synthesis
ceve/tart tools
- add support suggests (for a media or for each RPM)
- add support uncompressed hdlists (*done*)
- add support synthesis (compressed or not) (*done*)
- better support of weight's RPM (to priorize some rpms)
- add support of multi sub-media (main/release, main/updates)
- support of file-deps as provide (in media/media_info)
hdlists synthesis
- create an hdlists per media
- create a synthesis per media
- write and configure a correct media_media/media.cfg file
- be able to use a files-deps file
advertising
- copy needed advertising on the CD/DVD (to put in arch/i586/install/extra/advertising)
dual arch CD
- optimize dual arch (share noarch package on dual-arch CD)
extra
- copy a file on the ISO
- have some log of the ISO creation
- have a full documentation of the tools
- be able to use a custom rpmsrates and compssUsers.pl
Related to ISO
isoheader info
- have good ISO header info
System id: Mandriva Linux Volume id: PWP-20091-i586 Volume set id: Mandriva Linux - 2009 Spring (Powerpack) - i586 DVD [1/1] Publisher id: Mandriva Data preparer id: Mandriva-Linux Application id: Mandriva Linux - 2009 Spring (Powerpack) Copyright File id: Abstract File id: Bibliographic File id:
create ISO
- use genisoimage (and available options)
genisoimage -f -sort /home/plop/tmp/build/2009.1/100.sort -r -J -hide-rr-moved -nobak -cache-inodes \ -A "Mandriva Linux - 2009 Spring (Free)" -publisher "Mandriva" -sysid "Mandriva Linux" -p "Mandriva-Linux"\ -volset "Mandriva Linux - 2009 Spring (Free) - DVD i586 [1/1]" -V "Free-20091-i586" \ -o /home/plop/iso/2009.1/100-2009.1.iso -b i586/isolinux/isolinux.bin -c i586/isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table "/home/plop/build/2009.1/first/100" /home/plop/build/2009.1/100
- build the ISO
- create the repository to build the ISO, but do not build the ISO
- create a sub-directory for each product (ISO)
- add md5 in ISO's header
- create md5/sha1 signature
[plop@isobel final]$ more mandriva-linux-pwp-2009.1-i586.iso.md5 317cb30beb43dccb9002605c442a8534 mandriva-linux-pwp-2009.1-i586.iso [plop@isobel final]$ more mandriva-linux-pwp-2009.1-i586.iso.sha1 f7d828095e4c3cc736dbd8d4b05c91e3cdc300b6 mandriva-linux-pwp-2009.1-i586.iso
- create an idx file of packages availables on the ISO
PWP-20091-i586 ypbind-1.20.5-1mdv2009.1.i586 PWP-20091-i586 ypserv-2.19-7mdv2009.1.i586
checklist !
- check all RPM from list are on the ISO
- check all excluded RPMS are not on the ISO
- check pubkey on each media
- check this is an isohybrid info
- check md5/sha1 of the ISO
- check the Theme available on the ISO
- check the mandriva-release version on the ISO
- check DKMS are sync with kernel on ISO
- check product.id on the ISO (vendor=Mandriva,distribution=Mandriva Linux,type=basic,version=Mandriva,branch=official,release=0.1,arch=x86_64,product=public
- check releases_notes on the ISO
- check autorun version on the ISO

