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

qvm-dom0-upgrade fails #287

Closed
marmarek opened this Issue Mar 8, 2015 · 17 comments

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 17 Jul 2011 21:21 UTC
When run for the first time, without args, it complains about not being able to open /var/lib/qubes/updates/repodata/repmd.xml

When run with some argument (whatever, e.g. just a '-h'), the UpdateVM displays a message that some number of updates are available and if I want to download them. But then it fails with:

qfile-agent: Fatal error: stat *.rpm (error type: No such file or dir)

Migrated-From: https://wiki.qubes-os.org/ticket/287

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by rafal on 20 Jul 2011 08:25 UTC

Member

marmarek commented Mar 8, 2015

Modified by rafal on 20 Jul 2011 08:25 UTC

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 20 Jul 2011 09:39 UTC
Suggested actions:

  1. change to enable=1 in fedora.repo and fedora-updates.repo in qubes-release-1.1.noarch.rpm.
    These files are copied to updateVM. There are "enable=0" lines there, yumdownloader cannot retrieve packages, and the *.rpm glob is not expanded (because there is no rpm files), thus an error.
  2. having fixed 1, the repmd.xml will be created upon first successful package fetch; so I guess we do not need to create it manually in e.g. qubes-core-dom0 %post

Reassigning to joanna, to give a chance to object to 1).

Member

marmarek commented Mar 8, 2015

Comment by rafal on 20 Jul 2011 09:39 UTC
Suggested actions:

  1. change to enable=1 in fedora.repo and fedora-updates.repo in qubes-release-1.1.noarch.rpm.
    These files are copied to updateVM. There are "enable=0" lines there, yumdownloader cannot retrieve packages, and the *.rpm glob is not expanded (because there is no rpm files), thus an error.
  2. having fixed 1, the repmd.xml will be created upon first successful package fetch; so I guess we do not need to create it manually in e.g. qubes-core-dom0 %post

Reassigning to joanna, to give a chance to object to 1).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 20 Jul 2011 10:23 UTC
One more action: add --resolve to yumdownloader, so that in case user specifies a package as commandline argument, the required dependencies will be fetched as well.

Member

marmarek commented Mar 8, 2015

Comment by rafal on 20 Jul 2011 10:23 UTC
One more action: add --resolve to yumdownloader, so that in case user specifies a package as commandline argument, the required dependencies will be fetched as well.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 20 Jul 2011 13:53 UTC
Another action: do "rpm --import /etc/pki/rpm-gpg/*" somewhere, e.g. in firstboot. Without it, qubes-receive-updates will fail (rather, rpm -Kv that it calls will fail).

Member

marmarek commented Mar 8, 2015

Comment by rafal on 20 Jul 2011 13:53 UTC
Another action: do "rpm --import /etc/pki/rpm-gpg/*" somewhere, e.g. in firstboot. Without it, qubes-receive-updates will fail (rather, rpm -Kv that it calls will fail).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 20 Jul 2011 19:58 UTC
Well, we do not want to alert users (and let them automatically download) every update for every one of 700 rpms that are installed in Dom0. 99% of those updates would be irrelevant for Qubes Dom0.

Besides, I did try the following:

qvm-dom0-upgrade --resolve --enablerepo=fedora-updates vim

and it didn't help anyway. (This should have override the enables=0 flag).

Member

marmarek commented Mar 8, 2015

Comment by joanna on 20 Jul 2011 19:58 UTC
Well, we do not want to alert users (and let them automatically download) every update for every one of 700 rpms that are installed in Dom0. 99% of those updates would be irrelevant for Qubes Dom0.

Besides, I did try the following:

qvm-dom0-upgrade --resolve --enablerepo=fedora-updates vim

and it didn't help anyway. (This should have override the enables=0 flag).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by marmarek on 20 Jul 2011 22:26 UTC
The repo name is 'updates', not 'fedora-updates'.

Perhaps qvm-dom0-upgrade should have additional switch to include common options when installing new packages (--resolve --enablerepo=fedora --enablerepo=updates ?), or just add its when called with package name(s).

Member

marmarek commented Mar 8, 2015

Comment by marmarek on 20 Jul 2011 22:26 UTC
The repo name is 'updates', not 'fedora-updates'.

Perhaps qvm-dom0-upgrade should have additional switch to include common options when installing new packages (--resolve --enablerepo=fedora --enablerepo=updates ?), or just add its when called with package name(s).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 24 Jul 2011 11:19 UTC
I did use '--enablerepo=fedora,update', of course. It was just a typo above.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 24 Jul 2011 11:19 UTC
I did use '--enablerepo=fedora,update', of course. It was just a typo above.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by marmarek on 24 Jul 2011 19:14 UTC
Ah, ok - there is no package 'vim'. Packages is named 'vim-enhanced'.
But of course message should be more descriptive (like "no packages to install")...

Member

marmarek commented Mar 8, 2015

Comment by marmarek on 24 Jul 2011 19:14 UTC
Ah, ok - there is no package 'vim'. Packages is named 'vim-enhanced'.
But of course message should be more descriptive (like "no packages to install")...

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 24 Jul 2011 20:27 UTC

[~](joanna@dom0)$ qvm-dom0-upgrade --resolve --enablerepo=fedora,updates vim-enhanced
Checking for dom0 updates
Running command on VM: 'firewallvm'...
Loaded plugins: post-transaction-actions, presto, refresh-packagekit
file:///var/lib/qubes/updates/repodata/repomd.xml: [14](Errno) Could not open/read file:///var/lib/qubes/updates/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: qubes-dom0-cached. Please verify its path and try again
vim-enhanced
Member

marmarek commented Mar 8, 2015

Comment by joanna on 24 Jul 2011 20:27 UTC

[~](joanna@dom0)$ qvm-dom0-upgrade --resolve --enablerepo=fedora,updates vim-enhanced
Checking for dom0 updates
Running command on VM: 'firewallvm'...
Loaded plugins: post-transaction-actions, presto, refresh-packagekit
file:///var/lib/qubes/updates/repodata/repomd.xml: [14](Errno) Could not open/read file:///var/lib/qubes/updates/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: qubes-dom0-cached. Please verify its path and try again
vim-enhanced
@marmarek

This comment has been minimized.

Show comment
Hide comment

@marmarek marmarek closed this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 28 Jul 2011 11:39 UTC
After I successfully did:

qvm-dom0-upgrade --resolve --enablerepo=fedora vim-enhancced

... I'm still unable to install the rpms, as the qubes-dom0-cached repo is not created under /var/lib/qubes/updates/

Member

marmarek commented Mar 8, 2015

Comment by joanna on 28 Jul 2011 11:39 UTC
After I successfully did:

qvm-dom0-upgrade --resolve --enablerepo=fedora vim-enhancced

... I'm still unable to install the rpms, as the qubes-dom0-cached repo is not created under /var/lib/qubes/updates/

@marmarek marmarek reopened this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 29 Jul 2011 10:34 UTC
As mentioned previously, probably the missing piece is
http://git.qubes-os.org/?p=rafal/installer.git;a=commit;h=3eda9af075c4fd5d4d9040d94959ab700aa63579
prebeta2 branch.

Member

marmarek commented Mar 8, 2015

Comment by rafal on 29 Jul 2011 10:34 UTC
As mentioned previously, probably the missing piece is
http://git.qubes-os.org/?p=rafal/installer.git;a=commit;h=3eda9af075c4fd5d4d9040d94959ab700aa63579
prebeta2 branch.

@marmarek marmarek closed this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 30 Jul 2011 09:56 UTC
Yes, after manually doing rpm --import the qvm-dom0-upgrade seems to be working.

However, when I try to add a new package to dom0, e.g. vim-enhanced by doing:

qvm-dom0-upgrade vim-enhanced --enablerepo=updates --resolve

this correctly downloads all the rpms and puts them into /var/lib/qubes/updates/rpm, but doesn't make them visible to yum, i.e. yum list available returns nothing.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 30 Jul 2011 09:56 UTC
Yes, after manually doing rpm --import the qvm-dom0-upgrade seems to be working.

However, when I try to add a new package to dom0, e.g. vim-enhanced by doing:

qvm-dom0-upgrade vim-enhanced --enablerepo=updates --resolve

this correctly downloads all the rpms and puts them into /var/lib/qubes/updates/rpm, but doesn't make them visible to yum, i.e. yum list available returns nothing.

@marmarek marmarek reopened this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 30 Jul 2011 11:52 UTC
This is yum caching issue - if you do as root "yum clean all; yum list available" it shows up, right ?
Do we want to add metadata_expire=0 to dom0 yum.conf ?

Member

marmarek commented Mar 8, 2015

Comment by rafal on 30 Jul 2011 11:52 UTC
This is yum caching issue - if you do as root "yum clean all; yum list available" it shows up, right ?
Do we want to add metadata_expire=0 to dom0 yum.conf ?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 30 Jul 2011 12:01 UTC
Yes, it worked after yum clean all!

yes, we would like to set expire=0, and also enable fedora repo by default. I will do it in a moment.

Also, we should either:

  1. rename this tool to qvm-dom0-update-downloads, or
  2. make the tool automatically call yum install with the list of packages passed previously to qvm-dom0-update
Member

marmarek commented Mar 8, 2015

Comment by joanna on 30 Jul 2011 12:01 UTC
Yes, it worked after yum clean all!

yes, we would like to set expire=0, and also enable fedora repo by default. I will do it in a moment.

Also, we should either:

  1. rename this tool to qvm-dom0-update-downloads, or
  2. make the tool automatically call yum install with the list of packages passed previously to qvm-dom0-update
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 30 Jul 2011 14:50 UTC
Also, when I do qvm-dom0-upgrades in pre5, it first checks and tells me there are no updates (which is true), but when run subsequently it displays a dialog saying there are 2 downloads avilable. After I click OK, it downloads them, but they are not visible in Dom0 (it would be actually strange if they were, because there are no updates in this case).

Member

marmarek commented Mar 8, 2015

Comment by joanna on 30 Jul 2011 14:50 UTC
Also, when I do qvm-dom0-upgrades in pre5, it first checks and tells me there are no updates (which is true), but when run subsequently it displays a dialog saying there are 2 downloads avilable. After I click OK, it downloads them, but they are not visible in Dom0 (it would be actually strange if they were, because there are no updates in this case).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 31 Jul 2011 11:12 UTC
Hmm... this seems to be no longer a problem on the new ISO build. Closing.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 31 Jul 2011 11:12 UTC
Hmm... this seems to be no longer a problem on the new ISO build. Closing.

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