distro FEATURE apkg-powered upstream rpm packaging
Using this .spec file originally provided by Martin Winter with some
modifications and apkg magic, I'm able to build both source package
libyang2-2.0.0.9.gf60c0dbf-1.fc34.src.rpm
and native RPM packages
libyang2-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-devel-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-tools-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-debuginfo-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-debugsource-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
libyang2-tools-debuginfo-2.0.0.9.gf60c0dbf-1.fc34.x86_64.rpm
by running
apkg build -i
on this commit. It should work on any RPM-based distro including SUSE.
I was able to install resulting packages on each testing system.
I've tested this on:
* Fedora 33 VM
* Fedora 34 docker container (fedora:34)
* openSUSE 15 docker container (opensuse/leap)
distro/README.md contains (3 lines of) instructions on howto test this
using apkg in a VM/container/machine of your choice.
diff --git a/tools/upstream-version.sh b/tools/upstream-version.sh
new file mode 100755
index 0000000..4489c8e
--- /dev/null
+++ b/tools/upstream-version.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# get latest upstream libyang version from github
+
+RLS_URL=https://api.github.com/repos/CESNET/libyang/releases
+VERSION=$(curl -s $RLS_URL | grep tag_name | cut -d '"' -f 4 | sort --version-sort | tail -n 1)
+VERSION=${VERSION#v}
+echo $VERSION