From 89a253cab8bdd25dd1a2030bc2bc1274f5604076 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 31 May 2021 14:33:08 +0200 Subject: v1.8.0 from Fedora --- .gitignore | 9 +++++++++ dlothers.sh | 29 +++++++++++++++++++++++++++++ php-rmccue-requests.spec | 34 ++++++++++++++++++++++------------ 3 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 .gitignore create mode 100755 dlothers.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/dlothers.sh b/dlothers.sh new file mode 100755 index 0000000..6a7fd8f --- /dev/null +++ b/dlothers.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# This was borrowed from nodejs-grunt-contrib-concat + +tag=v1.8.0 + +set -e + +tmp=$(mktemp -d) + +trap cleanup EXIT +cleanup() { + set +e + [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp" +} + +unset CDPATH +pwd=$(pwd) + +pushd "$tmp" +git clone https://github.com/WordPress/Requests.git +ls +cd Requests +git archive --prefix="docs/" --format=tar ${tag}:docs/ \ + | bzip2 > "$pwd"/docs-${tag}.tar.bz2 +git archive --prefix="examples/" --format=tar ${tag}:examples/ \ + | bzip2 > "$pwd"/examples-${tag}.tar.bz2 +git archive --prefix="tests/" --format=tar ${tag}:tests/ \ + | bzip2 > "$pwd"/tests-${tag}.tar.bz2 +popd diff --git a/php-rmccue-requests.spec b/php-rmccue-requests.spec index 06e24a2..9b34256 100644 --- a/php-rmccue-requests.spec +++ b/php-rmccue-requests.spec @@ -8,18 +8,22 @@ # Please preserve changelog entries # Name: php-rmccue-requests -Version: 1.7.0 -Release: 4%{?dist} +Version: 1.8.0 +Release: 1%{?dist} BuildArch: noarch License: ISC and BSD Summary: Requests for PHP is a humble HTTP request library -URL: https://github.com/rmccue/Requests +URL: https://github.com/WordPress/Requests Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +# Upstream strips docs, examples and tests from the tarball, +# so we have to generate it manually. +# dlothers.sh is used to do this, and is included in this repository. +Source1: docs-v%{version}.tar.bz2 +Source2: examples-v%{version}.tar.bz2 +Source3: tests-v%{version}.tar.bz2 # This is only needed to run the test suite. -Source1: https://github.com/RequestsPHP/test-server/archive/26334a7583c96ae1f966a5d88af9aafaf279f948/requests-tests-26334a75.tar.gz - -Patch0: %{name}-pr297.patch +Source4: requests-tests-26334a75.tar.gz BuildRequires: php-composer(fedora/autoloader) BuildRequires: php-fedora-autoloader-devel @@ -61,6 +65,9 @@ We all have better things to do. That's why Requests was born. %autosetup -n Requests-%{version} -p1 tar xvf %{S:1} +tar xvf %{S:2} +tar xvf %{S:3} +tar xvf %{S:4} # Remove the bundled CA list and use Fedora's rm library/Requests/Transport/cacert.pem @@ -93,17 +100,15 @@ then fi %{_bindir}/php -S 127.0.0.1:$port \ - test-server-26334a7583c96ae1f966a5d88af9aafaf279f948/bin/serve.php & + test-server-26334a7583c96ae1f966a5d88af9aafaf279f948/bin/serve.php >serve.log 2>&1 & PHPPID=$! -pushd tests # The request test server doesn't run over TLS so we skip HTTPS tests. The other tests fail if they # can't resolve domain names, so they are skipped as well. -REQUESTS_TEST_HOST="127.0.0.1:$port" php %{_bindir}/phpunit --no-coverage --bootstrap bootstrap.php \ +REQUESTS_TEST_HOST="127.0.0.1:$port" phpunit --no-coverage --bootstrap tests/bootstrap.php \ --filter \ - ^\(\(?!\(testHTTPS\|testAlternateNameSupport\|testSNISupport\|testAlternatePort\)\).\)*$ || \ + ^\(\(?!\(testHTTPS\|testExpiredHTTPS\|testRevokedHTTPS\|testBadDomain\|testResponseByteLimit\|testResponseByteLimitWithFile\|testAlternateNameSupport\|testSNISupport\)\).\)*$ || \ (kill $PHPPID && exit 1) -popd kill $PHPPID @@ -120,7 +125,12 @@ kill $PHPPID %changelog -* Mon Pct 23 2017 Remi Collet - 1.7.0-4 +* Wed May 12 2021 Sundeep Anand - 1.8.0-1 +- Update to 1.8.0 (rhbz#1954316) +- Add dlothers.sh to download docs, examples and tests +- Drop php-rmccue-requests-pr297.patch + +* Mon Oct 23 2017 Remi Collet - 1.7.0-4 - fix FTBFS from Koschei, add path for recent PHPUnit from https://github.com/rmccue/Requests/pull/297 -- cgit