Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at launch: Exception: Error: spawn /home/basedlord/searchd ENOENT #194

Open
Am0g-us opened this issue Aug 11, 2023 · 3 comments
Open

Comments

@Am0g-us
Copy link

Am0g-us commented Aug 11, 2023

I am the maintainer of this program at AUR. It builds successfully, but the following error occurs when trying to run it:

[12.08.2023 02:45:08] [system] Rats 1.11.0
[12.08.2023 02:45:08] [system] Platform: linux
[12.08.2023 02:45:08] [system] Arch: x64
[12.08.2023 02:45:08] [system] OS Release: 6.4.9-273-tkg-cfs
[12.08.2023 02:45:08] [system] CPU: Intel(R) Xeon(R) CPU E5-2696 v4 @ 2.20GHz
[12.08.2023 02:45:08] [system] CPU Logic cores: 88
[12.08.2023 02:45:08] [system] Total memory: 128773.75 MB
[12.08.2023 02:45:08] [system] Free memory: 93710.01 MB
[12.08.2023 02:45:08] [system] NodeJS: v18.14.0
[12.08.2023 02:45:08] [system] Desktop server
(node:2838942) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `rats-search --trace-deprecation ...` to show where the warning was created)
[12.08.2023 02:45:08] [udp-tracker] listening udp tracker respose on 0.0.0.0:4446
[12.08.2023 02:45:10] [sphinx] Sphinx Path: /home/basedlord/searchd
[12.08.2023 02:45:10] [sphinx] writed sphinx config to /home/basedlord/.config/Rats on The Boat
[12.08.2023 02:45:10] [sphinx] db path: /home/basedlord/.config/Rats on The Boat
[12.08.2023 02:45:10] [system] Exception: Error: spawn /home/basedlord/searchd ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/basedlord/searchd',
  path: '/home/basedlord/searchd',
  spawnargs: [
    '--config',
    '/home/basedlord/.config/Rats on The Boat/sphinx.conf',
    '--nodetach'
  ]
} Origin: uncaughtException

What to do in this situation?

@DEgITx
Copy link
Owner

DEgITx commented Aug 12, 2023

  1. Can you please provide command list how you tried to run it
  2. have you performed git clone --recurse-submodules https://github.com/DEgITx/rats-search.git with recurse-submodules after you clone program ?

@Am0g-us
Copy link
Author

Am0g-us commented Aug 12, 2023

I init submodules (git submodule update --init --recursive) and have following error

[12.08.2023 04:56:03] [system] Desktop server
(node:1150243) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `rats-search --trace-deprecation ...` to show where the warning was created)
[12.08.2023 04:56:03] [udp-tracker] listening udp tracker respose on 0.0.0.0:4446
[12.08.2023 04:56:03] [sphinx] Sphinx Path: /opt/rats-search-git/x64/searchd
[12.08.2023 04:56:03] [config] dbPath = /home/basedlord/.config/Rats on The Boat
[12.08.2023 04:56:03] [sphinx] writed sphinx config to /home/basedlord/.config/Rats on The Boat
[12.08.2023 04:56:03] [sphinx] db path: /home/basedlord/.config/Rats on The Boat
[12.08.2023 04:56:03] [sphinx] sphinx closed with code 127 and signal null
[12.08.2023 04:56:03] [sphinx] sphinx closing...
[12.08.2023 04:56:03] [sphinx] stoping with sphinx stopwait

I missed the point with submodules earlier, but when you initialize them and copy them, it goes like this. The following script is used to start it (the program is installed in /opt)

#!/bin/bash

# Launch application
exec /opt/rats-search-git/rats-search "$@"

@Am0g-us
Copy link
Author

Am0g-us commented Aug 12, 2023

What could be wrong with this PKGBUILD? (I want to provide support for rats-search at aur)

# Maintainer: Amog-us <ask at amogussugomus at proton dot me>
# Contributor: davedatum <ask at davedatum dot com>

pkgname=rats-search-git
pkgver=1.11.0.r18.gcbda746
pkgrel=1
pkgdesc="BitTorrent P2P multi-platform search engine for Desktop and Web servers with integrated torrent client."
arch=("x86_64")
url="https://github.com/DEgITx/rats-search"
license=("MIT")
depends=("electron")
makedepends=("git" "npm" "imagemagick")
provides=("${pkgname}")
conflicts=("${pkgname}")
install=${pkgname}.install
source=("${pkgname}::git+$url.git"
		"${pkgname}.sh"
		"${pkgname}.desktop"
		"${pkgname}.install")
md5sums=('SKIP'
         'bf8d0e316e3904298ec63d3e5a44bc94'
         'a0d9bad379a6774e8bbc28da8a4979a3'
         '1a85dc610507dd1b2db75f95d1917126')

prepare() {
	cd "${srcdir}/${pkgname}"
	git submodule update --init --recursive
	sed -i -e '/"scripts": {/a "linux": "npm run prebuild && electron-builder --dir",' "${srcdir}/${pkgname}/package.json"
}

pkgver() {
  cd "${pkgname}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "${srcdir}/${pkgname}"
	npm install --force && npm run linux
	#Yes, --force is really needed here. If you are worried about security, use a sandbox like firejail or bubblejail.
}

package() {
	install -dm755 "${pkgdir}/opt/${pkgname}"
	cp -a "${srcdir}/${pkgname}/dist/linux-unpacked/." "${pkgdir}/opt/${pkgname}"

	install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
	install -Dm644 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"

	install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  	for _size in "192x192" "128x128" "96x96" "64x64" "48x48" "32x32" "24x24" "22x22" "20x20" "16x16" "8x8"
  	do
    	install -dm755 "${pkgdir}/usr/share/icons/hicolor/${_size}/apps"
    	convert "${srcdir}/${pkgname}/resources/icons/512x512.png" \
    	-resize "${_size}" "${pkgdir}/usr/share/icons/hicolor/${_size}/apps/${pkgname}.png"
  	done
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants