BUILDRPM(8) BUILDRPM(8) NAME buildrpm - a tool to build RPM packages from software and files on a system SYNOPSIS buildrpm [-f] [/path/to/[file1|dir1]] [-c] [/path/to/file9|dir9] ] [-v|-h] DESCRIPTION This tool aims to lower the technical treshhold for new RPM packagers, effectivly making RPM and RPM packaging available to more people. This tool was build by someone that does not claim to be an expert RPM pack- ager with everything that may and may not implicate. With that said, buildrpm allows almost anyone without previous experience to build RPMs. IMPORTANT NOTE BE AWARE that BUILDRPM does not (or aspire to) solve all your RPM pack- aging needs. Read all about RPM here: http://www.rpm.org/max-rpm/ BUILDRPM was designed with one specific usecase in mind. Packaging files on a system into a RPM. For example, if you have installed a software on a system and want to deploy that software on other systems using RPM. Packaging the software as a RPM enables all the benefits of RPM - for example - being able to deploy the software via a ’yum’ repository housed on a web, ftp, nfs or ’Spacewalk/RHN Satellite’ server. BUILDRPM does today not handle automatic compilation of pack- aged source code. BUILDRPM today only takes a total of 9 arguments, including command line switches. This is due to a limitation in the current code. If you to pass more than 9 arguments use the -f switch to define files that contains the list of files or configuration files to be packaged. The -f (file) switch If the FIRST argument is -f then the arguments that follows needs to be files containing lists of files to package. -f can be combined with -c to indicate file(s) containing list(s) of configuration files. The list should not include directories, only files with their full path listed. The -f switch can be used to handle larger RPM builds where the max number of arguments supported by buildrpm is not enough. In some cases it may also be easier to use the -f switch, when you’re not sure where files of an application that you package will be put. In that case one could do a ’find /’ before and after installation of the application, then diff the output to get a file that lists all content added. Example: /tmp/afile /tmp/directory/bfile /tmp/directory/onemoredirectory/cfile The -c (config) switch To mark files as configuration files you need to use the "-c" option! If not, configuration files will be packaged as regular files and therefor will be overwritten if the RPM is upgraded! Example: buildrpm -c /path/to/config_file buildrpm -f -c /path/to/file_containing_a_list_of_config_files buildrpm /path/to/file -c /path/to/config_file Wildcard usage It is allowed to use asterix ’*’ to indicate files or directories to package. Example usage Example: buildrpm /usr/bin/mya* -c /etc/my* Example: buildrpm /usr/bin/myapp Example: buildrpm /usr/bin/myapp -c /etc/myapp Example: buildrpm /usr/bin/mya* -c /etc/my* Example: buildrpm /usr/bin/mya* /usr/local/myapp/binary /opt/myapp/scripts /opt/myapp/data /opt/myapp/libs -c /etc/my* /etc/sysconfig/myapp /opt/myapp/config Example: buildrpm -f /tmp/file_containing_list_of_files -c /tmp/file_containing_list_of_configuration_files BE AWARE of packaging zip archives! Please note that you should refer from packaging archives containing other files (tar, gz, bz, bz2, RPM, .iso, .img files). The reason why is cause this is very likely to counters a major reason to use RPM - that RPM keeps track of all files deployed by a RPM and makes sure they are treated properly during installations and upgrades. If you deploy a .tar archive, then RPM will only keep track of that .tar archive, not all the files it contains. OPTIONS Here is an explaination of all options. [/path/to/file] - Path to a file that is to be packaged into a RPM. [/path/to/dir] - Path to a directory that is RECURSIVLY to be packaged into a RPM. [-c] - Indicate that files and directories, a files containing a list of files that follows -c is to be treaded as configu- ration (%config) files. Argument can be passed anytime. [-f] - Indicate that file paths that follows is files containing a list of files. Argument can only be passed FIRST! [-v] - Print version and exit. [-h] - Print help and exit. Buildrpm Configuration file If you want to change the behavior of buildrpm, have a look at /etc/buildrpm/buildrpm. BUGS Report bugs to SEE ALSO rpmbuild(8) rpm(8) AUTHOR Written by Magnus Glantz. COPYRIGHT Copyright (c) 2010, Magnus Glantz Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being GNU General Public License and Funding Free Software, the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the gfdl(7) man page. (a) The FSF’s Front-Cover Text is: A GNU Manual (b) The FSF’s Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. Credits This man page was based on the gcc(1) and watch(1) man pages. buildrpm-0.9-1 2010-10-05 BUILDRPM(8)