java/code java/README
by Justin Sherrill
java/README | 2 +-
java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit ff6d4bebf5d23f5c685790b1fc6ce2337bc83a54
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 23 22:43:36 2010 -0400
Revert "updating README"
This reverts commit 022d7b2646754232c3b677e94f80394e82ccb775.
diff --git a/java/README b/java/README
index 009be1a..afc4378 100644
--- a/java/README
+++ b/java/README
@@ -1,7 +1,7 @@
This tree contains the Spacewalk Java-based web component. It contains the
web ui, business and database layer.
-Makefile - NO LONGER USED, use tito available in fedora
+Makefile - NO LONGER USED, use tito
build.xml - The master ant build script to compile and setup the Java stack
buildconf - Contains build configuration files
code - This contains all of the Java code
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java b/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
index 4cb452b..e873225 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
@@ -50,7 +50,7 @@ class ErrataQueueWorker implements QueueWorker {
private Long orgId;
private TaskQueue parentQueue;
- !(Map row, Logger parentLogger) {
+ ErrataQueueWorker(Map row, Logger parentLogger) {
channelId = (Long) row.get("channel_id");
errataId = (Long) row.get("errata_id");
orgId = (Long) row.get("org_id");
@@ -170,7 +170,8 @@ class ErrataQueueWorker implements QueueWorker {
for (Iterator iter = results.iterator(); iter.hasNext();) {
Map row = (Map) iter.next();
Long serverId = (Long) row.get("server_id");
- Long convertedOrgId = (Long) row.get("org_id");
+ Long tmp = (Long) row.get("org_id");
+ Long convertedOrgId = new Long(tmp.longValue());
if (orgId == null) {
org = OrgFactory.lookupById(convertedOrgId);
}
14 years, 2 months
java/code java/README
by Justin Sherrill
java/README | 2 +-
java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 022d7b2646754232c3b677e94f80394e82ccb775
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 23 16:27:16 2010 -0400
updating README
diff --git a/java/README b/java/README
index afc4378..009be1a 100644
--- a/java/README
+++ b/java/README
@@ -1,7 +1,7 @@
This tree contains the Spacewalk Java-based web component. It contains the
web ui, business and database layer.
-Makefile - NO LONGER USED, use tito
+Makefile - NO LONGER USED, use tito available in fedora
build.xml - The master ant build script to compile and setup the Java stack
buildconf - Contains build configuration files
code - This contains all of the Java code
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java b/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
index e873225..4cb452b 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
@@ -50,7 +50,7 @@ class ErrataQueueWorker implements QueueWorker {
private Long orgId;
private TaskQueue parentQueue;
- ErrataQueueWorker(Map row, Logger parentLogger) {
+ !(Map row, Logger parentLogger) {
channelId = (Long) row.get("channel_id");
errataId = (Long) row.get("errata_id");
orgId = (Long) row.get("org_id");
@@ -170,8 +170,7 @@ class ErrataQueueWorker implements QueueWorker {
for (Iterator iter = results.iterator(); iter.hasNext();) {
Map row = (Map) iter.next();
Long serverId = (Long) row.get("server_id");
- Long tmp = (Long) row.get("org_id");
- Long convertedOrgId = new Long(tmp.longValue());
+ Long convertedOrgId = (Long) row.get("org_id");
if (orgId == null) {
org = OrgFactory.lookupById(convertedOrgId);
}
14 years, 2 months
3 commits - client/rhel
by Miroslav Suchý
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 28 ++++------
1 file changed, 13 insertions(+), 15 deletions(-)
New commits:
commit 3798d4c09df0b70447ca37b45f3f0b608a8c9de5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 17:05:58 2010 +0100
do not use reserved word type
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 6fe95bb..4c07373 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -250,12 +250,12 @@ def _clasify_class(device):
if subsystem =='scsi':
if device.get_devtype =='scsi_device':
- type = _get_scsi_dev_type(device)
- if type == 0 or type == 14:
+ dev_type = _get_scsi_dev_type(device)
+ if dev_type == 0 or dev_type == 14:
return 'HD'
- elif type == 1:
+ elif dev_type == 1:
return 'TAPE'
- elif type == 5:
+ elif dev_type == 5:
return 'CDROM'
else:
return 'OTHER'
commit 84cb380e0c2a994d083eac369c33e5f2d12c166e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 17:04:55 2010 +0100
remove dead code
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index a1976f2..6fe95bb 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -74,9 +74,6 @@ def get_devices():
pci_subsys = device.get_property('PCI_SUBSYS_ID')
if pci_subsys:
(result_item['prop3'], result_item['prop4']) = pci_subsys.split(':')
- elif subsystem =='scsi':
- if device.get_devtype =='scsi_device':
- type = _get_scsi_dev_type(device)
elif subsystem == 'usb':
if device.has_property('ID_VENDOR_ID'):
result_item['prop1'] = device.get_property('ID_VENDOR_ID')
commit 8b25dd50f45a1514e4c38b55df04f51578f4ce87
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 17:01:31 2010 +0100
group test on subsystem together, to create more readable code
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 7ac1ee3..a1976f2 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -45,6 +45,8 @@ def get_devices():
'class': _clasify_class(device),
'desc': _get_device_desc(device),
}
+ if result_item['driver'] is None:
+ result_item['driver'] = 'unknown'
if subsystem == 'block':
if device.has_property('ID_BUS'):
result_item['bus'] = device.get_property('ID_BUS')
@@ -65,15 +67,22 @@ def get_devices():
# result_item['prop1'] = ''
# This is interpreted as Logical. But what to do with it?
# result_item['prop2'] = ''
- if result_item['driver'] is None:
- result_item['driver'] = 'unknown'
- if subsystem == 'pci':
+ elif subsystem == 'pci':
pci_class = device.get_property('PCI_ID')
if pci_class:
(result_item['prop1'], result_item['prop2']) = pci_class.split(':')
pci_subsys = device.get_property('PCI_SUBSYS_ID')
if pci_subsys:
(result_item['prop3'], result_item['prop4']) = pci_subsys.split(':')
+ elif subsystem =='scsi':
+ if device.get_devtype =='scsi_device':
+ type = _get_scsi_dev_type(device)
+ elif subsystem == 'usb':
+ if device.has_property('ID_VENDOR_ID'):
+ result_item['prop1'] = device.get_property('ID_VENDOR_ID')
+ if device.has_property('ID_MODEL_ID'):
+ result_item['prop2'] = device.get_property('ID_MODEL_ID')
+
if device.has_property('ID_BUS') and device.get_property('ID_BUS') == 'scsi':
path = device.get_property('ID_PATH')
m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
@@ -81,14 +90,6 @@ def get_devices():
result_item['prop2'] = m.group(2) # DEV_ID
result_item['prop3'] = m.group(3) # DEV_CHANNEL
result_item['prop4'] = m.group(4) # DEV_LUN
- if subsystem =='scsi':
- if device.get_devtype =='scsi_device':
- type = _get_scsi_dev_type(device)
- if subsystem == 'usb':
- if device.has_property('ID_VENDOR_ID'):
- result_item['prop1'] = device.get_property('ID_VENDOR_ID')
- if device.has_property('ID_MODEL_ID'):
- result_item['prop2'] = device.get_property('ID_MODEL_ID')
result.append(result_item)
return result
14 years, 2 months
Changes to 'refs/tags/rhn-client-tools-0.9.6-1'
by Miroslav Suchý
Tag 'rhn-client-tools-0.9.6-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2010-03-23 15:50 +0000
Tagging package [rhn-client-tools] version [0.9.6-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-setup-0.9.2-1:
Justin Sherrill (1):
resigning spacewalk cert
Miroslav Suchý (10):
564352 - parse PRODUCT to get vendor and model
564352 - format string using %
564352 - read scsi devices
564352 - clasify printers
564352 - clasify printers and cdroms
564352 - report correct bus for block subsystem
564352 - fix syntax error
564352 - properly clasify scsi devices
564352 - populate optional items for usb devices
Automatic commit of package [rhn-client-tools] release [0.9.6-1].
---
branding/setup/spacewalk-public.cert | 6 -
client/rhel/rhn-client-tools/rhn-client-tools.spec | 5
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 58 ++++++++--
rel-eng/packages/rhn-client-tools | 2
4 files changed, 59 insertions(+), 12 deletions(-)
---
14 years, 2 months
client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 5 ++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 6424af29733524e2e466c39de4d98a763c1994e7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 16:50:22 2010 +0100
Automatic commit of package [rhn-client-tools] release [0.9.6-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 84a062e..567cd96 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 0.9.5
+Version: 0.9.6
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -240,6 +240,9 @@ make -f Makefile.rhn-client-tools test
%{_datadir}/applications/rhn_register.desktop
%changelog
+* Tue Mar 23 2010 Miroslav Suchy <msuchy(a)redhat.com> 0.9.6-1
+- 564352 - try to get from udev as much hw info as possible
+
* Mon Mar 22 2010 Miroslav Suchy <msuchy(a)redhat.com> 0.9.5-1
- 564352 - use gudev instead of hal if gudev is present
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 6043843..2c6713a 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.9.5-1 client/rhel/rhn-client-tools/
+0.9.6-1 client/rhel/rhn-client-tools/
14 years, 2 months
9 commits - client/rhel
by Miroslav Suchý
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py | 58 ++++++++--
1 file changed, 51 insertions(+), 7 deletions(-)
New commits:
commit 5a420638be55f710b47e3362a96d85818a2d159d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 16:47:41 2010 +0100
564352 - populate optional items for usb devices
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 10dbf9b..7ac1ee3 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -84,6 +84,11 @@ def get_devices():
if subsystem =='scsi':
if device.get_devtype =='scsi_device':
type = _get_scsi_dev_type(device)
+ if subsystem == 'usb':
+ if device.has_property('ID_VENDOR_ID'):
+ result_item['prop1'] = device.get_property('ID_VENDOR_ID')
+ if device.has_property('ID_MODEL_ID'):
+ result_item['prop2'] = device.get_property('ID_MODEL_ID')
result.append(result_item)
return result
commit eaac8154fea2139bfbfbddbb9f7e14b4df31625b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 16:37:07 2010 +0100
564352 - properly clasify scsi devices
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 92456a0..10dbf9b 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -261,6 +261,9 @@ def _clasify_class(device):
if m:
return 'PRINTER'
+ if subsystem == 'scsi':
+ return 'SCSI'
+
# Catchall for specific devices, only do this after all the others
if subsystem == 'pci' or subsystem == 'usb':
return 'OTHER'
commit 79da826a7b180e8cabf6ad5d8c40befbb164b2aa
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 15:52:39 2010 +0100
564352 - fix syntax error
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index ad2bdbc..92456a0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -276,12 +276,12 @@ def _get_device_desc(device):
if subsystem == 'pci':
(vendor_id, device_id) = device.get_property('PCI_ID').split(':')
pci = PCI()
- result = "%s|%s" % (pci.get_vendor(vendor_id) + '|' + pci.get_device(vendor_id, device_id))
+ result = "%s|%s" % (pci.get_vendor(vendor_id), pci.get_device(vendor_id, device_id))
elif subsystem == 'usb':
vendor_id = device.get_property('ID_VENDOR_ID')
if vendor_id:
usb = USB()
- result = "%s|%s" % (usb.get_vendor(vendor_id) + '|' + usb.get_device(vendor_id, device.get_property('ID_MODEL_ID')))
+ result = "%s|%s" % (usb.get_vendor(vendor_id), usb.get_device(vendor_id, device.get_property('ID_MODEL_ID')))
elif device.get_devtype() == 'usb_interface':
if device.get_driver() == 'usbhid':
result = 'USB HID Interface'
commit b592095dbad1e77400fc6de3f5ce2b99bfe70f56
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 15:49:27 2010 +0100
564352 - report correct bus for block subsystem
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index c281abc..ad2bdbc 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -46,6 +46,8 @@ def get_devices():
'desc': _get_device_desc(device),
}
if subsystem == 'block':
+ if device.has_property('ID_BUS'):
+ result_item['bus'] = device.get_property('ID_BUS')
result_item['device'] = device.get_name()
if device.get_devtype() == 'partition':
# do not report partitions, just whole disks
commit 84076a4552693a2c88d0f3d92f44fdc81f2f12ad
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 15:45:00 2010 +0100
564352 - clasify printers and cdroms
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index f752dd0..c281abc 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -83,7 +83,6 @@ def get_devices():
if device.get_devtype =='scsi_device':
type = _get_scsi_dev_type(device)
-
result.append(result_item)
return result
@@ -94,7 +93,6 @@ def get_computer_info():
'system.kernel.machine': 'i686'
'system.kernel.name': 'Linux'
"""
- #FIXME do we need to add smbios information?
uname = os.uname()
result = {
'system.kernel.name': uname[0],
@@ -221,6 +219,8 @@ def _clasify_class(device):
return 'SCSI'
elif sub_class == PCI_CLASS_STORAGE_RAID:
return 'RAID'
+ elif sub_class == PCI_CLASS_STORAGE_FLOPPY:
+ return 'FLOPPY'
elif base_class == PCI_BASE_CLASS_COMMUNICATION and sub_class == PCI_CLASS_COMMUNICATION_MODEM:
return 'MODEM'
elif base_class == PCI_BASE_CLASS_INPUT and sub_class == PCI_CLASS_INPUT_SCANNER:
@@ -235,10 +235,11 @@ def _clasify_class(device):
return 'SOCKET'
if subsystem == 'block':
- if device.has_property('ID_CDROM'):
+ if device.has_property('ID_CDROM') or (
+ device.has_property('ID_TYPE') and device.get_property('ID_TYPE') == 'cd'):
return 'CDROM'
else:
- return 'HD' #FIXME had to distinguis HD, FLOPY, TAPE and flash disks
+ return 'HD'
elif subsystem == 'sound':
return 'AUDIO'
commit 1aa0720cc06c087c6e974d89a49d86a2d25d5794
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 14:54:29 2010 +0100
564352 - clasify printers
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 10b2cd6..f752dd0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -254,7 +254,9 @@ def _clasify_class(device):
else:
return 'OTHER'
# PRINTER
- pass #FIXME
+ m = re.search('.*/lp\d+$', device.get_sysfs_path())
+ if m:
+ return 'PRINTER'
# Catchall for specific devices, only do this after all the others
if subsystem == 'pci' or subsystem == 'usb':
commit 8c87c3dae72dbd7c947aca955d47295e157d5efa
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 12:18:30 2010 +0100
564352 - read scsi devices
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index a5802a4..10b2cd6 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -33,7 +33,7 @@ def get_devices():
# listen to uevents on all subsystems
client = gudev.Client([""])
# FIX ME - change to None to list all devices once it is fixed in gudev
- devices = client.query_by_subsystem("pci") + client.query_by_subsystem("usb") + client.query_by_subsystem("block") + client.query_by_subsystem("ccw")
+ devices = client.query_by_subsystem("pci") + client.query_by_subsystem("usb") + client.query_by_subsystem("block") + client.query_by_subsystem("ccw") + client.query_by_subsystem("scsi")
result = []
for device in devices:
subsystem = device.get_subsystem()
@@ -79,6 +79,11 @@ def get_devices():
result_item['prop2'] = m.group(2) # DEV_ID
result_item['prop3'] = m.group(3) # DEV_CHANNEL
result_item['prop4'] = m.group(4) # DEV_LUN
+ if subsystem =='scsi':
+ if device.get_devtype =='scsi_device':
+ type = _get_scsi_dev_type(device)
+
+
result.append(result_item)
return result
@@ -237,6 +242,17 @@ def _clasify_class(device):
elif subsystem == 'sound':
return 'AUDIO'
+ if subsystem =='scsi':
+ if device.get_devtype =='scsi_device':
+ type = _get_scsi_dev_type(device)
+ if type == 0 or type == 14:
+ return 'HD'
+ elif type == 1:
+ return 'TAPE'
+ elif type == 5:
+ return 'CDROM'
+ else:
+ return 'OTHER'
# PRINTER
pass #FIXME
@@ -293,3 +309,12 @@ def _parse_pci_class(pci_class):
else:
return (pci_class[-6:-4], pci_class[-4:-2])
+def _get_scsi_dev_type(device):
+ """ Return SCSI type of device in raw format as presented in /sys/...devpath../type """
+ try:
+ f = open("%s/type" % device.get_sysfs_path(), 'r')
+ except IOError:
+ return -1
+ result = f.readline()
+ f.close()
+ return result
commit 3f19b04f71d015406aebbf41aed87fd34cfd21f2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 11:49:34 2010 +0100
564352 - format string using %
if model is not known we will get TypeError
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index 33b25d0..a5802a4 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -255,12 +255,12 @@ def _get_device_desc(device):
if subsystem == 'pci':
(vendor_id, device_id) = device.get_property('PCI_ID').split(':')
pci = PCI()
- result = pci.get_vendor(vendor_id) + '|' + pci.get_device(vendor_id, device_id)
+ result = "%s|%s" % (pci.get_vendor(vendor_id) + '|' + pci.get_device(vendor_id, device_id))
elif subsystem == 'usb':
vendor_id = device.get_property('ID_VENDOR_ID')
if vendor_id:
usb = USB()
- result = usb.get_vendor(vendor_id) + '|' + usb.get_device(vendor_id, device.get_property('ID_MODEL_ID'))
+ result = "%s|%s" % (usb.get_vendor(vendor_id) + '|' + usb.get_device(vendor_id, device.get_property('ID_MODEL_ID')))
elif device.get_devtype() == 'usb_interface':
if device.get_driver() == 'usbhid':
result = 'USB HID Interface'
@@ -273,7 +273,7 @@ def _get_device_desc(device):
# left pad it with 0 to 4 digits
vendor_id = '%.4x' % int(vendor_id, 16)
model_id = '%.4x' % int(model_id, 16)
- result = usb.get_vendor(vendor_id) + '|' + usb.get_device(vendor_id, device.get_property('ID_MODEL_ID'))
+ result = "%s|%s" % (usb.get_vendor(vendor_id), usb.get_device(vendor_id, device.get_property('ID_MODEL_ID')))
elif subsystem == 'block':
result = device.get_property('ID_MODEL')
if result:
commit dea1b88ce70fa49d6f7f12cd90026e59d90734f4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 23 12:48:01 2010 +0100
564352 - parse PRODUCT to get vendor and model
I find at least one usb printer which do not set vendor and model but has set product, which has needed information
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
index dfccbce..33b25d0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
@@ -268,6 +268,12 @@ def _get_device_desc(device):
result = 'USB Hub Interface'
else:
result = 'USB Interface'
+ elif device.get_devtype() == 'usb_device' and device.get_property('PRODUCT'):
+ (vendor_id, model_id) = device.get_property('product').split('/')[:2]
+ # left pad it with 0 to 4 digits
+ vendor_id = '%.4x' % int(vendor_id, 16)
+ model_id = '%.4x' % int(model_id, 16)
+ result = usb.get_vendor(vendor_id) + '|' + usb.get_device(vendor_id, device.get_property('ID_MODEL_ID'))
elif subsystem == 'block':
result = device.get_property('ID_MODEL')
if result:
14 years, 2 months
branding/setup
by Justin Sherrill
branding/setup/spacewalk-public.cert | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit e25e8d333126c2f76d1fcb5babddb8b957b36e66
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Tue Mar 23 09:56:42 2010 -0400
resigning spacewalk cert
diff --git a/branding/setup/spacewalk-public.cert b/branding/setup/spacewalk-public.cert
index 34fa29f..d7674be 100644
--- a/branding/setup/spacewalk-public.cert
+++ b/branding/setup/spacewalk-public.cert
@@ -15,9 +15,9 @@
-----BEGIN PGP SIGNATURE-----
Version: Crypt::OpenPGP 1.03
-iD8DBQBLlXyotGJPvuPojtERAiOyAJ9fB0kAoN75IvjJvucvRB7nPkJWzgCfRPgF
-ghRRGlQyDJFYxxKxZtbEGAE=
-=XEp6
+iQBGBAARAwAGBQJLqMhgAAoJEJ5yna8GlHkyrL4AoIrXT8ITy6MwGyOr5ev5LsmL
+ZAN9AKCOZ6vxkuSIl1ld5Mu7Hvwz8bgn2g==
+=OoMc
-----END PGP SIGNATURE-----
</rhn-cert-signature>
</rhn-cert>
14 years, 2 months
Changes to 'refs/tags/spacewalk-setup-0.9.2-1'
by Michael Mraka
Tag 'spacewalk-setup-0.9.2-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-03-23 09:59 +0000
Tagging package [spacewalk-setup] version [0.9.2-1] in directory [spacewalk/setup/].
Changes since rhn-client-tools-0.9.5-1:
Michael Mraka (2):
spacewalk-setup-jabberd relics
Automatic commit of package [spacewalk-setup] release [0.9.2-1].
Tomas Lestach (1):
test case fix for SystemHandlerTest
---
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java | 13
rel-eng/packages/spacewalk-setup | 2
spacewalk/setup/Makefile.PL | 3
spacewalk/setup/bin/spacewalk-setup-jabberd | 183 ----------
spacewalk/setup/spacewalk-setup.spec | 13
5 files changed, 15 insertions(+), 199 deletions(-)
---
14 years, 2 months
rel-eng/packages spacewalk/setup
by Michael Mraka
rel-eng/packages/spacewalk-setup | 2 +-
spacewalk/setup/spacewalk-setup.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit e4f9a08028e93bc1050e905406933b893c891173
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 23 10:59:30 2010 +0100
Automatic commit of package [spacewalk-setup] release [0.9.2-1].
diff --git a/rel-eng/packages/spacewalk-setup b/rel-eng/packages/spacewalk-setup
index 29d1129..dd21eed 100644
--- a/rel-eng/packages/spacewalk-setup
+++ b/rel-eng/packages/spacewalk-setup
@@ -1 +1 @@
-0.9.1-1 spacewalk/setup/
+0.9.2-1 spacewalk/setup/
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index 1a68fd3..f178741 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -1,5 +1,5 @@
Name: spacewalk-setup
-Version: 0.9.1
+Version: 0.9.2
Release: 1%{?dist}
Summary: Initial setup tools for Red Hat Spacewalk
@@ -95,6 +95,9 @@ rm -rf %{buildroot}
%{_datadir}/spacewalk/*
%changelog
+* Tue Mar 23 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.2-1
+- fixed packaging conflicts
+
* Fri Mar 19 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.1-1
- let's smile in Spacewalk 0.9
- 566124 - spacewalk-setup-jabberd splited from spacewalk-setup
14 years, 2 months
spacewalk/setup
by Michael Mraka
spacewalk/setup/Makefile.PL | 3
spacewalk/setup/bin/spacewalk-setup-jabberd | 183 ----------------------------
spacewalk/setup/spacewalk-setup.spec | 8 -
3 files changed, 1 insertion(+), 193 deletions(-)
New commits:
commit 9214d655249e7972c0b5857babd4fed7fbd0a4cf
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Mar 23 10:55:10 2010 +0100
spacewalk-setup-jabberd relics
(has been moved to independent package in 5f9d6fa189917df7722a20d9159967bf5125805c)
diff --git a/spacewalk/setup/Makefile.PL b/spacewalk/setup/Makefile.PL
index 5440217..b0b8061 100644
--- a/spacewalk/setup/Makefile.PL
+++ b/spacewalk/setup/Makefile.PL
@@ -8,13 +8,12 @@ WriteMakefile(
VERSION_FROM => 'lib/Spacewalk/Setup.pm',
ABSTRACT_FROM => 'lib/Spacewalk/Setup.pm',
PL_FILES => {},
- EXE_FILES => ['bin/spacewalk-setup', 'bin/spacewalk-setup-jabberd', 'bin/cobbler-setup', 'bin/spacewalk-make-mount-points'],
+ EXE_FILES => ['bin/spacewalk-setup', 'bin/cobbler-setup', 'bin/spacewalk-make-mount-points'],
PREREQ_PM => {
'Test::More' => 0,
},
MAN1PODS => { 'lib/Spacewalk/Setup.pm' => '$(INST_MAN1DIR)/spacewalk-setup.$(MAN1EXT)',
'bin/cobbler-setup' => '$(INST_MAN1DIR)/cobbler-setup.$(MAN1EXT)',
- 'bin/spacewalk-setup-jabberd' => '$(INST_MAN1DIR)/spacewalk-setup-jabberd.$(MAN1EXT)',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Spacewalk-Setup-*' },
diff --git a/spacewalk/setup/bin/spacewalk-setup-jabberd b/spacewalk/setup/bin/spacewalk-setup-jabberd
deleted file mode 100755
index 022db00..0000000
--- a/spacewalk/setup/bin/spacewalk-setup-jabberd
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (c) 2009 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-use Sys::Hostname;
-use Getopt::Long;
-
-use strict 'refs';
-use warnings;
-
-my $verbose = 0;
-my $macros = '';
-my $help = 0;
-my %macros = ('hostname' => Sys::Hostname::hostname());
-
-GetOptions("macros:s" => \$macros, "verbose" => \$verbose, "help" => \$help);
-
-if ($help) {
- print <<EOHELP;
-Usage: $0 --help | --verbose | --macros macros
-Options:
- --help Print this help message
- --verbose Verbose operation
- --macros Comma delimited list of macroname:macrovalue options
-EOHELP
-
- exit 0;
-}
-
-if ($macros) {
- foreach my $i (split(/,/, $macros, 0)) {
- my ($key, $value) = split(/:/, $i, 3);
- $macros{$key} = $value;
- }
-}
-
-foreach my $basename ('c2s', 's2s', 'sm') {
- my $configfile = "/etc/jabberd/$basename.xml";
- my $template = "/usr/share/spacewalk/setup/jabberd/$basename.xsl";
-
- {
- local $/ = undef;
-
- local *F;
- open F, $configfile or die "Error opening $configfile: $!\n";
- my $original = <F>;
- close F;
-
- print "Calling /usr/bin/xsltproc $template $configfile...\n" if $verbose;
- my $transformed = `/usr/bin/xsltproc $template $configfile`;
- die "There was an error running xsltproc\n" if $?;
-
- for my $key (keys %macros) {
- $transformed =~ s/\@$key\@/$macros{$key}/mg;
- }
-
- if ($transformed ne $original) {
- print "$configfile has been backed up to $configfile-swsave\n" if $verbose;
- system('cp', '-p', '--backup=numbered', $configfile, "$configfile-swsave");
-
- my @statistics = stat($configfile);
-
- open F, ">$configfile";
- print F $transformed;
- close F;
-
- chown $statistics[4], $statistics[5], $configfile;
- chmod 0640, $configfile;
- }
- elsif ($verbose) {
- print " No changes were made\n";
- }
- }
-
-}
-
-1;
-
-=head1 NAME
-
-spacewalk-setup-jabberd - utility for configuring jabberd services to work with
-Spacewalk / Satellite
-
-=head1 SYNOPSIS
-
-B<spacewalk-setup-jabberd>
-[B<--help>]
-[B<--verbose>]
-[B<--macros macro1:macro1value,macro2:macro2value...>]
-
-=head1 OPTIONS
-
-=over 5
-
-=item B<--macros>
-
-Specify macro names and corresponding macro values that will be used for
-substitution after document transformation. You can specify multiple
-macro:value pairs which you need to delimit by commas (example:
---macros hostname:host.domain.org,pemfile:/etc/pki/tls/certs/localhost.pem).
-
-=item B<--verbose>
-
-Verbose script operation.
-
-=item B<--help>
-
-Print help message.
-
-=back
-
-=head1 DESCRIPTION
-
-B<spacewalk-setup-jabberd> is utility for configuring jabbberd services to work
-with Spacewalk / Satellite. The script uses XSL transformations to change
-existing jabberd configuration files.
-
-Ordinarily, spacewalk-setup-jabberd is called by spacewalk-setup(1) during
-initial Spacewalk / Satellite configuration or upgrade.
-
-The script workflow is:
-
-=over 5
-
-=item
-
-Using xsltproc, apply appropriate XSL stylesheet to existing jabberd configuration
-file and read the transformed document.
-
-=item
-
-Substitute macros in transformed document (marked by two @ symbols, for example:
-@hostname@) with macro values (for example: host.domain.org).
-
-=item
-
-Resulting file is written out while the original file is backed up.
-
-=back
-
-=head1 FILES
-
-XSL stylesheets used for transformation of existing jabberd configuration files:
-
-F</usr/share/spacewalk/setup/jabberd/c2s.xsl>
-
-F</usr/share/spacewalk/setup/jabberd/s2s.xsl>
-
-F</usr/share/spacewalk/setup/jabberd/sm.xsl>
-
-Jabberd configuration files modified by spacewalk-setup-jabberd:
-
-F</etc/jabberd/c2s.xsl>
-
-F</etc/jabberd/s2s.xsl>
-
-F</etc/jabberd/sm.xsl>
-
-=head1 SEE ALSO
-
-B<spacewalk-setup>(1) - Spacewalk setup program
-
-B<xsltproc>(1) - command line XSLT processor
-
-B<c2s>(8), B<router>(8), B<s2s>(8), B<sm>(8) - jabberd components
-
-=head1 AUTHORS
-
-Milan Zazrivec
-
-=cut
diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec
index 9f62f4c..1a68fd3 100644
--- a/spacewalk/setup/spacewalk-setup.spec
+++ b/spacewalk/setup/spacewalk-setup.spec
@@ -65,13 +65,8 @@ install -m 0644 share/ssl.conf.6 %{buildroot}/%{_datadir}/spacewalk/setup/
install -m 0644 share/old-jvm-list %{buildroot}/%{_datadir}/spacewalk/setup/
install -d -m 755 %{buildroot}/%{_datadir}/spacewalk/setup/defaults.d/
install -d -m 755 %{buildroot}/%{_datadir}/spacewalk/setup/upgrade
-install -d -m 755 %{buildroot}/%{_datadir}/spacewalk/setup/jabberd
install -m 0755 share/upgrade/* %{buildroot}/%{_datadir}/spacewalk/setup/upgrade
install -m 0644 share/defaults.d/defaults.conf %{buildroot}/%{_datadir}/spacewalk/setup/defaults.d/
-install -m 0644 share/jabberd/* %{buildroot}/%{_datadir}/spacewalk/setup/jabberd/
-
-# jabberd ssl cert location
-install -d -m 755 %{buildroot}/%{_sysconfdir}/pki/spacewalk/jabberd
# Oracle specific stuff, possible candidate for sub-package down the road:
install -d -m 755 %{buildroot}/%{_datadir}/spacewalk/setup/oracle/
@@ -94,13 +89,10 @@ rm -rf %{buildroot}
%doc Changes README
%{perl_vendorlib}/*
%{_bindir}/spacewalk-setup
-%{_bindir}/spacewalk-setup-jabberd
%{_bindir}/spacewalk-make-mount-points
%{_bindir}/cobbler-setup
%{_mandir}/man[13]/*.[13]*
%{_datadir}/spacewalk/*
-%dir %{_sysconfdir}/pki/spacewalk
-%dir %{_sysconfdir}/pki/spacewalk/jabberd
%changelog
* Fri Mar 19 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.1-1
14 years, 2 months