Bug 812688 - The %post in the specfile generated by Skynet is wrong
Summary: The %post in the specfile generated by Skynet is wrong
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Matthew Casperson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 00:12 UTC by Misty Stanley-Jones
Modified: 2014-08-04 22:26 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-30 22:51:55 UTC
Embargoed:


Attachments (Terms of Use)
Script for post processing (5.23 KB, application/x-shellscript)
2012-04-16 00:57 UTC, Ruediger Landmann
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.