Re: [OE-core] [PATCH] libjson: update to 0.11 and rename to json-c
On 10/18/2013 01:45 AM, Jack Mitchell wrote: From: Jack Mitchell libjson is now known as json-c, it keeps support for the old libjson namespace so it shouldn't break anything. Built without parallel make as it would fail when it tries to link to link back to itself, which is odd, but the official word is: don't build in parallel. This patch does not apply cleanly to Master, can you please ensure it's rebased against master. Thanks Sau! Signed-off-by: Jack Mitchell --- meta/conf/distro/include/seperatebuilddir.inc | 2 +- meta/recipes-devtools/json-c/json-c_0.11.bb | 13 + meta/recipes-devtools/libjson/libjson_0.9.bb | 14 -- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 meta/recipes-devtools/json-c/json-c_0.11.bb delete mode 100644 meta/recipes-devtools/libjson/libjson_0.9.bb diff --git a/meta/conf/distro/include/seperatebuilddir.inc b/meta/conf/distro/include/seperatebuilddir.inc index c067183..e1a5c6b 100644 --- a/meta/conf/distro/include/seperatebuilddir.inc +++ b/meta/conf/distro/include/seperatebuilddir.inc @@ -294,7 +294,7 @@ B_pn-libice = "${SEPB}" B_pn-libice-native = "${SEPB}" B_pn-libid3tag = "${SEPB}" B_pn-libidn = "${SEPB}" -B_pn-libjson = "${SEPB}" +B_pn-json-c = "${SEPB}" B_pn-libksba = "${SEPB}" B_pn-libmad = "${SEPB}" B_pn-libmatchbox = "${SEPB}" diff --git a/meta/recipes-devtools/json-c/json-c_0.11.bb b/meta/recipes-devtools/json-c/json-c_0.11.bb new file mode 100644 index 000..e0391f5 --- /dev/null +++ b/meta/recipes-devtools/json-c/json-c_0.11.bb @@ -0,0 +1,13 @@ +SUMMARY = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C" +HOMEPAGE = "https://github.com/json-c/json-c/wiki"; +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" + +SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"; + +SRC_URI[md5sum] = "aa02367d2f7a830bf1e3376f77881e98" +SRC_URI[sha256sum] = "28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c" + +PARALLEL_MAKE = "" + +inherit autotools diff --git a/meta/recipes-devtools/libjson/libjson_0.9.bb b/meta/recipes-devtools/libjson/libjson_0.9.bb deleted file mode 100644 index e4951a8..000 --- a/meta/recipes-devtools/libjson/libjson_0.9.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "JSON-C - A JSON implementation in C" -HOMEPAGE = "http://oss.metaparadigm.com/json-c/"; - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=30a276a476b02c2dcd0849bde417fb17" - -SRC_URI = "http://oss.metaparadigm.com/json-c/json-c-${PV}.tar.gz"; -SRC_URI[md5sum] = "3a13d264528dcbaf3931b0cede24abae" -SRC_URI[sha256sum] = "702a486c9bf8e19137d484ab5c49b4ad314eb5e1fe37062a72c0a0fa39439475" - -S = "${WORKDIR}/json-c-${PV}" - - -inherit autotools diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 4c10aa9..475da41 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \ DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool" # optional DEPENDS += "udev alsa-lib glib-2.0 dbus gconf" -DEPENDS += "libjson gdbm speex libxml-parser-perl-native" +DEPENDS += "json-c gdbm speex libxml-parser-perl-native" inherit autotools pkgconfig useradd gettext perlnative ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/2] Use alternatives for the binutils-symlinks package.
Peter, The commit short message needs to be corrected to the binutils: ... format please. I will test this version in MUT. Thanks Sau! On 10/18/2013 04:24 PM, Peter Seebach wrote: The ar and strings utilities are provided as alternatives, but the rest of binutils is being done with binutils-symlinks. This has the side effect that if you want "as", and you install binutils-symlinks to get it, you don't get "ar" from it, because it's not in the symlinks package. Solution: Use the same mechanisms for everything, putting everything in ALTERNATIVES, so installing binutils on a target produces the expected behavior of having the various utilities in place. (We do this only for class-target, though.) Issues: The "embedspu" and "ld.gold" binaries may or may not exist, but the determination of whether to list them as alternatives is being made before the point at which we can easily check for them, so that can produce warnings. Signed-off-by: Peter Seebach --- meta/recipes-devtools/binutils/binutils.inc | 67 -- 1 files changed, 41 insertions(+), 26 deletions(-) diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 5e78dc0..eaf20bf 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -22,31 +22,49 @@ FILES_${PN} = " \ ${libdir}/lib*-*.so \ ${prefix}/${TARGET_SYS}/bin/*" +# Use alternatives rather than actual symlinks. +FILES_${PN}-symlinks = "" + +ALLOW_EMPTY_${PN}-symlinks = "1" + FILES_${PN}-dev = " \ ${includedir} \ ${libdir}/*.la \ ${libdir}/libbfd.so \ ${libdir}/libopcodes.so" -FILES_${PN}-symlinks = " \ - ${bindir}/addr2line \ - ${bindir}/as \ - ${bindir}/c++filt \ - ${bindir}/embedspu \ - ${bindir}/gprof \ - ${bindir}/ld \ - ${bindir}/ld.bfd \ - ${bindir}/ld.gold \ - ${bindir}/nm \ - ${bindir}/objcopy \ - ${bindir}/objdump \ - ${bindir}/ranlib \ - ${bindir}/readelf \ - ${bindir}/elfedit \ - ${bindir}/size \ - ${bindir}/strip" - -FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug" +# Rather than duplicating multiple entries for these, make one +# list and reuse it. + +USE_ALTERNATIVES_FOR = " \ + addr2line \ + ar \ + as \ + c++filt \ + elfedit \ + gprof \ + ld \ + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld.gold', 'ld.bfd', d)} \ + nm \ + objcopy \ + objdump \ + ranlib \ + readelf \ + size \ + strings \ + strip \ +" + +python do_package_prepend() { +make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or "" +prefix = d.getVar("TARGET_PREFIX", True) +bindir = d.getVar("bindir", True) +for alt in make_alts.split(): +d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt) +d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt) +} + +# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug" B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" @@ -120,7 +138,9 @@ do_install () { ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,` done - rm -f ${D}${bindir}/ar ${D}${bindir}/strings +for alt in ${USE_ALTERNATIVES_FOR}; do +rm -f ${D}${bindir}/$alt +done oe_multilib_header bfd.h } @@ -129,10 +149,5 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN}-symlinks = "ar strings" - -ALTERNATIVE_LINK_NAME[ar] = "${bindir}/ar" -ALTERNATIVE_TARGET[ar] = "${bindir}/${TARGET_PREFIX}ar" +ALTERNATIVE_${PN}-symlinks_class-target = "${USE_ALTERNATIVES_FOR}" -ALTERNATIVE_LINK_NAME[strings] = "${bindir}/strings" -ALTERNATIVE_TARGET[strings] = "${bindir}/${TARGET_PREFIX}strings" ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] Drop binutils-symlinks
The -symlinks package doesn't really add any value if we're using update-alternatives. Drop it, leaving a spare RPROVIDES in case anyone thought they needed it. Signed-off-by: Peter Seebach --- meta/recipes-devtools/binutils/binutils.inc | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index eaf20bf..d38c3fe 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -15,17 +15,12 @@ DEPENDS = "flex-native bison-native zlib-native" inherit autotools gettext multilib_header -PACKAGES += "${PN}-symlinks" - FILES_${PN} = " \ ${bindir}/${TARGET_PREFIX}* \ ${libdir}/lib*-*.so \ ${prefix}/${TARGET_SYS}/bin/*" -# Use alternatives rather than actual symlinks. -FILES_${PN}-symlinks = "" - -ALLOW_EMPTY_${PN}-symlinks = "1" +RPROVIDES_${PN} += "${PN}-symlinks" FILES_${PN}-dev = " \ ${includedir} \ @@ -149,5 +144,4 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN}-symlinks_class-target = "${USE_ALTERNATIVES_FOR}" - +ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}" -- 1.7.1 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] Use alternatives for the binutils-symlinks package.
The ar and strings utilities are provided as alternatives, but the rest of binutils is being done with binutils-symlinks. This has the side effect that if you want "as", and you install binutils-symlinks to get it, you don't get "ar" from it, because it's not in the symlinks package. Solution: Use the same mechanisms for everything, putting everything in ALTERNATIVES, so installing binutils on a target produces the expected behavior of having the various utilities in place. (We do this only for class-target, though.) Issues: The "embedspu" and "ld.gold" binaries may or may not exist, but the determination of whether to list them as alternatives is being made before the point at which we can easily check for them, so that can produce warnings. Signed-off-by: Peter Seebach --- meta/recipes-devtools/binutils/binutils.inc | 67 -- 1 files changed, 41 insertions(+), 26 deletions(-) diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 5e78dc0..eaf20bf 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -22,31 +22,49 @@ FILES_${PN} = " \ ${libdir}/lib*-*.so \ ${prefix}/${TARGET_SYS}/bin/*" +# Use alternatives rather than actual symlinks. +FILES_${PN}-symlinks = "" + +ALLOW_EMPTY_${PN}-symlinks = "1" + FILES_${PN}-dev = " \ ${includedir} \ ${libdir}/*.la \ ${libdir}/libbfd.so \ ${libdir}/libopcodes.so" -FILES_${PN}-symlinks = " \ - ${bindir}/addr2line \ - ${bindir}/as \ - ${bindir}/c++filt \ - ${bindir}/embedspu \ - ${bindir}/gprof \ - ${bindir}/ld \ - ${bindir}/ld.bfd \ - ${bindir}/ld.gold \ - ${bindir}/nm \ - ${bindir}/objcopy \ - ${bindir}/objdump \ - ${bindir}/ranlib \ - ${bindir}/readelf \ - ${bindir}/elfedit \ - ${bindir}/size \ - ${bindir}/strip" - -FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug" +# Rather than duplicating multiple entries for these, make one +# list and reuse it. + +USE_ALTERNATIVES_FOR = " \ + addr2line \ + ar \ + as \ + c++filt \ + elfedit \ + gprof \ + ld \ + ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld.gold', 'ld.bfd', d)} \ + nm \ + objcopy \ + objdump \ + ranlib \ + readelf \ + size \ + strings \ + strip \ +" + +python do_package_prepend() { +make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or "" +prefix = d.getVar("TARGET_PREFIX", True) +bindir = d.getVar("bindir", True) +for alt in make_alts.split(): +d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt) +d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt) +} + +# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug" B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" @@ -120,7 +138,9 @@ do_install () { ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,` done - rm -f ${D}${bindir}/ar ${D}${bindir}/strings +for alt in ${USE_ALTERNATIVES_FOR}; do +rm -f ${D}${bindir}/$alt +done oe_multilib_header bfd.h } @@ -129,10 +149,5 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN}-symlinks = "ar strings" - -ALTERNATIVE_LINK_NAME[ar] = "${bindir}/ar" -ALTERNATIVE_TARGET[ar] = "${bindir}/${TARGET_PREFIX}ar" +ALTERNATIVE_${PN}-symlinks_class-target = "${USE_ALTERNATIVES_FOR}" -ALTERNATIVE_LINK_NAME[strings] = "${bindir}/strings" -ALTERNATIVE_TARGET[strings] = "${bindir}/${TARGET_PREFIX}strings" -- 1.7.1 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/2] v2: Use alternatives for binutils
This is a rework of a previous patch to use alternatives consistently for all of binutils instead of relying on symlinks for most things, and alternatives for ar and strings. Changes: 1. Dropped embedspu compltely from the alternatives list. If anyone's actually using Cell processors with oe-core, or something else that needs the ability to embed SPU binaries as ELF objects in binaries for other CPUs, I'm willing to revisit that. 2. Make the selection of ld.bfd or ld.gold contingent on the presence of ld-is-gold in DISTRO_FEATURES. 3. Set the alternatives only for class-target, because otherwise we don't want or need them. This should address failures with cross-canadian builds ("error: Can't install binutils-cross-canadian-arm-2.23.2-r4@i686_nativesdk: no package provides update-alternatives-cworth"), and warnings for the absent embedspu and ld.gold binaries, but should work for people using ld.gold. As before, the purpose of this is mostly a cleanup, because people don't find an "as" binary, so they end up looking around and finding binutils-symlinks, then they notice that binutils-symlinks doesn't have "ar" and "strings". Confusion ensues. The following changes since commit 24a6b1324965080fef6c363edcb37768090eebea: wic: add pseudo to the populate-extfs step (2013-10-18 16:03:36 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib seebs/binutils-alternatives http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/binutils-alternatives Peter Seebach (2): Use alternatives for the binutils-symlinks package. Drop binutils-symlinks meta/recipes-devtools/binutils/binutils.inc | 67 +++ 1 files changed, 38 insertions(+), 29 deletions(-) ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] wic: add pseudo to the populate-extfs step
On Fri, 18 Oct 2013 16:04:30 +0100 Richard Purdie wrote: > > -populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot > > +populate_script = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot > > +populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % > > rootfs_dir > > +populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir > > +populate_script += "export PSEUDO_NOSYMLINKEXP=1;" > > +populate_script += "export PSEUDO_DISABLED=0;" > > +populate_script += "%s/usr/bin/pseudo > > %s/usr/bin/populate-extfs.sh" % \ > > +(native_sysroot, native_sysroot) > > + > > image_extra_space = 10240 > > > > image_rootfs = rootfs_dir > > I've merged this but I would like to figure out why pseudo can't manage > more sane defaults rather than needing all of those variables... Good question. Historical answer: You need PREFIX to figure out where libpseudo.so is. LOCALSTATEDIR is there becaus one copy of libpseudo.so can correspond to several different state dirs. PASSWD is an optional feature, and not enabled by default; maybe it should be, but the question of what path to use for it is not obvious. I suppose it could be changed to default to / or the current chroot directory, but I don't know that that would help. NOSYMLINKEXP is behavior which may be desireable or undesireable, and it's really usage-specific. Not sure why DISABLED=0 is needed here. In a lot of these cases, there's no meaningful way to make a sane default. I suppose in theory we could search through LD_LIBRARY_PATH to find a libpseudo.so and guess PREFIX from that, the other bits are pretty hard to define good defaults for. Arguably, NOSYMLINKEXP has a sane default, it's just that this is the use case for which the sane default isn't the right choice. And I was thinking a bit about a config file, but that wouldn't really work for several of these; you don't necessarily want NOSYMLINKEXP shared between different clients running against the same tree. -s -- Listen, get this. Nobody with a good compiler needs to be justified. ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 10/11] nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms
On 18 Oct 2013 16:54, "Richard Purdie" wrote: > > On Thu, 2013-10-17 at 15:59 +0200, David Nyström wrote: > > Added a new distro feature called sdk-pms, since smartpm rdepends > > on the python runtime. > > This to avoid bloating the SDK tarball for those who does not > > want it. > > > > Signed-off-by: David Nyström > > --- > > meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/meta/recipes-core/packagegroups/ nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/ nativesdk-packagegroup-sdk-host.bb > > index e298ff4..1f45c4c 100644 > > --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb > > +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb > > @@ -16,7 +16,8 @@ RDEPENDS_${PN} = "\ > > nativesdk-qemu-helper \ > > nativesdk-pseudo \ > > nativesdk-unfs-server \ > > -nativesdk-opkg \ > > +${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-opkg','', d)} \ > > +${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-smartpm','', d)} \ > > nativesdk-libtool \ > > nativesdk-autoconf \ > > nativesdk-automake \ > > I think we need to keep a list of DISTRO_FEATURES somewhere along with a > definition about what the feature is supposed to do. For example this is > clearly about power management, right? :) > > Along with this addition could you start a list somewhere documenting > this? Sure, where would be a good place to start this ? In the Reference manual ? Br, David > > Cheers, > > Richard > > ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] Issues with PREFERRED_VERSION/PREFERRED_PROVIDER for the kernel
On Fri, Oct 18, 2013 at 10:05 AM, Ulf Samuelsson wrote: > In some cases, you might want to override a few things in the DISTRO. > > Maybe an easy way to handle this would be if the DISTRO conf file > included an empty file at the end, > which can be overridden by a file in your own layer. > If the distro wants to be able to be overridden, it should use ?= or ??= as appropriate. -- Christopher Larson ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] Issues with PREFERRED_VERSION/PREFERRED_PROVIDER for the kernel
In some cases, you might want to override a few things in the DISTRO. Maybe an easy way to handle this would be if the DISTRO conf file included an empty file at the end, which can be overridden by a file in your own layer. Best Regards Ulf Samuelsson 18 okt 2013 kl. 18:31 skrev Koen Kooi : > > Op 18 okt. 2013, om 17:59 heeft Ulf Samuelsson het > volgende geschreven: > >> 1. If you define something in the .conf and in .conf >> then .conf has higher priority. >> This is really non-intuitive. > > It is correct however, if the DISTRO defines it, it's a DISTRO setting that a > MACHINE.conf really should stay away from. > > regards, > > KOen ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3 3/3] bash: add pkg_postrm to remove the entry in /etc/shells
On 10/18/13 10:18 AM, Phil Blundell wrote: On Fri, 2013-10-18 at 10:12 -0500, Mark Hatle wrote: On 10/18/13 9:59 AM, Phil Blundell wrote: On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote: pkg_postinst_${PN} () { - touch $D${sysconfdir}/shells - grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells + if [ ! -f $D${sysconfdir}/shells ]; then One note with the above check. Whichever package is responsible for providing the 'shells' file needs to be installed -first-. So anything that manipulates the 'shells' file will need an RDEPENDS on that package. Isn't the whole point of the check above that it now creates /etc/shells if it didn't exist already? Situation bash has dep on base-files: base-files package gets install (creates basic /etc/shells) bash gets installed (checks for /etc/shells, adds /bin/bash) Alternative situation: bash has no dep on base-files: bash gets installed (checks for /etc/shells, doesn't exist) base-files gets installed (creates basic /etc/shells) That said, though, I'm still not entirely convinced that having semi-random packages create a file that isn't mentioned in either FILES I don't want it to create the file, that is the wrong behavior. The -package- needs to depend on the package that provides the base configuration for the system. -something- has to create the file, or be installed first. or CONFFILES is a very good thing. I'm also not totally clear on what exactly the problem is that this set of patches is trying to solve: the original commit message says that having nonexistent files named in /etc/shells is "unreasonable" but doesn't provide any supporting evidence for that assertion. The original problem is that /etc/shells contains too much "crap", and we've got customers saying "hey you are opening up potential security holes by having things in there that are not valid." (Beyond the file being sloppy) So we would prefer that a minimal file exist, and then entries for valid shells be added dynamically to the system, only if the packages that provide them are supported. --Mark p. ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] Issues with PREFERRED_VERSION/PREFERRED_PROVIDER for the kernel
Op 18 okt. 2013, om 17:59 heeft Ulf Samuelsson het volgende geschreven: > 1. If you define something in the .conf and in .conf >then .conf has higher priority. >This is really non-intuitive. It is correct however, if the DISTRO defines it, it's a DISTRO setting that a MACHINE.conf really should stay away from. regards, KOen ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] Issues with PREFERRED_VERSION/PREFERRED_PROVIDER for the kernel
1. If you define something in the .conf and in .conf then .conf has higher priority. This is really non-intuitive. 2. If you define a PREFERRED_VERSION which does not have a corresponding ".bb" file you do not get a warning, and the latest PREFERRED_PROVIDER is used. 3. If you define a PREFERRED_PROVIDER which does not have a corresponding ".bb" file you *do* get a warning, with a list of possible providers, and bitbake will bake the first in the list. It will also bake the *latest* version, even if that provider has a PREFERRED_VERSION. 4. If I define PREFERRED_PROVIDER_virtual/kernel = "linux-x" in .conf, bitbake will bake "linux-x" using the latest version 5. If I define PREFERRED_VERSION_virtual/kernel = "3.7.0", this is ignored. 6. If I define PREFERRED_VERSION_linux-x = "3.7.0", this is accepted and linux-x_3.7.0.bb is used. --- Questions: You need to parse .conf before you parse the DISTRO since some things in the distro is machine dependent. I.E: PREFERRED_VERSION_binutils_avr32 = "2.17" (1) Would it be possible to reparse .conf after DISTRO has been parsed, resetting some stuff, overridden by the DISTRO? (2) Why no warning, if the PREFERRED_VERSION cannot be found. It would be good to have which versions are available. For the Beaglebone, you have a linux-mainline_3.7.bb, but if you set PREFERRED_VERSION_linux-mainline = "3.7" you still get "3.8.13" built, because "linux-mainline_3.7.bb" contains PV = "3.7.0" A warning would have been helpful! (3) Why is PREFERRED_VERSION_virtual/kernel accepted without error message, but ignored? (4) If bitbake cannot find a recommended PROVIDER, and selects something else, why not use the PREFERRED_VERSION if it exists? BR Ulf Samuelsson ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3 3/3] bash: add pkg_postrm to remove the entry in /etc/shells
On Fri, 2013-10-18 at 10:12 -0500, Mark Hatle wrote: > On 10/18/13 9:59 AM, Phil Blundell wrote: > > On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote: > >> pkg_postinst_${PN} () { > >> - touch $D${sysconfdir}/shells > >> - grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> > >> $D${sysconfdir}/shells > >> - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> > >> $D${sysconfdir}/shells > >> + if [ ! -f $D${sysconfdir}/shells ]; then > > One note with the above check. Whichever package is responsible for > providing > the 'shells' file needs to be installed -first-. So anything that > manipulates > the 'shells' file will need an RDEPENDS on that package. Isn't the whole point of the check above that it now creates /etc/shells if it didn't exist already? That said, though, I'm still not entirely convinced that having semi-random packages create a file that isn't mentioned in either FILES or CONFFILES is a very good thing. I'm also not totally clear on what exactly the problem is that this set of patches is trying to solve: the original commit message says that having nonexistent files named in /etc/shells is "unreasonable" but doesn't provide any supporting evidence for that assertion. p. ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3 3/3] bash: add pkg_postrm to remove the entry in /etc/shells
On 10/18/13 9:59 AM, Phil Blundell wrote: On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote: pkg_postinst_${PN} () { - touch $D${sysconfdir}/shells - grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells + if [ ! -f $D${sysconfdir}/shells ]; then One note with the above check. Whichever package is responsible for providing the 'shells' file needs to be installed -first-. So anything that manipulates the 'shells' file will need an RDEPENDS on that package. --Mark + touch $D${sysconfdir}/shells + fi + + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells +} This patch contains significant changes to the postinst script which aren't described in the commit message. p. + +pkg_postrm_${PN} () { + if [ -f $D${sysconfdir}/shells ]; then + printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells + + if [ ! -s $D${sysconfdir}/shells ]; then + rm $D${sysconfdir}/shells + fi + fi } ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] wic: add pseudo to the populate-extfs step
On 10/18/13 10:04 AM, Richard Purdie wrote: On Wed, 2013-10-16 at 15:25 -0500, Tom Zanussi wrote: Without this, files in the generated filesystem pick up the wrong ownership. Signed-off-by: Tom Zanussi --- scripts/lib/mic/kickstart/custom_commands/partition.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py index 302cace..0eb0671 100644 --- a/scripts/lib/mic/kickstart/custom_commands/partition.py +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py @@ -216,7 +216,14 @@ class Wic_PartData(Mic_PartData): """ Prepare content for an ext2/3/4 rootfs partition. """ -populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot +populate_script = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot +populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir +populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir Location of the passwd file, if we are in a chroot, it will use the chroot'd version, otherwise you need to tell pseudo where it is. +populate_script += "export PSEUDO_NOSYMLINKEXP=1;" This controls how the symlinks are populated from the point of view of non-pseudo environment. If you intend to manipulate the results (and make them useful) -outside- of the pseudo environment, you need this. If you do all of your operations from within pseudo, the defaults are correct. Otherwise you can get links such as "/bin/sh -> /bin/bash" and it points to the host's bash, not the chroot's /bin/bash. +populate_script += "export PSEUDO_DISABLED=0;" This shouldn't have to be set, unless the disabled has been previously set in the environment. +populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \ +(native_sysroot, native_sysroot) + image_extra_space = 10240 image_rootfs = rootfs_dir I've merged this but I would like to figure out why pseudo can't manage more sane defaults rather than needing all of those variables... Cheers, Richard ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] wic: add pseudo to the populate-extfs step
On Wed, 2013-10-16 at 15:25 -0500, Tom Zanussi wrote: > Without this, files in the generated filesystem pick up the wrong > ownership. > > Signed-off-by: Tom Zanussi > --- > scripts/lib/mic/kickstart/custom_commands/partition.py | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py > b/scripts/lib/mic/kickstart/custom_commands/partition.py > index 302cace..0eb0671 100644 > --- a/scripts/lib/mic/kickstart/custom_commands/partition.py > +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py > @@ -216,7 +216,14 @@ class Wic_PartData(Mic_PartData): > """ > Prepare content for an ext2/3/4 rootfs partition. > """ > -populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot > +populate_script = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot > +populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % > rootfs_dir > +populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir > +populate_script += "export PSEUDO_NOSYMLINKEXP=1;" > +populate_script += "export PSEUDO_DISABLED=0;" > +populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" > % \ > +(native_sysroot, native_sysroot) > + > image_extra_space = 10240 > > image_rootfs = rootfs_dir I've merged this but I would like to figure out why pseudo can't manage more sane defaults rather than needing all of those variables... Cheers, Richard ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3 3/3] bash: add pkg_postrm to remove the entry in /etc/shells
On Fri, 2013-10-18 at 19:11 +0800, Ming Liu wrote: > pkg_postinst_${PN} () { > - touch $D${sysconfdir}/shells > - grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> > $D${sysconfdir}/shells > - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> > $D${sysconfdir}/shells > + if [ ! -f $D${sysconfdir}/shells ]; then > + touch $D${sysconfdir}/shells > + fi > + > + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo > ${base_bindir}/bash >> $D${sysconfdir}/shells > +} This patch contains significant changes to the postinst script which aren't described in the commit message. p. > + > +pkg_postrm_${PN} () { > + if [ -f $D${sysconfdir}/shells ]; then > + printf "$(grep -v "^${base_bindir}/bash$" > $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells > + > + if [ ! -s $D${sysconfdir}/shells ]; then > + rm $D${sysconfdir}/shells > + fi > + fi > } ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] image_types.bbclass: add --numeric-owner option to tar command
On Fri, 2013-10-18 at 15:47 +0800, qi.c...@windriver.com wrote: > From: Chen Qi > > If the same username exists on both target and the build host, but > the uids differ, and we start target via NFS, then the uid for the > user will be incorrect on target. > > For example, if postfix's uid on host is 119 and on target is 1024, > then if we start target via NFS, the uid for postfix will be 119. > > The root cause is that when we use runqemu-extract-sdk to generate > the NFS rootfs for later use, the tar command will respect the username > instead of uid. So if PSEUDO_PASSWD environment is not set correctly, > the host /etc/passwd will be used, resulting in wrong uids. > > The situation for gid is completely analogous to that of uid. > > It's almost impossible for the runqemu-extract-sdk to guess the correct > location of the needed password file merely based on the target tarball > name. > > This patch solves this problem by adding the '--numeric-owner' option > to the tar command so that the username/groupname is not recorded in > the tarball. In this situation, we'll always get the correct uid/gid > after extracting the tarball. > > [YOCTO #5364] > > Signed-off-by: Chen Qi > --- > meta/classes/image_types.bbclass |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Er, isn't the right fix to fix runqemu-extract-sdk to use numeric IDs then rather than butcher all the tarballs we create? Cheers, Richard ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 10/11] nativesdk-packagegroup-sdk-host: Add new DISTRO_FEATURE, sdk-pms
On Thu, 2013-10-17 at 15:59 +0200, David Nyström wrote: > Added a new distro feature called sdk-pms, since smartpm rdepends > on the python runtime. > This to avoid bloating the SDK tarball for those who does not > want it. > > Signed-off-by: David Nyström > --- > meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git > a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb > b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb > index e298ff4..1f45c4c 100644 > --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb > +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb > @@ -16,7 +16,8 @@ RDEPENDS_${PN} = "\ > nativesdk-qemu-helper \ > nativesdk-pseudo \ > nativesdk-unfs-server \ > -nativesdk-opkg \ > +${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-opkg','', d)} \ > +${@base_contains('DISTRO_FEATURES', 'sdk-pms', 'nativesdk-smartpm','', > d)} \ > nativesdk-libtool \ > nativesdk-autoconf \ > nativesdk-automake \ I think we need to keep a list of DISTRO_FEATURES somewhere along with a definition about what the feature is supposed to do. For example this is clearly about power management, right? :) Along with this addition could you start a list somewhere documenting this? Cheers, Richard ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] diff between defining a "no-op" task and using [noexec]?
On Fri, 18 Oct 2013, Richard Purdie wrote: > On Fri, 2013-10-18 at 09:13 -0400, Robert P. J. Day wrote: ... snip ... > > i figured as much, but is there any important (pragmatic) > > distinction between the two if one simply wants to nullify an > > existing task? > > One is slightly more efficient since bitbake doesn't run it at all. > > > if there's a defined task dependency of some kind, i can > > certainly see how having a defined task consisting of a no-op > > would behave differently from specifying to not run that task at > > all, in terms of subsequent dependencies. does that distinction > > come into play anywhere? is there an example in the OE source that > > recognizes this? > > No, the way we use noexec tasks, we still have to ensure > dependencies are recognised and built before the noexec task is > skipped. ah, that answers that question. > > and WRT to how developers should code, is one of these > > approaches considered better than the other? i've seen both > > approaches used in recipe files, and i'm wondering simply about > > coding style. thanks. > > noexec is newer, slightly more efficient and not used everywhere. > The ":" notation is slightly more readable in some circumstances. > > You're looking for a "use X" type answer but I'm not giving one > since sometimes one can make slightly more sense that the other and > I don't want patches doing wholesale conversion from one to the > other. I appreciate that is frustrating but like any things, hard > and fast rules don't make sense, you should think about it. i'm good with all that, thanks. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] diff between defining a "no-op" task and using [noexec]?
On Fri, 2013-10-18 at 09:13 -0400, Robert P. J. Day wrote: > On Fri, 18 Oct 2013, Richard Purdie wrote: > > > On Thu, 2013-10-17 at 08:07 -0400, Robert P. J. Day wrote: > > > using a concrete example, there's this from oe core's > > > linux-dummy.bb: > > > > > > do_configure() { > > > : > > > } > > > > > > do_compile () { > > > : > > > } > > > > > > do_install() { > > > : > > > } > > > > > > what is the difference between the above and writing: > > > > > > do_configure[noexec] = "1" > > > do_compile[noexec] = "1" > > > do_install[noexec] = "1" > > > > > > *is* there a difference? if so, does it have to do with the > > > processing of other flags for that task? > > > > > > i can see that, technically, the first variation still defines a > > > task to be run, while the second specifies that the task *not* be run, > > > so i can appreciate that those two operations have different results. > > > > The difference is just that, with the first case bitbake will run > > the task, it will do nothing. In the second case, bitbake will not > > bother running it at all. > > i figured as much, but is there any important (pragmatic) > distinction between the two if one simply wants to nullify an existing > task? One is slightly more efficient since bitbake doesn't run it at all. > if there's a defined task dependency of some kind, i can certainly > see how having a defined task consisting of a no-op would behave > differently from specifying to not run that task at all, in terms of > subsequent dependencies. does that distinction come into play > anywhere? is there an example in the OE source that recognizes this? No, the way we use noexec tasks, we still have to ensure dependencies are recognised and built before the noexec task is skipped. > and WRT to how developers should code, is one of these approaches > considered better than the other? i've seen both approaches used in > recipe files, and i'm wondering simply about coding style. thanks. noexec is newer, slightly more efficient and not used everywhere. The ":" notation is slightly more readable in some circumstances. You're looking for a "use X" type answer but I'm not giving one since sometimes one can make slightly more sense that the other and I don't want patches doing wholesale conversion from one to the other. I appreciate that is frustrating but like any things, hard and fast rules don't make sense, you should think about it. Cheers, Richard ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] diff between defining a "no-op" task and using [noexec]?
On Fri, 18 Oct 2013, Richard Purdie wrote: > On Thu, 2013-10-17 at 08:07 -0400, Robert P. J. Day wrote: > > using a concrete example, there's this from oe core's > > linux-dummy.bb: > > > > do_configure() { > > : > > } > > > > do_compile () { > > : > > } > > > > do_install() { > > : > > } > > > > what is the difference between the above and writing: > > > > do_configure[noexec] = "1" > > do_compile[noexec] = "1" > > do_install[noexec] = "1" > > > > *is* there a difference? if so, does it have to do with the > > processing of other flags for that task? > > > > i can see that, technically, the first variation still defines a > > task to be run, while the second specifies that the task *not* be run, > > so i can appreciate that those two operations have different results. > > The difference is just that, with the first case bitbake will run > the task, it will do nothing. In the second case, bitbake will not > bother running it at all. i figured as much, but is there any important (pragmatic) distinction between the two if one simply wants to nullify an existing task? if there's a defined task dependency of some kind, i can certainly see how having a defined task consisting of a no-op would behave differently from specifying to not run that task at all, in terms of subsequent dependencies. does that distinction come into play anywhere? is there an example in the OE source that recognizes this? and WRT to how developers should code, is one of these approaches considered better than the other? i've seen both approaches used in recipe files, and i'm wondering simply about coding style. thanks. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v4] connman: ignore the networking device which nfs for rootfs is working on
"Burton, Ross" writes: > Can you explain why connman needs to ignore the device that NFS is > reading the rootfs from? I ask because the very latest connman > release shouldn't be dropping and re-configuring interfaces if there's > a provisioned configuration for them (see connman-conf, which does > this for all qemu machines) and that configuration matches the current > configuration. Would this be sufficient for the rootfs-on-NFS > situation? not really... the provisioning stuff does not seem to work for the 'ip=dhcp' case. I know that this case is not handled well with this patch either (it misses renewal of dhcp leases, setup of dns + ntp). But it is still better than actual behavior. On first glance, the do-not-cleanup patch in connman seems to cover system startup only. I might miss something, but afais, interface will be still shut down in the middle of reboot which is bad because '/' is needed nearly to the end of shutdown. Enrico ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v4] connman: ignore the networking device which nfs for rootfs is working on
Hi, Can you explain why connman needs to ignore the device that NFS is reading the rootfs from? I ask because the very latest connman release shouldn't be dropping and re-configuring interfaces if there's a provisioned configuration for them (see connman-conf, which does this for all qemu machines) and that configuration matches the current configuration. Would this be sufficient for the rootfs-on-NFS situation? Ross ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH V3 3/3] bash: add pkg_postrm to remove the entry in /etc/shells
Signed-off-by: Ming Liu --- meta/recipes-extended/bash/bash.inc | 18 +++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc index 64b476f..7c18f37 100644 --- a/meta/recipes-extended/bash/bash.inc +++ b/meta/recipes-extended/bash/bash.inc @@ -44,7 +44,19 @@ do_install_ptest () { } pkg_postinst_${PN} () { - touch $D${sysconfdir}/shells - grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells + if [ ! -f $D${sysconfdir}/shells ]; then + touch $D${sysconfdir}/shells + fi + + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells +} + +pkg_postrm_${PN} () { + if [ -f $D${sysconfdir}/shells ]; then + printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells + + if [ ! -s $D${sysconfdir}/shells ]; then + rm $D${sysconfdir}/shells + fi + fi } -- 1.7.1 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH V3 2/3] screen: add pkg_postinst to register entry to /etc/shells
Also add pkg_postrm to remove the entry. Signed-off-by: Ming Liu --- meta/recipes-extended/screen/screen_4.0.3.bb | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb index 1a7eb20..a3b3715 100644 --- a/meta/recipes-extended/screen/screen_4.0.3.bb +++ b/meta/recipes-extended/screen/screen_4.0.3.bb @@ -41,3 +41,21 @@ do_install_append () { fi done } + +pkg_postinst_${PN} () { + if [ ! -f $D${sysconfdir}/shells ]; then + touch $D${sysconfdir}/shells + fi + + grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells +} + +pkg_postrm_${PN} () { + if [ -f $D${sysconfdir}/shells ]; then + printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells + + if [ ! -s $D${sysconfdir}/shells ]; then + rm $D${sysconfdir}/shells + fi + fi +} -- 1.7.1 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH V3 1/3] base-files: move shells generating process to pkg_postinst
The "shells" file lists several valid login shells, of which some might be not present in a particular rootfs, this is unreasonable. Fix it by moving "shells" file generating process to pkg_postinst, for other shells must do the same thing to register themselves to this file. Signed-off-by: Ming Liu --- meta/recipes-core/base-files/base-files/shells|8 meta/recipes-core/base-files/base-files_3.0.14.bb | 20 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) delete mode 100644 meta/recipes-core/base-files/base-files/shells diff --git a/meta/recipes-core/base-files/base-files/shells b/meta/recipes-core/base-files/base-files/shells deleted file mode 100644 index ce39b3d..000 --- a/meta/recipes-core/base-files/base-files/shells +++ /dev/null @@ -1,8 +0,0 @@ -# /etc/shells: valid login shells -/bin/sh -/bin/ash -/bin/bash -/bin/dash -/bin/ksh -/usr/bin/ksh -/usr/bin/screen diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 054fefa..8e8ee9b 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -16,7 +16,6 @@ SRC_URI = "file://rotation \ file://inputrc \ file://host.conf \ file://profile \ - file://shells \ file://fstab \ file://filesystems \ file://issue.net \ @@ -92,7 +91,6 @@ do_install () { install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile - install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc @@ -137,6 +135,24 @@ do_install_append_linuxstdbase() { done } +pkg_postinst_${PN} () { + if [ ! -f $D${sysconfdir}/shells ]; then + touch $D${sysconfdir}/shells + fi + + grep -q "^/bin/sh$" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells +} + +pkg_postrm_${PN} () { + if [ -f $D${sysconfdir}/shells ]; then + printf "$(grep -v "^/bin/sh$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells + + if [ ! -s $D${sysconfdir}/shells ]; then + rm $D${sysconfdir}/shells + fi + fi +} + PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" FILES_${PN} = "/" FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" -- 1.7.1 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCHv2] rpm: Add nativesdk to BBCLASSEXTEND
Modified FILES-paths since nativesdk can't handle hardcoded paths, Also added *.real binaries to packaging since this is not done when built as native. As far as /var having to be hardcoded, I have a hard time seeing someone modifying bitbake.conf to place localstatedir somewhere else than /var. If there exists a target/nativesdk portable way of hardcoding FILES, please let me know, and we'll do it that way. Cleanup of FEATURES, since it was the same for native & target. Signed-off-by: David Nyström --- meta/recipes-devtools/rpm/rpm_5.4.9.bb | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb index 3c7e03b..9699639 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb @@ -105,12 +105,12 @@ acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" # Specify the default rpm macros in terms of adjustable variables rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" +rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux # Note: perl and sqlite w/o db specified does not currently work. # tcl, augeas, nss, gcrypt, xar and keyutils support is untested. -PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python" PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python" PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," @@ -224,8 +224,16 @@ FILES_${PN} = "${bindir}/rpm \ ${libdir}/rpm/bin/rpmrepo \ ${libdir}/rpm/bin/rpmspecdump \ ${libdir}/rpm/bin/wget \ - /var/lib/rpm \ - /var/cache/rpm \ + ${libdir}/rpm \ + ${localstatedir}/cache \ + ${localstatedir}/cache/rpm \ + ${localstatedir}/cache/wdj \ + ${localstatedir}/lib \ + ${localstatedir}/lib/rpm \ + ${localstatedir}/lib/wdj \ + ${bindir}/rpm.real \ + ${bindir}/rpmconstant.real \ + ${bindir}/rpm2cpio.real \ " FILES_${PN}-dbg += "${libdir}/rpm/.debug \ @@ -235,7 +243,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \ FILES_${PN}-common = "${bindir}/rpm2cpio \ ${bindir}/gendiff \ ${sysconfdir}/rpm \ - /var/spool/repackage \ + ${localstatedir}/spool/repackage \ " FILES_${PN}-libs = "${libdir}/librpm-*.so \ @@ -250,6 +258,7 @@ RDEPENDS_${PN}-build += "bash" FILES_${PN}-build = "${prefix}/src/rpm \ ${bindir}/rpmbuild \ + ${bindir}/rpmbuild.real \ ${libdir}/rpm/brp-* \ ${libdir}/rpm/check-files \ ${libdir}/rpm/cross-build \ @@ -313,6 +322,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \ " RDEPENDS_${PN} = "base-files run-postinsts" RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" RDEPENDS_${PN}-build = "file" RDEPENDS_python-rpm = "${PN}" @@ -452,7 +462,7 @@ do_install_append() { } -do_install_append_class-native() { +add_native_wrapper() { create_wrapper ${D}/${bindir}/rpm \ RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ @@ -481,4 +491,12 @@ do_install_append_class-native() { done } -BBCLASSEXTEND = "native" +do_install_append_class-native() { + add_native_wrapper +} + +do_install_append_class-nativesdk() { + add_native_wrapper +} + +BBCLASSEXTEND = "native nativesdk" -- 1.8.3.2 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [oe-commits] Muhammad Shakeel : openssh: Add systemd support
On Thu, Oct 03, 2013 at 01:11:05AM +0200, Martin Jansa wrote: > On Tue, Sep 10, 2013 at 10:03:29PM +, g...@git.openembedded.org wrote: > > Module: openembedded-core.git > > Branch: master > > Commit: 6e6445d487c033913a29763f8e3a7a339d5b612d > > URL: > > http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e6445d487c033913a29763f8e3a7a339d5b612d > > > > Author: Muhammad Shakeel > > Date: Wed Sep 4 11:04:59 2013 + > > > > openssh: Add systemd support > > > > -Remove dependency on meta-systemd > > > > Signed-off-by: Muhammad Shakeel > > Signed-off-by: Saul Wold > > Signed-off-by: Richard Purdie > > > > --- > > > > .../openssh/openssh-6.2p2/sshd.socket | 11 +++ > > .../openssh/openssh-6.2p2/sshd@.service|9 + > > .../openssh/openssh-6.2p2/sshdgenkeys.service | 10 ++ > > meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 19 > > +-- > > 4 files changed, 47 insertions(+), 2 deletions(-) > > > > diff --git a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > > b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > > index c76f9ac..3a7f50d 100644 > > --- a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > > +++ b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > > @@ -26,14 +26,17 @@ SRC_URI = > > "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. > > file://init \ > > file://openssh-CVE-2011-4327.patch \ > > file://mac.patch \ > > - ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', > > '', d)}" > > + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', > > '', d)} \ > > + file://sshd.socket \ > > + file://sshd@.service \ > > + file://sshdgenkeys.service " > > > > PAM_SRC_URI = "file://sshd" > > > > SRC_URI[md5sum] = "be46174dcbb77ebb4ea88ef140685de1" > > SRC_URI[sha256sum] = > > "7f29b9d2ad672ae0f9e1dcbff871fc5c2e60a194e90c766432e32161b842313b" > > > > -inherit useradd update-rc.d update-alternatives > > +inherit useradd update-rc.d update-alternatives systemd > > > > USERADD_PACKAGES = "${PN}-sshd" > > USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir > > /var/run/sshd --shell /bin/false --user-group sshd" > > @@ -41,6 +44,9 @@ INITSCRIPT_PACKAGES = "${PN}-sshd" > > INITSCRIPT_NAME_${PN}-sshd = "sshd" > > INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" > > > > +SYSTEMD_PACKAGES = "${PN}-sshd" > > +SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket sshd@.service > > sshdgenkeys.service" > > Is it correct to use sshd@.service here? > > meta-systemd .bbappend had only sshd.socket: > -SYSTEMD_PACKAGES = "${PN}-sshd" > -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket" > > (re)starting sshd@service from postinst is failing with: > SHR root@pjama /etc $ bash -x /var/lib/opkg/info/openssh-sshd.postinst > + OPTS= > + '[' -n '' ']' > + type systemctl > + systemctl enable sshd.socket sshd@.service sshdgenkeys.service > + '[' -z '' -a enable = enable ']' > + systemctl restart sshd.socket sshd@.service sshdgenkeys.service > Failed to issue method call: Unit name sshd@.service is not valid. ping -- Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com signature.asc Description: Digital signature ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] diff between defining a "no-op" task and using [noexec]?
On Thu, 2013-10-17 at 08:07 -0400, Robert P. J. Day wrote: > using a concrete example, there's this from oe core's > linux-dummy.bb: > > do_configure() { > : > } > > do_compile () { > : > } > > do_install() { > : > } > > what is the difference between the above and writing: > > do_configure[noexec] = "1" > do_compile[noexec] = "1" > do_install[noexec] = "1" > > *is* there a difference? if so, does it have to do with the > processing of other flags for that task? > > i can see that, technically, the first variation still defines a > task to be run, while the second specifies that the task *not* be run, > so i can appreciate that those two operations have different results. The difference is just that, with the first case bitbake will run the task, it will do nothing. In the second case, bitbake will not bother running it at all. Cheers, Richard ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] connman: ignore the networking device which nfs for rootfs is working on
From: Roy Li Create connman-evn.service, which will run a script to compute the networking device when nfs root is on, and pass the result to connman.service Copy Connmand.service from source code, add ExecStartPre into it to release do_configure_append work, use the options which is passed by connman-evn.service Signed-off-by: Roy Li --- meta/recipes-connectivity/connman/connman.inc | 18 -- .../connman/connman/connman-env.service| 13 ++ .../connman/connman/connman.service| 14 +++ .../connman/connman/connmand-env | 25 meta/recipes-connectivity/connman/connman_1.18.bb |3 +++ 5 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-connectivity/connman/connman/connman-env.service create mode 100644 meta/recipes-connectivity/connman/connman/connman.service create mode 100644 meta/recipes-connectivity/connman/connman/connmand-env diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index 12f3edd..c2d71e0 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc @@ -64,15 +64,9 @@ python __anonymous () { SYSTEMD_SERVICE_${PN} = "connman.service" SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" -SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup" inherit autotools gtk-doc pkgconfig systemd update-rc.d -do_configure_append () { - sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service - -} - # This allows *everyone* to access ConnMan over DBus, without any access # control. Really the at_console flag should work, which would mean that # both this and the xuser patch can be dropped. @@ -88,6 +82,16 @@ do_install_append() { sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman fi + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 0755 ${WORKDIR}/connmand-env ${D}${sbindir}/ + install -m 0644 ${WORKDIR}/connman-env.service ${D}/${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/connman.service ${D}/${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@LIBDIR@,${libdir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + ${D}${systemd_unitdir}/system/*.service + fi + install -d ${D}${bindir} install -m 0755 ${S}/tools/*-test ${D}${bindir} if [ -e ${S}/tools/wispr ]; then @@ -163,7 +167,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ ${libdir}/connman/plugins \ ${sysconfdir} ${sharedstatedir} ${localstatedir} \ ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ -${datadir}/dbus-1/system-services/*" +${datadir}/dbus-1/system-services/* ${systemd_unitdir}/system/connman-env.service" FILES_${PN}-dbg += "${libdir}/connman/*/.debug" diff --git a/meta/recipes-connectivity/connman/connman/connman-env.service b/meta/recipes-connectivity/connman/connman/connman-env.service new file mode 100644 index 000..c4dc278 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connman-env.service @@ -0,0 +1,13 @@ +[Unit] +Description=Generate options for connection service +Before=connman.service +ConditionKernelCommandLine=root=/dev/nfs +After=syslog.target + +[Service] +Type=oneshot +ExecStart=@SBINDIR@/connmand-env +StandardOutput=null + +[Install] +WantedBy=connman.service diff --git a/meta/recipes-connectivity/connman/connman/connman.service b/meta/recipes-connectivity/connman/connman/connman.service new file mode 100644 index 000..aa0e49a --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connman.service @@ -0,0 +1,14 @@ +[Unit] +Description=Connection service +After=syslog.target +Wants=connman-env.service + +[Service] +Type=dbus +BusName=net.connman +EnvironmentFile=-@LOCALSTATEDIR@/run/connmand.env +ExecStartPre=-@LIBDIR@/connman/wired-setup +ExecStart=@SBINDIR@/connmand -n $CONNMAND_OPTS + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-connectivity/connman/connman/connmand-env b/meta/recipes-connectivity/connman/connman/connmand-env new file mode 100644 index 000..e047754 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connmand-env @@ -0,0 +1,25 @@ +#!/bin/sh + +EXTRA_PARAM="" + +NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` +NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` + +if [ ! -z "$NET_ADDR" ]; then +if [ "$NET_ADDR" = dhcp ]; then +ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` +if [ ! -z "$ethn" ]; then +EXTRA_PARAM="-I $ethn" +fi +else +
Re: [OE-core] [PATCH v4] connman: ignore the networking device which nfs for rootfs is working on
On 10/18/2013 04:57 PM, Koen Kooi wrote: + >+EXTRA_PARAM="" >+if test $nfsroot -eq 1 ; then Ah. A whole lot of tests for a script that only runs*after* NFS root has been detected already. Looks like you can kill that part of the script. Yes, Thanks -- Best Reagrds, Roy | RongQing Li ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v4] connman: ignore the networking device which nfs for rootfs is working on
Op 18 okt. 2013, om 10:12 heeft rongqing...@windriver.com het volgende geschreven: > From: Roy Li > > Create connman-evn.service, which will run a script to compute the networking > device when nfs root is on, and pass the result to connman.service > > Copy Connmand.service from source code, add ExecStartPre into it to release > do_configure_append work, use the options which is passed by > connman-evn.service > > Signed-off-by: Roy Li > --- > > +++ b/meta/recipes-connectivity/connman/connman/connman-env.service > @@ -0,0 +1,13 @@ > +[Unit] > +Description=Generate options for connection service > +Before=connman.service > +ConditionKernelCommandLine=root=/dev/nfs So this only runs when using NFS root and calls... > +After=syslog.target > + > +[Service] > +Type=oneshot > +ExecStart=@SBINDIR@/connmand-env ... the above script. Let's see what the script does below ... > +++ b/meta/recipes-connectivity/connman/connman/connmand-env > @@ -0,0 +1,42 @@ > +#!/bin/sh > + > +nfsroot=0 > + > +exec 9<&0 < /proc/mounts > +while read dev mtpt fstype rest; do > + if test $mtpt = "/" ; then > + case $fstype in > + nfs | nfs4) > + nfsroot=1 > + break > + ;; > + *) > + ;; > + esac > + fi > +done > + > +EXTRA_PARAM="" > +if test $nfsroot -eq 1 ; then Ah. A whole lot of tests for a script that only runs *after* NFS root has been detected already. Looks like you can kill that part of the script. ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] openssh: fix sshd status command error prompt
sshd status command results in error prompt: root@qemu0:~# /etc/init.d/sshd status /usr/sbin/sshd (pid 1199) is running... /etc/init.d/sshd: line 100: return: can only `return' from a function or sourced script "service --status-all" command also display wrong status for sshd. This commit fix this error prompt and make service command display right status for sshd. Signed-off-by: Qiang Chen --- .../openssh/openssh-6.2p2/init |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init index 266689c..e7f3971 100644 --- a/meta/recipes-connectivity/openssh/openssh-6.2p2/init +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/init @@ -97,7 +97,7 @@ case "$1" in status) status /usr/sbin/sshd - return $? + exit $? ;; *) -- 1.7.9.5 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] libjson: update to 0.11 and rename to json-c
From: Jack Mitchell libjson is now known as json-c, it keeps support for the old libjson namespace so it shouldn't break anything. Built without parallel make as it would fail when it tries to link to link back to itself, which is odd, but the official word is: don't build in parallel. Signed-off-by: Jack Mitchell --- meta/conf/distro/include/seperatebuilddir.inc | 2 +- meta/recipes-devtools/json-c/json-c_0.11.bb | 13 + meta/recipes-devtools/libjson/libjson_0.9.bb | 14 -- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 meta/recipes-devtools/json-c/json-c_0.11.bb delete mode 100644 meta/recipes-devtools/libjson/libjson_0.9.bb diff --git a/meta/conf/distro/include/seperatebuilddir.inc b/meta/conf/distro/include/seperatebuilddir.inc index c067183..e1a5c6b 100644 --- a/meta/conf/distro/include/seperatebuilddir.inc +++ b/meta/conf/distro/include/seperatebuilddir.inc @@ -294,7 +294,7 @@ B_pn-libice = "${SEPB}" B_pn-libice-native = "${SEPB}" B_pn-libid3tag = "${SEPB}" B_pn-libidn = "${SEPB}" -B_pn-libjson = "${SEPB}" +B_pn-json-c = "${SEPB}" B_pn-libksba = "${SEPB}" B_pn-libmad = "${SEPB}" B_pn-libmatchbox = "${SEPB}" diff --git a/meta/recipes-devtools/json-c/json-c_0.11.bb b/meta/recipes-devtools/json-c/json-c_0.11.bb new file mode 100644 index 000..e0391f5 --- /dev/null +++ b/meta/recipes-devtools/json-c/json-c_0.11.bb @@ -0,0 +1,13 @@ +SUMMARY = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C" +HOMEPAGE = "https://github.com/json-c/json-c/wiki"; +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" + +SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"; + +SRC_URI[md5sum] = "aa02367d2f7a830bf1e3376f77881e98" +SRC_URI[sha256sum] = "28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c" + +PARALLEL_MAKE = "" + +inherit autotools diff --git a/meta/recipes-devtools/libjson/libjson_0.9.bb b/meta/recipes-devtools/libjson/libjson_0.9.bb deleted file mode 100644 index e4951a8..000 --- a/meta/recipes-devtools/libjson/libjson_0.9.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "JSON-C - A JSON implementation in C" -HOMEPAGE = "http://oss.metaparadigm.com/json-c/"; - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=30a276a476b02c2dcd0849bde417fb17" - -SRC_URI = "http://oss.metaparadigm.com/json-c/json-c-${PV}.tar.gz"; -SRC_URI[md5sum] = "3a13d264528dcbaf3931b0cede24abae" -SRC_URI[sha256sum] = "702a486c9bf8e19137d484ab5c49b4ad314eb5e1fe37062a72c0a0fa39439475" - -S = "${WORKDIR}/json-c-${PV}" - - -inherit autotools diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 4c10aa9..475da41 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \ DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool" # optional DEPENDS += "udev alsa-lib glib-2.0 dbus gconf" -DEPENDS += "libjson gdbm speex libxml-parser-perl-native" +DEPENDS += "json-c gdbm speex libxml-parser-perl-native" inherit autotools pkgconfig useradd gettext perlnative -- 1.8.4 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v4] connman: ignore the networking device which nfs for rootfs is working on
From: Roy Li Create connman-evn.service, which will run a script to compute the networking device when nfs root is on, and pass the result to connman.service Copy Connmand.service from source code, add ExecStartPre into it to release do_configure_append work, use the options which is passed by connman-evn.service Signed-off-by: Roy Li --- meta/recipes-connectivity/connman/connman.inc | 18 + .../connman/connman/connman-env.service| 13 ++ .../connman/connman/connman.service| 14 +++ .../connman/connman/connmand-env | 42 meta/recipes-connectivity/connman/connman_1.18.bb |3 ++ 5 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-connectivity/connman/connman/connman-env.service create mode 100644 meta/recipes-connectivity/connman/connman/connman.service create mode 100644 meta/recipes-connectivity/connman/connman/connmand-env diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index 12f3edd..c2d71e0 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc @@ -64,15 +64,9 @@ python __anonymous () { SYSTEMD_SERVICE_${PN} = "connman.service" SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" -SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup" inherit autotools gtk-doc pkgconfig systemd update-rc.d -do_configure_append () { - sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service - -} - # This allows *everyone* to access ConnMan over DBus, without any access # control. Really the at_console flag should work, which would mean that # both this and the xuser patch can be dropped. @@ -88,6 +82,16 @@ do_install_append() { sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman fi + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 0755 ${WORKDIR}/connmand-env ${D}${sbindir}/ + install -m 0644 ${WORKDIR}/connman-env.service ${D}/${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/connman.service ${D}/${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@LIBDIR@,${libdir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + ${D}${systemd_unitdir}/system/*.service + fi + install -d ${D}${bindir} install -m 0755 ${S}/tools/*-test ${D}${bindir} if [ -e ${S}/tools/wispr ]; then @@ -163,7 +167,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ ${libdir}/connman/plugins \ ${sysconfdir} ${sharedstatedir} ${localstatedir} \ ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ -${datadir}/dbus-1/system-services/*" +${datadir}/dbus-1/system-services/* ${systemd_unitdir}/system/connman-env.service" FILES_${PN}-dbg += "${libdir}/connman/*/.debug" diff --git a/meta/recipes-connectivity/connman/connman/connman-env.service b/meta/recipes-connectivity/connman/connman/connman-env.service new file mode 100644 index 000..c4dc278 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connman-env.service @@ -0,0 +1,13 @@ +[Unit] +Description=Generate options for connection service +Before=connman.service +ConditionKernelCommandLine=root=/dev/nfs +After=syslog.target + +[Service] +Type=oneshot +ExecStart=@SBINDIR@/connmand-env +StandardOutput=null + +[Install] +WantedBy=connman.service diff --git a/meta/recipes-connectivity/connman/connman/connman.service b/meta/recipes-connectivity/connman/connman/connman.service new file mode 100644 index 000..aa0e49a --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connman.service @@ -0,0 +1,14 @@ +[Unit] +Description=Connection service +After=syslog.target +Wants=connman-env.service + +[Service] +Type=dbus +BusName=net.connman +EnvironmentFile=-@LOCALSTATEDIR@/run/connmand.env +ExecStartPre=-@LIBDIR@/connman/wired-setup +ExecStart=@SBINDIR@/connmand -n $CONNMAND_OPTS + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-connectivity/connman/connman/connmand-env b/meta/recipes-connectivity/connman/connman/connmand-env new file mode 100644 index 000..ffdf70a --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/connmand-env @@ -0,0 +1,42 @@ +#!/bin/sh + +nfsroot=0 + +exec 9<&0 < /proc/mounts +while read dev mtpt fstype rest; do + if test $mtpt = "/" ; then + case $fstype in + nfs | nfs4) + nfsroot=1 + break + ;; + *) + ;; + esac + fi +done + +EXTRA_PARAM="" +if test $nfsroot -eq 1 ; then +NET_DEVS=`c
[OE-core] [PATCH 1/1] image_types.bbclass: add --numeric-owner option to tar command
From: Chen Qi If the same username exists on both target and the build host, but the uids differ, and we start target via NFS, then the uid for the user will be incorrect on target. For example, if postfix's uid on host is 119 and on target is 1024, then if we start target via NFS, the uid for postfix will be 119. The root cause is that when we use runqemu-extract-sdk to generate the NFS rootfs for later use, the tar command will respect the username instead of uid. So if PSEUDO_PASSWD environment is not set correctly, the host /etc/passwd will be used, resulting in wrong uids. The situation for gid is completely analogous to that of uid. It's almost impossible for the runqemu-extract-sdk to guess the correct location of the needed password file merely based on the target tarball name. This patch solves this problem by adding the '--numeric-owner' option to the tar command so that the username/groupname is not recorded in the tarball. In this situation, we'll always get the correct uid/gid after extracting the tarball. [YOCTO #5364] Signed-off-by: Chen Qi --- meta/classes/image_types.bbclass |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 9ead059..234c9ff 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -171,7 +171,7 @@ IMAGE_CMD_btrfs () { IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz" -IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." +IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar --numeric-owner -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." CPIO_TOUCH_INIT () { if [ ! -L ${IMAGE_ROOTFS}/init ] -- 1.7.9.5 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/1] image_type.bbclass: add '--numeric-owner' to tar command
From: Chen Qi The following changes since commit 529bf977e956175bd8405ebffc88194192e44740: update-rcd.bbclass: fix host/target test (2013-10-16 14:51:07 +0100) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/tar-numeric-owner http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/tar-numeric-owner Chen Qi (1): image_types.bbclass: add --numeric-owner option to tar command meta/classes/image_types.bbclass |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] lib/oeqa/runtime: build kernel module on target test
Builds a simple Hello World module on target. Added to the defaults for core-image-sato-sdk. Signed-off-by: Stefan Stanacar --- meta/classes/testimage.bbclass| 2 +- meta/lib/oeqa/runtime/files/hellomod.c| 19 +++ meta/lib/oeqa/runtime/files/hellomod_makefile | 8 +++ meta/lib/oeqa/runtime/kernelmodule.py | 33 +++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 meta/lib/oeqa/runtime/files/hellomod.c create mode 100644 meta/lib/oeqa/runtime/files/hellomod_makefile create mode 100644 meta/lib/oeqa/runtime/kernelmodule.py diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 2f9c974..5d61c2b 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -28,7 +28,7 @@ TEST_LOG_DIR ?= "${WORKDIR}/testimage" DEFAULT_TEST_SUITES = "ping auto" DEFAULT_TEST_SUITES_pn-core-image-minimal = "ping" DEFAULT_TEST_SUITES_pn-core-image-sato = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg" -DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart dmesg" +DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart kernelmodule dmesg" TEST_SUITES ?= "${DEFAULT_TEST_SUITES}" diff --git a/meta/lib/oeqa/runtime/files/hellomod.c b/meta/lib/oeqa/runtime/files/hellomod.c new file mode 100644 index 000..a383397 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/hellomod.c @@ -0,0 +1,19 @@ +#include +#include +#include + +static int __init hello_init(void) +{ +printk(KERN_INFO "Hello world!\n"); +return 0; +} + +static void __exit hello_cleanup(void) +{ +printk(KERN_INFO "Cleaning up hellomod.\n"); +} + +module_init(hello_init); +module_exit(hello_cleanup); + +MODULE_LICENSE("GPL"); diff --git a/meta/lib/oeqa/runtime/files/hellomod_makefile b/meta/lib/oeqa/runtime/files/hellomod_makefile new file mode 100644 index 000..b92d5c8 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/hellomod_makefile @@ -0,0 +1,8 @@ +obj-m := hellomod.o +KDIR := /usr/src/kernel + +all: + $(MAKE) -C $(KDIR) M=$(PWD) modules + +clean: + $(MAKE) -C $(KDIR) M=$(PWD) clean diff --git a/meta/lib/oeqa/runtime/kernelmodule.py b/meta/lib/oeqa/runtime/kernelmodule.py new file mode 100644 index 000..cbc5742 --- /dev/null +++ b/meta/lib/oeqa/runtime/kernelmodule.py @@ -0,0 +1,33 @@ +import unittest +import os +from oeqa.oetest import oeRuntimeTest, skipModule +from oeqa.utils.decorators import * + +def setUpModule(): +if not oeRuntimeTest.hasFeature("tools-sdk"): +skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES") + + +class KernelModuleTest(oeRuntimeTest): + +def setUp(self): +self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod.c"), "/tmp/hellomod.c") +self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod_makefile"), "/tmp/Makefile") + +@skipUnlessPassed('test_ssh') +@skipUnlessPassed('test_gcc_compile') +def test_kernel_module(self): +cmds = [ +'cd /usr/src/kernel && make scripts', +'cd /tmp && make', +'cd /tmp && insmod hellomod.ko', +'lsmod | grep hellomod', +'dmesg | grep Hello', +'rmmod hellomod', 'dmesg | grep "Cleaning up hellomod"' +] +for cmd in cmds: +(status, output) = self.target.run(cmd, 900) +self.assertEqual(status, 0, msg="\n".join([cmd, output])) + +def tearDown(self): +self.target.run('rm -f /tmp/Makefile /tmp/hellomod.c') -- 1.8.3.1 ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core