**** Copyright (c) 2005 by Marco E. Poleggi, and the European Organization for **** Nuclear Research (CERN). All rights reserved. **** **** The software was distributed with and is covered by the European **** DataGrid License. A copy of this license can be found in the included **** LICENSE file. This license can also be obtained from **** http://www.eu-datagrid.org/license. rpmq2pan_pkg.pl is a tool to generate Pan software package templates from the local RPM database contents. Basically, two kinds of templates can be outputted: 1) "standard" package list templates, such as template pro_myswpkg_myplatform; "/software/packages" = pkg_add("4Suite","0.11.1-14","i386"); "/software/packages" = pkg_add("CERN-dummy-afs-provides","1-1","i386"); ... are carried out by the command ./rpmq2pan_pkg.pl --outprfx=pro_myswpkg --platform=myplatform Multiple packages found in the RPM database are handled automatically by appending the "multi" option to the pkg_add() function. Also, for single version packages it is possible to suppress the and specifications with the --minspec option. Lastly, an 'include' line for a "defaults" package template (see below) can be added with the --incdef option. Thus, the following command ./rpmq2pan_pkg.pl --outprfx=pro_myswpkg --platform=myplatform --incdef \ --minspec create a full-fledged Quattor-like template 'pro_myswpkg_myplatform.tpl', such as: # # PAN packages template for myplatform # Generated by ./rpmq2pan_pkg.pl on Thu Jul 21 16:01:47 2005. # template pro_myswpkg_myplatform; include pro_myswpkg_defaults_myplatform; "/software/packages" = pkg_add("4Suite"); "/software/packages" = pkg_add("CERN-dummy-afs-provides"); ... "/software/packages" = pkg_add("kernel","2.4.21-27.0.2.EL.cern","i686","multi"); "/software/packages" = pkg_add("kernel","2.4.21-32.0.1.EL.cern","i686","multi"); ... 1) "defaults" package list templates, such as # # PAN default packages template for myplatform # Generated by ./rpmq2pan_pkg.pl on Thu Jul 21 16:04:32 2005. # template pro_myswpkg_defaults_myplatform; define variable package_default = nlist( "_4Suite",list("0.11.1-14","i386"), "_CERN-dummy-afs-provides",list("1-1","i386"), "_CERN-texstyles",list("4-1","noarch"), ... ); are carried out by the command ./rpmq2pan_pkg.pl --outprfx=pro_myswpkg --platform=myplatform --deftpl Since templates of this kind cannot contain multiple package versions, when some alternatives for a given package name are found, you will be prompted to choose one of them. Please, be consistent across related packages such as 'kernel' and 'kernel-source'!