[Bug 1915923] Re: [SRU] update-pciids in pciutils fails to create hard link
Łukasz Zemczak
1915923 at bugs.launchpad.net
Tue Apr 6 08:34:05 UTC 2021
Hello C.Schmidbauer, or anyone else affected,
Accepted pciutils into focal-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/pciutils/1:3.6.4-1ubuntu0.20.04.1
in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
focal to verification-done-focal. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-focal. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: pciutils (Ubuntu Focal)
Status: In Progress => Fix Committed
** Tags added: verification-needed verification-needed-focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pciutils in Ubuntu.
https://bugs.launchpad.net/bugs/1915923
Title:
[SRU] update-pciids in pciutils fails to create hard link
Status in pciutils package in Ubuntu:
Fix Released
Status in pciutils source package in Focal:
Fix Committed
Bug description:
[Impact]
* People who use update-pciids more than once are unable to run it a
second time without errors due to a missing "-f" in the "ln" line
being called as the symlink already exists. This was identified
upstream and fixed in later versions, but was not implemented in
Focal. The patch in question is fixed in a new upload and attached
patch.
[Test Plan]
* Install pciutils
* Run 'sudo update-pciids'
* Run 'sudo update-pciids' a second time.
* "ln" will return an error explaining the hardlink already exists.
[Where problems could occur]
* If this patch is in error, then the entire command will cause the
same problem or the link of the '.old' file will be erased entirely.
This is highly unlikely.
[Other Info]
* Corrected patch is attached to this bug.
------
Original bug report:
Running on Ubuntu 20.04 LTS, the `.old` file does not seem to be
cleaned up properly.
It seems someone forgot to add the "-f" from the respective upstream
commit:
https://github.com/pciutils/pciutils/commit/b6a0091e4a17dcc01c84dfe233e861fe6e82b1c4
First run:
```
$ sudo sh -x /usr/sbin/update-pciids
+ set -e
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids
+ DEST=/usr/share/misc/pci.ids
+ PCI_COMPRESSED_IDS=
+ GREP=grep
+ [ = -q ]
+ quiet=false
+ touch /usr/share/misc/pci.ids
+ [ = 1 ]
+ which bzip2
+ DECOMP=bzip2 -d
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ which curl
+ DL=curl -o /usr/share/misc/pci.ids.new https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ false
+ curl -o /usr/share/misc/pci.ids.new https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 265k 100 265k 0 0 634k 0 --:--:-- --:--:-- --:--:-- 635k
+ bzip2 -d
+ grep ^C /usr/share/misc/pci.ids.neww
+ [ -f /usr/share/misc/pci.ids ]
+ ln /usr/share/misc/pci.ids /usr/share/misc/pci.ids.old
+ chmod -f --reference=/usr/share/misc/pci.ids.old /usr/share/misc/pci.ids.neww
+ mv /usr/share/misc/pci.ids.neww /usr/share/misc/pci.ids
+ rm /usr/share/misc/pci.ids.new
+ [ /usr/share/misc/pci.ids != /usr/share/misc/pci.ids ]
+ false
+ echo Done.
Done.
```
Second run:
```
$ sudo sh -x /usr/sbin/update-pciids
+ set -e
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids
+ DEST=/usr/share/misc/pci.ids
+ PCI_COMPRESSED_IDS=
+ GREP=grep
+ [ = -q ]
+ quiet=false
+ touch /usr/share/misc/pci.ids
+ [ = 1 ]
+ which bzip2
+ DECOMP=bzip2 -d
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ which curl
+ DL=curl -o /usr/share/misc/pci.ids.new https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ false
+ curl -o /usr/share/misc/pci.ids.new https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 265k 100 265k 0 0 420k 0 --:--:-- --:--:-- --:--:-- 419k
+ bzip2 -d
+ grep ^C /usr/share/misc/pci.ids.neww
+ [ -f /usr/share/misc/pci.ids ]
+ ln /usr/share/misc/pci.ids /usr/share/misc/pci.ids.old
ln: failed to create hard link '/usr/share/misc/pci.ids.old': File exists
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pciutils/+bug/1915923/+subscriptions
More information about the foundations-bugs
mailing list