Bug 890568

Summary: PRD33 - [RFE] Branding as external package
Product: Red Hat Enterprise Virtualization Manager Reporter: Alon Bar-Lev <alonbl>
Component: ovirt-engineAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aburden, acathrow, adahms, awels, bazulay, ecohen, iheim, istein, jduncan, jkt, lpeer, mgoldboi, pnovotny, pstehlik, Rhev-m-bugs, shtripat, talayan, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: 3.3.0Flags: sgrinber: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ux
Fixed In Version: is2 Doc Type: Enhancement
Doc Text:
This feature provides support for a branding configuration file that allows administrators to configure the look and feel of Red Hat Enterprise Virtualization, including branding, and override certain text displayed to end users. With this feature, administrators can now install an external package that will override logos, titles and certain colors in the welcome page, Administration Portal and User Portal.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 17:12:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 816173, 1019470    

Description Alon Bar-Lev 2012-12-27 19:38:35 UTC
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.

Comment 1 Alon Bar-Lev 2013-02-14 05:21:27 UTC
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

Comment 4 Pavel Novotny 2013-07-08 10:52:26 UTC
Clearing needinfo flag, answered in comment#3.

Comment 5 Itamar Heim 2013-08-05 14:00:53 UTC
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.

Comment 6 Pavel Novotny 2013-09-03 09:34:14 UTC
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.

Comment 7 Charlie 2013-11-28 00:16:29 UTC
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.

Comment 9 errata-xmlrpc 2014-01-21 17:12:08 UTC
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