Giter Site home page Giter Site logo

rutorrent install error about kubler HOT 6 CLOSED

edannenberg avatar edannenberg commented on May 24, 2024
rutorrent install error

from kubler.

Comments (6)

edannenberg avatar edannenberg commented on May 24, 2024 1

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 bonus
  • configure_rootfs_build - when emerge is executed to handle PACKAGES, the ROOT 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 because package.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 no emerge you could execute. The right path depends on the package but generally it comes down to one of these:
  1. build error as expected stuff in the path does not exist => generate binary package in previous hook
  2. 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 the configure_rootfs_build hook

from kubler.

edannenberg avatar edannenberg commented on May 24, 2024

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.

soredake avatar soredake commented on May 24, 2024

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.

edannenberg avatar edannenberg commented on May 24, 2024

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.

soredake avatar soredake commented on May 24, 2024

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.

soredake avatar soredake commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.