Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 173011 Details for
Bug 248396
Ebuild for smolt, the Fedora hardware profiler
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch for smolt's source
client.patch (text/plain), 6.16 KB, created by
Peter GAAL
on 2008-11-23 16:22:36 UTC
(
hide
)
Description:
Patch for smolt's source
Filename:
MIME Type:
Creator:
Peter GAAL
Created:
2008-11-23 16:22:36 UTC
Size:
6.16 KB
patch
obsolete
>--- org/config.py 2008-03-08 18:57:57.000000000 +0100 >+++ client/config.py 2008-11-14 20:51:29.000000000 +0100 >@@ -17,6 +17,8 @@ > OS = "Shadowman!" > > HW_UUID = "/etc/sysconfig/hw-uuid" >+HW_PUBID = "/etc/sysconfig/hw-uuid.pub" >+HW_ADMIN = "/etc/sysconfig/hw-admin" > > #These are the defaults taken from the source code. > #fs_types = get_config_attr("FS_TYPES", ["ext2", "ext3", "xfs", "reiserfs"]) >@@ -91,5 +93,13 @@ > > > #For non RH Distros >-#HW_UUID = "/etc/smolt/hw-uuid" >+HW_UUID = "/etc/smolt/hw-uuid" >+HW_PUBID = "/etc/smolt/hw-uuid.pub" >+HW_ADMIN = "/etc/smolt/hw-admin" >+ >+#For Gentoo >+try: >+ OS = file('/etc/gentoo-release').read().strip() >+except IOError: >+ OS = "It's the fastest penguin!" > >--- org/Makefile 2008-11-11 19:59:34.000000000 +0100 >+++ client/Makefile 2008-11-12 20:35:23.000000000 +0100 >@@ -1,8 +1,8 @@ > PO_FILES=$(wildcard po/*.po) > MO_FILES=$(patsubst %.po,%.mo,$(PO_FILES)) >-PY_FILES=deleteProfile.py haldump.py __init__.py sendProfile.py smoltGui.py smolt.py software.py smoltFirstBoot.py gui.py privacypolicy.py scan.py >+PY_FILES=fs_util.py deleteProfile.py haldump.py __init__.py sendProfile.py smoltGui.py smolt.py software.py smoltFirstBoot.py gui.py privacypolicy.py scan.py > DIRED_MO_FILES=$(patsubst po/%.mo,mo/%/LC_MESSAGES/$(NAME).mo,$(MO_FILES)) >-CLIENT_FILES=deleteProfile.py gui.py haldump.py i18n.py privacypolicy.py sendProfile.py smolt.py smoltGui.py software.py scan.py >+CLIENT_FILES=fs_util.py deleteProfile.py gui.py haldump.py i18n.py privacypolicy.py sendProfile.py smolt.py smoltGui.py software.py scan.py > > > NAME=smolt >@@ -31,39 +31,14 @@ > .PHONY: install move-mo isnstall-main post-install monkey > install-main: move-mo > mkdir -p $(ETC)/smolt/ >- mkdir -p $(BINDIR)/ > mkdir -p $(DATADIR)/locale/ >- mkdir -p $(DATADIR)/man/man1 > > cp -advr mo/* $(DATADIR)/locale/ > cp -advr config.py $(SMOLTCONFIGDIR) > > install -d -m 0755 ./ $(DATADIR)/$(NAME)/client/ >- install -d -m 0755 icons/ $(DATADIR)/$(NAME)/client/icons/ > cp -adv $(CLIENT_FILES) $(DATADIR)/$(NAME)/client/ > >- >- mkdir -p $(DATADIR)/icons/hicolor/16x16/apps/ >- mkdir -p $(DATADIR)/icons/hicolor/22x22/apps/ >- mkdir -p $(DATADIR)/icons/hicolor/24x24/apps/ >- mkdir -p $(DATADIR)/icons/hicolor/32x32/apps/ >- >- cp ./icons/smolt-icon-16.png $(DATADIR)/icons/hicolor/16x16/apps/smolt.png >- cp ./icons/smolt-icon-22.png $(DATADIR)/icons/hicolor/22x22/apps/smolt.png >- cp ./icons/smolt-icon-24.png $(DATADIR)/icons/hicolor/24x24/apps/smolt.png >- cp ./icons/smolt-icon-32.png $(DATADIR)/icons/hicolor/32x32/apps/smolt.png >- >- mkdir -p $(DATADIR)/$(NAME)/doc >- install -p -m 0644 ../doc/PrivacyPolicy $(DATADIR)/$(NAME)/doc >- >- gzip -9 man/smoltSendProfile.1 > $(DATADIR)/man/man1/smoltSendProfile.1.gz >- gzip -9 man/smoltDeleteProfile.1 > $(DATADIR)/man/man1/smoltDeleteProfile.1.gz >- gzip -9 man/smoltGui.1 > $(DATADIR)/man/man1/smoltGui.1.gz >- >- ln -sf $(DATADIR)/$(NAME)/client/sendProfile.py $(BINDIR)/smoltSendProfile >- ln -sf $(DATADIR)/$(NAME)/client/deleteProfile.py $(BINDIR)/smoltDeleteProfile >- ln -sf $(DATADIR)/$(NAME)/client/smoltGui.py $(BINDIR)/smoltGui >- > chmod +x $(DATADIR)/$(NAME)/client/*Profile.py > chmod +x $(DATADIR)/$(NAME)/client/smoltGui.py > >@@ -79,9 +54,7 @@ > > post-install: install-main > >- mkdir -p $(ETC)/init.d/ > mkdir -p $(ETC)/cron.d/ >- cp -adv smolt-init $(ETC)/init.d/smolt > cp -adv smolt.cron.monthly $(ETC)/cron.d/smolt > > uuid: >--- org/makeuuid.py 2008-03-08 18:57:57.000000000 +0100 >+++ client/makeuuid.py 2008-11-12 15:01:59.000000000 +0100 >@@ -37,6 +37,15 @@ > help=_('generate a public key')) > > (opts, args) = parser.parse_args() >+ >+def generate_uuid(public=False): >+ try: >+ uuid = file('/proc/sys/kernel/random/uuid').read().strip() >+ if public: >+ uuid = "pub_" + uuid >+ return uuid >+ except IOError: >+ raise UUIDError("Cannot generate UUID") > > if __name__ == "__main__": > try: >@@ -56,12 +65,3 @@ > except IOError: > sys.stderr.write('Unable to determine UUID of system!\n') > sys.exit(1) >- >-def generate_uuid(public=False): >- try: >- uuid = file('/proc/sys/kernel/random/uuid').read().strip() >- if public: >- uuid = "pub_" + uuid >- return uuid >- except IOError: >- raise UUIDError("Cannot generate UUID") >--- org/sendProfile.py 2008-03-08 18:57:57.000000000 +0100 >+++ client/sendProfile.py 2008-11-22 17:36:21.000000000 +0100 >@@ -32,6 +32,7 @@ > import smolt > from smolt import debug > from smolt import error >+from smolt import get_config_attr > from scan import scan, rating > > parser = OptionParser(version = smolt.smoltProtocol) >@@ -197,8 +198,19 @@ > if pub_uuid: > pubUrl = smolt.get_profile_link(opts.smoonURL, pub_uuid) > print _('To share your profile: \n\t%s (public)') % pubUrl >+ hw_uuid_file = get_config_attr("HW_PUBID", "/etc/sysconfig/hw-uuid.pub") >+ hw_uuid_pub = os.path.basename(pubUrl) >+ try: >+ file(hw_uuid_file, 'w').write(hw_uuid_pub) >+ except Exception, e: >+ sys.stderr.write(_('Was unable to save this UUID into hw-uuid.pub.\n')) > if not smolt.secure: > print _('\tAdmin Password: %s') % admin >+ hw_admin_file = get_config_attr("HW_ADMIN", "/etc/sysconfig/hw-admin") >+ try: >+ file(hw_admin_file, 'w').write(admin) >+ except Exception, e: >+ sys.stderr.write(_('Was unable to save the admin password into hw-admin.\n')) > else: > print _('No Public UUID found! Please re-run with -n to generate a new public uuid') > >--- org/smoltGui.py 2008-03-08 18:57:57.000000000 +0100 >+++ client/smoltGui.py 2008-11-21 18:07:05.000000000 +0100 >@@ -129,7 +129,12 @@ > vpaned.pack2(self.device_table.get(), resize = True, shrink = True) > > def mysmolt_cb(self, *extra): >- webbrowser.open(urljoin(smolt.smoonURL, '/show?uuid=%s' % self.profile.host.UUID)) >+ try: >+ hw_uuid_file = smolt.get_config_attr("HW_PUBID", "/etc/smolt/hw-uuid.pub") >+ UUID = file(hw_uuid_file).read().strip() >+ webbrowser.open(urljoin(smolt.smoonURL, '/show?uuid=%s' % UUID)) >+ except IOError: >+ sys.stderr.write(_('Unable to determine public UUID of system!\n')) > > def quit_cb(self, *extra): > '''Quit the program.'''
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 248396
:
173006
| 173011 |
173015
|
173018
|
173589
|
176252
|
180804
|
180808