Commit Graph

56 Commits

Author SHA1 Message Date
Chen Qi 101662d357 busybox-syslog: add configuration file /etc/syslog.conf
By default, busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, but it
doesn't ship a configuration file.

This patch adds a configuration file (/etc/syslog.conf) to the
busybox-syslog package. This configuration file mainly serves as a
placeholder now.

The advantages of this change are:
1. Make the users aware of the fact that the /etc/syslog.conf file
   will actually be parsed by busybox's syslogd utility. And configuring
   that file will change the logging behaviour.
2. In a systemd based system, this file will prevent the same configuration
   file provided by the sysklogd package from messing things up.

[YOCTO #5066]

(From OE-Core rev: b7f6688f0700a1575037362af7a8ca94dccce471)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 23:03:21 +01:00
Paul Eggleton b18b210c1e busybox: enable shared memory logging for systemd
The default command-line options for launching busybox's syslogd are
"-C" if using sysvinit; but because we use /etc/default/busybox-syslog
when using systemd which the sysvinit initscript doesn't use, and no
/etc/default/busybox-syslog is installed by default in OE-Core, the
default arguments with systemd were no arguments at all with OE-Core
alone. Effectively merge in the bbappend from meta-oe that adds a
default file in order to set the default options to "-C" for systemd as
well.

(From OE-Core rev: a23aa8e7467cf2b7f4e8ff85a3aa841ff6b508e5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 11:47:19 +01:00
Florin Sarbu 02521a40d3 busybox.inc: Avoid error when SYSLOG is not enabled
Add -f to rm of ${D}${sysconfdir}/syslog-startup.conf.${BPN} so as to
not error out when the busybox config used does not have SYSLOG enabled
and DISTRO_FEATURES does not contain sysvinit.

(From OE-Core rev: 4c5756149754d0b18b14595db335f8f5e14cc0a3)

Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 15:11:13 +01:00
Chen Qi 86d8d89c21 busybox: remove syslog-startup.conf if sysvinit not in DISTRO_FEATURES
sysvinit and systemd have different ideas about configuration files (or
environment files in systemd), so basically we can't use the same one in
both cases.

To avoid confusion, this patch removes syslog-startup.conf if 'sysvinit'
is not in DISTRO_FEATURES.

[YOCTO #4837]
[YOCTO #4860]

(From OE-Core rev: 89f62147a61108b4be40001e1fbe3be33bacf00b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-12 13:09:52 +01:00
Muhammad Shakeel fe378e1d46 busybox: Add syslog-init alternative only if SysV in enabled
If systemd is enabled then syslog is handled through a service file
and related files in /etc/init.d are removed. This removes following
warning:

WARNING: busybox: NOT adding alternative provide /etc/init.d/syslog:
/etc/init.d/syslog.busybox does not exist

(From OE-Core rev: 29c3ecee32d9bfb03099a4f10456fd0270e107fb)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:56 +01:00
Chen Qi cb53421428 busybox: fix the on-target upgrade problem
We now can have a 'one-binary' version of busybox, or 'two-binary'
version of busybox, controlled by the 'BUSYBOX_SPLIT_SUID' variable.
This makes on-target upgrade a problem, as we have to support the
following four upgrading paths.

For convenience, in the following context, A is used to denote a
'two-binary' version of busybox while B is used to denote a 'one-binary'
version of busybox.

A --(upgrade)--> B
B --(upgrade)--> A
A --(upgrade)--> A
B --(upgrade)--> B

This patch makes effort to support the above four situations.

[YOCTO #4802]

(From OE-Core rev: 4e571e97750f3ac6a62cd0d2d10c08be98230630)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:34:21 +01:00
Björn Stenberg 67d95bffa9 busybox: Add ptest
Install busybox test suite and run it as ptest.

(From OE-Core rev: 0d29dc5b5f7742df60fdba90835ef77425963bde)

Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:58 +01:00
Chen Qi 680ff5552d busybox: add the ability to split the busybox binary
This patch enables us to split the busybox into two binaries, one
containing suid applications, and the other containing nosuid apps.

Add a variable, BUSYBOX_SPLIT_SUID, to control whether to split the
busybox binary into two parts. We default it to "1" to enable the
splitting, but users could still override it to disable the splitting.
After all, busybox has no internal support for this suid apps splitting,
so there might be users out there who want just one busybox binary.

The basic idea here is to build the busybox twice, each with the correct
configuration items. We extract the non-app part of the original .config
file, and merge this part with the suid-app part to form a .config which
contains only suid apps. The same strategy applies to the non-suid apps.

[YOCTO #4207]

(From OE-Core rev: e5a1442819dfb74e86a6f69da008ba6908c8bbc7)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:52 +01:00
Chen Qi 726483741a busybox: add support for CONFIG_FEATURE_INDIVIDUAL
Previously, if CONFIG_FEATURE_INDIVIDUAL was enabled for busybox,
yocto-based systems could start correctly.

This is because if busybox is built as individual apps, '/bin/busybox'
may not be present, so setting the default ALTERNATIVE_TARGET to
'/bin/busybox' is not appropriate and could lead to errors.

This patch fixes this problem by checking the existence of '/bin/busybox'
before setting the ALTERNATIVE_TARGET to '/bin/busybox'.

After this change, if busybox is built as individual apps, we'll have
links like '/bin/ls -> /bin/ls.busybox', otherwise, we'll have links
like '/bin/ls -> /bin/busybox'.

Note there's a grep expression change in this patch. The old expression
doesn't work well, it has an unwanted underscore, so I changed it to make
it work.

[YOCTO #4570]

(From OE-Core rev: 87efa83191f0b4f4cec3a821b6dfe425c781c077)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:51 +01:00
Chen Qi 6984890b2e busybox: remove the postinst part of the recipe
Remove the pkg_postinst_${PN} from this recipe, as it's redundant.
It basically wants to do the same thing as the update-alternatives
does. But it doesn't do it well.

(From OE-Core rev: 5b961afc784747eb8240540e542a789849118596)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:44:51 +01:00
Mike Looijmans 39537e01a5 busybox-mdev: Startup at level S03 instead of S06
The udev hotplug deamon starts at 03, so mdev should start at the same
point.

This fixes the bug that when modutils (runs at 04) initializes devices
that the mdev hotplug will often not pick them up, resulting in missing
device nodes and similar problems.

(From OE-Core rev: 18d3e5eb9102a984d00837f8fec16fda522c511a)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:49 +03:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch
cleans some of them up, specifically:

 * Remove pointless "from __builtin__ import file"
 * Use open(), not file()
 * Wrap file usage in a with container to ensure files are closed
 * Add missing .close() calls in some cases

(From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Ross Burton 09b89187b8 busybox: hard-code the syslog service file
Previously this was using ${PN}-syslog.service, which changes with multilib.

(From OE-Core rev: ee36f997e68f5a995baf361191cef7a46ff51203)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:58 +01:00
Ting Liu aa1d7fa9ce busybox: Add inetd related files
Add back inetd and inetd.conf files which are needed if
CONFIG_INETD is enabled in the defconfig. Grabbed these
files from oe-classic

This patch is based on the previous patch for denzil:
http://patches.openembedded.org/patch/33235/

(From OE-Core rev: 929c738787b6f513ce235ed5f7753408a570d632)

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:30 +01:00
Ting Liu fc30d72a73 busybox: detects customized configs when do_install
After using 'bitbake -c menuconfig busybox' to customize defconfig,
do_install fail to detect the changes. Grep configs in ${B}/.config
instead of ${WORKDIR}/defconfig.

(From OE-Core rev: 5c088c2d3b23026752649d077ee44fe3dbe26aa4)

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:30 +01:00
Ross Burton ce10e5f34a busybox: order and group initscript variables logically
(From OE-Core rev: 94acb39385a14d54503db08351a717449e2d4b50)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:04 +00:00
Radu Moisan 58a6a7c056 busybox: enable systemd integration for syslogd
(From OE-Core rev: cf3618f9a57e46fb78d5be35d473e2dd5290e961)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:01 +00:00
Chen Qi 56dc1720ca busybox: add config fragments
Add config fragments to busybox.

The implementation makes use of merge_config.sh script in kern-tools-native.
The use case is similar to the yocto kernel's configuration fragments.

We also add kern-tools-native to busybox's DEPENDS variable to ensure
that merge_config.sh is available when required.

[YOCTO #3379]

(From OE-Core rev: bbcd8b344598850ea2c8d3ad375c519713581fde)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:31 +00:00
Elizabeth Flanagan 094c4a0878 bzip2 and busybox: Incorrect LICENSE
The license for bzip2 is not quite BSD. I have an email out to the
maintainer to see if we can utilize a common BSD license (or something
else) however, for now, we should revert bzip2 back to a special
license.

As busybox also utilizes a lightly modified bzip2, this also
effects busybox.

(From OE-Core rev: a0b132798d2c1adf79414787b8317327a554f852)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 10:04:08 +01:00
Richard Purdie c63ff82422 busybox: Add missing INITSCRIPT_NAME_${PN}-hwclock
Fix failures like:

Configuring busybox-hwclock.
usage: update-rc.d [-n] [-f] [-r <root>] <basename> remove
       update-rc.d [-n] [-r <root>] [-s] <basename> defaults [NN | sNN kNN]
       update-rc.d [-n] [-r <root>] [-s] <basename> start|stop NN runlvl [runlvl] [...] .
                -n: not really
                -f: force
                -v: verbose
                -r: alternate root path (default is /)
                -s: invoke start methods if appropriate to current runlevel
Collected errors:
 * pkg_run_script: package "busybox-hwclock" postinst script returned status 1.
 * opkg_configure: busybox-hwclock.postinst returned 1.

(From OE-Core rev: 43b4ffc11874803db37c43b521ce27c51c677c8b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 17:27:49 +01:00
Richard Purdie 0b09e50810 busybox: Fix misplaced quote
(From OE-Core rev: 938d07871bedd91f0d95ed6fe338ecbfafa5ebfe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26 18:28:36 +01:00
Andrei Gherzan be141470dc busybox: Package hwclock.sh initscript separately
We package this separately to be able to pull this in only if this makes
sense for the MACHINE.

(From OE-Core rev: b97e37e1444ef32e7837dcc79e3fad36c4284b65)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 18:04:25 +01:00
Jesse Zhang a4b1e34848 busybox: udhcpc shouldn't be a service
udhcpc is invoked from the networking service, so it shouldn't exist
standalone. If /etc/init.d/busybox-udhcpc is present, it will cause
udhcpc to be started two times.

And since the script doesn't support the stop action, it will cause
udhcpc to be started even when system is being shutdown.

Remove /etc/init.d/busybox-udhcpc to resolve the issues.

[YOCTO #2840]

(From OE-Core rev: 8329c4679ec0ce319d2a81d755a0da5b05474688)

Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:35:57 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Saul Wold 6c7fccbd09 busybox: add correct ALTERNATIVE_TARGET for init.d/syslog
[YOCTO #2535]

(From OE-Core rev: 36ea756883d35f654b102f0cd6bdb2ec284753d0)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:26:44 +01:00
Mark Hatle c16eddd1d9 busybox: Fix syslog configuration file
When update alternatives was modified, the syslog configuration file
alternative was incorrectly defined to be "busybox".  Fix this by
enabling the proper target file.

[YOCTO #2557]

(From OE-Core rev: 935f2c02809814de2b903a704707d7bc85bbefdf)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-18 13:22:18 +01:00
Saul Wold e90cfbdc95 busybox: Add check for wifi/bluetooth to enable rfkill
rfkill is a usefull tool when you have a device with bluetooth and wifi enabled

[YOCTO #2494]

(From OE-Core rev: f71258f0ef96802e714b6f12ecc8c17842d6cf87)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-15 15:12:44 +01:00
Mark Hatle 92482cb496 busybox: use new update-alternatives
(From OE-Core rev: fbbc96aed5086f853a1179f1478ccd252af24094)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:41 +01:00
Khem Raj 60e2345f1b busybox: Pass HOST_CC_ARCH through CONFIG_EXTRA_CFLAGS
The -mabi option is part of HOST_CC_ARCH which does not
appear in CFLAGS. This is for completeness since compiler
already defaults to n64 it wont matter that much

(From OE-Core rev: 2aa0540515efc15957101e24224b425ee00446d9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-01 12:38:08 +01:00
Richard Purdie b1aeaa8b0d meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
sed \
 -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
 -i `grep -ril bb.data.expand *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:23:53 -08:00
Martin Jansa 3349b88a76 More quoting fixes
* We have various variables which are either not quoted at all or are half
  quoted. This patch fixes the bad exmaples so everything is consistent.

(From OE-Core rev: 960ee8076e860353a05eb2eb7f825a455c54698d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-26 22:51:58 +00:00
Andreas Oberritter 578b6f222d busybox: don't create /etc/default
* It's not used by the recipe and its creation
  currently depends on CONFIG_HWCLOCK=y.

(From OE-Core rev: cd59c2fcefa6aeacf78a63c5c9a623a4d77c0941)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23 23:59:37 +00:00
Richard Purdie 12306d01a0 package.bbclass: Optimise the per file rpm handling
Currently a process was being forked off for each individual file
this class wanted to inspect with rpmdeps. This converts it to use
rpmdeps-oecore which allows batch processing of these dependencies.

For do_package for perl, this reduced the time by about 1 minute (33%).

(From OE-Core rev: 548037acd63bd4859f8de8d23a3d12f36ce9f97f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-10 14:38:45 +00:00
Andrei Gherzan e2a3695ad4 busybox/uglibc: remove obsolete check for "kernel24"
Busybox checks if MACHINE_FEATURES contains "kernel24". If so, CONFIG_FEATURE_2_4_MODULES will be on "y".
kernel24 is no longer present in any machine configuration. The same situation is in uglibc with a
different CONFIG mapping.

[YOCTO #1901]

(From OE-Core rev: 7257ded5355ffdc0fc169e7f34daeedb0b3dcd78)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17 15:15:53 +00:00
Joshua Lock 120ea473c4 busybox: rename syslog.conf to syslog-startup.conf
Busybox 1.19 introduced basic support for an rsyslog inspired syslog.conf
whereas we've been shipping syslog.conf as a file to be sourced by the
syslog init script in order to configure which options busybox's syslog is
started with.

Busybox 1.19 in syslog mode chokes on our syslog.conf and doesn't start.

This patch renames the syslog.conf we ship to syslog-startup.conf in order
to prevent busybox trying to parse the file as an rsyslog style syslog.conf

Fixes [YOCTO #1848]

(From OE-Core rev: b406998019b577eac7f758298cc2695372e03d15)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-04 12:02:44 +00:00
Elizabeth Flanagan 5eeea9e170 OECore license fixes: meta/*
This is a quick audit of only the most obviously wrong licenses
found within OECore. These fixes fall into four areas:

- LICENSE field had incorrect format so that the parser choked
- LICENSE field has a license with no version
- LICENSE field was actually incorrect
- LICENSE field has an imaginary license that didn't exist

This fixes most of the LICENSE warnings thrown, along with my prior
commit adding additional licenses to common-licenses and additional
SPDXLICENSEMAP entries.

HOWEVER..... there is much to be done on the license front.
For a list of recipes with licenses that need obvious fixing see:

https://wiki.yoctoproject.org/wiki/License_Audit

That said, I would suggest another license audit as I've found
enough inconsistencies. A good suggestion is when in doubt, look at
how openSuse or Gentoo or Debian license the package.

(From OE-Core rev: 3083dd70b3a9fa01fcc3cf00373b05502505996e)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:32 +00:00
Richard Purdie 0a434ac101 getVar/setVar cleanups
Complete the bb.data.getVar/setVar replacements with accesses
directly to the data store object.

(From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27 10:25:34 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Paul Eggleton b81caca231 busybox: add grep to temporary links during uninstall
In the busybox package prerm we set up some temporary links and modify
PATH so that certain utilities are provided for the purpose of running
update-alternatives; if grep is not among these then you get errors when
removing busybox, so add a temporary link for grep as well.

(From OE-Core rev: 013eca09c863862cc6b7ee3bc22923bf8fb42956)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:37:10 +00:00
Mark Hatle 87849d8420 busybox: Enhance to add dynamic per-file provides
When using the RPM package backend, we need a full list of per-file
provides (and requires).  The busybox package provides a number of
command line utilities, such as /usr/bin/env.  However, because
the utilities are created at post install time via scripting the
provide of each of the links was never made.  So any programs,
such as python, that require /usr/bin/env were unable to resolve
the dependency and failed.

This change only affects packaging backends that use per-file
dependency data.  Currently RPM is the only packaging backend
with this ability.

(From OE-Core rev: dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21 13:42:52 +01:00
Dongxiao Xu be71f55f27 busybox: Change ${PN} to ${BPN} in file names
Some files in busybox are named with ${PN}. In multilib case, ${PN}
will be prefixed with "lib32-" or "lib64-". Use ${BPN} instead.

(From OE-Core rev: d6c24d3944ed662591372fbd7bf855395655d634)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-19 09:29:19 -07:00
Chris Larson c45e3150e9 busybox: don't strip the main binary
With this, we get a useful busybox-dbg package.

(From OE-Core rev: 95c9834a358118f322159139950dd9a92f561e88)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-12 17:21:52 +01:00
Phil Blundell ec3209cd22 busybox: respect ${LDFLAGS}
This avoids a GNU_HASH QA warning.

(From OE-Core rev: 42cc35d1103c82e6e1f9aefc60bbea518ccc0768)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-14 15:12:53 +01:00
Paul Eggleton 9b36cd78ff busybox: fix missing features due to lack of variable expansion
Expand DISTRO_FEATURES and MACHINE_FEATURES fully so that any inner
variable references (such as DISTRO_FEATURES_LIBC) are expanded properly.

(From OE-Core rev: 01e372559052aa348ceced07540fdb774d292c65)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12 15:21:26 +01:00
Richard Purdie 8511d1ec1b Drop PRIORITY variable
As discussed on the mailing list, this variable isn't useful and if wanted
would be better implemented by distros using pn-X overrides.

This patch executes:

find . -regex ".*\.\(bb\|inc\)$" | xargs sed -i '/^PRIORITY = ".*"$/d'

against the tree removing the referenced. Thanks to Phil Blundell for
the command.

(From OE-Core rev: d122343362669c683acc4af295971a62cbc823fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 23:27:29 +01:00
Phil Blundell ab1171b512 busybox: backport distro-features handling from oe master
This is a backport from oe master of the code which adjusts the busybox
config according to DISTRO_FEATURES etc.

(From OE-Core rev: b5564c4a9cadf306b447180c433b25ec071f8ce1)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-14 15:29:16 +01:00
Phil Blundell ab65c7247f busybox: sync do_install() with oe master (mostly)
This is basically a backport of the current state of the art from the
openembedded master repo.  In particular this fixes an installation
error on micro:

| + cp -dPr /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/bin /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/sbin /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/
| cp: will not create hard link `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/image/bin' to directory `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/bin'
| cp: cannot copy a directory, `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image', into itself, `/home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/image/busybox/image'
| ERROR: Function 'do_install' failed (see /home/pb/oe/build-meta/tmp-eglibc/work/i586-oe-linux/busybox-1.18.4-r1.2/temp/log.do_install.3808 for further information)

(From OE-Core rev: 613d0275a59be9154c2a2cdc101bd3e2c79a6d44)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 18:34:36 +01:00
Otavio Salvador bcd7f10373 busybox: add support to mdev
This changes the packaging only if the configuration used has mdev
support enabled.

(From OE-Core rev: 82b163043aa53488a03bb3de3a78e5b6eeb76019)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10 09:57:08 +01:00
Paul Eggleton bbd6999a72 Remove distro-specific metadata for distros not in oe-core
(From OE-Core rev: ea2cd4b8e9bc013a007fe2a1a605ecb59db5a896)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 12:26:30 +01:00
Mark Hatle 9849e700ad busybox: Rework busybox to fix limitations in initscripts
A recent busybox change added a "second" initscript to the main busybox
package.  This however is not supported by the update-rc.d.bbclass.
Instead we split the package so that each initscript gets it's own split.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-12 00:30:29 +00:00