You are not logged in.

#1 2022-11-16 13:59:30

Garfonso
Member
Registered: 2022-11-16
Posts: 3

Looking for preliminary review

Hi,

I am trying to create a PKGBUILD for Boinctasks-js ( https://efmer.com/boinctasks-js/ ). I'd like to submit this into the AUR, if it fits.

The tool itself is opensource, could be pulled from github, provides a .deb build and is also present in the snap store.

I tried to create a PKGBUILD file for the .deb version and would be happy if someone could have a look and give me hints, if I did something wrong. I tested the file and it seems to install on my system.

I am not 100% sure about the dependencies. I tried to extract them from the .deb package. It seems that there is a complete browser-engine shipped with the package.

# Maintainer: Garfonso <garfonso at mobo dot info>

pkgname=boinctasks-js-bin
pkgver=1.3.1
pkgrel=1
pkgdesc="Manage multiple BOINC clients in your network"
arch=('x86_64')
url='https://efmer.com/boinctasks-js/'
provides=('boinctasks-js')
license=('GPL3')
depends=(gtk3 libnotify nss libxtst xdg-utils libatspi.so libdrm opengl-driver libxcb)
#makedepends=('squashfs-tools')
source=("https://efmer.eu/download/boinc/boinc_tasks_js/linux/boinctasks-js_${pkgver}_amd64.deb")
sha256sums=('794e954aaab9a76acaf09b7e4e8157ee66a08b08d677cf91a25192416e15c737')

package() {
  tar -xf ${srcdir}/data.tar.zst -C "${pkgdir}/"
  chown root:root -R "${pkgdir}/"
  find "${pkgdir}/" -type d -exec chmod 755 "{}" \;
  chmod 755 -R "${pkgdir}/usr/bin/"
}

Best regads,
Garfonso

Offline

#2 2022-11-16 14:09:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: Looking for preliminary review

Garfonso wrote:

The tool itself is opensource, could be pulled from github... I tried to create a PKGBUILD file for the .deb version

That decision begs an explanation.  You've appropriately named the package with a -bin suffix so this is allowed.  But there should generally be a good reason to repackage a precompiled .deb rather than build from the original source (if it is available).  Does this take a long time to build on typical hardware?

Garfonso wrote:

It seems that there is a complete browser-engine shipped with the package.

If that also gets built from scratch with the from-source build, then that could be a very good reason to use the .deb.  However, it's possibly building from source could be made to rely on more on existing system utilities rather than bundling all of this with this package.

For dependencies, you can use the `namcap` tool to check the built pkg.tar.xz file and it will give some pointers.  Note namcap can miss some things can give some false positives, but it is still useful for a quick check on things you may want to investigate further.  Running namcap on the build -bin package suggests missing dependencies of ffmpeg and alsa-lib while other listed depedendencies may not be needed including libnotify and xdg-utils (though these are sometimes wrongly categorized as "not needed" by namcap as they may be used along with the packaged tool but not be linked to or invoked directly).

EDIT: this appears to use electron.  So a from-source build could then use the repo-provided electron package (and as an electron app the build should be trivial as it's just scripts anyhow - they don't get built, just bundled into an archive).  This would result in this package being much smaller.  I've never created PKGBUILDs for electron packages, but there is some guidance on the wiki and there are ample example available in the aur and repos.

Last edited by Trilby (2022-11-16 14:28:59)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-11-16 15:25:54

Garfonso
Member
Registered: 2022-11-16
Posts: 3

Re: Looking for preliminary review

Trilby wrote:
Garfonso wrote:

The tool itself is opensource, could be pulled from github... I tried to create a PKGBUILD file for the .deb version

That decision begs an explanation.

The honest explanation is, that I did not yet succeed in creating a from-source version of the package. Last time I tried, I struggled with downloading the right source files... I will definitively look into that again.
Should the package be called -git then? If I manage to download the source for a fixed version (using github releases / tags) should I omit the -git suffix?

Trilby wrote:

EDIT: this appears to use electron.  So a from-source build could then use the repo-provided electron package (and as an electron app the build should be trivial as it's just scripts anyhow - they don't get built, just bundled into an archive).  This would result in this package being much smaller.  I've never created PKGBUILDs for electron packages, but there is some guidance on the wiki and there are ample example available in the aur and repos.

Thanks for all your hints, I'll try to create a PKGBUILD file using system electron.

Offline

#4 2022-11-16 17:05:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: Looking for preliminary review

Garfonso wrote:

If I manage to download the source for a fixed version (using github releases / tags) should I omit the -git suffix?

Yes, omit the suffix if you download the versioned source tarball that upstream provides even if it comes from github.  The -git suffix is for packages that pull from the most recent (trunk/head/whatever) commit from upstream.

Note that packaging an electron package being a pain in the backside is not a horrible reason to just use the .deb as you have done.  I've been using arch for a while and have written a good handful of PKGBUILDs, and the thought of packaging this "properly" seems quite unappealing to me.  But if you are up for learning about it, I suspect building this from source to use the repo-packaged electron would be ideal.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB