Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-18 Thread Miroslav Suchy

Dne 15.4.2011 14:16, Michael Calmer napsal(a):

I have created  systemsmanagement:spacewalk:1.4 project in OBS

The repository URL is:

for openSUSE 11.4 (i586 and x86_64):
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.4/openSUSE_11.4/

for openSUSE Factory(i586 and x86_64):
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.4/openSUSE_Factory/

--


Super.
I will let you know if I will respin some 1.4 client package before 
final release.


Mirek

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-15 Thread Michael Calmer
Hi,

Am Donnerstag, 14. April 2011, 11:05:09 schrieb Miroslav Suchý:
 On 04/14/2011 10:27 AM, Michael Calmer wrote:

[...]

  When do you need to know the project name for 
  the announcement?
 
 It will be nice if you can provide me with url and project name soon
 (read as tomorrow, or at Monday) and you can build the packages later
 there. I will let you know at least one day before release.

I have created  systemsmanagement:spacewalk:1.4 project in OBS

The repository URL is:

for openSUSE 11.4 (i586 and x86_64):
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.4/openSUSE_11.4/

for openSUSE Factory(i586 and x86_64):
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.4/openSUSE_Factory/

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-15 Thread Jan Pazdziora
On Fri, Apr 15, 2011 at 01:31:41PM +0200, Michael Calmer wrote:
 Hi,
 
 Am Freitag, 8. April 2011, 14:49:30 schrieb Michael Calmer:
  Hi,
  
 
  rhn-client-tools:
 
 [...] 
  
  0003-modify-spec-file-to-build-on-SUSE.patch:
  Specfile work. Use SUSE rpm names and add some directories to the filelist 
  which does not exist on SUSE or does not exist during build.
 
 attached you can find a new version for this.

Pushed to master as 4f8ebf782cae9687c1cb7b779df159182b988a9d
and tagged as rhn-client-tools-1.5.3-1.

Thanks,

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-14 Thread Michael Calmer
Hi,

Am Dienstag, 12. April 2011, 21:49:48 schrieb Miroslav Suchy:
 Dne 8.4.2011 14:49, Michael Calmer napsal(a):
  I spend the last week to build the spacewalk client tools on openSUSE and
  create a project in openSUSE build service.
 
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk/
 
  It is based on current git master and I want to provide you the patches.
 
 Can I use it official announcement of Spacewalk 1.4 as repo for SUSE 
 clients? Or in another words: are you willing to maintain it.

Yes, I am willing to maintain it.
 
 And are you planing to update it against master more often (similar to 
 nightly) or want to update it just on every release of Spacewalk. If the 
 former is true, then it will be better to have another project which 
 will contains packages which are/will be release in Spacewalk release.

I think I will use systemsmanagement:spacewalk as master and will do more 
often an update to current git master. 

I want to create a subproject for 1.4 which should be based on SPACEWALK-1.4 
branch. 

Do you have a deadline for 1.4? When do you need to know the project name for 
the announcement?

-- 
MFG

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-12 Thread Miroslav Suchy

Dne 8.4.2011 14:49, Michael Calmer napsal(a):

I spend the last week to build the spacewalk client tools on openSUSE and
create a project in openSUSE build service.

  http://download.opensuse.org/repositories/systemsmanagement:/spacewalk/

It is based on current git master and I want to provide you the patches.


Can I use it official announcement of Spacewalk 1.4 as repo for SUSE 
clients? Or in another words: are you willing to maintain it.


And are you planing to update it against master more often (similar to 
nightly) or want to update it just on every release of Spacewalk. If the 
former is true, then it will be better to have another project which 
will contains packages which are/will be release in Spacewalk release.



BTW:
For those, who are unfamiliar with OBS. This is url of that project in OBS:
https://build.opensuse.org/project/show?project=systemsmanagement%3Aspacewalk


Mirek

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-11 Thread Miroslav Suchý
On 04/08/2011 05:10 PM, Michael Calmer wrote:
 Hi,
 
 Am Freitag, 8. April 2011, 14:49:30 schrieb Michael Calmer:
 Hi,


 0002-enhance-getOSVersionAndRelease-to-find-SUSE-distribu.patch:
 Add code to make _getOSVerionAndRelease work on SUSE
 
 This patch has a little typo. I have attached a fixed version.
 Sorry :-)

Committed.

Thanks for contributing.

-- 
Miroslav Suchy
Red Hat Satellite Engineering

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

I spend the last week to build the spacewalk client tools on openSUSE and 
create a project in openSUSE build service.

 http://download.opensuse.org/repositories/systemsmanagement:/spacewalk/

It is based on current git master and I want to provide you the patches.
Mainly I modified the specfile to get the different RPM names for SUSE in it.
Additionally the services got a SUSE specific specfile which is used, if the
package compiles on a SUSE distribution. 
If you prefer a LSB specfile which run on RedHat,Fedora and SUSE, please tell 
me. I will try to create one and I hope you can help to test them on Fedora 
and RedHat.

I will write a seperate mail for every package which hopefully helps to manage 
the answers and comments easier.

rhn-client-tools:

