Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3796438
D1940.id4909.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D1940.id4909.diff
View Options
diff --git a/roles/webserver-legacy/php-builder/source.sls b/roles/webserver-legacy/php-builder/source.sls
--- a/roles/webserver-legacy/php-builder/source.sls
+++ b/roles/webserver-legacy/php-builder/source.sls
@@ -26,13 +26,12 @@
return set(versions)
-def get_build_directories():
- return ["/opt/php/_builds/" + build['version']
- for build in get_release_builds().values()]
+def get_archive_path(version):
+ return "/opt/php/archives/php-" + version + ".tar.bz2"
-def get_archive_path(version):
- return "/opt/php/_archives/php-" + version + ".tar.bz2"
+def get_build_directories():
+ return ["/opt/php/" + build for build in __pillar__["php_custom_builds"]]
def get_extract_archive_command(archive, directory):
@@ -48,7 +47,7 @@
config = {}
builder_user = 'builder'
- directories_to_create = ['/opt/php', '/opt/php/_archives', '/opt/php/_builds']
+ directories_to_create = ['/opt/php', '/opt/php/archives']
# Task: create directories
directories_to_create.extend(get_build_directories())
@@ -56,12 +55,9 @@
config[directory] = {'file.directory': [{'user': builder_user}]}
# Task: fetch archives
- # Task: extract archives to build directories
for version, archive_hash in get_release_versions():
archive = get_archive_path(version)
url = "http://fr2.php.net/get/php-" + version + ".tar.bz2/from/this/mirror"
- directory = "/opt/php/_builds/" + version
- command = get_extract_archive_command(archive, directory)
config[archive] = {'file.managed': [
{'source': url},
@@ -69,7 +65,13 @@
{'user': builder_user},
]}
- config["php_build_" + version] = {'cmd.run': [
+ # Task: extract archives to build directories
+ for build_name, build in get_release_builds().items():
+ archive = get_archive_path(build['version'])
+ directory = "/opt/php/" + build_name
+ command = get_extract_archive_command(archive, directory)
+
+ config["php_build_" + build_name] = {'cmd.run' : [
{'name': command},
{'user': builder_user},
{'creates': directory + "/configure.in"},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 06:09 (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2270851
Default Alt Text
D1940.id4909.diff (2 KB)
Attached To
Mode
D1940: Revert "Build PHP by version, not by final target repository"
Attached
Detach File
Event Timeline
Log In to Comment