Skip to content

match Debian-Security#185

Merged
albatrossflavour merged 1 commit into
voxpupuli:developmentfrom
dgrote:debian_security
Jul 30, 2020
Merged

match Debian-Security#185
albatrossflavour merged 1 commit into
voxpupuli:developmentfrom
dgrote:debian_security

Conversation

@dgrote

@dgrote dgrote commented Jul 10, 2020

Copy link
Copy Markdown
Contributor

Fixes #184

@albatrossflavour

Copy link
Copy Markdown
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?

@albatrossflavour albatrossflavour self-assigned this Jul 20, 2020
@albatrossflavour albatrossflavour added bug Something isn't working question Further information is requested labels Jul 20, 2020
@dgrote

dgrote commented Jul 22, 2020

Copy link
Copy Markdown
Contributor Author

I’d be more inclined to either accept both Security and security ( /[Ss]ecurity/ ) or just turn on IGNORECASE for the awk.

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
albatrossflavour merged commit d33b6fa into voxpupuli:development Jul 30, 2020
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fact generation misses Debian security packages

2 participants