diff --git a/.drone.yml b/.drone.yml index e3a0063..b04c0fd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,7 +19,7 @@ steps: - "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" - chown -R build:build . - sudo -u build --preserve-env=PGP_KEY,PGP_PWD,PGP_ID sh -c 'mkdir ~/.gnupg && echo -e "default-cache-ttl 3600\nallow-preset-passphrase" > ~/.gnupg/gpg-agent.conf && echo "$PGP_KEY" | gpg --import --no-tty --batch --yes && echo "$PGP_PWD" | /usr/lib/gnupg/gpg-preset-passphrase --preset $PGP_ID' - - sudo -u build --preserve-env=DRONE_GIT_HTTP_URL,DRONE_SOURCE_BRANCH,GIT_PASSWORD sh -c './build.sh' + - sudo -u build --preserve-env=DRONE_GIT_HTTP_URL,DRONE_BRANCH,GIT_PASSWORD sh -c './build.sh' environment: PGP_KEY: from_secret: PGP_KEY diff --git a/.util.sh b/.util.sh index 90fbcbf..6c7ce02 100644 --- a/.util.sh +++ b/.util.sh @@ -1,25 +1,22 @@ -#!/bin/sh +#!/bin/bash update_github_tag() { - local repo=$1 - - ver=`curl -Ls https://api.github.com/repos/${repo}/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not)] | first | .name' | cut -c2-` - echo "$ver" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD + ver=$(curl -Ls https://api.github.com/repos/"$1"/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not)] | first | .name' | cut -c2-) + echo "${ver}" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD } update_pkg() { - updpkgsums + if [ $(git diff . | wc -l) -ne 0 ]; then + sed -i 's/pkgrel=.*/pkgrel=1/' PKGBUILD - if [ $? -eq 0 ] - then - makepkg --printsrcinfo > .SRCINFO + if updpkgsums; then + makepkg --printsrcinfo >.SRCINFO git add .SRCINFO PKGBUILD - git commit -m "$(basename $(pwd)): update to $ver [CI SKIP]" - if [ $? -eq 0 ] - then - git push --set-upstream origin $DRONE_SOURCE_BRANCH + if git commit -m "$(basename $(pwd)): update to ${ver} [CI SKIP]"; then + git push --set-upstream origin "${DRONE_BRANCH}" fi + fi fi } diff --git a/aur.txt b/aur.txt index d5a365e..a4584ad 100644 --- a/aur.txt +++ b/aur.txt @@ -25,7 +25,6 @@ inxi iprange it87-dkms-git jdk17-graalvm-bin -jellyfin jellyfin-ffmpeg5 kernel-modules-hook kodi-standalone-service diff --git a/build.sh b/build.sh index e828c07..ac9b8f5 100755 --- a/build.sh +++ b/build.sh @@ -1,51 +1,62 @@ #!/bin/bash +. .util.sh + build() { - if [ -f "update.sh" ]; then - ./update.sh - fi - - if grep -c 'git+' PKGBUILD > /dev/null ; then + if grep -c 'git+' PKGBUILD >/dev/null && ! grep -c '#tag=' PKGBUILD >/dev/null; then makepkg --nodeps --nobuild --skippgpcheck --noconfirm + makepkg --printsrcinfo >.SRCINFO fi - makepkg --printsrcinfo > .SRCINFO name=$(grep -m1 'pkgname' .SRCINFO | cut -d'=' -f2 | tr -d ' ') ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ') rel=$(grep 'pkgrel' .SRCINFO | cut -d'=' -f2 | tr -d ' ') epoch=$(grep 'epoch' .SRCINFO | cut -d'=' -f2 | tr -d ' ') - if [ -n "$epoch" ] ; then - epoch=$epoch: + if [ -n "${epoch}" ]; then + epoch=${epoch}: fi - if ! compgen -G "/repo/$name-$epoch$ver-$rel-*.pkg.tar.zst" > /dev/null ; then - if makepkg -s --skippgpcheck --noconfirm --sign || makepkg -s --skippgpcheck --nocheck --noconfirm --sign ; then - for pkg in *.pkg.tar.zst ; do - cp "$pkg"{,.sig} /repo/ - repo-add -R -s /repo/nyyu.db.tar.zst /repo/"$pkg" + if ! compgen -G "/repo/${name}-${epoch}${ver}-${rel}-*.pkg.tar.zst" >/dev/null; then + if makepkg -s --skippgpcheck --noconfirm --sign || makepkg -s --skippgpcheck --nocheck --noconfirm --sign; then + for pkg in *.pkg.tar.zst; do + cp "${pkg}"{,.sig} /repo/ + repo-add -R -s /repo/nyyu.db.tar.zst /repo/"${pkg}" done sudo pacman -Sy fi fi } -env git config user.email "drone@nyyu.dev" git config user.name "drone" -git remote set-url origin $DRONE_GIT_HTTP_URL +git remote set-url origin "${DRONE_GIT_HTTP_URL}" git config credential.helper '!f() { sleep 1; echo "username=drone"; echo "password=${GIT_PASSWORD}"; }; f' -for d in */ ; do - cd "$d" || continue - build +for d in */; do + cd "${d}" || continue + if [ -f PKGBUILD ]; then + echo "--> ${d}" + if [ -f update.sh ]; then + ./update.sh + fi + + if ! grep -c 'pkgver()' PKGBUILD >/dev/null; then + repo=$(grep -oPm 1 'github\.com\/\K([a-z0-9]|-)+\/([a-z0-9]|-)+' .SRCINFO) + if [ -n "${repo}" ]; then + update_github_tag "${repo}" && update_pkg + fi + fi + + build + fi cd .. done while read -r p; do - git clone https://aur.archlinux.org/"$p".git || continue - cd "$p" || continue + git clone https://aur.archlinux.org/"${p}".git || continue + cd "${p}" || continue build cd .. done D8F9672D77C0BB60A024C23EDFDE60A0093EB926 # Lauris Bukšis-Haberkorns new RSA4096 BA66F67FD73F7058D712D308C3B7C91B632F738A # Lunny Xiao , retrieved from https://github.com/lunny.gpg - B5F0915813554C32C1D599C2C99B82E40B027BAE # '6543' <6543@obermui.de> + B5F0915813554C32C1D599C2C99B82E40B027BAE # '6543' <6543@obermui.de> D2CF76DA95F201E9901532AB3CDE74631F13A748 # Andrew Thornton , retrieved from https://github.com/zeripath.gpg ) install=gitea.install prepare() { cd ${srcdir} - # Fetch dependency using go mod - make vendor + make deps } build() { @@ -59,6 +59,11 @@ build() { make -j1 } +check() { + cd ${srcdir} + make test +} + package() { cd ${srcdir} install -Dm755 ${pkgname} -t "${pkgdir}"/usr/bin/ diff --git a/gitea/update.sh b/gitea/update.sh deleted file mode 100755 index f2f3148..0000000 --- a/gitea/update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -source ../.util.sh - -update_github_tag go-gitea/gitea - -[ $? -eq 0 ] && update_pkg diff --git a/java8/.SRCINFO b/java8/.SRCINFO new file mode 100644 index 0000000..cd6fcd6 --- /dev/null +++ b/java8/.SRCINFO @@ -0,0 +1,8 @@ +pkgbase = java8 + pkgver = 1 + pkgrel = 1 + arch = any + provides = java-runtime=8 + provides = java-runtime-openjdk=8 + +pkgname = java8 diff --git a/k3s-bin/.SRCINFO b/k3s-bin/.SRCINFO index 8df242f..6900341 100644 --- a/k3s-bin/.SRCINFO +++ b/k3s-bin/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = k3s-bin pkgdesc = Lightweight Kubernetes - pkgver = 1.24.1+k3s1 + pkgver = 1.24.2+k3s1 pkgrel = 1 url = https://k3s.io arch = x86_64 @@ -16,11 +16,11 @@ pkgbase = k3s-bin sha256sums = 571af7c8403f2f433afa50702a53658dbb9f846da7c6ac2a3ba6cc454039429a sha256sums = 667199fa6b811dde3aef3e626e2695a566ad64c9a03d19d0c94a1f104a7612d0 sha256sums = 73662123fb2273bcb520231838cbfa6360d0f4354fc958284c4bf07c1a9f027d - source_x86_64 = k3s-1.24.1+k3s1-x86_64::https://github.com/rancher/k3s/releases/download/v1.24.1+k3s1/k3s - sha256sums_x86_64 = ca398d83fee8f9f52b05fb184582054be3c0285a1b9e8fb5c7305c7b9a91448a - source_armv7h = k3s-1.24.1+k3s1-armv7h::https://github.com/rancher/k3s/releases/download/v1.24.1+k3s1/k3s-armhf - sha256sums_armv7h = 137ac6e2ff61701d1a6bad9df41ffc36c649b5d727da94ebc1990721b2f42e69 - source_aarch64 = k3s-1.24.1+k3s1-aarch64::https://github.com/rancher/k3s/releases/download/v1.24.1+k3s1/k3s-arm64 - sha256sums_aarch64 = bd8b87d215f7a073d0139a0ab70e3fbeaa76e1b9ce6c00cd8d471cb44ba80687 + source_x86_64 = k3s-1.24.2+k3s1-x86_64::https://github.com/rancher/k3s/releases/download/v1.24.2+k3s1/k3s + sha256sums_x86_64 = f2a255e30e817e476a4a5d4cab5bb23368049c5c5fc3d70162522786d748a885 + source_armv7h = k3s-1.24.2+k3s1-armv7h::https://github.com/rancher/k3s/releases/download/v1.24.2+k3s1/k3s-armhf + sha256sums_armv7h = df7fc16a4f5b6dace55c08b8307a363f1330cec2abece4ca65949752366fd063 + source_aarch64 = k3s-1.24.2+k3s1-aarch64::https://github.com/rancher/k3s/releases/download/v1.24.2+k3s1/k3s-arm64 + sha256sums_aarch64 = d6f32b4c78881d115c9c4296ff577d692a2d4b999e6cf472f029d6de8339db24 pkgname = k3s-bin diff --git a/k3s-bin/PKGBUILD b/k3s-bin/PKGBUILD index 34a4ee1..dfcfa09 100644 --- a/k3s-bin/PKGBUILD +++ b/k3s-bin/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: duxet pkgname=k3s-bin -pkgver=1.24.1+k3s1 +pkgver=1.24.2+k3s1 pkgrel=1 pkgdesc="Lightweight Kubernetes" url="https://k3s.io" @@ -31,9 +31,9 @@ source_aarch64=( sha256sums=('571af7c8403f2f433afa50702a53658dbb9f846da7c6ac2a3ba6cc454039429a' '667199fa6b811dde3aef3e626e2695a566ad64c9a03d19d0c94a1f104a7612d0' '73662123fb2273bcb520231838cbfa6360d0f4354fc958284c4bf07c1a9f027d') -sha256sums_x86_64=('ca398d83fee8f9f52b05fb184582054be3c0285a1b9e8fb5c7305c7b9a91448a') -sha256sums_armv7h=('137ac6e2ff61701d1a6bad9df41ffc36c649b5d727da94ebc1990721b2f42e69') -sha256sums_aarch64=('bd8b87d215f7a073d0139a0ab70e3fbeaa76e1b9ce6c00cd8d471cb44ba80687') +sha256sums_x86_64=('f2a255e30e817e476a4a5d4cab5bb23368049c5c5fc3d70162522786d748a885') +sha256sums_armv7h=('df7fc16a4f5b6dace55c08b8307a363f1330cec2abece4ca65949752366fd063') +sha256sums_aarch64=('d6f32b4c78881d115c9c4296ff577d692a2d4b999e6cf472f029d6de8339db24') diff --git a/k3s-bin/update.sh b/k3s-bin/update.sh deleted file mode 100755 index f2a9cf2..0000000 --- a/k3s-bin/update.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -source ../.util.sh - -update_github_tag rancher/k3s - -[ $? -eq 0 ] && update_pkg - -find -type f -exec grep -IL . "{}" \; | xargs rm diff --git a/nexus-oss/update.sh b/nexus-oss/update.sh index 40f0fec..222fc99 100755 --- a/nexus-oss/update.sh +++ b/nexus-oss/update.sh @@ -2,7 +2,7 @@ source ../.util.sh -ver=`curl -s --head https://download.sonatype.com/nexus/3/latest-unix.tar.gz | grep location | cut -d' ' -f2` +ver=$(curl -s --head https://download.sonatype.com/nexus/3/latest-unix.tar.gz | grep location | cut -d' ' -f2) ver=${ver%-unix*} ver=${ver##*nexus-} echo $ver @@ -10,6 +10,4 @@ array=(${ver//-/ }) sed -i "s/_version=.*/_version=${array[0]}/" PKGBUILD sed -i "s/_patch=.*/_patch=${array[1]}/" PKGBUILD -update_pkg - -rm nexus-*.tar.gz +update_pkg \ No newline at end of file diff --git a/subsystemctl/.SRCINFO b/subsystemctl/.SRCINFO new file mode 100644 index 0000000..7cee09a --- /dev/null +++ b/subsystemctl/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = subsystemctl + pkgdesc = Run systemd in WSL2 + pkgver = 0.2.0 + pkgrel = 1 + url = https://github.com/sorah/subsystemctl + arch = x86_64 + arch = aarch64 + license = MIT + makedepends = cargo + source = https://github.com/sorah/subsystemctl/archive/v0.2.0.tar.gz + sha512sums = f5e1290c32b8748436cb025d61f27335e26c9960e9a5b9d67c9b2a0f2b322c078a60c7a38a549a5a2c2549b046c214c638893471e93b310d332b8cbf05ded68c + +pkgname = subsystemctl diff --git a/vlmcsd/.SRCINFO b/vlmcsd/.SRCINFO new file mode 100644 index 0000000..96a0d11 --- /dev/null +++ b/vlmcsd/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = vlmcsd + pkgdesc = KMS Emulator in C + pkgver = svn1113 + pkgrel = 1 + url = http://forums.mydigitallife.info/threads/50234 + arch = i686 + arch = x86_64 + arch = armv6h + license = custom + source = https://github.com/Wind4/vlmcsd/archive/svn1113.tar.gz + source = vlmcsd.service + sha256sums = 62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc + sha256sums = e13a82e4521756f3fd5238422db9dae0cb326e4099d890fe74d1b9b876145497 + +pkgname = vlmcsd diff --git a/vlmcsd/.gitignore b/vlmcsd/.gitignore deleted file mode 100644 index 594c7bb..0000000 --- a/vlmcsd/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -* -!buildroot-configs -!bin -!build -!etc -!floppy -!GNUmakefile -!hotbird64-mass-build -!lib -!Makefile -!man -!README -!README.compile-and-pre-built-binaries -!src -!VisualStudio -!.gitignore diff --git a/zstd/.SRCINFO b/zstd/.SRCINFO new file mode 100644 index 0000000..7bb321a --- /dev/null +++ b/zstd/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = zstd + pkgdesc = Zstandard - Fast real-time compression algorithm + pkgver = 1.5.2 + pkgrel = 8 + url = https://facebook.github.io/zstd/ + arch = x86_64 + license = BSD + license = GPL2 + makedepends = cmake + makedepends = gtest + makedepends = ninja + depends = glibc + depends = gcc-libs + depends = zlib + depends = xz + depends = lz4 + provides = libzstd.so + options = debug + source = https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.zst + source = https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.zst.sig + source = fix_perf.patch + validpgpkeys = 4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD + sha256sums = 3ea06164971edec7caa2045a1932d757c1815858e4c2b68c7ef812647535c23f + sha256sums = SKIP + sha256sums = 07db9fe01b7164fc7180a52c43d79c1ae4d15abb5669cbf91a5c9c7f357d5f7e + b2sums = 513e4526a92bcb59416b3457d186a30e554f9e0cf21d7114eb3e9fbcbd9d662c8d95cf0b06237f6fe3f756862c63de0aa146d6a23cb4111c16e6459608d115f1 + b2sums = SKIP + b2sums = 26e25d98485bacc8295a0add027b86ae8e386a9164c13ffd5497796c8e8da5122f0e9724c0e727e59712ab142ac62cf6fcbb4ae08e35c696874b863eead05ed4 + +pkgname = zstd