Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
inconsistent unpack location for custom ebuild.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Wed Jan 10, 2018 8:22 am    Post subject: inconsistent unpack location for custom ebuild. Reply with quote

Hi Everyone,
Im trying to write an ebuild for rdiff-backup-1.2.8. I have two gentoo hosts I work on regularly, and the ebuild works fine on one, but not the other. The problem is at the unpack stage, specifically where the archive is extracted to:[/code]

Working host:
Code:

~ # ls -ld /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-1.2.8                                                                                                         
drwxr-xr-x 3 portage portage 4096 Mar 16  2009 /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-1.2.8


on the non working host
Code:

~ # ls -ld /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8
drwxr-xr-x 3 portage portage 4096 Mar 16  2009 /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8


As the name gives away, the non working host fails to "compile" because of the difference in location.

Code:

>>> Source unpacked in /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work
 * ERROR: app-backup/rdiff-backup-1.2.8::gentoo failed (prepare phase):
 *   The source directory '/var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-1.2.8' doesn't exist


Here is my ebuild file:

Code:

# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )

inherit distutils-r1 versionator

DESCRIPTION="rdiff-backup reverse differential backup system"
HOMEPAGE="http://www.nongnu.org/rdiff-backup/"
#SRC_URI="http://savannah.nongnu.org/download/rdiff-backup/rdiff-backup-1.2.8.tar.gz -> ${P}.tar.gz"
SRC_URI="http://savannah.nongnu.org/download/rdiff-backup/rdiff-backup-1.2.8.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
        net-libs/librsync:0/1
"
RDEPEND="
        dev-python/pyxattr[${PYTHON_USEDEP}]
        dev-python/pylibacl[${PYTHON_USEDEP}]
"

python_install_all() {
        distutils-r1_python_install_all
}


Which is mostly cribbed from the rdiff-backup-1.3.x.ebuild

During the process of my groping around in the dark, these are the checks Ive made, and show that I have version parity across the two hosts:

Code:

 ~ # equery list portage tar python; eselect python list;
 * Searching for portage ...
[IP-] [  ] sys-apps/portage-2.3.13-r1:0

 * Searching for tar ...
[IP-] [  ] app-arch/tar-1.29-r3:0

 * Searching for python ...
[IP-] [  ] dev-lang/python-2.7.14-r1:2.7
[IP-] [  ] dev-lang/python-3.5.4-r1:3.5/3.5m
Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python2.7
  [3]   python3.4
 ~ #


Any pointers anyone?

Thanks In advance

Dylan
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9521
Location: beyond the rim

PostPosted: Wed Jan 10, 2018 8:42 am    Post subject: Reply with quote

Lets go for the obvious things first: Verify that both hosts use the same ebuild file, source tarball and ebuild repository. It's easy to miss stale copies.
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Wed Jan 10, 2018 9:44 pm    Post subject: Reply with quote

Thanks for replying.

>Verify that both hosts use the same ebuild file,

Host that works:

Code:

# md5sum rdiff-backup-1.2.8.ebuild
368c08ead3424c7c936d9719b12c193b  rdiff-backup-1.2.8.ebuild


host that does not work
Code:

# md5sum rdiff-backup-1.2.8.ebuild
368c08ead3424c7c936d9719b12c193b  rdiff-backup-1.2.8.ebuild


> source tarball
Code:

# grep SRC_URI rdiff-backup-1.2.8.ebuild
SRC_URI="http://savannah.nongnu.org/download/rdiff-backup/rdiff-backup-1.2.8.tar.gz -> ${P}.tar.gz"


I know I could include version strings in there etc... but for the moment I just want to get it working.

>ebuild repository

not 100% on what you're asking for there. The profiles match if that helps. both are:

Code:

# eselect profile list | grep "\*"
  [19]  default/linux/amd64/17.0/desktop/plasma *


Thanks for your help on this.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21591

PostPosted: Wed Jan 10, 2018 11:46 pm    Post subject: Reply with quote

You showed that both ebuilds ask for the same URL. You did not show whether the downloaded tarball is actually the same in both cases. If one of the two downloads came from a mirror with a bad tarball, you could get strange results (although this particular strange result seems unlikely). Please post also the emerge --info for both hosts, and verify from that output that both are synced to the same commit in the Gentoo tree. This can rule out any oddities with eclass differences.
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Thu Jan 11, 2018 6:03 am    Post subject: Reply with quote

>You showed that both ebuilds ask for the same URL. You did not show whether the downloaded tarball is actually the same in both cases. If one of the two downloads came from a mirror with a bad tarball, you could get strange results (although this particular strange result seems unlikely).

