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

qubes-vm-core Archlinux package uses hostname (from inetutils) which is not available #9710

Closed
alimirjamali opened this issue Jan 14, 2025 · 3 comments · Fixed by QubesOS/qubes-core-agent-linux#547
Assignees
Labels
affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. C: Arch Linux The Arch Linux template diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue.

Comments

@alimirjamali
Copy link

How to file a helpful issue

Qubes OS release

r4.3 testing (but most probably also valid for r4.2)

Brief summary

Trying to update Archlinux template without having inetutils installed will result in the following messages:

/tmp/alpm_idRbNP/.INSTALL: line 129: hostname: command not found
/tmp/alpm_idRbNP/.INSTALL: line 130: hostname: command not found

Since installation script for qubes-core-agent-linux uses hostname (here and here) which is not installed by default. So maybe readjust dependencies to include inetutils?

Steps to reproduce

  1. Download and install a Fresh Archlinux template.
  2. Update it and inspect the logs while upgrading qubes-vm-core

Expected behavior

No errors

Actual behavior

Errors

@alimirjamali alimirjamali added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug labels Jan 14, 2025
@alimirjamali
Copy link
Author

Looking at this again, hostname was a part of net-tools which is included in Archlinux and Archlinux Minimal package lists. But hostname was dropped from (long time deprecated) net-tools in 2011. Including inetutils will pull-in some weak unnecessary dependencies such as ftpd. I guess replacing hostname with $(cat /etc/hostname) in installation script should be sufficient?

@andrewdavidwong andrewdavidwong added C: Arch Linux The Arch Linux template needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. labels Jan 14, 2025
alimirjamali added a commit to alimirjamali/qubes-core-agent-linux that referenced this issue Jan 14, 2025
alimirjamali added a commit to alimirjamali/qubes-core-agent-linux that referenced this issue Jan 14, 2025
@Justasic
Copy link

Arch Linux uses systemd by default, would it be more prudent to use $(hostnamectl hostname)?

@alimirjamali
Copy link
Author

Arch Linux uses systemd by default, would it be more prudent to use $(hostnamectl hostname)?

This should also work. The PR I submitted earlier uses cat. And it has gone through OpenQA test already. Overall this is a minor bug with different ways to fix it.

@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jan 18, 2025
alimirjamali added a commit to alimirjamali/qubes-core-agent-linux that referenced this issue Jan 20, 2025
fixes: QubesOS/qubes-issues#9710

`hostname` is replaced with `hostnamectl` on Archlinux (and systemd)
alimirjamali added a commit to alimirjamali/qubes-core-agent-linux that referenced this issue Jan 21, 2025
fixes: QubesOS/qubes-issues#9710

`hostname` is replaced with `hostnamectl` on Archlinux
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue Jan 26, 2025
* origin/pr/547:
  Remove `hostname` dependency for Archlinux

Pull request description:

fixes: QubesOS/qubes-issues#9710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. C: Arch Linux The Arch Linux template diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants