summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-03-14increase version numbers to .241.99.0.24Lauri Leukkunen2-1/+5
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-03-14oops; fixed typos in mapping rules.Lauri Aarnio2-9/+9
- replaced "tools_root" by "tools"; the former works fine only when the tools root environment variable is set, while the latter works always.
2008-03-14Updates to path mapping code and mapping modesLauri Aarnio5-82/+401
- "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.
2008-03-14sb_decolonize_path() bugfix: slashdot makes sense nowLauri Aarnio1-1/+4
- 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)
2008-03-14sb2-monitor now appends libsb2 to an existing LD_PRELOAD variableLauri Aarnio1-3/+28
- 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.
2008-03-14Refactored sb2's dpkg-checkbuilddeps wrapper.Lauri Aarnio7-46/+617
- 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
2008-03-14Important bugfix: Renaming of symlinksLauri Aarnio1-0/+2
- 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.
2008-03-14Fix to fts_open()Lauri Aarnio1-1/+1
- the new path name array to the real fts_open() is now properly terminated by a NULL pointer.
2008-03-14Important bugfix to libpthread interfaceLauri Aarnio2-7/+105
- 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)
2008-03-09Depend on "make clean" for cleanupRiku Voipio1-9/+3
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2008-03-09Updated to use newer libtool version (1.5.26)Lauri Aarnio1-1/+1
2008-03-09Update to latest policy (use Homepage: tag)Riku Voipio1-2/+2
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2008-03-09sb2-show needs libsb2Riku Voipio1-2/+3
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>
2008-03-09Make multilib target use install targetRiku Voipio1-5/+3
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>
2008-03-09Bugfix: LD_PRELOAD in now set by sb2-monitor, not by the "sb2" scriptLauri Aarnio2-4/+16
- setting LD_PRELOAD too early caused sb2-monitor to fail, when "emulate" mode was requested.
2008-02-14map /usr/X11R6/include to target root in maemo modeLauri Leukkunen1-0/+1
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-02-12Fix multilib compilation1.99.0.23Lauri Leukkunen1-1/+2
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-02-12Print statistics after sb2 finishes (and/or error+warning messages)Lauri Aarnio7-26/+657
- 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.
2008-02-12Added a SB1 compatibility mapping rule to maemo modeLauri Aarnio1-0/+12
- some source packages seem to have hardcoded links to the SB1 environment. this rule maps libtool's directory to the correct place.
2008-02-12Minor bugfix (sb2-build-libtool)Lauri Aarnio1-1/+3
- 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)
2008-02-12Fixed a critical path mapping bugLauri Aarnio1-16/+31
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.
2008-02-12Added "replace_by" action to path mapping engineLauri Aarnio2-0/+13
- 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)
2008-02-12sb2-init improvementsLauri Aarnio3-6/+67
- 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.
2008-01-31Logging enhancements: show changes made to argv+envpLauri Aarnio2-1/+57
- 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
2008-01-31Introduced R/O mapping mode.Lauri Aarnio13-159/+389
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
2008-01-31Bugfix: added wrapper for eaccess()Lauri Aarnio1-0/+2
- wrapper for eaccess() was missing, and that caused the built-in "test" of bash to fail.
2008-01-31A fix for host-gcc parameter generationLauri Aarnio2-4/+4
- 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)
2008-01-23Modified interface generator to create SB_LOG calls at returns.Lauri Aarnio2-15/+78
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.
2008-01-21Add scripts to use the qemu-sbrsh bridgeRiku Voipio3-0/+138
Experimental version Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2008-01-18Map /usr/X11R6/lib in maemo modeLauri Leukkunen1-0/+1
Fixes Maemo 2.x rootstraps. Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-18Introduce SB1 bug emulation modeLauri Aarnio2-10/+44
- new option "-Q BUGLIST" to sb2 (ex. sb2 -Q x) - currently this can emulate: x: scratchbox1 didn't check X-permission of files correctly,
2008-01-18sb2-init allows specifying entire cputransparency commandLauri Leukkunen2-36/+10
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-18Simplify path mapping codeLauri Leukkunen4-70/+39
Remove magic map_to values "=" and "-", use regular variable instead. Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-18gitignore utils/sb2-showLauri Leukkunen1-0/+1
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-18Separate gcc argv mangling rule generation to argvenvp_gcc.luaLauri Leukkunen2-133/+164
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-14Make rest of the mapping modes work with mapping.lua changesLauri Leukkunen8-446/+64
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>
2008-01-14Optimize mappings by adding simple prefix checkLauri Leukkunen2-106/+90
This reduces the number of expensive string.match() calls. Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-11replace iswhitespace() with standard isspace()Lauri Leukkunen1-14/+5
stop the madness! Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-11Implement arguments for CPUTRANSPARENCY_METHODLauri Leukkunen2-16/+105
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>
2008-01-11Fix -Wno-poison-system-directories checkLauri Leukkunen1-1/+1
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-11Make exported.h generated by gen-interface.pl to be a proper header fileLauri Leukkunen3-4/+40
Now it can be included by itself with no dependency to libsb2.h. Signed-off-by: Lauri Leukkunen <lle@rahina.org>
2008-01-11Introduce sb2-show, cleanup some warningsLauri Leukkunen15-57/+354
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>
2008-01-03Fix tool distro supportLauri Leukkunen2-6/+12
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>
2008-01-03Added log post-processing tool and improved logging messages.Lauri Aarnio11-19/+624
- 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
2008-01-03Split configure step from building for multilibLauri Leukkunen2-21/+20
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>
2008-01-02bugfix: fixed typos in macro namesLauri Aarnio1-8/+8
(the result was that not all functions were wrapped)
2007-12-28Bashism detected! Changed shell in utils/dpkg-checkbuilddepsJanne J Kataja1-1/+1
2007-12-28Clean up sb2 script and speed up running sb2 scriptRiku Voipio2-15/+22
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2007-12-28changelog updateRiku Voipio1-0/+8
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2007-12-19Add IA64 and powerpc host supportRiku Voipio1-3/+10
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>