Skip to content

[Arch Linux] DiE 3.11+ detects known file types as "Unknown" #333

@ClosedPort22

Description

@ClosedPort22

This issue only affects DiE 3.11 and above on Arch Linux.

Steps to reproduce:

  1. Install the GitHub release of DiE via pacman: sudo pacman -U https://github.com/horsicq/DIE-engine/releases/download/Beta/detect-it-easy-3.20-1-x86_64.pkg.tar.zst

  2. Open any known file with DiE, e.g. a plain text file

  3. Notice that DiE detects the file type as "Unknown"

This happens because starting from 3.11, DiE searches for signatures, etc. in /usr/lib/die/ instead of $data (whatever that means). If you go to Options > Scan and replace all occurrences of /usr/lib/die/ with /opt/detect-it-easy/, then DiE will work normally again. However, there don't seem to be options for customizing the locations of QSS and language files, so these features are still broken.

I am honestly surprised that no one seems to have reported this anywhere yet, but I don't think it's specific to my setup. In any case, if someone is facing the same problem as I am and has stumbled upon this issue, you can fix it by simply symlinking all subdirectories in /opt/detect-it-easy/ into /usr/lib/die/. Here's a PKGBUILD that does just that:

pkgname=detect-it-easy-directory-fix
pkgver=1
pkgrel=1
pkgdesc='Fix directory layout of Detect It Easy 3.11+'
arch=('any')
url='https://github.com/horsicq/Detect-It-Easy/issues/333'
license=('0BSD')
depends=('detect-it-easy>3.10')

package() {
  mkdir -p "$pkgdir/usr/lib/die/"
  for dir in {db,images,info,lang,qss,signatures,yara_rules}; do
    ln -s "/opt/detect-it-easy/$dir" "$pkgdir/usr/lib/die/$dir"
  done
}

Of course, this can also be fixed by repackaging the .pkg.tar.zst file.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions