On 10/21/2013 03:36 PM, Johannes Renner wrote:
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
Hello Johannes,
I've discovered issue in 12ce0476ba547fade1cbe3819e77fd560de7fdb0 which
causes RPM build errors during build time.
RPM build errors:
File not found:
/root/rpmbuild/BUILDROOT/spacewalk-branding-2.1.5-1.git.233.e7a7524.el6.x86_64/var/www/html/css
File not found by glob:
/root/rpmbuild/BUILDROOT/spacewalk-branding-2.1.5-1.git.233.e7a7524.el6.x86_64/var/www/html/css/*
cp -pR css %{buildroot}/%{_var}/www/html/ copied whole css directory to
/%{_var}/www/html efectively making it /%{_var}/www/html/css.
cp -p css/*.css %{buildroot}/%{_var}/www/html/ takes matched files and
copies them into /%{_var}/www/html/ throwing away the fact they were
placed in css directory.
Sending you patch which fixes the problem.
Kind regards,
Tomáš Kašpárek
>From eb8b0ffa6ad994e7dee91f19ed60e87c7d9c1661 Mon Sep 17 00:00:00 2001
From: Tomas Kasparek <tkaspa...@redhat.com>
Date: Tue, 22 Oct 2013 12:53:28 +0200
Subject: [PATCH] copy files matched by glob to /%{_var}/www/html/css instead
of /%{_var}/www/html
cp -pR css %{buildroot}/%{_var}/www/html/ copied whole css directory to
/%{_var}/www/html efectively making it /%{_var}/www/html/css
cp -p css/*.css %{buildroot}/%{_var}/www/html/ takes matched files and copies them
into /%{_var}/www/html/ throwing away the fact they were placed in css directory
---
branding/spacewalk-branding.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/branding/spacewalk-branding.spec b/branding/spacewalk-branding.spec
index c01e197..8407009 100644
--- a/branding/spacewalk-branding.spec
+++ b/branding/spacewalk-branding.spec
@@ -42,6 +42,7 @@ lessc css/spacewalk.less > css/spacewalk.css
%install
rm -rf %{buildroot}
install -d -m 755 %{buildroot}%{_var}/www/html
+install -d -m 755 %{buildroot}%{_var}/www/html/css
install -d -m 755 %{buildroot}%{_datadir}/spacewalk
install -d -m 755 %{buildroot}%{_datadir}/spacewalk/web
install -d -m 755 %{buildroot}%{_datadir}/spacewalk/web/nav
@@ -49,7 +50,7 @@ install -d -m 755 %{buildroot}%{_datadir}/rhn/lib/
install -d -m 755 %{buildroot}%{_var}/lib/%{tomcat}/webapps/rhn/WEB-INF/lib/
install -d -m 755 %{buildroot}/%{_sysconfdir}/rhn
install -d -m 755 %{buildroot}/%{_prefix}/share/rhn/config-defaults
-cp -p css/*.css %{buildroot}/%{_var}/www/html/
+cp -p css/*.css %{buildroot}/%{_var}/www/html/css
cp -pR img %{buildroot}/%{_var}/www/html/
# Appplication expects two favicon's for some reason, copy it so there's just
# one in source:
--
1.8.3.1
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel