summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-12-13 15:02:33 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-12-13 15:02:33 -0500
commitae8645bab6937221d28bd5b765e3f63af3c60632 (patch)
tree44b1911c5fcf4a8ed0ce9ffd2bab250f8b6af18a /pcr
parentae0dcec58e17f917563f290b3f30005207f6e154 (diff)
pcr/ring: Update
Diffstat (limited to 'pcr')
-rw-r--r--pcr/ring/.gitignore2
-rw-r--r--pcr/ring/0001-contrib-recursive-dependency-tracking.patch169
-rw-r--r--pcr/ring/PKGBUILD206
-rwxr-xr-xpcr/ring/prune-pkgnames106
-rwxr-xr-xpcr/ring/upd-helper109
-rw-r--r--pcr/secp256k1-git/PKGBUILD43
6 files changed, 559 insertions, 76 deletions
diff --git a/pcr/ring/.gitignore b/pcr/ring/.gitignore
new file mode 100644
index 000000000..5d4ba407d
--- /dev/null
+++ b/pcr/ring/.gitignore
@@ -0,0 +1,2 @@
+/*/
+/notable-changes-*--*.patch
diff --git a/pcr/ring/0001-contrib-recursive-dependency-tracking.patch b/pcr/ring/0001-contrib-recursive-dependency-tracking.patch
new file mode 100644
index 000000000..030c5cf94
--- /dev/null
+++ b/pcr/ring/0001-contrib-recursive-dependency-tracking.patch
@@ -0,0 +1,169 @@
+From f50c8a7e1fbdf317013f19b962093b068ed6e0f7 Mon Sep 17 00:00:00 2001
+From: Luke Shumaker <lukeshu@parabola.nu>
+Date: Wed, 13 Dec 2017 13:49:07 -0500
+Subject: [PATCH] contrib: recursive dependency tracking
+
+Let's say we're building gnutls (since the system version is too new).
+gnutls depends on nettle.
+Let's say we're using the system nettle (naturally in FOUND_PKGS).
+nettle depends on gmp.
+
+With the old (non-recursive) dependency tracking, we would end up building
+gmp just for nettle, even though we aren't even building nettle!
+---
+ contrib/src/README | 17 +++++------------
+ contrib/src/ffmpeg/rules.mak | 2 +-
+ contrib/src/flac/rules.mak | 2 +-
+ contrib/src/gnutls/rules.mak | 2 +-
+ contrib/src/main.mak | 3 ++-
+ contrib/src/nettle/rules.mak | 2 +-
+ contrib/src/opendht/rules.mak | 2 +-
+ contrib/src/secp256k1/rules.mak | 2 +-
+ contrib/src/vorbis/rules.mak | 4 ++--
+ 9 files changed, 15 insertions(+), 21 deletions(-)
+
+diff --git a/contrib/src/README b/contrib/src/README
+index 581a39219..d03ff1899 100644
+--- a/contrib/src/README
++++ b/contrib/src/README
+@@ -92,18 +92,11 @@ Dependencies
+ If package bar depends on package foo, the special DEPS_bar variable
+ should be defined as follow:
+
+- DEPS_bar = foo $(DEPS_foo)
+-
+-Note that dependency resolution is unfortunately _not_ recursive.
+-Therefore $(DEPS_foo) really should be specified explicitly as shown
+-above. (In practice, this will not make any difference insofar as there
+-are no pure second-level nested dependencies. For instance, libass
+-depends on FontConfig, which depends on FreeType, but libass depends
+-directly on FreeType anyway.)
+-
+-Also note that DEPS_bar is set "recursively" with =, rather than
+-"immediately" with :=. This is so that $(DEPS_foo) is expanded
+-correctly, even if DEPS_foo it is defined after DEPS_bar.
++ DEPS_bar = foo
++
++Dependency resolution is recursive (unlike in previous versions); the
++above will cause bar to also depend on the dependencies of foo.
++However, it will not correctly handle cycles.
+
+ Implementation note:
+
+diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
+index b1db5d131..e86403e25 100644
+--- a/contrib/src/ffmpeg/rules.mak
++++ b/contrib/src/ffmpeg/rules.mak
+@@ -11,7 +11,7 @@ ifeq ($(call need_pkg,"libavutil >= 55.75.100 libavcodec >= 57.106.101 libavform
+ PKGS_FOUND += ffmpeg
+ endif
+
+-DEPS_ffmpeg = iconv zlib x264 vpx opus speex $(DEPS_vpx)
++DEPS_ffmpeg = iconv zlib x264 vpx opus speex
+
+ FFMPEGCONF = \
+ --cc="$(CC)" \
+diff --git a/contrib/src/flac/rules.mak b/contrib/src/flac/rules.mak
+index 7abc69938..857593aad 100644
+--- a/contrib/src/flac/rules.mak
++++ b/contrib/src/flac/rules.mak
+@@ -47,7 +47,7 @@ FLACCONF += --disable-asm-optimizations
+ endif
+ endif
+
+-DEPS_flac = ogg $(DEPS_ogg)
++DEPS_flac = ogg
+
+ .flac: flac
+ cd $< && $(HOSTVARS) ./configure $(FLACCONF)
+diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
+index 843135814..4441fcf91 100644
+--- a/contrib/src/gnutls/rules.mak
++++ b/contrib/src/gnutls/rules.mak
+@@ -60,7 +60,7 @@ ifdef HAVE_IOS
+ GNUTLS_CONF += --disable-hardware-acceleration
+ endif
+
+-DEPS_gnutls = nettle $(DEPS_nettle) iconv $(DEPS_iconv)
++DEPS_gnutls = nettle iconv
+
+
+ #Workaround for localtime_r function
+diff --git a/contrib/src/main.mak b/contrib/src/main.mak
+index 51cbbfbcd..542f2228c 100644
+--- a/contrib/src/main.mak
++++ b/contrib/src/main.mak
+@@ -391,7 +391,8 @@ PKGS_AUTOMATIC := $(filter-out $(PKGS_FOUND),$(PKGS))
+ # Apply manual selection (from bootstrap):
+ PKGS_MANUAL := $(sort $(PKGS_ENABLE) $(filter-out $(PKGS_DISABLE),$(PKGS_AUTOMATIC)))
+ # Resolve dependencies:
+-PKGS_DEPS := $(filter-out $(PKGS_FOUND) $(PKGS_MANUAL),$(sort $(foreach p,$(PKGS_MANUAL),$(DEPS_$(p)))))
++dep_on = $(sort $(foreach p,$(filter-out $(PKGS_FOUND),$(1)),$(p) $(call dep_on,$(DEPS_$(p)))))
++PKGS_DEPS := $(call dep_on,$(PKGS_MANUAL))
+ PKGS := $(sort $(PKGS_MANUAL) $(PKGS_DEPS))
+
+ convert-static:
+diff --git a/contrib/src/nettle/rules.mak b/contrib/src/nettle/rules.mak
+index f811297a6..b924c7f87 100644
+--- a/contrib/src/nettle/rules.mak
++++ b/contrib/src/nettle/rules.mak
+@@ -19,7 +19,7 @@ nettle: nettle-$(NETTLE_VERSION).tar.gz .sum-nettle
+ $(UPDATE_AUTOCONFIG)
+ $(MOVE)
+
+-DEPS_nettle = gmp $(DEPS_gmp)
++DEPS_nettle = gmp
+
+ .nettle: nettle
+ ifdef HAVE_IOS
+diff --git a/contrib/src/opendht/rules.mak b/contrib/src/opendht/rules.mak
+index 4443a6fc0..b7fbe8ec8 100644
+--- a/contrib/src/opendht/rules.mak
++++ b/contrib/src/opendht/rules.mak
+@@ -15,7 +15,7 @@ ifneq ($(call need_pkg,"libargon2"),)
+ DEPS_opendht += argon2
+ endif
+ ifneq ($(call need_pkg,"gnutls >= 3.3.0"),)
+-DEPS_opendht += gnutls $(DEPS_gnutls)
++DEPS_opendht += gnutls
+ endif
+
+ $(TARBALLS)/opendht-$(OPENDHT_VERSION).tar.gz:
+diff --git a/contrib/src/secp256k1/rules.mak b/contrib/src/secp256k1/rules.mak
+index c5681629d..5b4f84e43 100644
+--- a/contrib/src/secp256k1/rules.mak
++++ b/contrib/src/secp256k1/rules.mak
+@@ -7,7 +7,7 @@ PKGS += secp256k1
+ ifeq ($(call need_pkg,"libsecp256k1"),)
+ PKGS_FOUND += secp256k1
+ endif
+-DEPS_secp256k1 = gmp $(DEPS_gmp)
++DEPS_secp256k1 = gmp
+
+ $(TARBALLS)/secp256k1-$(SECP256K1_VERSION).tar.gz:
+ $(call download,$(SECP256K1_URL))
+diff --git a/contrib/src/vorbis/rules.mak b/contrib/src/vorbis/rules.mak
+index 1fb268514..e20cc7493 100644
+--- a/contrib/src/vorbis/rules.mak
++++ b/contrib/src/vorbis/rules.mak
+@@ -36,7 +36,7 @@ endif
+ $(UPDATE_AUTOCONFIG)
+ $(MOVE)
+
+-DEPS_vorbis = ogg $(DEPS_ogg)
++DEPS_vorbis = ogg
+
+ .vorbis: vorbis
+ $(RECONF) -Im4
+@@ -47,7 +47,7 @@ DEPS_vorbis = ogg $(DEPS_ogg)
+ .sum-vorbisenc: .sum-vorbis
+ touch $@
+
+-DEPS_vorbisenc = vorbis $(DEPS_vorbis)
++DEPS_vorbisenc = vorbis
+
+ .vorbisenc:
+ touch $@
+--
+2.15.1
+
diff --git a/pcr/ring/PKGBUILD b/pcr/ring/PKGBUILD
index da0b1b885..43422a337 100644
--- a/pcr/ring/PKGBUILD
+++ b/pcr/ring/PKGBUILD
@@ -2,92 +2,118 @@
# Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
-# TODO: add explicit versioned dependency canary on icu to the
-# appropriate package(s) -- à la iceweasel -- so as to avoid
-# breakage when Arch bumps the soname
-# NOTE: the same has also been seen for 'enchant' and 'jsoncpp'
-
-pkgbase=ring
-pkgname=(ring-daemon ring-lrc ring-client-gnome)
-pkgdesc="The GNU Ring VoIP system"
-_pkgver=20171024.1.eadbdeb
-_SOURCE_DATE_EPOCH=1508858419
-
-# To figure out what the above value of _SOURCE_DATE_EPOCH should be,
-# run
-#
-# git log -n1 --format=%ct ${_pkgver##*.}
+_pkgver=20171129.2.cf5bbff
+_SOURCE_DATE_EPOCH=1511972974
+# The above are thing things that you must set each new version.
#
-# from inside of the repository created by
+# The _SOURCE_DATE_EPOCH should be
+# git log -n1 --format=%ct "${_pkgver##*.}"
+# from the git repo
+# git clone https://gerrit-ring.savoirfairelinux.com/ring-project
#
-# git clone https://gerrit-ring.savoirfairelinux.com/ring-project
+# But I automated that for you!
+# ./upd-helper set-pkgver YYYYMMDD.N.GITVER
#
-# TODO: the above is really not appropriate - we are not building from git master
-# the source date should be the date of the tarball
-# which is actually made from git 'production' branch
-#
-# git clone https://gerrit-ring.savoirfairelinux.com/ring-project
-# cd ring-project
-# git log production -n1 --format=%ct ${_pkgver##*.}
+# It will update _pkgver, _SOURCE_DATE_EPOCH, and sha256sums, and give
+# you a summary of files that have changed that I think you (future
+# me?), as the packager, should care about.
+pkgbase=ring
+pkgname=(ring-daemon ring-lrc ring-client-gnome)
+# stick a bunch of keywords in the pkgdesc because "ring" is a
+# terrible search term.
+pkgdesc="The GNU Ring (formerly ring.cx and SFLphone) VoIP system"
epoch=1
pkgver=1.0_${_pkgver}
-pkgrel=2.3
+pkgrel=1
arch=("i686" "x86_64")
-url="https://ring.cx/"
+url="https://gnu.org/software/ring/"
source=("http://dl.ring.cx/ring-release/tarballs/${pkgbase}_${_pkgver}.tar.gz"
- 'kashmir.tar.gz::https://github.com/Corvusoft/kashmir-dependency/archive/master.tar.gz')
-noextract=('kashmir.tar.gz')
+ 0001-contrib-recursive-dependency-tracking.patch)
license=('GPL3')
-sha256sums=('4f58183d7669b2fa06d72828f9fc8ceeec74d598bd656618cdd8cbe6a0ec55c6'
- '4d2040fae7dea3306580ac5b9c3d60e64314305db1b59d2d14c802a12e45e6f9')
+sha256sums=('0a23f8052a4df2a7aee40434cd59f17d0d5e97c73306ba35f99f2721b305ed48'
+ 'a9b308e524ea5b0b5db09fd55e6c0d96edbea6594f987e10e7b77251217f8e0c')
-# Get this list by looking at `daemon/contrib/src/*/rules.mak`; look
-# for packages that add themselves to both PKGS and FOUND_PKGS.
+# Get this list by looking at `daemon/contrib/src/*/rules.mak`.
+#
+# This is the complete list (with "lib" prepended or similar as
+# necessary).
+#
+# Entries are commented out if
+# - it's something we don't need to name because it's already in the
+# deps list ("DUP"). Actually, don't comment out any .so files
+# that we name for DUPs.
+# - we won't be using it ("IGNORE"); these are things that don't add
+# themselves to PKGS, and aren't in DEPS_* for another package that
+# we don't IGNORE
+# - or we (*gasp*) want to use the contrib version instead of the
+# system version ("CONTRIB")
+#
+# Also note when we forcefully override the build-system's automatic
+# logic on when to use the system version vs the contrib version
+# ("FORCE"). For system packages, these are things we don't IGNORE,
+# but don't add themselves PKGS_FOUND. For contrib packages, these
+# are things that might get added to PKG_FOUND that we don't want to.
+# We'll be adding `--disable-PKG` or `--enable-PKG` flags to
+# `../bootstrap` below for these.
_daemon_contrib=(
- boost # CONTRIB: TODO: IDK: no PKGS_FOUND logic
- crypto++
- ffmpeg
- #gnutls # DUP: {ffmpeg,opendht}->gnutls
- #gsm # CONTRIB: TODO: IDK: no PKGS_FOUND logic
- #jack # DUP: ffmpeg->jack
- jsoncpp
- msgpack-c
- libnatpmp # NOTE: force system version; see below
- #libsamplerate # DUP: ffmpeg->jack->libsamplerate
- #libsndfile # DUP: ffmpeg->libsamplerate->libsndfile
- libupnp
- #libvorbis # DUP: ffmpeg->libvorbis
- #libogg # DUP: ffmpeg->{libvorbis,speex}->libogg
- #nettle # DUP: {ffmpeg,opendht}->gnutls->nettle
- opendht
- #opus # DUP: ffmpeg->opus
- #pcre # DUP: {base,base-devel}->grep->pcre
- #pjproject # CONTRIB: Added patches for gnutls
- restbed
- #secp256k1 # CONTRIB: extra crypto, AUR package
- #speex # DUP: ffmpeg->speex
- #speexdsp # DUP: ffmpeg->speex->speexdsp
- yaml-cpp
- #zlib # DUP: {pcre,ffmpeg,opendht,gnutls}->zlib
+ #argon2 # DUP: opendht->argon2 (DEPS_opendht)
+ #asio # CONTRIB: want commit f5c57, which isn't in a stable release yet
+ dbus-c++ # FORCE: no PKGS_FOUND logic because alleged gcc7 bug?
+ ffmpeg libavutil.so libavcodec.so libavformat.so libavdevice.so libswscale.so
+ #flac # DUP: libsndfile->flac
+ #libgcrypt # IGNORE: not in PKGS (?)
+ #gmp # IGNORE: not in PKGS (DEPS_nettle DEPS_secp256k1)
+ #gnutls # CONTRIB: ring is not yet compatible with gnutls>=3.5.11
+ #libgpg-error # IGNORE: not in PKGS (DEPS_gcrypt)
+ #gsm # FORCE+DUP: IDK why no PKGS_FOUND; ffmpeg->gsm
+ #glibc # DUP: base->glibc (contribname=iconv)
+ #jack # IGNORE: not in PKGS: ("disabled by default for now")
+ jsoncpp #
+ msgpack-c #
+ libnatpmp # FORCE: package doesn't include a pkg-config file
+ #nettle # DUP: {gnutls,opendht}->nettle
+ #libogg # DUP: ffmpeg->{libvorbis,speex,flac}->libogg
+ opendht #
+ #opus # DUP: ffmpeg->opus
+ #pcre # DUP: {base,base-devel}->grep->pcre
+ #pjproject # CONTRIB+FORCE: Added patches for gnutls
+ portaudio #
+ restbed # FORCE: package doesn't include a pkg-config file
+ #libsamplerate # DUP: {ffmpeg,portaudio}->jack->libsamplerate
+ secp256k1-git libsecp256k1.so
+ #libsndfile # DUP: libsamplerate->libsndfile
+ #speex # DUP: ffmpeg->speex
+ #speexdsp # DUP: speex>-speexdsp
+ libupnp #
+ #util-linux # DUP: {base,base-devel}->util-linux (DEPS_prproject=uuid)
+ libvorbisenc.so # DUP: ffmpeg->libvorbis
+ #libvpx # IGNORE: not in PKGS (DEPS_ffmpeg)
+ #x264 # IGNORE: not in PKGS (DEPS_ffmpeg)
+ yaml-cpp #
+ #zlib # DUP: {pcre,ffmpeg,gnutls}->zlib
)
-# We may pass several `--disable-X` flags to `../bootstrap` below; to
-# force the system version of dependencies.
-#
-# Disable contrib 'natpmp' to force the system version of libnatpmp
-# because the detection logic uses pkg-config, but the libnatpmp
-# package doesn't include pkg-config files; so the build system thinks
-# we don't have it.
-_makedepends_daemon=()
-_depends_daemon=("${_daemon_contrib[@]}" dbus-c++)
+_makedepends_daemon=(
+ boost # a compile-time dep for some features in yaml-cpp
+)
+_depends_daemon=(
+ "${_daemon_contrib[@]}"
+ libidn2
+)
_makedepends_lrc=(qt5-tools)
_depends_lrc=(qt5-base)
_makedepends_client_gnome=()
-_depends_client_gnome=(clutter-gtk evolution-data-server libnm-glib qrencode)
+_depends_client_gnome=(
+ clutter-gtk
+ evolution-data-server
+ gnome-icon-theme-symbolic
+ libnm-glib
+ qrencode
+)
makedepends=(
cmake
@@ -100,19 +126,47 @@ makedepends=(
"${_depends_client_gnome[@]}"
)
-#checkdepends=(cppunit swig)
+# The above list of dependencies can be unwieldy! Running
+# `./upd-helper find-dups` will suggest things that can be removed.
-_makedepends_ringpy=(autoconf-archive gnome-icon-theme-symbolic libe-book)
+# make-ring.py says we also need the following, but I don't agree
+# (`./upd-helper diff-depends` will help you update this list):
+#
+# - autoconf-archive: for building from git, not release tarballs
+# - cppunit: for testing
+# - libe-book: They are confusing 'libebook' (which Arch & Parabola don't have) with the different 'libe-book' (which we do have)
+# - swig: for ring-daemon NodeJS module
+# - yasm: for building contrib vpx
prepare() {
- cp "$srcdir/kashmir.tar.gz" "$srcdir/ring-project/daemon/contrib/tarballs/"
+ cd "$srcdir/ring-project/daemon"
+ patch -p1 -i "$srcdir/0001-contrib-recursive-dependency-tracking.patch"
+
+ # Remove unused contrib tarballs, to ensure that we didn't make a mistake
+ local file
+ for file in "$srcdir/ring-project/daemon/contrib/tarballs/"*; do
+ case "${file##*/}" in
+ asio-*) : skip "$file" ;;
+ gnutls-*) : skip "$file" ;;
+ pjproject-*) : skip "$file" ;;
+ *) rm -f -- "$file" ;;
+ esac
+ done
}
-build() {
+build() (
+ set -x
+
cd "$srcdir/ring-project/daemon/contrib"
mkdir native
cd native
- ../bootstrap --disable-downloads --disable-natpmp --disable-asio
+ ../bootstrap \
+ --disable-downloads \
+ --disable-dbus-cpp \
+ --disable-gsm \
+ --disable-natpmp \
+ --enable-pjproject \
+ --disable-restbed
make BATCH_MODE=1
cd "$srcdir/ring-project/daemon"
@@ -137,10 +191,10 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DLibRingClient_PROJECT_DIR="$srcdir/ring-project/lrc"
make
-}
+)
package_ring-daemon() {
- pkgdesc="The communication daemon of the GNU Ring VoIP system"
+ pkgdesc="The communication daemon of ${pkgdesc,}"
depends=("${_depends_daemon[@]}")
provides=("ring-daemon=2:$_pkgver") # AUR version scheme
@@ -149,7 +203,7 @@ package_ring-daemon() {
}
package_ring-lrc() {
- pkgdesc="A client library for the GNU Ring VoIP system"
+ pkgdesc="A client library for ${pkgdesc,}"
depends=("${_depends_lrc[@]}" "ring-daemon=${epoch:+$epoch:}$pkgver")
provides=("libringclient=2:$_pkgver") # AUR name
replaces=("libringclient") # AUR name
@@ -159,7 +213,7 @@ package_ring-lrc() {
}
package_ring-client-gnome() {
- pkgdesc="A GTK+3 user interface for the GNU Ring VoIP system"
+ pkgdesc="A GTK+3 user interface for ${pkgdesc,}"
depends=("${_depends_client_gnome[@]}" "ring-lrc=${epoch:+$epoch:}$pkgver")
provides=("ring-gnome=3:$_pkgver") # AUR name
replaces=("ring-gnome") # AUR name
diff --git a/pcr/ring/prune-pkgnames b/pcr/ring/prune-pkgnames
new file mode 100755
index 000000000..3d76b1fce
--- /dev/null
+++ b/pcr/ring/prune-pkgnames
@@ -0,0 +1,106 @@
+#!/usr/bin/env python3
+# Copyright 2017 Luke Shumaker <lukeshu@parabola.nu>
+#
+# This is a little program that is useful for helping prune lists of
+# dependencies. I should clean it up, document it, and add it to
+# libretools.
+
+import pyalpm
+import pycman.config
+
+def get_by_depspec(depspec):
+ global dbs
+ global pkgs
+
+ dep = pyalpm.find_satisfier(pkgs.values(), depspec)
+ if dep is not None:
+ return dep
+ for db in dbs:
+ dep = pyalpm.find_satisfier(db.search('.*'), depspec)
+ if dep is not None:
+ return dep
+ return None
+
+def handlepkg(pkg):
+ global pkgs
+ global deps
+ global ignore
+
+ if pkg.name in pkgs:
+ return
+ pkgs[pkg.name] = pkg
+ deps[pkg.name] = set([get_by_depspec(depspec) for depspec in pkg.depends])
+ for dep in deps[pkg.name]:
+ ignore.add(dep.name)
+ handlepkg(dep)
+
+class DepTree(object):
+ def __init__(self, pkgname, reasons=[]):
+ self.pkgname = pkgname
+ thresh = 0
+ if len(reasons) > 0:
+ thresh = min([reason.height for reason in reasons])
+ self.reasons = [reason for reason in reasons if reason.height <= thresh]
+ self.height = 1+thresh
+ def __str__(self):
+ if len(self.reasons) == 0:
+ return self.pkgname
+ if len(self.reasons) == 1:
+ return self.pkgname+"<-"+str(self.reasons[0])
+ else:
+ return self.pkgname+"<-{"+(",".join([str(reason) for reason in self.reasons]))+"}"
+
+# keeping track of 'visited' is important because of cycles
+def getreasons(reasons, dupname, visited=[]):
+ global deps
+ global pkgs
+
+ if dupname in reasons:
+ return DepTree(dupname)
+
+ required_by = [pkgname for pkgname, deplist in deps.items() if (dupname in [dep.name for dep in deplist])]
+ in_groups = pkgs[dupname].groups
+
+ myreasons_pkgs = [getreasons(reasons, myreason, visited+[dupname]) for myreason in set(required_by)-set(visited)]
+ myreasons_grps = [DepTree(g) for g in reasons.intersection(set(pkgs[dupname].groups))]
+ return DepTree(dupname, myreasons_pkgs + myreasons_grps)
+
+def main(args):
+ pycman_options = pycman.config.make_parser().parse_args([])
+ handle = pycman.config.init_with_config_and_options(pycman_options)
+
+ showdups = False
+ pkgnames = set()
+ grpnames = set()
+
+ global dbs, pkgs, deps, ignore
+ dbs = handle.get_syncdbs()
+ pkgs = {}
+ deps = {}
+ ignore = set()
+
+ for arg in args:
+ if arg == "-d":
+ showdups = True
+ continue
+ pkg = get_by_depspec(arg)
+ if pkg is not None:
+ pkgnames.add(pkg.name)
+ handlepkg(pkg)
+ else:
+ grpnames.add(arg)
+ for pkg in pyalpm.find_grp_pkgs(dbs, arg):
+ ignore.add(pkg.name)
+ handlepkg(pkg)
+ if not showdups:
+ print("\n".join(pkgnames-ignore))
+ else:
+ reasons = pkgnames.union(grpnames)
+ for dupname in sorted(pkgnames.intersection(ignore)):
+ print(getreasons(reasons-{dupname}, dupname))
+ return 0
+
+if __name__ == "__main__":
+ import sys
+ ret = main(sys.argv[1:])
+ sys.exit(ret)
diff --git a/pcr/ring/upd-helper b/pcr/ring/upd-helper
new file mode 100755
index 000000000..c48bdf7c5
--- /dev/null
+++ b/pcr/ring/upd-helper
@@ -0,0 +1,109 @@
+#!/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
+ "$@"
+}
diff --git a/pcr/secp256k1-git/PKGBUILD b/pcr/secp256k1-git/PKGBUILD
new file mode 100644
index 000000000..f747d7626
--- /dev/null
+++ b/pcr/secp256k1-git/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
+
+_pkgname=secp256k1
+pkgname=${_pkgname}-git
+pkgver=20171207
+_gitver=c77fc08597960d662eb0df9e4c670c31bdeb227e
+pkgrel=1
+pkgdesc='Optimized C library for EC operations on curve secp256k1'
+arch=(x86_64 i686 armv7h)
+url=https://github.com/bitcoin-core/secp256k1/
+license=(MIT)
+depends=(gmp)
+provides=(
+ ${_pkgname}
+ lib${pkgname}=$pkgver
+ lib${_pkgname}
+ lib${_pkgname}.so
+)
+conflicts=("${provides[@]%=*}")
+source=(${_pkgname}-${_gitver}::https://github.com/bitcoin-core/${_pkgname}/archive/${_gitver}.tar.gz)
+sha256sums=('19a5d9015458d146cb1494259e4b00de3012ad2521091992e14e07bde711e41e')
+
+prepare() {
+ cd $_pkgname-$_gitver
+ ./autogen.sh
+}
+
+build() {
+ cd $_pkgname-$_gitver
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+check() {
+ cd $_pkgname-$_gitver
+ make check
+}
+
+package() {
+ cd $_pkgname-$_gitver
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}