RPMs for web applications

Web applications are traditionally distributed with tar files, but they can be packaged as RPMs.

A web application in an RPM should have a tar file with the source. The tar file should have the files from the top of the application file tree, to make it easier if the target directory needs to change. The only parts of the .spec file that really need to be defined are the install, which will copy the files from the build root into a target directory, and clean, to delete the files after the RPM is built. Use tar tf to list the files from that tar (don’t list the directories or warnings will be issued for duplicate files). Be sure to encase the filenames in double quotes, write them to a file and then include them into the files section with the -f option. Using the -f option allows all the files for the tar to be specified, automatically, and ensures additional packages can be defined for the same directory with minimal conflicts.

The group for most web applications is Applications/Internet

RPMs can be created to allow the files to be relocated, another excellent approach would be to use symlinks into a single installation on a server, with account level configuration/access and databases.

During development, a script which creates tar files from the modules can be used to support both the RPM packaging, and create quick distribution packages for updates from a version control system.