Fair point. Worth checking. However they are the same:

Code:

# md5sum rdiff-backup-1.2.8.tar.gz
1a94dc537fcf74d6a3a80bd27808e77b  rdiff-backup-1.2.8.tar.gz


For host that works:
Code:

# emerge --info
Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-6.4.0, glibc-2.25-r9, 4.12.12-gentoo x86_64)
=================================================================
System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i3-2100_CPU_@_3.10GHz-with-gentoo-2.4.1
KiB Mem:    12247400 total,   2901524 free
KiB Swap:    3743316 total,   3743316 free
Timestamp of repository gentoo: Wed, 10 Jan 2018 21:30:01 +0000
Head commit of repository gentoo: fed48060b5d5a152a15ccd3f38adb31eea624e9d
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:

ace
    location: /var/lib/layman/ace
    masters: gentoo
    priority: 50

barzog-overlay
    location: /var/lib/layman/barzog-overlay
    masters: gentoo
    priority: 50

docker
    location: /var/lib/layman/docker
    masters: gentoo
    priority: 50

seafile
    location: /var/lib/layman/seafile
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    masters: gentoo
    priority: 50

vapoursynth
    location: /var/lib/layman/vapoursynth
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /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/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfpermsstrict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
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 a52 aac acl acpi activities alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gd gdbm gif git glamor gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt5 readline sdl seccomp semantic-desktop spell sse sse2 ssl startup-notification subversion svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64 32" 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="kexi words flow plan sheets stage tables krita karbon braindump author" 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyleoncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


For the host that does not work:
Code:

# emerge --info
Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-6.4.0, glibc-2.25-r9, 4.12.12-gentoo x86_64)
=================================================================
System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-gentoo-2.4.1
KiB Mem:    24643000 total,  16245656 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 10 Jan 2018 21:30:01 +0000
Head commit of repository gentoo: fed48060b5d5a152a15ccd3f38adb31eea624e9d
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:

raiagent
    location: /var/lib/layman/raiagent
    masters: gentoo
    priority: 50

ssnb
    location: /var/lib/layman/ssnb
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfpermsstrict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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 a52 aac acl acpi activities alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gd gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kwallet lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt5 readline sdl seccomp semantic-desktop spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Thanks for your help on this.

Dylan
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9521
Location: beyond the rim

PostPosted: Thu Jan 11, 2018 8:13 am    Post subject: Reply with quote

Quote:
~ # ls -ld /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8
drwxr-xr-x 3 portage portage 4096 Mar 16 2009 /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8

Any explanation for that timestamp? Probably not related to your problem as it's the same for both systems, but looks quite strange.

