Skip to content
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

Remove chkconfig from RPM SPECS to allow unattended installation in OpenSUSE Tumbleweed #1054

Closed
rauldpm opened this issue Dec 7, 2021 · 1 comment

Comments

@rauldpm
Copy link
Member

rauldpm commented Dec 7, 2021

Wazuh version Install type Action performed Platform
>4.2.5 Manager Install OpenSUSE Tumbleweed

Hello team,

Testing the unattended unification in OpenSUSE Tumbleweed, I have seen that the installation of wazuh-manager fails because chkconfig.

Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: nothing provides '/sbin/chkconfig' needed by the to be installed wazuh-manager-4.2.5-1.x86_64
 Solution 1: do not install wazuh-manager-4.2.5-1.x86_64
 Solution 2: break wazuh-manager-4.2.5-1.x86_64 by ignoring some of its dependencies

Apparently, chkconfig is deprecated and is no longer incorporated into the new official OpenSUSE Tumbleweed boxes. This alone does not seem to be a problem if the installation is forced, but it prevents the unattended from being installed on this system.

From what I have seen, RPM packages are used, which incorporate it into their SPECS. It would be interesting to look for an alternative to this problem.

Apparently this was fixed in the PR #977, but both the branch 4.3 and the master branch (4.4) continue to maintain these files

Master branch

rpms/SPECS/4.4.0/wazuh-agent-4.4.0.spec:  elif command -v service > /dev/null 2>&1 && command -v chkconfig > /dev/null 2>&1; then
rpms/SPECS/4.4.0/wazuh-agent-4.4.0.spec:    chkconfig wazuh-agent off > /dev/null 2>&1
rpms/SPECS/4.4.0/wazuh-agent-4.4.0.spec:    chkconfig --del wazuh-agent > /dev/null 2>&1
rpms/SPECS/4.4.0/wazuh-manager-4.4.0.spec:    elif command -v service > /dev/null 2>&1 && command -v chkconfig > /dev/null 2>&1; then
rpms/SPECS/4.4.0/wazuh-manager-4.4.0.spec:      chkconfig wazuh-api off > /dev/null 2>&1
rpms/SPECS/4.4.0/wazuh-manager-4.4.0.spec:      chkconfig --del wazuh-api > /dev/null 2>&1
rpms/SPECS/4.4.0/wazuh-manager-4.4.0.spec:  elif command -v service > /dev/null 2>&1 && command -v chkconfig > /dev/null 2>&1; then
rpms/SPECS/4.4.0/wazuh-manager-4.4.0.spec:    chkconfig wazuh-manager off > /dev/null 2>&1
rpms/SPECS/4.4.0/wazuh-manager-4.4.0.spec:    chkconfig --del wazuh-manager > /dev/null 2>&1

4.3 branch

rpms/SPECS/4.3.0/wazuh-manager-4.3.0.spec:    elif command -v service > /dev/null 2>&1 && command -v chkconfig > /dev/null 2>&1; then
rpms/SPECS/4.3.0/wazuh-manager-4.3.0.spec:      chkconfig wazuh-api off > /dev/null 2>&1
rpms/SPECS/4.3.0/wazuh-manager-4.3.0.spec:      chkconfig --del wazuh-api > /dev/null 2>&1
rpms/SPECS/4.3.0/wazuh-manager-4.3.0.spec:  elif command -v service > /dev/null 2>&1 && command -v chkconfig > /dev/null 2>&1; then
rpms/SPECS/4.3.0/wazuh-manager-4.3.0.spec:    chkconfig wazuh-manager off > /dev/null 2>&1
rpms/SPECS/4.3.0/wazuh-manager-4.3.0.spec:    chkconfig --del wazuh-manager > /dev/null 2>&1
rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec:  elif command -v service > /dev/null 2>&1 && command -v chkconfig > /dev/null 2>&1; then
rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec:    chkconfig wazuh-agent off > /dev/null 2>&1
rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec:    chkconfig --del wazuh-agent > /dev/null 2>&1
@DFolchA
Copy link
Contributor

DFolchA commented Dec 13, 2021

This was fixed for 4.3 by removing the dependency and adding checks before using chkconfig in RPM SPECS.
e63ee07

@DFolchA DFolchA closed this as completed Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants