Hello community, here is the log from the commit of package smolt for openSUSE:Factory checked in at Mon Aug 10 22:47:20 CEST 2009. -------- --- smolt/smolt.changes 2009-08-01 02:16:09.000000000 +0200 +++ smolt/smolt.changes 2009-08-08 04:24:54.000000000 +0200 @@ -1,0 +2,14 @@ +Fri Aug 7 22:58:49 UTC 2009 - cgoncalves@opensuse.org + +- smolt-1.3.2-unicode-all.patch: fix all known encoding issues +- smolt-1.3.2-cmd-version.patch: use clientVersion instead of + smoltProtocol + +------------------------------------------------------------------- +Fri Aug 7 01:14:47 UTC 2009 - cgoncalves@opensuse.org + +- split smolt package in smolt and smolt-gui +- add COPYING to smolt-gui +- do not package smoltFirstBoot.py (Red Hat stuff) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- smolt-1.3.2-unicode.patch New: ---- COPYING smolt-1.3.2-cmd-version.patch smolt-1.3.2-unicode-all.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smolt.spec ++++++ --- /var/tmp/diff_new_pack.qE9dl8/_old 2009-08-10 22:46:27.000000000 +0200 +++ /var/tmp/diff_new_pack.qE9dl8/_new 2009-08-10 22:46:27.000000000 +0200 @@ -20,20 +20,23 @@ Name: smolt Summary: Hardware Profiler Version: 1.3.2 -Release: 1 +Release: 2 License: GPL v2 or later Group: Hardware/Other Url: https://hosted.fedoraproject.org/projects/smolt/ Source0: %{name}-%{version}.tar.bz2 Source1: smolt.init +Source2: COPYING Patch1: smolt-1.1.1.1-desktop_file.patch Patch2: smolt-1.3-make_install.patch -Patch3: smolt-1.3.2-unicode.patch Patch4: smolt-1.3.2-smolt_page.patch +Patch5: smolt-1.3.2-unicode-all.patch +Patch6: smolt-1.3.2-cmd-version.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch -Requires: dbus-1-python python-urlgrabber cron python-qt4 python-simplejson +Requires: dbus-1-python python-urlgrabber cron python-simplejson BuildRequires: fdupes gettext update-desktop-files +Recommends: %{name}-gui PreReq: /bin/cat coreutils %description @@ -46,14 +49,32 @@ This package contains the smolt client +%package -n smolt-gui +Summary: Smolt GUI +License: GPL v3 or later +Group: Hardware/Other +Requires: %{name} = %{version} python-qt4 +Recommends: ksmolt + +%description -n smolt-gui +The smolt hardware profiler is a server-client system that does a +hardware scan against a machine and sends the results to a public +Fedora Project turbogears server. The sends are anonymous and should +not contain any private information other than the physical hardware +information and basic OS info. + +This package contains the smolt client gui + %prep %setup -q %patch1 %patch2 -%patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 cp %{S:1} . +cp %{S:2} . %build cd client/ @@ -66,6 +87,7 @@ ln -s %{_initrddir}/smolt %{buildroot}/%_bindir/rcsmolt touch %{buildroot}/%{_sysconfdir}/smolt/hw-uuid rm -rf %{buildroot}/usr/share/locale/sr@latin %{buildroot}/usr/share/locale/default +rm -rf %{buildroot}/usr/share/smolt/client/smoltFirstBoot.py popd %fdupes %{buildroot} %suse_update_desktop_file -G "Desktop Profiler" %name @@ -102,17 +124,45 @@ %defattr(-,root,root,-) %doc README GPL doc/* %dir %{_sysconfdir}/smolt +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/client +%dir %{_datadir}/%{name}/doc %ghost %{_sysconfdir}/smolt/hw-uuid %config(noreplace)%{_sysconfdir}/smolt/config.py -%{_bindir}/* +%{_bindir}/rcsmolt +%{_bindir}/smoltDeleteProfile +%{_bindir}/smoltSendProfile %config %{_sysconfdir}/cron.d/%{name} %{_initrddir}/%{name} -%{_datadir}/%{name} -%{_datadir}/icons/hicolor -%{_datadir}/applications/smolt.desktop +%{_datadir}/%{name}/client/__init__.py +%{_datadir}/%{name}/client/config.py +%{_datadir}/%{name}/client/deleteProfile.py +%{_datadir}/%{name}/client/fs_util.py +%{_datadir}/%{name}/client/gate.py +%{_datadir}/%{name}/client/i18n.py +%{_datadir}/%{name}/client/os_detect.py +%{_datadir}/%{name}/client/scan.py +%{_datadir}/%{name}/client/sendProfile.py +%{_datadir}/%{name}/client/smolt.py +%{_datadir}/%{name}/client/smolt_config.py +%{_datadir}/%{name}/client/software.py +%{_datadir}/%{name}/client/uuiddb.py +%{_datadir}/%{name}/doc/PrivacyPolicy %{_mandir}/man1/smoltDeleteProfile.1.gz -%{_mandir}/man1/smoltGui.1.gz %{_mandir}/man1/smoltSendProfile.1.gz %ghost /var/run/smolt_do_opensuse_run +%files -n smolt-gui +%defattr(-,root,root) +%doc COPYING +%dir %{_datadir}/%{name}/client/icons +%{_bindir}/smoltGui +%{_datadir}/icons/hicolor +%{_datadir}/applications/smolt.desktop +%{_datadir}/%{name}/client/gui.py +%{_datadir}/%{name}/client/smoltGui.py +%{_datadir}/%{name}/client/privacypolicy.py +%{_datadir}/%{name}/client/icons/* +%{_mandir}/man1/smoltGui.1.gz + %changelog ++++++ COPYING ++++++ ++++ 674 lines (skipped) ++++++ smolt-1.3.2-cmd-version.patch ++++++ diff --git a/client/smoltGui.py b/client/smoltGui.py index 914c4b8..f0bc7c0 100644 --- a/client/smoltGui.py +++ b/client/smoltGui.py @@ -319,7 +319,7 @@ class SmoltGui(QMainWindow): if __name__ == '__main__': dollar_zero_backup = sys.argv[0] - parser = OptionParser(version = smolt.smoltProtocol) + parser = OptionParser(version = smolt.clientVersion) parser.add_option('--config', dest = 'the_only_config_file', default = None, ++++++ smolt-1.3.2-unicode-all.patch ++++++ diff --git a/client/gui.py b/client/gui.py index 5a9b243..390857a 100644 --- a/client/gui.py +++ b/client/gui.py @@ -32,9 +32,9 @@ class MainTabWidget(QTabWidget): QTabWidget.__init__(self) if generalTab != None: - self.addTab(generalTab, unicode(_('General'), 'UTF-8')) + self.addTab(generalTab, _('General')) if distroTab != None: - self.addTab(distroTab, unicode(_('Distribution'), 'UTF-8')) + self.addTab(distroTab, _('Distribution')) class GeneralTab(QWidget): @@ -79,12 +79,12 @@ class HostTable: def set_profile(self, profile): self.profile = profile model = QStandardItemModel(0, 2, self.host_table) - model.setHeaderData(0, Qt.Horizontal, QVariant(unicode(_('Label'), 'UTF-8'))) - model.setHeaderData(1, Qt.Horizontal, QVariant(unicode(_('Data'), 'UTF-8'))) + model.setHeaderData(0, Qt.Horizontal, QVariant(_('Label'))) + model.setHeaderData(1, Qt.Horizontal, QVariant(_('Data'))) if self.profile: for label, data in self.profile.hostIter(): model.insertRow(0) - label = QStandardItem(unicode(label, 'UTF-8')) + label = QStandardItem(label) label.setEditable(False) data = QStandardItem(str(data)) data.setEditable(False) @@ -112,10 +112,10 @@ class DeviceTable: def set_profile(self, profile): self.profile = profile model = QStandardItemModel(0, 4, self.device_table) - model.setHeaderData(0, Qt.Horizontal, QVariant(unicode(_('Bus'), 'UTF-8'))) - model.setHeaderData(1, Qt.Horizontal, QVariant(unicode(_('Driver'), 'UTF-8'))) - model.setHeaderData(2, Qt.Horizontal, QVariant(unicode(_('Type'), 'UTF-8'))) - model.setHeaderData(3, Qt.Horizontal, QVariant(unicode(_('Description'), 'UTF-8'))) + model.setHeaderData(0, Qt.Horizontal, QVariant(_('Bus'))) + model.setHeaderData(1, Qt.Horizontal, QVariant(_('Driver'))) + model.setHeaderData(2, Qt.Horizontal, QVariant(_('Type'))) + model.setHeaderData(3, Qt.Horizontal, QVariant(_('Description'))) if self.profile: for VendorID, DeviceID, SubsysVendorID, SubsysDeviceID, Bus, \ Driver, Type, Description in self.profile.deviceIter(): diff --git a/client/i18n.py b/client/i18n.py index d14c761..4738951 100644 --- a/client/i18n.py +++ b/client/i18n.py @@ -39,4 +39,5 @@ except IndexError: locale.setlocale(locale.LC_ALL, 'C') t = gettext.translation('smolt', '/usr/share/locale/', fallback=True, languages='en_US') -_ = t.gettext +def _(str): + return unicode(t.gettext(str), 'UTF-8') diff --git a/client/smoltGui.py b/client/smoltGui.py index 7d5eff9..914c4b8 100644 --- a/client/smoltGui.py +++ b/client/smoltGui.py @@ -89,21 +89,21 @@ class SmoltGui(QMainWindow): ''' Main Window ''' QMainWindow.__init__(self) self.setMinimumSize(500, 600) - self.setWindowTitle(unicode(_('Smolt'), 'UTF-8')) + self.setWindowTitle(_('Smolt')) self.setWindowIcon(QIcon(os.path.join(CLIENT_PATH, 'icons', 'smolt.png'))) ''' Menu Bar ''' self.menuBar = self.menuBar() - self.fileMenu = self.menuBar.addMenu(unicode(_('&File'), 'UTF-8')) - self.helpMenu = self.menuBar.addMenu(unicode(_('&Help'), 'UTF-8')) + self.fileMenu = self.menuBar.addMenu(_('&File')) + self.helpMenu = self.menuBar.addMenu(_('&Help')) ''' Actions ''' - self.sendAction= QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'send-profile.png')), unicode(_('&Send Profile'), 'UTF-8'), self) - self.mySmoltPageAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'home.png')), unicode(_('&My Smolt Page'), 'UTF-8'), self) - self.exitAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'exit.png')), unicode(_('&Exit'), 'UTF-8'), self) - self.showPPAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'privacy.png')), unicode(_('Show &Privacy Policy'), 'UTF-8'), self) - self.aboutAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'smolt.png')), unicode(_('&About'), 'UTF-8'), self) - self.aboutQtAction = QAction(unicode(_("About &Qt"), 'UTF-8'), self) + self.sendAction= QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'send-profile.png')), _('&Send Profile'), self) + self.mySmoltPageAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'home.png')), _('&My Smolt Page'), self) + self.exitAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'exit.png')), _('&Exit'), self) + self.showPPAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'privacy.png')), _('Show &Privacy Policy'), self) + self.aboutAction = QAction(QIcon(os.path.join(CLIENT_PATH, 'icons', 'smolt.png')), _('&About'), self) + self.aboutQtAction = QAction(_("About &Qt"), self) ''' Fill Menus ''' self.fileMenu.addAction(self.sendAction) @@ -117,7 +117,7 @@ class SmoltGui(QMainWindow): self.helpMenu.addAction(self.aboutQtAction) ''' Tool Bar ''' - self.toolBar = self.addToolBar(unicode(_('Main Tool Bar'), 'UTF-8')) + self.toolBar = self.addToolBar(_('Main Tool Bar')) self.toolBar.setIconSize(QSize(24, 24)) self.toolBar.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.toolBar.addAction(self.sendAction) @@ -167,12 +167,12 @@ class SmoltGui(QMainWindow): self.host_table.set_profile(self._gather_thread.hardware) self.device_table.set_profile(self._gather_thread.hardware) self.distro_document = QTextDocument() - self.distro_document.setHtml(unicode(_('No distribution-specific data yet'), 'UTF-8')) + self.distro_document.setHtml(_('No distribution-specific data yet')) self.distroInfo.setDocument(self.distro_document) def _on_system_bus_error(self): self._on_gathering_completed() - QMessageBox(QMessageBox.Critical, unicode(_('Error'), 'UTF-8'), + QMessageBox(QMessageBox.Critical, _('Error'), self._gather_thread.error_message, QMessageBox.Ok, self).exec_() QCoreApplication.exit(1) @@ -235,21 +235,21 @@ class SmoltGui(QMainWindow): def _on_submission_failed(self): self._tear_progress_down(success=False) - QMessageBox(QMessageBox.Critical, unicode(_('Error', 'UTF-8')), - unicode(_('An error occurred while sending the data to the server.', 'UTF-8')), + QMessageBox(QMessageBox.Critical, _('Error'), + _('An error occurred while sending the data to the server.'), QMessageBox.Ok, self).exec_() def _on_submission_completed(self): self._tear_progress_down(success=True) url = smolt.get_profile_link(smolt.smoonURL, self._submit_thread.pub_uuid) admin_password = self._submit_thread.admin - QMessageBox(QMessageBox.Information, unicode(_('Profile Sent'), 'UTF-8'), - unicode(_('<b>Your profile was sent successfully!</b><br>\ + QMessageBox(QMessageBox.Information, _('Profile Sent'), + _('<b>Your profile was sent successfully!</b><br>\ <br>\ Your profiles is available online at:<br>\ <a href="%(url)s">%(url)s</a><br>\ <br>\ - Your profile admin password is:<br><i>%(password)s</i>'), 'UTF-8') % \ + Your profile admin password is:<br><i>%(password)s</i>') % \ {'url':url, 'password':admin_password}, QMessageBox.NoButton, self).exec_() @@ -267,8 +267,8 @@ class SmoltGui(QMainWindow): def showPP(self): ''' Show Privacy Policy ''' - self.privacyPolicy = QMessageBox(QMessageBox.NoIcon, unicode(_('Privacy Policy'), 'UTF-8'), - QString(unicode(privacypolicy.PRIVACY_POLICY, 'UTF-8')), QMessageBox.Close, self) + self.privacyPolicy = QMessageBox(QMessageBox.NoIcon, _('Privacy Policy'), + QString(privacypolicy.PRIVACY_POLICY), QMessageBox.Close, self) self.privacyPolicy.exec_() def about(self): @@ -281,19 +281,19 @@ class SmoltGui(QMainWindow): label = QLabel(self) label.setPixmap(QPixmap(os.path.join(CLIENT_PATH, 'icons' , 'smolt.png'))) - title = QString(unicode(_("<h3>Smolt Qt</h3>Version %(version)s<br/>"), 'UTF-8') % {'version':smolt.clientVersion}) - title.append(unicode(_("<br/>Smolt Qt is a Smolt GUI client to submit Smolt hardware profiles \ - to a Smoon server.<br/>"), 'UTF-8')) + title = QString(_("<h3>Smolt Qt</h3>Version %(version)s<br/>") % {'version':smolt.clientVersion}) + title.append(_("<br/>Smolt Qt is a Smolt GUI client to submit Smolt hardware profiles \ + to a Smoon server.<br/>")) - description = QString(unicode(_("<b>About Smolt:</b><br/>The smolt hardware profiler is a server-client \ + description = QString(_("<b>About Smolt:</b><br/>The smolt hardware profiler is a server-client \ system that does a hardware scan against a machine and sends the results \ to a public Fedora Project turbogears server. The sends are anonymous \ and should not contain any private information other than the physical \ - hardware information and basic OS info.<br/>"), 'UTF-8')) + hardware information and basic OS info.<br/>")) - authors = unicode(_("<b>Authors:</b><br/>Carlos Gonçalves <mail@cgoncalves.info>"), 'UTF-8') + authors = _("<b>Authors:</b><br/>Carlos Gonçalves <mail@cgoncalves.info>") - lbl = QLabel(unicode(_("%(title)s<br>\ + lbl = QLabel(_("%(title)s<br>\ %(description)s<br>\ %(authors)s<br>\ <br>\ @@ -301,7 +301,7 @@ class SmoltGui(QMainWindow): This program is free software; you can redistribute it and/or \ modify it under the terms of the GNU General Public License \ as published by the Free Software Foundation; either version 3 \ - of the License, or (at your option) any later version."), 'UTF-8') % \ + of the License, or (at your option) any later version.") % \ {'title':title, 'description':description, 'authors':authors}) lbl.setWordWrap(True) @@ -324,7 +324,7 @@ if __name__ == '__main__': dest = 'the_only_config_file', default = None, metavar = 'file.cfg', - help = unicode(_('specify the location of the (only) config file to use'), 'UTF-8')) + help = _('specify the location of the (only) config file to use')) (opts, args) = parser.parse_args() if opts.the_only_config_file != None: GateFromConfig(opts.the_only_config_file) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org