Documentation Main - Root "" Repository - Home Page - SourceForge Page - Downloads - Subversion Repository - Forums - Report A Bug
Welcome to the Ape Base Compile System Documentation
Ape Base Compile System Version: 1.02-ap20104400 SVN r73 2008-03-23 09:19:42Z BrynM
Ape Root Directories

These are the default directories created by installing Ape Base Compile System. You will undoubtably make some of your own as well.

The ./epm-extra Directory
This is where the Ape Base Compile System deposits the EPM list files (*.list) it creates. The "extra" is added because this is also the location the Ape Base Compile System will look for any user EPM list stubs (*.stub) appropriate to what it is compiling. To control what stub file will be appended to the generated list, please see the APE_CONF_USER_EPM_STUB configuration variable. The contents of this directory will fluctuate and grow with usage. You may want to clean out unused list (*.list) files after a while. Remember to keep your stub (*.stub) files though!
The ./include Directory
[root@localhost:/ape/_compile]$ tree ./include/
|- # actual file copy in ./scripts lis linked to
|- # master configuration
|- #common functions file
|- # Ape Base Compile System init file
|- # internal system variables
`- # the file that your script will eventually execute to compile with
[root@localhost:/ape/_compile]$ |
This is where the non-user portions of the compile system live. Please fo not edit them unless you really, absolutely, positively know what you are doing. The only exception is the file "", which you can customize to suit your desired environment. Customizing "" will alter default configuration values for all scripts.
The ./output Directory
This is where log files are dumped duting the compilation process. Logs are created when the scripts make underlying calls to `configure`, `configure --help`, `make`, `make clean` and `make install`. This is another directory that should be cleaned out every so often.
The ./post-install Directory

This is a place for you to store arbitrary scripts which you have set to run using Triggered Commands. For more information about when you can trigger commands, see variables such as APE_CONF_POST_CONFIGURE_CMD in the Ape User Configuration Variables section. If a file named " ${APE_CONF_PACKAGE_NAME}- ${APE_CONF_VERSION}" is created in the ./post-install directory, it will be assumed to be your intended APE_CONF_POST_RPM_INSTALL_CMD script. It will be included in the disrtibution as " /${APE_CONF_BASE_DEST_PARENT_DIR} /${APE_CONF_DEST_DIR_LABEL} /${APE_CONF_VERSION}/bin/${APE_CONF_PACKAGE_NAME}-${APE_CONF_VERSION}" but not run at RPM installation until entered as the value of APE_CONF_POST_RPM_INSTALL_CMD.

The ./rpms Directory
[root@localhost:/ape/_compile]$ tree -dl ./rpms/
|- centos # centos rpms
| |- el4
| | |- i386
| | |- ia64
| | `- x86_64
| |- el5
| | |- i386
| | |- ia64
| | `- x86_64
| |- gold4 # final production ready rpms
| | |- i386
| | |- ia64
| | `- x86_64
| `- gold5 # final production ready rpms
|   |- i386
|   |- ia64
|   `- x86_64
|- misc # unknown or undetected *nix brand  
| |- gold # final production ready rpms
| | |- i386
| | |- ia64
| | `- x86_64
| |- i386
| |- ia64
| `- x86_64
|- mrepo-src # mrepo mirror dir if mrepoHttpd is built
|- mrepo-www # mrepo web root if mrepoHttpd is built
|- # script for updating the local mrepoHttpd install
`- redhat -> centos # symlinked back to ./centos
[root@localhost:/ape/_compile]$ |

There are three RPM archive directories created by default. They are ./rpms/centos, ./rpms/misc and ./rpms/redhat which is a symbolic link to ./rpms/centos. Additionally, Ape Base Compile System will create a directory tree for your OS or disro if it can be detected, but release subdirectories will not be created for non-RHEL based disributions. If the OS or distro can't be detected, created RPMs will be placed in the ./rpms/misc tree.

Red Hat based distributions will contain subdirectories for the release, such as ./rpms/centos/el4. Though a Fedora tree is not created at installation, it will also contain directories such as ./rpms/fedora/fc7 when needed.

The "./rpms" directory will be kept orderly even if mounted remotely from machines of differing architectures, provided you use mostly default names and locations for produced RPMS. If the mrepohttpd ("./scripts/") is built and installed, it will utilized the "./rpms" sirectory as it's source. As you find builds you are happy with, you may want to copy the RPM to your gold repository and have the rest of your non-development architecture feed from that. You can also build an RPM directly to the gold directories by using the -g option for -r when you run your script.

The ./scripts Directory

This is your primary working directory. A copy of "" is there waiting for you to create your own compile scripts with. The user scripts will be discussed in detail later.

The ./skels Directory
[root@localhost:/ape/_compile]$ tree ./skels/
|- epm-4.1 # skel directory for the 4.1 version of EPM
| `- bin
|   `- # script to automate linking the 4.1 version to current
|- mrepoHttpd # generic mrepoHttpd skel dir - all version will get these
| |- LICENSE # duh
| |- conf # the apache conf directory
| | |- conf.d
| | | `- mrepo.conf #settings for mrepo - not a vhost
| | |- extra # apache extras
| | |- magic #mime file
| | |- mime.types # mime types file
| | |- mrepoHttpd.conf # minimal httpd.conf
| | `- original# original httpd configs for reference
| `- etc # local /etc
|   |- init.d
|   | `- mrepoHttpd # file usable for chkconfig
|   |- mrepo.conf # mainly empty mrepo.conf
|   |- mrepo.conf.d
|   | `- apelocal.repo.conf # the ape local mrepo repositories
|   |- sysconfig
|   `- yum.repos.d
|     `- apelocal.repo # a yum config for checking the local repo
|- mrepoHttpd-2.2.8 # version specific skel - only applied to 2.2.8
| `- bin
|   `- # link build of 2.2.8 to the current version
`- # template link-to-current file
[root@localhost:/ape/_compile]$ |

This may look complicated, but it's not. There's just a lot in example stuff there. The function of the ./skels directory is to store files you wish copied to your installation directory after the make install step.

The ./sourceballs Directory
This is a place to store your source files so that Ape Base Compile System can automaticaly find them. Please see the ./src description below for it's usage.
The ./src Directory

The most essential part of your compile and packaging efforts is the source code for your application. In our example, we'll be getting ready to compile ESP EPM. To place it, we'll download the source package from to our ./sourceballs directory, extract it to the ./src directory and know what we need to chage if anything in our user script. Please be sure to use the appropriate mirror from to download. We will be dealing with a GZipped Tarball in this example. If you have a zip, rar or other type of package, please substitute the `tar` commands below for their appropriate equivalent and read the documentation for that equivalent.

First, grab the source package.

[root@localhost:~]$ wget --directory-prefix=/ape/_compile/sourceballs 'http://ftp.SOME-MIRROR/pub/epm/4.1/epm-4.1-source.tar.gz'
--10:24:06--  http://ftp.SOME-MIRROR/pub/epm/4.1/epm-4.1-source.tar.gz
Resolving ftp.SOME-MIRROR...
Connecting to ftp.SOME-MIRROR||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 509728 (498K) [application/x-gzip]
Saving to: `/ape/_compile/sourceballs/epm-4.1-source.tar.gz'

