Red Hat Bugzilla – Bug 890568
PRD33 - [RFE] Branding as external package
Last modified: 2015-09-22 09:09 EDT
CURRENT IMPLEMENTATION Downstream (rhevm) rebrand product using patch series that modifies upstream files. Then rhsm rebrand product again, using patch series that modified downstream files. PROBLEMS IN CURRENT IMPLEMENTATION Overriding/patching files for branding breaks the branding often as code changes without considering the branding requirements. Overriding/patching files makes it difficult to brand the product to other various brands, such as customer specific branding. PROPOSED SOLUTION Support branding configuration file. This can be a simple properties file to refer to branding resources: images, css, html includes, strings. A search path will be applied, upstream is at end of list. Example: /etc/ovirt-engine/branding/default.properties -> rhevm.properties /etc/ovirt-engine/branding/rhevm.properties /etc/ovirt-engine/branding/ovirt-engine.properties Search path: /etc/ovirt-engine/branding/default.properties /etc/ovirt-engine/branding/ovirt-engine.properties A branding package rhevm-branding should contain all resources and property file. At %post it can have something like that to apply it as default: [ -r /etc/ovirt-engine/branding/default.properties ] || \ ln -s %{name}.properties /etc/ovirt-engine/branding/default.properties BOTTOM LINE No branding patches, application should support branding.
Summary of discussion with Alexander Wels. We require branding inheritance so that we can change selected resources. Branding location: /etc/ovirt-engine/branding/@PROFILES@ Logic: You read all directories under /etc/ovirt-engine/branding Sort by name. Construct search path based on list. Example: /etc/ovirt-engine/branding/01-user/logo.png /etc/ovirt-engine/branding/50-rhevm->/usr/share/ovirt-engine/branding/rhevm /etc/ovirt-engine/branding/99-default->/usr/share/ovirt-engine/branding/default In this case you fallback to /usr/share/ovirt-engine/branding/default only if /etc/ovirt-engine/branding is missing or empty, as the 99-default will be installed with the ovirt-engine package. Why we need to fallback? I think that it will be useful for development... not sure, we will revise this when actually construct the layout. Package should also contain string table that needs branding, not only html resources. Branding resources should be fetched using servlet, for example: /getBrandingResource?name=logo.png
Clearing needinfo flag, answered in comment#3.
This requires a release note that branding overlays may break on upgrades to newer minor versions. the branding will be stable when in z-stream mode for a minor version.
Verified in rhevm-3.3.0-0.18.master.el6ev (IS12). Support for downstream (RHEVM) branding is working in general. All new bugs found in this feature will be filed as a new bugzilla.
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag. Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information: * Cause: What actions or circumstances cause this bug to present. * Consequence: What happens when the bug presents. * Fix: What was done to fix the bug. * Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore') Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug. For further details on the Cause, Consequence, Fix, Result format please refer to: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks in advance.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-0038.html