crowdsec/debian
Laurence Jones ecd82ecfbd
feat: File notification plugin (#2932)
* wip: basic impl of file notification no log rotate but might now do it 🤷

* wip: ticker to 2 seconds and lower some log levels

* wip: remove redundant logrus formatter

* wip: the plugin should not handle it own data queue since the plugin process may timeout, so instead have a function that uses said context and loop whilst locking the filewriter this may not be the best way 🤷, however, I dont want multiple notifications to attempt to reopen the file if it has been rotated outside of the plugin context

* wip: impl log rotation which checks on check append, however, this may cause some issues in slow systems as the mutex lock doesnt give up until the file is rotated, however, the plugin looks for context and will give up if the plugin broker decides its timeout and will retry once the plugin has pushed again

* wip: update yaml dep

* wip: me no english great

* wip: even if the file has been rotated outside our control we should still compute the file size

* wip: improve context handling with creating a custom io writer struct which checks the context before attempting to write

* wip: used return byte count instead of calling a conversion again

* wip: actually check the enabled flag on log rotate

* wip: changed my mind, we check when we check file size

* wip: use io copy instead for memory alloc

* fix: add notification file to deb/rpm build
2024-05-15 09:21:45 +01:00
..
patches replace wizard patch for .deb & .rpm packages with an envvar check (#1630) 2022-08-16 14:59:59 +02:00
.gitignore gitignore the files generated while building the debian package (#1059) 2021-11-30 10:09:20 +01:00
changelog import debian & rpm sources (#898) 2021-08-18 13:57:06 +02:00
compat import debian & rpm sources (#898) 2021-08-18 13:57:06 +02:00
control add cron as a suggested package (#2799) 2024-03-14 14:02:53 +01:00
crowdsec.cron.daily Cronjob via packages (#1820) 2022-10-18 16:11:48 +01:00
crowdsec.service systemd: check configuration before attempting reload (#2861) 2024-02-26 13:44:40 +01:00
install feat: File notification plugin (#2932) 2024-05-15 09:21:45 +01:00
postinst post-install: reduce verbosity (#2751) 2024-01-18 09:20:52 +01:00
postrm fix cron removal (#1829) 2022-10-20 16:43:34 +01:00
preinst cscli machines: lint + write output to stdout instead of log (#2657) 2023-12-13 15:43:46 +01:00
prerm cscli machines: lint + write output to stdout instead of log (#2657) 2023-12-13 15:43:46 +01:00
README.md added debian/README.md 2021-12-22 14:17:32 +01:00
rules feat: File notification plugin (#2932) 2024-05-15 09:21:45 +01:00
templates Build with libre2 by default, options for wasm and static; add mk/gmsl (#2295) 2023-06-23 14:25:29 +02:00

Building Debian/Ubuntu packages

It is not recommended to build your own packages for production environments.

However, if you want to experiment and contribute:

  • Update the changelog (at least give it a correct version number)
  • Run "QUILT_PATCHES=debian/patches quilt push -a && quilt refresh"

We do the above in the build pipeline, so you'll have to do it manually before running:

  • dpkg-buildpackage -uc -us -b