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

RPM package warning: legacy directory /var/run #105

Closed
Tracked by #110
AlexRuiz7 opened this issue Jan 8, 2024 · 6 comments · Fixed by #119
Closed
Tracked by #110

RPM package warning: legacy directory /var/run #105

AlexRuiz7 opened this issue Jan 8, 2024 · 6 comments · Fixed by #119
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@AlexRuiz7
Copy link
Member

Description

Related issue: #99

During RPM packages installation and removal, these warning show up:

.rpm package install:

[root@alma8 ~]# rpm -i wazuh-indexer-4.9.0-1.x86_64.rpm 
warning: %post(wazuh-indexer-4.9.0-1.x86_64) scriptlet failed, exit status 255
[/usr/lib/tmpfiles.d/wazuh-indexer.conf:1] Line references path below legacy directory /var/run/, updating /var/run/wazuh-indexer → /run/wazuh-indexer; please update the tmpfiles.d/ drop-in file accordingly.

.rpm package uninstall:

warning: file /var/run/wazuh-indexer: remove failed: No such file or directory

Tasks

  • Fix warnings.
@AlexRuiz7 AlexRuiz7 added level/task Task issue type/bug Bug issue labels Jan 8, 2024
@wazuhci wazuhci moved this to Backlog in Release 4.9.0 Jan 8, 2024
@f-galland f-galland self-assigned this Jan 11, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.9.0 Jan 11, 2024
@f-galland
Copy link
Member

We need to update /var/run references to /run in all rpm package related files:

distribution/packages/src/common/systemd/wazuh-indexer.conf
distribution/packages/src/common/systemd/wazuh-indexer.service
distribution/packages/src/common/env/wazuh-indexer
distribution/packages/src/common/scripts/postrm
distribution/packages/src/rpm/init.d/wazuh-indexer

@f-galland
Copy link
Member

Since the above files mostly pertain to the common build infrastructure, we might need to modify deb related files as well, including:

distribution/packages/src/deb/debmake_install.sh

@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 Jan 12, 2024
@f-galland
Copy link
Member

PR #119 fixes the /var/run related warnings, but we still observe the following when installing:

Running transaction
  Preparing        :                                                                                                                                                              1/1 
  Running scriptlet: wazuh-indexer-4.9.0-1.x86_64                                                                                                                                 1/1 
  Installing       : wazuh-indexer-4.9.0-1.x86_64                                                                                                                                 1/1 
  Running scriptlet: wazuh-indexer-4.9.0-1.x86_64                                                                                                                                 1/1 
warning: %post(wazuh-indexer-4.9.0-1.x86_64) scriptlet failed, exit status 255

Error in POSTIN scriptlet in rpm package wazuh-indexer
  Verifying        : wazuh-indexer-4.9.0-1.x86_64                                                                                                                                 1/1 

Installed:
  wazuh-indexer-4.9.0-1.x86_64                                                                                                                                                        

Complete!

@wazuhci wazuhci moved this from Pending review to Backlog in Release 4.9.0 Jan 12, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.9.0 Jan 16, 2024
@f-galland
Copy link
Member

It seems exit code 255 is originated in a command not found error:
https://www.baeldung.com/linux/status-codes

@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 Jan 16, 2024
@wazuhci wazuhci moved this from Pending review to Pending final review in Release 4.9.0 Jan 17, 2024
@AlexRuiz7
Copy link
Member Author

It seems exit code 255 is originated in a command not found error: https://www.baeldung.com/linux/status-codes

Fixed in 3b4a1f5

@wazuhci wazuhci moved this from Pending final review to Done in Release 4.9.0 Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants