blob: 6a9f6ed1a16f0439c0ab7715995a2298d7016b9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
.. -*- mode: rst -*-
.. _packages:
.. _CentOS: http://www.centos.org/
.. _Red Hat/RHEL: http://www.redhat.com/rhel/
.. _Scientific Linux: http://www.scientificlinux.org/
.. _EPEL: http://fedoraproject.org/wiki/EPEL
.. _RPMForge: https://rpmrepo.org/RPMforge
Building RPM packages from source
=================================
The Bcfg2 distribution contains two different spec files.
Building from Tarball
---------------------
* Copy the tarball to ``/usr/src/packages/SOURCES/``
* Extract another copy of it somewhere else (eg: ``/tmp``) and retrieve
the ``misc/bcfg2.spec`` file
* Run ::
rpmbuild -ba bcfg2.spec
* The resulting RPMs will be in ``/usr/src/packages/RPMS/`` and SRPMs
in ``/usr/src/packages/SRPMS``
Building from an GIT Checkout
-----------------------------
* Change to the ``redhat/`` directory in the working copy
* Run ::
make
* The resulting RPMs will be in ``/usr/src/redhat/RPMS/`` and SRPMs
in ``/usr/src/redhat/SRPMS`` and will have the SVN revision appended
Building RPM packages with ``rpmbuild``
---------------------------------------
While you can go about building all these things from source, this
how to will try and meet the dependencies using packages from EPEL_.
The *el5* and the *el6* package should be compatible with CentOS 5.x.
* Installation of the EPEL_ repository package ::
[root@centos ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-6.noarch.rpm
* Now you can install the rest of the prerequisites ::
[root@centos ~]# yum install python-genshi python-cheetah python-lxml
* After installing git, check out the master branch ::
[root@centos redhat]# git clone git://git.mcs.anl.gov/bcfg2.git
* Install the ``fedora-packager`` package ::
[root@centos ~]# yum install fedora-packager
* A directory structure for the RPM build process has to be established. ::
[you@centos ~]$ rpmdev-setuptree
* Change to the *redhat* directory of the checked out Bcfg2 source::
[you@centos ~]$ cd bcfg2/redhat/
* In the particular directory is a ``Makefile`` which will do the job of
building the RPM packages. You can do this as root, but it's not
recommanded ::
[you@centos redhat]$ make
* Now the new RPM package can be installed. Please adjust the path to
your RPM package ::
[root@centos ~]# rpm -ihv /home/YOU/rpmbuild/RPMS/noarch/bcfg2-server-1.0.0-0.2r5835.noarch.rpm
|