Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Zheng
slapos.recipe.build
Commits
92a430e1
Commit
92a430e1
authored
Nov 28, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix reST syntax.
parent
5ef57d6f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
156 deletions
+150
-156
CHANGES.txt
CHANGES.txt
+4
-4
README.rst
README.rst
+145
-152
setup.py
setup.py
+1
-0
No files found.
CHANGES.txt
View file @
92a430e1
Changes
=========
=======
Changes
=========
0.15 (2014-11-28)
0.15 (2014-11-28)
-----------------
-----------------
...
@@ -21,8 +22,7 @@ Changes
...
@@ -21,8 +22,7 @@ Changes
0.12 (2013-09-05)
0.12 (2013-09-05)
-----------------
-----------------
* gitclone: Do not upload to cache by default. 'use-cache' option replaces
* gitclone: Do not upload to cache by default. 'use-cache' option replaces 'forbid-download-cache' and must be explicitely set in order to use cache.
'forbid-download-cache' and must be explicitely set in order to use cache.
* gitclone: Do not cache working copy, which just duplicate `.git` folder.
* gitclone: Do not cache working copy, which just duplicate `.git` folder.
* gitclone: do not force to use 'master' branch when not specified.
* gitclone: do not force to use 'master' branch when not specified.
* gitclone: add git 'ignore-ssl-certificate' option.
* gitclone: add git 'ignore-ssl-certificate' option.
...
...
README.rst
View file @
92a430e1
****************************
=====================
slapos.recipe.build:gitclone
slapos.recipe.build
****************************
=====================
.. contents::
Examples
--------
Recipe to build the software.
Example buildout::
[buildout]
parts =
script
[script]
# default way with using script
recipe = slapos.recipe.build
url_0 = http://host/path/file.tar.gz
md5sum = 9631070eac74f92a812d4785a84d1b4e
script =
import os
os.chdir(%(work_directory)s)
unpack(%(url_0), strip_path=True)
execute('make')
execute('make install DEST=%(location)s')
slapos_promise =
directory:bin
dynlib:bin/file linked:libz.so.1,libc.so.6,libmagic.so.1 rpath:${zlib:location}/lib,!/lib
directory:include
file:include/magic.h
directory:lib
statlib:lib/libmagic.a
statlib:lib/libmagic.la
dynlib:lib/libmagic.so linked:libz.so.1,libc.so.6 rpath:${zlib:location}/lib
dynlib:lib/libmagic.so.1 linked:libz.so.1,libc.so.6 rpath:${zlib:location}/lib
dynlib:lib/libmagic.so.1.0.0 linked:libz.so.1,libc.so.6 rpath:${zlib:location}/lib
directory:share
directory:share/man
directory:share/man/man1
file:share/man/man1/file.1
directory:share/man/man3
file:share/man/man3/libmagic.3
directory:share/man/man4
file:share/man/man4/magic.4
directory:share/man/man5
directory:share/misc
file:share/misc/magic.mgc
[multiarchitecture]
recipe = slapos.recipe.build
slapos_promise =
...
x86 = http://host/path/x86.zip [md5sum]
x86-64 = http://host/path/x64.zip [md5sum]
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
You can remove formatting by using option “format = no” (default is “yes”)
For example::
[escaping]
recipe = slapos.recipe.build
example = foobar's one
script =
print '%%s' %% self.options['example']
# will print “foobar's one”
[no-escaping]
recipe = slapos.recipe.build
example = foobar's one
foo = bar
format = no
script =
print '%s' % self.options['example']
# will print “foobar's one”
print '%(foo)s'
# will print “%(foo)s”
Pure download
~~~~~~~~~~~~~
Note: deprecated entry-point.
::
[buildout]
parts =
download
[download]
recipe = slapos.recipe.build:download
url = https://some.url/file
Such profile will download https://some.url/file and put it in
buildout:parts-directory/download/download
filename parameter can be used to change destination named filename.
destination parameter allows to put explicit destination.
md5sum parameter allows pass md5sum.
mode (octal, so for rw-r--r-- use 0644) allows to set mode
Exposes target attribute which is path to downloaded file.
Notes
-----
This recipe suffers from buildout download utility issue, which will do not
try to redownload resource with wrong md5sum.
==============================
slapos.recipe.build:gitclone
==============================
Checkout a git repository.
Checkout a git repository.
Supports slapos.libnetworkcache if present, and if boolean 'use-cache' option
Supports slapos.libnetworkcache if present, and if boolean 'use-cache' option
is true.
is true.
Examples
Examples
********
--------
Those examples use slapos.recipe.build repository as an example.
Those examples use slapos.recipe.build repository as an example.
Simple clone
Simple clone
------------
~~~~~~~~~~~~
Only `repository` parameter is required. For each buildout run,
Only `repository` parameter is required. For each buildout run,
the recipe will pick up the latest commit on the remote master branch::
the recipe will pick up the latest commit on the remote master branch::
...
@@ -49,7 +168,7 @@ When updating, it will do a "git fetch; git reset @{upstream}"::
...
@@ -49,7 +168,7 @@ When updating, it will do a "git fetch; git reset @{upstream}"::
HEAD is now at ...
HEAD is now at ...
Specific branch
Specific branch
---------------
~~~~~~~~~~~~~~~
You can specify a specific branch using `branch` option. For each
You can specify a specific branch using `branch` option. For each
run it will take the latest commit on this remote branch::
run it will take the latest commit on this remote branch::
...
@@ -80,6 +199,7 @@ Let's take a look at the buildout parts directory now::
...
@@ -80,6 +199,7 @@ Let's take a look at the buildout parts directory now::
d git-clone
d git-clone
And let's see that current branch is "build"::
And let's see that current branch is "build"::
>>> import subprocess
>>> import subprocess
>>> cd('parts', 'git-clone')
>>> cd('parts', 'git-clone')
>>> print subprocess.check_output(['git', 'branch'])
>>> print subprocess.check_output(['git', 'branch'])
...
@@ -94,7 +214,7 @@ When updating, it will do a "git fetch; git reset build"::
...
@@ -94,7 +214,7 @@ When updating, it will do a "git fetch; git reset build"::
HEAD is now at ...
HEAD is now at ...
Specific revision
Specific revision
-----------------
~~~~~~~~~~~~~~~~~
You can specify a specific commit hash or tag using `revision` option.
You can specify a specific commit hash or tag using `revision` option.
This option has priority over the "branch" option::
This option has priority over the "branch" option::
...
@@ -141,7 +261,7 @@ When updating, it will do a "git fetch; git reset revision"::
...
@@ -141,7 +261,7 @@ When updating, it will do a "git fetch; git reset revision"::
HEAD is now at 2566127 ...
HEAD is now at 2566127 ...
Empty revision/branch
Empty revision/branch
---------------------
~~~~~~~~~~~~~~~~~~~~~
Specifying an empty revision or an empty branch will make buildout
Specifying an empty revision or an empty branch will make buildout
ignore those values as if it was not present at all (allowing to easily
ignore those values as if it was not present at all (allowing to easily
...
@@ -175,7 +295,7 @@ extend an existing section specifying a branch)::
...
@@ -175,7 +295,7 @@ extend an existing section specifying a branch)::
* master
* master
Revision/branch priority
Revision/branch priority
------------------------
~~~~~~~~~~~~~~~~~~~~~~~~
If both revision and branch parameters are set, revision parameters is used
If both revision and branch parameters are set, revision parameters is used
and branch parameter is ignored::
and branch parameter is ignored::
...
@@ -206,7 +326,7 @@ and branch parameter is ignored::
...
@@ -206,7 +326,7 @@ and branch parameter is ignored::
* master
* master
Setup a "develop" repository
Setup a "develop" repository
----------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you need to setup a repository that will be manually alterated over time for
If you need to setup a repository that will be manually alterated over time for
development purposes, you need to make sure buildout will NOT alter it and NOT
development purposes, you need to make sure buildout will NOT alter it and NOT
...
@@ -220,9 +340,8 @@ erase your local modifications by specifying the "develop" flag::
...
@@ -220,9 +340,8 @@ erase your local modifications by specifying the "develop" flag::
repository = https://example.net/example.git/
repository = https://example.net/example.git/
develop = true
develop = true
Specific git binary
Specific git binary
-------------------
~~~~~~~~~~~~~~~~~~~
The default git command is `git`, if for a any reason you don't
The default git command is `git`, if for a any reason you don't
have git in your path, you can specify git binary path with `git-command`
have git in your path, you can specify git binary path with `git-command`
...
@@ -285,7 +404,7 @@ In case of uninstall, buildout will keep the repository directory::
...
@@ -285,7 +404,7 @@ In case of uninstall, buildout will keep the repository directory::
destination directory already exists.
destination directory already exists.
Ignore SSL certificate
Ignore SSL certificate
----------------------
~~~~~~~~~~~~~~~~~~~~~~
By default, when remote server use SSL protocol git checks if the SSL
By default, when remote server use SSL protocol git checks if the SSL
certificate of the remote server is valid before executing commands.
certificate of the remote server is valid before executing commands.
...
@@ -318,20 +437,17 @@ Full example
...
@@ -318,20 +437,17 @@ Full example
git-command = ${git-binary:location}/bin/git
git-command = ${git-binary:location}/bin/git
revision = 0123456789abcdef
revision = 0123456789abcdef
==========================
************************
slapos.recipe.build:cpan
slapos.recipe.build:cpan
==========================
************************
Downloads and installs perl modules using Comprehensive Perl Archive Network (cpan).
Downloads and installs perl modules using Comprehensive Perl Archive Network (cpan).
Examples
Examples
********
--------
Basic example
Basic example
-------------
~~~~~~~~~~~~~
Here is example to install one or several modules::
Here is example to install one or several modules::
...
@@ -349,13 +465,12 @@ Here is example to install one or several modules::
...
@@ -349,13 +465,12 @@ Here is example to install one or several modules::
perl = perl
perl = perl
Specific version
Specific version
----------------
~~~~~~~~~~~~~~~~
Note that cpan won't allow you to specify version and will always take latest
Note that cpan won't allow you to specify version and will always take latest
version available. To choose a specific version, you will need to specify
version available. To choose a specific version, you will need to specify
the full path in cpan like in ::
the full path in cpan like in ::
[buildout]
[buildout]
parts = perl-modules
parts = perl-modules
...
@@ -366,23 +481,22 @@ the full path in cpan like in ::
...
@@ -366,23 +481,22 @@ the full path in cpan like in ::
perl = perl
perl = perl
Notes
Notes
=====
-----
Currently, the modules will be installed in site-perl directory. Location of this
Currently, the modules will be installed in site-perl directory. Location of this
directory changes depending on the perl installation.
directory changes depending on the perl installation.
=========================
***********************
slapos.recipe.build:npm
slapos.recipe.build:npm
=========================
***********************
Downloads and installs node.js packages using Node Package Manager (NPM).
Downloads and installs node.js packages using Node Package Manager (NPM).
Examples
Examples
********
--------
Basic example
Basic example
-------------
~~~~~~~~~~~~~
Here is example to install one or several modules::
Here is example to install one or several modules::
...
@@ -401,7 +515,7 @@ Here is example to install one or several modules::
...
@@ -401,7 +515,7 @@ Here is example to install one or several modules::
node = node-0.6
node = node-0.6
Specific version
Specific version
----------------
~~~~~~~~~~~~~~~~
::
::
[buildout]
[buildout]
...
@@ -412,124 +526,3 @@ Specific version
...
@@ -412,124 +526,3 @@ Specific version
modules =
modules =
express@1.0.2
express@1.0.2
node = node-0.6
node = node-0.6
*******************
slapos.recipe.build
*******************
.. contents::
Examples
********
Recipe to build the software.
Example buildout::
[buildout]
parts =
script
[script]
# default way with using script
recipe = slapos.recipe.build
url_0 = http://host/path/file.tar.gz
md5sum = 9631070eac74f92a812d4785a84d1b4e
script =
import os
os.chdir(%(work_directory)s)
unpack(%(url_0), strip_path=True)
execute('make')
execute('make install DEST=%(location)s')
slapos_promise =
directory:bin
dynlib:bin/file linked:libz.so.1,libc.so.6,libmagic.so.1 rpath:${zlib:location}/lib,!/lib
directory:include
file:include/magic.h
directory:lib
statlib:lib/libmagic.a
statlib:lib/libmagic.la
dynlib:lib/libmagic.so linked:libz.so.1,libc.so.6 rpath:${zlib:location}/lib
dynlib:lib/libmagic.so.1 linked:libz.so.1,libc.so.6 rpath:${zlib:location}/lib
dynlib:lib/libmagic.so.1.0.0 linked:libz.so.1,libc.so.6 rpath:${zlib:location}/lib
directory:share
directory:share/man
directory:share/man/man1
file:share/man/man1/file.1
directory:share/man/man3
file:share/man/man3/libmagic.3
directory:share/man/man4
file:share/man/man4/magic.4
directory:share/man/man5
directory:share/misc
file:share/misc/magic.mgc
[multiarchitecture]
recipe = slapos.recipe.build
slapos_promise =
...
x86 = http://host/path/x86.zip [md5sum]
x86-64 = http://host/path/x64.zip [md5sum]
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s")
You can remove formatting by using option “format = no” (default is “yes”)
For example::
[escaping]
recipe = slapos.recipe.build
example = foobar's one
script =
print '%%s' %% self.options['example']
# will print “foobar's one”
[no-escaping]
recipe = slapos.recipe.build
example = foobar's one
foo = bar
format = no
script =
print '%s' % self.options['example']
# will print “foobar's one”
print '%(foo)s'
# will print “%(foo)s”
Pure download
*************
Note: deprecated entry-point.
::
[buildout]
parts =
download
[download]
recipe = slapos.recipe.build:download
url = https://some.url/file
Such profile will download https://some.url/file and put it in
buildout:parts-directory/download/download
filename parameter can be used to change destination named filename.
destination parameter allows to put explicit destination.
md5sum parameter allows pass md5sum.
mode (octal, so for rw-r--r-- use 0644) allows to set mode
Exposes target attribute which is path to downloaded file.
Notes
-----
This recipe suffers from buildout download utility issue, which will do not
try to redownload resource with wrong md5sum.
setup.py
View file @
92a430e1
...
@@ -18,6 +18,7 @@ setup(name=name,
...
@@ -18,6 +18,7 @@ setup(name=name,
],
],
keywords
=
'slapos recipe'
,
keywords
=
'slapos recipe'
,
license
=
'GPLv3'
,
license
=
'GPLv3'
,
url
=
'http://git.erp5.org/gitweb/slapos.recipe.build.git'
,
namespace_packages
=
[
'slapos'
,
'slapos.recipe'
],
namespace_packages
=
[
'slapos'
,
'slapos.recipe'
],
packages
=
find_packages
(),
packages
=
find_packages
(),
include_package_data
=
True
,
include_package_data
=
True
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment