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

debian package: fix installation issues on systems having systemd installed but not running it as init. #4242

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

automaticserver
Copy link

@automaticserver automaticserver commented Nov 28, 2023

Description

Instead of checking for the existence of systemd binaries check for actually running systemd, as seen by the reference result when using dh_installsystemd:

# Automatically added by dh_installsystemd/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'opensearch.service' >/dev/null || true
fi
# End automatically added section

This is only a fix based on the current implementation. I'm not changing the way systemctl is invoked.

Issues Resolved

  • This use case has not been reported yet exactly this way.

This PR can be rejected if my upcoming proposal issue is considered (will post link below as comment once created)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

/dm

…talled but not running it as init.

Instead of checking for the existence of systemd binaries check for actually running systemd,
as seen by the reference result when using dh_installsystemd:

\# Automatically added by dh_installsystemd/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'opensearch.service' >/dev/null || true
fi
\# End automatically added section
@automaticserver
Copy link
Author

automaticserver commented Nov 28, 2023

As announced see also #4243 to decide whether to keep this PR open or not.

/dm

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3f25737) 93.16% compared to head (295f1a8) 93.16%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4242   +/-   ##
=======================================
  Coverage   93.16%   93.16%           
=======================================
  Files         189      189           
  Lines        5973     5973           
=======================================
  Hits         5565     5565           
  Misses        408      408           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@prudhvigodithi prudhvigodithi self-requested a review May 14, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants