clearlinux / swupd-client

Software update client
Other
114 stars 61 forks source link

swupd cannot os-install into a path containing a symlink #1581

Closed gtkramer closed 4 years ago

gtkramer commented 4 years ago

Describe the bug If the path that is passed to os-install contains a symlink, when swupd is trying to do an os-install, it fails right away saying that a symlink cannot be in this path.

To Reproduce

> $ sudo -E swupd os-install --wait-for-scripts --path=/home/clrbuilder/docker/base/chroot --version=33240 --statedir=/home/clrbuilder/docker/base/chroot/var/lib/swupd --format=30 --url=file:///home/update/www --no-boot-update --bundles os-core,os-core-update

Installing OS version 33240
Error: Cannot extract through symlink /home/clrbuilder/docker/base/chroot/var/lib/swupd/manifest/33240/Manifest.MoM
Error: Failed to retrieve 33240 MoM manifest
Error: Unable to download/verify 33240 Manifest.MoM

Expected behavior On this machine, /home/clrbuilder is a symlink pointing to /srv/home/clrbuilder. Swupd should be able to take the realpath from these values and use this instead when doing its operations.

Environment (please complete the following information):