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

V-71849 Command Enhancement #166

Open
t0sche opened this issue Nov 3, 2021 · 0 comments
Open

V-71849 Command Enhancement #166

t0sche opened this issue Nov 3, 2021 · 0 comments

Comments

@t0sche
Copy link

t0sche commented Nov 3, 2021

This regex does not seem to be valid. When executed, it does not return the expected values.

# for i in `rpm -Va | egrep -i '^\\.[M|U|G|.]{8}' | cut -d \" \" -f4,5`;do
for j in `rpm -qf $i`;do rpm -ql $j --dump | cut -d \" \" -f1,5,6,7 | grep
$i;done;done

I have tested this instead and it appears to work as intended based on the control text:

for i in `rpm -Va | egrep '^.{1}M|^.{5}U|^.{6}G' | cut -d " " -f4,5`;do for j in `rpm -qf $i`;do rpm -ql $j --dump | cut -d " " -f1,5,6,7 | grep $i;done;done

Update the corresponding check based on the above command:

describe command("rpm -Va | grep '^.M' | awk 'NF>1{print $NF}'").stdout.strip.split("\n") do
it { should all(be_in rpm_verify_perms_except) }
end

describe command("for i in `rpm -Va | egrep '^.{1}M|^.{5}U|^.{6}G' | cut -d " " -f4,5`;do for j in `rpm -qf $i`;do rpm -ql $j --dump | cut -d " " -f1,5,6,7 | grep $i;done;done | awk '{print $1}'").stdout.strip.split("\n") do
  it { should all(be_in rpm_verify_perms_except) }
end
@t0sche t0sche mentioned this issue Nov 3, 2021
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 a pull request may close this issue.

1 participant