The Quest for Libarchive/BSDTar
#1
The Quest for Libarchive/BSDTar
So we need a working libarchive/bsdtar port. Can GIJoe77 or anyone else share their patches and depebedency lists they used to build it?

Its for irisware

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-02-2018, 06:58 PM
#2
RE: The Quest for Libarchive/BSDTar
I got it working. unfortunately I've found I'm not a strong reader and I tend to be a moron with reading through work people did. GIJOE77 deserves all the credit for his work in the "Some Compilation Info" thread

Here's the patched code: ftp.irisware.net/pub/raion/patches/libarchive-3.3.2-patched.tar.gz

Build info:

You need to build: OpenSSL, xz, nettle, gzip, bzip2, zlib

CFLAGS=-O2 -I/opt/local/include -L/opt/local/lib
CXXFLAGS=-O2 -I/opt/local/include -L/opt/local/lib
CC=c99
CXX=CC
CPPFLAGS=-I/opt/local/include -L/opt/local/lib


Configure: ./configure --enable-bsdcpio=static --enable-bsdtar=static --enable-bsdcat=static --prefix=/opt/local --without-xml2 --without-expat --without-lz4 --without-iconv --disable-maintainer-mode

Known bugs: xz compression hangs, xz extraction fails:

% bsdtar xf xz-5.2.4.tar.xz
xz-5.2.4/tests/tests.h: Lzma library error: Corrupted input data
bsdtar: Error exit delayed from previous errors.

My XZ build is probably garbage. Can anyone test?

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

(This post was last modified: 09-04-2018, 02:28 AM by Raion.)
Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-03-2018, 06:23 PM
#3
RE: The Quest for Libarchive/BSDTar
Hey RF,

It's not packaged, and in all honesty I'm not a "user" of it, but I managed to get it building inside my bootstrappy thingymajig. mipspro 7.4.4m of course.

My "package" file for it (where I list dependencies as make,tar,gzip,coreutils,unzip,xz,unrar,nettle,openssl) is here:

https://github.com/danielhams/didbs/blob...packagedef

The little patch I use is here (click "raw" if you only want the diff):

https://github.com/danielhams/didbs/blob...ixes.patch

And you can kind of grok the configuration I use to build it here (CC=c99 of course):

https://github.com/danielhams/didbs/blob...onfigureit

In terms of known bugs, I just re-ran the checks and the results can be seen here:

https://github.com/danielhams/didbs/blob.../knownbugs

Whether any of those are things you'll hit with I can't say of course.

(1) bsdtar fail is on long filenames.

