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

[NetworkManager] Get system-connections files from other locations #3876

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

jcastill
Copy link
Member

system-connections files can be found not only under /etc/NetworkManager, but also /usr/lib/NetworkManager and /run/NetworkManager, so we need to capture and post process these locations as well.

Resolves: #3875


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3876
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@arif-ali arif-ali added the Reviewed/Needs 2nd Ack Require a 2nd ack from a maintainer label Dec 12, 2024
for _, _, files in os.walk(
"/etc/NetworkManager/system-connections"):
def postproc_system_connections(self, sc_path):
for _, _, files in os.walk(sc_path):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use do_path_regex_sub() ?

pathexp = fr'^({"|".join(list(self.files)+self.config_files)})'
self.do_path_regex_sub(pathexp, regexp, subst)

Copy link
Member

Choose a reason for hiding this comment

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

good catch, I think that would make sense, that would cover all files in the directory

@jcastill jcastill force-pushed the jcastillo-add-systemconnections branch 2 times, most recently from cd7ba2f to 26914e0 Compare December 13, 2024 09:30
system-connections files can be found not only under
/etc/NetworkManager, but also /usr/lib/NetworkManager and
/run/NetworkManager, so we need to capture and post process
these locations as well.

Resolves: sosreport#3875

Signed-off-by: Jose Castillo <[email protected]>
@jcastill jcastill force-pushed the jcastillo-add-systemconnections branch from 26914e0 to 2f39d3d Compare December 13, 2024 09:48
@arif-ali arif-ali added the Status/Needs Review This issue still needs a review from project members label Dec 13, 2024
@jcastill jcastill requested a review from pmoravec December 13, 2024 10:16
@arif-ali arif-ali added Reviewed/Ready for Merge Has been reviewed, ready for merge and removed Reviewed/Needs 2nd Ack Require a 2nd ack from a maintainer labels Dec 13, 2024
@arif-ali arif-ali merged commit 2bdf051 into sosreport:main Dec 13, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed/Ready for Merge Has been reviewed, ready for merge Status/Needs Review This issue still needs a review from project members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NetworkManager keyfiles are not being gathered from all locations
4 participants