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

Fixing wazuh-indexer.spec duplicated information #2646

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

pro-akim
Copy link
Member

Related issue
2637

Description

There was duplicate code stemming from a merge with a poorly resolved conflict.
The duplicated code is removed at https://github.com/wazuh/wazuh-packages/blame/v4.7.0/stack/indexer/rpm/wazuh-indexer.spec by deleting:

if [[ -d /run/systemd/system ]] ; then
    rm -f /etc/init.d/%{name}
fi

# If is an upgrade, move the securityconfig files if they exist (4.3.x versions)
if [ ${1} = 2 ]; then
    if [ -d "%{INSTALL_DIR}"/plugins/opensearch-security/securityconfig ]; then

        if [ ! -d "%{CONFIG_DIR}"/opensearch-security ]; then
            mkdir "%{CONFIG_DIR}"/opensearch-security
        fi

        cp -r "%{INSTALL_DIR}"/plugins/opensearch-security/securityconfig/* "%{CONFIG_DIR}"/opensearch-security
    fi
fi

Logs example

https://github.com/wazuh/wazuh-packages/actions/runs/6979091415/job/18991690888?pr=2633

Tests

@pro-akim pro-akim linked an issue Nov 27, 2023 that may be closed by this pull request
4 tasks
Copy link
Member

@juliamagan juliamagan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidjiglesias davidjiglesias merged commit a19250f into 4.8.0 Nov 29, 2023
5 checks passed
@davidjiglesias davidjiglesias deleted the bug/2637-Duplicate-code-indexer-package branch November 29, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate code in the Wazuh indexer package
3 participants