(2) libarchive fails seem related to groups but maybe more fundamental issues (I don't run the tests as root, ofc) and possibly other perm issues. The failure in test_read_disk seems a blocker, not had enough time to find what that is.


Mr TS.
mrthinlysliced
Octane

Posts: 77
Threads: 5
Joined: May 2018
Find Reply
09-03-2018, 07:07 PM
#4
RE: The Quest for Libarchive/BSDTar
Hi Daniel,

I'll try to get some of these tests resolved and fix some more regressions before I call it done. I appreciate your input here, I'm hoping we can get a pull request for IRIX support (I'll maintain it)

I'm setting bsdtar/bsdcat to be static, and eventually I'd like to try and use them to replace the standard IRIX tar/cat, but we'll see. I'm kicking bsdcpio out for now.

Additionally, I'm disabling xar and lz4 support, and iconv. lzo2 I'd like to get working, and lz4, but lz4 is a bitch to try and get built because it won't validate installations.

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-03-2018, 07:36 PM
#5
RE: The Quest for Libarchive/BSDTar
Ok, got some progress here. The permissions tests are resolved when run as root, I don't see the other tests as a dealbreaker.

What is, is xz not working. Neither the bsdtar linking nor the xz I compiled works correctly. Gonna need to review your work on this dan.

Here's what happens: 

root@tohru ~ % xz -z neofetch

Segmentation fault (core dumped)

It just eventually segfaults. No usefulness to it. So there is a bug in xz somewhere.

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

(This post was last modified: 09-03-2018, 07:57 PM by Raion.)
Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-03-2018, 07:54 PM
#6
RE: The Quest for Libarchive/BSDTar
Can you provide a link to the file that fails? I'll see if I see the same over here.
mrthinlysliced
Octane

Posts: 77
Threads: 5
Joined: May 2018
Find Reply
09-03-2018, 08:19 PM
#7
RE: The Quest for Libarchive/BSDTar
Just download the latest neofetch and try it on there: wget https://github.com/dylanaraps/neofetch/a...master.zip

xz works fine under GCC.

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-03-2018, 08:50 PM
#8
RE: The Quest for Libarchive/BSDTar
That seems to be ok here:
Code:
[dan@leafy extracttest]$ wget https://github.com/dylanaraps/neofetch/archive/ma
ster.zip
--2018-09-03 22:11:23--  https://github.com/dylanaraps/neofetch/archive/master.zip
Resolving github.com... 192.30.253.112, 192.30.253.113
Connecting to github.com|192.30.253.112|:443... connected.
ERROR: cannot verify github.com's certificate, issued by 'CN=DigiCert SHA2 Extended Validation Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US':
  Unable to locally verify the issuer's authority.
To connect to github.com insecurely, use `--no-check-certificate'.
[dan@leafy extracttest]$ wget --no-check-certificate https://github.com/dylanar
aps/neofetch/archive/master.zip
--2018-09-03 22:11:37--  https://github.com/dylanaraps/neofetch/archive/master.zip
Resolving github.com... 192.30.253.112, 192.30.253.113
Connecting to github.com|192.30.253.112|:443... connected.
WARNING: cannot verify github.com's certificate, issued by 'CN=DigiCert SHA2 Extended Validation Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/dylanaraps/neofetch/zip/master [following]
--2018-09-03 22:11:38--  https://codeload.github.com/dylanaraps/neofetch/zip/master
Resolving codeload.github.com... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com|192.30.253.120|:443... connected.
WARNING: cannot verify codeload.github.com's certificate, issued by 'CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: 'master.zip'

master.zip              [  <=>               ] 111.38K   383KB/s    in 0.3s    

2018-09-03 22:11:38 (383 KB/s) - 'master.zip' saved [114058]

[dan@leafy extracttest]$ ls -l
total 112
-rw-r--r-- 1 dan user 114058 Sep  3 22:11 master.zip
[dan@leafy extracttest]$ unzip master.zip
Archive:  master.zip
6f17a2e367402d7f9219939ce13d7d3874141ce7
   creating: neofetch-master/
   creating: neofetch-master/.github/
  inflating: neofetch-master/.github/ISSUE_TEMPLATE.md  
  inflating: neofetch-master/.github/PULL_REQUEST_TEMPLATE.md  
  inflating: neofetch-master/.travis.yml  
  inflating: neofetch-master/CHANGELOG.md  
  inflating: neofetch-master/CONTRIBUTING.md  
  inflating: neofetch-master/LICENSE.md  
  inflating: neofetch-master/Makefile  
  inflating: neofetch-master/README.md  
  inflating: neofetch-master/neofetch  
  inflating: neofetch-master/neofetch.1  
Seems ok here. Maybe it's your versions of supporting tools?
mrthinlysliced
Octane

Posts: 77
Threads: 5
Joined: May 2018
Find Reply
09-03-2018, 09:16 PM
#9
RE: The Quest for Libarchive/BSDTar
No no no
Try to xz -z that file

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-03-2018, 09:34 PM
#10
RE: The Quest for Libarchive/BSDTar
Ok, ignore my last two posts, which I deleted because again this proves I'm oblivious.

I've revised the configure flags for users.

Dan, if you please, can you push that patch upstream for libarchive? With it being such a simple preprocessor define, it will likely be accepted.

I've figured out the root cause:

XZ, when compiled with mipspro, fails out with this:

https://pastebin.com/SEFtbwBX

In make check

It passes all in GCC.

libarchive will not take a GCC compiled xz, however. It fails at ./configure.

Code:
328474:./conftest: rld: Error: unresolvable symbol in /opt/local/lib/liblzma.so.6: pthread_sigmask
328474:./conftest: rld: Error: unresolvable symbol in /opt/local/lib/liblzma.so.6: pthread_join

I'm the manager
Besides IRIX Network, I run these sites:
projectkitsune.com

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

(This post was last modified: 09-04-2018, 02:51 AM by Raion.)
Raion
Operator
*******

Posts: 353
Threads: 68
Joined: Nov 2017
Website Find Reply
09-04-2018, 02:38 AM


Forum Jump:


Users browsing this thread: 2 Guest(s)