100%[=================================================================================================================================================>] 509,728      984K/s   in 0.5s

10:24:07 (984 KB/s) - `/ape/_compile/sourceballs/epm-4.1-source.tar.gz' saved [509728/509728]

[root@localhost:~]$ |

Now we extract it to /ape/_compile/src/, but first we check to see that everything in the source package is inside of a directory. In this case, the directory is named in the style of "app-version" as Ape Base Compile System will expect it: ("epm-4.1"). If the contents of the source package are at the root of the package, you may wish to alter "--directory /ape/_compile/src" to something like "--directory /ape/_compile/src/app-version" in the second command below.

[root@localhost:~]$ tar --gzip --list --file /ape/_compile/sourceballs/epm-4.1-source.tar.gz | head -n 10
[root@localhost:~]$ tar --gzip --extract --directory /ape/_compile/src --file /ape/_compile/sourceballs/epm-4.1-source.tar.gz
[root@localhost:~]$ ls -ld /ape/_compile/src/epm-4.1
drwxrwxr-x 5 1110 games 4096 Apr 10  2007 /ape/_compile/src/epm-4.1
[root@localhost:~]$ |

In this case, you'll notice the odd owner and group of /ape/_compile/src/epm-4.1 in the final directory listing (`ls`). These were the permissions from the extracted archive. We shoudl fix them before going on.

[root@localhost:~]$ chown -R root:root /ape/_compile/src/epm-4.1
[root@localhost:~]$ ls -ld /ape/_compile/src/epm-4.1
drwxrwxr-x 5 root root 4096 Apr 10  2007 /ape/_compile/src/epm-4.1
[root@localhost:~]$ |

If you wish to further organize the ./src directory, you can do so. Perhaps you'd like to keep all of your MySQL sources together. In such a case you would create the directory in ./src and adjust your APE_CONF_SOURCE_DIR_NAME variable accordingly in your user script.

The ./util Directory
[root@localhost:/ape/_compile]$ tree -ld ./util
|- bin # semi-stable extra utilities
|- dev-extra # unstable extra utilities
|- docs # documentation
| |- images
| `- src
|   |- about
|   |- conf_vars
|   |- root_dirs
|   |- sys_vars
|   |- tut
|   `- usage
`- tmp-build # a temp directory for Ape Base Compile System to use
[root@localhost:/ape/_compile]$ |

There is some neat stuff in here, but most of it is experimental. The ./tmp-buld directory is exactly what it sounds like. A temporary storage space. As such, you may wish to clean it out every so often.

The main thing of interest to you should be the documentation (./doc) subdirectory. The rest of the ./util directory will have to wait to be documented until each part is stable.

Documentation for the Ape Base Compile System v1.02-ap20104400 SVN r73 2008-03-23 09:19:42Z BrynM at (
Last Modified: Sunday, 23-Mar-2008 05:47:48 UTC - Now: Wednesday, 25-Apr-2018 21:57:05 UTC
Ape logo originally from image in "Round-about Rambles in Lands of Fact and Fancy" by Frank Richard Stockton via Project Gutenberg (direct link)
Valid XHTML 1.0 Transitional Logo
Home Page - SourceForge Page - Downloads - Subversion Repository - Forums - Report A Bug
Ape Base Compile System project hosted by SourceForge.