You are not logged in.

#1 2021-01-26 20:36:53

unmellow
Member
Registered: 2020-03-12
Posts: 38

requesting makepkg review for agregore-browser-aur

link: https://github.com/unmellow/agregore-browser-aur

haven't posted it to AUR yet I'm getting namcap errors but it is not clear to me how I would fix it

I would like to add that the installer works (slowly) for me so I'm not sure if i need to fix the errors

Last edited by unmellow (2021-01-26 20:41:58)

Offline

#2 2021-01-26 20:44:48

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: requesting makepkg review for agregore-browser-aur

Moving to 'AUR Issues'.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2021-01-26 20:48:19

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: requesting makepkg review for agregore-browser-aur

Please read...
https://wiki.archlinux.org/index.php/No … guidelines

Why not just copy the binary to /usr/bin instead? Then you don't need the sh file.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2021-01-26 21:26:22

loqs
Member
Registered: 2014-03-06
Posts: 17,193

Re: requesting makepkg review for agregore-browser-aur

Are the twenty nine thousand files copied from ${_pkgname}/release/linux-unpacked/* all needed?  Particularly ones for other architectures and source code.
Edit:
Why the lib32-gcc-libs dependency?

Last edited by loqs (2021-01-26 21:31:06)

Online

#5 2021-01-26 22:20:29

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

loqs wrote:

Are the twenty nine thousand files copied from ${_pkgname}/release/linux-unpacked/* all needed?  Particularly ones for other architectures and source code.
Edit:
Why the lib32-gcc-libs dependency?

lib32-gcc-libs is needed by one of the binary's in node-modules i did it this way out of lazyness

Offline

#6 2021-01-26 22:21:26

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

Slithery wrote:

Please read...
https://wiki.archlinux.org/index.php/No … guidelines

Why not just copy the binary to /usr/bin instead? Then you don't need the sh file.

I assumed the binary depended on the files in the linux-unpacked directory let me test it though

Offline

#7 2021-01-26 22:58:49

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: requesting makepkg review for agregore-browser-aur

Electron-based browser, very insecure...

  • Since it contains compiled ELF files, one of your namcap warnings was probably pointing out this cannot be arch=(any) and must instead be arch=(x86_64).

  • Also, it should be installed to /usr/lib/agregore-browser/ not /usr/share/agregore-browser/

  • Also, did you consider trying to use the system electron? https://wiki.archlinux.org/index.php/El … guidelines

  • srcdir and pkgdir variables must be quoted every time. They can contain any path name, and may have spaces in them.

  • Per the instructions at https://wiki.archlinux.org/index.php/VC … elines#Git please remove the "v" in the version.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2021-01-27 00:23:44

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

eschwartz wrote:

Electron-based browser, very insecure...

  • Since it contains compiled ELF files, one of your namcap warnings was probably pointing out this cannot be arch=(any) and must instead be arch=(x86_64).

  • Also, it should be installed to /usr/lib/agregore-browser/ not /usr/share/agregore-browser/

  • Also, did you consider trying to use the system electron? https://wiki.archlinux.org/index.php/El … guidelines

  • srcdir and pkgdir variables must be quoted every time. They can contain any path name, and may have spaces in them.

  • Per the instructions at https://wiki.archlinux.org/index.php/VC … elines#Git please remove the "v" in the version.


I did everything except the system electron thing I'll do that last
havent commited yet wasn't building assumed i added a bug need to delete everything real quick will commit soon tm

Last edited by unmellow (2021-01-27 00:24:26)

Offline

#9 2021-01-27 00:39:47

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

eschwartz wrote:

Electron-based browser, very insecure...

  • Since it contains compiled ELF files, one of your namcap warnings was probably pointing out this cannot be arch=(any) and must instead be arch=(x86_64).

  • Also, it should be installed to /usr/lib/agregore-browser/ not /usr/share/agregore-browser/

  • Also, did you consider trying to use the system electron? https://wiki.archlinux.org/index.php/El … guidelines

  • srcdir and pkgdir variables must be quoted every time. They can contain any path name, and may have spaces in them.

  • Per the instructions at https://wiki.archlinux.org/index.php/VC … elines#Git please remove the "v" in the version.

if I'm not mistaken i made every change except the electron one correct? will do the rest tomorrow thanks!

(i know piping sed into sed is not the correct way to do this but i copy pasted that from another aur package and don't know how to change it)

Last edited by unmellow (2021-01-27 00:41:21)

Offline

#10 2021-01-27 01:26:20

loqs
Member
Registered: 2014-03-06
Posts: 17,193

Re: requesting makepkg review for agregore-browser-aur

unmellow wrote:

(i know piping sed into sed is not the correct way to do this but i copy pasted that from another aur package and don't know how to change it)

There is an example showing how to remove a prefix in the link eschwartz provided.

Online

#11 2021-01-27 04:07:18

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

loqs wrote:
unmellow wrote:

(i know piping sed into sed is not the correct way to do this but i copy pasted that from another aur package and don't know how to change it)

There is an example showing how to remove a prefix in the link eschwartz provided.

I should read links lol thanks

Offline

#12 2021-01-27 19:34:04

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

eschwartz wrote:

OK it is using system electron.. but the way I did it is probably not best practice
(npm install in the install script)

I tried modifying electron-builder but i got infinite recursion E.G.
${srcdir}/agregore-browser/release/linux-unpacked/release/linux-unpacked/release etc...

this happened during build If you want the actual output I can get it just ask

Last edited by unmellow (2021-01-27 19:37:06)

Offline

#13 2021-01-27 22:18:43

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

unmellow wrote:
eschwartz wrote:

OK it is using system electron.. but the way I did it is probably not best practice
(npm install in the install script)

I tried modifying electron-builder but i got infinite recursion E.G.
${srcdir}/agregore-browser/release/linux-unpacked/release/linux-unpacked/release etc...

this happened during build If you want the actual output I can get it just ask


IDK why but my builds will no longer start I don't know why and I give up thanks for everything

Offline

#14 2021-01-28 05:03:30

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: requesting makepkg review for agregore-browser-aur

I'm very confused, since this isn't remotely anything like what the wiki guidelines I linked to recommend.

Maybe if you tried actually following the wiki page, you'd have more luck getting a system electron to work?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#15 2021-01-28 22:00:01

loqs
Member
Registered: 2014-03-06
Posts: 17,193

Re: requesting makepkg review for agregore-browser-aur

@eschwartz I tried following Electron_package_guidelines using the CLI approach,  the dist argument to --dir was rejected so I removed that.
The produced package is very similar to that produced by unmellow's first PKGBUILD,  both include 2900+ files.  Are those all needed?

# Maintainer: Unmellow <name2020@googlemail.commerce>
_pkgname=agregore-browser
pkgname=agregore-browser-git
pkgver=1.0.0.30.r3.gdc755dc
pkgrel=1
pkgdesc="A minimal browser for the distributed web"
arch=('x86_64')
url="https://github.com/AgregoreWeb/agregore-browser"
license=(AGPL)
makedepends=('git' 'npm')
depends=('electron' 'python3' 'nodejs')
source=("git+https://github.com/AgregoreWeb/agregore-browser/"
        "agregore-browser.desktop"
        "agregore-browser.sh")
sha1sums=('SKIP'
          '94f52aba0d484b95180774fd5a23a19cca9d5dde'
          '4b4467fef75406e8e669422b85e68c8f15b3beaf')

pkgver() {
  cd "$_pkgname"
  # cutting off 'v' prefix that presents in the git tag
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${srcdir}/${_pkgname}"
  # use system electron version
  # see: https://wiki.archlinux.org/index.php/Electron_package_guidelines
  electronDist=$(dirname $(realpath $(which electron)))
  electronVer=$(electron --version | tail -c +2)
  sed -i '/		"electron": /d' ./package.json
  HOME="$srcdir/.electron-gyp" npm install --cache "${srcdir}/npm-cache"
  ./node_modules/.bin/electron-builder --linux --x64 -c.electronDist=$electronDist -c.electronVersion=$electronVer --dir
}


package() {
  ### builded
  install -d          "${pkgdir}/usr/lib/agregore-browser"
  cp -r               "${srcdir}/${_pkgname}/"release/linux-unpacked/*  "${pkgdir}/usr/lib/agregore-browser/"

  ### tools
  install -Dm644      "${srcdir}/agregore-browser.desktop"              "${pkgdir}/usr/share/applications/agregore-browser.desktop"
  install -Dm755      "${srcdir}/agregore-browser.sh"                   "${pkgdir}/usr/bin/agregore-browser"

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

} 
# vim:set ts=2 sw=2 et:

Online

#16 2021-02-07 06:33:59

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: requesting makepkg review for agregore-browser-aur

loqs wrote:

@eschwartz I tried following Electron_package_guidelines using the CLI approach,  the dist argument to --dir was rejected so I removed that.
The produced package is very similar to that produced by unmellow's first PKGBUILD,  both include 2900+ files.  Are those all needed?

# Maintainer: Unmellow <name2020@googlemail.commerce>
_pkgname=agregore-browser
pkgname=agregore-browser-git
pkgver=1.0.0.30.r3.gdc755dc
pkgrel=1
pkgdesc="A minimal browser for the distributed web"
arch=('x86_64')
url="https://github.com/AgregoreWeb/agregore-browser"
license=(AGPL)
makedepends=('git' 'npm')
depends=('electron' 'python3' 'nodejs')
source=("git+https://github.com/AgregoreWeb/agregore-browser/"
        "agregore-browser.desktop"
        "agregore-browser.sh")
sha1sums=('SKIP'
          '94f52aba0d484b95180774fd5a23a19cca9d5dde'
          '4b4467fef75406e8e669422b85e68c8f15b3beaf')

pkgver() {
  cd "$_pkgname"
  # cutting off 'v' prefix that presents in the git tag
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${srcdir}/${_pkgname}"
  # use system electron version
  # see: https://wiki.archlinux.org/index.php/Electron_package_guidelines
  electronDist=$(dirname $(realpath $(which electron)))
  electronVer=$(electron --version | tail -c +2)
  sed -i '/		"electron": /d' ./package.json
  HOME="$srcdir/.electron-gyp" npm install --cache "${srcdir}/npm-cache"
  ./node_modules/.bin/electron-builder --linux --x64 -c.electronDist=$electronDist -c.electronVersion=$electronVer --dir
}


package() {
  ### builded
  install -d          "${pkgdir}/usr/lib/agregore-browser"
  cp -r               "${srcdir}/${_pkgname}/"release/linux-unpacked/*  "${pkgdir}/usr/lib/agregore-browser/"

  ### tools
  install -Dm644      "${srcdir}/agregore-browser.desktop"              "${pkgdir}/usr/share/applications/agregore-browser.desktop"
  install -Dm755      "${srcdir}/agregore-browser.sh"                   "${pkgdir}/usr/bin/agregore-browser"

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

} 
# vim:set ts=2 sw=2 et:

so i literally just stole this and added some
finds for deletion it seems to work and is little bit smaller
I might be able to get more space but I'm working on that
thanks loqi!

Last edited by unmellow (2021-02-07 06:59:03)

Offline

Board footer

Powered by FluxBB