• Re: [gentoo-user] src_install: dobin failed while merging ebuild

    From Matt Jolly@21:1/5 to All on Sun Nov 17 09:00:01 2024
    Hi,

    On 17/11/24 17:22, whiteman808 wrote:

    I need help with writing ebuild. Ebuild fails to merge.
    Necessary information is located in attachments.
    I haven't actually built this, but if dobin is failing after this step:

    cp $WORK/b001/exe/a.out goimapnotify

    Where is goimapnotify actually being copied to? If you run
    `ebuild foo-1.2.3.ebuild compile` and inspect ${S} (the workdir)
    where is this file?

    dobin is relative to ${S}; you probably just need to adjust that path.

    Let me know how you go with those hints.

    Cheers,

    Matt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whiteman808@21:1/5 to Matt Jolly on Sun Nov 17 15:40:01 2024
    Hello,

    On 17 Nov 2024, 17:55:38, Matt Jolly wrote:
    Hi,

    On 17/11/24 17:22, whiteman808 wrote:

    I need help with writing ebuild. Ebuild fails to merge.
    Necessary information is located in attachments.
    I haven't actually built this, but if dobin is failing after this step:

    cp $WORK/b001/exe/a.out goimapnotify

    Where is goimapnotify actually being copied to? If you run
    `ebuild foo-1.2.3.ebuild compile` and inspect ${S} (the workdir)
    where is this file?

    dobin is relative to ${S}; you probably just need to adjust that path.

    Let me know how you go with those hints.

    Cheers,

    Matt


    Merging as non-root user with FEATURES="fakeroot" works. But sudo emerge goimapnotify fails with:

    * Package: net-mail/goimapnotify-2.4:0
    * Repository: whiteman808
    * Maintainer: whiteman808@paraboletancza.org
    * USE: abi_x86_64 amd64 elibc_glibc kernel_linux systemd
    * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
    Unpacking source...
    Unpacking goimapnotify-2.4.tar.bz2 to /var/tmp/portage/net-mail/goimapnotify-2.4/work
    go mod verify
    go: github.com/emersion/go-imap@v1.2.1: Get "https://proxy.golang.org/github.com/emersion/go-imap/@v/v1.2.1.mod": dial tcp: lookup proxy.golang.org on [2a00:f41:5812:9793::ba]:53: dial udp [2a00:f41:5812:9793::ba]:53: connect: network is unreachable
    * ERROR: net-mail/goimapnotify-2.4::whiteman808 failed (unpack phase):
    * go mod verify failed
    *
    * Call stack:
    * ebuild.sh, line 136: Called src_unpack
    * environment, line 1976: Called go-module_src_unpack
    * environment, line 1580: Called ego 'mod' 'verify'
    * environment, line 889: Called die
    * The specific snippet of code:
    * "$@" || die -n "${*} failed"
    *
    * If you need support, post the output of `emerge --info '=net-mail/goimapnotify-2.4::whiteman808'`,
    * the complete build log and the output of `emerge -pqv '=net-mail/goimapnotify-2.4::whiteman808'`.
    * The complete build log is located at '/var/tmp/portage/net-mail/goimapnotify-2.4/temp/build.log'.
    * The ebuild environment file is located at '/var/tmp/portage/net-mail/goimapnotify-2.4/temp/environment'.
    * Working directory: '/var/tmp/portage/net-mail/goimapnotify-2.4/work/goimapnotify-2.4'
    * S: '/var/tmp/portage/net-mail/goimapnotify-2.4/work/goimapnotify-2.4'

    I will be happy if you help me fix this issue.

    Thank you,
    whiteman808.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Sun Nov 17 15:12:57 2024
    On Sunday 17 November 2024 14:37:53 GMT whiteman808 wrote:
    Hello,

    On 17 Nov 2024, 17:55:38, Matt Jolly wrote:
    Hi,

    On 17/11/24 17:22, whiteman808 wrote:
    I need help with writing ebuild. Ebuild fails to merge.
    Necessary information is located in attachments.

    I haven't actually built this, but if dobin is failing after this step:
    cp $WORK/b001/exe/a.out goimapnotify

    Where is goimapnotify actually being copied to? If you run
    `ebuild foo-1.2.3.ebuild compile` and inspect ${S} (the workdir)
    where is this file?

    dobin is relative to ${S}; you probably just need to adjust that path.

    Let me know how you go with those hints.

    Cheers,

    Matt

    Merging as non-root user with FEATURES="fakeroot" works. But sudo emerge goimapnotify fails with:

    * Package: net-mail/goimapnotify-2.4:0
    * Repository: whiteman808
    * Maintainer: whiteman808@paraboletancza.org
    * USE: abi_x86_64 amd64 elibc_glibc kernel_linux
    systemd * FEATURES: network-sandbox preserve-libs
    sandbox userpriv usersandbox
    Unpacking source...
    Unpacking goimapnotify-2.4.tar.bz2 to
    /var/tmp/portage/net-mail/goimapnotify-2.4/work
    go mod verify
    go: github.com/emersion/go-imap@v1.2.1: Get "https://proxy.golang.org/github.com/emersion/go-imap/@v/v1.2.1.mod": dial tcp: lookup proxy.golang.org on [2a00:f41:5812:9793::ba]:53: dial udp [2a00:f41:5812:9793::ba]:53: connect: network is unreachable

    It looks like you have a network problem and in particular DNS resolution (UDP port 53).


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmc6B/kACgkQseqq9sKV ZxnJ0Q//UTvuSYfshmCLteAFQYAETp1isRORiE/kcGLwIHAc+cW9KZ8bMK/QAOXj zgKrtOkXZOByKnrbEOGltwrwcoldeqmA2LfwDG1Ig6ojP1BjewRvbpy2ESqEx2un 6kbuh/L/fvIZGc6G9NvcJ6gU6nRsjFi7AcRNVDQRWrrpU/SyC7I6qP1p/P5pRlkt Dvhx8avz+Ae7GPzGYFJU8KO2+eoQwTdVjvdd9y9C8K9w/Qp+/zo+GP1rnXCpoLUg 1xhtgt+0iMnyIj7a6yWf81E53MdSzT8iVoUmZXblpdDDww4L/TYUAbHPEPEGu3hz oNLYmOPQoVxcMzK4kT7LWWNlVDPISkMrHEcqoKNC+7xWin/nAeXeE+zg3vZWj1O1 UWY18kkBehHy3bc3FN963cj183w4VbWNeKJv0t+JsrmjcPa8XGpi/6WOMP9Psf2m GmCu/1MfZaendianQAYA1khy8+poc0svB8NSzyrg5OxrPYOhV9HG9lors2zkdJ9r AjI42B4u8PGfBJDVbwrpngJcfQEu0eX0VngF7iTAx/dGiKA6ipG3+BNZQ2RNuA/x 1YP0+lA6nvM8iWsIndxadFissYmfUsG0eLCLUy/sh4t/ZbN8B/fYKr8/MNN8PBIV WDoKw6Yu/CIT4+1aaKmhrB88+OC4NoGh9So87dmhWGFgjv68/08=
    =9sa5
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whiteman808@21:1/5 to Michael on Sun Nov 17 19:30:01 2024
    Hey,

    On 17 Nov 2024, 15:12:57, Michael wrote:
    On Sunday 17 November 2024 14:37:53 GMT whiteman808 wrote:
    Hello,

    On 17 Nov 2024, 17:55:38, Matt Jolly wrote:
    Hi,

    On 17/11/24 17:22, whiteman808 wrote:
    I need help with writing ebuild. Ebuild fails to merge.
    Necessary information is located in attachments.

    I haven't actually built this, but if dobin is failing after this step:
    cp $WORK/b001/exe/a.out goimapnotify

    Where is goimapnotify actually being copied to? If you run
    `ebuild foo-1.2.3.ebuild compile` and inspect ${S} (the workdir)
    where is this file?

    dobin is relative to ${S}; you probably just need to adjust that path.

    Let me know how you go with those hints.

    Cheers,

    Matt

    Merging as non-root user with FEATURES="fakeroot" works. But sudo emerge goimapnotify fails with:

    * Package: net-mail/goimapnotify-2.4:0
    * Repository: whiteman808
    * Maintainer: whiteman808@paraboletancza.org
    * USE: abi_x86_64 amd64 elibc_glibc kernel_linux
    systemd * FEATURES: network-sandbox preserve-libs
    sandbox userpriv usersandbox
    Unpacking source...
    Unpacking goimapnotify-2.4.tar.bz2 to
    /var/tmp/portage/net-mail/goimapnotify-2.4/work
    go mod verify
    go: github.com/emersion/go-imap@v1.2.1: Get "https://proxy.golang.org/github.com/emersion/go-imap/@v/v1.2.1.mod": dial tcp: lookup proxy.golang.org on [2a00:f41:5812:9793::ba]:53: dial udp [2a00:f41:5812:9793::ba]:53: connect: network is unreachable

    It looks like you have a network problem and in particular DNS resolution (UDP
    port 53).


    I have a working ebuild after spending hours on learning Gentoo ebuild-specific syntax.
    Not sure if it is normal if I haven't yet written any ebuilds from scratch. This is my
    first ebuild that I wrote by hand.

    I will be thankful for a code review of the my ebuild in the attachment.

    Thank you,
    whiteman808.

    # Copyright 1999-2024 Gentoo Authors# Distributed under the terms of the GNU General Public License v2EAPI=8inherit go-module systemdDESCRIPTION="Execute scripts on IMAP mailbox changes using IDLE, golang version."HOMEPAGE="https://gitlab.com/
    shackra/goimapnotify"if [[ ${PV} == 9999* ]]; then inherit git-r3 EGIT_REPO_URI="https://gitlab.com/shackra/goimapnotify.git"else SRC_URI="https://gitlab.com/shackra/goimapnotify/-/archive/${PV}/${P}.tar.bz2" SRC_URI+=" https://git.paraboletancza.
    org/whiteman808/gentoo-distfiles/raw/branch/main/${P}-deps.tar.xz" KEYWORDS="~amd64"fiLICENSE="GPL-3+"SLOT="0"IUSE="systemd"RESTRICT="test strip"DEPEND="dev-lang/go"BDEPEND="${DEPEND}"RDEPEND="systemd? ( sys-apps/systemd )"src_unpack() { if
    [[ ${PV} == 9999* ]]; then git-r3_src_unpack git-r3_checkout go-module_live_vendor else go-module_src_unpack fi}src_compile() { ego build}src_install() { dobin "${PN}" systemd_douserunit "${FILESDIR}"/goimapnotify@.service}
    # Copyright 1999-2024 Gentoo Authors# Distributed under the terms of the GNU General Public License v2EAPI=8inherit go-module systemdDESCRIPTION="Execute scripts on IMAP mailbox changes using IDLE, golang version."HOMEPAGE="https://gitlab.com/
    shackra/goimapnotify"if [[ ${PV} == 9999* ]]; then inherit git-r3 EGIT_REPO_URI="https://gitlab.com/shackra/goimapnotify.git"else SRC_URI="https://gitlab.com/shackra/goimapnotify/-/archive/${PV}/${P}.tar.bz2" SRC_URI+=" https://git.paraboletancza.
    org/whiteman808/gentoo-distfiles/raw/branch/main/${P}-deps.tar.xz" KEYWORDS="~amd64"fiLICENSE="GPL-3+"SLOT="0"IUSE="systemd"RESTRICT="test strip"DEPEND="dev-lang/go"BDEPEND="${DEPEND}"RDEPEND="systemd? ( sys-apps/systemd )"src_unpack() { if
    [[ ${PV} == 9999* ]]; then git-r3_src_unpack git-r3_checkout go-module_live_vendor else go-module_src_unpack fi}src_compile() { ego build}src_install() { dobin "${PN}" systemd_douserunit "${FILESDIR}"/goimapnotify@.service}
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata>
    <maintainer type="person">
    <email>whiteman808@paraboletancza.org</email>
    <name>whiteman808</name>
    </maintainer>
    <upstream>
    <remote-id type="gitlab">shackra/goimapnotify</remote-id>
    </upstream>
    </pkgmetadata>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)