Merge pull request #96 from kergoth/adjust-to-current-upstream

Adjust to current upstream layers
This commit is contained in:
Christopher Larson
2015-09-22 19:50:22 -07:00
2 changed files with 0 additions and 47 deletions

View File

@@ -1,44 +0,0 @@
inherit package
SOURCERY_QA = "host-user-contaminated"
# We need to test in fakeroot context to check file ownership
FAKEROOT_QA = "host-user-contaminated"
python () {
all_qa = d.getVar('ALL_QA', True).split()
fakeroot_qa = d.getVar('FAKEROOT_QA', True).split()
if any(f for f in fakeroot_qa if f in all_qa):
if not oe.utils.inherits(d, 'native', 'cross'):
d.setVarFlag('do_package_qa', 'fakeroot', '1')
d.appendVarFlag('do_package_qa', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
}
HOST_USER_UID := "${@os.getuid()}"
HOST_USER_UID[type] = "integer"
HOST_USER_GID := "${@os.getgid()}"
HOST_USER_GID[type] = "integer"
QAPATHTEST[host-user-contaminated] = "package_qa_check_host_user"
def package_qa_check_host_user(path, name, d, elf, messages):
"""Check for files outside of /home which are owned by the user running bitbake."""
if not os.path.lexists(path):
return
check_uid = oe.data.typed_value('HOST_USER_UID', d)
check_gid = oe.data.typed_value('HOST_USER_GID', d)
dest = d.getVar('PKGDEST', True)
home = os.path.join(dest, 'home')
if path == home or path.startswith(home + os.sep):
return
stat = os.lstat(path)
if stat.st_uid == check_uid:
messages["host-user-contaminated"] = "%s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (path, check_uid)
return False
if stat.st_gid == check_gid:
messages["host-user-contaminated"] = "%s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (path, check_gid)
return False
return True

View File

@@ -14,9 +14,6 @@ NO32LIBS ?= "0"
# sysroot and determine this accurately.
GLIBC_GENERATE_LOCALES_remove = "en_US.UTF-8"
# The binary locale files are common to the multilibs
localedir = "${exec_prefix}/lib/locale"
# No need to re-compile the locale files
GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "precompiled"
ENABLE_BINARY_LOCALE_GENERATION = ""