Also, does the non-working system have anything related in /etc/portage/env or /etc/portage/*bashrc?
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Thu Jan 11, 2018 8:40 am    Post subject: Reply with quote

Hi there

>Any explanation for that timestamp? Probably not related to your problem as it's the same for both systems, but looks quite strange.

Looks like it comes from the archive.

Code:

 ~ # ebuild /usr/portage/app-backup/rdiff-backup/rdiff-backup-1.2.8.ebuild clean
 ~ # ls -ld /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8
ls: cannot access '/var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8': No such file or directory
 ~ # ebuild /usr/portage/app-backup/rdiff-backup/rdiff-backup-1.2.8.ebuild fetch
 * rdiff-backup-1.2.8.tar.gz BLAKE2B SHA512 size ;-)
 .....
>>> Unpacking rdiff-backup-1.2.8.tar.gz to /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work
>>> Source unpacked in /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work
 ~ # ls -ld /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8
drwxr-xr-x 3 portage portage 4096 Mar 16  2009 /var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-r1-2-8
 ~ #


>Also, does the non-working system have anything related in /etc/portage/env or /etc/portage/*bashrc?

I'm afraid not

Code:

 ~ # ls -l /etc/portage/env*
ls: cannot access '/etc/portage/env*': No such file or directory
 ~ # ls -l /etc/portage/*bashrc
ls: cannot access '/etc/portage/*bashrc': No such file or directory
 ~ #


Thank you for your continued efforts, I appreciate it.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9521
Location: beyond the rim

PostPosted: Fri Jan 12, 2018 9:29 am    Post subject: Reply with quote

Hmm, try debugging the ebuild with `ebuild --debug /path/to/your/rdiff-backup.ebuild unpack`
Hopefully that will reveal at what point the target name is screwed up.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Jan 12, 2018 10:09 am    Post subject: Reply with quote

did you check this is correct?
Code:
grep "declare -x S=" /var/tmp/portage/app-backup/rdiff-backup-1.2.8/temp/environment
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Fri Jan 12, 2018 2:06 pm    Post subject: Reply with quote

Genone:

Quote:

try debugging the ebuild with `ebuild --debug /path/to/your/rdiff-backup.ebuild unpack`


Good call, bud sadly I cant see anything obvious. Although Ill hold up my hands and say I dont understand a lot of it. The "extracty" bit of it look basically the same from both hosts. They simply mention that the archive has been extracted to
Code:

/var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/

Which we already know. There are some extraction errors, but *I THINK* they are the unpack routines attempt to extract the archive using different utilities .e.g. gunzip, tar etc.. until it eventually finds the correct one.


Quote:
did you check this is correct?


Hi Krinn & thanks for your input. Im not sure I follow. That appears to be where portage should look for the source files, this is correct on the working host, but incorrect on the non working host.

Code:

# grep "declare -x S=" /var/tmp/portage/app-backup/rdiff-backup-1.2.8/temp/environment
declare -x S="/var/tmp/portage/app-backup/rdiff-backup-1.2.8/work/rdiff-backup-1.2.8"


I think im going to have to code around this problem instead. Perhaps run something post unpack to check the path in S exists. and if not, symlink it accordingly. Ill knock something up later and see what I can do. Thanks all for your input.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21591

PostPosted: Sat Jan 13, 2018 1:34 am    Post subject: Reply with quote

On the non-working machine, if you extract that archive manually to a temporary directory, do the resulting filenames come out good or bad?
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Sat Jan 13, 2018 7:11 am    Post subject: Reply with quote

You're on the right track Hu.
I actually tracked down the problem.
Im afraid there's a significant element of PEBCAK.
What I hadnt noticed was that the NON working host, wasnt actually downloading the archive. It was using a pre-existing archive (where that came from Im not sure) in the DISTDIR.
Once I deleted that, things started going my way again, although not completely.

Code:

# ebuild /usr/portage/app-backup/rdiff-backup/rdiff-backup-1.2.8.ebuild manifest
>>> Renaming distfile with size 196526 (smaller than PORTAGE_FETCH_RESUME_MIN_SIZE)
Refetching... File renamed to '/usr/portage/distfiles/rdiff-backup-1.2.8.tar.gz._checksum_failure_.ehp73_7j'
....

!!! Fetched file: rdiff-backup-1.2.8.tar.gz VERIFY FAILED!
!!! Reason: Filesize does not match recorded size
!!! Got:      196526
!!! Expected: 268855
Refetching... File renamed to '/usr/portage/distfiles/rdiff-backup-1.2.8.tar.gz._checksum_failure_.ehp73_7j'


So then I
Code:

# ebuild /usr/portage/app-backup/rdiff-backup/rdiff-backup-1.2.8.ebuild manifest --force


And was then able to emerge normally. Thanks Everyone for your help on this.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21591

PostPosted: Sat Jan 13, 2018 5:21 pm    Post subject: Reply with quote

Above, I asked that you compare the two tar.gz files, and you reported that they were the same. Your most recent post says that there was a bad one that needed to be replaced. I don't see how both can be true.

Separately, why are you writing this ebuild? There are newer versions in the main Gentoo tree. If you want an ebuild for this specific version, you can get it from the attic. Regardless, you should not be putting this ebuild in $PORTDIR. Put it in your local overlay.
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Sun Jan 14, 2018 8:12 am    Post subject: Reply with quote

Quote:

Above, I asked that you compare the two tar.gz files, and you reported that they were the same.


Yes you did; correctly stating that a different download mirror could be the cause.

Quote:

You showed that both ebuilds ask for the same URL. You did not show whether the downloaded tarball is actually the same in both cases. If one of the two downloads came from a mirror with a bad tarball, you could get strange results (although this particular strange result seems unlikely).


I wget'd the same url on the two hosts and ended up with the same archive (as proved by the md5sum matching)

However (when running the ebuild)

Quote:

the NON working host, wasn't actually downloading the archive. It was using a pre-existing archive (where that came from Im not sure) in the DISTDIR.


So to quote a Jedi Ghost:
Quote:

What I said was true, from a certain point of view


Quote:

Separately, why are you writing this ebuild? There are newer versions in the main Gentoo tree


I want version parity and already have non Gentoo hosts with 1.2.8 on it (and cant easily be upgraded)


Quote:

Regardless, you should not be putting this ebuild in $PORTDIR. Put it in your local overlay.


100% agree, But I dont have an overlay setup yet, and didnt want to bother doing it unless my ebuild was going to work. An overlay will be my next task.


Thanks again
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Sun Jan 14, 2018 11:52 am    Post subject: Reply with quote

I view making a local overlay as trivially easy. Create /usr/local/portage, then from there a directory branch "parallel to" the ebuild you are planning to modify.

Now that you have modified an ebuild in (probably) /usr/portage, just copy that branch of the /usr/portage limb to /usr/local/portage and the task is done.

Code:
mkdir -p /usr/local/portage/app-backup/rdiff-backup
cp -a  /usr/portage/app-backup/rdiff-backup/* /usr/local/portage/app-backup/rdiff-backup
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Sun Jan 14, 2018 2:27 pm    Post subject: Reply with quote

cboldt wrote:
I view making a local overlay as trivially easy. Create /usr/local/portage, then from there a directory branch "parallel to" the ebuild you are planning to modify.

See also https://wiki.gentoo.org/wiki/Custom_repository
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21591

PostPosted: Sun Jan 14, 2018 4:36 pm    Post subject: Reply with quote

Regarding the checksum difference, I understand now. To me, the key sentences were "Verify that both hosts use the same ebuild file, source tarball ..." (Genone) and "You did not show whether the downloaded tarball is actually the same in both cases." (me) I suggested a bad mirror as one cause, but it never occurred to me that you would perform new downloads just for that; I expected you to compare the two already sitting in the respective DISTDIR or that you would sync the Manifest and rely on its checksums, since both of those would work on the respective downloaded tarballs. I will take as a lesson for next time to be more specific when I request a comparison.

Regarding version parity, that's reasonable, but I still wonder why you chose not to retrieve the appropriate ebuild from the attic.

Regarding an overlay, beware that if you sync your main tree, the sync will delete local modifications, including the local creation of this obsolete ebuild. That is why you should put the ebuild in an overlay first, before you even try to get it working. Otherwise, you risk deleting all your work if a sync happens before you move to the overlay.
Back to top
View user's profile Send private message
geosword
n00b
n00b


Joined: 16 Apr 2015
Posts: 10

PostPosted: Mon Jan 15, 2018 10:06 am    Post subject: Reply with quote

Quote:

but I still wonder why you chose not to retrieve the appropriate ebuild from the attic.


I did try that, I got the ebuild from
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-backup/rdiff-backup/rdiff-backup-1.2.8-r1.ebuild?revision=1.7

Code:

# ebuild rdiff-backup-1.2.8-r1.ebuild manifest
 * ERROR: app-backup/rdiff-backup-1.2.8-r1::gentoo failed (depend phase):
 *   distutils.eclass could not be found by inherit()
 *
 * Call stack:
 *                      ebuild.sh, line 620:  Called source '/usr/portage/app-backup/rdiff-backup/rdiff-backup-1.2.8-r1.ebuild'
 *   rdiff-backup-1.2.8-r1.ebuild, line  10:  Called inherit 'distutils' 'eutils'
 *                      ebuild.sh, line 293:  Called die
 * The specific snippet of code:
 *              [[ -z ${location} ]] && die "${1}.eclass could not be found by inherit()"
 *
 * If you need support, post the output of `emerge --info '=app-backup/rdiff-backup-1.2.8-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-backup/rdiff-backup-1.2.8-r1::gentoo'`.
 * Working directory: '/usr/lib64/python3.5/site-packages'
 * S: '/var/tmp/portage/app-backup/rdiff-backup-1.2.8-r1/work/rdiff-backup-1.2.8'



I don't know enough about ebuilds to debug that, (although I guess EAPI=3 has something to do with it) so I used the existing rdiff-backup-1.3.3 as a basis for 1.2.8 and that's when I noticed the problem I originally posted about. Perhaps I should have just posted about the above problem instead.[/code]

Quote:

Regarding an overlay, beware that if you sync your main tree, the sync will delete local modifications, including the local creation of this obsolete ebuild. That is why you should put the ebuild in an overlay first, before you even try to get it working. Otherwise, you risk deleting all your work if a sync happens before you move to the overlay.


Fair point. I now have my ebuild in an overlay
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21591

PostPosted: Tue Jan 16, 2018 3:18 am    Post subject: Reply with quote

I see. Yes, distutils.eclass was retired after all ebuilds were converted to its successor. You would have needed to convert the recovered ebuild to the successor eclass, or done what you did.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum