Revised patch set for fixing owners/groups
cover Revised patch set for fixing owners/groups
This is a revised patch set for fixing the owners/groups. It adds a local intercrepter routine for "chown" that runs only with native and nativesdk packages.
Also update the rejected python patch to fix only the gobject item.
The following changes since commit ad098e40e8c57727892819e131bf18308bf244d2:
packagedata.py: Fix read_subpkgdata_dict() (2011-06-23 16:01:20 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/recipe-fixup
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/perms
Mark Hatle (9):
native/nativesdk: Add a simple chown intercept command
resolveconf: Fix file owners
base-passwd: Fix owners/groups
ghostscript: Fix owner/group of /etc/cups
libtirpc: Fix owner/group of /etc/netconfig
tzdata: Ensure all files are owned by root:root
gnome-doc-utils: Fix the owner/group on select files
db: Fix file ownership
python: Add python to the dependency to pygobject
meta/classes/native.bbclass | 2 ++ meta/classes/nativesdk.bbclass | 2 ++ .../resolvconf/resolvconf_1.48.bb | 3 ++- .../recipes-core/base-passwd/base-passwd_3.5.22.bb | 10 +++++----- .../python/python-pygobject_2.27.91.bb | 4 ++-- .../ghostscript/ghostscript_9.02.bb | 4 +++- meta/recipes-extended/libtirpc/libtirpc_0.2.1.bb | 6 +++++- meta/recipes-extended/tzdata/tzdata_2011g.bb | 4 ++-- meta/recipes-gnome/gnome/gnome-doc-utils.inc | 3 +++ meta/recipes-gnome/gnome/gnome-doc-utils_0.20.6.bb | 2 +- meta/recipes-support/db/db_5.1.19.bb | 2 ++ scripts/native-intercept/chown | 2 ++ 12 files changed, 31 insertions(+), 13 deletions(-) create mode 100755 scripts/native-intercept/chown
Signature · 1 line
1.7.3.4
PATCH 1/9 native/nativesdk: Add a simple chown intercept command
During native and nativesdk package we want to intercept any calls to chown and do nothing. This prevents errors and allows the same recipes to be used for both native and target recipes.
--- meta/classes/native.bbclass | 2 ++ meta/classes/nativesdk.bbclass | 2 ++ scripts/native-intercept/chown | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) create mode 100755 scripts/native-intercept/chown
meta/classes/native.bbclass +2 -0
@@ -85,6 +85,8 @@ EXTRA_NATIVE_PKGCONFIG_PATH ?= "" PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" PKG_CONFIG_SYSROOT_DIR = "" +PATH =. "${COREBASE}/scripts/native-intercept:" + python native_virtclass_handler () { if not isinstance(e, bb.event.RecipePreFinalise): return
meta/classes/nativesdk.bbclass +2 -0
@@ -54,6 +54,8 @@ FILES_${PN}-dbg += "${prefix}/.debug \ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" +PATH =. "${COREBASE}/scripts/native-intercept:" + python nativesdk_virtclass_handler () { if not isinstance(e, bb.event.RecipePreFinalise): return
scripts/native-intercept/chown new file +2 -0
@@ -0,0 +1,2 @@ +#! /bin/sh +echo "Intercept $0: $@ -- do nothing"
Signature · 1 line
1.7.3.4
PATCH 2/9 resolveconf: Fix file owners
In reply to Mark HatleThe file ownership of various configuration files needs to be set to root:root otherwise it inherits the user id of the build.
--- .../resolvconf/resolvconf_1.48.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb +2 -1
@@ -11,7 +11,7 @@ AUTHOR = "Thomas Hood" HOMEPAGE = "http://packages.debian.org/resolvconf" DEPENDS = "bash" RDEPENDS_${PN} = "bash" -PR = "r0" +PR = "r1" SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.gz"
@@ -27,6 +27,7 @@ do_install () { install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${base_sbindir} ${D}${localstatedir}/volatile/run/resolvconf/interface install -d ${D}${mandir}/man8 ${D}${docdir}/${P} cp -pPR etc/* ${D}${sysconfdir}/ + chown -R root:root ${D}${sysconfdir}/ install -m 0755 bin/resolvconf ${D}${base_sbindir}/ install -m 0644 README ${D}${docdir}/${P}/ install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
Signature · 1 line
1.7.3.4
PATCH 3/9 base-passwd: Fix owners/groups
In reply to Mark HatleFix the owners and groups of specific files copied from the developmen tree. This resolves an issue where those files gain the user/group id of the build user.
--- .../recipes-core/base-passwd/base-passwd_3.5.22.bb | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb +5 -5
@@ -1,7 +1,7 @@ SUMMARY = "Base system master password/group files." DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group). The update-passwd tool is also provided to keep the system databases synchronized with these master files." SECTION = "base" -PR = "r2" +PR = "r3" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
@@ -21,16 +21,16 @@ SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst" do_install () { install -d -m 755 ${D}${sbindir} - install -p -m 755 update-passwd ${D}${sbindir}/ + install -o root -g root -p -m 755 update-passwd ${D}${sbindir}/ install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8 install -p -m 644 man/update-passwd.8 ${D}${mandir}/man8/ install -p -m 644 man/update-passwd.pl.8 \ ${D}${mandir}/pl/man8/update-passwd.8 gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/* install -d -m 755 ${D}${datadir}/base-passwd - install -p -m 644 passwd.master ${D}${datadir}/base-passwd/ - install -p -m 644 group.master ${D}${datadir}/base-passwd/ - install -p -m 644 ${S}/../login.defs ${D}${datadir}/base-passwd/login.defs + install -o root -g root -p -m 644 passwd.master ${D}${datadir}/base-passwd/ + install -o root -g root -p -m 644 group.master ${D}${datadir}/base-passwd/ + install -o root -g root -p -m 644 ${S}/../login.defs ${D}${datadir}/base-passwd/login.defs install -d -m 755 ${D}${docdir}/${PN} install -p -m 644 debian/changelog ${D}${docdir}/${PN}/
Signature · 1 line
1.7.3.4
PATCH 4/9 ghostscript: Fix owner/group of /etc/cups
In reply to Mark Hatle/etc/cups is owned by root:lp from the cups package, the associated ghostscript was creating the /etc/cups directory as root:root. /etc/cups is the authoritative source.
--- .../ghostscript/ghostscript_9.02.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-extended/ghostscript/ghostscript_9.02.bb +3 -1
@@ -15,7 +15,7 @@ SECTION = "console/utils" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24" -PR = "r2" +PR = "r3" DEPENDS = "${PN}-native tiff jpeg fontconfig cups" DEPENDS_virtclass-native = ""
@@ -57,6 +57,8 @@ do_install_append () { mkdir -p ${D}${datadir}/ghostscript/${PV}/ cp -r Resource ${D}${datadir}/ghostscript/${PV}/ cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/ + + chown -R root:lp ${D}${sysconfdir}/cups } python do_patch_virtclass-native () {
Signature · 1 line
1.7.3.4
PATCH 5/9 libtirpc: Fix owner/group of /etc/netconfig
In reply to Mark Hatle--- meta/recipes-extended/libtirpc/libtirpc_0.2.1.bb | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
meta/recipes-extended/libtirpc/libtirpc_0.2.1.bb +5 -1
@@ -7,7 +7,7 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=1c32c8e351f97e43e1ad6cf7f62de3bf \ file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" -PR = "r0" +PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/libtirpc/libtirpc-${PV}.tar.bz2"
@@ -15,3 +15,7 @@ SRC_URI[md5sum] = "d77eb15f464bf9d6e66259eaf78b2a4e" SRC_URI[sha256sum] = "ea77cadd63941fc4edbee7863d2c7094e6a18263d2a2c8922319aee91352ff41" inherit autotools + +do_install_append() { + chown root:root ${D}${sysconfdir}/netconfig +}
Signature · 1 line
1.7.3.4
Re: [PATCH 5/9] libtirpc: Fix owner/group of /etc/netconfig
Op 23 jun 2011, om 20:19 heeft Mark Hatle het volgende geschreven:
Quoted 3 lines
Signed-off-by Mark Hatle <[email protected]>---
meta/recipes-extended/libtirpc/libtirpc_0.2.1.bb | 6 +++++-
Not related to this patch, but 0.2.2 is out and we'll need some more updates for (e)glibc 2.14
Re: [PATCH 5/9] libtirpc: Fix owner/group of /etc/netconfig
Quoted 10 lines · Koen Kooi
Op 23 jun 2011, om 20:19 heeft Mark Hatle het volgende geschreven:
Quoted 3 lines
Signed-off-by Mark Hatle <[email protected]>---
meta/recipes-extended/libtirpc/libtirpc_0.2.1.bb | 6 +++++-Not related to this patch, but 0.2.2 is out and we'll need some more updates for (e)glibc 2.14
yes I already have 0.2.2 lined up.
Quoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 6/9 tzdata: Ensure all files are owned by root:root
In reply to Mark Hatle--- meta/recipes-extended/tzdata/tzdata_2011g.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/tzdata/tzdata_2011g.bb +2 -2
@@ -6,7 +6,7 @@ LICENSE = "PD" LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234" DEPENDS = "tzcode-native" -PR = "r0" +PR = "r1" RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \ timezone-arctic timezone-asia timezone-atlantic \
@@ -42,7 +42,7 @@ do_install () { # libc is removing zoneinfo files from package cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo - + chown -R root:root ${D} } # Packages primarily organized by directory with a major city
Signature · 1 line
1.7.3.4
PATCH 7/9 gnome-doc-utils: Fix the owner/group on select files
In reply to Mark HatleAll of the files in ${datadir}/xml/gnome/xslt were being given the uid/gid of the build user. Fix this for the target case, avoid it in the native.
--- meta/recipes-gnome/gnome/gnome-doc-utils.inc | 3 +++ meta/recipes-gnome/gnome/gnome-doc-utils_0.20.6.bb | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-)
meta/recipes-gnome/gnome/gnome-doc-utils.inc +3 -0
@@ -9,6 +9,9 @@ EXTRA_OECONF = "--disable-scrollkeeper" do_install_append() { mkdir -p ${D}${datadir}/xml/gnome/xslt/ cp -pPr ${S}/xslt/* ${D}${datadir}/xml/gnome/xslt/ + + echo ${PATH} + chown -R root:root ${D} } FILES_${PN} += "${datadir}/xml*"
meta/recipes-gnome/gnome/gnome-doc-utils_0.20.6.bb +1 -1
@@ -1,7 +1,7 @@ require gnome-doc-utils.inc LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \ file://COPYING.LGPL;md5=a6f89e2100d9b6cdffcea4f398e37343" -PR = "r0" +PR = "r1" SRC_URI += "file://xsltproc_nonet.patch"
Signature · 1 line
1.7.3.4
PATCH 8/9 db: Fix file ownership
In reply to Mark Hatle--- meta/recipes-support/db/db_5.1.19.bb | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
meta/recipes-support/db/db_5.1.19.bb +2 -0
@@ -98,6 +98,8 @@ do_install_append() { test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}" mv "${D}/${prefix}/docs" "${D}/${docdir}" fi + + chown -R root:root ${D} } BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.7.3.4
PATCH 9/9 python: Add python to the dependency to pygobject
In reply to Mark Hatlepygobject requires both python and pygobject-native for compilation. Without python pygobject may fail to compile.. and items that depend on pygobject will fail to compile.
--- .../python/python-pygobject_2.27.91.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python-pygobject_2.27.91.bb +2 -2
@@ -2,10 +2,10 @@ DESCRIPTION = "Python GObject bindings" SECTION = "devel/python" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" -DEPENDS = "python-pygobject-native-${PV} glib-2.0" +DEPENDS = "python python-pygobject-native-${PV} glib-2.0" DEPENDS_virtclass-native = "glib-2.0-native" RDEPENDS_virtclass-native = "" -PR = "r1" +PR = "r2" MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
Signature · 1 line
1.7.3.4