Package Details: alist 3.40.0-1

Git Clone URL: https://aur.archlinux.org/alist.git (read-only, click to copy)
Package Base: alist
Description: File list program that supports multiple storage
Upstream URL: https://github.com/alist-org/alist
Licenses: AGPL-3.0-only
Submitter: lmartinez-mirror
Maintainer: sukanka
Last Packager: sukanka
Votes: 1
Popularity: 0.014526
First Submitted: 2022-04-18 03:41 (UTC)
Last Updated: 2024-11-22 16:11 (UTC)

Latest Comments

taotieren commented on 2023-12-27 13:18 (UTC)

Running error, the following modification and recompile run normally. Thank you.

journalctl -u alist.service 
...
2月 27 20:30:32 gtr7 alist[3461345]: FATA[2023-12-27 20:30:32] index.html not exist, you may forget to put dist of frontend to public/dist
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Main process exited, code=exited, status=1/FAILURE
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Failed with result 'exit-code'.
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Scheduled restart job, restart counter is at 4.
12月 27 20:30:32 gtr7 systemd[1]: Started alist.
12月 27 20:30:32 gtr7 alist[3461363]: INFO[2023-12-27 20:30:32] reading config file: /var/lib/alist/config.json
12月 27 20:30:32 gtr7 alist[3461363]: INFO[2023-12-27 20:30:32] load config from env with prefix: ALIST_
12月 27 20:30:32 gtr7 alist[3461363]: INFO[2023-12-27 20:30:32] init logrus...
12月 27 20:30:32 gtr7 alist[3461363]: WARN[2023-12-27 20:30:32] init tool aria2 failed: failed get aria2 version: Post "http://localhost:6800/jsonrpc": dial tcp [::1]:6800: connect: connect
ion refused
12月 27 20:30:32 gtr7 alist[3461363]: INFO[2023-12-27 20:30:32] init tool SimpleHttp success: ok
12月 27 20:30:32 gtr7 alist[3461363]: WARN[2023-12-27 20:30:32] init tool qBittorrent failed: Post "http://localhost:8080/api/v2/auth/login": dial tcp [::1]:8080: connect: connection refuse
d
12月 27 20:30:32 gtr7 alist[3461363]: FATA[2023-12-27 20:30:32] index.html not exist, you may forget to put dist of frontend to public/dist
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Main process exited, code=exited, status=1/FAILURE
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Failed with result 'exit-code'.
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Scheduled restart job, restart counter is at 5.
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Start request repeated too quickly.
12月 27 20:30:32 gtr7 systemd[1]: alist.service: Failed with result 'exit-code'.
12月 27 20:30:32 gtr7 systemd[1]: Failed to start alist.

# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>

pkgname=alist
pkgver=3.29.1
pkgrel=2
pkgdesc="File list program that supports multiple storage"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'arm7vh' 'aarch64' 'riscv64' 'loong64')
url="https://github.com/alist-org/alist"
license=('AGPL3')
depends=('glibc')
makedepends=('go')
backup=('etc/alist/config.json')
install=alist.install
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
    "dist-$pkgver.tar.gz::https://github.com/alist-org/alist-web/releases/latest/download/dist.tar.gz"
    'alist.service'
    'alist.tmpfiles'
    'alist.sysusers'
    'config.json')
sha256sums=('b7d1929d9aef511b263673dba8e5b787f695e1b4fa4555fe562f8060ee0bdea4'
            'ece9d3fd45f18eaa7376e5fc077ebeae8f67b7bcf6004a29ae58392bfc2a3d13'
            '5712b21aebf669fe9fb5d47dd685809d4d9670b1bb1d5e6fef962b9d11ba9d72'
            'c6b62c4a750ab921c2e8f965e4baeee28855c9a969b00eddd346670f2fdf12de'
            '3658370660806f73c3d9bc5f1b6e2a013c9520d34ffc4462df99f7692473613d'
            'b72f194a7b8855e97eeb76e63e179f38132cc9e6be9daa5b396699c9c11611de')

prepare() {
    cd "${srcdir}/$pkgname-$pkgver"
    rm -rf public/dist
    mv -f "${srcdir}/dist" public
    mkdir -p build
    go mod download
}

build() {
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
    cd "$pkgname-$pkgver"
    ## i tried, doesn't actually tag properly
    go build -o build \
        -ldflags="-linkmode external -extldflags \"${LDFLAGS}\" \
        -X 'github.com/alist-org/alist/conf.GoVersion=$(go version | awk '{print $3}')' \
        -X 'github.com/alist-org/alist/conf.GitTag=$pkgver'"
}

## FIXME: tests require an active connection
# check() {
#   export CGO_CPPFLAGS="${CPPFLAGS}"
#   export CGO_CFLAGS="${CFLAGS}"
#   export CGO_CXXFLAGS="${CXXFLAGS}"
#   export CGO_LDFLAGS="${LDFLAGS}"
#   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
#   cd "$pkgname-$pkgver"
#   go test ./...
# }

package() {
    cd "$pkgname-$pkgver"
    install -Dv "build/$pkgname" -t "$pkgdir/usr/bin/"
    install -Dvm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
    install -Dvm644 "${srcdir}/alist.service" -t "${pkgdir}/usr/lib/systemd/system/"
    install -Dvm644 "${srcdir}/config.json" -t "${pkgdir}/etc/${pkgname}"
    install -Dvm644 "${srcdir}/alist.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
    install -Dvm644 "${srcdir}/alist.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
}

Kimi_Arthur commented on 2022-09-23 14:21 (UTC) (edited on 2022-09-24 01:31 (UTC) by Kimi_Arthur)

After fresh install of 3.0.1 version and run alist server in home directory, I got

INFO[2022-09-23 14:19:13] reading config file: data/config.json
INFO[2022-09-23 14:19:13] load config from env with prefix: ALIST_
INFO[2022-09-23 14:19:13] init logrus...

And nothing else happens except some files created.