Re: [Spacewalk-devel] Python Oracle tests up and running
Flavio Castelli wrote: % These patches are pretty similar to the ones I sent some weeks ago covering the % PostgreSQL tests. % % All the Oracle tests are running fine either by invoking the `runtests-oracle.py` % directly or by using nosetests. Hello Flavio, I've reviewed and commited your pathces. Thanks. -- Michael Mráka Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] Proposal to remove filesystem dependencies from ConfigTest
Hello Silvio, ConfigTest at the moment relies on some config files to be in a fixed filesystem path (/usr/share/rhn/unit-tests/conf). This can be inconvenient because, among other things, writing to /usr requires root access. These config files are packaged within spacewalk-java-tests rpm: # rpm -ql spacewalk-java-tests | grep conf /usr/share/rhn/unit-tests/conf /usr/share/rhn/unit-tests/conf/default /usr/share/rhn/unit-tests/conf/default/bug154517.conf.rpmsave /usr/share/rhn/unit-tests/conf/default/rhn_prefix.conf /usr/share/rhn/unit-tests/conf/default/rhn_web.conf /usr/share/rhn/unit-tests/conf/rhn.conf but if you're running the tests from /usr/share/rhn/lib/rhn-test.jar using the /usr/share/rhn/unittest.xml, you shall have it already installed. The attached patch proposes a self-contained solution where those files are taken from either the classes directory or the jar file, copied in /tmp and read from there. What is the reason you'd like have them in /tmp? I suppose the config files are used just for reading, so the current directory might be ok. Regards, -- Tomas Lestach Red Hat Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Less compiler package to use
Hello, While working on the Spacewalk redesign, we so far used less.js client-side. This is fine for development purposes, but it's however not the recommended way to go for production environments, see [1]. Rather we probably want to compile the spacewalk.less into spacewalk.css during the rpm build of spacewalk-branding. This means: 'BuildRequire' a less compiler, call it during build and install only the compiled *.css onto the server. Now, since I would want to modify the .spec of spacewalk-branding accordingly, my question is the following: Do you have any preference of a specific compiler package to use? It would be good if we use a package that either already exists, or does not have many dependencies, so it is easy to build for all of the relevant distributions. The most valuable options as far as I can see are: - nodejs-less (there is nodejs-less in fedora, but it depends on nodejs, of course) - lesscss-engine (Java wrapper around less.js, no dependency on nodejs) - install less as ruby gem (requires ruby, I didn't test this one) - python-lesscpy (re-implementation based on Python Lex-Yacc, fails for our current .less) Let me know what you think, especially tell me if I am missing any other good options here. I personally would go for lesscss-engine: It's based on less.js and it needs only rhino and some jakarta commons libs. We build it for openSUSE already, see [2]. Thanks and regards, Johannes [1] http://lesscss.org/#usage [2] https://build.opensuse.org/package/show/home:dmacvicar/lesscss-engine -- SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] Less compiler package to use
Johannes Renner wrote: % Hello, % % While working on the Spacewalk redesign, we so far used less.js client-side. This is fine for % development purposes, but it's however not the recommended way to go for production environments, % see [1]. Rather we probably want to compile the spacewalk.less into spacewalk.css during the rpm % build of spacewalk-branding. This means: 'BuildRequire' a less compiler, call it during build and % install only the compiled *.css onto the server. % % Now, since I would want to modify the .spec of spacewalk-branding accordingly, my question is the % following: Do you have any preference of a specific compiler package to use? It would be good if % we use a package that either already exists, or does not have many dependencies, so it is easy to % build for all of the relevant distributions. % % The most valuable options as far as I can see are: % % - nodejs-less (there is nodejs-less in fedora, but it depends on nodejs, of course) % - lesscss-engine (Java wrapper around less.js, no dependency on nodejs) % - install less as ruby gem (requires ruby, I didn't test this one) % - python-lesscpy (re-implementation based on Python Lex-Yacc, fails for our current .less) Hello Johannes, nodejs-less and python-lesscpy are already available both in Fedora and RHEL (via EPEL) so we prefer one of these. % Let me know what you think, especially tell me if I am missing any other good options here. % I personally would go for lesscss-engine: It's based on less.js and it needs only rhino and % some jakarta commons libs. We build it for openSUSE already, see [2]. % % Thanks and regards, % Johannes Regards, -- Michael Mráka Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] Less compiler package to use
On 10/21/2013 01:06 PM, Michael Mraka wrote: Johannes Renner wrote: % Hello, % % While working on the Spacewalk redesign, we so far used less.js client-side. This is fine for % development purposes, but it's however not the recommended way to go for production environments, % see [1]. Rather we probably want to compile the spacewalk.less into spacewalk.css during the rpm % build of spacewalk-branding. This means: 'BuildRequire' a less compiler, call it during build and % install only the compiled *.css onto the server. % % Now, since I would want to modify the .spec of spacewalk-branding accordingly, my question is the % following: Do you have any preference of a specific compiler package to use? It would be good if % we use a package that either already exists, or does not have many dependencies, so it is easy to % build for all of the relevant distributions. % % The most valuable options as far as I can see are: % % - nodejs-less (there is nodejs-less in fedora, but it depends on nodejs, of course) % - lesscss-engine (Java wrapper around less.js, no dependency on nodejs) % - install less as ruby gem (requires ruby, I didn't test this one) % - python-lesscpy (re-implementation based on Python Lex-Yacc, fails for our current .less) Hello Johannes, nodejs-less and python-lesscpy are already available both in Fedora and RHEL (via EPEL) so we prefer one of these. Fine, I modified the .spec file of spacewalk-branding to depend on nodejs-less. We just pushed the branch to the upstream repo and it would be really nice if someone of you could review my commits and maybe even try out if the package builds correctly? I'm talking about these commits: - cb3d206cf8c46f6afaccb03fb2060da16ab45ed8 - 12ce0476ba547fade1cbe3819e77fd560de7fdb0 Thank you, Johannes -- SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] Add support for enhances weak dependency
Hi, just found out that we forgot one rpm weak dependency. Enhances is a waek version of Supplements and is heavyly used at SUSE. 4 patches add the support for it to 001: spacewalk-backend 002: java (taskomatic) 003: web 004: schema Patch 005 remove all cached metadata and trigger a regeneration for all channels. Feel free to skip this patch if you think that this is not needed. -- 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: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg) From 6e249cd0e501de5f6efb00c4efb4680ad16f19ec Mon Sep 17 00:00:00 2001 From: Michael Calmer m...@suse.de Date: Fri, 18 Oct 2013 13:47:55 +0200 Subject: [PATCH 1/5] add support for enhances rpm weak dependencies (backend) (bnc#846436) --- backend/satellite_tools/exporter/exportLib.py| 2 ++ backend/satellite_tools/spacewalk-remove-channel | 1 + backend/satellite_tools/xmlSource.py | 5 + backend/server/importlib/backend.py | 1 + backend/server/importlib/backendOracle.py| 10 ++ backend/server/importlib/headerSource.py | 16 +--- backend/server/importlib/importLib.py| 1 + backend/server/importlib/mpmSource.py| 1 + backend/server/importlib/packageImport.py| 6 +++--- backend/server/repomd/domain.py | 1 + backend/server/repomd/mapper.py | 14 ++ backend/server/repomd/view.py| 4 backend/server/rhnChannel.py | 17 - 13 files changed, 72 insertions(+), 7 deletions(-) diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py index 5e14af2..aeb1c08 100644 --- a/backend/satellite_tools/exporter/exportLib.py +++ b/backend/satellite_tools/exporter/exportLib.py @@ -839,6 +839,8 @@ class _PackageDumper(BaseRowDumper): 'rhn-package-suggests-entry'], ['rhnPackageSupplements', 'rhn-package-supplements', 'rhn-package-supplements-entry'], +['rhnPackageEnhances', 'rhn-package-enhances', +'rhn-package-enhances-entry'], ] for table_name, container_name, entry_name in mappings: h = rhnSQL.prepare( diff --git a/backend/satellite_tools/spacewalk-remove-channel b/backend/satellite_tools/spacewalk-remove-channel index 53fd3d9..f3b5d2e 100755 --- a/backend/satellite_tools/spacewalk-remove-channel +++ b/backend/satellite_tools/spacewalk-remove-channel @@ -488,6 +488,7 @@ def _delete_rpm_group(packageIds): 'rhnPackageRecommends', 'rhnPackageSuggests', 'rhnPackageSupplements', +'rhnPackageEnhances', 'rhnServerNeededCache', ] deleteStatement = delete from %s where package_id = :package_id diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py index 81fd3a5..6ce2c3d 100644 --- a/backend/satellite_tools/xmlSource.py +++ b/backend/satellite_tools/xmlSource.py @@ -603,6 +603,7 @@ class PackageItem(IncompletePackageItem): 'rhn-package-recommends': 'recommends', 'rhn-package-suggests' : 'suggests', 'rhn-package-supplements' : 'supplements', +'rhn-package-enhances' : 'enhances', 'rhn-package-changelog' : 'changelog', } tagMap.update(IncompletePackageItem.tagMap) @@ -686,6 +687,10 @@ class SupplementsItem(DependencyItem): item_name = 'rhn-package-supplements-entry' addItem(SupplementsItem) +class EnhancesItem(DependencyItem): +item_name = 'rhn-package-enhances-entry' +addItem(EnhancesItem) + class FileItem(BaseChecksummedItem): item_name = 'rhn-package-file' item_class = importLib.File diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py index f907794..797079b 100644 --- a/backend/server/importlib/backend.py +++ b/backend/server/importlib/backend.py @@ -732,6 +732,7 @@ class Backend: 'rhnPackageRecommends': 'package_id', 'rhnPackageSuggests': 'package_id', 'rhnPackageSupplements':'package_id', +'rhnPackageEnhances' :'package_id', 'rhnPackageFile': 'package_id', 'rhnPackageChangeLogRec': 'package_id', } diff --git a/backend/server/importlib/backendOracle.py b/backend/server/importlib/backendOracle.py index acca10f..604192c 100644 --- a/backend/server/importlib/backendOracle.py +++ b/backend/server/importlib/backendOracle.py @@ -100,6 +100,16 @@ class OracleBackend(Backend): attribute = 'supplements', map = {