package naming conventions: package names are made of 3 parts separated by dashes, name-program_version-ru_revision 1) NAME is normally the program name, e.g. emacs, apache, xboing NAME will be NAME#, where # is the major version number of the package if multiple versions of the package should coexist on a machine. e.g. emacs21 2) PROGRAM_VERSION is the version number from the source, e.g. 1.3.36 for apache 3) RU_REVISION is the revision number Rutgers uses for local hacks/fixes to the package 4) there is NO defined naming convention to splitting a package into server and client packages. e.g. mysql -> mysql-client, mysql-server generally the main package contains the server and there is a seperate client package. 5) Development packages should have the sub-package name "devel" e.g. mysql -> mysql-devel 6) (Starting with helium) Apache modules are to be prefixed with "apache-module-" in the package name and should "Provide:" the normal name of the module. The files will go in: /usr/local/apache-modules package contents conventions: 1) everything goes in /{usr|var}/local (see 5 for exception) a) small packages go in /usr/local/{lib,doc,bin,etc,...}, e.g. slide b) big packages go in: I) /usr/local/PKG II) /usr/local/PKG-VERSION if: A) 2 version should be able to coexist at once B) versions tend to be incompatible (say with config files) (sample code below) 2) create a link from /usr/local/PKG-VERSION to /usr/local/PKG if it doesn't already exist (sample code below) 3) create a link from /usr/local/PKG-VERSION/bin/PROG to /usr/local/bin/PROG if it doesn't already exist 4) Mark documentation with %doc in the SPEC file. This places the docs in /usr/local/doc/PKG-VERSION. 5) /etc/init.d/SERVICE gets service startup file if it doesn't exist else /etc/init.d/SERVICE.rpmnew gets the service startup file Use the %config(noreplace) option of init.d scripts. 6) Place manpages for packages that will not conflict as in #1 in /usr/local/man so they are in the manpath. Configuration Files ------------------- Configuration files should be marked with %config(noreplace) in rpm. When a package in installed/upgraded and a file already exists that matches one of %config(noreplace) the original file is left alone and the new file is put down with the extension .rpmnew. Otherwise, the file it just put down as-is. General File Placement ---------------------- All files should be put under /usr/local. * Complicated applications such as emacs would go under /usr/local/emacsXX and a symlink would be placed in /usr/local/bin. * Smaller packages, such as nano, can be put directly into /usr/local/bin. Applications that are heavily used and see revisions that may not be backwards compatible or that would for some reason have multiple versions instaled, such as apache, are to be installed to /usr/local/apache-version. /usr/local/apache is to be a symlink to the currently used version. Use code like this in the spec: if [ ! -r /usr/local/php ]; then ln -s /usr/local/php-%{version} /usr/local/php echo /usr/local/php now points to /usr/local/php-%{version} fi Things that go outside /usr/local: ---------------------------------- shells, like bash, are for example /bin/bash All configuration files that would otherwise go in /etc should be places in /usr/local/etc. If the application refuses not to look in /etc, make a symlink. (ex: done for apt) Misc ---- PAM stuff goes into /usr/local/sbin --- Open System Support