2011-06-02 22:15:26 +00:00
|
|
|
# Note: Due to the bitbake wrapper script, making changes to pseudo can be
|
|
|
|
# difficult. To work around the current version of the wrapper use:
|
|
|
|
# BBFETCH2=True PSEUDO_BUILD=1 ../bitbake/bin/bitbake pseudo-native [-c CMD]
|
|
|
|
|
2013-12-19 15:13:01 +00:00
|
|
|
SUMMARY = "Pseudo gives fake root capabilities to a normal user"
|
2012-07-27 21:54:48 +00:00
|
|
|
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
|
2011-02-10 10:34:40 +00:00
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
|
|
|
|
SECTION = "base"
|
|
|
|
LICENSE = "LGPL2.1"
|
|
|
|
DEPENDS = "sqlite3"
|
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
SRC_URI_append_class-nativesdk = " file://symver.patch"
|
2012-04-22 14:46:17 +00:00
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
SRC_URI_append_class-native = " file://symver.patch"
|
2012-07-27 21:54:48 +00:00
|
|
|
|
2013-10-29 04:54:03 +00:00
|
|
|
FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
|
|
|
|
FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
|
|
|
|
INSANE_SKIP_${PN} += "libdir"
|
|
|
|
INSANE_SKIP_${PN}-dbg += "libdir"
|
|
|
|
|
2011-02-10 10:34:40 +00:00
|
|
|
PROVIDES += "virtual/fakeroot"
|
|
|
|
|
2011-09-26 20:12:25 +00:00
|
|
|
MAKEOPTS = ""
|
|
|
|
|
2011-02-10 10:34:40 +00:00
|
|
|
inherit siteinfo
|
|
|
|
|
|
|
|
do_configure () {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
2012-04-13 12:35:16 +00:00
|
|
|
NO32LIBS ??= "1"
|
2014-02-12 12:11:34 +00:00
|
|
|
NO32LIBS_class-nativesdk = "1"
|
2011-02-10 10:34:40 +00:00
|
|
|
|
|
|
|
# Compile for the local machine arch...
|
|
|
|
do_compile () {
|
2012-04-19 22:01:09 +00:00
|
|
|
if [ "${SITEINFO_BITS}" = "64" ]; then
|
pseudo.inc: pseudo 1.5 uprev, support extra config flags
The pseudo 1.5 update is a moderately experimental set of changes
which ought to improve performance. With these changes, pseudo
uses an in-memory sqlite database which is lushed on exit,
the protocol is changed to reduce waiting for server responses,
and pseudo can suppress any and all fsync/fdatasync type operations.
This last feature is optional, and not on by default, so we need
to pass in an extra configure argument, but that argument wouldn't
be known to an older configure, so... Enter PSEUDO_EXTRA_OPTS which
is passed to configure, and which pseudo_1.5.bb sets by default to
"--enable-force-async". (I haven't added it in pseudo_git.bb, but
maybe it should be changed; I'm not quite as sure there.)
The justification for these changes is that, for most of the real-world
build cases I deal with, they produce a 25% or more reduction in the
build time of a project. This increases when a system is heavily
loaded.
(From OE-Core rev: 79ddb0c33401da442dbaa8e0d73ebacf297d9185)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 23:31:33 +00:00
|
|
|
${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
|
2011-06-02 22:15:26 +00:00
|
|
|
else
|
pseudo.inc: pseudo 1.5 uprev, support extra config flags
The pseudo 1.5 update is a moderately experimental set of changes
which ought to improve performance. With these changes, pseudo
uses an in-memory sqlite database which is lushed on exit,
the protocol is changed to reduce waiting for server responses,
and pseudo can suppress any and all fsync/fdatasync type operations.
This last feature is optional, and not on by default, so we need
to pass in an extra configure argument, but that argument wouldn't
be known to an older configure, so... Enter PSEUDO_EXTRA_OPTS which
is passed to configure, and which pseudo_1.5.bb sets by default to
"--enable-force-async". (I haven't added it in pseudo_git.bb, but
maybe it should be changed; I'm not quite as sure there.)
The justification for these changes is that, for most of the real-world
build cases I deal with, they produce a 25% or more reduction in the
build time of a project. This increases when a system is heavily
loaded.
(From OE-Core rev: 79ddb0c33401da442dbaa8e0d73ebacf297d9185)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 23:31:33 +00:00
|
|
|
${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
|
2011-06-02 22:15:26 +00:00
|
|
|
fi
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake ${MAKEOPTS}
|
2011-02-10 10:34:40 +00:00
|
|
|
}
|
|
|
|
|
2013-07-26 12:49:36 +00:00
|
|
|
maybe_make32() {
|
|
|
|
# We probably don't need to build 32-bit binaries.
|
|
|
|
make32=false
|
|
|
|
if [ "${SITEINFO_BITS}" = "64" ]; then
|
|
|
|
case "${NO32LIBS}" in
|
|
|
|
0) make32=true
|
|
|
|
;;
|
|
|
|
1) make32=false
|
|
|
|
;;
|
|
|
|
*) # If unset, build 32-bit if we think we can.
|
|
|
|
if [ -e "/usr/include/gnu/stubs-32.h" ]; then
|
|
|
|
make32=true
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
if $make32; then
|
|
|
|
if ! [ -e "/usr/include/gnu/stubs-32.h" ]; then
|
2013-09-26 10:41:36 +00:00
|
|
|
warn_32bit_missing
|
2013-07-26 12:49:36 +00:00
|
|
|
else
|
2013-09-26 10:41:35 +00:00
|
|
|
bbnote "Attempting to build 32-bit libpseudo.so for ${PN}."
|
2013-07-26 12:49:36 +00:00
|
|
|
fi
|
|
|
|
else
|
2013-09-26 10:41:35 +00:00
|
|
|
bbnote "Building/installing only 64-bit libpseudo.so for ${PN}."
|
|
|
|
bbnote "If you need to run 32-bit executables, ensure that NO32LIBS is set to 0."
|
2013-07-26 12:49:36 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-09-26 10:41:36 +00:00
|
|
|
warn_32bit_missing() {
|
|
|
|
bbwarn "Can't find stubs-32.h, but usually need it to build 32-bit libpseudo."
|
|
|
|
bbwarn "If the build fails, install 32-bit developer packages."
|
|
|
|
bbwarn "If you are using 32-bit binaries, the 32-bit libpseudo is NOT optional."
|
|
|
|
}
|
|
|
|
|
2011-02-10 10:34:40 +00:00
|
|
|
# Two below are the same
|
|
|
|
# If necessary compile for the alternative machine arch. This is only
|
|
|
|
# necessary in a native build.
|
2012-10-27 08:48:17 +00:00
|
|
|
do_compile_prepend_class-native () {
|
2013-07-26 12:49:36 +00:00
|
|
|
maybe_make32
|
|
|
|
if $make32; then
|
2011-02-10 10:34:40 +00:00
|
|
|
# We need the 32-bit libpseudo on a 64-bit machine...
|
2013-07-26 12:49:36 +00:00
|
|
|
# Note that this is not well-tested outside of x86/x86_64.
|
2012-08-17 21:24:52 +00:00
|
|
|
|
|
|
|
# if we're being rebuilt due to a dependency change, we need to make sure
|
|
|
|
# everything is clean before we configure and build -- if we haven't previously
|
|
|
|
# built this will fail and be ignored.
|
|
|
|
make ${MAKEOPTS} distclean || :
|
|
|
|
|
pseudo.inc: pseudo 1.5 uprev, support extra config flags
The pseudo 1.5 update is a moderately experimental set of changes
which ought to improve performance. With these changes, pseudo
uses an in-memory sqlite database which is lushed on exit,
the protocol is changed to reduce waiting for server responses,
and pseudo can suppress any and all fsync/fdatasync type operations.
This last feature is optional, and not on by default, so we need
to pass in an extra configure argument, but that argument wouldn't
be known to an older configure, so... Enter PSEUDO_EXTRA_OPTS which
is passed to configure, and which pseudo_1.5.bb sets by default to
"--enable-force-async". (I haven't added it in pseudo_git.bb, but
maybe it should be changed; I'm not quite as sure there.)
The justification for these changes is that, for most of the real-world
build cases I deal with, they produce a 25% or more reduction in the
build time of a project. This increases when a system is heavily
loaded.
(From OE-Core rev: 79ddb0c33401da442dbaa8e0d73ebacf297d9185)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 23:31:33 +00:00
|
|
|
./configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
|
2013-09-26 10:41:36 +00:00
|
|
|
save_traps=$(trap)
|
|
|
|
trap 'warn_32bit_missing' 0
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake ${MAKEOPTS} libpseudo
|
2013-09-26 10:41:36 +00:00
|
|
|
eval "$save_traps"
|
2011-02-10 10:34:40 +00:00
|
|
|
# prevent it from removing the lib, but remove everything else
|
2011-09-26 20:12:25 +00:00
|
|
|
make 'LIB=foo' ${MAKEOPTS} distclean
|
2011-02-10 10:34:40 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
do_compile_prepend_class-nativesdk () {
|
2013-07-26 12:49:36 +00:00
|
|
|
maybe_make32
|
|
|
|
if $make32; then
|
|
|
|
# We need the 32-bit libpseudo on a 64-bit machine.
|
|
|
|
# Note that this is not well-tested outside of x86/x86_64.
|
pseudo.inc: pseudo 1.5 uprev, support extra config flags
The pseudo 1.5 update is a moderately experimental set of changes
which ought to improve performance. With these changes, pseudo
uses an in-memory sqlite database which is lushed on exit,
the protocol is changed to reduce waiting for server responses,
and pseudo can suppress any and all fsync/fdatasync type operations.
This last feature is optional, and not on by default, so we need
to pass in an extra configure argument, but that argument wouldn't
be known to an older configure, so... Enter PSEUDO_EXTRA_OPTS which
is passed to configure, and which pseudo_1.5.bb sets by default to
"--enable-force-async". (I haven't added it in pseudo_git.bb, but
maybe it should be changed; I'm not quite as sure there.)
The justification for these changes is that, for most of the real-world
build cases I deal with, they produce a 25% or more reduction in the
build time of a project. This increases when a system is heavily
loaded.
(From OE-Core rev: 79ddb0c33401da442dbaa8e0d73ebacf297d9185)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 23:31:33 +00:00
|
|
|
./configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake ${MAKEOPTS} libpseudo
|
2011-02-10 10:34:40 +00:00
|
|
|
# prevent it from removing the lib, but remove everything else
|
2011-09-26 20:12:25 +00:00
|
|
|
make 'LIB=foo' ${MAKEOPTS} distclean
|
2011-02-10 10:34:40 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install () {
|
2011-09-26 20:12:25 +00:00
|
|
|
oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
|
2011-02-10 10:34:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Two below are the same
|
|
|
|
# If necessary install for the alternative machine arch. This is only
|
|
|
|
# necessary in a native build.
|
2012-10-27 08:48:17 +00:00
|
|
|
do_install_append_class-native () {
|
2013-07-26 12:49:36 +00:00
|
|
|
maybe_make32
|
|
|
|
if $make32; then
|
2011-02-10 10:34:40 +00:00
|
|
|
mkdir -p ${D}${prefix}/lib/pseudo/lib
|
|
|
|
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
do_install_append_class-nativesdk () {
|
2013-07-26 12:49:36 +00:00
|
|
|
maybe_make32
|
|
|
|
if $make32; then
|
2011-02-10 10:34:40 +00:00
|
|
|
mkdir -p ${D}${prefix}/lib/pseudo/lib
|
|
|
|
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|