Skip to content

Fix building Ubuntu 26.04 HTML guides - #15083

Merged
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:build_guides_traceback
Sep 3, 2026
Merged

Fix building Ubuntu 26.04 HTML guides#15083
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:build_guides_traceback

Conversation

@jan-cerny

Copy link
Copy Markdown
Member

The Ubuntu 26.04 product doesn't have any profile except the virtual default profile, therefore, no HTML guide is built, and the builder fails when building the index.html index. It manifests only if the lxml library isn't present and the build system falls back to the legacy script build_all_guides.py. This problem currently causes that the scap-security-guide package doesn't build on Fedora, eg.: https://src.fedoraproject.org/rpms/scap-security-guide/pull-request/81

Addressing:

$ python3 build-scripts/build_all_guides.py --input build/ssg-ubuntu2604-ds.xml --output build/guides build
Traceback (most recent call last):
  File "/home/jcerny/work/git/scap-security-guide/build-scripts/build_all_guides.py", line 109, in <module>
    main()
    ~~~~^^
  File "/home/jcerny/work/git/scap-security-guide/build-scripts/build_all_guides.py", line 100, in main
    index_source = ssg.build_guides.build_index(benchmarks, input_basename,
                                                index_links, index_options,
                                                index_initial_src)
  File "/home/jcerny/work/git/scap-security-guide/ssg/build_guides.py", line 224, in build_index
    index_select_options += "\n".join(list(index_options.values())[0])
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

The Ubuntu 26.04 product doesn't have any profile except the virtual
default profile, therefore, no HTML guide is built, and the builder
fails when building the index.html index. It manifests only if the
`lxml` library isn't present and the build system falls back to the
legacy script `build_all_guides.py`. This problem currently causes
that the scap-security-guide package doesn't build on Fedora, eg.:
https://src.fedoraproject.org/rpms/scap-security-guide/pull-request/81

Addressing:
```
$ python3 build-scripts/build_all_guides.py --input build/ssg-ubuntu2604-ds.xml --output build/guides build
Traceback (most recent call last):
  File "/home/jcerny/work/git/scap-security-guide/build-scripts/build_all_guides.py", line 109, in <module>
    main()
    ~~~~^^
  File "/home/jcerny/work/git/scap-security-guide/build-scripts/build_all_guides.py", line 100, in main
    index_source = ssg.build_guides.build_index(benchmarks, input_basename,
                                                index_links, index_options,
                                                index_initial_src)
  File "/home/jcerny/work/git/scap-security-guide/ssg/build_guides.py", line 224, in build_index
    index_select_options += "\n".join(list(index_options.values())[0])
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
```
@jan-cerny jan-cerny added this to the 0.1.83 milestone Sep 3, 2026
@Mab879 Mab879 self-assigned this Sep 3, 2026
@Mab879

Mab879 commented Sep 3, 2026

Copy link
Copy Markdown
Member

The testing farm failures seem to be an infra issue.

@Mab879
Mab879 merged commit 5ff36ae into ComplianceAsCode:master Sep 3, 2026
69 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants