Projects
Tools
libphutil
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 11
View file
libphutil.spec
Changed
@@ -13,9 +13,22 @@ # be able to build the actual subpackage. Source999: README.phabricator -Patch0001: 0001-Parse-From-lines-in-the-format-user-domain.com-user-.patch -Patch0002: 0002-Unvendorize-jsonlint.patch -Patch0003: 0003-Remove-xhprof-dependency.patch +## +## Packaging fixes +## + +# https://github.com/kanarip/libphutil/tree/packaging/stable/0001-unvendorize-jsonlint +Patch0001: 0001-Unvendorize-jsonlint.patch +# https://github.com/kanarip/libphutil/tree/packaging/stable/0002-remove-deprecated-xhprof-dependency +# No longer needed in the next promotion of master to stable +Patch0002: 0002-Remove-xhprof-dependency.patch + +## +## Feature enhancements (arguably) +## + +# https://github.com/kanarip/libphutil/tree/feature/stable/0001-fix-from-address-parsing +Patch0003: 0003-Parse-From-lines-in-the-format-user-domain.com-user-.patch BuildArch: noarch @@ -53,9 +66,9 @@ %prep %setup -q -n libphutil-%{git_full_version_hash} -%patch0001 -p1 -b .email-format -%patch0002 -p1 -b .unven-jsonlint -%patch0003 -p1 -b .remove-xhprof +%patch0001 -p1 -b .unvendorize-jsonlint +%patch0002 -p1 -b .deprecate-xhprof +%patch0003 -p1 -b .fix-email-address-parsing cp -a %{SOURCE999} .
View file
0001-Parse-From-lines-in-the-format-user-domain.com-user-.patch
Deleted
@@ -1,28 +0,0 @@ -From ba9bcb072009ea27bd4937ea86f1f6a83a5414cb Mon Sep 17 00:00:00 2001 -From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> -Date: Fri, 29 Jul 2016 12:36:11 +0200 -Subject: [PATCH 1/3] Parse From: lines in the format "user@domain.com (user)" - correctly. - ---- - src/parser/PhutilEmailAddress.php | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/parser/PhutilEmailAddress.php b/src/parser/PhutilEmailAddress.php -index b9a3a44..be811de 100644 ---- a/src/parser/PhutilEmailAddress.php -+++ b/src/parser/PhutilEmailAddress.php -@@ -24,6 +24,10 @@ final class PhutilEmailAddress extends Phobject { - $local_part = $matches[2]; - $domain_name = null; - } -+ } else if (preg_match('/^(.*)@(.*)\s\((.*)\)$/', $email_address, $matches)) { -+ $display_name = $matches[3]; -+ $local_part = $matches[1]; -+ $domain_name = $matches[2]; - } else if (preg_match('/^(.*)@(.*)$/', $email_address, $matches)) { - $display_name = null; - $local_part = $matches[1]; --- -2.5.5 -
View file
0001-Unvendorize-jsonlint.patch
Added
@@ -0,0 +1,63 @@ +From 0608e9e6292cc3b0e288a1be776f83c9556312b0 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Tue, 9 Aug 2016 12:47:21 +0200 +Subject: [PATCH 1/3] Unvendorize jsonlint + +--- + src/parser/PhutilJSONParser.php | 20 ++++++++------------ + 1 file changed, 8 insertions(+), 12 deletions(-) + +diff --git a/src/parser/PhutilJSONParser.php b/src/parser/PhutilJSONParser.php +index 3e7e00a..ebafe53 100644 +--- a/src/parser/PhutilJSONParser.php ++++ b/src/parser/PhutilJSONParser.php +@@ -3,8 +3,8 @@ + /** + * A JSON parser. + * +- * @phutil-external-symbol class JsonLintJsonParser +- * @phutil-external-symbol class JsonLintParsingException ++ * @phutil-external-symbol class Seld\JsonLint\JsonParser ++ * @phutil-external-symbol class Seld\JsonLint\ParsingException + */ + final class PhutilJSONParser extends Phobject { + +@@ -16,16 +16,12 @@ final class PhutilJSONParser extends Phobject { + } + + public function parse($json) { +- $jsonlint_root = phutil_get_library_root('phutil').'/../externals/jsonlint'; +- require_once $jsonlint_root.'/src/Seld/JsonLint/JsonParser.php'; +- require_once $jsonlint_root.'/src/Seld/JsonLint/Lexer.php'; +- require_once $jsonlint_root.'/src/Seld/JsonLint/ParsingException.php'; +- require_once $jsonlint_root.'/src/Seld/JsonLint/Undefined.php'; ++ require_once 'Seld/JsonLint/autoload.php'; + +- $parser = new JsonLintJsonParser(); ++ $parser = new Seld\JsonLint\JsonParser(); + try { + $output = $parser->parse($json, $this->getFlags()); +- } catch (JsonLintParsingException $ex) { ++ } catch (Seld\JsonLint\ParsingException $ex) { + $details = $ex->getDetails(); + $message = preg_replace("/^Parse error .*\\^\n/s", '', $ex->getMessage()); + +@@ -48,12 +44,12 @@ final class PhutilJSONParser extends Phobject { + } + + private function getFlags() { +- $flags = JsonLintJsonParser::PARSE_TO_ASSOC; ++ $flags = Seld\JsonLint\JsonParser::PARSE_TO_ASSOC; + + if ($this->allowDuplicateKeys) { +- $flags |= JsonLintJsonParser::ALLOW_DUPLICATE_KEYS; ++ $flags |= Seld\JsonLint\JsonParser::ALLOW_DUPLICATE_KEYS; + } else { +- $flags |= JsonLintJsonParser::DETECT_KEY_CONFLICTS; ++ $flags |= Seld\JsonLint\JsonParser::DETECT_KEY_CONFLICTS; + } + + return $flags; +-- +2.5.5 +
View file
0002-Remove-xhprof-dependency.patch
Added
@@ -0,0 +1,131 @@ +From 025c137d1201ded5933942d1877136483d8f9e70 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Tue, 9 Aug 2016 19:31:50 +0200 +Subject: [PATCH 2/3] Remove xhprof dependency + +--- + resources/php_compat_info.json | 49 ---------------------------- + src/parser/argument/PhutilArgumentParser.php | 23 ------------- + 2 files changed, 72 deletions(-) + +diff --git a/resources/php_compat_info.json b/resources/php_compat_info.json +index e9c3145..1731719 100644 +--- a/resources/php_compat_info.json ++++ b/resources/php_compat_info.json +@@ -19493,34 +19493,6 @@ + "php.min": "4.3.0", + "php.max": null + }, +- "xhprof_disable": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, +- "xhprof_enable": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, +- "xhprof_sample_disable": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, +- "xhprof_sample_enable": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, + "xml_error_string": { + "ext.name": "xml", + "ext.min": "4.0.0", +@@ -45182,27 +45154,6 @@ + "php.min": "5.4.0", + "php.max": null + }, +- "XHPROF_FLAGS_CPU": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, +- "XHPROF_FLAGS_MEMORY": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, +- "XHPROF_FLAGS_NO_BUILTINS": { +- "ext.name": "xhprof", +- "ext.min": "0.9.0", +- "ext.max": null, +- "php.min": "5.2.0", +- "php.max": null +- }, + "XML_ATTRIBUTE_CDATA": { + "ext.name": "dom", + "ext.min": "5.0.0", +diff --git a/src/parser/argument/PhutilArgumentParser.php b/src/parser/argument/PhutilArgumentParser.php +index f554d65..f26503b 100644 +--- a/src/parser/argument/PhutilArgumentParser.php ++++ b/src/parser/argument/PhutilArgumentParser.php +@@ -448,12 +448,9 @@ final class PhutilArgumentParser extends Phobject { + * + * --trace Enable service call tracing. + * --no-ansi Disable ANSI color/style sequences. +- * --xprofile <file> Write out an XHProf profile. + * --help Show help. + * + * @return this +- * +- * @phutil-external-symbol function xhprof_enable + */ + public function parseStandardArguments() { + try { +@@ -528,17 +525,6 @@ final class PhutilArgumentParser extends Phobject { + $this->showHelp = true; + } + +- $xprofile = $this->getArg('xprofile'); +- if ($xprofile) { +- if (!function_exists('xhprof_enable')) { +- throw new Exception( +- pht("To use '%s', you must install XHProf.", '--xprofile')); +- } +- +- xhprof_enable(0); +- register_shutdown_function(array($this, 'shutdownProfiler')); +- } +- + $recon = $this->getArg('recon'); + if ($recon) { + $remote_console = PhutilConsole::newRemoteConsole(); +@@ -854,15 +840,6 @@ final class PhutilArgumentParser extends Phobject { + return phutil_console_wrap($text, $level); + } + +- /** +- * @phutil-external-symbol function xhprof_disable +- */ +- public function shutdownProfiler() { +- $data = xhprof_disable(); +- $data = json_encode($data); +- Filesystem::writeFile($this->getArg('xprofile'), $data); +- } +- + public static function isTraceModeEnabled() { + return self::$traceModeEnabled; + } +-- +2.5.5 +
View file
0002-Unvendorize-jsonlint.patch
Deleted
@@ -1,63 +0,0 @@ -From cc1383235c64eb329aaddf6f7951fecb7c8a5022 Mon Sep 17 00:00:00 2001 -From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> -Date: Tue, 9 Aug 2016 12:47:21 +0200 -Subject: [PATCH 2/3] Unvendorize jsonlint - ---- - src/parser/PhutilJSONParser.php | 20 ++++++++------------ - 1 file changed, 8 insertions(+), 12 deletions(-) - -diff --git a/src/parser/PhutilJSONParser.php b/src/parser/PhutilJSONParser.php -index 3e7e00a..ebafe53 100644 ---- a/src/parser/PhutilJSONParser.php -+++ b/src/parser/PhutilJSONParser.php -@@ -3,8 +3,8 @@ - /** - * A JSON parser. - * -- * @phutil-external-symbol class JsonLintJsonParser -- * @phutil-external-symbol class JsonLintParsingException -+ * @phutil-external-symbol class Seld\JsonLint\JsonParser -+ * @phutil-external-symbol class Seld\JsonLint\ParsingException - */ - final class PhutilJSONParser extends Phobject { - -@@ -16,16 +16,12 @@ final class PhutilJSONParser extends Phobject { - } - - public function parse($json) { -- $jsonlint_root = phutil_get_library_root('phutil').'/../externals/jsonlint'; -- require_once $jsonlint_root.'/src/Seld/JsonLint/JsonParser.php'; -- require_once $jsonlint_root.'/src/Seld/JsonLint/Lexer.php'; -- require_once $jsonlint_root.'/src/Seld/JsonLint/ParsingException.php'; -- require_once $jsonlint_root.'/src/Seld/JsonLint/Undefined.php'; -+ require_once 'Seld/JsonLint/autoload.php'; - -- $parser = new JsonLintJsonParser(); -+ $parser = new Seld\JsonLint\JsonParser(); - try { - $output = $parser->parse($json, $this->getFlags()); -- } catch (JsonLintParsingException $ex) { -+ } catch (Seld\JsonLint\ParsingException $ex) { - $details = $ex->getDetails(); - $message = preg_replace("/^Parse error .*\\^\n/s", '', $ex->getMessage()); - -@@ -48,12 +44,12 @@ final class PhutilJSONParser extends Phobject { - } - - private function getFlags() { -- $flags = JsonLintJsonParser::PARSE_TO_ASSOC; -+ $flags = Seld\JsonLint\JsonParser::PARSE_TO_ASSOC; - - if ($this->allowDuplicateKeys) { -- $flags |= JsonLintJsonParser::ALLOW_DUPLICATE_KEYS; -+ $flags |= Seld\JsonLint\JsonParser::ALLOW_DUPLICATE_KEYS; - } else { -- $flags |= JsonLintJsonParser::DETECT_KEY_CONFLICTS; -+ $flags |= Seld\JsonLint\JsonParser::DETECT_KEY_CONFLICTS; - } - - return $flags; --- -2.5.5 -
View file
0003-Parse-From-lines-in-the-format-user-domain.com-user-.patch
Added
@@ -0,0 +1,28 @@ +From 80214a99daa69e8dce0d1ec3e5624901869a3607 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Fri, 29 Jul 2016 12:36:11 +0200 +Subject: [PATCH 3/3] Parse From: lines in the format "user@domain.com (user)" + correctly. + +--- + src/parser/PhutilEmailAddress.php | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/parser/PhutilEmailAddress.php b/src/parser/PhutilEmailAddress.php +index b9a3a44..be811de 100644 +--- a/src/parser/PhutilEmailAddress.php ++++ b/src/parser/PhutilEmailAddress.php +@@ -24,6 +24,10 @@ final class PhutilEmailAddress extends Phobject { + $local_part = $matches[2]; + $domain_name = null; + } ++ } else if (preg_match('/^(.*)@(.*)\s\((.*)\)$/', $email_address, $matches)) { ++ $display_name = $matches[3]; ++ $local_part = $matches[1]; ++ $domain_name = $matches[2]; + } else if (preg_match('/^(.*)@(.*)$/', $email_address, $matches)) { + $display_name = null; + $local_part = $matches[1]; +-- +2.5.5 +
View file
0003-Remove-xhprof-dependency.patch
Deleted
@@ -1,131 +0,0 @@ -From 4ec8f50d5c46c53df8b0cc0b81895a1d39746f05 Mon Sep 17 00:00:00 2001 -From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> -Date: Tue, 9 Aug 2016 19:31:50 +0200 -Subject: [PATCH 3/3] Remove xhprof dependency - ---- - resources/php_compat_info.json | 49 ---------------------------- - src/parser/argument/PhutilArgumentParser.php | 23 ------------- - 2 files changed, 72 deletions(-) - -diff --git a/resources/php_compat_info.json b/resources/php_compat_info.json -index e9c3145..1731719 100644 ---- a/resources/php_compat_info.json -+++ b/resources/php_compat_info.json -@@ -19493,34 +19493,6 @@ - "php.min": "4.3.0", - "php.max": null - }, -- "xhprof_disable": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, -- "xhprof_enable": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, -- "xhprof_sample_disable": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, -- "xhprof_sample_enable": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, - "xml_error_string": { - "ext.name": "xml", - "ext.min": "4.0.0", -@@ -45182,27 +45154,6 @@ - "php.min": "5.4.0", - "php.max": null - }, -- "XHPROF_FLAGS_CPU": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, -- "XHPROF_FLAGS_MEMORY": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, -- "XHPROF_FLAGS_NO_BUILTINS": { -- "ext.name": "xhprof", -- "ext.min": "0.9.0", -- "ext.max": null, -- "php.min": "5.2.0", -- "php.max": null -- }, - "XML_ATTRIBUTE_CDATA": { - "ext.name": "dom", - "ext.min": "5.0.0", -diff --git a/src/parser/argument/PhutilArgumentParser.php b/src/parser/argument/PhutilArgumentParser.php -index f554d65..f26503b 100644 ---- a/src/parser/argument/PhutilArgumentParser.php -+++ b/src/parser/argument/PhutilArgumentParser.php -@@ -448,12 +448,9 @@ final class PhutilArgumentParser extends Phobject { - * - * --trace Enable service call tracing. - * --no-ansi Disable ANSI color/style sequences. -- * --xprofile <file> Write out an XHProf profile. - * --help Show help. - * - * @return this -- * -- * @phutil-external-symbol function xhprof_enable - */ - public function parseStandardArguments() { - try { -@@ -528,17 +525,6 @@ final class PhutilArgumentParser extends Phobject { - $this->showHelp = true; - } - -- $xprofile = $this->getArg('xprofile'); -- if ($xprofile) { -- if (!function_exists('xhprof_enable')) { -- throw new Exception( -- pht("To use '%s', you must install XHProf.", '--xprofile')); -- } -- -- xhprof_enable(0); -- register_shutdown_function(array($this, 'shutdownProfiler')); -- } -- - $recon = $this->getArg('recon'); - if ($recon) { - $remote_console = PhutilConsole::newRemoteConsole(); -@@ -854,15 +840,6 @@ final class PhutilArgumentParser extends Phobject { - return phutil_console_wrap($text, $level); - } - -- /** -- * @phutil-external-symbol function xhprof_disable -- */ -- public function shutdownProfiler() { -- $data = xhprof_disable(); -- $data = json_encode($data); -- Filesystem::writeFile($this->getArg('xprofile'), $data); -- } -- - public static function isTraceModeEnabled() { - return self::$traceModeEnabled; - } --- -2.5.5 -
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.