Error to upgrade netcfg (distrobox)

Hi,
Since few days, I have this error to upgrade netcfg inside a box create with distrobox : openSUSE Paste

I choose always “ignore” and I can upgrade others packages, but how upgrade netcfg ?
Thanks

It is small enough to be directly included in the post which had made quoting more simple.

error: unpacking of archive failed on file /etc/hostname: cpio: chown failed - Device or resource busy

Educated guess is that /etc/hostname is bind-mounted inside the container and so cannot be of course deleted and replaced. May be there are some options that will prevent it that you can use temporarily to update

try removing and reinstalling

I don’t know how to solve this . One service to stop before zypper dup ?

If I remove the package then 32 other packages will be removed

sudo zypper remove netcfg
Reading installed packages...
Resolving package dependencies...

The following 32 packages are going to be REMOVED:
  dracut dracut-fips gvfs gvfs-backend-afc gvfs-backend-samba gvfs-backends gvfs-fuse libbd_lvm3 libblockdev libcares2 libgphoto2-6 libmtp-udev libmtp9 lvm2 netcfg pcsc-lite phonon-vlc-lang
  phonon-vlc-qt5 phonon-vlc-qt6 switcheroo-control systemd udev udisks2 udisks2-bash-completion usbmuxd util-linux-systemd vlc vlc-codec-gstreamer vlc-noX vlc-qt vlc-vdpau wget

32 packages to remove.

Package install size change:
              |         0 B    required by packages that will be installed
   -59.3 MiB  |  -   59.3 MiB  released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): 

And why are you answering me? Did I ask what to do?

You could ask on distrobox support channels; or on docker/podman, depending on what you are using.

Yes.

tmpfs on /etc/hostname type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=197996k,nr_inodes=49499,mode=700,uid=1001,gid=1001,inode64)

It effectively resolves in my case to

/run/user/1001/containers/overlay-containers/cdf0fbe9819f60df04f36c6b8a6bc1dc20ecb33ae23cdf3e6222a62d51430f23/userdata/hostname

Well, I could not find how to do it either with docker or podman. Both insist on bind-mounting /etc/hostname. You should really ask distrobox developers.

The following worked for me:

bor@10:~> distrobox enter tw
Starting container...                   	 [ OK ]
Installing basic packages...            	 [ OK ]
Setting up devpts mounts...             	 [ OK ]
Setting up read-only mounts...          	 [ OK ]
Setting up read-write mounts...         	 [ OK ]
Setting up host's sockets integration...	 [ OK ]
Integrating host's themes, icons, fonts...	 [ OK ]
Setting up distrobox profile...         	 [ OK ]
Setting up sudo...                      	 [ OK ]
Setting up user's group list...         	 [ OK ]

Container Setup Complete!
📦[bor@tw ~]$ sudo umount /etc/hostname
📦[bor@tw ~]$ rpm -q netcfg
netcfg-11.6-13.4.noarch
📦[bor@tw ~]$ sudo zypper install --force netcfg
Loading repository data...
Reading installed packages...
Forcing installation of 'netcfg-11.6-13.4.noarch' from repository 'openSUSE-Tumbleweed-Oss'.
Resolving package dependencies...

The following package is going to be reinstalled:
  netcfg

1 package to reinstall.

Package download size:   182,4 KiB

Package install size change:
            |     877,3 KiB  required by packages that will be installed
       0 B  |  -  877,3 KiB  released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): 
Retrieving: netcfg-11.6-13.4.noarch (openSUSE-Tumbleweed-Oss)              (1/1), 182,4 KiB    
Retrieving: netcfg-11.6-13.4.noarch.rpm ...................................[done (213,5 KiB/s)]

Checking for file conflicts: ............................................................[done]
(1/1) Installing: netcfg-11.6-13.4.noarch ...............................................[done]
Running post-transaction scripts ........................................................[done]
📦[bor@tw ~]$ rpm -qf /etc/hostname
netcfg-11.6-13.4.noarch
📦[bor@tw ~]$ 

Yes ! It works !
Thank you very much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.