1

Topic: Packaged version of Unar is not working with some RAR archives

When I tried to extract a non-working RAR archive I received this error.

Failed! (Attempted to read more data than was available)

The solution in this case is simply to update to the latest version of unar (using the Arch PKGBUILD of unarchiver).

2

Re: Packaged version of Unar is not working with some RAR archives

The Arch-package is NOT following the FSDG-guidelines and therefore it would be better to rework or update the version. Please don't recommend those packages as solution. They are none.

The problem a bit more clear described: The Arch-package is not following the naming-scheme for the licenses.

license=('LGPL2.1')

Correct would be therefore:

license=('LGPL-2.1')

And as system-distribution being an operating-system you have also to include the license-file for every package and software. The Arch-package is missing this point as many others. We can for sure update our version here with parts of the build-script and get a newer version. Nevertheless: Better be careful as Debian for example has a clear copyright-file for every package, for reasoning.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: Packaged version of Unar is not working with some RAR archives

Is that a general statement or one relating to this specific PKGBUILD?

4

Re: Packaged version of Unar is not working with some RAR archives

I have reworked the answer. smile Here is the corrected PKGBUILD:

# Maintainer (Arch): Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor (Arch): Cedric Girard <girard.cedric@gmail.com>
# Contributor (Arch): N30N <archlinux@alunamation.com>
# Maintainer: André Silva <emulatorman@hyperbola.info>
# Contributor: Tobias Dausend <throgh@hyperbola.info>

pkgname=unar
pkgver=1.10.7
_UniversalDetector_pkgver=1.1
pkgrel=1
pkgdesc="An Objective-C application for uncompressing archive files"
arch=('i686' 'x86_64')
url='https://github.com/MacPaw/XADMaster'
license=('LGPL-2.1')
depends=('gnustep-base' 'libressl' 'bzip2' 'icu' 'gcc-libs' 'zlib' 'wavpack')
makedepends=('gnustep-make' 'gcc-objc')
replaces=('unarchiver' 'unrar')
conflicts=('unarchiver' 'unrar')
provides=('unarchiver' 'unrar')
source=("XADMaster-${pkgver}.tar.gz::https://github.com/MacPaw/XADMaster/archive/v${pkgver}.tar.gz"
        "UniversalDetector-${_UniversalDetector_pkgver}.tar.gz::https://github.com/MacPaw/universal-detector/archive/${_UniversalDetector_pkgver}.tar.gz"
        "native_obj_exceptions.patch")
sha512sums=('3447b6d8f3f4fa5eea93c6628a1633017da6ff09c580d5ce4fd422027b3b79acbf38d6e41a059806d1e60eb25a9d66889938b32599168dc2c0ca648e1c1976b1'
            'e514670b3d37b2472ed3e9cb0fdc3298a8479772264b7573411f104be554222bec2e01f73e1f35db95620fe785bee2dcf9ddc9c2b1f4ff6b522fa64d14d020f5'
            '0501698400c7529467c5c5988aec66b0af6995274df91b312d21f2a651a7ea081efa255c53467cb95cf225ae8c3374ddad978cb447c39b221333a7aa9326b2a2')

prepare() {
  # The project requires UniversalDetector next to the source dir. See the project's README for more info about the build requirements.
  ln -s universal-detector-${_UniversalDetector_pkgver} UniversalDetector

  cd "$srcdir/XADMaster-${pkgver}"
  patch < $srcdir/native_obj_exceptions.patch
}

build() {
  cd "$srcdir/XADMaster-${pkgver}"

  . /usr/share/GNUstep/Makefiles/GNUstep.sh
  make -f Makefile.linux
}

package() {
  cd "$srcdir/XADMaster-${pkgver}"

  install -d "$pkgdir/usr/bin/"
  install -m755 unar lsar "$pkgdir/usr/bin/"
  install -Dm644 "$srcdir/XADMaster-${pkgver}/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"

  install -d "$pkgdir/usr/share/man/man1"
  install -m644 Extra/{lsar.1,unar.1} "$pkgdir/usr/share/man/man1/"
  install -d "$pkgdir/usr/share/bash-completion/completions/"
  install -m644 Extra/unar.bash_completion "$pkgdir/usr/share/bash-completion/completions/unar"
  install -m644 Extra/lsar.bash_completion "$pkgdir/usr/share/bash-completion/completions/lsar"
}

Hope this helps better?
Will be an update than.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

5 (edited by aloniv 2022-05-17 11:15:55)

Re: Packaged version of Unar is not working with some RAR archives

Where is native_obj_exceptions.patch (it has different sha512sum from the version in Hyperbola's repos)?

Silly me it's the one from Arch's repos smile

6

Re: Packaged version of Unar is not working with some RAR archives

Correct, sorry had only included the PKGBUILD.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

7

Re: Packaged version of Unar is not working with some RAR archives

Here is the commit for the update: https://git.hyperbola.info:50100/~team/ … a684932dfb

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!