-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
base: master
Are you sure you want to change the base?
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 |
d2c55d0
to
add34dc
Compare
Yes that was a mistake, I just fixed them |
Should I do anything for windows build action issue? |
0dd4f68
to
9dedf5a
Compare
6f05c10
to
6b896d4
Compare
6b896d4
to
a65bd53
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. |
@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. |
Signed-off-by: ahspw <[email protected]>
Signed-off-by: ahspw <[email protected]>
Signed-off-by: ahspw <[email protected]>
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. |
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.