Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816303 - sys-apps/dbus-1.12.20-r3: fails to compile (I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd)
Summary: sys-apps/dbus-1.12.20-r3: fails to compile (I/O error : Attempt to load netwo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
: 816456 816672 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-05 00:10 UTC by Sam James
Modified: 2022-11-06 08:20 UTC (History)
5 users (show)

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


Attachments
build.log (file_816303.txt,390.86 KB, text/plain)
2021-10-05 00:10 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 00:10:41 UTC
Created attachment 743010 [details]
build.log

This is the second report recently (in the last few hours) in #gentoo. Possibly related to recent build-docbook-catalog changes?

---
# emerge --info '=sys-apps/dbus-1.12.20-r3::gentoo'
Portage 3.0.26 (python 3.9.7-final-0, default/linux/amd64/17.1/hardened, gcc-10.3.0, glibc-2.33-r7, 5.14.8-zen1-1-zen x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.14.8-zen1-1-zen-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.33
KiB Mem:    32819844 total,   2953368 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 04 Oct 2021 00:45:01 +0000
Head commit of repository gentoo: 0555f2950397a343572a66890215f7d351357358
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r2::gentoo
dev-lang/python:          3.9.7::gentoo, 3.10.0_rc2::gentoo
dev-lang/rust:            1.55.0::gentoo
dev-util/cmake:           3.21.3::gentoo
sys-apps/baselayout:      2.8::gentoo
sys-apps/openrc:          0.44.5::gentoo
sys-apps/sandbox:         2.25::gentoo
sys-devel/autoconf:       2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo, 11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=8"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-march=native -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mtune=native -O2 -pipe"
GENTOO_MIRRORS="https://gentoo.mirror.garr.it/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="it_IT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8 -l8"
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"
USE="X acl amd64 bzip2 corefonts crypt gtk hardened iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl nvidia openmp openssl pam pcre pie readline seccomp split-usr ssl ssp truetype unicode xattr xml xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="mmx mmxext sse sse2" 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" GRUB_PLATFORMS="efi-64" 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-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 00:13:01 UTC
Snippet:
```

I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
Document /var/tmp/portage/sys-apps/dbus-1.12.20-r3/work/dbus-1.12.20-abi_x86_64.amd64/doc/dbus-send.1.xml does not validate
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
/var/tmp/portage/sys-apps/dbus-1.12.20-r3/work/dbus-1.12.20-abi_x86_64.amd64/doc/dbus-monitor.1.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
                   "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
                                                                            ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
Document /var/tmp/portage/sys-apps/dbus-1.12.20-r3/work/dbus-1.12.20-abi_x86_64.amd64/doc/dbus-monitor.1.xml does not validate
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
/var/tmp/portage/sys-apps/dbus-1.12.20-r3/work/dbus-1.12.20-abi_x86_64.amd64/doc/dbus-test-tool.1.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
D DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
                                                                               ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
Document /var/tmp/portage/sys-apps/dbus-1.12.20-r3/work/dbus-1.12.20-abi_x86_64.amd64/doc/dbus-test-tool.1.xml does not validate
make[2]: *** [Makefile:881: dbus-update-activation-environment.1] Error 13
```
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 00:20:25 UTC
Users report that running build-docbook-catalog gives an error:
```
# build-docbook-catalog
/usr/sbin/build-docbook-catalog: row 105: //run/lock/build-docbook-catalog.lock: file does not exist
```

Running `mkdir -p /run/lock; build-docbook-catalog` allows dbus to install.
Comment 3 SpanKY gentoo-dev 2021-10-05 00:52:07 UTC
(In reply to Sam James from comment #2)

/run/lock is provided by the OS, not random packages.  if your system isn't creating it (e.g. at boot), then you should figure out why your system is broken.

i can make it an explicit check+abort, but it wouldn't change the underlying problem.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 00:56:42 UTC
(In reply to SpanKY from comment #3)
> (In reply to Sam James from comment #2)
> 
> /run/lock is provided by the OS, not random packages.  if your system isn't
> creating it (e.g. at boot), then you should figure out why your system is
> broken.
> 
> i can make it an explicit check+abort, but it wouldn't change the underlying
> problem.

I didn't think it should create it (obviously, why would it?)

...but the problem is that it doesn't seem to exist in stages. So whatever it is you want to create it currently isn't.
Comment 5 SpanKY gentoo-dev 2021-10-05 01:07:11 UTC
(In reply to Sam James from comment #4)

/run is a tmpfs mount.  that's why the init system is responsible for creating it, and why precreating it in stage tarballs doesn't work.

what init system are you using ?
Comment 6 Larry the Git Cow gentoo-dev 2021-10-05 01:14:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/build-docbook-catalog.git/commit/?id=2b69063f19a03e9224eeaa6cecd35dd2004127c0

commit 2b69063f19a03e9224eeaa6cecd35dd2004127c0
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: 2021-10-05 01:11:27 +0000
Commit:     Mike Frysinger <vapier@gentoo.org>
CommitDate: 2021-10-05 01:11:27 +0000

    add explicit check & error message for /run/lock
    
    If the system is missing its lock dir, show an explicit error message
    instead of confusing bash "file does not exist" errors.
    
    Bug: https://bugs.gentoo.org/816303
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

 build-docbook-catalog | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 01:23:07 UTC
(In reply to SpanKY from comment #5)
> (In reply to Sam James from comment #4)
> 
> /run is a tmpfs mount.  that's why the init system is responsible for
> creating it, and why precreating it in stage tarballs doesn't work.
> 
> what init system are you using ?

I use a bit of OpenRC and systemd, but this was a forward from a user using OpenRC. But the init system doesn't make a difference if you're at the install stage of Gentoo and you're chrooting in.

If /run/lock doesn't exist in the stage, something has to create it before you boot in, if you want to be able to install packages.

(A user did report this happening after booting but I couldn't verify this, and I'd say that's a different bug.)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 01:23:37 UTC
(In reply to Sam James from comment #7)
> (In reply to SpanKY from comment #5)
> > (In reply to Sam James from comment #4)
> > 
> > /run is a tmpfs mount.  that's why the init system is responsible for
> > creating it, and why precreating it in stage tarballs doesn't work.
> > 
> > what init system are you using ?
> 
> 
> If /run/lock doesn't exist in the stage, something has to create it before
> you boot in, if you want to be able to install packages.

(if you want to install stuff before booting, I mean)
Comment 9 SpanKY gentoo-dev 2021-10-05 04:04:17 UTC
we bind mount things like /dev /sys /proc into the stage tarball before doing things.  let's just add /run to the list and call it a day.
https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#Mounting_the_necessary_filesystems

it's already needed if you want to enter a chroot from a non-Gentoo system where /dev/ has symlinks to paths under /run/.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 04:09:27 UTC
(In reply to SpanKY from comment #9)
> we bind mount things like /dev /sys /proc into the stage tarball before
> doing things.  let's just add /run to the list and call it a day.
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/
> Installation#Mounting_the_necessary_filesystems
> 
> it's already needed if you want to enter a chroot from a non-Gentoo system
> where /dev/ has symlinks to paths under /run/.

wfm
Comment 11 Mike Gilbert gentoo-dev 2021-10-05 16:16:59 UTC
I will just point out that the systemd developers consider /run/lock and /var/lock to be "legacy" paths. Whatever that means.

https://github.com/systemd/systemd/blob/v249/tmpfiles.d/legacy.conf#L13
Comment 12 Mike Gilbert gentoo-dev 2021-10-05 16:18:54 UTC
An nicer alternative to bind-mounting /run on systemd systems would be to run systemd-tmpfiles --create after chrooting.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-05 16:49:04 UTC
*** Bug 816456 has been marked as a duplicate of this bug. ***
Comment 14 Mike Gilbert gentoo-dev 2021-10-05 17:15:10 UTC
(In reply to Mike Gilbert from comment #12)

For this to work, the user would still need to mount /run as a tmpfs. I guess a bind-mount would work just as well.
Comment 15 SpanKY gentoo-dev 2021-10-06 07:35:20 UTC
FHS has picked up /run, but not /run/lock.  it still has /var/lock unchanged.

considering we do /var/run->/run and /var/lock->/run/lock, using /var/lock wouldn't help either.

strictly speaking, we don't need a tmpfs on /run, but we also don't really want to go scribbling in there and orphan files on the rootfs indefinitely (once the system boots, it mounts a tmpfs over /run, and no one actually notices the stale content in the rootfs /run).

i don't want to use /tmp because of the obvious security implications.  it's not impossible, but it isn't a trivial amount of code, and doing this in shell makes it all even worse to reason about.

i don't want to use /etc/xml like we used to because flock's process based approach means we can never free the file once created (lest we get into reader+writer races again).  the old locking method of hardlinks was susceptible to permanent wedging until an admin manually recovers.

i don't think we can safely allow multiple instances to run and just clobber each other's work because we cannot guarantee overall ordering between regen & file install phases.  for example:
* job 1: install docbook-xml-dtd-4.4 -> regen
* job 2: install docbook-xml-dtd-4.5 -> regen
if job 1 reads the state of the world (just 4.4) and the kernel schedules it out, then job 2 reads the state of the world (4.4+4.5) and writes out its complete config, then the kernel resumes job 1 regen, we lose the 4.5 entry.  it's a bit pathological, but i dug into this in the fist place precisely because CrOS builders were hitting these pathological race conditions (doing 1000's of builds a day with 100's of packages in parallel and hitting loads of 1k+ makes racy edge cases easy to hit).

so at this point, having handbooks bind mount /run seems like the easiest route forward.
Comment 17 Mike Gilbert gentoo-dev 2021-10-06 17:44:42 UTC
*** Bug 816672 has been marked as a duplicate of this bug. ***
Comment 18 Mike Gilbert gentoo-dev 2021-10-06 17:52:44 UTC
I updated the handbook with the instructions to bind mount /run.

https://wiki.gentoo.org/index.php?title=Handbook%3AParts%2FInstallation%2FBase&type=revision&diff=1016121&oldid=1004788
Comment 19 SpanKY gentoo-dev 2021-10-06 19:00:21 UTC
(In reply to Mike Gilbert from comment #18)
> I updated the handbook with the instructions to bind mount /run.

thanks.  i hate foisting the issue onto users, but i'm not seeing anything better at this point.

i guess if anyone comes up with a better idea, feel free to reopen.
Comment 20 Larry the Git Cow gentoo-dev 2021-10-07 02:48:23 UTC
The bug has been referenced in the following commit(s):

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

commit bad0bc11d42710957c6d6786a9db381308e55c4b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-07 02:47:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-07 02:47:27 +0000

    app-text/docbook-xsl-stylesheets: die on failed build-docbook-catalog
    
    Fail loudly if build-docbook-catalog wasn't successful; this is likely
    due to /run not being (bind-)mounted (in chroots/new installs).
    
    Bug: https://bugs.gentoo.org/816303
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Sam James <sam@gentoo.org>

 .../docbook-xsl-stylesheets-1.79.1-r2.ebuild                        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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

commit cb200416b701b9c4bcbcec2dea3db8a23f3f73f0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-07 02:47:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-07 02:47:19 +0000

    app-text/docbook-xsl-ns-stylesheets: die on failed build-docbook-catalog
    
    Fail loudly if build-docbook-catalog wasn't successful; this is likely
    due to /run not being (bind-)mounted (in chroots/new installs).
    
    Bug: https://bugs.gentoo.org/816303
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Sam James <sam@gentoo.org>

 .../docbook-xsl-ns-stylesheets-1.79.1.ebuild                        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98669e96960101455f34cb8f7c710cdb0b84e73c

commit 98669e96960101455f34cb8f7c710cdb0b84e73c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-07 02:47:11 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-07 02:47:11 +0000

    app-text/docbook-xml-simple-dtd: die on failed build-docbook-catalog
    
    Fail loudly if build-docbook-catalog wasn't successful; this is likely
    due to /run not being (bind-)mounted (in chroots/new installs).
    
    Bug: https://bugs.gentoo.org/816303
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Sam James <sam@gentoo.org>

 .../docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild   | 8 ++++++--
 .../docbook-xml-simple-dtd-4.1.2.4-r4.ebuild                      | 8 ++++++--
 .../docbook-xml-simple-dtd-4.1.2.5-r3.ebuild                      | 8 ++++++--
 3 files changed, 18 insertions(+), 6 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26a4a7456ad6509d42ef1c3f92aee8eea3f7a04b

commit 26a4a7456ad6509d42ef1c3f92aee8eea3f7a04b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-07 02:47:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-07 02:47:02 +0000

    app-text/docbook-xml-dtd: die on failed build-docbook-catalog
    
    Fail loudly if build-docbook-catalog wasn't successful; this is likely
    due to /run not being (bind-)mounted (in chroots/new installs).
    
    Bug: https://bugs.gentoo.org/816303
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Sam James <sam@gentoo.org>

 app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild | 8 ++++++--
 app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild   | 8 ++++++--
 app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild   | 8 ++++++--
 app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild   | 8 ++++++--
 app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild   | 8 ++++++--
 5 files changed, 30 insertions(+), 10 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04aeea5c0f2dfd4be2f2be64b91d579e1a92dd05

commit 04aeea5c0f2dfd4be2f2be64b91d579e1a92dd05
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-07 02:46:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-07 02:46:54 +0000

    app-text/build-docbook-catalog: die on failed build-docbook-catalog
    
    Fail loudly if build-docbook-catalog wasn't successful; this is likely
    due to /run not being (bind-)mounted (in chroots/new installs).
    
    Bug: https://bugs.gentoo.org/816303
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Sam James <sam@gentoo.org>

 app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild | 3 ++-
 app-text/build-docbook-catalog/build-docbook-catalog-2.0.ebuild  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Comment 21 Larry the Git Cow gentoo-dev 2021-10-28 04:07:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=0e9e12aadb889766d61c0561b9723e71542d43e6

commit 0e9e12aadb889766d61c0561b9723e71542d43e6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-07 03:15:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-28 04:07:33 +0000

    lib/_emerge/actions.py: warn on missing /run
    
    Newer versions of build-docbook-catalog use
    /run/lock. This exposed that we weren't
    asking users to mount /run in the handbook.
    
    Check if it exists and warn if it doesn't.
    
    This should primarily (exclusively?) be a
    problem in chroots given an init system
    should be creating this.
    
    Bug: https://bugs.gentoo.org/816303
    Closes: https://github.com/gentoo/portage/pull/762
    Reviewed-by: Alec Warner <antarus@gentoo.org>
    Reviewed-by: Mike Gilbert <floppym@gentoo.org>
    Thanks-to: Duncan
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/_emerge/actions.py | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)
Comment 22 Enne Eziarc 2021-11-10 02:03:13 UTC
If it's not too much to ask, could the error message also explicitly say it's about */run/lock/* being missing? I spent a while yesterday trying to figure out why my builds were now failing in a chroot that had (until now) a reasonably correct mount tree with an empty tmpfs for /run/.


I'm wondering if it's worth filing a follow-up bug about the OpenRC path for creating /run/lock being buried in /lib/rc/, when it could be using tmpfiles.d instead (for this, and other things like cleaning /tmp/).
Comment 23 SpanKY gentoo-dev 2021-11-10 02:42:48 UTC
please post the exact error message you're talking about
Comment 24 Andreas K. Hüttel archtester gentoo-dev 2022-01-16 15:18:51 UTC
Actually this is somewhat incomplete. The ebuilds should pass --root=${ROOT} to build-docbook-catalog, otherwise they regenerate the wrong catalog.

[Found when poking stage1 build failures...]

(In reply to Larry the Git Cow from comment #20)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=bad0bc11d42710957c6d6786a9db381308e55c4b
> 
> commit bad0bc11d42710957c6d6786a9db381308e55c4b
> Author:     Sam James <sam@gentoo.org>
> AuthorDate: 2021-10-07 02:47:27 +0000
> Commit:     Sam James <sam@gentoo.org>
> CommitDate: 2021-10-07 02:47:27 +0000
> 
>     app-text/docbook-xsl-stylesheets: die on failed build-docbook-catalog
>     
>     Fail loudly if build-docbook-catalog wasn't successful; this is likely
>     due to /run not being (bind-)mounted (in chroots/new installs).
>     
>     Bug: https://bugs.gentoo.org/816303
>     Package-Manager: Portage-3.0.28, Repoman-3.0.3
>     Signed-off-by: Sam James <sam@gentoo.org>
> 
>  .../docbook-xsl-stylesheets-1.79.1-r2.ebuild                        | 6
> ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=cb200416b701b9c4bcbcec2dea3db8a23f3f73f0
> 

[...]
Comment 25 Mike Gilbert gentoo-dev 2022-01-16 15:40:47 UTC
build-docbook-catalog should use ROOT from the environment if it is not specified on the command line.

Please file a new bug for this possibly unrelated issue with stage building.
Comment 26 Andreas K. Hüttel archtester gentoo-dev 2022-01-16 15:45:49 UTC
(In reply to Andreas K. Hüttel from comment #24)
> Actually this is somewhat incomplete. The ebuilds should pass --root=${ROOT}
> to build-docbook-catalog, otherwise they regenerate the wrong catalog.
> 
> [Found when poking stage1 build failures...]
> 
Never mind, that is picked up from the environment.