Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650024 - app-arch/xar-1.8: arm/arm64 keywording for sys-devel/llvm-6.0.0
Summary: app-arch/xar-1.8: arm/arm64 keywording for sys-devel/llvm-6.0.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 15:46 UTC by Michał Górny
Modified: 2018-03-13 17:41 UTC (History)
1 user (show)

See Also:
Package list:
app-arch/xar-1.8 ~arm ~arm64 sys-devel/llvm-6.0.0 ~arm ~arm64 dev-ml/llvm-ocaml-6.0.0 ~arm sys-devel/llvmgold-6 ~arm ~arm64 sys-devel/llvm-common-6.0.0 ~arm ~arm64 dev-python/lit-6.0.0 ~arm ~arm64 sys-devel/lld-6.0.0 ~arm64 sys-devel/clang-6.0.0 ~arm64 dev-python/clang-python-6.0.0 ~arm64 dev-util/lldb-6.0.0 ~arm64 sys-libs/compiler-rt-6.0.0 ~arm64 sys-libs/compiler-rt-sanitizers-6.0.0 ~arm64 sys-libs/llvm-libunwind-6.0.0 ~arm64 sys-libs/libcxxabi-6.0.0 ~arm64 sys-libs/libcxx-6.0.0 ~arm64 sys-libs/libomp-6.0.0 ~arm64 sys-devel/clang-runtime-6.0.0 ~arm64
Runtime testing required: Yes
stable-bot: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-09 15:46:49 UTC
Had to drop ~arm & ~arm64 due to optional dependency on app-arch/xar. Feel free to either keyword app-arch/xar or p.u.mask sys-devel/llvm[xar]. Afterwards either you or I can restore keywords on all packages (I guess no need to double-test them).
Comment 1 Stabilization helper bot gentoo-dev 2018-03-09 16:03:41 UTC
An automated check of this bug failed - repoman reported dependency errors (51 lines truncated): 

> dependency.bad sys-devel/llvm/llvm-6.0.0.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['app-arch/xar']
> dependency.bad sys-devel/llvm/llvm-6.0.0.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['app-arch/xar']
> dependency.badindev sys-devel/llvm/llvm-6.0.0.ebuild: DEPEND: ~arm(default/linux/arm/13.0/armv4) ['app-arch/xar']
Comment 2 Roy Bamford gentoo-dev 2018-03-09 16:33:29 UTC
 * Package:    app-arch/xar-1.8
 * Repository: gentoo
 * Maintainer: prefix@gentoo.org
 * USE:        arm64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox

builds with gcc-7.3.0 atd the gold linker.
Comment 3 Stabilization helper bot gentoo-dev 2018-03-09 17:02:01 UTC
An automated check of this bug succeeded - the previous repoman errors are now resolved.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-10 22:16:35 UTC
Actually, Roy, could you please test if this fancy archiver works? If I recall correctly its usage is similar to tar, i.e. something like:

  xar -c -f somefile.xar some-directory
  xar -t -f somefile.xar
Comment 5 Roy Bamford gentoo-dev 2018-03-10 23:38:02 UTC
# xar --version 
xar 1.8dev 

and 

# xar -h

is all I can get to work.

xar -c -f sample.xar /root
almost from the man page, only produces the xar -h output.

Extraction is not tested since I can't create an archive.
I've only tested on arm64 

strace xar -c -f sample.xar /root
shows its looking in lots of wrong places for libpthread.so.0 but making a symlink so it can be found does not change the the output.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-11 08:33:31 UTC
That is weird. It should print some more specific error either before or after the usage (it uses both places).
Comment 7 Roy Bamford gentoo-dev 2018-03-11 10:58:10 UTC
There's no error, its the sort of output I would expect if the command could not be parsed. I've tried the input dir with and without a trailing /

Same result built and tested on a Raspberry Pi 3 and on the Packet box. 

