-
Notifications
You must be signed in to change notification settings - Fork 743
add products/uos20 to support UnionTech OS Server 20 #8779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hello @2544246302! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-06-25 18:31:26 UTC |
|
Hi @2544246302. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. Thanks for the PR. I made comments throughout the PR that need to be addressed. Most of my comments are related to the alphabetical ordering of uosv20. Also, can you please update the pull request description with more details?
Secondly, I have a question about who should be the authority for this product? We don't want a product in the tree that doesn't have any public maintainers. Please see our governance rules for more details.
| <xsl:include href="constants.xslt"/> | ||
| <xsl:variable name="overlays" select="document($overlay)/xccdf:overlays" /> | ||
|
|
||
| </xsl:stylesheet>[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| </xsl:stylesheet>[ | |
| </xsl:stylesheet> |
.github/workflows/gate.yaml
Outdated
| @@ -42,7 +43,7 @@ jobs: | |||
| - name: Checkout | |||
| uses: actions/checkout@v2 | |||
| - name: Build | |||
| run: ./build_product chromium fedora firefox fuse6 rhcos4 rhel7 rhel8 rhel9 sle12 sle15 ubuntu2004 | |||
| run: ./build_product uosv20 chromium fedora firefox fuse6 rhcos4 rhel7 rhel8 rhel9 sle12 sle15 ubuntu2004 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| run: ./build_product uosv20 chromium fedora firefox fuse6 rhcos4 rhel7 rhel8 rhel9 sle12 sle15 ubuntu2004 | |
| run: ./build_product chromium fedora firefox fuse6 rhcos4 rhel7 rhel8 rhel9 sle12 sle15 ubuntu2004 uosv20 |
.github/workflows/gate.yaml
Outdated
| @@ -83,6 +84,7 @@ jobs: | |||
| - name: Build | |||
| run: |- | |||
| ./build_product \ | |||
| uosv20 \ | |||
| chromium \ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place this in alphabetical order in this list.
.github/workflows/gate.yaml
Outdated
| @@ -113,6 +115,7 @@ jobs: | |||
| - name: Build | |||
| run: |- | |||
| ./build_product \ | |||
| uosv20 \ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place this in alphabetical order in this list.
.github/workflows/gate.yaml
Outdated
| @@ -147,6 +150,7 @@ jobs: | |||
| - name: Build | |||
| run: |- | |||
| ./build_product \ | |||
| uosv20 \ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place this in alphabetical order in this list.
ssg/constants.py
Outdated
|
|
||
| MULTI_PLATFORM_MAPPING = { | ||
| "multi_platform_uos": ["uosv20"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place this in alphabetical order.
ssg/constants.py
Outdated
| @@ -426,6 +429,7 @@ | |||
|
|
|||
| # _version_name_map = { | |||
| MAKEFILE_ID_TO_PRODUCT_MAP = { | |||
| 'uos': 'Uniontech OS', | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place this in alphabetical order.
tests/unit/ssg-module/test_utils.py
Outdated
| @@ -12,7 +12,7 @@ def test_is_applicable(): | |||
|
|
|||
| assert not ssg.utils.is_applicable('fedora,multi_platform_ubuntu', 'rhel7') | |||
| assert not ssg.utils.is_applicable('ol7', 'rhel7') | |||
| assert not ssg.utils.is_applicable('fedora,debian9,debian10,debian11', 'rhel7') | |||
| assert not ssg.utils.is_applicable('uosv20,fedora,debian9,debian10,debian11', 'rhel7') | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert not ssg.utils.is_applicable('uosv20,fedora,debian9,debian10,debian11', 'rhel7') | |
| assert not ssg.utils.is_applicable('debian9,debian10,debian11,fedora,uosv20', 'rhel7') |
utils/duplicated_prodtypes.py
Outdated
| @@ -11,7 +11,7 @@ | |||
| def _create_profile_cache(ssg_root): | |||
| profile_cache = {} | |||
|
|
|||
| product_list = ['debian9', 'debian10', 'debian11', 'fedora', 'ol7', 'opensuse', | |||
| product_list = ['uosv20','debian9', 'debian10', 'debian11', 'fedora', 'ol7', 'opensuse', | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place uosv20 in alphabetical order.
utils/fix_file_ocilclause.py
Outdated
| @@ -11,7 +11,7 @@ | |||
| def _create_profile_cache(ssg_root): | |||
| profile_cache = {} | |||
|
|
|||
| product_list = ['debian9', 'debian10', 'debian11', 'fedora', 'ol7', 'opensuse', | |||
| product_list = ['uosv20','debian9', 'debian10', 'debian11', 'fedora', 'ol7', 'opensuse', | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place uosv20 in alphabetical order.
|
@2544246302 Please rebase the PR on the top of master branch, resolve the conflicts and address Matthew's comments. |
389fe41 to
65c84d6
Compare
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase on master and check for any build errors, if you have any question we are happy to help. I have left some comments on the first new build errors I encountered.
CMakeLists.txt
Outdated
| @@ -414,6 +416,8 @@ endif() | |||
| if (SSG_PRODUCT_UBUNTU2004) | |||
| add_subdirectory("products/ubuntu2004" "ubuntu2004") | |||
| endif() | |||
| if (SSG_PRODUCT_UOSV20) | |||
| add_subdirectory("products/uosv20" "uosv20") | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| add_subdirectory("products/uosv20" "uosv20") | |
| add_subdirectory("products/uosv20" "uosv20") | |
| endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,thanks for your advice.I'm fixing this error.
products/uosv20/product.yml
Outdated
| cpes_root: "../../shared/applicability" | ||
| cpes: | ||
| - uos: | ||
| name: "cpe:/o:uos:uniontech_os:v20" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid YAML, this needs indenting as well.
products/uosv20/product.yml
Outdated
| @@ -0,0 +1,25 @@ | |||
| product: uosv20 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use 4 spaces for indention in new YAML files.
ff69a69 to
3ce8f2e
Compare
| @@ -267,7 +269,7 @@ | |||
|
|
|||
| MULTI_PLATFORM_LIST = ["rhel", "fedora", "rhv", "debian", "ubuntu", | |||
| "wrlinux", "opensuse", "sle", "ol", "ocp", "rhcos", | |||
| "example", "eks", "alinux"] | |||
| "example", "eks", "alinux", "uos"] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, your content doesn't build because of this:
[12/18] [uosv20-content] generating ssg-uosv20-cpe-dictionary.xml, ssg-uosv20-cpe-oval.xml
FAILED: ssg-uosv20-cpe-dictionary.xml ssg-uosv20-cpe-oval.xml /home/jcerny/work/git/scap-security-guide/build/ssg-uosv20-cpe-dictionary.xml /home/jcerny/work/git/scap-security-guide/build/ssg-uosv20-cpe-oval.xml
cd /home/jcerny/work/git/scap-security-guide/build/uosv20 && env PYTHONPATH=/home/jcerny/work/git/scap-security-guide /usr/bin/python3 /home/jcerny/work/git/scap-security-guide/build-scripts/cpe_generate.py --product-yaml /home/jcerny/work/git/scap-security-guide/products/uosv20/product.yml ssg /home/jcerny/work/git/scap-security-guide/build /home/jcerny/work/git/scap-security-guide/build/uosv20/shorthand.xml /home/jcerny/work/git/scap-security-guide/build/uosv20/oval-unlinked.xml && /usr/bin/xmllint --nsclean --format --output /home/jcerny/work/git/scap-security-guide/build/ssg-uosv20-cpe-dictionary.xml /home/jcerny/work/git/scap-security-guide/build/ssg-uosv20-cpe-dictionary.xml && /usr/bin/xmllint --nsclean --format --output /home/jcerny/work/git/scap-security-guide/build/ssg-uosv20-cpe-oval.xml /home/jcerny/work/git/scap-security-guide/build/ssg-uosv20-cpe-oval.xml
Error: Can't locate "proc_sys_kernel_osrelease_arch_aarch64" definition in "/home/jcerny/work/git/scap-security-guide/build/uosv20/oval-unlinked.xml".
Ensure <platform> element is configured properly for "proc_sys_kernel_osrelease_arch_aarch64".
Exiting..
[15/18] [uosv20-playbooks] generating Ansible Playbooks for all profiles in ssg-uosv20-xccdf.xml
ninja: build stopped: subcommand failed.
Second, if your product name is uosv20 then you need to put uosv here, not uos. Check the parse_name function in /ssg/utils.py to see how this works. It would probably make sense to rename your product to uos20 instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your help. I discussed with our team according to your suggestions and decided to change our name.
bbe276c to
4e4a5e0
Compare
|
@2544246302 I still experience build problems. Does the uos20 product build correctly for you? It seems that the problem discovered on Monday wasn't the only one .... |
e580224 to
ea39e2d
Compare
|
@jan-cerny Firstly, thanks very much for your help and concern for the pr that I submitted, and I have now fixed the issue that you mentioned above.Currently in my local can test success,here is the test result. Secondly, It still have a problem about the indentation problem in checks about the file https://codeclimate.com/github/ComplianceAsCode/content/ssg/constants.py?from_sha=46faa00b&to_sha=694d667e |
|
Code Climate has analyzed commit 694d667 and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 42.7% (0.0% change). View more on Code Climate. |

Description:
OpenSCAP now supports many products. UnionTech OS Server 20 is a server operating system based on centos8, So I want to add the product/uosv20 into OpenSCAP.
UnionTech OS Server 20 is one of our company's products,You can learn more about our organization from this link :"https://www.uniontech.com" .In addition this URL "https://www.uniontech.com/next/product/server-system?edition=Enterprise" is a detailed description of our product UnionTech OS Server 20.
In the future, the PR on openscap will be maintained and updated by members of our security technology department
Rationale:
Rationale here. Replace this text. Don't use the italics format!
Fixes # Issue number here (e.g. Updating sysctl XCCDF naming #26) or remove this line if no issue exists.