Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Alain Takoudjou
slapos.package
Commits
0c49ae23
Commit
0c49ae23
authored
Sep 09, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments in the configure scripts
parent
a033b119
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
34 deletions
+85
-34
windows/scripts/slapos-build-installer
windows/scripts/slapos-build-installer
+52
-34
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+13
-0
windows/scripts/slapos-cygwin-bootstrap.sh
windows/scripts/slapos-cygwin-bootstrap.sh
+20
-0
No files found.
windows/scripts/slapos-build-installer
View file @
0c49ae23
...
...
@@ -2,7 +2,7 @@
#
# This script is used to build slapos installer of windows. It's running
# only in the SlapOS Cygwin bootstrap node. The directory structures of
# bootstrap node looks like:
# bootstrap node looks like
in the install path
:
#
# ./cygwin-packages Cygwin local packages
# ./setup.exe Cygwin setup file
...
...
@@ -11,6 +11,9 @@
# In the cygwin bootstrap node, the following files are required:
#
# /opt/inno-setup
# /opt/images
# /opt/openvpn/bin
# /opt/openvpn/driver
# Microsoft Visual C++ 2008 Express Edition or later version
# Microsoft Windows SDK v7.0 if you're in 64-bits environments
#
...
...
@@ -18,11 +21,21 @@
# slapos node:
#
# ./build-slapos.sh /opt/buildout
#
#
# Then
#
# ./slapos-build-installer /opt/buildout
#
# The parameter /opt/buildout is the root path used to run buildout slapos.
#
# In this script, it will do:
#
# * Prepare the sources required by installer
#
# * pull slapos.package.git branch cygwin: /opt/git/slapos.package
# * pull re6stnet.git branch cygwin: /opt/git/re6stnet
# *
#
# * Build ipwin/regpwd/ovpn-server/ovpn-client
#
# * Make installer
...
...
@@ -90,20 +103,50 @@ declare -r cygwin_home=$(cygpath -m $(cygpath -w /)\\.. | sed -e "s%/$%%")
declare
-r
ISCC
=
$(
cyypath
-m
/opt/inno-setup/ISCC.exe
)
declare
-r
slapos_path
=
${
1
:-
/opt/buildout
}
# -----------------------------------------------------------
# Build slapos
# -----------------------------------------------------------
slapos_buildout
${
slapos_path
}
${
slapos_url
}
# ======================================================================
# Sanity check
# ======================================================================
[[
-d
${
slapos_path
}
/slapos
]]
&&
csih_error
"No slapos found in
${
slapos_path
}
/slapos, you need run buildouut first"
if
[[
!
-d
/opt/images
]]
;
then
_filename
=
~/images.tar.gz
[[
-f
${
_filename
}
]]
||
wget
-c
http://www.dashingsoft.com/products/slapos/images.tar.gz
-O
${
_filename
}
||
csih_error
"download
${
_filename
}
failed"
csih_inform
"Got
${
_filename
}
"
csih_inform
"extracting
${
_filename
}
..."
(
cd
/opt
;
tar
xzf
${
_filename
}
--no-same-owner
)
||
csih_error
"extract
${
_filename
}
failed"
fi
(
cd
${
slapos_path
}
;
tar
czf slapos.tar.gz slapos/
;
mv
slapos.tar.gz /opt/slapos
)
||
csih_error
"create slapos.tar.gz failed"
csih_inform
"tar package /opt/slapos/slapos.tar.gz generated"
if
[[
!
-d
/opt/openvpn
]]
;
then
_filename
=
~/openvpn-driver.tar.gz
if
check_os_is_wow64
;
then
_url
=
http://www.dashingsoft.com/products/slapos/openvpn-x64.tar.gz
else
_url
=
http://www.dashingsoft.com/products/slapos/openvpn-x86.tar.gz
fi
wget
-c
${
_url
}
-O
${
_filename
}
||
csih_error_multi
"download
${
_filename
}
failed"
" from
${
_url
}
"
csih_inform
"Got
${
_filename
}
"
csih_inform
" from
${
_url
}
"
csih_inform
"extracting
${
_filename
}
..."
(
cd
/opt
;
tar
xzf
${
_filename
}
--no-same-owner
)
||
csih_error
"extract
${
_filename
}
failed"
fi
# -----------------------------------------------------------
# Prepare the sources used to build installer
# -----------------------------------------------------------
csih_inform
"Preparing the sources used to build installer ..."
(
cd
${
slapos_path
}
;
tar
czf slapos.tar.gz slapos/
;
mv
slapos.tar.gz /opt/slapos
)
||
csih_error
"create slapos.tar.gz failed"
csih_inform
"tar package /opt/slapos/slapos.tar.gz generated"
_filename
=
/opt/slapos/slapos.cfg.example
[[
-f
${
_filename
}
]]
||
wget
-c
http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/slapos.cfg.example
-O
${
_filename
}
||
...
...
@@ -136,21 +179,6 @@ _filename=/opt/git/slapos.package/windows/scripts/regpwd.exe
csih_error
"make regpwd.exe failed"
csih_inform
"make regpwd.exe"
_filename
=
~/openvpn-driver.tar.gz
if
check_os_is_wow64
;
then
_url
=
http://www.dashingsoft.com/products/slapos/openvpn-x64.tar.gz
else
_url
=
http://www.dashingsoft.com/products/slapos/openvpn-x86.tar.gz
fi
wget
-c
${
_url
}
-O
${
_filename
}
||
csih_error_multi
"download
${
_filename
}
failed"
" from
${
_url
}
"
csih_inform
"Got
${
_filename
}
"
csih_inform
" from
${
_url
}
"
csih_inform
"extracting
${
_filename
}
..."
(
cd
/opt
;
tar
xzf
${
_filename
}
--no-same-owner
)
||
csih_error
"extract
${
_filename
}
failed"
_filename
=
/opt/downloads/pyOpenSSL-0.13.tar.gz
[[
-f
${
_filename
}
]]
||
wget
-c
--no-check-certificate
https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.tar.gz#md5
=
767bca18a71178ca353dff9e10941929
-O
${
_filename
}
||
...
...
@@ -179,16 +207,6 @@ csih_inform "creating re6stnet source package ..."
(
cd
/opt/git/re6stnet
;
python setup.py sdist
)
||
csih_error
"create re6stnet source package failed"
_filename
=
~/images.tar.gz
[[
-f
${
_filename
}
]]
||
wget
-c
http://www.dashingsoft.com/products/slapos/images.tar.gz
-O
${
_filename
}
||
csih_error
"download
${
_filename
}
failed"
csih_inform
"Got
${
_filename
}
"
csih_inform
"extracting
${
_filename
}
..."
(
cd
/opt
;
tar
xzf
${
_filename
}
--no-same-owner
)
||
csih_error
"extract
${
_filename
}
failed"
_filename
=
/opt/git/slapos.package/windows/ipwin/ipwin/ipwin.exe
/opt/git/slapos.package/windows/ipwin/ipwin/build.bat
"batch"
||
csih_error
"build ipwin.exe failed"
...
...
windows/scripts/slapos-configure.sh
View file @
0c49ae23
...
...
@@ -25,6 +25,19 @@
#
# * test-agent: Create test-agent instance in this node.
#
# The use cases of slapos-configure.sh:
#
# 1. Configure slapos node after you have run slapos-cygwin-bootstrap.sh
#
# ./slapos-configure.sh
#
# 2. Create slap-runner in your slapos node.
#
# ./slapos-configure.sh slap-runner
#
# You can run many times until it return OK.
#
#
source
$(
/usr/bin/dirname
$0
)
/slapos-include.sh
# ======================================================================
...
...
windows/scripts/slapos-cygwin-bootstrap.sh
View file @
0c49ae23
#! /bin/bash
#
# This script need root rights. Before run it, make sure you have root
# right. In Windows 7 and later,, you can start terminal by clicking
# Run as Administrator, then run this script in this terminal.
#
# Generally, run this script after install cygwin. It will patch
# cygwin and install slapos-cygwin so that cygwin can work with slapos
# node, the main actions include:
#
# * Patch cygwin self packages, for example, libtool, cygport etc.
#
# * Install slapos-cygwin package, for example, ip, ipwin, regpwd
# etc. These commands are required by slapos node, but not
# included in the official cygwin.
#
# * Check and install IPv6 protocol.
#
# * Set slapos node prefix. When there are many slapos nodes in
# one same machine, we need a prefix to tell them. In this
# script, it will set prefix by modify slapos-include.sh
#
export
PATH
=
/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:
$PATH
if
!
source
/usr/share/csih/cygwin-service-installation-helper.sh
;
then
echo
"Error: Missing csih package."
...
...
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