Discussion:
Bug#983855: golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
(too old to reply)
Andreas Beckmann
2021-03-02 09:30:02 UTC
Permalink
Package: golang-github-coreos-bbolt-dev
Version: 1.3.5-1
Severity: serious
User: debian-***@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package fails to upgrade from
'stretch'.
It installed fine in 'buster', then the upgrade to 'bullseye' fails.

From the attached log (scroll to the bottom...):

Preparing to unpack .../golang-github-coreos-bbolt-dev_1.3.5-1_all.deb ...
Unpacking golang-github-coreos-bbolt-dev (1.3.5-1) over (1.3.1-coreos.5-3) ...
dpkg: error processing archive /var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb (--unpack):
unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Preparing to unpack .../libss2_1.46.1-1_amd64.deb ...
Unpacking libss2:amd64 (1.46.1-1) over (1.44.5-1+deb10u3) ...
Errors were encountered while processing:
/var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb

/usr/share/gocode/src/go.etcd.io/bbolt is a symlink and possibly
dangling at the time the error happens:

lrwxrwxrwx 1 root root 26 Jan 20 2019 /usr/share/gocode/src/go.etcd.io/bbolt -> ../github.com/coreos/bbolt

Maybe some symlink_to_dir migration is missing?

cheers,

Andreas
Debian Bug Tracking System
2021-03-02 16:40:02 UTC
Permalink
tags -1 help
Bug #983855 [golang-github-coreos-bbolt-dev] golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Added tag(s) help.
--
983855: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983855
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Debian Bug Tracking System
2021-03-02 21:40:01 UTC
Permalink
reassign -1 dpkg 1.20.7.1
Bug #983855 [golang-github-coreos-bbolt-dev] golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Bug reassigned from package 'golang-github-coreos-bbolt-dev' to 'dpkg'.
No longer marked as found in versions golang-github-coreos-bbolt/1.3.5-1.
Ignoring request to alter fixed versions of bug #983855 to the same values previously set
Bug #983855 [dpkg] golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Marked as found in versions dpkg/1.20.7.1.
retitle -1 dpkg: dpkg-realpath is broken
Bug #983855 [dpkg] golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Changed Bug title to 'dpkg: dpkg-realpath is broken' from 'golang-github-coreos-bbolt-dev: fails to upgrade from 'buster': unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory'.
severity -1 grave
Bug #983855 [dpkg] dpkg: dpkg-realpath is broken
Severity set to 'grave' from 'serious'
affects -1 + golang-github-coreos-bbolt-dev golang-github-xordataexchange-crypt-dev
Bug #983855 [dpkg] dpkg: dpkg-realpath is broken
Added indication that 983855 affects golang-github-coreos-bbolt-dev and golang-github-xordataexchange-crypt-dev
tag -1 - help
Bug #983855 [dpkg] dpkg: dpkg-realpath is broken
Removed tag(s) help.
--
983855: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983855
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Andreas Beckmann
2021-03-02 21:40:01 UTC
Permalink
Control: reassign -1 dpkg 1.20.7.1
Control: retitle -1 dpkg: dpkg-realpath is broken
Control: severity -1 grave
Control: affects -1 + golang-github-coreos-bbolt-dev golang-github-xordataexchange-crypt-dev
Control: tag -1 - help
Post by Andreas Beckmann
during a test with piuparts I noticed your package fails to upgrade from
'stretch'.
It installed fine in 'buster', then the upgrade to 'bullseye' fails.
Preparing to unpack .../golang-github-coreos-bbolt-dev_1.3.5-1_all.deb ...
Unpacking golang-github-coreos-bbolt-dev (1.3.5-1) over (1.3.1-coreos.5-3) ...
unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory
Preparing to unpack .../libss2_1.46.1-1_amd64.deb ...
Unpacking libss2:amd64 (1.46.1-1) over (1.44.5-1+deb10u3) ...
/var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb
/usr/share/gocode/src/go.etcd.io/bbolt is a symlink and possibly
lrwxrwxrwx 1 root root 26 Jan 20 2019 /usr/share/gocode/src/go.etcd.io/bbolt -> ../github.com/coreos/bbolt
Maybe some symlink_to_dir migration is missing?
Not sure what happens, it does have symlink_to_dir already.
https://sources.debian.org/src/golang-github-coreos-bbolt/1.3.5-1/debian/maintscript/
The good thing is that it is easily reproducible ...

injecting set -x into dpkg-maintscript-helper reveals