neddy_test1 arm64-build /usr/local # xar -c -f sample.xar /root
Usage: xar -[ctx][v] -f <archive> ...
        -c               Creates an archive
        -x               Extracts an archive
        -t               Lists an archive
        -f <filename>    Specifies an archive to operate on [REQUIRED!]
        -v               Print filenames as they are archived
        -C <path>        On extract, chdir to this location
        -n name          Provides a name for a subdocument
        -s <filename>    On extract, specifies the file to extract
                              subdocuments to.
                         On archival, specifies an xml file to addcd /
                              as a subdocument.
        -l               On archival, stay on the local device.
        -p               On extract, set ownership based on symbolic
                              names, if possible.
        -P               On extract, set ownership based on uid/gid.
        --toc-cksum      Specifies the hashing algorithm to use for
                              xml header verification.
                              Valid values: none, sha1, sha256, and sha512
                              Default: sha1
        --file-cksum     Specifies the hashing algorithm to use for
                              file content verification.
                              Valid values: none, sha1, sha256, and sha512
                              Default: sha1
        --dump-toc=<filename> Has xar dump the xml header into the
                              specified file.
        --dump-header    Prints out the xar binary header information
        --compression    Specifies the compression type to use.
                              Valid values: none, gzip, bzip2, lzma
                              Default: gzip
        -a               Synonym for "--compression=lzma"
        -j               Synonym for "--compression=bzip2"
        -z               Synonym for "--compression=gzip"
        --compression-args=arg Specifies arguments to be passed
                               to the compression engine.
        --compress-heap  Compress entire heap instead of individual files.
                              Currently limited to gzip compression.
        --list-subdocs   List the subdocuments in the xml header
        --extract-subdoc=name Extracts the specified subdocument
                              to a document in cwd named <name>.xml
        --exclude        POSIX regular expression of files to 
                              ignore while archiving.
        --rsize          Specifies the size of the buffer used
                              for read IO operations in bytes.
        --coalesce-heap  When archived files are identical, only store one copy
                              This option creates an archive which
                              is not streamable
        --link-same      Hardlink identical files
        --no-compress    POSIX regular expression of files
                              to archive, but not compress.
        --prop-include   File properties to include in archive
        --prop-exclude   File properties to exclude in archive
        --distribution   Only includes a subset of file properties
                              appropriate for archive distribution
        --keep-existing  Do not overwrite existing files while extracting
        -k               Synonym for --keep-existing
        --keep-setuid    Preserve the suid/sgid bits when extracting
        --version        Print xar's version number
neddy_test1 arm64-build /usr/local #
Comment 8 Fabian Groffen gentoo-dev 2018-03-11 15:27:23 UTC
I can confirm this on arm
Comment 9 Fabian Groffen gentoo-dev 2018-03-11 15:43:00 UTC
hah, classic, char signed vs unsigned problem, I wonder why this didn't come up on ppc as well
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-11 15:50:07 UTC
Probably because of past quality work of our arch teams. Thanks for testing, I will p.u.mask this and restore keywords on LLVM.
Comment 11 Fabian Groffen gentoo-dev 2018-03-11 15:51:59 UTC
oh, well I'm about to push a patch for arm ...
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-11 15:54:26 UTC
Ok then. I'll wait, then let Needy retset.
Comment 13 Larry the Git Cow gentoo-dev 2018-03-11 20:07:24 UTC
The bug has been closed via the following commit(s):

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

commit a7702363a854ef306b3ad6e0566697a6c7e7c741
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-03-11 20:07:05 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-03-11 20:07:17 +0000

    app-arch/xar: fix arm and ppc64, bug #650024
    
    Due to a different signedness of char type on arm and ppc, xar wouldn't
    start at all on these platforms.  A weird (compiler?) bug caused a
    completely random offset to be taken obviously failing any checksums.
    
    Fixes: https://bugs.gentoo.org/650024
    Closes: https://bugs.gentoo.org/650024
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-arch/xar/files/xar-1.8-arm-ppc.patch | 23 ++++++++++++++++
 app-arch/xar/xar-1.8-r1.ebuild           | 47 ++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)

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

commit a7702363a854ef306b3ad6e0566697a6c7e7c741
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-03-11 20:07:05 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-03-11 20:07:17 +0000

    app-arch/xar: fix arm and ppc64, bug #650024
    
    Due to a different signedness of char type on arm and ppc, xar wouldn't
    start at all on these platforms.  A weird (compiler?) bug caused a
    completely random offset to be taken obviously failing any checksums.
    
    Fixes: https://bugs.gentoo.org/650024
    Closes: https://bugs.gentoo.org/650024
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-arch/xar/files/xar-1.8-arm-ppc.patch | 23 ++++++++++++++++
 app-arch/xar/xar-1.8-r1.ebuild           | 47 ++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
Comment 14 Fabian Groffen gentoo-dev 2018-03-11 20:08:28 UTC
sorry, wrongly closed this bug.

I confirmed my fix on arm and ppc64, due to the nature of that mix I think arm64 and ppc will also work properly now.  I keyworded ~arm because I tested there.
Comment 15 Roy Bamford gentoo-dev 2018-03-11 21:35:01 UTC
Fabians patch works on arm64.

Please add the ~arm64 keyword.

Test process 
xar -cf a dir with subdirs
xar -xf the archive somewhere else.
diff the input and output dirs, which returned nothing.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-13 17:41:53 UTC
Thanks, guys. Restored all the keywords.