hackerspace-bootstrap / strichliste

DEPRECATED - strichliste is a tool to replace a tally sheet inside a hackerspace, this module is the api for the strichliste
MIT License
17 stars 12 forks source link

Unable to install on ArchLinux #271

Closed NicoHood closed 6 years ago

NicoHood commented 6 years ago

Hi, I am preparing a package for ArchLinux but I am unable to install strichliste. The error is the following:

../src/database.cc:134:86: error: no matching function for call to ‘v8::Object::ForceSet(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Int32>::return_t, v8::PropertyAttribute)’

I also get a lot of depreciated warnings when compiling the source. Maybe you are using an too old version of some dependencies for strichliste?

My PKGBUILD looks like this:

# Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161

pkgname='strichliste'
pkgdesc="strichliste is a tool to replace a tally sheet inside a hackerspace, this module is the api for the strichliste"
pkgver=1.4.5
pkgrel=1
arch=('any')
url="https://github.com/hackerspace-bootstrap/strichliste"
license=('MIT')
depends=('nodejs' 'sqlite')
makedepends=('npm' 'python2' 'python')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hackerspace-bootstrap/${pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('1ef061086d7c0c0e5b2663e4c4b565a3b02fb5a6226792bc5de84224be701d32deaeb7358ce71b23b1a5ab956b5c1fb4285fc548bcb53514383473edbe707064')
validpgpkeys=('') # TODO

package() {
    npm install --python=python2 -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tar.gz

    install -d "$pkgdir"/usr/share/licenses/$pkgname
    ln -s ../../../lib/node_modules/$pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
schinken commented 6 years ago

hm.. i tried it on my machine:

schinken@sapphire ~/projects/hackerspace-bootstrap/strichliste ±master⚡
» npm i

 sqlite3@3.1.13 install
/home/schinken/projects/hackerspace-bootstrap/strichliste/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

[sqlite3] Success:
"/home/schinken/projects/hackerspace-bootstrap::Object/strichliste/node_modules/sqlite3/lib/binding/node-v59-linux-x64/node_sqlite3.node"
is installed via remote
added 400 packages in 10.508s
schinken@sapphire ~/projects/hackerspace-bootstrap/strichliste ±master⚡
» node -v
v9.2.0

looks like it worked (and it's an arch linux, too) actually i have no idea...

first i thought there might be some additional sqlite-dev, but there isn't

NicoHood commented 6 years ago

Try to use my PKGBUILD in a clean chroot with devtools. This is how it needs to work for building a package.

NicoHood commented 6 years ago

Try to download the PKGBUILD file from above, install devtools and base-devel and then run extra-x86_64-build inside the folder of the PKGBUILD. There is no chance for me to get the package compile. You should see the same error, as its done in a clean chroot.

Oh and i am using the tagged version 1.4.5, not the git master.

NicoHood commented 6 years ago

I found out the issue. With the latest master everything installs fine. Could you please tag a new release?

Would you mind GPG singing the release also?

You might also want to update some more dependencies, as they are also listed outdated.

NicoHood commented 6 years ago

The issue I am now facing is, that the package itself is empty and only contains a symlink to the strichliste node module. That might be fixed if a tarball is used or something in the npm packaging is incomplete. I have not yet packaged npm programs before, so I might do something wrong:

# Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161

pkgname='strichliste'
pkgdesc="strichliste is a tool to replace a tally sheet inside a hackerspace, this module is the api for the strichliste"
pkgver=1.4.5
pkgrel=1
arch=('any')
url="https://github.com/hackerspace-bootstrap/strichliste"
license=('MIT')
depends=('nodejs' 'sqlite')
makedepends=('npm' 'python2' 'python')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hackerspace-bootstrap/${pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('1ef061086d7c0c0e5b2663e4c4b565a3b02fb5a6226792bc5de84224be701d32deaeb7358ce71b23b1a5ab956b5c1fb4285fc548bcb53514383473edbe707064')
validpgpkeys=('') # TODO

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

    sed -i 's/"sqlite3": "3.1.8",/"sqlite3": "3.1.13",/g' "package.json"
    npm install --production --python=python2 -g --user root --prefix "${pkgdir}"/usr

    install -d "${pkgdir}/usr/share/licenses/${pkgname}"
    ln -s "../../../lib/node_modules/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
schinken commented 6 years ago

The node_modules has to be in the same directory as the server.js etc. I haven't packaged an arch package myself yet, so I also don't know much about it.

I'm going to tag a new release for you to use. Maybe thats a tiny step towards an AUR package :)

schinken commented 6 years ago

Oh man. that strichliste server is totally broken, because of new dependencies. I'm trying to contact the author of the server (i only did the frontend) and hopefully he'll help me to fix that :/

NicoHood commented 6 years ago

@schinken that'd be nice. We are also using this in our local hackerspace (in germany), maybe the guys can also help or test. We did some other customizations but I had no chance to talk with them yet. I guess we are using a way older version (never touch a running system) which is totally insecure.

schinken commented 6 years ago

We're currently rewriting the whole strichliste thingy already: https://github.com/strichliste/strichliste / https://github.com/hackerspace-bootstrap/strichliste-django

The frontend should work even with the old backend.

NicoHood commented 6 years ago

So the first link is the new frontend and the 2nd link is the new backend?

It looks like there is no progress at the moment, nor any stable version yet. Is this planned, because you said "currently"? Am I missing any private branch maybe?

Edit: The new tag now works properly, thanks! Still got some issues with the package. Depending on the new version I will fix those or not. Also I'd like to know if you still recommend to use this current strichliste version because of those outdated packages, regarding security etc.

NicoHood commented 6 years ago

I got the old/current strichliste package now up and running under archlinux. Its running as systemd service with a separate user. However I have a problem, on the user page its written "userPageTitle". I can imagine the following reasons:

Any ideas? -> Edit: It only seem to happen with my chromium. But this is the browser which I have not customized, so I am wondering even more why it does not work there with the local install. Firefox works. And chromium with the web demo works too.

Edit: Checkout the package: https://aur.archlinux.org/packages/strichliste/

NicoHood commented 6 years ago

The AUR package is working properly and my chrome issue could be solved by serving the frontend via http server. A simple testserver can be run with python3 -m http.server inside the frontend folder. Or simply copy the files to the nginx default directory (/usr/share/nginx/html/) and start its service.

Thanks for this wonderful tool!

schinken commented 6 years ago

https://aur.archlinux.org/packages/strichliste-web/

btw. ngnix -> nginx? ;)