Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892267 - sys-apps/baselayout-2.11: file collisions with /var/run and /var/lock
Summary: sys-apps/baselayout-2.11: file collisions with /var/run and /var/lock
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-27 19:41 UTC by Johannes Penßel
Modified: 2023-01-28 02:17 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
2.12 log file (sys-apps:baselayout-2.12:20230128-013038.log,4.50 KB, text/x-log)
2023-01-28 01:34 UTC, Brandon Penglase
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Penßel 2023-01-27 19:41:25 UTC
Emerging sys-apps/baselayout-2.11 fails with the following output:

>>> Failed to install sys-apps/baselayout-2.11, Log file:

>>>  '/var/tmp/portage/sys-apps/baselayout-2.11/temp/build.log'

 * Messages for package sys-apps/baselayout-2.11:

 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 *      /var/run
 *      /var/lock
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * net-fs/samba-4.16.7-r2:0::gentoo
 *      /var/lock
 * 
 * Package 'sys-apps/baselayout-2.11' NOT merged due to file collisions.
 * If necessary, refer to your elog messages for the whole content of the
 * above message.
Comment 1 Johannes Penßel 2023-01-27 19:42:28 UTC
$ emerge --info

Portage 3.0.44 (python 3.10.9-final-0, default/linux/amd64/17.1/no-multilib/systemd/merged-usr, gcc-12, glibc-2.36-r7, 6.1.8-gentoo x86_64)
=================================================================
System uname: Linux-6.1.8-gentoo-x86_64-12th_Gen_Intel-R-_Core-TM-_i5-1240P-with-glibc2.36
KiB Mem:    16222252 total,   9962400 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Fri, 27 Jan 2023 19:17:00 +0000
Head commit of repository gentoo: 1809cd1a4636abab16664da4f3160ba5c7826f0c

Timestamp of repository guru: Thu, 26 Jan 2023 09:01:57 +0000
Head commit of repository guru: 479675419808782b37fac7c2376b7210aa87c701

Timestamp of repository kde: Sun, 22 Jan 2023 22:46:52 +0000
Head commit of repository kde: de4aff6bd6e0c5eba9c40f8757e1bcb1be1fd858

sh bash 5.2_p15-r1
ld GNU ld (Gentoo 2.40 p1) 2.40
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.9::gentoo, 3.11.1::gentoo
dev-lang/rust:             1.66.1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.11::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          252.4-r1::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.7::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r7::local
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: True
    sync-git-verify-commit-signature: yes

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: True

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: True

local
    location: /usr/local/portage/overlay
    masters: gentoo
    priority: 10
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -flto=auto -fcf-protection -g -Wall"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -pipe -march=native -flto=auto -fcf-protection -g -Wall"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
F77FLAGS="-O2 -pipe -march=native -flto=auto -fcf-protection -g -Wall"
FCFLAGS="-O2 -pipe -march=native -flto=auto -fcf-protection -g -Wall"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -flto=auto -fcf-protection -g -Wall"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-O2 -pipe -march=native -flto=auto -fcf-protection -g -Wall -Wl,-O1 -Wl,--as-needed -Wl,--build-id"
LEX="flex"
MAKEOPTS="-j16"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C target-cpu=native"
SHELL="/bin/zsh"
USE="acl activities afp aio alsa amd64 amr apng apparmor appstream archive argon2 audit bcrypt blake2 bluetooth boost bs2b btrfs bzip2 cairo caps cet chromium cli colord connection-sharing crypt cryptsetup cups curl cxx dbus default-compiler-rt default-lld device-mapper djvu dracut drm egl eglfs exif fat fdk ffmpeg firewalld flatpak fontconfig fonts fortran freetype fribidi gbm gdbm geolocation gif gles2 glib gmp gnuefi gstreamer harfbuzz highlight hpn hsts ibus iconv icu idn idn2 introspection io-uring ios ipv6 iwd jit jpeg jpeg2k jpegxl kaccounts kbd kde ktls kwallet ladspa lcms libaom libdrm libevent libglvnd libidn2 libmount libproxy libssh2 libtirpc libv4l libxml2 lmdb lto lv2 lzma minizip modemmanager mp3 mpc mpfr mtp natspec ncurses networkmanager nfs nftables nls nptl numa oauth ogg openal openconnect openh264 openmp opus pam pango pcre pcre2 pdf perl pgo phonon pie pipewire plasma plasma-desktop png policykit postproc postscript psl pulseaudio qml qsv qt5 qt6 readline rubberband samba sasl scanner screencast sddm seccomp semantic-desktop share sonnet speex ssl stemmer svg sysprof systemd systemtap taglib tdb test-rust theora threads thunderbolt tiff tpm truetype udev udisks unicode unwind upower v4l vaapi vala valgrind verify-sig vfat vorbis vpx vulkan wayland webengine webp widgets wifi x264 x265 xattr xml xxhash zeroconf zlib zram zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby31" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Mike Gilbert gentoo-dev 2023-01-27 20:01:16 UTC
It seems strange that samba installs things in /var/lock. Nothing should install files there.
Comment 3 thulle 2023-01-27 20:03:01 UTC
It just makes sure there's an empty folder available:

# equery f samba|grep var/lock
/var/lock
/var/lock/samba
/var/lock/samba/.keep_net-fs_samba-0
Comment 4 Larry the Git Cow gentoo-dev 2023-01-27 21:47:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89e1ff1e114d9b8f2aff054f3d7ddc4e40af1512

commit 89e1ff1e114d9b8f2aff054f3d7ddc4e40af1512
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-01-27 21:45:26 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-01-27 21:47:45 +0000

    sys-apps/baselayout: abort if /var/run or /var/lock need to be migrated
    
    Check to see if /var/run or /var/lock are not symlinks and abort if this
    is the case. since this version of baselayout claims ownership of these
    symlinks.
    
    Closes: https://bugs.gentoo.org/892267
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 sys-apps/baselayout/baselayout-2.11.ebuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Comment 5 Brandon Penglase 2023-01-28 00:41:53 UTC
I don't believe this is fixed.
I ran into it as well, applied the patch given, but it still fails with the exact same collision error.
The symlinks are already in place:

Rostia ~ # ls -lah /var
<snip>
lrwxrwxrwx  1 root   root    9 Aug  4  2019 lock -> /run/lock
drwxr-xr-x 14 root   root 4.0K Oct 21  2021 log
lrwxrwxrwx  1 root   root   10 May 30  2022 mail -> spool/mail
lrwxrwxrwx  1 root   root    4 Aug  4  2019 run -> /run
Comment 6 invra 2023-01-28 01:01:29 UTC
Seems like it has not been fixed yet. I am still getting the same output as the first post.
* checking 27 files for package collisions
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 * 	/var/run
 * 	/var/lock
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * net-fs/samba-4.16.7-r2:0::gentoo
 * 	/var/lock
 * 
 * Package 'sys-apps/baselayout-2.11' NOT merged due to file collisions.
 * If necessary, refer to your elog messages for the whole content of the
 * above message.

 * Messages for package sys-apps/baselayout-2.11:

 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 * 	/var/run
 * 	/var/lock
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * net-fs/samba-4.16.7-r2:0::gentoo
 * 	/var/lock
 * 
 * Package 'sys-apps/baselayout-2.11' NOT merged due to file collisions.
 * If necessary, refer to your elog messages for the whole content of the
 * above message.

 * GNU info directory index is up-to-date.
 * After world updates, it is important to remove obsolete packages with
 * emerge --depclean. Refer to `man emerge` for more information.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-28 01:15:10 UTC
(In reply to Brandon Penglase from comment #5)
> I don't believe this is fixed.
> I ran into it as well, applied the patch given, but it still fails with the
> exact same collision error.
> The symlinks are already in place:
> 
> Rostia ~ # ls -lah /var
> <snip>
> lrwxrwxrwx  1 root   root    9 Aug  4  2019 lock -> /run/lock
> drwxr-xr-x 14 root   root 4.0K Oct 21  2021 log
> lrwxrwxrwx  1 root   root   10 May 30  2022 mail -> spool/mail
> lrwxrwxrwx  1 root   root    4 Aug  4  2019 run -> /run

floppym later fixed the check:


 29 commit f64897648984946a0aff01d66dceca89adbb194b
 30 Author: Mike Gilbert <floppym@gentoo.org>
 31 Date:   Fri Jan 27 17:36:57 2023 -0500
 32
 33     sys-apps/baselayout: tweak /var/{run,lock} check
 34
 35     We only need to abort if these exist as a directory.
 36
 37     Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Comment 8 Brandon Penglase 2023-01-28 01:29:55 UTC
(In reply to Sam James from comment #7)

> floppym later fixed the check:
> 
> 
>  29 commit f64897648984946a0aff01d66dceca89adbb194b
>  30 Author: Mike Gilbert <floppym@gentoo.org>
>  31 Date:   Fri Jan 27 17:36:57 2023 -0500
>  32
>  33     sys-apps/baselayout: tweak /var/{run,lock} check
>  34
>  35     We only need to abort if these exist as a directory.
>  36
>  37     Signed-off-by: Mike Gilbert <floppym@gentoo.org>

I applied the changes and it still fails with the same collision error. 

It didn't fix this bug, it just fixed up the directory detection. 

As noted, I'm already symlinks, so it won't fail.
Comment 9 Brandon Penglase 2023-01-28 01:34:11 UTC
Created attachment 849313 [details]
2.12 log file

I just ran a sync and it pulled in 2.12, which just seems to be the patch listed in the last few comments, and it still fails on the collision.
Comment 10 Brandon Penglase 2023-01-28 02:07:28 UTC
I noticed that samba-4.16.7-r3 was later in my emerge list. I ran it manually and then was able to successfully install baselayout. 

So while the patches seemed to fix a different issue, the fix for this specific bug I would say is resolved in emerging samba-4.16.7-r3.
Comment 11 Larry the Git Cow gentoo-dev 2023-01-28 02:08:08 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=bc22069d1a41eeec6e22ba9bf391412a0244f5a7

commit bc22069d1a41eeec6e22ba9bf391412a0244f5a7
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-28 01:59:03 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-28 02:05:06 +0000

    Move /var/run and /var/lock back to the layout target
    
    We need to ensure packages do not install things here and come up with a
    better migration plan.
    
    Bug: https://bugs.gentoo.org/648880
    Bug: https://bugs.gentoo.org/892267
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2023-01-28 02:17:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dcff3b5a60cd6fbead3da67835600db188b6972

commit 3dcff3b5a60cd6fbead3da67835600db188b6972
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-01-28 02:16:54 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-01-28 02:17:33 +0000

    sys-apps/baselayout: add 2.13, drop 2.12
    
    Bug: https://bugs.gentoo.org/648880
    Bug: https://bugs.gentoo.org/892267
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/baselayout/Manifest                        |  2 +-
 ...aselayout-2.12.ebuild => baselayout-2.13.ebuild} | 21 ++++++++-------------
 2 files changed, 9 insertions(+), 14 deletions(-)