Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 635834 - =net-libs/librsync-2.0.0-r1 fails Signature test on big-endian platforms
Summary: =net-libs/librsync-2.0.0-r1 fails Signature test on big-endian platforms
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alessandro Calorì
URL: https://github.com/librsync/librsync/...
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2017-10-29 20:55 UTC by Sergei Trofimovich (RETIRED)
Modified: 2018-02-03 00:48 UTC (History)
3 users (show)

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


Attachments
net-libs-librsync-2.0.0-r1-build.log (net-libs-librsync-2.0.0-r1-build.log,32.52 KB, text/x-log)
2017-10-29 20:55 UTC, Sergei Trofimovich (RETIRED)
Details
LastTest.log (LastTest.log,541.05 KB, text/x-log)
2017-10-29 20:55 UTC, Sergei Trofimovich (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-29 20:55:28 UTC
Created attachment 500954 [details]
net-libs-librsync-2.0.0-r1-build.log

Single test failed as:

ctest -j 13 --test-load 12
Test project /dev/shm/portage/net-libs/librsync-2.0.0-r1/work/librsync-2.0.0_build
    Start 1: Help
    Start 2: Mutate
    Start 3: Signature
    Start 4: Sources
    Start 5: Triple
    Start 6: Delta
    Start 7: Changes
1/7 Test #5: Triple ...........................   Passed    0.23 sec
2/7 Test #1: Help .............................   Passed    0.25 sec
3/7 Test #3: Signature ........................***Failed    0.34 sec

It looks like md4 is not endianness-clean:

3/7 Testing: Signature
3/7 Test: Signature
Command: "/dev/shm/portage/net-libs/librsync-2.0.0-r1/work/librsync-2.0.0/tests/signature.test" "/dev/shm/portage/net-libs/librsync-2.0.0-r1/work/librsync-2.0.0_build"
Directory: /dev/shm/portage/net-libs/librsync-2.0.0-r1/work/librsync-2.0.0/tests
"Signature" start time: Oct 29 13:42 PDT
Output:
----------------------------------------------------------
BINDIR /dev/shm/portage/net-libs/librsync-2.0.0-r1/work/librsync-2.0.0_build
    /dev/shm/portage/net-libs/librsync-2.0.0-r1/work/librsync-2.0.0_build/rdiff --hash=md4 -I4096 signature ./signature.input/01.in /dev/shm/portage/net-libs/librsync-2.0.0-r1/temp/librsyncte
st_IKafL9HV/signature
./signature.input/md4/01.sig /dev/shm/portage/net-libs/librsync-2.0.0-r1/temp/librsynctest_IKafL9HV/signature differ: char 17, line 1
: comparison failed from command: 
<end of output>
Test time =   0.34 sec
----------------------------------------------------------
Test Failed.
"Signature" end time: Oct 29 13:42 PDT
"Signature" time elapsed: 00:00:00
----------------------------------------------------------
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-29 20:55:55 UTC
Created attachment 500956 [details]
LastTest.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-29 20:56:36 UTC
$ emerge --info

Portage 2.3.8 (python 3.4.5-final-0, default/linux/powerpc/ppc32/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.25-r8, 4.9.6-gentoo-r1 ppc)
=================================================================
System uname: Linux-4.9.6-gentoo-r1-ppc-POWER8E_-raw-,_altivec_supported-with-gentoo-2.4.1
KiB Mem:    24806220 total,   6323796 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 29 Oct 2017 09:45:01 +0000
Head commit of repository gentoo: ef4acc928833734f894dff8713ca92e3bdeee100
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-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.32.1::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::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-r8::gentoo
Repositories:

gentoo
    location: /bound/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe -fdiagnostics-show-option -frecord-gcc-switches"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /etc/omega.conf /usr/share/gnupg/qualified.txt /var/bind"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
DISTDIR="/bound/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 sfperms strict stricter test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j13 -l12"
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="/dev/shm"
USE="X a52 aac acl alsa apng berkdb big-endian bluetooth branding bzip2 cairo cdda cdr cli colord corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm graph gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libkms libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pcre16 pcre32 pdf perl png policykit ppc ppds pulseaudio qt3support qt4 readline sdl seccomp session spell sqlite ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xkb xml xv xvfb xvid zlib" ABI_PPC="32" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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" 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" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga nv r128 radeon savage tdfx trident dummy v4l" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-29 21:38:13 UTC
The cause appears to be simple: md4 has explicit code to handle WORDS_BIGENDIAN platforms but config.h does not set it correctly on anything except something-Apple:

src/config.h.cmake:

  /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
     significant byte first (like Motorola and SPARC, unlike Intel). */
  #if defined AC_APPLE_UNIVERSAL_BUILD
  # if defined __BIG_ENDIAN__
  #  define WORDS_BIGENDIAN 1
  # endif
  #else
  # ifndef WORDS_BIGENDIAN
  /* #  undef WORDS_BIGENDIAN */
  # endif
  #endif


Changing it to:
  # if defined __BIG_ENDIAN__
  #  define WORDS_BIGENDIAN 1
  # endif
makes tests pass on powerpc32/64.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-10-29 21:54:13 UTC
Filed upstream: https://github.com/librsync/librsync/issues/132
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2017-11-15 20:34:37 UTC
Fixed in 2.0.1 upstream.
Comment 6 Larry the Git Cow gentoo-dev 2017-11-15 20:52:23 UTC
The bug has been closed via the following commit(s):

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

commit 062d4fa546fea8d8b2812c8d19d3343784184d3c
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2017-11-15 20:51:44 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2017-11-15 20:52:16 +0000

    net-libs/librsync: bump up to 2.0.1, bug #635834
    
    Fixes md4 support on big-endian platforms.
    
    Bug: https://github.com/librsync/librsync/issues/132
    Closes: https://bugs.gentoo.org/635834
    Package-Manager: Portage-2.3.14, Repoman-2.3.6

 net-libs/librsync/Manifest                         |  1 +
 .../librsync/files/librsync-2.0.1-libdir.patch     | 15 ++++++++++++
 net-libs/librsync/librsync-2.0.1.ebuild            | 27 ++++++++++++++++++++++
 3 files changed, 43 insertions(+)
Comment 7 Bernard Cafarelli gentoo-dev 2017-11-17 17:04:22 UTC
2.0.1 ebuild lost its subslot, which is used at least by rdiff-backup:
net-libs/librsync:0

  (net-libs/librsync-2.0.1:0/0::gentoo, ebuild scheduled for merge) conflicts with
    net-libs/librsync:0/2 required by (app-backup/rdiff-backup-1.3.3-r2:0/0::gentoo, ebuild scheduled for merge)
                     ^^^^
Comment 8 Larry the Git Cow gentoo-dev 2017-11-17 20:43:05 UTC
The bug has been referenced in the following commit(s):

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

commit 2db886bd0f691a5e4fde1f45dd93110d734d58e5
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2017-11-17 20:42:43 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2017-11-17 20:42:57 +0000

    net-libs/librsync: restore 0/2 subslot (lost in revbump), bug #635834
    
    Noticed by Bernard in a rdiff-backup subslot conflict:
    ```
      (net-libs/librsync-2.0.1:0/0::gentoo, ebuild scheduled for merge) conflicts with
        net-libs/librsync:0/2 required by (app-backup/rdiff-backup-1.3.3-r2:0/0::gentoo, ebuild scheduled for merge)
                         ^^^^
    ```
    
    Reported-by: Bernard Cafarelli
    Bug: https://bugs.gentoo.org/635834
    Package-Manager: Portage-2.3.14, Repoman-2.3.6

 net-libs/librsync/{librsync-2.0.1.ebuild => librsync-2.0.1-r1.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)}