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

Make it possible to use Debian VM as UpdateVM for downloading dom0 updates #1029

Closed
marmarek opened this Issue Jun 15, 2015 · 9 comments

Comments

Projects
None yet
4 participants
@marmarek
Member

marmarek commented Jun 15, 2015

No description provided.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jul 8, 2015

Member

Improvements made here: QubesOS/qubes-core-agent-linux@3fdb67a
Needs more testing.

Member

marmarek commented Jul 8, 2015

Improvements made here: QubesOS/qubes-core-agent-linux@3fdb67a
Needs more testing.

@mig5

This comment has been minimized.

Show comment
Hide comment
@mig5

mig5 Jul 18, 2015

I updated by Debian template to use the new version of the script as per above commit, and ensured yum-utils was installed.

But my qubes-dom0-update fails with attached errors: https://gist.github.com/mig5/3ad90f15b8189eb333fd

This actually happens prior to execution of the script in question: it seems to be at the step where the yum repo stuff is tar'ed up on the dom0 and extracted in the guest via pipe to qvm-run. It looks like it missing a / slash in the extraction, maybe a distro-specific issue in use of tar on Debian compared to Fedora.

Maybe I am missing a corresponding update to the qubes-dom0-update script for dom0?

mig5 commented Jul 18, 2015

I updated by Debian template to use the new version of the script as per above commit, and ensured yum-utils was installed.

But my qubes-dom0-update fails with attached errors: https://gist.github.com/mig5/3ad90f15b8189eb333fd

This actually happens prior to execution of the script in question: it seems to be at the step where the yum repo stuff is tar'ed up on the dom0 and extracted in the guest via pipe to qvm-run. It looks like it missing a / slash in the extraction, maybe a distro-specific issue in use of tar on Debian compared to Fedora.

Maybe I am missing a corresponding update to the qubes-dom0-update script for dom0?

@mig5

This comment has been minimized.

Show comment
Hide comment
@mig5

mig5 Jul 18, 2015

I found the issue: /var/lib/qubes/dom0-updates is chown root:root and chmod 755 on the Debian template image.

In the Fedora template, it is chown user:user and chmod 775.

I had to make it chown user:user and chmod 775 in the Debian VM/template before the tar command (and qubes-dom0-update in general) would work successfully (with chmod 755, which I tried first, I still had tar errors on the /var/lib/qubes/dom0-updates/etc subdirectory).

Have you already accounted for this perm fix in the Debian template/qubes-core-agent package? Or perhaps the script could force the perms before the tar execution, after starting the UpdateVM, just to be on the safe side. Happy to supply a patch if I know the right place!

Thanks

mig5 commented Jul 18, 2015

I found the issue: /var/lib/qubes/dom0-updates is chown root:root and chmod 755 on the Debian template image.

In the Fedora template, it is chown user:user and chmod 775.

I had to make it chown user:user and chmod 775 in the Debian VM/template before the tar command (and qubes-dom0-update in general) would work successfully (with chmod 755, which I tried first, I still had tar errors on the /var/lib/qubes/dom0-updates/etc subdirectory).

Have you already accounted for this perm fix in the Debian template/qubes-core-agent package? Or perhaps the script could force the perms before the tar execution, after starting the UpdateVM, just to be on the safe side. Happy to supply a patch if I know the right place!

Thanks

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jul 18, 2015

Member

Apparently file permissions set in "install" stage of package build are
not preserved. According to debian policy
manual

this should be done in postinst script.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Jul 18, 2015

Apparently file permissions set in "install" stage of package build are
not preserved. According to debian policy
manual

this should be done in postinst script.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

marmarek added a commit to marmarek/old-qubes-core-agent-linux that referenced this issue Jul 18, 2015

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Jul 19, 2015

Member

Is it ensured, that user user and group user exists at the time of run of qubes-core-agent-linux's postinst script? Otherwise the postinst script could fail.

For reference/comparison you could look how /var/lib/dpkg/info/tor.postinst handles user account creation and folder permissions.

Member

adrelanos commented Jul 19, 2015

Is it ensured, that user user and group user exists at the time of run of qubes-core-agent-linux's postinst script? Otherwise the postinst script could fail.

For reference/comparison you could look how /var/lib/dpkg/info/tor.postinst handles user account creation and folder permissions.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jul 19, 2015

Member

On Sun, Jul 19, 2015 at 05:00:14AM -0700, Patrick Schleizer wrote:

Is it ensured, that user user and group user exists at the time of run of qubes-core-agent-linux's postinst script? Otherwise the postinst script could fail.

Yes, it is created by qubes-core-agent-linux's preinst script.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Jul 19, 2015

On Sun, Jul 19, 2015 at 05:00:14AM -0700, Patrick Schleizer wrote:

Is it ensured, that user user and group user exists at the time of run of qubes-core-agent-linux's postinst script? Otherwise the postinst script could fail.

Yes, it is created by qubes-core-agent-linux's preinst script.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@marmarek marmarek added the C: Debian label Aug 6, 2015

@marmarek marmarek added this to the Release 3.0 milestone Aug 6, 2015

@rootkovska rootkovska modified the milestones: Release 3.1, Release 3.0 Sep 2, 2015

@rootkovska

This comment has been minimized.

Show comment
Hide comment
@rootkovska

rootkovska Sep 2, 2015

Member

It's too late for adding any new features to 3.0, moving to 3.1 for further considerations.

Member

rootkovska commented Sep 2, 2015

It's too late for adding any new features to 3.0, moving to 3.1 for further considerations.

@rootkovska rootkovska closed this Sep 2, 2015

@rootkovska rootkovska reopened this Sep 2, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Sep 2, 2015

Member

Actually it's not about adding - its already implemented for some time. It's about testing and deciding whether we want to include it in release notes and documentation as supported option.

Member

marmarek commented Sep 2, 2015

Actually it's not about adding - its already implemented for some time. It's about testing and deciding whether we want to include it in release notes and documentation as supported option.

@mig5

This comment has been minimized.

Show comment
Hide comment
@mig5

mig5 Sep 2, 2015

It's been working well for me since July.

mig5 commented Sep 2, 2015

It's been working well for me since July.

marmarek added a commit to QubesOS/qubes-core-admin that referenced this issue Oct 30, 2015

marmarek added a commit to QubesOS/qubes-core-admin that referenced this issue Nov 15, 2015

@marmarek marmarek closed this Feb 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment