|
|
ec013d |
Install:
|
|
|
e14835 |
|
|
|
ec013d |
run all commands from root (as superuser)
|
|
|
e14835 |
|
|
|
e14835 |
|
|
|
ec013d |
install dependency packages:
|
|
|
ec013d |
you need: bash aufs-tools fuse-zip
|
|
|
ec013d |
for apt based OS use comand:
|
|
|
ec013d |
apt-get install bash aufs-tools fuse-zip
|
|
|
e14835 |
|
|
|
e14835 |
|
|
|
ec013d |
create and edit config file:
|
|
|
ec013d |
use config.sh.blank as a base:
|
|
|
ec013d |
cp config.sh.blank config.sh
|
|
|
ec013d |
|
|
|
ec013d |
we use config (some_path is a fake):
|
|
|
ec013d |
PACKET_BUILD_DIR=/some_path/builder-packet
|
|
|
ec013d |
CHROOTER_BUILD_OPTIONS="--privileged=true"
|
|
|
ec013d |
chrooter() {
|
|
|
ec013d |
export CHROOTER_PREFIX="/some_path_to_mount"
|
|
|
ec013d |
$BASE_DIR/chrooter/chrooter.sh $@
|
|
|
ec013d |
}
|
|
|
ec013d |
OPENTOONZ_TESTING_TAG="morevna"
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
download virtual environment:
|
|
|
ec013d |
you may download our (we are Morevna Project) os images from:
|
|
|
ec013d |
https://coolbug.org/downloads/builder-images/
|
|
|
ec013d |
|
|
|
ec013d |
you need two files:
|
|
|
ec013d |
https://coolbug.org/downloads/builder-images/morevnaproject_build-debian-7-32.zip
|
|
|
ec013d |
https://coolbug.org/downloads/builder-images/morevnaproject_build-debian-7-64.zip
|
|
|
ec013d |
approximate 6.5Gb, place both into chrooter/images/
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
build virtual environment:
|
|
|
ec013d |
if you does not want to download os images you can build it
|
|
|
ec013d |
|
|
|
ec013d |
Impotant:
|
|
|
ec013d |
Debian project does not support Debian 7 (wheezy) anymore
|
|
|
ec013d |
so you need to find an active hosting of Debian 7 packages
|
|
|
ec013d |
enter valid url into files:
|
|
|
ec013d |
env/debian-7-32bit/files/sources.list
|
|
|
ec013d |
env/debian-7-64bit/files/sources.list
|
|
|
ec013d |
env/debian-7-32bit/build-zip.sh into variable apt_mirror
|
|
|
ec013d |
env/debian-7-64bit/build-zip.sh into variable apt_mirror
|
|
|
ec013d |
|
|
|
ec013d |
here you still can download a base debian images from:
|
|
|
ec013d |
https://coolbug.org/downloads/builder-images/debian-wheezy-i386.zip
|
|
|
ec013d |
https://coolbug.org/downloads/builder-images/debian-wheezy-amd64.zip
|
|
|
ec013d |
approximate 500Mb, place first into env/debian-7-32bit and second into env/debian-7-64bit
|
|
|
ec013d |
|
|
|
ec013d |
or build these images from scratch by debootstrap
|
|
|
ec013d |
install packages: debootstrap zip; for apt based OS use command:
|
|
|
ec013d |
apt-get install debootstrap zip
|
|
|
ec013d |
and build base debian images
|
|
|
ec013d |
cd env/debian-7-32bit # go to env/debian-7-32bit
|
|
|
ec013d |
./build-zip.sh
|
|
|
ec013d |
cd ../debian-7-64bit # go to env/debian-7-64bit
|
|
|
ec013d |
./build-zip.sh
|
|
|
ec013d |
cd ../.. # go back
|
|
|
ec013d |
|
|
|
ec013d |
now when you have files debian-wheezy-XXXX.zip you can build os images for builder
|
|
|
ec013d |
it's a long process because it will build GCC and MinGW from scratch
|
|
|
ec013d |
run commands:
|
|
|
ec013d |
cd env/debian-7-32bit # go to env/debian-7-32bit
|
|
|
ec013d |
./build-base.sh # just to copy base os image into chrooter/images
|
|
|
ec013d |
./build.sh # a long build process
|
|
|
ec013d |
cd ../debian-7-64bit # go to env/debian-7-64bit
|
|
|
ec013d |
./build-base.sh # just to copy base os image into chrooter/images
|
|
|
ec013d |
./build.sh # a long build process
|
|
|
ec013d |
cd ../.. # go back
|
|
|
ec013d |
|
|
|
ec013d |
build environment ready
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
installation done
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
Usage:
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
now you may build packages by macro script:
|
|
|
ec013d |
see files ./build-*.sh
|
|
|
ec013d |
|
|
|
ec013d |
also you can add hooks to publish built packages:
|
|
|
ec013d |
for example create file publish/publish-synfigstudio.sh with content:
|
|
|
ec013d |
#!/bin/bash
|
|
|
ec013d |
cp "$1" /var/www/public/downloads/
|
|
|
ec013d |
when build is done new synfigstudio packge will placed into web-site directory
|
|
|
ec013d |
you may look file publish/publish.sh for more info
|
|
|
ec013d |
|
|
|
ec013d |
run internal builder commands in virtual environment:
|
|
|
ec013d |
cd env
|
|
|
ec013d |
./run.sh some_command
|
|
|
ec013d |
|
|
|
ec013d |
also you may use:
|
|
|
ec013d |
env/debian-7-32bit/run.sh
|
|
|
ec013d |
env/debian-7-64bit/run.sh
|
|
|
ec013d |
env/debian-7-64bit/win32.sh
|
|
|
ec013d |
env/debian-7-64bit/win64.sh
|
|
|
ec013d |
|
|
|
ec013d |
run build commands in native environment
|
|
|
ec013d |
./run-native.sh some_command
|
|
|
ec013d |
|
|
|
ec013d |
build a selected package:
|
|
|
ec013d |
cd env
|
|
|
ec013d |
./run.sh env_release MEGAPROGRAM-1.0.0
|
|
|
ec013d |
|
|
|
ec013d |
take files from directory
|
|
|
ec013d |
env-builder-data/build/packet/linux-x64/MEGAPROGRAM-1.0.0/env_release
|
|
|
ec013d |
or
|
|
|
ec013d |
your_build_path/packet/linux-x64/MEGAPROGRAM-1.0.0/env_release
|
|
|
e14835 |
|
|
|
e14835 |
|
|
|
e14835 |
"dry_run" option for paranoics:
|
|
|
ec013d |
./run.sh dry_run with_deps unpack MEGAPROGRAM-1.0.0
|
|
|
0e38dd |
|
|
|
0e38dd |
List of commands
|
|
|
ec013d |
<action> <packet></packet></action>
|
|
|
ec013d |
do <action> for <packet></packet></action>
|
|
|
ec013d |
List of actions:
|
|
|
ec013d |
- download
|
|
|
ec013d |
- unpack
|
|
|
ec013d |
- build
|
|
|
ec013d |
- install
|
|
|
ec013d |
- install_release
|
|
|
ec013d |
- envdeps
|
|
|
ec013d |
- envdeps_release
|
|
|
ec013d |
- env
|
|
|
ec013d |
- env_release
|
|
|
ec013d |
|
|
|
ec013d |
dry_run <any command="" other=""></any>
|
|
|
ec013d |
- simulate activity
|
|
|
ec013d |
|
|
|
ec013d |
with_deps <command> <packet></packet>
|
|
|
ec013d |
- execute <command> for <packet> and all deps</packet>
|
|
|
ec013d |
|
|
|
ec013d |
clean_ACTION <packet></packet>
|
|
|
ec013d |
- remove all data of completed ACTION for <packet></packet>
|
|
|
ec013d |
ex.: clean_unpack MEGAPROGRAM-1.0.0
|
|
|
ec013d |
|
|
|
ec013d |
clean_all_unpack <packet></packet>
|
|
|
ec013d |
- cleans download and unpack
|
|
|
ec013d |
see: clean_ACTION <packet></packet>
|
|
|
ec013d |
|
|
|
ec013d |
clean_all_env <packet></packet>
|
|
|
ec013d |
- cleans install, install_release, envdeps, envdeps_release, env and env_release
|
|
|
ec013d |
see: clean_ACTION <packet></packet>
|
|
|
ec013d |
|
|
|
ec013d |
clean_all_install <packet></packet>
|
|
|
ec013d |
- cleans all env and build
|
|
|
ec013d |
see: clean_all_env <packet>, clean_ACTION <packet></packet></packet>
|
|
|
ec013d |
|
|
|
ec013d |
clean_all <packet></packet>
|
|
|
ec013d |
- remove all data of all completed actions for <packet></packet>
|
|
|
ec013d |
|
|
|
ec013d |
set_undone_ACTION <packet></packet>
|
|
|
ec013d |
set_undone_all_unpack <packet></packet>
|
|
|
ec013d |
set_undone_all_env <packet></packet>
|
|
|
ec013d |
set_undone_all_install <packet></packet>
|
|
|
ec013d |
set_undone_all <packet></packet>
|
|
|
ec013d |
- mark ACTION incomplete for <packet>, but keep action data</packet>
|
|
|
ec013d |
see: clean_* comands
|
|
|
ec013d |
|
|
|
ec013d |
shell <packet></packet>
|
|
|
ec013d |
- run shell in environment of <packet></packet>
|
|
|
ec013d |
|
|
|
ec013d |
chain <command> chain <other_command> ...</other_command>
|
|
|
ec013d |
- run several command sequentially wihtout remounting of environment to increase speed
|
|
|
ec013d |
|
|
|
ec013d |
see also
|
|
|
ec013d |
env-builder-data/build/script/common/manager.sh
|
|
|
ec013d |
|
|
|
ec013d |
|
|
|
ec013d |
Troubles:
|
|
|
ec013d |
sometimes virtual environmens does not unmounted properly
|
|
|
ec013d |
to clear this you need to unmount all mounts for */chrooter-*
|
|
|
ec013d |
look mounts list by command:
|
|
|
ec013d |
mount
|
|
|
ec013d |
|
|
|
ec013d |
unmount by command:
|
|
|
ec013d |
umount "/some_path/chrooter-SOME_UUID"
|
|
|
ec013d |
or with "force" option
|
|
|
ec013d |
umount -f "/some_path/chrooter-SOME_UUID"
|
|
|
ec013d |
|
|
|
ec013d |
after that remove the files
|
|
|
ec013d |
you MUST do unmount before, if some dir are still mounted you can remove some system files
|
|
|
ec013d |
we recommend to check content of directories before remove
|
|
|
ec013d |
option "--one-file-system" for additional protection but anyway BE CAREFULL!!
|
|
|
ec013d |
command:
|
|
|
ec013d |
rm -rf --one-file-system /some_path/chrooter-*
|