Age | Commit message (Collapse) | Author |
|
The automatic path fixups invoked for names which end in the string
"path" was still applying to link(), which then called linkat(),
which would do the same path fixups; if you were chrooted, this would
produce bogus paths. On systems which actually have linkat(), this
would produce the even more mysterious behavior that the link would
succeed, but the following stat would fail.
Solution: Change the wrapfuncs prototypes for link() so it doesn't
invoke automatic path name fixups.
|
|
Fixed up the libdir stuff in a saner way, fixed the @GLIBC_2.7 thing,
want to avoid any risk of someone having a stale archive.
|
|
There's a few circumstances where sqlite's libdir isn't the same as
the directory name we want to use for libpseudo.so, so make it a
separate setting. This may obviate the need for --with-static-sqlite.
Signed-off-by: seebs <peter.seebach@windriver.com>
|
|
|
|
It turns out that the -L usage mostly doesn't matter (usually something
else has requested the right directory, or it's the default), but the
explicit path to libsqlite3.a hardcoded "lib", and on some systems
it should be something else, such as "lib64". Solution: Use $(LIB) for
that directory.
Note that this may not resolve things if, say, you're doing MIPS n32 on a
target where that lives in /usr/lib32, but I think in that case you'd
be specifying $libdir, so it should still work out.
Also added --with-static-sqlite=/path as an option in case people need
to further outsmart this.
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
|
|
The _plain thing was added because of clashes between Linux
("struct stat64 for 64-bit file sizes") and Darwin ("struct stat
is already 64 bits"). But it turns out not to be enough,
because stat will *fail* if it cannot represent a file size,
so when something like unlinkat() calls a non-64-bit stat in
order to determine whether a file exists, it gets the wrong
answer if the file is over 2GB in size.
Solution: Continue using PSEUDO_STATBUF, and also provide
defines for base_stat() which can be either real_stat() or
real_stat64(), etcetera.
This eliminates any reason to need the _plain functions. It
also suggests that the other real___fxstatat() calls should
someday go away because that is an ugly, ugly, implementation
detail.
As part of testing this, fix up some bitrot which affected
Darwin (such as the continue outside of a loop, but inside
an #ifdef; that was left over from the conversion of
init_one_wrapper to a separate function).
|
|
Instead of using .tgz, use .tar.bz2 (and change czf to cjf). This makes
life easier for Yocto.
|
|
|
|
Pseudo should never have been the one picking -m32/-m64. That should be
coming from the build system in some way. Deprecate --arch, add --cflags.
|
|
Enough changes to justify a tag.
|
|
Long story short: ARM doesn't use -m32 and -m64, so make those
a little more dependent. We'll probably rework this completely "soon"
as we mess with more targets and x32 becomes an issue.
|
|
|
|
Some systems prefer to avoid messing with LD_LIBRARY_PATH as much,
and instead link sqlite statically.
|
|
In OE-Core we need to be able to configure for both 32-bit and 64-bit
libpseudo libraries. In order to avoid some complex manipulations,
we adjust the configure and Makefile to facilitate this.
Upstream-Status: Submitted
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
|
|
|
|
|
|
|
The way multilib works on at least Fedora is that --libdir=$prefix/lib64
is passed to configure. The source build system should not attempt to
guess at architecture or take other configure flags (like --bits); instead
it should default to whatever the given $(CC) does.
This patch preserves the ability to specify --bits however.
|
|
This is a spiffied-up rebase of a bunch of intermediate changes, presented
as a whole because it is, surprisingly, less confusing that way. The basic
idea is to separate the guts code into categories ranging from generic
stuff that can be the same everywhere and specific variants. The big scary
one is the Darwin support, which actually seems to run okay on 64-bit OS X
10.6. (No other variants were tested.) The other example given is support
for the old clone() syscall on RHEL 4, which affects some wrlinux use cases.
There's a few minor cleanup bits here, such as a function with inconsistent
calling conventions, but nothing really exciting.
|
|
|
|
|
|
|
|
before pseudo_tables.h existed. Fixed.
|
|
are generated from text files and templates, making it now (we hope)
impossible for the list of strings to get out of sync with the
enum.
|
|
in an incoming "maketables".)
|
|
one.
There's a long story here, but to abbreviate it:
The shell script was annoying at best to maintain and starting to
show signs of not really being the right tool for the job. For
various reasons, we have some other Python stuff in our build system,
so we picked Python as the language we were already using for other
stuff. We think this works with anything reasonably recent (around
Python 2.4 through 2.6).
There's a little bit of cleanup, also, of the wrapper templates.
|
|
in one place, but then often reuse them in other project directories.
As a result, the --with-sqlite path is no longer the right path to
use for RPATH later in the program's life. In the past, we were
using chrpath to change the path to something more suitable, but this
doesn't work if the new path is longer.
Instead, allow an explicit --with-rpath setting which our build
system can use. The logic is:
* If you don't specify --with-sqlite or --with-rpath, you get
no -Wl,-R
* If you specify an empty path in --with-rpath, or --without-rpath,
you get no -Wl,-R
* If you specify --with-rpath with a non-empty path, you get
-Wl,-R<path>
* If you specify --with-sqlite, but not --with-rpath, you get
-Wl,-R$(SQLITE)/lib
|
|
in the default location.
|
|
|
|
Add local variable cache via get_value and set_value. The local cache
is setup at constructor time (or soon after).
Rewrite the pseudo_setupenv and pseudo_dropenv routines, add a new
pseudo_setupenvp and pseudo_dropenvp as well to handle the execve
cases.
We can now successfully use /usr/bin/env -i env and get pseudo values
back!
|
|
Add rules for 'pseudo', 'pseudodb', 'pseudolog' and 'libpseudo'.
|
|
Add PSEUDO_BINDIR, PSEUDO_LIBDIR, and PSEUDO_LOCALSTATEDIR to allow for more
easy customization of PSEUDO components at run-time. If these are not set
they will be automatically generated based on the existing PSEUDO_PREFIX path.
PSEUDO_BINDIR = PSEUDO_PREFIX /bin
PSEUDO_LIBDIR = PSEUDO_PREFIX /lib
PSEUDO_LOCALSTATEDIR = PSEUDO_PREFIX /var/pseudo
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
|
CFLAGS is set by many autobuilder systems. In these environments we may
need both the internal flags pseudo expects and the autobuilder flags.
Adjust the Makefile accordingly.
Based on code from Richard Purdie 2010-03-18 in Poky Linux.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
|
Add a missing dependency from pseudo_wrapfuncs.h to wrappers.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
|
When generating binaries for the bin directory, they were not properly
configured to generate the bin dir. Also sync up and generate the
lib dir and localstatedir as well...
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
|
CQ: WIND00225366
A simple test harness that runs all the scripts in the test
directory. Each test script is run inside pseudo and uses exit status
to report back whether the test was successful. The script uses the
build executables, not the installed ones and each test run starts
with an empty database.
|
|
The PSEUDO_SUFFIX thing is an installation quirk to allow our
build system to tag libpseudo.so with a checksum of the host libc.
However, we reuse a prebuilt pseudo server with the new pseudo
libraries; this means that encoding the suffix in the environment
hackery is a Bad Idea.
Update version number to 0.3, since this seems to wrap up a
hunk of development effort.
|
|
|
|
It is possible for the database to get out of sync with the
filesystem. Detecting this after the fact can be hard. Provide a
hook for requesting a check.
Also merge in some LD_LIBRARY_PATH fixes.
|
|
Migrate the stable part of the wrapper code (not machine-generated)
out of makewrappers, to make it easier to maintain.
|
|
None of them seem to have been genuine problems, but it's prettier now,
and some were questionable.
|
|
* Improve makewrappers handling of function pointer arguments.
* Regenerate wrappers when makewrappers is touched.
* Move path resolution from pseudo_client_op into wrapper
functions.
* Eliminate dependency on PATH_MAX.
* Related cleanup, such as tracking CWD better, and using
the tracked value for getcwd().
|
|
|