Bug 812688

Summary: The %post in the specfile generated by Skynet is wrong
Product: [Community] PressGang CCMS Reporter: Misty Stanley-Jones <misty>
Component: Web-UIAssignee: Matthew Casperson <mcaspers>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.xCC: cbredesen, lcarlon, lnewson, rlandman, topic-tool-list
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-30 22:51:55 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:
Attachments:
Description Flags
Script for post processing none

Description Misty Stanley-Jones 2012-04-16 00:12:14 UTC
Skynet currently generates a specfile with a %post statement that looks like this:


%post -n %{doc_product}-%{doc_books}-%{doc_version}-web-%{doc_lang}
%{__perl} -e 'foreach my $book (@books) { system(q|publican update_db --add --lang="%{doc_lang}" --formats="html" --product="%{doc_product}" --version="%{doc_version}" --name="$book" --subtitle="%{doc_product} %{doc_version} documentation" --abstract="Unported %{doc_product} %{doc_version} HTML documentation."|);}'


When we build a book with this, the book stages fine but is not added to the Publican TOC. Rudi hand-wrote a %post that works properly, but I'm unsure the best way to get it integrated into the build process without breaking every other product which needs to build:

%post -n JBoss_Enterprise_Application_Platform-Beta_Documentation-6-web-en-US
publican update_db --add --lang="en-US" --formats="html" --name="Beta_Documentation" --version="6" --product="JBoss_Enterprise_Application_Platform" --subtitle="Consolidated documentation suite for JBoss Enterprise Application Platform 6 Beta" --abstract="This Beta Documentation  release consolidates all available documentation for the JBoss Enterprise Application Platform 6 Beta into a single canonical document."   

In fact, Rudi's script fixes (by brute force) a lot of potential build problems. We need to look at what his script is doing and do it within Skynet itself, based on per-product properties (I think).

Comment 1 Misty Stanley-Jones 2012-04-16 00:12:48 UTC
Rudi, can you please attach the latest iteration of your script?

Comment 2 Ruediger Landmann 2012-04-16 00:57:03 UTC
Created attachment 577608 [details]
Script for post processing

Comment 3 Ruediger Landmann 2012-04-16 00:58:34 UTC
This is fragile, contains many assumptions, and is potentially dangerous. Please regard as highly suspect.

Comment 4 Matthew Casperson 2012-04-19 05:44:19 UTC
I'll update the brand to include a tree view generated from the standard Docbook TOC. This way the book scan just be regular publican projects, and we can avoid custom build scripts.

Comment 5 Lee Newson 2012-05-30 22:51:55 UTC
The new version of the builder has been live for a couple of weeks now and no longer uses the custom scripts as described by Matt above. As such I'm gonna close this bug as it's no longer relevant.