summaryrefslogtreecommitdiffstats
path: root/setup.py
blob: 63c504a3fee1d5752a68337e53b3941b11d8a3ff (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#!/usr/bin/python

import sys
from distutils.core import setup, Extension
import string

VERSION = "1.0.1"
SHORT_DESC = "Network Boot and Update Server"
LONG_DESC = """
Cobbler is a network boot and update server.  Cobbler supports PXE, provisioning virtualized images, and reinstalling existing Linux machines.  The last two modes require a helper tool called 'koan' that integrates with cobbler.  Cobbler's advanced features include importing distributions from DVDs and rsync mirrors, kickstart templating, integrated yum mirroring, and built-in DHCP/DNS Management.  Cobbler also has a Python and XMLRPC API for integration with other applications.
"""

if __name__ == "__main__":
        # docspath="share/doc/koan-%s/" % VERSION
        manpath  = "share/man/man1/"
        cobpath  = "/var/lib/cobbler/"
        backpath = "/var/lib/cobbler/backup/"
        trigpath = "/var/lib/cobbler/triggers/"
        etcpath  = "/etc/cobbler/"
        wwwconf  = "/etc/httpd/conf.d/"
        wwwpath  = "/var/www/cobbler/"
        wwwgfx   = "/var/www/cobbler/webui/"
        initpath = "/etc/init.d/"
        logpath  = "/var/log/cobbler/"
        logpath2 = "/var/log/cobbler/kicklog"
        logpath3 = "/var/log/cobbler/syslog"
        logpath4 = "/var/log/httpd/cobbler"
        snippets = "/var/lib/cobbler/snippets"
        vl_kick  = "/var/lib/cobbler/kickstarts"
        wwwtmpl  = "/usr/share/cobbler/webui_templates/"
        vw_localmirror = "/var/www/cobbler/localmirror"
        vw_kickstarts  = "/var/www/cobbler/kickstarts"
        vw_kickstarts_sys  = "/var/www/cobbler/kickstarts_sys"
        vw_repomirror = "/var/www/cobbler/repo_mirror"
        vw_repoprofile = "/var/www/cobbler/repos_profile"
        vw_reposystem =  "/var/www/cobbler/repos_system"
        vw_ksmirror   = "/var/www/cobbler/ks_mirror"
        vw_ksmirrorc  = "/var/www/cobbler/ks_mirror/config"
        vw_images     = "/var/www/cobbler/images"
        vw_distros    = "/var/www/cobbler/distros"
        vw_systems    = "/var/www/cobbler/systems"
        vw_profiles   = "/var/www/cobbler/profiles"
        vw_links      = "/var/www/cobbler/links"
        zone_templates = "/etc/cobbler/zone_templates"
        tftp_cfg      = "/tftpboot/pxelinux.cfg"
        tftp_images   = "/tftpboot/images"
        rotpath       = "/etc/logrotate.d"
        # cgipath       = "/var/www/cgi-bin/cobbler"
        modpython     = "/var/www/cobbler/web"
        modpythonsvc  = "/var/www/cobbler/svc"
        setup(
                name="cobbler",
                version = VERSION,
                author = "Michael DeHaan",
                author_email = "mdehaan@redhat.com",
                url = "http://cobbler.et.redhat.com/",
                license = "GPL",
                packages = [
                    "cobbler",
                    "cobbler/yaml",
                    "cobbler/modules", 
                    "cobbler/server", 
                    "cobbler/webui",
                ],
                scripts = ["scripts/cobbler", "scripts/cobblerd"],
                data_files = [ 
                                (modpython, ['scripts/index.py']),
                                (modpythonsvc, ['scripts/services.py']),
                                # cgi files
                                # (cgipath,   ['scripts/nopxe.cgi']),
                                # (cgipath,   ['scripts/install_trigger.cgi']),
 
                                # miscellaneous config files
                                (rotpath,  ['config/cobblerd_rotate']),
                                (wwwconf,  ['config/cobbler.conf']),
                                (wwwconf,  ['config/cobbler_svc.conf']),
                                (cobpath,  ['config/cobbler_hosts']),
                                (etcpath,  ['config/modules.conf']),
                                (etcpath,  ['config/users.digest']),
                                (etcpath,  ['config/rsync.exclude']),
                                (etcpath,  ['config/users.conf']),
                                (initpath, ['config/cobblerd']),
                                (etcpath,  ['config/settings']),

                                # backups for upgrades
                                (backpath, []),

                                # bootloaders and syslinux support files
                                (cobpath,  ['loaders/elilo-3.6-ia64.efi']),
                                (cobpath,  ['loaders/menu.c32']),

                                # sample kickstart files
                                (etcpath,  ['kickstarts/legacy.ks']),
                                (etcpath,  ['kickstarts/sample.ks']),
                                (etcpath,  ['kickstarts/sample_end.ks']),
                                (etcpath,  ['kickstarts/default.ks']),
 
                                # templates for DHCP, DNS, and syslinux configs
				(etcpath,  ['templates/dhcp.template']),
				(etcpath,  ['templates/dnsmasq.template']),
                                (etcpath,  ['templates/named.template']),
				(etcpath,  ['templates/pxedefault.template']),
				(etcpath,  ['templates/pxesystem.template']),
				(etcpath,  ['templates/pxesystem_ia64.template']),
				(etcpath,  ['templates/pxeprofile.template']),
                                (etcpath,  ['templates/zone.template']),

                                # kickstart dir
                                (vl_kick,  []),

                                # useful kickstart snippets that we ship
                                (snippets, ['snippets/partition_select']),

                                # documentation
                                (manpath,  ['docs/cobbler.1.gz']),

                                # logfiles
                                (logpath,  []),
                                (logpath2, []),
                                (logpath3, []),
				(logpath4, []),

                                # web page directories that we own
                                (vw_localmirror,    []),
                                (vw_kickstarts,     []),
                                (vw_kickstarts_sys, []),
                                (vw_repomirror,     []),
                                (vw_repoprofile,    []),
                                (vw_reposystem,     []),
                                (vw_ksmirror,       []),
                                (vw_ksmirrorc,      []),
                                (vw_distros,        []),
                                (vw_images,         []),
                                (vw_systems,        []),
                                (vw_profiles,       []),
                                (vw_links,          []),

                                # zone-specific templates directory
                                (zone_templates,    []),

                                # tftp directories that we own
                                (tftp_cfg,          []),
                                (tftp_images,       []),

                                # Web UI templates for object viewing & modification
                                # FIXME: other templates to add as they are created.
                                # slurp in whole directory?

                                (wwwtmpl,           ['webui_templates/empty.tmpl']),
                                (wwwtmpl,           ['webui_templates/blank.tmpl']),
                                (wwwtmpl,           ['webui_templates/enoaccess.tmpl']),
                                (wwwtmpl,           ['webui_templates/distro_list.tmpl']),
                                (wwwtmpl,           ['webui_templates/distro_edit.tmpl']),
                                (wwwtmpl,           ['webui_templates/profile_list.tmpl']),
                                (wwwtmpl,           ['webui_templates/profile_edit.tmpl']),
                                (wwwtmpl,           ['webui_templates/system_list.tmpl']),
                                (wwwtmpl,           ['webui_templates/system_edit.tmpl']),
                                (wwwtmpl,           ['webui_templates/repo_list.tmpl']),
                                (wwwtmpl,           ['webui_templates/repo_edit.tmpl']),

                                # Web UI common templates 
                                (wwwtmpl,           ['webui_templates/paginate.tmpl']),
                                (wwwtmpl,           ['webui_templates/message.tmpl']),
                                (wwwtmpl,           ['webui_templates/error_page.tmpl']),
                                (wwwtmpl,           ['webui_templates/master.tmpl']),
                                (wwwtmpl,           ['webui_templates/item.tmpl']),
                                (wwwtmpl,           ['webui_templates/index.tmpl']),

                                # Web UI kickstart file editing
                                (wwwtmpl,           ['webui_templates/ksfile_edit.tmpl']),
                                (wwwtmpl,           ['webui_templates/ksfile_new.tmpl']),
                                (wwwtmpl,           ['webui_templates/ksfile_list.tmpl']),

                                # Web UI support files
				(wwwgfx,            ['docs/wui.html']),
                                (wwwgfx,            ['docs/cobbler.html']),
				(wwwgfx,            []),
                                (wwwgfx,            ['webui_content/icon_16_sync.png']),
                                (wwwgfx,            ['webui_content/list-expand.png']),
                                (wwwgfx,            ['webui_content/list-collapse.png']),
                                (wwwgfx,            ['webui_content/list-parent.png']),
                                (wwwgfx,            ['webui_content/cobbler.js']),
                                (wwwgfx,            ['webui_content/style.css']),
                                (wwwgfx,            ['webui_content/logo-cobbler.png']),
                                (wwwgfx,            ['webui_content/cobblerweb.css']),
 
                                # Directories to hold cobbler triggers
                                ("%sadd/distro/pre" % trigpath,      []),
                                ("%sadd/distro/post" % trigpath,     []),
                                ("%sadd/profile/pre" % trigpath,     []),
                                ("%sadd/profile/post" % trigpath,    []),
                                ("%sadd/system/pre" % trigpath,      []),
                                ("%sadd/system/post" % trigpath,     []),
                                ("%sadd/repo/pre" % trigpath,        []),
                                ("%sadd/repo/post" % trigpath,       []),
                                ("%sdelete/distro/pre" % trigpath,   []),
                                ("%sdelete/distro/post" % trigpath,  []),
                                ("%sdelete/profile/pre" % trigpath,  []),
                                ("%sdelete/profile/post" % trigpath, []),
                                ("%sdelete/system/pre" % trigpath,   []),
                                ("%sdelete/system/post" % trigpath,  []),
                                ("%sdelete/repo/pre" % trigpath,     []),
                                ("%sdelete/repo/post" % trigpath,    []),
                                ("%sdelete/repo/post" % trigpath,    []),
                                ("%sinstall/pre" % trigpath,         [ "triggers/status_pre.trigger"]),
                                ("%sinstall/post" % trigpath,        [ "triggers/status_post.trigger"]),
                                ("%ssync/pre" % trigpath,            []),
                                ("%ssync/post" % trigpath,           [ "triggers/restart-services.trigger" ])
                             ],
                description = SHORT_DESC,
                long_description = LONG_DESC
        )