Skip to contentSkip to conversation

Revised patch set for fixing owners/groups

PATCH In review Mark Hatle 3 participants 12 messages Jun 23, 2011

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

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
author
#1 lore raw

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
index 90fcd13..11ec6dc 100644
@@ -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
index 3fe4bf9..a0302b9 100644
@@ -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
new file mode 100755
index 0000000..4f43271
@@ -0,0 +1,2 @@
+#! /bin/sh
+echo "Intercept $0: $@ -- do nothing"
Signature · 1 line
1.7.3.4
author
#2 lore raw

PATCH 2/9 resolveconf: Fix file owners

In reply to Mark Hatle

The 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
index cb8aaaf..507a233 100644
@@ -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
author
#3 lore raw

PATCH 3/9 base-passwd: Fix owners/groups

In reply to Mark Hatle

Fix 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
index 3315c68..7b1fdf1 100644
@@ -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
author
#4 lore raw

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
index 3cb5485..02038ea 100644
@@ -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
author
#5 lore raw

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
index 61dab95..6170e65 100644
@@ -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
#6 lore raw

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

---
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

#7 lore raw

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

---
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

author
#8 lore raw

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
index ed343c0..49847d3 100644
@@ -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
author
#9 lore raw

PATCH 7/9 gnome-doc-utils: Fix the owner/group on select files

In reply to Mark Hatle

All 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
index b541753..62893ea 100644
@@ -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
index e7bf6e9..d85697f 100644
@@ -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
author
#10 lore raw

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
index fc87c31..a8ae1bd 100644
@@ -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
author
#11 lore raw

PATCH 9/9 python: Add python to the dependency to pygobject

In reply to Mark Hatle

pygobject 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
index 0160bbd..9ff2fe7 100644
@@ -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