pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/59686: sysupgrade picks wrong sets filetype for some architectures (sparc64, evbarm-aarch64)



>Number:         59686
>Category:       pkg
>Synopsis:       sysupgrade picks wrong sets filetype for some architectures (sparc64, evbarm-aarch64)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 04 02:00:00 +0000 2025
>Originator:     Steve Rikli
>Release:        sysupgrade-1.5nb11
>Organization:
>Environment:
NetBSD rpi4.home.genyosha.net 10.1_STABLE NetBSD 10.1_STABLE (GENERIC64) #0: Wed Oct  1 15:21:11 UTC 2025  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm

>Description:
sysupgrade(8) selects the wrong compression method file extension for some
system types from the NetBSD daily binary sets builds.

Many NetBSD-daily binary sets are tgz, but not all. For reference:
  https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-11/latest/

and spot-checking a few architectures' binary/sets/ directories, I found:
  tgz     : alpha i386 macppc sgimips sparc sparc64
  tar.xz  : amd64 evbarm-aarch64

The sysupgrade(8) script has this code:

    if [ "$(uname -p)" = 'x86_64' ] || [ "$(uname -p)" = 'sparc64' ]; then
        shtk_config_set ARCHIVE_EXTENSION "tar.xz"
    else
        shtk_config_set ARCHIVE_EXTENSION "tgz"
    fi

along with the (commented) value in default /usr/pkg/etc/sysupgrade.conf :

  # Archive file extension of the sets. For now it can be either 'tgz' or
  # 'tar.xz'.
  #ARCHIVE_EXTENSION=tar.xz

It looks like the code for sparc64 chooses the wrong (tgz) compression method
file extension used by NetBSD project builds; whereas evbarm-aarch64 (et al?)
could make use of the "tar.xz" if-then code but isn't included.

The default config requires changing sysupgrade.conf for sparc64 and
evbarm-aarch64 systems, possibly others; whereas other system types work okay
out of the box, providing a better upgrade experience for sysupgrade users.

>How-To-Repeat:
Run sysupgrade on e.g. Raspberry Pi4b or other evbarm-aarch64 system; it will
attempt to download binary sets with .tgz extension by default.

I don't have a sparc64 system to confirm, but based on the code and the binary
sets directories, I expect it will also choose the wrong binary sets filename
extension, again requiring manual override in sysupgrade.conf .
>Fix:
Suggestions:

1) remove sparc64 from the if-then so it will default to tgz sets

2) add a check for something like '$(uname -m)-$(uname -p)' to match
  "evbarm-aarch64" but not other evbarm-* system types, to get tar.xz sets

Another suggestion from Greg Troxel on the mailing list discussion:
  https://mail-index.netbsd.org/netbsd-users/2025/10/02/msg033218.html

> Perhaps sysupgrade should just look at the place where sets are supposed
> to be and figure out which variant is there and use it.  These are the
> current defaults, but any user can choose to change them.



Home | Main Index | Thread Index | Old Index