diff options
author | root <root@mdehaan.rdu.redhat.com> | 2007-09-14 15:58:33 -0400 |
---|---|---|
committer | root <root@mdehaan.rdu.redhat.com> | 2007-09-14 15:58:33 -0400 |
commit | 2f7c2774afffbe5d5206fbc7865443fd71c29e78 (patch) | |
tree | 4f12f56e06a9b947e344363b28419a9fed2666a4 | |
parent | 9fce10e7cf0a616b14c031d7b03c78f58a887c56 (diff) | |
download | third_party-cobbler-2f7c2774afffbe5d5206fbc7865443fd71c29e78.tar.gz third_party-cobbler-2f7c2774afffbe5d5206fbc7865443fd71c29e78.tar.xz third_party-cobbler-2f7c2774afffbe5d5206fbc7865443fd71c29e78.zip |
Permissions cleanup and moving settings to be packaged in the RPM.
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | MANIFEST.in | 1 | ||||
-rw-r--r-- | cobbler.spec | 28 | ||||
-rw-r--r-- | cobbler/config.py | 11 | ||||
-rw-r--r-- | cobbler/settings.py | 11 | ||||
-rw-r--r-- | cobbler/webui/master.py | 4 | ||||
-rw-r--r-- | config/settings | 31 | ||||
-rw-r--r-- | setup.py | 1 |
8 files changed, 79 insertions, 11 deletions
@@ -14,6 +14,9 @@ Cobbler CHANGELOG - added Apache proxying around XMLRPC port for wider network access - refactor XMLRPC API and establish a read-write API - allow for configuring of read-write XMLRPC users in /etc/cobbler/auth.conf +- WebUI +- packaged /var/lib/cobbler/settings as a config file +- added BuildRequires to help build on other platforms * Thu Aug 30 2007 - 0.6.1 - re enable --resolve in yumdownloader (cobbler repo mgmt feature) diff --git a/MANIFEST.in b/MANIFEST.in index 8f9588c..48b7b23 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,6 +9,7 @@ include config/cobbler_hosts include config/modules.conf include config/auth.conf include config/webui-cherrypy.cfg +include config/settings recursive-include templates *.template recursive-include kickstarts *.ks include docs/cobbler.1.gz diff --git a/cobbler.spec b/cobbler.spec index 4910cb8..e8e605f 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -71,13 +71,18 @@ fi test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %files -%defattr(744,apache,apache) + +%defattr(755,apache,apache) /var/www/cgi-bin/findks.cgi /var/www/cgi-bin/nopxe.cgi /var/www/cgi-bin/cobbler_webui.cgi + +%defattr(755,apache,apache) %dir /usr/share/cobbler/webui_templates +%defattr(444,apache,apache) /usr/share/cobbler/webui_templates/*.tmpl -%defattr(2744,apache,apache) + +%defattr(1755,apache,apache) %dir /var/log/cobbler %dir /var/log/cobbler/kicklog %dir /var/www/cobbler/ @@ -92,9 +97,12 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %dir /var/www/cobbler/profiles %dir /var/www/cobbler/systems %dir /var/www/cobbler/links +%defattr(755,apache,apache) %dir /var/www/cobbler/webui +%defattr(444,apache,apache) /var/www/cobbler/webui/*.css /var/www/cobbler/webui/*.png + %defattr(-,root,root) %dir /tftpboot/pxelinux.cfg %dir /tftpboot/images @@ -127,7 +135,8 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT /etc/init.d/cobblerd %config(noreplace) /etc/httpd/conf.d/cobbler.conf %dir /var/log/cobbler/syslog -%defattr(2550,root,root) + +%defattr(755,root,root) %dir /var/lib/cobbler %dir /var/lib/cobbler/triggers/add/distro/pre %dir /var/lib/cobbler/triggers/add/distro/post @@ -146,13 +155,17 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %dir /var/lib/cobbler/triggers/delete/repo/pre %dir /var/lib/cobbler/triggers/delete/repo/post %dir /var/lib/cobbler/snippets/ + +%defattr(664,root,root) +%config(noreplace) /var/lib/cobbler/settings %config(noreplace) /var/lib/cobbler/snippets/partition_select /var/lib/cobbler/elilo-3.6-ia64.efi /var/lib/cobbler/menu.c32 -%defattr(2660,root,root) %config(noreplace) /etc/cobbler/auth.conf -%defattr(2755,root,root) + +%defattr(664,root,root) %config(noreplace) /var/lib/cobbler/cobbler_hosts + %defattr(-,root,root) %doc AUTHORS CHANGELOG README COPYING @@ -161,7 +174,10 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT * Fri Aug 31 2007 Michael DeHaan <mdehaan@redhat.com> - 0.6.2-1 - Upstream changes (see CHANGELOG) -- removed syslinux as a requirement +- removed syslinux as a requirement (cobbler check will detect absense) +- packaged /var/lib/cobbler/settings as a config file +- added BuildRequires of redhat-rpm-config to help src RPM rebuilds on other platforms +- permissions cleanup * Thu Aug 30 2007 Michael DeHaan <mdehaan@redhat.com> - 0.6.1-2 - Upstream changes (see CHANGELOG) diff --git a/cobbler/config.py b/cobbler/config.py index cb22b7b..ee41ea5 100644 --- a/cobbler/config.py +++ b/cobbler/config.py @@ -59,6 +59,12 @@ class Config: self._profiles = profiles.Profiles(weakref.proxy(self)) self._systems = systems.Systems(weakref.proxy(self)) self._settings = settings.Settings() # not a true collection + self._serialize_graph_classes = [ + self._distros, + self._repos, + self._profiles, + self._systems + ] self._graph_classes = [ self._settings, self._distros, @@ -66,7 +72,6 @@ class Config: self._profiles, self._systems ] - self.file_check() @@ -141,7 +146,7 @@ class Config: app up to a working state on first run or if files are deleted. See api.py FIXME: will require some tweaks when serializer modes aren't all file based """ - for x in self._graph_classes: + for x in self._serialize_graph_classes: if not os.path.exists(x.filename()): if not serializer.serialize(x): return False @@ -152,7 +157,7 @@ class Config: """ Save the object hierarchy to disk, using the filenames referenced in each object. """ - for x in self._graph_classes: + for x in self._serialize_graph_classes: if not serializer.serialize(x): return False return True diff --git a/cobbler/settings.py b/cobbler/settings.py index 3356bbd..f36b654 100644 --- a/cobbler/settings.py +++ b/cobbler/settings.py @@ -18,6 +18,9 @@ from rhpl.translate import _, N_, textdomain, utf8 TESTMODE = False +# defaults is to be used if the config file doesn't contain the value +# we need. + DEFAULTS = { "bootloaders" : { "standard" : "/usr/lib/syslinux/pxelinux.0", @@ -116,3 +119,11 @@ class Settings(serializable.Serializable): else: raise AttributeError, name +if __name__ == "__main__": + # used to save a settings file to /var/lib/cobbler/settings, for purposes of + # including a new updated settings file in the RPM without remembering how + # to format lots of YAML. + import yaml + print yaml.dump(DEFAULTS) + + diff --git a/cobbler/webui/master.py b/cobbler/webui/master.py index 1525f4f..58de8e0 100644 --- a/cobbler/webui/master.py +++ b/cobbler/webui/master.py @@ -33,8 +33,8 @@ VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.0rc8' __CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 8) -__CHEETAH_genTime__ = 1189794092.422076 -__CHEETAH_genTimestamp__ = 'Fri Sep 14 14:21:32 2007' +__CHEETAH_genTime__ = 1189799645.5265479 +__CHEETAH_genTimestamp__ = 'Fri Sep 14 15:54:05 2007' __CHEETAH_src__ = 'webui_templates/master.tmpl' __CHEETAH_srcLastModified__ = 'Fri Sep 14 14:19:18 2007' __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' diff --git a/config/settings b/config/settings new file mode 100644 index 0000000..b45e8f2 --- /dev/null +++ b/config/settings @@ -0,0 +1,31 @@ +--- +bootloaders: + ia64: /var/lib/cobbler/elilo-3.6-ia64.efi + standard: /usr/lib/syslinux/pxelinux.0 +default_kickstart: /etc/cobbler/default.ks +default_virt_type: auto +dhcpd_bin: /usr/sbin/dhcpd +dhcpd_conf: /etc/dhcpd.conf +dnsmasq_bin: /usr/sbin/dnsmasq +dnsmasq_conf: /etc/dnsmasq.conf +httpd_bin: /usr/sbin/httpd +kernel_options: + ksdevice: eth0 + lang: ' ' + text: ~ +manage_dhcp: 0 +manage_dhcp_mode: isc +next_server: '127.0.0.1' +pxe_just_once: 0 +server: '127.0.0.1' +snippetsdir: /var/lib/cobbler/snippets +syslog_port: 25150 +tftpboot: /tftpboot +tftpd_bin: /usr/sbin/in.tftpd +tftpd_conf: /etc/xinetd.d/tftp +webdir: /var/www/cobbler +xmlrpc_port: 25151 +xmlrpc_rw_enabled: 0 +xmlrpc_rw_port: 25152 +yum_core_mirror_from_server: 0 + @@ -68,6 +68,7 @@ if __name__ == "__main__": (etcpath, ['config/webui-cherrypy.cfg']), (etcpath, ['config/rsync.exclude']), (initpath, ['config/cobblerd']), + (cobpath, ['config/settings']), # bootloaders and syslinux support files (cobpath, ['loaders/elilo-3.6-ia64.efi']), |