[katello-devel] Precompilation changes in katello.spec

Jason Rist jrist at redhat.com
Wed Jul 27 12:27:16 UTC 2011


On 07/27/2011 06:06 AM, Lukas Zapletal wrote:
> Hello,
> 
> I have slightly changed our spec file. It has few build requires now,
> but it precompiles our CSS files and assets using compass and jammit tools:
> 
> %build
> echo Compiling SASS files...
> compass compile
> 
> echo Generating Rails assets...
> jammit
> 
> There is no need of symlinks to /var/lib/katello for
> public/javascripts/compiled and public/assets directories. From now on
> Rails server should not compile any assets. That should mean no
> permission errors anymore.
> 
> I also disabled runtime compilation of CSS files in the configuration,
> because we will always distribute up-to-date files. In production.rb
> there is:
> 
> Sass::Plugin.options[:never_update] = true
> 
> line there.
> 
> Now I also recommend to drop support of development mode running from
> RPM. Since production and development modes are so different thank to
> asset deployment, we should only support production mode and tell users
> how to increase logging in the production mode if they want to. It could
> be done by adding line to production.rb file here:
> 
>   config.log_level = :debug
> 
> In the RPM we install this in the /etc/katello/environment.rb as a
> standard config file and symlink this.
> 
> I there are no objections I will remove the environment setting from the
> sysconfig.
> 
> Please note due to bug in rack 1.1.0 the katello service is not working.
> The only way to start it until we fix this is:
> 
> # cd /usr/lib/katello
> # su - katello -s /bin/bash -c "rails s -e production -p 3000"
> 
Awesome Lukas, this is very helpful.

Bryan - yes this minimizes and compresses CSS.

-J


-- 
Jason E. Rist
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.754.4048
Freenode: jrist




More information about the katello-devel mailing list