Package Details: hack-browser-data-git r153.ea137f9-1

Git Clone URL: https://aur.archlinux.org/hack-browser-data-git.git (read-only, click to copy)
Package Base: hack-browser-data-git
Description: hack-browser-data is an open-source tool that could help you decrypt data ( password|bookmark|cookie|history|credit card|downloads link ) from the browser.
Upstream URL: https://github.com/moonD4rk/HackBrowserData
Licenses: MIT
Submitter: Ddone
Maintainer: Ddone
Last Packager: Ddone
Votes: 0
Popularity: 0.000000
First Submitted: 2021-09-13 09:34 (UTC)
Last Updated: 2021-09-13 09:34 (UTC)

Latest Comments

dreieck commented on 2024-06-17 17:28 (UTC)

Just aesthetics: You mix tabs and spaces in indentation. Could be nice to have it unified (all tabs, or all (double- or quadruple) spaces).

dreieck commented on 2024-06-17 17:27 (UTC)

Here is a diff of your current PKGBUILD and the fixes which I mentioned in my 5 comments from today (and some other changes I just did locally):

--- PKGBUILD.org    2024-06-17 18:56:16.036801147 +0200
+++ PKGBUILD    2024-06-17 19:26:15.210195497 +0200
@@ -3,3 +3,3 @@
 pkgrel=1
-pkgver=r153.ea137f9
+pkgver=0.4.5+23.r399.20240412.fa09f73
 pkgdesc="hack-browser-data is an open-source tool that could help you decrypt data ( password|bookmark|cookie|history|credit card|downloads link ) from the browser."
@@ -10,8 +10,14 @@
 optdepends=()
-makedepends=("git" "go") # 'bzr', 'git', 'mercurial' or 'subversion'
-source=("git+${url}.git#branch=master")
-md5sums=('SKIP')
+makedepends=("git" "go")
+provides=("hack-browser-data=${pkgver}")
+conflicts=("hack-browser-data")
+source=("git+${url}.git")
+sha256sums=('SKIP')

-# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
-# a description of each element in the source array.
+prepare() {
+   export GOPATH="${srcdir}/.go"
+   export GOBIN="${GOPATH}/bin"
+   cd "$srcdir/HackBrowserData"
+   go get -v -t -d ./...
+}

@@ -19,3 +25,13 @@
    cd "$srcdir/HackBrowserData"
-   printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+   _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|-g[0-9a-f]*$||' -e 's|-|+|g')"
+   _rev="$(git rev-list --count HEAD)"
+   _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
+   _hash="$(git rev-parse --short HEAD)"
+
+   if [ -z "${_ver}" ]; then
+       error "Version could not be determined."
+       return 1
+   else
+       printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
+   fi
 }
@@ -23,5 +39,6 @@
 build() {
+   export GOPATH="${srcdir}/.go"
+   export GOBIN="${GOPATH}/bin"
    cd "$srcdir/HackBrowserData"
-    go get -v -t -d ./...
-    go build
+    go build -v ./cmd/...
 }
@@ -30,3 +47,8 @@
    cd "$srcdir/HackBrowserData"
-    install -D -m755 "$srcdir/HackBrowserData/hack-browser-data" "$pkgdir/usr/bin/hack-browser-data"
+    install -Dv -m755 "$srcdir/HackBrowserData/hack-browser-data" "$pkgdir/usr/bin/hack-browser-data"
+
+   install -Dvm644 "LOGO.png" "${pkgdir}/usr/share/pixmaps/hack-browser-data.png"
+   install -Dvm644 -t "${pkgdir}/usr/share/doc/hack-browser-data" "CODE_OF_CONDUCT.md" "CONTRIBUTING.md" "CONTRIBUTORS.svg" "README.md" "README_ZH.md"
+   ln -svr "${pkgdir}/usr/share/pixmaps/hack-browser-data.png" "${pkgdir}/usr/share/doc/hack-browser-data/LOGO.png"
+   install -Dvm644 -t "${pkgdir}/usr/share/licenses/pkgname" "LICENSE"
 }

Feel free to use what you find useful.
Regards and thanks for maintaining!

dreieck commented on 2024-06-17 17:17 (UTC)

You need to install the license text into /usr/share/licenses/${pkgname}/:

hack-browser-data-git E: Uncommon license identifiers such as 'MIT' require license files below /usr/share/licenses/hack-browser-data-git/ or switching to common license identifiers. Found 0/1 required license files.

Regards and thanks for maintaining!

dreieck commented on 2024-06-17 17:15 (UTC) (edited on 2024-06-17 17:16 (UTC) by dreieck)

build() fails with no Go files in [...]/HackBrowserData:

==> Starting build()...
no Go files in /var/cache/makepkg/build/hack-browser-data-git/src/HackBrowserData
==> ERROR: A failure occurred in build().

Please change go build to go build -v ./cmd/....

dreieck commented on 2024-06-17 17:02 (UTC)

I get source checkout error fatal: invalid reference: origin/master:

==> Extracting sources...
  -> Creating working copy of HackBrowserData git repo...
fatal: invalid reference: origin/master
==> ERROR: Failure while creating working copy of HackBrowserData git repo

Please remove #branch=master from the source entry.

dreieck commented on 2024-06-17 16:59 (UTC)

Please also make sure that the go download stuff happens before build() (in prepare()) and is not cluttering the user's home directory:

  • Move go get -v -t -d ./... into prepare() function,
  • add to prepare() and build():
    export GOPATH="${srcdir}/.go"
    export GOBIN="${GOPATH}/bin"

Regards and thanks for maintaining!

dreieck commented on 2024-06-17 16:54 (UTC)

Please add

  • provides=("hack-browser-data")
  • conflicts=("hack-browser-data")

Regards and thanks for the package!