M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
@@ -0,0 +1,83 @@
# 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]
DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
HOMEPAGE = "http://wiki.github.com/wrpseudo/pseudo/"
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
SECTION = "base"
LICENSE = "LGPL2.1"
DEPENDS = "sqlite3"
FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo"
FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
PROVIDES += "virtual/fakeroot"
# In the nativesdk case, we'll already search the searchpaths
# pseudo tries to build in so override RPATH
MAKEOPTS = ""
MAKEOPTS_virtclass-nativesdk = "'RPATH='"
inherit siteinfo
do_configure () {
:
}
NO32LIBS ??= "0"
# Compile for the local machine arch...
do_compile () {
if [ "${SITEINFO_BITS}" == "64" ]; then
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
else
${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
fi
oe_runmake ${MAKEOPTS}
}
# Two below are the same
# If necessary compile for the alternative machine arch. This is only
# necessary in a native build.
do_compile_prepend_virtclass-native () {
if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
# We need the 32-bit libpseudo on a 64-bit machine...
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
oe_runmake ${MAKEOPTS} libpseudo
# prevent it from removing the lib, but remove everything else
make 'LIB=foo' ${MAKEOPTS} distclean
fi
}
do_compile_prepend_virtclass-nativesdk () {
if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
# We need the 32-bit libpseudo on a 64-bit machine...
./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
oe_runmake ${MAKEOPTS} libpseudo
# prevent it from removing the lib, but remove everything else
make 'LIB=foo' ${MAKEOPTS} distclean
fi
}
do_install () {
oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
}
# Two below are the same
# If necessary install for the alternative machine arch. This is only
# necessary in a native build.
do_install_append_virtclass-native () {
if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
mkdir -p ${D}${prefix}/lib/pseudo/lib
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
fi
}
do_install_append_virtclass-nativesdk () {
if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
mkdir -p ${D}${prefix}/lib/pseudo/lib
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
fi
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,58 @@
configure: Fix configuration to match OE-Core requirements
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>
diff --git a/Makefile.in b/Makefile.in
index 6c57d43..342d066 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,7 +27,7 @@ MARK64=@MARK64@
RPATH=@RPATH@
VERSION=1.1.1
-LIB=$(shell basename $(LIBDIR))
+LIB=@LIB@
BIN=bin
LOCALSTATE=var/pseudo
BINDIR=$(PREFIX)/$(BIN)
diff --git a/configure b/configure
index 9a480fb..eeb19f3 100755
--- a/configure
+++ b/configure
@@ -80,14 +80,18 @@ if [ -z "$opt_prefix" ]; then
usage
fi
-if [ -n "$opt_bits" ] && [ -n "$opt_libdir" ]; then
- echo >&2 "Can not specify both --libdir and --bits"
- exit 1
-fi
if [ -z "$opt_libdir" ]; then
opt_libdir=$opt_prefix/lib$opt_mark64
fi
+# We need to find the libdir relative to the prefix, this is required
+# by the code in pseudo-utils.c that handles relocation.
+opt_lib=${opt_libdir#$opt_prefix/}
+if [ "$opt_lib" = "$opt_libdir" ]; then
+ echo >&2 "libdir must be relative to prefix."
+ exit 1
+fi
+
if [ ! -f "${opt_sqlite}/include/sqlite3.h" ]; then
echo >&2 "SQLite3 headers not found in at ${opt_sqlite}/include/sqlite3.h. Please check that SQLite3 and SQLite3 headers are installed."
exit 1
@@ -107,6 +111,7 @@ fi
sed -e '
s,@PREFIX@,'"$opt_prefix"',g
s,@LIBDIR@,'"$opt_libdir"',g
+ s,@LIB@,'"$opt_lib"',g
s,@SUFFIX@,'"$opt_suffix"',g
s,@SQLITE@,'"$opt_sqlite"',g
s!@RPATH@!'"$opt_rpath"'!g
@@ -0,0 +1,17 @@
Due to disabling the LD_LIBRARY_PATH handling, we need to use a static
libsqlite.
Upstream-Status: Inappropriate [configuration]
diff -ur git.orig/Makefile.in git/Makefile.in
--- git.orig/Makefile.in
+++ git/Makefile.in
@@ -55,7 +55,7 @@
# needed for anything that links with pseduo_client.o, pretty much
CLIENT_LDFLAGS=-ldl -lpthread
-DB_LDFLAGS=-lsqlite3 -lpthread
+DB_LDFLAGS=$(SQLITE)/lib/libsqlite3.a -lpthread
PSEUDO=$(BIN)/pseudo
PSEUDODB=$(BIN)/pseudodb
@@ -0,0 +1,10 @@
require pseudo.inc
PR = "r4"
SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
file://oe-config.patch \
file://static_sqlite.patch"
SRC_URI[md5sum] = "a2819084bab7e991f06626d02cf55048"
SRC_URI[sha256sum] = "4749a22df687f44d24c26e97170d4781a1bd52d5ee092364a40877e4d96ff058"
@@ -0,0 +1,14 @@
require pseudo.inc
SRCREV = "17c2233f93692f79684792750001ee6d13e03925"
PV = "1.2+git${SRCPV}"
PR = "r20"
DEFAULT_PREFERENCE = "-1"
SRC_URI = "git://github.com/wrpseudo/pseudo.git;protocol=git \
file://oe-config.patch \
file://static_sqlite.patch"
S = "${WORKDIR}/git"