-
Notifications
You must be signed in to change notification settings - Fork 1.8k
CPACK: add auto generated dbhelper maintainer scripts #8341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPACK: add auto generated dbhelper maintainer scripts #8341
Conversation
CI has failed:
|
346b8d0
to
0732c52
Compare
Is there any impact on the RPM packages and/or should we be doing the same? |
I'm working on that but it needs more research, so it can take some time for building and deploying scripts. I will send another PR for them in the close future but it would be great if we fix debian packages sooner. @patrick-stephens |
12699e7
to
e1df359
Compare
I'd suggest merging this PR if it fixes the package for deb users and let another rpm users send another PR, as we (me and @ahspw) do not have that much experience in rpm-based distros and it would be much better if someone with expertise and motivation in that scope creates a new PR about that. |
52e4f1a
to
d2c55d0
Compare
I think the commits have gone a bit wonky rather than be rebased |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@shaerpour Please tell me if you do not have time for this and want me to take over this PR. Although this PR is good to go AFAICS and needs a maintainer attention. |
a65bd53
to
a16b81f
Compare
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This comment is only meant to prevent closing the PR. |
a16b81f
to
d28c58c
Compare
d28c58c
to
762e5bb
Compare
98e1df0
to
1d75a9b
Compare
Signed-off-by: shaerpour <amirhosseinshaerpour1@gmail.com>
Signed-off-by: shaerpour <amirhosseinshaerpour1@gmail.com>
Signed-off-by: shaerpour <amirhosseinshaerpour1@gmail.com>
1d75a9b
to
e8f3107
Compare
The changes look fine to me but I would ask that you test with the actual built binaries made in CI here to confirm? I know you've done it locally but just as a sanity check to confirm that how we build in CI does not impact anything. There should be a list of "artifacts" attached to the PR build job: https://github.com/fluent/fluent-bit/actions/runs/15108458656?pr=8341 |
### END INIT INFO | ||
|
||
PATH=/opt/fluent-bit/bin/:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
DAEMON=/opt/fluent-bit/bin/fluent-bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is actually configurable via cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while since I've seen an init script - just to confirm this will not break RPM builds or affect them in any way? I know you're focusing on Debian but we still have to make sure there is no impact on others.
Dear @patrick-stephens Thank you for your reviewing. It's been a long time since I opened this PR and I don't exactly remember. I'm pretty sure that it wont affect other distro types but I will test again and inform you. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@shaerpour Do you still want to work on this PR and are you going to test other distro types? |
Dear @aminvakil Unfortunately I can't continue work on this PR. You can take it over if you are interested. |
@shaerpour Thanks, I had created #10844 on top of your commits and will continue to work on that, this can be closed. Thank you again for your work on this! |
Description
This PR is completed version of #8330 that is closed. In Debian packages, we have maintainer scripts with (prerm, preinst, postrm and postinst) extensions that will run before or after extracting and installing package. They will do important tasks like adding user or creating directories for main app to run correctly.
Issues
The issue with fluent-bit deb packages is that it does not have this scripts so if someone activates and enables fluent-bit, after purging or removing package the OS still shows package is running and it can make issues during boot, etc.
Solution
In this branch, I added prerm, postinst and postrm scripts for resolving issue. Scripts are built with debhelper collection and customized some parts for better performance.
I already built and installed packages for ubuntu/20.04, debian/bullseye and debian/bookworm and they work totally fine.
Troubles
As mentioned, debhelper is a collection of tools for building deb packages. It creates different parts like maintainer scripts, systemd services and etc.
But the main problem was to match CPACK with it! They are different platforms for making deb packages and doing their own work so I couldn't connect them. I used CPackDebHelper inside fluent-bit codes but it just conflicts in many parts. At the end, I just built scripts with it and added statically in cpack/debian directory to be copied and used by systemd.