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
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
13f2e6f7
Commit
13f2e6f7
authored
Aug 20, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
obs/slapos: reorganise files and clean up.
parent
8f11bc50
Pipeline
#1513
skipped
Changes
32
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
131 additions
and
18 deletions
+131
-18
obs/slapos/debian/README.Debian
obs/slapos/debian/README.Debian
+0
-0
obs/slapos/debian/changelog
obs/slapos/debian/changelog
+0
-0
obs/slapos/debian/config
obs/slapos/debian/config
+0
-0
obs/slapos/debian/control
obs/slapos/debian/control
+0
-0
obs/slapos/debian/copyright
obs/slapos/debian/copyright
+0
-0
obs/slapos/debian/cron.d
obs/slapos/debian/cron.d
+19
-0
obs/slapos/debian/dirs
obs/slapos/debian/dirs
+0
-0
obs/slapos/debian/docs
obs/slapos/debian/docs
+0
-0
obs/slapos/debian/examples
obs/slapos/debian/examples
+0
-0
obs/slapos/debian/po/POTFILES.in
obs/slapos/debian/po/POTFILES.in
+0
-0
obs/slapos/debian/po/cs.po
obs/slapos/debian/po/cs.po
+0
-0
obs/slapos/debian/po/da.po
obs/slapos/debian/po/da.po
+0
-0
obs/slapos/debian/po/de.po
obs/slapos/debian/po/de.po
+0
-0
obs/slapos/debian/po/es.po
obs/slapos/debian/po/es.po
+0
-0
obs/slapos/debian/po/fr.po
obs/slapos/debian/po/fr.po
+0
-0
obs/slapos/debian/po/ja.po
obs/slapos/debian/po/ja.po
+0
-0
obs/slapos/debian/po/nl.po
obs/slapos/debian/po/nl.po
+0
-0
obs/slapos/debian/po/pt.po
obs/slapos/debian/po/pt.po
+0
-0
obs/slapos/debian/po/ru.po
obs/slapos/debian/po/ru.po
+0
-0
obs/slapos/debian/po/sv.po
obs/slapos/debian/po/sv.po
+0
-0
obs/slapos/debian/po/templates.pot
obs/slapos/debian/po/templates.pot
+0
-0
obs/slapos/debian/postinst
obs/slapos/debian/postinst
+0
-0
obs/slapos/debian/postrm
obs/slapos/debian/postrm
+0
-0
obs/slapos/debian/preinst
obs/slapos/debian/preinst
+0
-0
obs/slapos/debian/prerm
obs/slapos/debian/prerm
+0
-0
obs/slapos/debian/rules
obs/slapos/debian/rules
+0
-0
obs/slapos/debian/slapos-node.logrotate
obs/slapos/debian/slapos-node.logrotate
+44
-0
obs/slapos/debian/slapos.cfg
obs/slapos/debian/slapos.cfg
+0
-0
obs/slapos/debian/source/format
obs/slapos/debian/source/format
+0
-0
obs/slapos/debian/templates
obs/slapos/debian/templates
+0
-0
obs/slapos/prepare_download_cache.sh
obs/slapos/prepare_download_cache.sh
+57
-0
obs/slapos/prepare_slapos_build.sh
obs/slapos/prepare_slapos_build.sh
+11
-18
No files found.
obs/slapos/
templates/
debian/README.Debian
→
obs/slapos/debian/README.Debian
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/changelog
→
obs/slapos/debian/changelog
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/config
→
obs/slapos/debian/config
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/control
→
obs/slapos/debian/control
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/copyright
→
obs/slapos/debian/copyright
View file @
13f2e6f7
File moved
obs/slapos/debian/cron.d
0 → 100644
View file @
13f2e6f7
SHELL
=/
bin
/
sh
PATH
=/
usr
/
bin
:/
usr
/
sbin
:/
sbin
:/
bin
MAILTO
=
""
#
Run
"Installation/Destruction of Software Releases"
and
"Deploy/Start/Stop Partitions"
once
per
minute
*
*
*
*
*
root
/
opt
/
slapos
/
bin
/
slapos
node
software
--
maximal_delay
=
30
--
verbose
--
logfile
=/
opt
/
slapos
/
log
/
slapos
-
node
-
software
.
log
>
/
dev
/
null
2
>&
1
*
*
*
*
*
root
/
opt
/
slapos
/
bin
/
slapos
node
instance
--
maximal_delay
=
20
--
promise
-
timeout
20
--
verbose
--
logfile
=/
opt
/
slapos
/
log
/
slapos
-
node
-
instance
.
log
>
/
dev
/
null
2
>&
1
#
Run
"Destroy Partitions to be destroyed"
once
per
hour
0
*
*
*
*
root
/
opt
/
slapos
/
bin
/
slapos
node
report
--
maximal_delay
=
3600
--
verbose
--
logfile
=/
opt
/
slapos
/
log
/
slapos
-
node
-
report
.
log
>
/
dev
/
null
2
>&
1
#
Run
"Check/add IPs and so on"
once
per
hour
0
*
*
*
*
root
/
opt
/
slapos
/
bin
/
slapos
node
format
>>
/
opt
/
slapos
/
log
/
slapos
-
node
-
format
.
log
2
>&
1
#
Run
"Booting"
on
every
system
start
@reboot
root
/
opt
/
slapos
/
bin
/
slapos
node
boot
>>
/
opt
/
slapos
/
log
/
slapos
-
node
-
format
.
log
2
>&
1
#
Run
"Collect"
once
a
minute
*
*
*
*
*
root
/
opt
/
slapos
/
bin
/
slapos
node
collect
>>
/
opt
/
slapos
/
log
/
slapos
-
node
-
collect
.
log
2
>&
1
obs/slapos/
templates/
debian/dirs
→
obs/slapos/debian/dirs
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/docs
→
obs/slapos/debian/docs
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/examples
→
obs/slapos/debian/examples
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/POTFILES.in
→
obs/slapos/debian/po/POTFILES.in
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/cs.po
→
obs/slapos/debian/po/cs.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/da.po
→
obs/slapos/debian/po/da.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/de.po
→
obs/slapos/debian/po/de.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/es.po
→
obs/slapos/debian/po/es.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/fr.po
→
obs/slapos/debian/po/fr.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/ja.po
→
obs/slapos/debian/po/ja.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/nl.po
→
obs/slapos/debian/po/nl.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/pt.po
→
obs/slapos/debian/po/pt.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/ru.po
→
obs/slapos/debian/po/ru.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/sv.po
→
obs/slapos/debian/po/sv.po
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/po/templates.pot
→
obs/slapos/debian/po/templates.pot
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/postinst
→
obs/slapos/debian/postinst
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/postrm
→
obs/slapos/debian/postrm
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/preinst
→
obs/slapos/debian/preinst
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/prerm
→
obs/slapos/debian/prerm
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/rules
→
obs/slapos/debian/rules
View file @
13f2e6f7
File moved
obs/slapos/debian/slapos-node.logrotate
0 → 100644
View file @
13f2e6f7
# Generated by SlapOS. Assumes that slapos is installed in default location.
/opt/slapos/log/slapos-node-software.log /opt/slapos/log/slapos-node-instance.log /opt/slapos/log/slapos-node-report.log {
nocompress
dateext
daily
rotate 14
missingok
notifempty
create 640 root root
sharedscripts
}
/opt/slapos/log/slapos-node-collect.log {
nocompress
dateext
daily
rotate 14
missingok
notifempty
create 640 root root
sharedscripts
}
/opt/slapos/log/slapos-node-format.log {
nocompress
dateext
daily
rotate 100
missingok
notifempty
create 640 root root
sharedscripts
}
/srv/slapgrid/*/.slapgrid/log/instance.log {
compress
dateext
daily
rotate 30
missingok
notifempty
sharedscripts
}
obs/slapos/
templates/
debian/slapos.cfg
→
obs/slapos/debian/slapos.cfg
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/source/format
→
obs/slapos/debian/source/format
View file @
13f2e6f7
File moved
obs/slapos/
templates/
debian/templates
→
obs/slapos/debian/templates
View file @
13f2e6f7
File moved
obs/slapos/
templates/offline.sh.in
→
obs/slapos/
prepare_download_cache.sh
View file @
13f2e6f7
#!/bin/bash
VERSION
=
%VERSION%
RECIPE_VERSION
=
%RECIPE_VERSION%
BUILDOUT_URL
=
%BUILDOUT_URL%
VERSION
=
$1
RECIPE_VERSION
=
$3
BUILDOUT_URL
=
$2
TARGET_DIRECTORY
=
/opt/slapos
BUILD_ROOT_DIRECTORY
=
"
$(
pwd
)
/build"
BUILD_DIRECTORY
=
$BUILD_ROOT_DIRECTORY$TARGET_DIRECTORY
BOOTSTRAP_URL
=
'https://bootstrap.pypa.io/bootstrap-buildout.py'
#./configure --prefix=/opt/slapos/parts/<NAME>
...
...
@@ -15,9 +14,7 @@ echo "Preparing source tarball (recipe version: $RECIPE_VERSION)"
echo
" Build Directory:
$BUILD_DIRECTORY
"
echo
" Buildroot Directory:
$BUILD_ROOT_DIRECTORY
"
mkdir
-p
$BUILD_DIRECTORY
mkdir
$BUILD_DIRECTORY
/extends-cache
mkdir
$BUILD_DIRECTORY
/download-cache
mkdir
-p
$BUILD_DIRECTORY
/
{
extends-cache,download-cache
}
set
-e
...
...
@@ -27,47 +24,34 @@ sed "s!\%BUILDOUT_URL\%!$BUILDOUT_URL!g;s/\%RECIPE_VERSION\%/$RECIPE_VERSION/g;
# Build first time to get download-cache and extends-cache ready
cd
$BUILD_DIRECTORY
wget
$BOOTSTRAP_URL
--no-check-certificate
-O
bootstrap.py
(
python
-S
bootstrap.py
--buildout-version
2.5.1.post2
--setuptools-to-dir
eggs
-f
http://www.nexedi.org/static/packages/source/
-f
http://www.nexedi.org/static/packages/source/slapos.buildout/
&&
cat
./bin/buildout
>
/tmp/test
&&
\
./bin/buildout
)
||
(
echo
"Failed to run buildout, exiting."
&&
exit
1
)
cd
$BUILD_ROOT_DIRECTORY
/..
wget https://bootstrap.pypa.io/bootstrap-buildout.py
--no-check-certificate
-O
bootstrap.py
(
python
-S
bootstrap.py
--buildout-version
2.5.1.post2
--setuptools-to-dir
eggs
-f
http://www.nexedi.org/static/packages/source/
-f
http://www.nexedi.org/static/packages/source/slapos.buildout/
&&
\
./bin/buildout
)
||
(
echo
"Failed to run buildout, exiting."
)
./bin/buildout
||
(
echo
"Failed to run buildout, exiting."
&&
exit
1
)
# remove all files from build keeping only caches
echo
"Deleting unecessary files to reduce source tarball size"
# TODO: Figure out why there is no write permission even for
# the owner
chmod
-R
u+w
$BUILD_DIRECTORY
# Buildout files
rm
-rfv
$BUILD_DIRECTORY
/downloads
chmod
-R
u+w
.
rm
-fv
$BUILD_DIRECTORY
/bootstrap.py
$BUILD_DIRECTORY
/buildout.cfg
\
$BUILD_DIRECTORY
/.installed.cfg
\
$BUILD_DIRECTORY
/environment.
*
cp
-R
eggs/slapos.rebootstrap
*
$BUILD_ROOT_DIRECTORY
/..
rm
-rfv
$BUILD_DIRECTORY
/parts/
rm
-rfv
$BUILD_DIRECTORY
/eggs/
rm
-rfv
$BUILD_DIRECTORY
/develop-eggs/
rm
-rfv
$BUILD_DIRECTORY
/bin
rm
-fv
.installed.cfg environment.
*
rm
-rfv
./
{
downloads,parts,eggs,develop-eggs,bin,rebootstrap
}
# Removing empty directories
find
$BUILD_DIRECTORY
-type
d
-empty
-prune
-exec
rmdir
'{}'
';'
# Prepare buildout
sed
"s!
\%
BUILDOUT_URL
\%
!
$BUILDOUT_URL
!g;s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s|
\%
PATCHES_DIRECTORY
\%
|
$PATCHES_DIRECTORY
|g;s|
\%
TARGET_DIRECTORY
\%
|
$TARGET_DIRECTORY
|g;s|
\%
BUILD_ROOT_DIRECTORY
\%
|
$BUILD_ROOT_DIRECTORY
|g;s|
\%
BUILD_DIRECTORY
\%
|
$BUILD_DIRECTORY
|g"
$BUILD_ROOT_DIRECTORY
/../buildout.cfg.in
>
$BUILD_DIRECTORY
/buildout.cfg
find
.
-type
d
-empty
-prune
-exec
rmdir
'{}'
';'
cd
$BUILD_DIRECTORY
&&
\
wget
$BOOTSTRAP_URL
--no-check-certificate
-O
bootstrap.py
&&
\
python
-S
bootstrap.py
python
-S
bootstrap.py
--buildout-version
2.5.1.post2
--setuptools-to-dir
eggs
-f
http://www.nexedi.org/static/packages/source/
-f
http://www.nexedi.org/static/packages/source/slapos.buildout/
cp
-R
$BUILD_ROOT_DIRECTORY
/../slapos.rebootstrap
*
eggs
# Removing Python byte-compiled files (as it will be done upon
# package installation) and static libraries
find
$BUILD_DIRECTORY
-regextype
posix-extended
-type
f
\
find
.
-regextype
posix-extended
-type
f
\
-iregex
'.*/*\.(py[co]|[l]?a|exe|bat)$$'
-exec
rm
-fv
'{}'
';'
obs/slapos/prepare_slapos_build.sh
View file @
13f2e6f7
...
...
@@ -3,20 +3,13 @@
# Edit for release
VERSION
=
1.3.15
# Edit for release
RECIPE_VERSION
=
1.0.
20
RECIPE_VERSION
=
1.0.
32
# Edit for release
RELEASE
=
4
GITHASH
=
81f31e29f0aeaef521fe827f43b767d82440bad7
RELEASE
=
7
CURRENT_DIRECTORY
=
"
$(
pwd
)
"
# Define URL to compile
BUILDOUT_URL
=
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-
$RECIPE_VERSION
:/component/slapos/buildout.cfg
OBS_DIRECTORY
=
$CURRENT_DIRECTORY
/home:VIFIBnexedi/SlapOS-Node
# Development Section [Uncomment for use]
# Development Section
OBS_DIRECTORY
=
$CURRENT_DIRECTORY
/home:VIFIBnexedi:branches:home:VIFIBnexedi/SlapOS-Node
BUILDOUT_URL
=
http://git.erp5.org/gitweb/slapos.git/blob_plain/
$GITHASH
:/component/slapos/buildout.cfg
VERSION_REGEX
=
"s!
\%
BUILDOUT_URL
\%
!
$BUILDOUT_URL
!g;s/
\%
RECIPE_VERSION
\%
/
$RECIPE_VERSION
/g;s/
\%
VERSION
\%
/
$VERSION
/g;s/
\%
RELEASE
\%
/
$RELEASE
/g"
TEMPLATES_DIRECTORY
=
$CURRENT_DIRECTORY
/templates
...
...
@@ -32,15 +25,16 @@ function prepare_template_files
mkdir
-p
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
cp
-rf
$CURRENT_DIRECTORY
/
$SLAPOS_ORGINAL_DIRECTORY
/
*
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
rm
-rf
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
/slapos/slapos_repository
cp
-R
slapos_repository
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
/slapos/
sed
$VERSION_REGEX
$TEMPLATES_DIRECTORY
/Makefile.in
>
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
/slapos/Makefile
sed
$VERSION_REGEX
$TEMPLATES_DIRECTORY
/offline.sh.in
>
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
/slapos/offline.sh
}
function
prepare_download_cache
{
cd
$CURRENT_DIRECTORY
/
$SLAPOS_DIRECTORY
/slapos/
rm
-rf
build/
bash
offline.sh
||
(
echo
"Impossible to build SlapOS, exiting."
&&
exit
1
)
bash
$CURRENT_DIRECTORY
/prepare_download_cache.sh
$VERSION
$BUILDOUT_URL
$RECIPE_VERSION
||
(
echo
"Impossible to build SlapOS, exiting."
&&
exit
1
)
# Go back to starting point
cd
$CURRENT_DIRECTORY
}
...
...
@@ -54,16 +48,15 @@ function prepare_deb_packaging
{
# Add entry to changelog
cd
$
TEMPLATES
_DIRECTORY
/debian
cd
$
CURRENT
_DIRECTORY
/debian
dch
-pm
-v
$VERSION
+
$RECIPE_VERSION
+
$RELEASE
--check-dirname-level
=
0
"New version of slapos (
$VERSION
+
$RECIPE_VERSION
+
$RELEASE
)"
# Add cron and logrotate files
cp
$CURRENT_DIRECTORY
/
$SLAPOS_ORGINAL_DIRECTORY
/template/slapos-node.cron.d
$
TEMPLATES
_DIRECTORY
/debian/cron.d
cp
$CURRENT_DIRECTORY
/
$SLAPOS_ORGINAL_DIRECTORY
/template/slapos-node.logrotate
$
TEMPLATES
_DIRECTORY
/debian/slapos-node.logrotate
cd
$
TEMPLATES
_DIRECTORY
cp
$CURRENT_DIRECTORY
/
$SLAPOS_ORGINAL_DIRECTORY
/template/slapos-node.cron.d
$
CURRENT
_DIRECTORY
/debian/cron.d
cp
$CURRENT_DIRECTORY
/
$SLAPOS_ORGINAL_DIRECTORY
/template/slapos-node.logrotate
$
CURRENT
_DIRECTORY
/debian/slapos-node.logrotate
cd
$
CURRENT
_DIRECTORY
tar
-czf
debian.tar.gz debian
cd
$OBS_DIRECTORY
cp
$TEMPLATES_DIRECTORY
/debian.tar.gz
.
cp
$CURRENT_DIRECTORY
/debian.tar.gz
$OBS_DIRECTORY
}
function
obs_upload
...
...
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