diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-11-29 06:49:21 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-11-29 06:49:21 +0100 |
commit | 6938ff46141865e3f53be61d11bba5ee2155490c (patch) | |
tree | 8b5933ccf675e5a8ff6cd51e2a8a908db1961847 | |
parent | a05b175ad24f89354ae10553f4a81dc14d5838e5 (diff) |
php-pear-Net-DNS2: 1.4.2
-rw-r--r-- | Net_DNS2-incl.patch | 25 | ||||
-rw-r--r-- | Net_DNS2-php7.patch | 70 | ||||
-rw-r--r-- | php-pear-Net-DNS2.spec | 32 |
3 files changed, 118 insertions, 9 deletions
diff --git a/Net_DNS2-incl.patch b/Net_DNS2-incl.patch new file mode 100644 index 0000000..02c92dd --- /dev/null +++ b/Net_DNS2-incl.patch @@ -0,0 +1,25 @@ +From bb70609b26b363821d21617bb49274d512836ee9 Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Mon, 28 Nov 2016 15:13:53 +0100 +Subject: [PATCH 1/4] better value for include_path (other path can be useful, + e.g. phpunit autoloader) + +--- + tests/AllTests.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/AllTests.php b/tests/AllTests.php +index 001008a..d96aa4d 100644 +--- a/tests/AllTests.php ++++ b/tests/AllTests.php +@@ -60,7 +60,7 @@ + require_once 'Net_DNS2_ResolverTest.php'; + require_once 'Net_DNS2_DNSSECTest.php'; + +-set_include_path('..:.'); ++set_include_path('..:' . get_include_path()); + + /** + * This test suite assumes that Net_DNS2 will be in the include path, otherwise it + + diff --git a/Net_DNS2-php7.patch b/Net_DNS2-php7.patch new file mode 100644 index 0000000..5c8bb32 --- /dev/null +++ b/Net_DNS2-php7.patch @@ -0,0 +1,70 @@ +From 7a0e8ab3727c5f52bdf9dfb3ec0fe154ca4e699a Mon Sep 17 00:00:00 2001 +From: Mike Pultz <mike@mikepultz.com> +Date: Mon, 28 Nov 2016 19:30:44 -0500 +Subject: [PATCH] - fixed a couple cases in NSAP.php where I was comparing a + string to a integer - trunk is now v1.4.3 + +--- + Net/DNS2.php | 2 +- + Net/DNS2/RR/NSAP.php | 6 +++--- + composer.json | 4 ++-- + tests/Net_DNS2_DNSSECTest.php | 2 +- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/Net/DNS2.php b/Net/DNS2.php +index 672e1cb..093ecb0 100644 +--- a/Net/DNS2.php ++++ b/Net/DNS2.php +@@ -72,7 +72,7 @@ class Net_DNS2 + /* + * the current version of this library + */ +- const VERSION = '1.4.2'; ++ const VERSION = '1.4.3'; + + /* + * the default path to a resolv.conf file +diff --git a/Net/DNS2/RR/NSAP.php b/Net/DNS2/RR/NSAP.php +index b2b433a..b9d8a85 100644 +--- a/Net/DNS2/RR/NSAP.php ++++ b/Net/DNS2/RR/NSAP.php +@@ -130,7 +130,7 @@ protected function rrFromString(array $rdata) + // + // make sure the afi value is 47 + // +- if ($x['afi'] == 47) { ++ if ($x['afi'] == '47') { + + $this->afi = '0x' . $x['afi']; + $this->idi = $x['idi']; +@@ -169,7 +169,7 @@ protected function rrSet(Net_DNS2_Packet &$packet) + // + // we only support AFI 47- there arent' any others defined. + // +- if ($this->afi == 47) { ++ if ($this->afi == '47') { + + // + // unpack the rest of the values +@@ -212,7 +212,7 @@ protected function rrSet(Net_DNS2_Packet &$packet) + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { +- if ($this->afi == 0x47) { ++ if ($this->afi == '0x47') { + + // + // build the aa field +diff --git a/tests/Net_DNS2_DNSSECTest.php b/tests/Net_DNS2_DNSSECTest.php +index 027d614..f9febfa 100644 +--- a/tests/Net_DNS2_DNSSECTest.php ++++ b/tests/Net_DNS2_DNSSECTest.php +@@ -80,7 +80,7 @@ public function testDNSSEC() + $r->dnssec = true; + + $result = $r->query('org', 'SOA', 'IN'); +-print_r($result); ++ + $this->assertTrue(($result->header->ad == 1)); + $this->assertTrue(($result->additional[0] instanceof Net_DNS2_RR_OPT)); + $this->assertTrue(($result->additional[0]->do == 1)); diff --git a/php-pear-Net-DNS2.spec b/php-pear-Net-DNS2.spec index c490374..6c59015 100644 --- a/php-pear-Net-DNS2.spec +++ b/php-pear-Net-DNS2.spec @@ -1,4 +1,4 @@ -# spec file for php-pear-Net-DNS2 +# fedora/remirepo spec file for php-pear-Net-DNS2 # # Copyright (c) 2012-2016 Remi Collet # License: CC-BY-SA @@ -7,12 +7,12 @@ # Please, preserve the changelog entries # -%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} +%{!?__pear: %global __pear %{_bindir}/pear} %global pear_name Net_DNS2 Name: php-pear-Net-DNS2 -Version: 1.4.1 -Release: 1%{?dist} +Version: 1.4.2 +Release: 2%{?dist} Summary: PHP Resolver library used to communicate with a DNS server Group: Development/Libraries @@ -20,21 +20,24 @@ License: BSD URL: http://pear.php.net/package/Net_DNS2 Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz +# Fix include path furing the test suite +Patch0: %{pear_name}-incl.patch +# Upstream patch for PHP 7 +Patch1: %{pear_name}-php7.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php-pear(PEAR) # for tests -BuildRequires: php-pear(pear.phpunit.de/PHPUnit) +BuildRequires: %{_bindir}/phpunit Requires(post): %{__pear} Requires(postun): %{__pear} Requires: php-pear(PEAR) -# From phpcompatinfo report for version 1.3.2 +# From phpcompatinfo report for version 1.4.2 Requires: php-ctype Requires: php-date -Requires: php-hash Requires: php-json Requires: php-pcre Requires: php-shmop @@ -42,6 +45,7 @@ Requires: php-sockets Requires: php-spl # Optional Requires: php-filter +Requires: php-hash Requires: php-openssl Provides: php-pear(%{pear_name}) = %{version} @@ -64,11 +68,13 @@ The main features for this package include: %prep %setup -q -c -# https://github.com/mikepultz/netdns2/issues/32 -sed -e '/README/s/role="data"/role="doc"/' -i package.xml +sed -e 's/md5sum="[^"]*"//' \ + -i package.xml cd %{pear_name}-%{version} mv ../package.xml %{name}.xml +%patch0 -p1 +%patch1 -p1 %build @@ -128,6 +134,14 @@ fi %changelog +* Tue Nov 29 2016 Remi Collet <remi@fedoraproject.org> - 1.4.2-2 +- use upstream patch for PHP 7 + +* Mon Nov 28 2016 Remi Collet <remi@fedoraproject.org> - 1.4.2-1 +- Update to 1.4.2 (stable) +- add patch for PHP 7 + open https://github.com/mikepultz/netdns2/pull/56 + * Mon Apr 13 2015 Remi Collet <remi@fedoraproject.org> - 1.4.1-1 - Update to 1.4.1 |