Skip to content
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

Support all boolean values in dnf.conf #11965

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<def-group>

<definition class="compliance" id="ensure_gpgcheck_globally_activated" version="1">
<definition class="compliance" id="{{{ rule_id }}}" version="1">
{{{ oval_metadata("The gpgcheck option should be used to ensure that checking
of an RPM package's signature always occurs prior to its
installation.") }}}
Expand All @@ -22,7 +22,7 @@

<ind:textfilecontent54_object id="object_ensure_gpgcheck_globally_activated" comment="gpgcheck set in {{{ pkg_manager_config_file }}}" version="1">
<ind:filepath>{{{ pkg_manager_config_file }}}</ind:filepath>
<ind:pattern operation="pattern match">^\s*gpgcheck\s*=\s*1\s*$</ind:pattern>
<ind:pattern operation="pattern match">^\s*gpgcheck\s*=\s*(1|True|yes)\s*$</ind:pattern>
<ind:instance datatype="int" operation="equals">1</ind:instance>
</ind:textfilecontent54_object>

Expand All @@ -34,7 +34,7 @@

<ind:textfilecontent54_object id="object_test_ensure_gpgcheck_globally_no_deactivated" comment="0_off_no_false set in {{{ pkg_manager_config_file }}}" version="1">
<ind:filepath>{{{ pkg_manager_config_file }}}</ind:filepath>
<ind:pattern operation="pattern match">^\s*gpgcheck\s*=\s*0|off|no|false\s*$</ind:pattern>
<ind:pattern operation="pattern match">^\s*gpgcheck\s*=\s*(0|off|no|false)\s*$</ind:pattern>
<ind:instance datatype="int" operation="equals">0</ind:instance>
</ind:textfilecontent54_object>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

. $SHARED/group_updating_utils.sh

config_file="$(find_config_file)"

if grep -q "^gpgcheck" "$config_file"; then
sed -i "s/^gpgcheck.*/gpgcheck=True/" "$config_file"
else
echo "gpgcheck=True" >> "$config_file"
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

. $SHARED/group_updating_utils.sh

config_file="$(find_config_file)"

if grep -q "^gpgcheck" "$config_file"; then
sed -i "s/^gpgcheck.*/gpgcheck=yes/" "$config_file"
else
echo "gpgcheck=yes" >> "$config_file"
fi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
{{% if 'sle' in product %}}
# packages = libselinux1
{{% else %}}
{{% else %}}
# packages = python3-libselinux
{{% endif %}}

Expand Down
Loading