0001-get-hostname-on-not-RedHat-systems.patch:
On SUSE /etc/sysconfig/network is a directory and not a file which contains 
the hostname. So I added a check if it is a file and use the following code to 
find the hostname. Another special thing on SUSE is, that gethostbyname return 
only the (short) hostname, not the FQDN. Therefor I added a test, if hostname 
contains a .. If not, find the hostname using the socket class.

0002-enhance-getOSVersionAndRelease-to-find-SUSE-distribu.patch:
Add code to make _getOSVerionAndRelease work on SUSE

0003-modify-spec-file-to-build-on-SUSE.patch:
Specfile work. Use SUSE rpm names and add some directories to the filelist 
which does not exist on SUSE or does not exist during build.

0004-Check-if-system_id-has-changed.patch:
up2dateAuth.readCachedLogin() seems not to check, if the systemid has changed 
and the cache file is invalid. 

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 59d44ce683dbfc933baeec4bf92a4a415c225936 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 11:10:55 +0200
Subject: [PATCH 01/17] get hostname on not RedHat systems

Other Linux distributions may not have a file named /etc/sysconfig/network.
So we should check if it is a file and use the other methods to
find the hostname.
Additionally let's check if the found hostname contains a . .
If not, let's find the hostname by Route.
---
 .../src/up2date_client/hardware.py |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index ca80e5b..f299bc2 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -429,13 +429,13 @@ def findHostByRoute():
 except:
 s.close()
 continue
-
-# Override hostname with the one in /etc/sysconfig/network 
+
+# Override hostname with the one in /etc/sysconfig/network
 # for bz# 457953
-
-if os.access(/etc/sysconfig/network, os.R_OK):
+
+if  os.path.isfile(/etc/sysconfig/network) and os.access(/etc/sysconfig/network, os.R_OK):
 	networkinfo = open(/etc/sysconfig/network, r).readlines()
-	
+
 for info in networkinfo:
 if not len(info):
 continue
@@ -489,10 +489,11 @@ def read_network():
 
 
 if netdict['hostname'] == 'localhost.localdomain' or \
+. not in netdict['hostname'] or \
 netdict['ipaddr'] == 127.0.0.1:
 hostname, ipaddr = findHostByRoute()
 
-if netdict['hostname'] == 'localhost.localdomain':
+if netdict['hostname'] == 'localhost.localdomain' or . not in netdict['hostname']:
 netdict['hostname'] = hostname
 if netdict['ipaddr'] == 127.0.0.1:
 netdict['ipaddr'] = ipaddr
-- 
1.7.3.4

From 39a69260d0bafc78b3bb8c6dba7dd25031821893 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 11:12:46 +0200
Subject: [PATCH 03/17] modify spec file to build on SUSE

---
 client/rhel/rhn-client-tools/rhn-client-tools.spec |   45 +++-
 1 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index dfe8f5f..0a061a2 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -22,17 +22,30 @@ Requires: python-ethtool = 0.4
 %endif
 Requires: gnupg
 Requires: sh-utils
+%if 0%{?suse_version}
+Requires: dbus-1-python
+%else
 Requires: dbus-python
+%endif
 %if 0%{?fedora}  12 || 0%{?rhel}  5
 Requires: python-gudev
 Requires: python-hwdata
 %else
 Requires: hal = 0.5.8.1-52
 %endif
+%if 0%{?suse_version}

Re: [Spacewalk-devel] [PATCH] build rhn-client-tools on openSUSE

2011-04-08 Thread Michael Calmer
Hi,

Am Freitag, 8. April 2011, 14:49:30 schrieb Michael Calmer:
 Hi,
 
 
 0002-enhance-getOSVersionAndRelease-to-find-SUSE-distribu.patch:
 Add code to make _getOSVerionAndRelease work on SUSE

This patch has a little typo. I have attached a fixed version.
Sorry :-)

-- 
Regards,

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
From 4ea53dfc537e92fd870cd414fc901edb83f7d288 Mon Sep 17 00:00:00 2001
From: Michael Calmer m...@suse.de
Date: Mon, 4 Apr 2011 11:12:04 +0200
Subject: [PATCH 02/17] enhance getOSVersionAndRelease to find SUSE distributions

---
 .../src/up2date_client/up2dateUtils.py |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
index fc33ad1..f7d064f 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
@@ -32,11 +32,17 @@ else:
 osVersionRelease = (h['name'], h['version'], h['release'])
 return osVersionRelease
 else:
-raise up2dateErrors.RpmError(
-Could not determine what version of Red Hat Linux you \
-are running.\nIf you get this error, try running \n\n\
-\t\trpm --rebuilddb\n\n)
-
+for h in ts.dbMatch('Providename', distribution-release):
+osVersionRelease = (h['name'], h['version'], h['release'])
+# zypper requires a exclusive lock on the rpmdb. So we need
+# to close it here.
+ts.ts.closeDB()
+return osVersionRelease
+else:
+raise up2dateErrors.RpmError(
+Could not determine what version of Red Hat Linux you \
+are running.\nIf you get this error, try running \n\n\
+\t\trpm --rebuilddb\n\n)
 
 def getVersion():
 '''
-- 
1.7.3.4

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel