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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.package
Commits
864e6c55
Commit
864e6c55
authored
Dec 26, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip re6st
parent
310fb474
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
937 additions
and
5 deletions
+937
-5
.gitignore
.gitignore
+3
-2
obs/re6st/README
obs/re6st/README
+11
-0
obs/re6st/prepare_re6st_build.sh
obs/re6st/prepare_re6st_build.sh
+109
-0
obs/re6st/re6st-node/Makefile
obs/re6st/re6st-node/Makefile
+21
-0
obs/re6st/re6st-node/daemon/README.conf
obs/re6st/re6st-node/daemon/README.conf
+10
-0
obs/re6st/re6st-node/daemon/logrotate.conf
obs/re6st/re6st-node/daemon/logrotate.conf
+9
-0
obs/re6st/re6st-node/daemon/network-manager
obs/re6st/re6st-node/daemon/network-manager
+61
-0
obs/re6st/re6st-node/daemon/re6st-registry.service
obs/re6st/re6st-node/daemon/re6st-registry.service
+11
-0
obs/re6st/re6st-node/daemon/re6stnet.service
obs/re6st/re6st-node/daemon/re6stnet.service
+13
-0
obs/re6st/re6st-node/re6stnet/buildout.cfg.in
obs/re6st/re6st-node/re6stnet/buildout.cfg.in
+61
-0
obs/re6st/templates/Makefile.in
obs/re6st/templates/Makefile.in
+155
-0
obs/re6st/templates/PKGBUILD.in
obs/re6st/templates/PKGBUILD.in
+23
-0
obs/re6st/templates/debian/changelog
obs/re6st/templates/debian/changelog
+5
-0
obs/re6st/templates/debian/compat
obs/re6st/templates/debian/compat
+1
-0
obs/re6st/templates/debian/control
obs/re6st/templates/debian/control
+13
-0
obs/re6st/templates/debian/copyright
obs/re6st/templates/debian/copyright
+20
-0
obs/re6st/templates/debian/postrm
obs/re6st/templates/debian/postrm
+10
-0
obs/re6st/templates/debian/re6stnet.init
obs/re6st/templates/debian/re6stnet.init
+123
-0
obs/re6st/templates/debian/rules
obs/re6st/templates/debian/rules
+86
-0
obs/re6st/templates/debian/source/format
obs/re6st/templates/debian/source/format
+1
-0
obs/re6st/templates/offline.sh.in
obs/re6st/templates/offline.sh.in
+72
-0
obs/re6st/templates/re6stnet.dsc.in
obs/re6st/templates/re6stnet.dsc.in
+12
-0
obs/re6st/templates/re6stnet.install
obs/re6st/templates/re6stnet.install
+35
-0
obs/re6st/templates/re6stnet.spec.in
obs/re6st/templates/re6stnet.spec.in
+56
-0
obs/slapos/prepare_slapos_build.sh
obs/slapos/prepare_slapos_build.sh
+2
-2
obs/slapos/slapos-node/slapos/buildout.cfg.in
obs/slapos/slapos-node/slapos/buildout.cfg.in
+2
-1
obs/slapos/templates/debian/changelog
obs/slapos/templates/debian/changelog
+12
-0
No files found.
.gitignore
View file @
864e6c55
obs/
slapos
/home:VIFIBnexedi*
obs/
*
/home:VIFIBnexedi*
obs/slapos/slapos-node_*
obs/slapos/slapos-recipe-version
obs/slapos/slapos-version
obs/slapos/templates/debian.tar.gz
obs/re6st/re6st-node_*
obs/*/templates/debian.tar.gz
obs/slapos/templates/debian/cron.d
obs/slapos/templates/debian/slapos-node.logrotate
debian-preseed/*.iso
...
...
obs/re6st/README
0 → 100644
View file @
864e6c55
preparing the package
---------------------
First make sure all files are ready and you have all necessary packages installed.
You need in particular an OBS directory (for example, the vifib test directory)::
$ cd <directory_to_contain_prepare_script>
$ osc checkout home:VIFIBnexedi:branches:home:VIFIBnexedi/Re6stnet
$ cd home:VIFIBnexedi:branches:home:VIFIBnexedi/Re6stnet
$ osc up
obs/re6st/prepare_re6st_build.sh
0 → 100644
View file @
864e6c55
#!/bin/sh -e
# Edit for release
VERSION
=
0.426
# Edit for release
RECIPE_VERSION
=
0.265
# Edit for release
RELEASE
=
2
GITHASH
=
1ddbb2be20b224e7618bd7904bf846fd947b8b16
CURRENT_DIRECTORY
=
"
$(
pwd
)
"
# Define URL to compile
BUILDOUT_URL
=
http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-
$RECIPE_VERSION
:/component/re6stnet/buildout.cfg
OBS_DIRECTORY
=
$CURRENT_DIRECTORY
/home:VIFIBnexedi/Re6stnet
# Development Section [Uncomment for use]
OBS_DIRECTORY
=
$CURRENT_DIRECTORY
/home:VIFIBnexedi:branches:home:VIFIBnexedi/Re6stnet
BUILDOUT_URL
=
http://git.erp5.org/gitweb/slapos.git/blob_plain/
$GITHASH
:/component/re6stnet/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
RE6ST_ORGINAL_DIRECTORY
=
re6st-node
RE6ST_DIRECTORY
=
re6st-node_
$VERSION
+
$RECIPE_VERSION
+
$RELEASE
function
prepare_template_files
{
# Prepare directory for new version if needed
mkdir
-p
$CURRENT_DIRECTORY
/
$RE6ST_DIRECTORY
cp
-rf
$CURRENT_DIRECTORY
/
$RE6ST_ORGINAL_DIRECTORY
/
*
$CURRENT_DIRECTORY
/
$RE6ST_DIRECTORY
sed
$VERSION_REGEX
$TEMPLATES_DIRECTORY
/Makefile.in
>
$CURRENT_DIRECTORY
/
$RE6ST_DIRECTORY
/re6stnet/Makefile
sed
$VERSION_REGEX
$TEMPLATES_DIRECTORY
/offline.sh.in
>
$CURRENT_DIRECTORY
/
$RE6ST_DIRECTORY
/re6stnet/offline.sh
}
function
prepare_download_cache
{
cd
$CURRENT_DIRECTORY
/
$RE6ST_DIRECTORY
/re6stnet/
rm
-rf
build/
bash offline.sh
||
(
echo
"Impossible to build Re6stnet, exiting."
&&
exit
1
)
# Go back to starting point
cd
$CURRENT_DIRECTORY
}
function
prepare_tarball
{
tar
-czf
$RE6ST_DIRECTORY
.tar.gz
$RE6ST_DIRECTORY
}
function
prepare_deb_packaging
{
# Add entry to changelog
cd
$TEMPLATES_DIRECTORY
/debian
#dch -pm -v $VERSION+$RECIPE_VERSION+$RELEASE --check-dirname-level=0 "New version of re6st ($VERSION+$RECIPE_VERSION+$RELEASE)"
# Add cron and logrotate files
cd
$TEMPLATES_DIRECTORY
tar
-czf
debian.tar.gz debian
cd
$OBS_DIRECTORY
cp
$TEMPLATES_DIRECTORY
/debian.tar.gz
.
}
function
obs_upload
{
cd
$OBS_DIRECTORY
# Update directory
osc up
# Remove former configuration
osc
rm
-f
$RE6ST_ORGINAL_DIRECTORY
*
.tar.gz
osc
rm
-f
re6stnet.spec
# Prepare new tarball
cp
$CURRENT_DIRECTORY
/
$RE6ST_DIRECTORY
.tar.gz
.
osc add
$RE6ST_DIRECTORY
.tar.gz
# Prepare new specfile
sed
$VERSION_REGEX
$TEMPLATES_DIRECTORY
/re6stnet.spec.in
>
re6stnet.spec
osc add re6stnet.spec
# Prepare new .dsc file
osc
rm
-f
re6st
*
.dsc
sed
$VERSION_REGEX
$TEMPLATES_DIRECTORY
/re6stnet.dsc.in
>
$RE6ST_DIRECTORY
.dsc
osc add
$RE6ST_DIRECTORY
.dsc
osc
rm
-f
PKGBUILD
SOURCEMD5
=
`
md5sum
$RE6ST_DIRECTORY
.tar.gz |
cut
-d
\
-f1
`
sed
"
$VERSION_REGEX
;s/
\%
SOURCEMD5
\%
/
$SOURCEMD5
/g"
$TEMPLATES_DIRECTORY
/PKGBUILD.in
>
PKGBUILD
cp
$TEMPLATES_DIRECTORY
/re6stnet.install
.
osc add PKGBUILD re6stnet.install
## Upload new Package
osc commit
-m
"New Re6stnet Recipe
$RECIPE_VERSION
"
}
prepare_template_files
prepare_download_cache
prepare_tarball
prepare_deb_packaging
obs_upload
obs/re6st/re6st-node/Makefile
0 → 100644
View file @
864e6c55
#!/usr/bin/make -f
# -*- makefile -*-
build
:
cd
re6stnet
;
make build
all
:
build
install
:
all
cd
re6stnet
;
make
install
mkdir
-p
$(DESTDIR)
/usr/bin/
mkdir
-p
$(DESTDIR)
/usr/sbin/
cp
$(DESTDIR)
/opt/re6st/bin/re6st
*
$(DESTDIR)
/usr/bin/
mkdir
-p
$(DESTDIR)
/var/lib/re6stnet
mkdir
-p
$(DESTDIR)
/var/log/re6stnet
mkdir
-p
$(DESTDIR)
/etc/re6stnet
install
-Dpm
0644 daemon/README.conf
$(DESTDIR)
/etc/re6stnet/README
install
-Dp
daemon/network-manager
$(DESTDIR)
/etc/NetworkManager/dispatcher.d/50re6stnet
clean
:
# cd slapos; make clean
obs/re6st/re6st-node/daemon/README.conf
0 → 100644
View file @
864e6c55
re6stnet
configuration
files
re6stnet
is
started
automatically
if
/
etc
/
re6stnet
contains
a
're6stnet.conf'
file
with
all
parameters
to
pass
to
the
daemon
.
Same
for
the
registry
:
all
parameters
must
be
specified
in
're6st-registry.conf'
So
for
a
normal
node
,
you
should
have
the
following
files
:
re6stnet
.
conf
ca
.
crt
cert
.
crt
cert
.
key
dh2048
.
pem
And
if
you
also
host
the
registry
:
re6st
-
registry
.
conf
ca
.
key
obs/re6st/re6st-node/daemon/logrotate.conf
0 → 100644
View file @
864e6c55
/
var
/
log
/
re6stnet
/
babeld
.
log
{
compress
delaycompress
missingok
notifempty
postrotate
[ -
r
/
var
/
run
/
re6st
-
babeld
.
pid
] &&
kill
-
USR2
$(
cat
/
var
/
run
/
re6st
-
babeld
.
pid
)
endscript
}
obs/re6st/re6st-node/daemon/network-manager
0 → 100755
View file @
864e6c55
#!/usr/bin/python -S
import
errno
,
glob
,
os
,
signal
,
socket
,
subprocess
,
sys
,
time
DAEMON
=
"re6stnet"
CONFDIR
=
"/etc/re6stnet"
os
.
environ
[
"PATH"
]
=
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
iface
=
sys
.
argv
[
1
]
action
=
sys
.
argv
[
2
]
lock_name
=
DAEMON
+
':'
+
iface
if
action
in
(
"up"
,
"vpn-up"
):
os
.
chdir
(
CONFDIR
)
if
os
.
path
.
exists
(
"re6stnet.conf"
)
and
not
subprocess
.
call
(
(
DAEMON
,
"@re6stnet.conf"
,
"--test"
,
"main_interface != %r"
%
iface
)):
s
=
socket
.
socket
(
socket
.
AF_UNIX
,
socket
.
SOCK_DGRAM
)
try
:
s
.
bind
(
'
\
0
'
+
lock_name
)
except
socket
.
error
,
e
:
if
e
[
0
]
!=
errno
.
EADDRINUSE
:
raise
sys
.
stderr
.
write
(
"daemon already started
\
n
"
)
sys
.
exit
()
if
not
os
.
fork
():
os
.
setsid
()
os
.
execlp
(
DAEMON
,
DAEMON
,
"@re6stnet.conf"
)
elif
action
in
(
"down"
,
"vpn-down"
):
pattern
=
" @%s
\
n
"
%
lock_name
with
open
(
"/proc/net/unix"
)
as
f
:
for
line
in
f
:
if
line
.
endswith
(
pattern
):
sock_path
=
"socket:[%s]"
%
line
.
split
()[
-
2
]
break
else
:
sys
.
exit
()
pattern
=
"(%s)"
%
DAEMON
for
path
in
glob
.
glob
(
"/proc/*/stat"
):
try
:
pid
=
int
(
path
[
6
:
-
5
])
with
open
(
path
)
as
f
:
stat
=
f
.
read
().
split
()
if
stat
[
1
]
==
pattern
and
sock_path
in
(
os
.
readlink
(
path
)
for
path
in
glob
.
glob
(
path
[:
-
4
]
+
"fd/*"
)):
break
except
(
EnvironmentError
,
ValueError
):
pass
else
:
sys
.
exit
()
try
:
os
.
kill
(
pid
,
signal
.
SIGTERM
)
sleep
=
.
1
while
sleep
<
5
:
time
.
sleep
(
sleep
)
os
.
kill
(
pid
,
0
)
sleep
*=
1.5
# we waited for about 11 seconds
os
.
kill
(
-
int
(
stat
[
4
]),
signal
.
SIGKILL
)
except
OSError
,
e
:
if
e
.
errno
!=
errno
.
ESRCH
:
raise
obs/re6st/re6st-node/daemon/re6st-registry.service
0 → 100644
View file @
864e6c55
[Unit]
Description=Server application for re6snet
ConditionPathExists=/etc/re6stnet/re6st-registry.conf
[Service]
WorkingDirectory=/etc/re6stnet
ExecStart=/usr/bin/env re6st-registry @re6st-registry.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
obs/re6st/re6st-node/daemon/re6stnet.service
0 → 100644
View file @
864e6c55
[Unit]
Description=Resilient, Scalable, IPv6 Network application
ConditionPathExists=/etc/re6stnet/re6stnet.conf
[Service]
WorkingDirectory=/etc/re6stnet
# systemd plans to "introduce ExecCondition= in services" (cf its TODO file)
ExecStart=/bin/sh -c 'set re6stnet @re6stnet.conf; "$@" --test main_interface==\"lo\" || exec "$@"'
Restart=on-failure
StandardOutput=null
[Install]
WantedBy=multi-user.target
obs/re6st/re6st-node/re6stnet/buildout.cfg.in
0 → 100644
View file @
864e6c55
[buildout]
extends =
%BUILDOUT_URL%
# Don't load extensions
extensions =
extends-cache = extends-cache
download-cache = download-cache
develop =
parts =
babeld
re6stnet
# Uguu, upstream buildout.cfg must be patched as it works the other way
# around from a packager point of view at least, thus at the end static
# path, such as Python HOME directory, are wrong...
#
# Currently:
# ./configure --prefix=BUILD_DIRECTORY && make install
# Instead of:
# ./configure --prefix=INSTALL_DIRECTORY && make install DESTDIR=BUILD_DIRECTORY
[python2.7]
configure-options +=
--prefix=%TARGET_DIRECTORY%/parts/${:_buildout_section_name_}
environment +=
DESTDIR=%BUILD_ROOT_DIRECTORY%
[gettext]
# Add gettext library path to RPATH as its binaries are used to build
# glib for example
environment =
PATH=${perl:location}/bin:${lunzip:location}/bin:%(PATH)s
CPPFLAGS=-I${libxml2:location}/include -I${zlib:location}/include -I${ncurses:location}/include
LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=%BUILD_DIRECTORY%/parts/${:_buildout_section_name_}/lib
[bison]
configure-options +=
--prefix=%TARGET_DIRECTORY%/parts/${:_buildout_section_name_}
make-options +=
DESTDIR=%BUILD_ROOT_DIRECTORY%
[python-cryptography-prep]
recipe = zc.recipe.egg
eggs =
${python-cffi:egg}
enum34
pycparser
six
pyasn1
[re6stnet]
entry-points =
re6stnet=re6st.re6stnet:main
re6st-conf=re6st.re6stconf:main
re6st-registry=re6st.re6stregistry:main
[versions]
re6stnet = 0.426
obs/re6st/templates/Makefile.in
0 → 100755
View file @
864e6c55
#!/usr/bin/make -f
# -*- makefile -*-
VERSION
=
%VERSION%
RECIPE_VERSION
=
%RECIPE_VERSION%
PY
=
$(PYTHON)
INSTALL_DIRECTORY
=
$(DESTDIR)
/opt/re6st
TARGET_DIRECTORY
=
/opt/re6st
BUILD_ROOT_DIRECTORY
:=
$(
shell
pwd
)
/build
BUILD_DIRECTORY
:=
$(BUILD_ROOT_DIRECTORY)$(TARGET_DIRECTORY)
PATCHES_DIRECTORY
:=
$(
shell
pwd
)
/patches
#Use to get path of buildout correct
ORIGINAL_DIRECTORY
:=
$(
shell
cat
./original_directory
)
BOOTSTRAP_URL
:=
'http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py?rev=127518'
build
:
build-stamp
build-stamp
:
@echo
"Fixing buildout path to $(BUILD_ROOT_DIRECTORY) rather than $(ORIGINAL_DIRECTORY) for buildout"
grep
-rIl
'$(ORIGINAL_DIRECTORY)'
$(BUILD_ROOT_DIRECTORY)
2>
/dev/null
|
\
xargs
sed
-i
's#$(ORIGINAL_DIRECTORY)#$(BUILD_ROOT_DIRECTORY)#g'
||
\
echo
"No path to fix."
@echo 'Preparing source tarball (recipe version
:
$(RECIPE_VERSION))'
cd
$(BUILD_DIRECTORY)
&&
\
$(PY)
./bin/buildout
-v
@touch
build-stamp
cleanup-build
:
cleanup-build-stamp
cleanup-build-stamp
:
build
@
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
rm
-fv
$(BUILD_DIRECTORY)/bootstrap.py
$(BUILD_DIRECTORY)/buildout.cfg
\
$(BUILD_DIRECTORY)/bin/buildout
$(BUILD_DIRECTORY)/.installed.cfg
\
$(BUILD_DIRECTORY)/environment.*
rm
-rfv
$(BUILD_DIRECTORY)/parts/*-patch-download/
\
$(BUILD_DIRECTORY)/parts/*-hooks-download/
rm
-rfv
$(BUILD_DIRECTORY)/extends-cache/
\
$(BUILD_DIRECTORY)/download-cache/
# Removing locales, terminfo and base_completion.d directories
find
$(BUILD_DIRECTORY)
-type
d
\
\(
-name
locale
-o
-name
terminfo
-o
-name
bash_completion.d
\)
\
-prune
-exec
rm
-rfv
'{}'
';'
rm
-rf
$(BUILD_DIRECTORY)/parts/glib/share/glib-2.0/gdb/
\
$(BUILD_DIRECTORY)/parts/glib/share/gdb
rm
-rf
$(BUILD_DIRECTORY)/parts/ncurses/lib/terminfo
# Removing gettext archive tarball containing all versions
rm
-fv
$(BUILD_DIRECTORY)/parts/gettext/share/gettext/archive.dir.tar.gz
# Removing documentations
find
$(BUILD_DIRECTORY)/parts
-regextype
posix-extended
-type
d
\
-iregex
'.*/(gtk-)?(doc[s]?|man|info|test[s]?)$$'
\
-prune
-exec
rm
-rfv
'{}'
';'
find
$(BUILD_DIRECTORY)
-regextype
posix-extended
-type
f
\
-iregex
'.*(COPYING|LICENSE).*'
-exec
rm
-f
'{}'
';'
# Removing include directories
find
$(BUILD_DIRECTORY)
-type
d
\(
-name
include
-o -name pkgconfig \) | \
grep
-v
python
|
xargs
rm
-rfv
find
$(BUILD_DIRECTORY)
-type
f
-executable
-name
'*-config'
|
\
grep
-v
python
|
xargs
rm
-fv
# Removing Python byte-compiled files (as it will be done upon
# package installation) and static libraries
find
$(BUILD_DIRECTORY)
-regextype
posix-extended
-type
f
\
-iregex
'.*/*\.(py[co]|[l]?a|exe|bat)$$'
-exec
rm
-fv
'{}'
';'
# Removing empty directories
find
$(BUILD_DIRECTORY)
-type
d
-empty
-prune
-exec
rmdir
'{}'
';'
@touch
cleanup-build-stamp
strip-binaries
:
strip-binaries-stamp
strip-binaries-stamp
:
build
set
-e
;
\
for
f
in
`
find
$(BUILD_DIRECTORY)
-type
f
-executable
!
-name
'*.so*'
`
;
do
\
if
file
$$
f |
grep
-Eq
'.*ELF.*(executable|shared).*'
;
then
\
echo
"Stripping executable
$$
f"
;
\
strip
--remove-section
=
.comment
--remove-section
=
.note
$$
f
;
\
fi
;
\
done
set
-e;
\
for
f
in
`find
$(BUILD_DIRECTORY)
-type
f
-name
'*.so*'
`;
do
\
if
file
$$f
|
grep
-Eq
'.*ELF.*shared.*'
;
then
\
echo
"Stripping shared library $$f"
;
\
strip
--remove-section
=
.comment
--strip-unneeded
\
--remove-section
=
.note
$$
f
;
\
fi
;
\
done
@touch
strip-binaries-stamp
all
:
all-stamp
all-stamp
:
build cleanup-build strip-binaries
@
touch
all-stamp
install
:
all
mkdir
-p
$(INSTALL_DIRECTORY)
cp
-r
$(BUILD_DIRECTORY)
/
*
$(INSTALL_DIRECTORY)
set
-e;
\
for
l
in
`find
$(INSTALL_DIRECTORY)
-type
l
-lname
'$(BUILD_DIRECTORY)/*'
`;
do
\
echo
"Fixing symlink $$l"
;
\
base_directory
=
`
echo
$$
l|sed
's#^
$(INSTALL_DIRECTORY)
/\(.*/\).*#\1#'
|sed
-r
's#[^/]+#..#g'
`
;
\
cd
`
dirname
$$
l
`
&&
\
ln
-sf
`
readlink
$$
l |
sed
"s#
$(BUILD_DIRECTORY)
#
$$
base_directory#"
`
\
`
basename
$$
l
`
;
\
done
@echo
"Removing shebang from Python files not in bin/"
for
f
in
`grep
--exclude-dir
=
'bin'
--include
=
'*.py'
-rIl
'^#!'
$(INSTALL_DIRECTORY)
2> /dev/null
`
;
do
\
chmod
-x
$$
f
&&
sed
-i
'1d'
$$
f
;
\
done
@echo
"Fixing path to $(TARGET_DIRECTORY) rather than $(BUILD_DIRECTORY)"
grep
-rIl
'$(BUILD_DIRECTORY)'
$(INSTALL_DIRECTORY)
2>
/dev/null
|
\
xargs
sed
-i
's#$(BUILD_DIRECTORY)#$(TARGET_DIRECTORY)#g'
||
\
echo
"No path to fix."
set
-e;
\
for
f
in
`find
$(INSTALL_DIRECTORY)
\(
-type
f
-o
-type
l
\)
\(
-executable
-o
-name
"*.so"
\)`;
do
\
if
file
-L
$$f
|
grep
-Eq
'.*ELF.*(executable|shared).*'
;
then
\
OLD_RPATH
=
"
`
chrpath
$$
f|awk
-F
'RPATH='
'{print $$2}'
|sed
's#
$(BUILD_DIRECTORY)
#
$(TARGET_DIRECTORY)
#g'
2> /dev/null
`
"
;
\
if
[
-n
"
$$
OLD_RPATH"
]
;
then
\
chrpath
-r
"
$$
OLD_RPATH"
$$
f
;
\
fi
;
\
fi
;
\
done
clean
:
rm
-rf
$(BUILD_ROOT_DIRECTORY)
rm
-f
*
-stamp
.PHONY
:
build cleanup-build strip-binaries all install clean
obs/re6st/templates/PKGBUILD.in
0 → 100644
View file @
864e6c55
# Maintainer: Rafael Monnerat <rafael@nexedi.com>
pkgname=re6st-node
pkgver=%VERSION%+%RECIPE_VERSION%+%RELEASE%
pkgdesc="re6stnet"
pkgrel=1
arch=('x86_64' 'i686')
url="http://www.re6st.net"
license=('GPL')
depends=('gcc' 'make' 'patch' 'wget' 'python2' 'python2-distribute' 'bridge-utils')
makedepends=('gcc' 'make' 'patch' 'wget' 'python2' 'python2-distribute' 'chrpath' 'inetutils')
install='re6stnet.install'
source=(${pkgname}_${pkgver}.tar.gz)
md5sums=(%SOURCEMD5)
build() {
cd "${srcdir}/${pkgname}_${pkgver}"
make PYTHON=python2
}
package() {
cd "${srcdir}/${pkgname}_${pkgver}"
make DESTDIR="$pkgdir/" install
}
obs/re6st/templates/debian/changelog
0 → 100644
View file @
864e6c55
re6st-node (0.399+0.260+0) unstable; urgency=low
* Initial release.
-- Rafael Monnerat <rafael@nexedi.com> Thu, 9 Apr 2015 11:32:17 +0300
obs/re6st/templates/debian/compat
0 → 100644
View file @
864e6c55
7
obs/re6st/templates/debian/control
0 → 100644
View file @
864e6c55
Source: re6st-node
Maintainer: Julien Muchembled <jm@nexedi.com>
Section: net
Priority: optional
Build-Depends: python-setuptools, python, debhelper (>= 7.4.3)
Standards-Version: 3.9.1
Package: re6st-node
Architecture: any
Depends: ${misc:Depends}, python, python-argparse, iproute2 | iproute, openssl
Recommends: ${python:Recommends}, logrotate
Suggests: ndisc6
Description: resilient, scalable, IPv6 network application
obs/re6st/templates/debian/copyright
0 → 100644
View file @
864e6c55
Format: http://dep.debian.net/deps/dep5
Files: *
Copyright: 2012 Nexedi SA and Contributors
License: GPL-2+
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 2 of the License, or
(at your option) any later version.
.
This package 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, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
obs/re6st/templates/debian/postrm
0 → 100755
View file @
864e6c55
#!/bin/sh -e
[
"
$DPKG_MAINTSCRIPT_PACKAGE
"
]
[
"
$1
"
=
purge
]
&&
for
d
in
lib log
;
do
d
=
/var/
$d
/
$DPKG_MAINTSCRIPT_PACKAGE
[
!
-d
"
$d
"
]
||
rm
-r
"
$d
"
||
:
done
#DEBHELPER#
obs/re6st/templates/debian/re6stnet.init
0 → 100644
View file @
864e6c55
#!/bin/sh
### BEGIN INIT INFO
# Provides: re6stnet
# Required-Start: $network $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH
=
/sbin:/usr/sbin:/bin:/usr/bin:/opt/re6st/bin
NAME
=
re6stnet
DESC
=
"Resilient, Scalable, IPv6 Network application"
DAEMON
=
/opt/re6st/bin/
$NAME
CONFDIR
=
/etc/re6stnet
PIDFILE
=
/var/run/
$NAME
.pid
SCRIPTNAME
=
/etc/init.d/
$NAME
# Exit if the package is not installed or not configured
[
-x
$DAEMON
-a
-r
$CONFDIR
/
$NAME
.conf
]
||
exit
0
# Load the VERBOSE setting and other rcS variables
.
/lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
.
/lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start
()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
set
start-stop-daemon
--quiet
--pidfile
$PIDFILE
"
$@
"
--stop
--test
--name
$NAME
&&
return
1
"
$@
"
--start
--make-pidfile
--background
--chdir
$CONFDIR
--exec
$DAEMON
--
@
$NAME
.conf
||
return
2
}
#
# Function that stops the daemon/service
#
do_stop
()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
set
start-stop-daemon
--stop
--quiet
--retry
=
TERM/30/KILL/5
"
$@
"
--pidfile
$PIDFILE
--name
$NAME
RETVAL
=
"
$?
"
[
"
$RETVAL
"
=
2
]
&&
return
2
rm
-f
$PIDFILE
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
"
$@
"
--oknodo
--exec
$DAEMON
[
"
$?
"
=
2
]
&&
return
2
# Many daemons don't delete their pidfiles when they exit.
return
"
$RETVAL
"
}
cd
$CONFDIR
;
$DAEMON
@
$NAME
.conf
--test
"main_interface != 'lo'"
||
case
"
$1
"
in
start
)
exit
0
;;
restart|force-reload
)
set
stop
;;
esac
case
"
$1
"
in
start
)
[
"
$VERBOSE
"
!=
no
]
&&
log_daemon_msg
"Starting
$DESC
"
"
$NAME
"
do_start
case
"
$?
"
in
0|1
)
[
"
$VERBOSE
"
!=
no
]
&&
log_end_msg 0
;;
2
)
[
"
$VERBOSE
"
!=
no
]
&&
log_end_msg 1
;;
esac
;;
stop
)
[
"
$VERBOSE
"
!=
no
]
&&
log_daemon_msg
"Stopping
$DESC
"
"
$NAME
"
do_stop
case
"
$?
"
in
0|1
)
[
"
$VERBOSE
"
!=
no
]
&&
log_end_msg 0
;;
2
)
[
"
$VERBOSE
"
!=
no
]
&&
log_end_msg 1
;;
esac
;;
status
)
status_of_proc
"
$DAEMON
"
"
$NAME
"
&&
exit
0
||
exit
$?
;;
restart|force-reload
)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg
"Restarting
$DESC
"
"
$NAME
"
do_stop
case
"
$?
"
in
0|1
)
do_start
case
"
$?
"
in
0
)
log_end_msg 0
;;
1
)
log_end_msg 1
;;
# Old process is still running
*
)
log_end_msg 1
;;
# Failed to start
esac
;;
*
)
# Failed to stop
log_end_msg 1
;;
esac
;;
*
)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo
"Usage:
$SCRIPTNAME
{start|stop|status|restart|force-reload}"
>
&2
exit
3
;;
esac
:
obs/re6st/templates/debian/rules
0 → 100755
View file @
864e6c55
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=4
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
make
# --- end custom part for compiling
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process
# --- end custom part for cleaning up
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package
# The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/<nameOfPackage>
dh_auto_install --TARGET_DIRECTORY=/opt/re6st
# --- end custom part for installing
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
dh_installinit
dh_installcron
dh_installlogrotate
dh_installman
dh_installinfo
# dh_undocumented
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs -n
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb -- -Zlzma -z9
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
obs/re6st/templates/debian/source/format
0 → 100644
View file @
864e6c55
3.0 (native)
obs/re6st/templates/offline.sh.in
0 → 100755
View file @
864e6c55
#!/bin/bash
VERSION
=
%VERSION%
RECIPE_VERSION
=
%RECIPE_VERSION%
BUILDOUT_URL
=
%BUILDOUT_URL%
TARGET_DIRECTORY
=
/opt/re6st
BUILD_ROOT_DIRECTORY
=
"
$(
pwd
)
/build"
BUILD_DIRECTORY
=
$BUILD_ROOT_DIRECTORY$TARGET_DIRECTORY
BOOTSTRAP_URL
=
'https://raw.githubusercontent.com/buildout/buildout/1/bootstrap/bootstrap.py'
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
set
-e
echo
"
$BUILD_ROOT_DIRECTORY
"
>
./original_directory
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"
buildout.cfg.in
>
$BUILD_DIRECTORY
/buildout.cfg
# 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
&&
\
./bin/buildout
)
||
(
echo
"Failed to run buildout, exiting."
&&
exit
1
)
cd
$BUILD_ROOT_DIRECTORY
/..
# 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
rm
-fv
$BUILD_DIRECTORY
/bootstrap.py
$BUILD_DIRECTORY
/buildout.cfg
\
$BUILD_DIRECTORY
/.installed.cfg
\
$BUILD_DIRECTORY
/environment.
*
rm
-rfv
$BUILD_DIRECTORY
/parts/
rm
-rfv
$BUILD_DIRECTORY
/eggs/
rm
-rfv
$BUILD_DIRECTORY
/develop-eggs/
rm
-rfv
$BUILD_DIRECTORY
/bin
# 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
cd
$BUILD_DIRECTORY
&&
\
wget
$BOOTSTRAP_URL
--no-check-certificate
-O
bootstrap.py
&&
\
python
-S
bootstrap.py
# Removing Python byte-compiled files (as it will be done upon
# package installation) and static libraries
find
$BUILD_DIRECTORY
-regextype
posix-extended
-type
f
\
-iregex
'.*/*\.(py[co]|[l]?a|exe|bat)$$'
-exec
rm
-fv
'{}'
';'
obs/re6st/templates/re6stnet.dsc.in
0 → 100644
View file @
864e6c55
Format: 1.0
Source: re6st-node
Binary: re6st-node
Architecture: any
Version: %VERSION%+%RECIPE_VERSION%+%RELEASE%-1
Maintainer: Rafael Monnerat <rafael@nexedi.com>
Homepage: http://www.slapos.org
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 4.1.16), chrpath, po-debconf, wget, python, python-dev, python-setuptools
Files:
1c2803e4693c74042985d753c9c3ba53 73736102 re6st-node_%VERSION%+%RECIPE_VERSION%+%RELEASE%.orig.tar.gz
1c2803e4693c74042985d753c9c3ba53 6102 re6st-node_%VERSION%+%RECIPE_VERSION%+%RELEASE%-1.diff.tar.gz
obs/re6st/templates/re6stnet.install
0 → 100644
View file @
864e6c55
# This is a default template for a post-install scriptlet.
# Uncomment only required functions and remove any functions
# you don't need (and this header).
## arg 1: the new package version
#pre_install() {
# do something here
#}
## arg 1: the new package version
#post_install() {
# do something here
#}
## arg 1: the new package version
## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
## arg 1: the new package version
## arg 2: the old package version
#post_upgrade() {
# do something here
#}
## arg 1: the old package version
#pre_remove() {
# do something here
#}
## arg 1: the old package version
#post_remove() {
# do something here
#}
obs/re6st/templates/re6stnet.spec.in
0 → 100644
View file @
864e6c55
%define slapversion %RECIPE_VERSION%
%define version %VERSION%
%define unmangled_version %VERSION%
%define release_number %RELEASE%
Summary: resilient, scalable, IPv6 network application
Name: re6st-node
Version: %{slapversion}
Release: %{release_number}
Source: re6st-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz
License: GPLv2+
Group: Applications/Internet
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, python-setuptools, openssl-devel
Requires: python
AutoReqProv: no
%description
%prep
rm -rf $RPM_BUILD_DIR/re6st-node_%{unmangled_version}+%{slapversion}+%{release_number}
zcat $RPM_SOURCE_DIR/re6st-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz | tar -xvf -
%build
cd $RPM_BUILD_DIR/re6st-node_%{unmangled_version}+%{slapversion}+%{release_number}
make
%install
cd $RPM_BUILD_DIR/re6st-node_%{unmangled_version}+%{slapversion}+%{release_number}/
make DESTDIR=$RPM_BUILD_ROOT install
%files
/etc/systemd
/etc/systemd/re6stnet.service
/etc/NetworkManager
/etc/NetworkManager/dispatcher.d
/etc/NetworkManager/dispatcher.d/50re6stnet
/etc/re6stnet
/usr/bin/re6st-conf
/usr/bin/re6st-registry
/usr/bin/re6stnet
/var/lib/re6stnet
/var/log/re6stnet
/opt/re6st
%defattr(-,root,root)
%post
%preun
%postun
obs/slapos/prepare_slapos_build.sh
View file @
864e6c55
#!/bin/sh -e
# Edit for release
VERSION
=
1.3.
5
VERSION
=
1.3.
9
# Edit for release
RECIPE_VERSION
=
0.250
RECIPE_VERSION
=
0.250
.1
# Edit for release
RELEASE
=
1
GITHASH
=
5f52d060953f2bff342dff8ae29cc44d98e918af
...
...
obs/slapos/slapos-node/slapos/buildout.cfg.in
View file @
864e6c55
...
...
@@ -26,7 +26,7 @@ environment +=
# Add gettext library path to RPATH as its binaries are used to build
# glib for example
environment =
PATH=${perl:location}/bin:${
xz-utils
:location}/bin:%(PATH)s
PATH=${perl:location}/bin:${
lunzip
:location}/bin:%(PATH)s
CPPFLAGS=-I${libxml2:location}/include -I${zlib:location}/include -I${ncurses:location}/include
LDFLAGS=-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=%BUILD_DIRECTORY%/parts/${:_buildout_section_name_}/lib
...
...
@@ -38,3 +38,4 @@ make-options +=
[versions]
cliff = 1.4.5
slapos.core = 1.3.9
obs/slapos/templates/debian/changelog
View file @
864e6c55
slapos-node (1.3.9+0.250.1+1) unstable; urgency=low
* New version of slapos (1.3.9+0.250.1+1)
-- Cedric de Saint Martin <cedric.dsm@nexedi.com> Sun, 22 Mar 2015 13:48:16 +0100
slapos-node (1.3.9+0.250.1+1) unstable; urgency=low
* New version of slapos (1.3.9+0.250.1+1)
-- Cedric de Saint Martin <cedric.dsm@nexedi.com> Sun, 22 Mar 2015 13:20:28 +0100
slapos-node (1.3.5+0.250+1) unstable; urgency=low
* New version of slapos (1.3.5+0.250+1)
...
...
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