diff --git a/copy-patches.sh b/copy-patches.sh new file mode 100755 index 0000000..00041ac --- /dev/null +++ b/copy-patches.sh @@ -0,0 +1,55 @@ +#!/bin/bash - + +set -e + +# Maintainer script to copy patches from the git repo to the current +# directory. Use it like this: +# ./copy-patches.sh + +rhel_version=8.3 + +# Check we're in the right directory. +if [ ! -f libnbd.spec ]; then + echo "$0: run this from the directory containing 'libnbd.spec'" + exit 1 +fi + +git_checkout=$HOME/d/libnbd-rhel-$rhel_version +if [ ! -d $git_checkout ]; then + echo "$0: $git_checkout does not exist" + echo "This script is only for use by the maintainer when preparing a" + echo "libnbd release on RHEL." + exit 1 +fi + +# Get the base version of libnbd. +version=`grep '^Version:' libnbd.spec | awk '{print $2}'` +tag="v$version" + +# Remove any existing patches. +git rm -f [0-9]*.patch ||: +rm -f [0-9]*.patch + +# Get the patches. +(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N $tag) +mv $git_checkout/[0-9]*.patch . + +# Remove any not to be applied. +rm -f *NOT-FOR-RPM*.patch + +# Add the patches. +git add [0-9]*.patch + +# Print out the patch lines. +echo +echo "--- Copy the following text into libnbd.spec file" +echo + +echo "# Patches." +for f in [0-9]*.patch; do + n=`echo $f | awk -F- '{print $1}'` + echo "Patch$n: $f" +done + +echo +echo "--- End of text" diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..6985029 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/libnbd.spec b/libnbd.spec index 26678f7..4eac8f5 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -5,11 +5,11 @@ %global patches_touch_autotools %{nil} # The source directory. -%global source_directory 1.5-development +%global source_directory 1.7-development Name: libnbd -Version: 1.5.6 -Release: 1%{?dist} +Version: 1.7.1 +Release: 3%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -22,6 +22,9 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex Source2: libguestfs.keyring +# Maintainer script which helps with handling patches. +Source3: copy-patches.sh + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -32,6 +35,7 @@ BuildRequires: gnupg2 # For the core library. BuildRequires: gcc +BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gnutls-devel BuildRequires: libxml2-devel @@ -54,17 +58,28 @@ BuildRequires: glib2-devel BuildRequires: bash-completion # Only for running the test suite. +BuildRequires: coreutils +BuildRequires: gcc-c++ BuildRequires: gnutls-utils -%if 0%{?fedora} >= 31 +BuildRequires: jq +BuildRequires: nbd +BuildRequires: qemu-img +BuildRequires: util-linux + +# On RHEL, maybe even in Fedora in future, we do not build nbdkit for +# i686. nbdkit is only needed for the test suite so make it optional. +# This reduces our test exposure on 32 bit platforms, although there +# is still Fedora/armv7 and some upstream testing. +%ifnarch %{ix86} BuildRequires: nbdkit +BuildRequires: nbdkit-data-plugin +BuildRequires: nbdkit-eval-plugin BuildRequires: nbdkit-memory-plugin BuildRequires: nbdkit-null-plugin BuildRequires: nbdkit-pattern-plugin BuildRequires: nbdkit-sh-plugin +BuildRequires: nbdkit-sparse-random-plugin %endif -BuildRequires: nbd -BuildRequires: qemu-img -BuildRequires: gcc-c++ %description @@ -284,7 +299,31 @@ make %{?_smp_mflags} check || { %changelog -* Mon Nov 12 2020 Richard W.M. Jones - 1.5.6-1 +* Thu Jan 28 2021 Richard W.M. Jones - 1.7.1-3 +- Disable BR nbdkit on i686 because it breaks ELN/RHEL 9. + +* Tue Jan 26 2021 Fedora Release Engineering - 1.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 20 2021 Richard W.M. Jones - 1.7.1-1 +- New upstream development version 1.7.1. + +* Thu Jan 07 2021 Richard W.M. Jones - 1.6.0-1 +- New upstream stable version 1.6.0. + +* Tue Dec 08 2020 Richard W.M. Jones - 1.5.9-1 +- New upstream development version 1.5.9. + +* Thu Dec 03 2020 Richard W.M. Jones - 1.5.8-1 +- New upstream development version 1.5.8. +- Unify Fedora and RHEL spec files. + +* Wed Nov 25 2020 Richard W.M. Jones - 1.5.7-1 +- New upstream development version 1.5.7. +- Add some more test suite buildrequires lines. +- Fix bogus date in changelog. + +* Thu Nov 12 2020 Richard W.M. Jones - 1.5.6-1 - New upstream development version 1.5.6. * Mon Nov 02 2020 Richard W.M. Jones - 1.5.5-1 diff --git a/sources b/sources index 6341b0e..50afe22 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.5.6.tar.gz) = 8737d113b07ce7326dfaca66a24bdf9ada7cd102520e71dbebb805c11ac890b672adbce60f260916991c6665b5b31458cc0353d87df8443af8309a0ec44ac2de -SHA512 (libnbd-1.5.6.tar.gz.sig) = 0b45e8a2204d25e6f2ce62ed1796a89528e1eb96c06db7e12ccfa864071129cafe788279a53a62c920f691f6834eb33ce0ec76ca505a699504a2f5eadcb392e2 +SHA512 (libnbd-1.7.1.tar.gz) = a1ac588474ac1994522c2ca5c910c89c8d6831aaaadbf18874589a004b311c0d3883b196bf95b51610aaf7b704ff8fd781cc2657ec299f97c537209440848739 +SHA512 (libnbd-1.7.1.tar.gz.sig) = ff0752408c976ff6d351951e3697e5350361070483fc11039a850cf15b26991b65f65cddb7f5a6f34c3abb1195a10d8062b737e61a6103a4ba7c8c7ae9b0b09f diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..f514ef0 --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,15 @@ +#!/bin/bash - +set -e +set -x + +# Enable libnbd debugging. +export LIBNBD_DEBUG=1 + +# Connect to nbdkit. +nbdsh -c - <