Preparing to unpack .../golang-github-coreos-bbolt-dev_1.3.5-1_all.deb ...
+ local SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt
+ local SYMLINK_TARGET=/usr/share/gocode/src/github.com/coreos/bbolt
+ local LASTVERSION=1.3.3-1~
+ local PACKAGE=--
+ [ 1.3.3-1~ = -- ]
+ [ -- = -- -o -z -- ]
+ PACKAGE=golang-github-coreos-bbolt-dev:all
+ [ /usr/share/gocode/src/go.etcd.io/bbolt != -- -a 7 -gt 0 ]
+ shift
+ [ /usr/share/gocode/src/github.com/coreos/bbolt != -- -a 6 -gt 0 ]
+ shift
+ [ 1.3.3-1~ != -- -a 5 -gt 0 ]
+ shift
+ [ -- != -- -a 4 -gt 0 ]
+ [ 4 -gt 0 ]
+ shift
+ [ -n preinst ]
+ [ -n golang-github-coreos-bbolt-dev ]
+ [ -n golang-github-coreos-bbolt-dev:all ]
+ [ -n /usr/share/gocode/src/go.etcd.io/bbolt ]
+ [ usr/share/gocode/src/go.etcd.io/bbolt = /usr/share/gocode/src/go.etcd.io/bbolt ]
+ [ /usr/share/gocode/src/go.etcd.io/bbolt = /usr/share/gocode/src/go.etcd.io/bbolt ]
+ [ -n /usr/share/gocode/src/github.com/coreos/bbolt ]
+ [ -n upgrade ]
+ validate_optional_version 1.3.3-1~
+ local VERSION=1.3.3-1~
+ [ -z 1.3.3-1~ ]
+ dpkg --validate-version -- 1.3.3-1~
+ VERSIONCHECK=
+ debug Executing /usr/bin/dpkg-maintscript-helper symlink_to_dir in preinst of golang-github-coreos-bbolt-dev
+ [ -n 1 ]
+ echo DEBUG: dpkg-maintscript-helper: Executing /usr/bin/dpkg-maintscript-helper symlink_to_dir in preinst of golang-github-coreos-bbolt-dev
DEBUG: dpkg-maintscript-helper: Executing /usr/bin/dpkg-maintscript-helper symlink_to_dir in preinst of golang-github-coreos-bbolt-dev
+ debug SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt -> /usr/share/gocode/src/github.com/coreos/bbolt PACKAGE=golang-github-coreos-bbolt-dev:all LASTVERSION=1.3.3-1~ ACTION=upgrade PARAM=1.3.1-coreos.5-3
+ [ -n 1 ]
+ echo DEBUG: dpkg-maintscript-helper: SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt -> /usr/share/gocode/src/github.com/coreos/bbolt PACKAGE=golang-github-coreos-bbolt-dev:all LASTVERSION=1.3.3-1~ ACTION=upgrade PARAM=1.3.1-coreos.5-3
DEBUG: dpkg-maintscript-helper: SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt -> /usr/share/gocode/src/github.com/coreos/bbolt PACKAGE=golang-github-coreos-bbolt-dev:all LASTVERSION=1.3.3-1~ ACTION=upgrade PARAM=1.3.1-coreos.5-3
+ [ upgrade = install -o upgrade = upgrade ]
+ [ -n 1.3.1-coreos.5-3 ]
+ [ -h /usr/share/gocode/src/go.etcd.io/bbolt ]
+ symlink_match /usr/share/gocode/src/go.etcd.io/bbolt /usr/share/gocode/src/github.com/coreos/bbolt
+ local SYMLINK=/usr/share/gocode/src/go.etcd.io/bbolt
+ local SYMLINK_TARGET=/usr/share/gocode/src/github.com/coreos/bbolt
+ readlink /usr/share/gocode/src/go.etcd.io/bbolt
+ [ ../github.com/coreos/bbolt = /usr/share/gocode/src/github.com/coreos/bbolt ]
+ dpkg-realpath /usr/share/gocode/src/go.etcd.io/bbolt
+ [ /github.com/coreos/bbolt = /usr/share/gocode/src/github.com/coreos/bbolt ]
+ exit 0
Unpacking golang-github-coreos-bbolt-dev (1.3.5-1) over (1.3.1-coreos.5-3) ...
dpkg: error processing archive /var/cache/apt/archives/golang-github-coreos-bbolt-dev_1.3.5-1_all.deb (--unpack):
unable to install new version of '/usr/share/gocode/src/go.etcd.io/bbolt/allocate_test.go': No such file or directory

# readlink /usr/share/gocode/src/go.etcd.io/bbolt
../github.com/coreos/bbolt
# readlink -f /usr/share/gocode/src/go.etcd.io/bbolt
/usr/share/gocode/src/github.com/coreos/bbolt
# dpkg-realpath /usr/share/gocode/src/go.etcd.io/bbolt
/github.com/coreos/bbolt

The output from dpkg-realpath is wrong, causing
dpkg-maintscript-helper to skip its job.

Severity grave since I'm afraid that bug prepares for future upgrade
errors since several dpkg-maintscript-helper actions may have been
silently skipped without causing immediate trouble.

Andreas
Debian Bug Tracking System
2021-04-13 22:00:03 UTC
Permalink
Your message dated Tue, 13 Apr 2021 21:48:45 +0000
with message-id <E1lWQtp-000Hek-***@fasolo.debian.org>
and subject line Bug#983855: fixed in dpkg 1.20.8
has caused the Debian Bug report #983855,
regarding dpkg: dpkg-realpath is broken
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
983855: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983855
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Guillem Jover
2021-04-13 22:20:01 UTC
Permalink
Control: tag 983855 pending

Hi!

Bug #983855 in package dpkg reported by you has been fixed in
the dpkg/dpkg.git Git repository. You can see the changelog below, and
you can check the diff of the fix at:

https://git.dpkg.org/cgit/dpkg/dpkg.git/diff/?id=d449b7f05

---
dpkg-realpath: Fix resolution for absolute symlinks on «/»

We should not reset the resulting pathname to be the root directory when
the root directory is empty, as that will happen to always match.

Closes: #983855
Debian Bug Tracking System
2021-04-13 22:20:01 UTC
Permalink
Post by Guillem Jover
tag 983855 pending
Bug #983855 {Done: Guillem Jover <***@debian.org>} [dpkg] dpkg: dpkg-realpath is broken
Added tag(s) pending.
--
983855: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983855
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...