Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to know if is there any utility like Debian's pbuilder, to build RPM packages on RedHat using a clean environment (chroot).

I've found mach which has support for something like this but under a Debian environment, and doesn't support RHEL. I need something that runs on RHEL 5.5.

share|improve this question
add comment

4 Answers

If you want to go the whole way, you can set up Koji, which uses Mock (from cdgagne's answer) as one of it's components. Koji is what builds Fedora and is freely downloadable from its website. Afaik, Fedora runs Koji on RHEL, so it should be fine for your purposes.

share|improve this answer
add comment

Mock is what you're looking for. It's based on Mach and is packaged in EPEL. I regularly use it to build RPM packages for and on RHEL and Fedora.

share|improve this answer
add comment

mach supports RHEL with an appropriate configuration file, ex:

V  = '5Server' # distro version
VS = '5'       # 'short' version
A  = 'i386'    # architecture
AS = ''        # 'short' version of arch
DIST = 'rhel-%s-%s' % (V, A)

### RHEL flavours

yumsources[DIST] = {
  'os':               rhelyum + '/%s/%s/os'                         % (V, A),
  'updates':          rhelyum + '/%s/%s/updates'                    % (V, A),
}

# RHEL
packages['%s' % DIST] = {
  'dir':      DIST,
  'minimal':  'bash glibc redhat-release',
  'base':     'coreutils findutils openssh-server',
  'build':    'dev redhat-rpm-config rpm-build make gcc gcc-c++ tar gzip ' +
              'patch unzip bzip2 diffutils cpio elfutils which',
}
sourceslist['%s' % DIST] = {
  DIST: ('os', 'updates', )
}
config['%s' % DIST] = {
  'runuser': '/sbin/runuser',
  'macros':  { 'dist': '.el' + VS, 'rhel': VS, 'redhat': VS},
}
aliases['%s' % DIST] = ('el' + VS + AS, )
share|improve this answer
add comment

The OpenSUSE Build System support multiple distributions and supports the environment that you describe, a sandboxed environment to ensure that the builds are consistent and reliable:

https://build.opensuse.org/

You can also install the OpenSUSE Build System as an appliance. This is a self-contained Linux VM image (VMware, QEmu, or ISO versions are supported) that contain the entire stack to set up your own build farms:

http://en.opensuse.org/openSUSE:Build_Service_Appliance

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.