Bug 812688 - The %post in the specfile generated by Skynet is wrong
The %post in the specfile generated by Skynet is wrong
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Matthew Casperson
Depends On:
  Show dependency treegraph
Reported: 2012-04-15 20:12 EDT by Misty Stanley-Jones
Modified: 2014-08-04 18:26 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-30 18:51:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Misty Stanley-Jones 2012-04-15 20:12:14 EDT
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-15 20:12:48 EDT
Rudi, can you please attach the latest iteration of your script?
Comment 2 Ruediger Landmann 2012-04-15 20:57:03 EDT
Created attachment 577608 [details]
Script for post processing
Comment 3 Ruediger Landmann 2012-04-15 20:58:34 EDT
This is fragile, contains many assumptions, and is potentially dangerous. Please regard as highly suspect.
Comment 4 Matthew Casperson 2012-04-19 01:44:19 EDT
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 18:51:55 EDT
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.