match Debian-Security#185
Merged
Merged
Conversation
Collaborator
|
Hi, sorry for the delay in reviewing. Great catch and a lesson as to why apt always says “don’t script me” when you call it. This works/was working on versions of apt output in the past. I’d be more inclined to either accept both Security and security ( /[Ss]ecurity/ ) or just turn on IGNORECASE for the awk. What do you think? |
Contributor
Author
Good idea. I wonder also if the regex should have a trailing ":" ( /[Ss]ecurity:/ ) to ensure packages that have the word security in their name (but don't have security-related updates pending) are not unintentionally included. |
albatrossflavour
pushed a commit
that referenced
this pull request
May 9, 2021
Co-authored-by: dru <dru.grote@neovera.com>
albatrossflavour
added a commit
that referenced
this pull request
May 9, 2021
* Update README.md (#162) Went through the README.md for spelling/grammar/outdated info * Inconsistence between facter and manifest (#164) * Inconsistence between facter and manifest os_patching.rb line 94 * _ is also in \w * Improve os_patching::patch_after_healthcheck plan (#167) * Update patch_after_healthcheck.pp * Replace notice() with out::message() * Give plan control over noop_state and runinterval * Syntax correction Forgot commas in plan parameter definitions * Code owner file * Working on #180 : Adding rescue to allow code to continue after NoMethodError on .match (#181) Co-authored-by: Tim McLaughlin <mclaugtd@wwu.edu> * Update os_patching_fact_generation.sh (#175) I have a system where yum is currently outputting this: ``` Update notice RHSA-2019:3193 (from rhel-7-server-rpms) is broken, or a bad duplicate, skipping. You should report this problem to the owner of the rhel-7-server-rpms repository. If you are the owner, consider re-running the same command with --verbose to see the exact data that caused the conflict. ``` The "is broken" check excludes that first line, but then I end up with `os_patching.package_updates => [ "You", "If" ]` in my facts and the system doesn't show up as patched. So, I propose that instead of trying to `egrep -v` away a small set of known problem lines from yum, this should carefully match lines that match the pattern of the output when a yum update is available. (`${rpmname}.${arch} ${version} ${repo}` where all whitespace is variable and lines may have trailing whitespace). * Fixing failing development tests (#179) * Trying to fix testing failures * Replaced deprecated '--nodes' parameter with '--targets' parameter. * Updated spec_helper_acceptance.rb * Removed trailing spaces to fix the following syntax check 'plans/patch_after_healthcheck.pp - ERROR: trailing whitespace found on line 9' * Trying to fix 'spec/spec_helper_acceptance.rb:32:5: W: Lint/UnneededDisable: Unnecessary disabling of Metrics/BlockNesting.' Co-authored-by: Tames McTigue <tames@northwestern.edu> * Try and fix travis * Travis fixes * Tune travis * Tuned * more travis * ruby version * timeout * 2.6.6 * 2.4.1 * 2.4.1 * Updated PDK version * Testing * ruby-version * rubocop * rubocop * Larger testing pool * debian too * match Debian-Security (#185) Co-authored-by: dru <dru.grote@neovera.com> * puppetlabs-translate deprecated (#189) Hey Tony! We are deprecating the translate module and noticed that you were using it here. * Do not hardcode the path of AIO commands (#168) Prefer AIO Puppet / Ruby if available, but use the system's version for non AIO nodes. This unbreaks the module for non-AIO installs (e.g. using the distribution packages and not the Puppetlabs ones). Co-authored-by: Tony Green <tgreen@bandcamp.tv> * fix(patch_server) change regex after yum history (#171) when names are too long yum history truncates and replaces names by '...' ``` ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 66 | Foo ... <foo> | 2020-01-24 16:10 | Update | 1 65 | Bar ... <bar> | 2020-01-24 16:06 | Downgrade | 1 ``` Thanks to stephanevalk for the regex :) * rev metadata * Prep for 0.14.0 release * changelog * Fixing failing development tests (#179) * Trying to fix testing failures * Replaced deprecated '--nodes' parameter with '--targets' parameter. * Updated spec_helper_acceptance.rb * Removed trailing spaces to fix the following syntax check 'plans/patch_after_healthcheck.pp - ERROR: trailing whitespace found on line 9' * Trying to fix 'spec/spec_helper_acceptance.rb:32:5: W: Lint/UnneededDisable: Unnecessary disabling of Metrics/BlockNesting.' Co-authored-by: Tames McTigue <tames@northwestern.edu> * Try and fix travis * Tune travis * Tuned * timeout * Updated PDK version * rubocop * rubocop * match Debian-Security (#185) Co-authored-by: dru <dru.grote@neovera.com> * puppetlabs-translate deprecated (#189) Hey Tony! We are deprecating the translate module and noticed that you were using it here. * Do not hardcode the path of AIO commands (#168) Prefer AIO Puppet / Ruby if available, but use the system's version for non AIO nodes. This unbreaks the module for non-AIO installs (e.g. using the distribution packages and not the Puppetlabs ones). Co-authored-by: Tony Green <tgreen@bandcamp.tv> * fix(patch_server) change regex after yum history (#171) when names are too long yum history truncates and replaces names by '...' ``` ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 66 | Foo ... <foo> | 2020-01-24 16:10 | Update | 1 65 | Bar ... <bar> | 2020-01-24 16:06 | Downgrade | 1 ``` Thanks to stephanevalk for the regex :) * rev metadata * Prep for 0.14.0 release * changelog * changelog * Revert * Take out travis testing * post litmus revisions Co-authored-by: Linas <linas@daneliukas.eu> Co-authored-by: Elfranne <tom.braarup@gmail.com> Co-authored-by: Kevin Reeuwijk <kevin.reeuwijk@puppet.com> Co-authored-by: Tim McLaughlin <sharumpe@users.noreply.github.com> Co-authored-by: Tim McLaughlin <mclaugtd@wwu.edu> Co-authored-by: Eric Eisenhart <freiheit@gmail.com> Co-authored-by: Tames McTigue <tames@tamerz.com> Co-authored-by: Tames McTigue <tames@northwestern.edu> Co-authored-by: dru <drug@neovera.net> Co-authored-by: dru <dru.grote@neovera.com> Co-authored-by: Ben Ford <ben.ford@puppetlabs.com> Co-authored-by: Romain Tartière <romain@blogreen.org> Co-authored-by: bmx0r <michael.boutillier@gmail.com>
albatrossflavour
added a commit
that referenced
this pull request
May 11, 2021
* Update README.md (#162) Went through the README.md for spelling/grammar/outdated info * Inconsistence between facter and manifest (#164) * Inconsistence between facter and manifest os_patching.rb line 94 * _ is also in \w * Improve os_patching::patch_after_healthcheck plan (#167) * Update patch_after_healthcheck.pp * Replace notice() with out::message() * Give plan control over noop_state and runinterval * Syntax correction Forgot commas in plan parameter definitions * Code owner file * Working on #180 : Adding rescue to allow code to continue after NoMethodError on .match (#181) Co-authored-by: Tim McLaughlin <mclaugtd@wwu.edu> * Update os_patching_fact_generation.sh (#175) I have a system where yum is currently outputting this: ``` Update notice RHSA-2019:3193 (from rhel-7-server-rpms) is broken, or a bad duplicate, skipping. You should report this problem to the owner of the rhel-7-server-rpms repository. If you are the owner, consider re-running the same command with --verbose to see the exact data that caused the conflict. ``` The "is broken" check excludes that first line, but then I end up with `os_patching.package_updates => [ "You", "If" ]` in my facts and the system doesn't show up as patched. So, I propose that instead of trying to `egrep -v` away a small set of known problem lines from yum, this should carefully match lines that match the pattern of the output when a yum update is available. (`${rpmname}.${arch} ${version} ${repo}` where all whitespace is variable and lines may have trailing whitespace). * Fixing failing development tests (#179) * Trying to fix testing failures * Replaced deprecated '--nodes' parameter with '--targets' parameter. * Updated spec_helper_acceptance.rb * Removed trailing spaces to fix the following syntax check 'plans/patch_after_healthcheck.pp - ERROR: trailing whitespace found on line 9' * Trying to fix 'spec/spec_helper_acceptance.rb:32:5: W: Lint/UnneededDisable: Unnecessary disabling of Metrics/BlockNesting.' Co-authored-by: Tames McTigue <tames@northwestern.edu> * Try and fix travis * Travis fixes * Tune travis * Tuned * more travis * ruby version * timeout * 2.6.6 * 2.4.1 * 2.4.1 * Updated PDK version * Testing * ruby-version * rubocop * rubocop * Larger testing pool * debian too * match Debian-Security (#185) Co-authored-by: dru <dru.grote@neovera.com> * puppetlabs-translate deprecated (#189) Hey Tony! We are deprecating the translate module and noticed that you were using it here. * Do not hardcode the path of AIO commands (#168) Prefer AIO Puppet / Ruby if available, but use the system's version for non AIO nodes. This unbreaks the module for non-AIO installs (e.g. using the distribution packages and not the Puppetlabs ones). Co-authored-by: Tony Green <tgreen@bandcamp.tv> * fix(patch_server) change regex after yum history (#171) when names are too long yum history truncates and replaces names by '...' ``` ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 66 | Foo ... <foo> | 2020-01-24 16:10 | Update | 1 65 | Bar ... <bar> | 2020-01-24 16:06 | Downgrade | 1 ``` Thanks to stephanevalk for the regex :) * rev metadata * Prep for 0.14.0 release * changelog * Fixing failing development tests (#179) * Trying to fix testing failures * Replaced deprecated '--nodes' parameter with '--targets' parameter. * Updated spec_helper_acceptance.rb * Removed trailing spaces to fix the following syntax check 'plans/patch_after_healthcheck.pp - ERROR: trailing whitespace found on line 9' * Trying to fix 'spec/spec_helper_acceptance.rb:32:5: W: Lint/UnneededDisable: Unnecessary disabling of Metrics/BlockNesting.' Co-authored-by: Tames McTigue <tames@northwestern.edu> * Try and fix travis * Tune travis * Tuned * timeout * Updated PDK version * rubocop * rubocop * match Debian-Security (#185) Co-authored-by: dru <dru.grote@neovera.com> * puppetlabs-translate deprecated (#189) Hey Tony! We are deprecating the translate module and noticed that you were using it here. * Do not hardcode the path of AIO commands (#168) Prefer AIO Puppet / Ruby if available, but use the system's version for non AIO nodes. This unbreaks the module for non-AIO installs (e.g. using the distribution packages and not the Puppetlabs ones). Co-authored-by: Tony Green <tgreen@bandcamp.tv> * fix(patch_server) change regex after yum history (#171) when names are too long yum history truncates and replaces names by '...' ``` ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 66 | Foo ... <foo> | 2020-01-24 16:10 | Update | 1 65 | Bar ... <bar> | 2020-01-24 16:06 | Downgrade | 1 ``` Thanks to stephanevalk for the regex :) * rev metadata * Prep for 0.14.0 release * changelog * changelog * Revert * Take out travis testing * post litmus revisions * #165 clear out references to bolt `nodes` and change them to `targets`. Thanks @elfranne * expand filter inline and remove $FILTER variables (#188) * #192 testing enhanced regex for yum history * fix facter no longer working on puppet 7 (#191) * fix facter no longer working on puppet 7 * using puppet config print vardir `puppet config print vardir` is quicker to execute * Puppet 7 facts * passes acceptance tests on both puppet 6 and 7 * pre-0.15.0 release Co-authored-by: Linas <linas@daneliukas.eu> Co-authored-by: Elfranne <tom.braarup@gmail.com> Co-authored-by: Kevin Reeuwijk <kevin.reeuwijk@puppet.com> Co-authored-by: Tim McLaughlin <sharumpe@users.noreply.github.com> Co-authored-by: Tim McLaughlin <mclaugtd@wwu.edu> Co-authored-by: Eric Eisenhart <freiheit@gmail.com> Co-authored-by: Tames McTigue <tames@tamerz.com> Co-authored-by: Tames McTigue <tames@northwestern.edu> Co-authored-by: dru <drug@neovera.net> Co-authored-by: dru <dru.grote@neovera.com> Co-authored-by: Ben Ford <ben.ford@puppetlabs.com> Co-authored-by: Romain Tartière <romain@blogreen.org> Co-authored-by: bmx0r <michael.boutillier@gmail.com> Co-authored-by: Michael Johnson <51394770+michael-letsengage@users.noreply.github.com> Co-authored-by: Massimiliano Adamo <maxadamo@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #184