summaryrefslogtreecommitdiff
path: root/pcr/ring/upd-helper
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/ring/upd-helper')
-rwxr-xr-xpcr/ring/upd-helper109
1 files changed, 0 insertions, 109 deletions
diff --git a/pcr/ring/upd-helper b/pcr/ring/upd-helper
deleted file mode 100755
index c48bdf7c5..000000000
--- a/pcr/ring/upd-helper
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/env bash
-#!/usr/bin/env python3
-# Copyright 2017 Luke Shumaker <lukeshu@parabola.nu>
-#
-# This is a little program to automate some tedious bits of
-# maintaining the GNU Ring package.
-
-set -euE
-. "$(librelib messages)"
-startdir="$(dirname -- "$(readlink -f -- "$0")")"
-
-prune-pkgnames() {
- xargs "$startdir"/prune-pkgnames "$@"
-}
-
-diff-filter() {
- awk '
-BEGIN{p=0}
-/^diff/{p=0}
-/^diff.*make-ring\.py/{p=1}
-/^diff.*scripts\/install\.sh/{p=1}
-/^diff.*daemon\/contrib\/.*\/rules\.mak/{p=1}
-{if (p) print}
-'
-}
-
-notable-diff() {
- if [[ $# != 2 ]]; then
- >&2 echo "Usage $0 notable-diff OLD-SRCDIR NEW-SRCDIR"
- fi
-
- diff_flags=(
- -ruN
- --no-dereference
- --exclude='*.bz2'
- --exclude='*.xz'
- --exclude='*.gz'
- --exclude='*.png'
- )
-
- diff "${diff_flags[@]}" "$1"/ring-project "$2"/ring-project | diff-filter
-}
-
-set-pkgver() {
- if [[ $# != 1 ]]; then
- >&2 echo "Usage $0 set-pkgver NEW-VALUE-FOR-_pkgver"
- fi
-
- rm -rf src
-
- # get the old sources, for diffing later
- makepkg -o
- . PKGBUILD
- oldpkgver=$_pkgver
- mv src src-$oldpkgver
-
- # update _pkgver
- sed -i "s/^_pkgver=.*/_pkgver=$1/" PKGBUILD
- # update *sums
- updpkgsums
-
- # update _SOURCE_DATE_EPOCH
- gitget bare https://gerrit-ring.savoirfairelinux.com/ring-project ring-project.git
- date=$(cd ring-project.git && git log -n1 --format=%ct "${1##*.}")
- sed -i "s/^_SOURCE_DATE_EPOCH=.*/_SOURCE_DATE_EPOCH=$date/" PKGBUILD
-
- # get the new sources
- makepkg -o
-
- # diff the old and new sources
- notable-diff src-$oldpkgver src > notable-changes-${oldpkgver}--$1.patch
- msg 'As the packager, you should be aware of changes in:'
- diffstat -C < notable-changes-${oldpkgver}--$1.patch
-}
-
-ignored-depends() {
- pacman -Sgq base-devel
- COLUMNS= LC_ALL=C pacman -Qi ffmpeg <&-|sed -n 's/^Depends On\s*://p'|xargs printf '%s\n'|sed -e 's/=.*//' -e 's/\.so$//'
-}
-
-diff-depends() {
- if [[ $# != 0 ]]; then
- >&2 echo "Usage $0 diff-depends"
- fi
- makepkg -o # for make-ring.py
- . PKGBUILD
- cd src/ring-project
- comm \
- <(printf '%s\n' "${makedepends[@]}" "${_depends_daemon[@]}" "${_depends_lrc[@]}" "${_depends_client_gnome[@]}" | prune-pkgnames base base-devel | sort) \
- <(python3 -c 'print("\n".join(__import__("make-ring").ARCH_LINUX_DEPENDENCIES))' | prune-pkgnames base base-devel | sort) \
- | tr $'\t' , | column -s, -t -o ' | ' -N 'only PKGBUILD,only make-ring.py,both'
-}
-
-find-dups() {
- . PKGBUILD
- msg 'Duplicated build-time depends:'
- printf '%s\n' "${makedepends[@]}" | prune-pkgnames -d base-devel
- msg 'Duplicated run-time depends:'
- printf '%s\n' "${_depends_daemon[@]}" "${_depends_lrc[@]}" "${_depends_client_gnome[@]}" | prune-pkgnames -d base
-}
-
-{
- cmds=(set-pkgver notable-diff diff-depends find-dups)
- if ! in_array "${1:-}" "${cmds[@]}"; then
- >&2 print 'Commands are: %s' "${cmds[*]}"
- exit 1
- fi
- "$@"
-}