#2645 sblim-cmpi-syslog: Better support for rsyslog

New_Feature
closed-fixed
None
providers
5
2013-07-26
2013-06-25
No

(originally filed as https://bugzilla.redhat.com/show_bug.cgi?id=971807)

This is an attempt to make sblim-cmpi-syslog working nicely with rsyslog. I'm going to publish series of patches that touches various areas of the package, bringing feature enhancements, bugfixes and code cleanup.

The primary goal was to add full support for $IncludeConfig directives. The secondary goal was to fix compatibility issues found during testing.

Some patches are quite large as some areas need to be re-arranged or rewritten. Detailed change description is at the beginning of each patch, formatted as git commits. Feel free to post any comments and I'll post updated patches.

Discussion

  • Tomáš Bžatek

    Tomáš Bžatek - 2013-06-25

    Use internal memory array for Syslog_MessageLog values

    This first patch is a basis for future enhancements. It parses all items for Syslog_MessageLog during Syslog_MessageLog_Begin_Enum() and stores the data in memory, contrary to using a temporary file. The temporary file approach is retained for the Syslog_LogRecord case where large amounts of data are not convenient to be stored in memory.

     
  • Tomáš Bžatek

    Tomáš Bžatek - 2013-06-25

    Parse rsyslog includes

    This second patch adds support for $IncludeConfig directives within the rsyslog.conf configuration file. This means adding proper support for separate config files in /etc/rsyslog.d/ directory, as we have in Fedora.

     
  • Tomáš Bžatek

    Tomáš Bžatek - 2013-06-25

    Handle cross-filesystem rename

    This patch fixes the case of having temporary file on different filesystem than the target file, e.g. creating new Syslog_Setting instance resulting in writing new rules through a temporary file.

     
    Last edit: Tomáš Bžatek 2013-07-01
  • Tomáš Bžatek

    Tomáš Bžatek - 2013-06-25

    Proper write support for rsyslog includes in Syslog_Setting

    This patch fixes and enhances rule write support through Syslog_Setting instances. It's a bit large due to number of changes needed to be done.

    The only thing I'm aware is broken (and was before) is removing a rule from multiple rule line. Removing single rules works fine. This is going to be addressed in the next patch.

     
  • Tomáš Bžatek

    Tomáš Bžatek - 2013-06-25

    Handle unset properties on method calls better

    The attached patch is a follow up on the previous one, "Don't crash when calling a method with zero arguments", further extending it.

     
  • Dave Heller

    Dave Heller - 2013-07-08

    Hi Tomáš, thanks for you contributions. I have reviewed your patches.

    In addition to the 12 patches you attached here, I see there is an addtional patch from your Fedora 18 and 19 rpms that is also required, which I am attaching here for reference.

     
  • Dave Heller

    Dave Heller - 2013-07-08

    Additionally, I found two other bugs:

    The first affects "make postinstall" and is probably not affecting your rpmbuild. There is a temporary copy of the syslog.conf that is created during this step. If the file /etc/syslog.conf does not exist the step will fail. This temporary file is no longer used so I just removed it from the Makefile.

     
  • Dave Heller

    Dave Heller - 2013-07-08

    The other bug affects the wrapper script "syslog-service.sh". It looks like the sblim-cmpi-syslog-0.8.0-systemd.patch, while enabling the use rsyslog with systemd, breaks support for rsyslog with initscripts. So for example, the patch would break the package in RHEL6. The attached patch (intended to be applied after the sblim-cmpi-syslog-0.8.0-systemd.patch) works on both RHEL6 and F18 (and presumably, F19)

     
  • Dave Heller

    Dave Heller - 2013-07-08

    My plan is to check in all these patches and do a new release of sblim-cmpi-syslog, which would be 0.8.1. Please review my changes and let me know if there are additional patches I have not seen. (I checked the RHEL6 src RPM and did not see any additional patches there).

    At the point I do the new release (or commit any changes, really) it could break your rpmbuild process, if you are pulling from CVS directly. Alternately you can pull our release tarball directly:

    http://sourceforge.net/projects/sblim/files/providers/sblim-cmpi-syslog/0.8.0/sblim-cmpi-syslog-0.8.0.tar.bz2/download

    Of course, once I release v0.8.1 you should be able to use that as a base for your RPMs, and no further patches would then be required.

    Thanks again. -DaveH

     
  • Dave Heller

    Dave Heller - 2013-07-25

    Patches committed to CVS head. New package release is v0.9.0, and the CVS repository is now bumped to 0.9.1-preview.

     
  • Dave Heller

    Dave Heller - 2013-07-25
    • status: open --> closed-fixed
    • assigned_to: Dave Heller
     
  • Tomáš Bžatek

    Tomáš Bžatek - 2013-07-26

    Hi Dave,

    sorry for the late reply, just got back from vacation.

    I had a feeling the systemd patch has been sent to upstream by previous maintainer a while ago; anyway your patch on top of it is correct, it basically used to hardcode calls to systemctl just for the specific Fedora version usage.

    Thanks for reviewing and committing my patches!

    Regards,
    Tomas

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks