Comments (6)
Why bother? webapp-config
just provides some config for the httpd, unless you have other reasons to have python in your docker image it's not worth the footprint, nor is there really a need to have webapp-config
I'd wager. I'd just hit google for a rutorrent httpd (nginx?) config and supply the config myself in finish_rootfs_build
hook or via Dockerfile. Prefer the former if possible as it saves you some docker image layers. You could also do a manual install in a interactive build container and just copy the generated webapp-config files. Google is probably faster though.
As you still seem to struggle a bit with the basic concept I'd recommend reading the How does it work?
section again. package.provided is another important piece in the puzzle to understand. Then just remember this for the hooks:
configure_bob
- you can run emerge manually and it will run in the normal/
context, packages you install won't show up in the rootfs.tar but everything just works(tm) and you also get a free binary package as a bonusconfigure_rootfs_build
- when emerge is executed to handlePACKAGES
, theROOT
env is set to/emerge-root
, except for the portage tree and some gcc related tools emerge doesn't see stuff like python which is installed under/
, depending on the ebuild/upstream build quality of the package this can cause all sorts of errors. For example, if you extend from the java image and try to install a package that requires java for installation, this won't work becausepackage.provided
from the java build container tells emerge that java is already there, but in reality there is no java at/emerge-root
. It's in a previous layer. Those parts of the installation process need to be run via Dockerfile in the last build phase, but ofcourse at that point there is noemerge
you could execute. The right path depends on the package but generally it comes down to one of these:
- build error as expected stuff in the path does not exist => generate binary package in previous hook
- parts of the build process (usually post install) require the full final image context, ruby gem installs for example => run via Dockerfile in the last build phase
finish_rootfs_build
- shouldn't really run emerge here except for uninstalling packages that were only needed at build time in theconfigure_rootfs_build
hook
from kubler.
Looks like one of those few packages that has trouble with a custom root. Try the approach outlined in #33, generate the binary package by installing it manually in configure_bob
hook first. The webapp-config
part most likely needs be run via Dockerfile to find nginx, if nginx is supported by webapp-config
that is, haven't used it in ages. Might need to set the vhosts
use flag to disable webapp-config
.
from kubler.
With vhosts rutorrent is installed normally, but now php is erroring:
* Messages for package dev-lang/php-5.6.26 merged to /emerge-root/:
* FAILED postinst: 1
* ERROR: dev-lang/php-5.6.26::gentoo failed (postinst phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 115: Called pkg_postinst
* environment, line 3332: Called die
* The specific snippet of code:
* eselect php set $m php${SLOT} || die;
*
* If you need support, post the output of `emerge --info '=dev-lang/php-5.6.26::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-lang/php-5.6.26::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-lang/php-5.6.26/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.6.26/temp/environment'.
* Working directory: '/usr/lib64/python3.4/site-packages'
* S: '/var/tmp/portage/dev-lang/php-5.6.26/work/php-5.6.26'
this code in ebuild causing this
# Create the symlinks for php
for m in ${SAPIS}; do
[[ ${m} == 'embed' ]] && continue;
if use $m ; then
local ci=$(eselect php show $m)
if [[ -z $ci ]]; then
eselect php set $m php${SLOT} || die
einfo "Switched ${m} to use php:${SLOT}"
einfo
elif [[ $ci != "php${SLOT}" ]] ; then
elog "To switch $m to use php:${SLOT}, run"
elog " eselect php set $m php${SLOT}"
elog
fi
fi
done
from kubler.
Same deal, generate the binary package in the configure_bob
hook first. You can take a look at the nginx-php5.6 image for a full example. Then either create the symlink for the php binary manually or run eselect
in the second build phase via Dockerfile
.
from kubler.
php is fixed, now webapp-config can't find python, i'll try the same as for php
/emerge-root/usr/sbin/webapp-config: no supported Python implementation variant found!
* ERROR: www-apps/rutorrent-3.7::junkdrawer failed (setup phase):
* Could not read settings from webapp-config!
*
* Call stack:
* ebuild.sh, line 115: Called pkg_setup
* environment, line 1984: Called webapp_pkg_setup
* environment, line 2950: Called webapp_read_config
* environment, line 3001: Called die
* The specific snippet of code:
* ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!";
*
installing webapp-config from configure_bob results in broken baselayout:
* ERROR: sys-apps/baselayout-2.2::gentoo failed (setup phase):
* non-empty dir found where we needed a symlink: /emerge-root/usr/lib
from kubler.
Thanks. Seems it is impossible to avoid many errors because of webapp.eclass, i think it is easier to install it manually instead of using the portage.
from kubler.
Related Issues (20)
- flaggie will be removed from the portage tree on 2023-01-24. HOT 5
- Here we go again: user eclasses have been updated again and causing trouble for Kubler HOT 2
- Apptainer/Singularity support? HOT 2
- flaggie-0.99.3 does not support --strict and --destructive-cleanup
- Use Dockerfile ARGs HOT 4
- bob-core Dockerfile template clobbered RUN command
- error when calling app-portage/flaggie HOT 7
- permission thing HOT 16
- Support proxied / restrictive environments HOT 2
- [BUG]: `POST_BUILD_HC=false` is not honoured HOT 2
- user eclasses updated again
- Example mytest/figlet fails without optional GPG keys HOT 3
- missing gfortran.so HOT 2
- kubler builds broken core image if xzcat not found HOT 1
- acct-user.eclass updated again breaking Kubler patches HOT 1
- FEATURES="-network-sandbox" being stripped from build dependencies
- What is the Glibc Iconv Encodings _iconv_from Feature HOT 2
- MIRROR fails with multiple elements HOT 1
- log file permissions when running as non-root HOT 2
- cannot build builders HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubler.