Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
- replaced "tools_root" by "tools"; the former works fine only when the tools
root environment variable is set, while the latter works always.
|
|
- "maemo" mode has been updated with many new rules.
- mapping rules can now call logger when the rule is selected
- conditional rules ("map if destination exists") have been added to
mapping.lua (needed by "maemo" mode)
- added new action type "use_orig_path = true" to all mapping modes,
this used to be expressed by "map_to = nil"
- "simple" and "emulate" modes were updated to use "use_orig_path" action
- "emulate" now uses /etc/resolv.conf from the host.
|
|
- sb_decolonize_path produced an empty string if the original path was /.
(and then the mapping logic could not find any matching rules, which
produced errors to the log)
|
|
- previously the LD_PRELOAD env.var. was always overwritten
- This change makes it possible to use "fakeroot" to start "sb2".
e.g. "fakeroot sb2 -e" can be used to add packages to the rootstrap,
as in this case LD_PRELOAD must contain two preloadable libraries.
|
|
- not perfect, but with these modifications "dpkg-checkbuilddeps"
becomes finally usable in "maemo" mode (this needs mode-specific
configuration, which is currently available only for "maemo")
- dpkg-buildpackage can now be used without the "-d" option.
- see comments in utils/dpkg-checkbuilddeps for list of missing features
|
|
- Fixed operation of the rename() system call for symlinks.
- The bug was that sb2's wrapper for the rename() call did not rename
the symlink itself, but the target where the symlink was pointing to.
This was one reason why "dpkg -i" did not work properly.
|
|
- the new path name array to the real fts_open() is now properly
terminated by a NULL pointer.
|
|
- Using libpthread unconditionally caused crashes (segfaults inside
libstdc++, etc). This changes the preload library to use functions from
the pthread library only if they are available, and removes automatic
loading of that library (Full explanation can be found from luaif.c)
|
|
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
|
|
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
workaround dh_shlibdeps sb2-show links against libsb2,
but still don't want to treat libsb2 as a shared lib
(since it gets preloaded anyway). instead teach dh_shlibdeps
where to find libsb2.
Also improve clean target.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
This makes the "native" lib for amd64 target install
under prefix/lib/sb2 instead of /emul64
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
- setting LD_PRELOAD too early caused sb2-monitor to fail, when "emulate"
mode was requested.
|
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
- a new uility, "sb2-monitor", will be started by "sb2" to produce statistics
and/or error messages after the command started by "sb2" finishes (actually,
the messages are produced by a new helper script, "sb2-exitreport", which
gets started by sb2-monitor)
N.B. sb2-monitor tries to be as transparent as possible, preserving signals
etc., but that is a somewhat complex task. see the source code for furher
comments.
- logging level is now "warning" by default (previously the default was
to keep logging off, and simply loose all errors and warnings)
- added two new sub-commands to sb2-show: "log-error" and "log-warning" can
be used to add messages to the log. An easy way to test the operation of
"sb2-monitor" is to run "sb2 sb2-show log-error testmessage", and
"sb2 -d sb2-show log-error testmessage" for even more details about the run.
- There is also a new test program, signaltester.c, which can be used when
testing&developing sb2-monitor.
|
|
- some source packages seem to have hardcoded links to the SB1 environment.
this rule maps libtool's directory to the correct place.
|
|
- interrupting sb2-build-libtool while it was trying to download libtool
sources might have left the system to unstable state (wget seems to
create the output file before the connection has been established)
|
|
Really deep directory structure caused panic in sb2 preload library when
getcwd() returned NULL (which of course caused unexpected side-effects..)
This was fixed by allowing sb_decolonize_path() to return relative
paths, if getcwd() fails. This does happen in real life: Some "configure"
scripts create ultra-deep directory structures.
|
|
- mapping rules can now make replacements in the path to be mapped
(previously, the "map_to" action only performed mapping by prefixing
the original path)
- A new rule in the "maemo" mapping mode makes sure that /bin/sh is
mapped to /bin/bash; this fixes many problems on Ubuntu hosts (where
/bin/bash is dash, but maemo packages expect that it is bash)
|
|
- there is a new option "-C options" for sb2-init, for spefifying extra
options for the cross compiler. This can be used for example to give
"-fgnu89-inline" option to gcc 4.2.1.
- "sb2-init" now prints out existing configuration information (in addition
to usage, when started without any parameters).
- sb2.config has been modified (and config file version number has been
incremented): Added information about how, when & who executed sb2-init,
and things that were in SBOX_EXTRA_CROSS_COMPILER_ARGS have
been split to two variables.
|
|
- level "debug": shows if argv and/or envp has been changed
- level "noise": as above + logs all components of modified
string vectors.
- added SB_LOG_IS_ACTIVE(level) macro for testing if logging
has been enabled
|
|
It is now possible to add "readonly = true" to any mapping rule, and
the generated interface will then return an error code for any function
which is trying to modify the filesystem: The interface functions do not
call the real functions at all in this case, instead they will
return an error code (typically -1 for system calls, NULL for fopen() etc).
Also, errno will been set to appropriate value, typically to EROFS.
Other modifications:
- Added wrappers for fhchmod() [all platforms],
and chflags(), getattrlist(), and setattrlist [Mac OS X - untested!]
- Modified many of the wrapper specifications in interface.master
(hopefully found all functions that may modify the filesystem :-)
- Added new logging level "NOTICE", used for logging interface-generated
"read only errors"
- sb2-show now displays if the target has been marked "readonly" by the rules
- sb2-logz knows about "notice" messages
- added two new modifiers to gen-interface.pl (without these this R/O-thing
would not be possible at all)
- some minor code cleanups
|
|
- wrapper for eaccess() was missing, and that caused the built-in "test"
of bash to fail.
|
|
- a bug that was introduced to sb2-init after version 1.9.0.22 caused
host-gcc to fail, because incomplete configuration was written to sb2.config
- Version number of config files was incremented, to force people to reconfigure
(sorry about that, but it is necessary!)
- fixed also a minor bug in sb2 (related to logging)
|
|
Generated code can now log the return value (if the value is an int, long,
or pointer). Errno values and changes are also logged. This works for
all wrappers and gates.
The log level is defined in interface.master (by a new LOGLEVEL command).
Currently it is "noise" for all generated functions, so "-L noise" flag
needs to be given to "sb2" to make these new messages visible.
|
|
Experimental version
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
Fixes Maemo 2.x rootstraps.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
- new option "-Q BUGLIST" to sb2 (ex. sb2 -Q x)
- currently this can emulate:
x: scratchbox1 didn't check X-permission of files correctly,
|
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Remove magic map_to values "=" and "-", use regular variable
instead.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
simple is now just a copy of maemo, maybe we could live
with just one of them.
Removes complex mode, it didn't really work too well and
was a pain to maintain.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
This reduces the number of expensive string.match() calls.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
stop the madness!
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Simply edit your target.config:
export SBOX_CPUTRANSPARENCY_METHOD="/home/lleukkun/scratchbox2/bin/qemu-arm -s 512"
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Now it can be included by itself with no dependency to libsb2.h.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
sb2-show allows you to inspect how path/argv/envp mangling
would be done for a given binary. Patch by
lauri.t.aarnio@nokia.com, somewhat cleaned up by
lle@rahina.org.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
Debian/etch failed to run on Fedora 8, at least on amd64.
This fix makes the guest distro use the host's libraries
before its own. Not ideal, but so far nothing else seems
to work to any meaningful extent.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
- added sb2logz, which extracts information from logs and produces summaries
- general: log format changed (each line now contains log level, too)
- *.c: log messages which are needed by sb2logz are now at INFO level
- interface.master & libsb2.c: Added gates to _exit() and _Exit(),
so that exit status can be logged
- sb_exec.c: bugfix: sb_execve_mod() returns nonzero if error, not zero
- sb2: location of log files changed: logs now go to ~/sb2_logs/,
and initial environment is printed to the log file
|
|
This way regular development can be done for multilib target
without having to run configure all the time.
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
|
|
(the result was that not all functions were wrapped)
|
|
|
|
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|