Hello folks,
I see there are some PRs for adding initial build directories for SUSE. When I try a make on the directory it fails with a minor issue:
make xsltproc --stringparam SHARED_RP "/root/ssg_sles/scap-security-guide/shared" -o output/shorthand.xml input/guide.xslt output/guide.xml XPath error : Invalid expression document('concat($SHARED_RP, '/xccdf/intro/shared_intro_os.xml')) ^ compilation error: file input/guide.xslt line 37 element apply-templates XSLT-apply-templates: could not compile select expression 'document('concat($SHARED_RP, '/xccdf/intro/shared_intro_os.xml'))'
Upon fixing the extra single quote, I get another error:
make xsltproc --stringparam SHARED_RP "/root/ssg_sles/scap-security-guide/shared" -o output/shorthand.xml input/guide.xslt output/guide.xml warning: failed to load external entity "input/xccdf/system/system.xml" warning: failed to load external entity "input/xccdf/services/services.xml" warning: failed to load external entity "input/auxiliary/srg_support.xml" xmllint --format --output output/shorthand.xml output/shorthand.xml xsltproc --stringparam ssg_version "0.1.30" -o output/xccdf-unlinked-unresolved.xml transforms/shorthand2xccdf.xslt output/shorthand.xml oscap xccdf resolve -o output/xccdf-unlinked-empty-groups.xml output/xccdf-unlinked-unresolved.xml xsltproc -stringparam ref "nist" -o output/table-sle11-nistrefs.html transforms/xccdf2table-byref.xslt output/xccdf-unlinked-empty-groups.xml xsltproc -stringparam profile "common" -o output/table-sle11-nistrefs-common.html \ transforms/xccdf2table-profilenistrefs.xslt output/xccdf-unlinked-empty-groups.xml xsltproc -o output/table-sle11-cces.html transforms/xccdf2table-cce.xslt output/xccdf-unlinked-empty-groups.xml xsltproc -stringparam map-to-items "../output/xccdf-unlinked-empty-groups.xml" -o output/table-sle11-srgmap.html \ transforms/table-srgmap.xslt ../../shared/references/disa-os-srg-v1r1.xml warning: failed to load external entity "../../shared/references/disa-os-srg-v1r1.xml" unable to parse ../../shared/references/disa-os-srg-v1r1.xml make: *** [table-srgmap] Error 6
# ls ../../shared/references/disa-os-srg-v1r1.xml ls: cannot access ../../shared/references/disa-os-srg-v1r1.xml: No such file or directory
Is there some other process for SUSE builds?
I replaced the reference to disa-os-srg-v1r1.xml with disa-os-srg-v1r4.xml and the build goes ahead to fail here:
File "../../shared/transforms/combineremediations.py", line 78, in fix_is_applicable_for_product product_name = map_product(product) + ' ' + product_version TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' make: *** [output/bash-remediations.xml] Error 1
The problem seems to be that combineremediations.py doesn't handle two digit version numbers:
if match is not None: product_version = product[-1:] product = product[:-1]
print ">>> Product = " + product + " version = " + product_version
Output:
Product = sle1 version = 1
Upon fixing that, the error still persists because in map_product():
if re.findall('opensuse', version): product_name = OPENSUSE if re.findall('suse', version): product_name = SUSE
But Product = 'sle'
Similar errors are present in combineovals.py.
With changes to that, it fails looking for "installed_OS_is_sle11". Looks like this is not implemented.
It looks like there might be more such bugs. Let me know if I can raise an issue and fix these.
Thank you.
Regards, Gautam.
Is there some other process for SUSE builds?
No separate process. Currently, only the build directories exist. There is no SUSE specific content at the moment. Plus we are currently migrating away from Make to CMake.
Gabe
On Wed, Sep 7, 2016 at 2:39 AM, gautams@hpe.com wrote:
Hello folks,
I see there are some PRs for adding initial build directories for SUSE. When I try a make on the directory it fails with a minor issue:
make xsltproc --stringparam SHARED_RP "/root/ssg_sles/scap-security-guide/shared" -o output/shorthand.xml input/guide.xslt output/guide.xml XPath error : Invalid expression document('concat($SHARED_RP, '/xccdf/intro/shared_intro_os.xml')) ^ compilation error: file input/guide.xslt line 37 element apply-templates XSLT-apply-templates: could not compile select expression 'document('concat($SHARED_RP, '/xccdf/intro/shared_intro_os.xml'))'
Upon fixing the extra single quote, I get another error:
make xsltproc --stringparam SHARED_RP "/root/ssg_sles/scap-security-guide/shared" -o output/shorthand.xml input/guide.xslt output/guide.xml warning: failed to load external entity "input/xccdf/system/system.xml" warning: failed to load external entity "input/xccdf/services/ services.xml" warning: failed to load external entity "input/auxiliary/srg_support.xml" xmllint --format --output output/shorthand.xml output/shorthand.xml xsltproc --stringparam ssg_version "0.1.30" -o output/xccdf-unlinked-unresolved.xml transforms/shorthand2xccdf.xslt output/shorthand.xml oscap xccdf resolve -o output/xccdf-unlinked-empty-groups.xml output/xccdf-unlinked-unresolved.xml xsltproc -stringparam ref "nist" -o output/table-sle11-nistrefs.html transforms/xccdf2table-byref.xslt output/xccdf-unlinked-empty-groups.xml xsltproc -stringparam profile "common" -o output/table-sle11-nistrefs-common.html \ transforms/xccdf2table-profilenistrefs.xslt output/xccdf-unlinked-empty-groups.xml xsltproc -o output/table-sle11-cces.html transforms/xccdf2table-cce.xslt output/xccdf-unlinked-empty-groups.xml xsltproc -stringparam map-to-items "../output/xccdf-unlinked-empty-groups.xml" -o output/table-sle11-srgmap.html \ transforms/table-srgmap.xslt ../../shared/references/disa- os-srg-v1r1.xml warning: failed to load external entity "../../shared/references/disa- os-srg-v1r1.xml" unable to parse ../../shared/references/disa-os-srg-v1r1.xml make: *** [table-srgmap] Error 6
# ls ../../shared/references/disa-os-srg-v1r1.xml ls: cannot access ../../shared/references/disa-os-srg-v1r1.xml: No such file or directory
Is there some other process for SUSE builds?
SCAP Security Guide mailing list scap-security-guide@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/scap-security- guide@lists.fedorahosted.org https://github.com/OpenSCAP/scap-security-guide/
scap-security-guide@lists.fedorahosted.org