Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
jopasserat committed Sep 16, 2017
2 parents afe225d + 2149569 commit fdc253b
Show file tree
Hide file tree
Showing 111 changed files with 1,421 additions and 358 deletions.
30 changes: 30 additions & 0 deletions cross-build-env/build-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

[ -e slackwarearm-14.1 ] || {
echo "Run script init-build-env-arm.sh first"
exit 1
}

PATH=`pwd`:$PATH
which proot > /dev/null || {
echo "Please compile proot first, and copy it to the current directory"
exit 1
}

# Build PRoot/ARM statically:
SRC=`cd ../src ; pwd`
[ -e talloc-arm ] || {
[ -e talloc.tar.gz ] || wget http://www.samba.org/ftp/talloc/talloc-2.1.3.tar.gz -O talloc.tar.gz || exit 1
rm -rf talloc-arm
tar xvf talloc.tar.gz || exit 1
mv talloc-2.1.3 talloc-arm || exit 1
cd talloc-arm || exit 1
rm -f libtalloc.a
proot -R ../slackwarearm-14.1 -q qemu-arm ./configure build || exit 1
ar rcs libtalloc.a bin/default/talloc*.o || exit 1
cd ..
}

make -C $SRC clean
proot -R slackwarearm-14.1 -q qemu-arm env CPPFLAGS="-I`pwd`/talloc-arm" LDFLAGS="-L`pwd`/talloc-arm -static" make -C $SRC glibc-version=glibc-2.18 -f GNUmakefile -j4 || exit 1
mv -f $SRC/proot $SRC/proot-arm || exit 1
30 changes: 30 additions & 0 deletions cross-build-env/build-x86.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

[ -e slackwarex86-14.1 ] || {
echo "Run script init-build-env-arm.sh first"
exit 1
}

PATH=`pwd`:$PATH
which proot > /dev/null || {
echo "Please compile proot first, and copy it to the current directory"
exit 1
}

# Build PRoot/x86 statically:
SRC=`cd ../src ; pwd`
[ -e talloc-x86 ] || {
[ -e talloc.tar.gz ] || wget http://www.samba.org/ftp/talloc/talloc-2.1.3.tar.gz -O talloc.tar.gz || exit 1
rm -rf talloc-x86
tar xvf talloc.tar.gz || exit 1
mv talloc-2.1.3 talloc-x86 || exit 1
cd talloc-x86 || exit 1
rm -f libtalloc.a
proot -R ../slackwarex86-14.1 -q qemu-i386 ./configure build || exit 1
ar rcs libtalloc.a bin/default/talloc*.o || exit 1
cd ..
}

make -C $SRC clean
proot -R slackwarex86-14.1 -q qemu-i386 env CPPFLAGS="-I`pwd`/talloc-x86" LDFLAGS="-L`pwd`/talloc-x86 -static" make -C $SRC glibc-version=glibc-2.18 -f GNUmakefile -j4 || exit 1
mv -f $SRC/proot $SRC/proot-x86 || exit 1
44 changes: 44 additions & 0 deletions cross-build-env/init-build-env-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/sh

which qemu-arm > /dev/null || {
echo "You need to install qemu-arm to run this script. On debian, run:"
echo "sudo apt-get install qemu-user"
exit 1
}

which wget > /dev/null || {
echo "You need to install wget to run this script. On debian, run:"
echo "sudo apt-get install wget"
exit 1
}

PATH=`pwd`:$PATH
which proot > /dev/null || {
echo "Please compile proot first, and copy it to the current directory"
exit 1
}

PKGS=`cat slackware-devel.txt | tr '\n' ',' | sed 's@,@*,@g' | sed 's/,[*]$//' | sed 's/,$//'`
echo PKGS "$PKGS"

# Get Slackware/ARM packages:
for DIR in a ap d e l n tcl; do
wget -r -np -N --accept="$PKGS" http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/slackware/$DIR/ || exit 1
done

rm -rf slackwarearm-14.1
mkdir slackwarearm-14.1 || exit 1

# Extract only a minimal subset (ignore errors):
for DIR in a l; do
ls ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/slackware/$DIR/*.t?z | xargs -n 1 tar -C slackwarearm-14.1 -x --exclude="dev/*" --exclude="lib/udev/devices/*" -f || exit 1
done

# Do a minimal post-installation setup:
mv slackwarearm-14.1/lib/incoming/* slackwarearm-14.1/lib/ || exit 1
mv slackwarearm-14.1/bin/bash4.new slackwarearm-14.1/bin/bash || exit 1
proot -q qemu-arm -S slackwarearm-14.1 /sbin/ldconfig || exit 1
proot -q qemu-arm -r slackwarearm-14.1 ln -s /bin/bash /bin/sh || exit 1

# Install all package correcty (ignore warnings):
ls ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/slackware/*/*.t?z | xargs -n 1 proot -q qemu-arm -S slackwarearm-14.1 -b ftp.arm.slackware.com /sbin/installpkg || exit 1
44 changes: 44 additions & 0 deletions cross-build-env/init-build-env-x86.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/sh

which qemu-i386 > /dev/null || {
echo "You need to install qemu-i386 to run this script. On debian, run:"
echo "sudo apt-get install qemu-user"
exit 1
}

which wget > /dev/null || {
echo "You need to install wget to run this script. On debian, run:"
echo "sudo apt-get install wget"
exit 1
}

PATH=`pwd`:$PATH
which proot > /dev/null || {
echo "Please compile proot first, and copy it to the current directory"
exit 1
}

PKGS=`cat slackware-devel.txt | tr '\n' ',' | sed 's@,@*,@g' | sed 's/,[*]$//' | sed 's/,$//'`
echo PKGS "$PKGS"

# Get Slackware/ARM packages:
for DIR in a ap d e l n tcl; do
wget -r -np -N --accept="$PKGS" http://ftp.slackware.com/pub/slackware/slackware-14.1/slackware/$DIR/ || exit 1
done

rm -rf slackwarex86-14.1
mkdir slackwarex86-14.1 || exit 1

# Extract only a minimal subset (ignore errors):
for DIR in a l; do
ls ftp.slackware.com/pub/slackware/slackware-14.1/slackware/$DIR/*.t?z | xargs -n 1 tar -C slackwarex86-14.1 -x --exclude="dev/*" --exclude="lib/udev/devices/*" -f || exit 1
done

# Do a minimal post-installation setup:
mv slackwarex86-14.1/lib/incoming/* slackwarex86-14.1/lib/ || exit 1
mv slackwarex86-14.1/bin/bash4.new slackwarex86-14.1/bin/bash || exit 1
proot -q qemu-i386 -S slackwarex86-14.1 /sbin/ldconfig || exit 1
proot -q qemu-i386 -r slackwarex86-14.1 ln -s /bin/bash /bin/sh || exit 1

# Install all package correcty (ignore warnings):
ls ftp.slackware.com/pub/slackware/slackware-14.1/slackware/*/*.t?z | xargs -n 1 proot -q qemu-i386 -S slackwarex86-14.1 -b ftp.arm.slackware.com /sbin/installpkg || exit 1
56 changes: 56 additions & 0 deletions cross-build-env/slackware-devel.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
aaa_base
aaa_elflibs
aaa_terminfo
bash
bin-
bzip2
coreutils
dialog
diffutils
elvis
etc-
findutils
gawk
glibc-solibs
gnupg
grep
gzip-
iputils
logrotate
net-tools
network-scripts
pkgtools
procps
sed-
shadow
sharutils
slackpkg
sysklogd
sysvinit
sysvinit-functions
sysvinit-scripts
tar-
util-linux
wget
which
xz-
zip-
binutils
glibc
gcc-g++
gcc-4
gcc-5
gcc-6
make-
cmake
kernel-headers
libtool
autoconf
automake
flex
bison
git
subversion
libmpc
mpfr
python
4 changes: 2 additions & 2 deletions doc/care/manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ highly compatible static binaries:
Colophon
========

Visit https://proot-me.github.io for help, bug reports, suggestions, patches, ...
Copyright (C) 2014 STMicroelectronics, licensed under GPL v2 or later.
Visit http://reproducible.io for help, bug reports, suggestions, patches, ...
Copyright (C) 2015 STMicroelectronics, licensed under GPL v2 or later.

::

Expand Down
128 changes: 114 additions & 14 deletions doc/proot/man.1
Original file line number Diff line number Diff line change
Expand Up @@ -650,18 +650,24 @@ checking whether the C compiler is a cross\-compiler... no
.SS PRoot
.sp
The latest release of PRoot is packaged on \fI\%http://packages.proot.me\fP
and sources are hosted on \fI\%http://github.proot.me\fP\&. It is also
available as highly compatible static binaries:
and sources are hosted on \fI\%http://scm.proot.me\fP\&. It is also available
as highly compatible static binaries:
.INDENT 0.0
.IP \(bu 2
for x86_64: \fI\%http://static.proot.me/proot\-x86_64\fP
for x86_64: \fI\%http://portable.proot.me/proot\-x86_64\fP
.IP \(bu 2
for x86: \fI\%http://static.proot.me/proot\-x86\fP
for x86: \fI\%http://portable.proot.me/proot\-x86\fP
.IP \(bu 2
for ARM: \fI\%http://static.proot.me/proot\-arm\fP
for ARM: \fI\%http://portable.proot.me/proot\-arm\fP
.IP \(bu 2
other architectures: on demand.
.UNINDENT
.sp
Such binaries are created using the following build\-system:
\fI\%http://build.proot.me\fP\&. It makes sure that they can run on any distros
powered by the Linux kernel version 2.6.0 or later, nothing more.
Ultimately these binaries can even run on Linux systems where no
libraries are installed.
.SS Rootfs
.sp
Here follows a couple of URLs where some rootfs archives can be freely
Expand Down Expand Up @@ -693,23 +699,117 @@ tar \-\-one\-file\-system \-\-create \-\-gzip \-\-file my_rootfs.tar.gz /
.fi
.UNINDENT
.UNINDENT
.SS QEMU user\-mode
.SH ECOSYSTEM
.sp
QEMU user\-mode is required only if the guest rootfs was made for a CPU
architecture incompatible with the host one, for instance when using a
ARM rootfs on a x86_64 computer. This package can be installed either
from \fI\%http://qemu.proot.me\fP or from the host package manager under the
name of "qemu\-user" on most Linux distro. In case one would like to
build QEMU user\-mode from sources, the \fB\-\-enable\-linux\-user\fP option
has to be specified to the \fB\&./configure\fP script.
The following ecosystem has developed around PRoot since it has been
made publicly available.
.SS Projects using PRoot or CARE
.INDENT 0.0
.IP \(bu 2
\fI\%CARE\fP: archive material used during an execution to make it
reproducible on any Linux system.
.IP \(bu 2
\fI\%GNURoot\fP:
use several Linux distros on Android without root access.
.IP \(bu 2
\fI\%Debian noroot\fP:
use Debian Linux on Android without root access.
.IP \(bu 2
\fI\%Polysquare Travis Container\fP:
use several Linux distros on Travis\-CI without root access.
.IP \(bu 2
\fI\%JuJu\fP:
use Arch Linux on any Linux distros without root access.
.IP \(bu 2
\fI\%Brickstrap\fP:
create ev3dev file system images.
.IP \(bu 2
\fI\%Portable PyPy\fP:
portable 32 and 64 bit x86 PyPy binaries.
.IP \(bu 2
\fI\%OpenMOLE\fP:
execute programs on distributed computing environments.
.IP \(bu 2
\fI\%ATOS\fP:
find automatically C/C++ compiler options that provide best
optimizations.
.IP \(bu 2
\fI\%OPAM2Debian\fP:
create Debian packages which contains a fully compiled OPAM
installation.
.IP \(bu 2
\fI\%SIO Workers\fP:
batch long\-term computations with Python.
.UNINDENT
.SS Third party packages
.sp
Binaries from the \fI\%Downloads\fP section are likely more up\-to\-date.
.INDENT 0.0
.IP \(bu 2
\fI\%Arch Linux (PRoot)\fP
.IP \(bu 2
\fI\%Arch Linux (CARE)\fP
.IP \(bu 2
\fI\%Gentoo\fP
.IP \(bu 2
\fI\%Debian\fP
.IP \(bu 2
\fI\%Ubuntu\fP
.IP \(bu 2
\fI\%NixOS\fP
.IP \(bu 2
\fI\%KaOS\fP
.IP \(bu 2
\fI\%University of Chicago RCC\fP
.UNINDENT
.SS Public material about PRoot or CARE
.INDENT 0.0
.IP \(bu 2
articles on \fI\%Rémi\(aqs blog\fP\&. Rémi (a.k.a Ivoire)
is one of the PRoot developers.
.IP \(bu 2
presentation "\fI\%Software engineering tools based on syscall
instrumentation\fP" during
FOSDEM 2014.
.IP \(bu 2
presentation "\fI\%SW testing & Reproducing a LAVA failures locally
using CARE\fP"
during Linaro Connect USA 2014
.IP \(bu 2
presentation and essay "\fI\%CARE: the Comprehensive Archiver for
Reproducible Execution\fP"
(\fI\%essay\fP)
during TRUST 2014
.IP \(bu 2
presentation "\fI\%An Introduction to the CARE tool\fP"
during HiPEAC CSW 2013
.IP \(bu 2
presentation and essay "\fI\%PRoot: a Step Forward for QEMU User\-Mode\fP" (\fI\%proceedings\fP) during
QUF\(aq11
.IP \(bu 2
tutorial "\fI\%How to install nix in home (on another distribution)\fP"
.UNINDENT
.SS Companies using PRoot or CARE internally
.INDENT 0.0
.IP \(bu 2
STMicroelectronics (main sponsor)
.IP \(bu 2
Sony
.IP \(bu 2
Ericsson
.IP \(bu 2
Cisco
.IP \(bu 2
Gogo
.UNINDENT
.SH SEE ALSO
.sp
chroot(1), mount(8), binfmt_misc, ptrace(2), qemu(1), sb2(1),
bindfs(1), fakeroot(1), fakechroot(1)
.SH COLOPHON
.sp
Visit \fI\%http://proot.me\fP for help, bug reports, suggestions, patches, ...
Copyright (C) 2014 STMicroelectronics, licensed under GPL v2 or later.
Copyright (C) 2015 STMicroelectronics, licensed under GPL v2 or later.
.INDENT 0.0
.INDENT 3.5
.sp
Expand Down
Loading

0 comments on commit fdc253b

Please sign in to comment.