Projects
Tools
libphutil
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 22
View file
libphutil.spec
Changed
@@ -1,10 +1,11 @@ -%define git_short_version_hash 89984ac -%define git_full_version_hash 89984ac200598c028e95d2518ae621da41c09042 +%global revision_date 20161126 +%global git_short_version_hash 89984ac +%global git_full_version_hash 89984ac200598c028e95d2518ae621da41c09042 Summary: A collection of PHP utility classes Name: libphutil -Version: 20161126.git89984ac -Release: 1%{?dist} +Version: 0.%{revision_date}.git%{git_short_version_hash} +Release: 3%{?dist} License: ASL 2.0 URL: http://www.phabricator.com/docs/libphutil/ Source0: https://github.com/phacility/libphutil/archive/%{git_full_version_hash}.tar.gz#/libphutil-%{git_full_version_hash}.tar.gz @@ -22,13 +23,15 @@ # 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 +# https://github.com/kanarip/libphutil/tree/packaging/stable/0003-remove-mysql-dependency +Patch0003: 0003-Strip-dependency-on-deprecated-MySQL-PHP-extension.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 +Patch0004: 0004-Parse-From-lines-in-the-format-user-domain.com-user-.patch BuildArch: noarch @@ -52,7 +55,7 @@ Summary: A collection of dependencies optimized for Phabricator Requires: php-gd Requires: php-ldap -Requires: php-mysqlnd +Requires: php-mysqli Requires: php-opcache Requires: php-pecl(APC) @@ -67,9 +70,17 @@ %prep %setup -q -n libphutil-%{git_full_version_hash} -%patch0001 -p1 -b .unvendorize-jsonlint -%patch0002 -p1 -b .deprecate-xhprof -%patch0003 -p1 -b .fix-email-address-parsing +%patch0001 -p1 +# Also remove the externals/jsonlint/ directory. +rm -rf externals/jsonlint/ + +%patch0002 -p1 +%patch0003 -p1 + +# Also remove the files associated with it, keeps things clean for review +find src/ -type f -name "*MySQL*" -a ! -name "*BaseMySQL*" -a ! -name "*MySQLi*" -delete + +%patch0004 -p1 cp -a %{SOURCE999} . @@ -101,6 +112,21 @@ %doc README.phabricator %changelog +* Thu Dec 01 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.20161126.git89984ac-3 +- Rebuild + +* Thu Dec 01 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.20161126.git89984ac-2 +- Rebuild + +* Thu Dec 01 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.20161126.git89984ac-1 +- Promote Week #47 2016 + +* Thu Dec 01 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 20161126.git89984ac-2 +- Rebuild + +* Tue Nov 29 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 20161126.git89984ac-1 +- Promote Week #47 2016 + * Tue Nov 29 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 20161126.git89984ac-1 - Promote Week #47
View file
0001-Unvendorize-jsonlint.patch
Changed
@@ -1,7 +1,7 @@ -From 646763c02c19a2f7fea5918a4759c4b16b2bffcc Mon Sep 17 00:00:00 2001 +From a13e90c1cd76ed0bf316d15c0b8c5c8f03807fda 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 +Subject: [PATCH 1/4] Unvendorize jsonlint --- src/parser/PhutilJSONParser.php | 20 ++++++++------------ @@ -59,5 +59,5 @@ return $flags; -- -2.7.4 +2.9.3
View file
0002-Remove-xhprof-dependency.patch
Changed
@@ -1,7 +1,7 @@ -From 378c1363193560878b3d8065054eedc426be8e88 Mon Sep 17 00:00:00 2001 +From 1157df320a1d12382d1a5b14670d05f96e4086e9 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 +Subject: [PATCH 2/4] Remove xhprof dependency --- resources/php_compat_info.json | 49 ---------------------------- @@ -127,5 +127,5 @@ return self::$traceModeEnabled; } -- -2.7.4 +2.9.3
View file
0003-Parse-From-lines-in-the-format-user-domain.com-user-.patch
Deleted
@@ -1,28 +0,0 @@ -From 8db627c736e3308d802206c182b0c9ddd7a2f148 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.7.4 -
View file
0003-Strip-dependency-on-deprecated-MySQL-PHP-extension.patch
Added
@@ -0,0 +1,32 @@ +From 6c8dc83996225546dbdee22a0e1a704959b22dfd Mon Sep 17 00:00:00 2001 +From: Tim Flink <tflink@fedoraproject.org> +Date: Thu, 1 Dec 2016 10:28:17 +0100 +Subject: [PATCH 3/4] Strip dependency on deprecated MySQL PHP extension + +--- + src/__phutil_library_map__.php | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php +index 4348778..8470b51 100644 +--- a/src/__phutil_library_map__.php ++++ b/src/__phutil_library_map__.php +@@ -28,7 +28,6 @@ phutil_register_library_map(array( + 'AphrontInvalidCredentialsQueryException' => 'aphront/storage/exception/AphrontInvalidCredentialsQueryException.php', + 'AphrontIsolatedDatabaseConnection' => 'aphront/storage/connection/AphrontIsolatedDatabaseConnection.php', + 'AphrontLockTimeoutQueryException' => 'aphront/storage/exception/AphrontLockTimeoutQueryException.php', +- 'AphrontMySQLDatabaseConnection' => 'aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php', + 'AphrontMySQLiDatabaseConnection' => 'aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php', + 'AphrontNotSupportedQueryException' => 'aphront/storage/exception/AphrontNotSupportedQueryException.php', + 'AphrontObjectMissingQueryException' => 'aphront/storage/exception/AphrontObjectMissingQueryException.php', +@@ -612,7 +611,6 @@ phutil_register_library_map(array( + 'AphrontInvalidCredentialsQueryException' => 'AphrontQueryException', + 'AphrontIsolatedDatabaseConnection' => 'AphrontDatabaseConnection', + 'AphrontLockTimeoutQueryException' => 'AphrontRecoverableQueryException', +- 'AphrontMySQLDatabaseConnection' => 'AphrontBaseMySQLDatabaseConnection', + 'AphrontMySQLiDatabaseConnection' => 'AphrontBaseMySQLDatabaseConnection', + 'AphrontNotSupportedQueryException' => 'AphrontQueryException', + 'AphrontObjectMissingQueryException' => 'AphrontQueryException', +-- +2.9.3 +
View file
0004-Parse-From-lines-in-the-format-user-domain.com-user-.patch
Added
@@ -0,0 +1,28 @@ +From 5cdf352e3d1957a0a6b871e1df6fa071caa49973 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 4/4] 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.9.3 +
View file
update.sh
Changed
@@ -5,59 +5,119 @@ exit 0 } +package=$(rpmspec --query --queryformat="%{NAME}\n" *.spec | head -n 1) + +fedora_copr=0 fedora_review=0 +copr_wait_opt="--nowait" + while [ $# -gt 0 ]; do case $1 in + --wait) + copr_wait_opt="" + shift + ;; + + --with-fedora-copr) + fedora_copr=1 + shift + ;; + --with-fedora-review) - fedora_review=1 - shift - ;; + fedora_review=1 + shift + ;; + *) - usage - ;; + usage + ;; esac done -if [ ! -d "libphutil.git" ]; then - git clone -b stable https://github.com/phacility/libphutil.git libphutil.git - pushd libphutil.git +if [ ! -d "${package}.git" ]; then + git clone -b stable https://github.com/phacility/${package}.git ${package}.git + pushd ${package}.git else - pushd libphutil.git - git remote set-url origin https://github.com/phacility/libphutil.git + pushd ${package}.git + git remote set-url origin https://github.com/phacility/${package}.git git fetch origin git reset --hard origin/stable git clean -d -f -x fi +current_version=$(grep "%global git_full_version_hash" ../${package}.spec | awk '{print $3}') + git_short_version_hash=$(git rev-parse --short HEAD) git_full_version_hash=$(git rev-parse HEAD) -commitdate=$(date +%Y%m%d --date @$(git log HEAD^1..HEAD --oneline --format=%ct | head -n 1)) +commitepoch=$(git log HEAD^1..HEAD --oneline --format=%ct | head -n 1) +commitdate=$(date +%Y%m%d --date @${commitepoch}) +month_behind=$(date +%Y%m%d --date @$(( ${commitepoch} - ( 31 * 24 * 3600 ) ))) +month_ahead=$(date +%Y%m%d --date @$(( ${commitepoch} + ( 31 * 24 * 3600 ) ))) popd -if [ ! -f libphutil-${git_full_version_hash}.tar.gz ]; then - rm -rf libphutil-*.tar.gz - wget --content-disposition https://github.com/phacility/libphutil/archive/${git_full_version_hash}.tar.gz#/libphutil-${git_full_version_hash}.tar.gz +if [ ! -f ${package}-${git_full_version_hash}.tar.gz ]; then + rm -rf ${package}-*.tar.gz + wget --content-disposition https://github.com/phacility/${package}/archive/${git_full_version_hash}.tar.gz#/${package}-${git_full_version_hash}.tar.gz fi sed -i -r \ - -e "s/git_short_version_hash .*/git_short_version_hash ${git_short_version_hash}/g" \ - -e "s/git_full_version_hash .*/git_full_version_hash ${git_full_version_hash}/g" \ - -e "s/Version:(\s+)[0-9]+/Version:\1${commitdate}/g" \ - libphutil.spec + -e "s/git_short_version_hash .*$/git_short_version_hash ${git_short_version_hash}/g" \ + -e "s/git_full_version_hash .*$/git_full_version_hash ${git_full_version_hash}/g" \ + -e "s/revision_date [0-9]+$/revision_date ${commitdate}/g" \ + ${package}.spec -rpmdev-bumpspec \ - --new="${commitdate}.git${git_short_version_hash}" \ - --comment "Promote Week #$(date +%V --date ${commitdate})" \ - libphutil.spec +if [ "${package}" == "arcanist" ]; then + sed -i -r \ + -e "s/Requires:(\s+)arcanist\(libphutil\) >= 0\.[0-9]+/Requires:\1arcanist\(libphutil\) >= 0\.${month_behind}/g" \ + -e "s/Requires:(\s+)arcanist\(libphutil\) <= 0\.[0-9]+/Requires:\1arcanist\(libphutil\) <= 0\.${month_ahead}/g" \ + ${package}.spec + +elif [ "${package}" == "phabricator" ]; then + sed -i -r \ + -e "s/Requires:(\s+)arcanist >= 0\.[0-9]+/Requires:\1arcanist >= 0\.${month_behind}/g" \ + -e "s/Requires:(\s+)arcanist <= 0\.[0-9]+/Requires:\1arcanist <= 0\.${month_ahead}/g" \ + -e "s/Requires:(\s+)phabricator\(libphutil\) >= 0\.[0-9]+/Requires:\1phabricator\(libphutil\) >= 0\.${month_behind}/g" \ + -e "s/Requires:(\s+)phabricator\(libphutil\) <= 0\.[0-9]+/Requires:\1phabricator\(libphutil\) <= 0\.${month_ahead}/g" \ + ${package}.spec +fi + +if [ "${git_full_version_hash}" != "${current_version}" ]; then + rpmdev-bumpspec \ + --new="0.${commitdate}.git${git_short_version_hash}" \ + --comment "Promote Week #$(date +'%V %Y' --date ${commitdate})" \ + ${package}.spec +else + rpmdev-bumpspec \ + --comment "Rebuild" \ + ${package}.spec +fi + +# Thanks, rpmdev-bumpspec ... +sed -i -r \ + -e "s/^Version:(\s+).*$/Version:\10.%{revision_date}.git%{git_short_version_hash}/g" \ + ${package}.spec rm -rf *.src.rpm -osc ar -osc build --no-verify CentOS_7 libphutil.spec && \ - rm -rf review-libphutil/ libphutil-*.src.rpm && \ - cp /var/tmp/build-root/CentOS_7-x86_64/home/abuild/rpmbuild/SRPMS/libphutil-*.src.rpm . && \ - test ${fedora_review} -eq 1 && \ - fedora-review --verbose -n libphutil +if [ -d .osc/ ]; then + osc ar + + osc build --no-verify CentOS_7 ${package}.spec && \ + rm -rf review-${package}/ ${package}-*.src.rpm && \ + cp /var/tmp/build-root/CentOS_7-x86_64/home/abuild/rpmbuild/SRPMS/${package}-*.src.rpm . || exit 1 +fi + +if [ ${fedora_review} -eq 1 ]; then + fedora-review --verbose -n ${package} +fi + +if [ ${fedora_copr} -eq 1 ]; then + test -f ${package}-*.src.rpm || \ + rpmbuild --define "_srcdir $(pwd)" --define "_sourcedir $(pwd)" -bs ${package}.spec + + copr-cli build ${copr_wait_opt} phabricator *.src.rpm +fi +
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
.