Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SlapOS Develop
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 Develop
Commits
bcd47114
Commit
bcd47114
authored
Oct 19, 2011
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate symbolic links needed by innobackup
parent
5740bd29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
1 deletion
+72
-1
setup.py
setup.py
+1
-0
slapos/recipe/symbolic_link.py
slapos/recipe/symbolic_link.py
+56
-0
software/erp5/instance-mariadb.cfg
software/erp5/instance-mariadb.cfg
+14
-0
software/erp5/software.cfg
software/erp5/software.cfg
+1
-1
No files found.
setup.py
View file @
bcd47114
...
...
@@ -76,6 +76,7 @@ setup(name=name,
'proactive = slapos.recipe.proactive:Recipe'
,
'request = slapos.recipe.request:Recipe'
,
'sheepdogtestbed = slapos.recipe.sheepdogtestbed:SheepDogTestBed'
,
'symbolic.link = slapos.recipe.symbolic_link:Recipe'
,
'softwaretype = slapos.recipe.softwaretype:Recipe'
,
'siptester = slapos.recipe.siptester:SipTesterRecipe'
,
'simplelogger = slapos.recipe.simplelogger:Recipe'
,
...
...
slapos/recipe/symbolic_link.py
0 → 100644
View file @
bcd47114
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
os
import
logging
class
Recipe
:
def
__init__
(
self
,
buildout
,
name
,
options
):
self
.
buildout
=
buildout
self
.
name
=
name
self
.
options
=
options
self
.
logger
=
logging
.
getLogger
(
self
.
name
)
def
install
(
self
):
"""
Links binaries to instance's bin directory for easier exposal
"""
path_list
=
[]
target_directory
=
self
.
options
[
'target-directory'
]
for
linkline
in
self
.
options
[
'link-binary'
].
split
():
path
,
linkname
=
os
.
path
.
split
(
linkline
)
link
=
os
.
path
.
join
(
target_directory
,
linkname
)
if
os
.
path
.
lexists
(
link
):
if
not
os
.
path
.
islink
(
link
):
raise
zc
.
buildout
.
UserError
(
'Target link already %r exists but it is not link'
%
link
)
os
.
unlink
(
link
)
os
.
symlink
(
linkline
,
link
)
self
.
logger
.
debug
(
'Created link %r -> %r'
%
(
link
,
linkline
))
path_list
.
append
(
link
)
return
path_list
software/erp5/instance-mariadb.cfg
View file @
bcd47114
...
...
@@ -7,6 +7,7 @@ parts =
cron
cron-entry-logrotate
cron-entry-mariadb-backup
binary-link
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
...
@@ -119,6 +120,19 @@ name = mariadb-backup
frequency = 0 0 * * *
command = $${mariadb-instance:backup-script}
[binary-link]
recipe = slapos.cookbook:symbolic.link
target-directory = $${rootdirectory:bin}
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
${coreutils:location}/bin/cp
${coreutils:location}/bin/ls
${coreutils:location}/bin/tr
${coreutils:location}/bin/uname
${grep:location}/bin/grep
${sed:location}/bin/sed
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
...
...
software/erp5/software.cfg
View file @
bcd47114
...
...
@@ -23,7 +23,7 @@ unzip = true
[template-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
md5sum =
02bac3aec28226f4e7c2398bd454e8a8
md5sum =
a0b2cb56d0fe7ad125b7e9fbc6036e1b
output = ${buildout:directory}/template-mariadb.cfg
mode = 0644
...
...
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