ManageIQ / manageiq-rpm_build

Code to build RPMs for ManageIQ appliances and container images
Apache License 2.0
10 stars 25 forks source link

\s+ wasn't matching multiple spaces and failed to match the last line commenting out the rest of the file. #484

Closed bdunne closed 3 months ago

bdunne commented 3 months ago

The + needs to be escaped for it to match the last line

Example failure:

× rsyslog.service - System Logging Service
     Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-08-21 09:45:27 EDT; 18min ago
       Docs: man:rsyslogd(8)
             https://www.rsyslog.com/doc/
    Process: 37598 ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS (code=exited, status=1/FAILURE)
   Main PID: 37598 (code=exited, status=1/FAILURE)
        CPU: 69ms

Aug 21 09:45:27 mmim421.example.com systemd[1]: rsyslog.service: Scheduled restart job, restart counter is at 5.
Aug 21 09:45:27 mmim421.example.com systemd[1]: Stopped System Logging Service.
Aug 21 09:45:27 mmim421.example.com systemd[1]: rsyslog.service: Start request repeated too quickly.
Aug 21 09:45:27 mmim421.example.com systemd[1]: rsyslog.service: Failed with result 'exit-code'.
Aug 21 09:45:27 mmim421.example.com systemd[1]: Failed to start System Logging Service.
Fryguy commented 2 months ago

Backported to radjabov in commit 3112fce06f39679590b8324a7d61822ecd30fcd2.

commit 3112fce06f39679590b8324a7d61822ecd30fcd2
Author: Adam Grare <adam@grare.com>
Date:   Wed Aug 21 15:02:50 2024 -0400

    Merge pull request #484 from bdunne/rsyslog

    \s+ wasn't matching multiple spaces and failed to match the last line commenting out the rest of the file.

    (cherry picked from commit c16f82f6fc8134e184885bfba621b3fcc31ad0ba)