libarchive: open_zipped() does not need to check extensions for e.g. gzip

We only need to check for signature-less extensions,
currently only .lzma. The rest can be happily autodetected.

This fixes "zcat FILE_WITHOUT_GZ_EXT" case, among others.

Change-Id: I2d52e398e2422265ba2ef530f9b2edfb20affc6f
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash: in bash compat mode, always export $SHLVL

function                                             old     new   delta
ash_main                                            1437    1442      +5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb: fix parsing of "10101010" date/time form

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
iplink: fix build with kernel versions prior to 2.6.23

Signed-off-by: Eugene Rudoy <gene.devel@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
nc: fix option bit positions. Closes 6926

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb: open_zipped() should not fail on non-compressed files

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
zcat: complain if input is not compressed

function                                             old     new   delta
buffer_fill_and_print                                178     191     +13
varvalue                                             735     743      +8
bbunpack                                             747     755      +8
open_zipped                                           85      89      +4
xmalloc_open_zipped_read_close                        61      63      +2
get_addr_1                                           240     242      +2
fbsplash_main                                       1228    1230      +2
pstree_main                                          322     321      -1
builtin_type                                         121     119      -2
do_load                                              954     926     -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31)              Total: 8 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
update config for 1.22.1, add F2FS volume_id support

Change-Id: I5a80246222448c238ef48a0eb6d906f011f3f43d
touch -h: quickfix for bionic

Change-Id: I7821c039214bad2741baeb9177d31e22495583d8
bionic: some new type warnings fixes

Change-Id: I5f829e5918fb0960bb9670deac54c1fe0184550f
tar: add selinux context support on create

No flag is required for the moment, it will add them
to the tar if selinux is enabled on the machine.

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: Ic7a39ee03087ed19e814b138ec6d70cdadb605cd
tar: only include selinux context with -p opt

Change-Id: I22134071cca5ac9fd66cff2cd1ddd09ff3d5c1bb
selinux: enable support for bionic, add applets in config

require libsepol package (mm in external/libsepol or add package)

Tested applets:
  getenforce, setenforce, sestatus, selinuxenabled, ls -Z, tar -c,
  getsebool, setsebool,
  runcon, matchpathcon, chcon, restorecon, setfiles

Notes:
  matchpathcon selabel_lookup was broken by the incompatible regexec
  which is now in bionic libc (netbsd part), libselinux linkage used
  busybox one, so a rename of internal regex functions was required

  recovery will not use bb_regex lib, so regex commands could not
  work exactly like xbin or static ones (sed/less/expr/awk/pgrep)
  this is already the case, and can be changed by including libregex
  package in recovery + ifdef in xregex.h

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: Id82b8a7672a669e3f95360bb70b7b127591f2080
unzip: set ENABLE_DESKTOP to allow unpacking signed Android OTAs

Without this flag set, attempting to use BusyBox unzip to unpack a
signed Android OTA results in the error

unzip: zip flags 1 and 8 are not supported

Set ENABLE_DESKTOP for the unzip code to enable the necessary feature.

Change-Id: I3f764bde678311a8d3de787ea503f9cc793337a3
android-x86: fix building warnings of kitkat-x86

works also on arm platform, so...

Author:    Chih-Wei Huang <cwhuang@linux.org.tw>
Change-Id: Ic3ade475c5b92de26623e277170c71c49f9e41de
stat: fix printing selinux context and null-dereference

busybox stat tries to always print the selinux context, even if it
is not requested which leads to a segmentation fault due to
dereferencing a null-pointer.

This also changes the format-string used to print the context to
so it actually produces useful output.

Change-Id: Idfe15c931840457f357f860e560fca5b0480ad6f
tar: fix prototype typo, not for android config

Change-Id: I18875e8e8dae4858766d7ddf5b57c11cd8d0823b
busybox-full: enable some new applets

 chvt, deallocvt, fgconsole
 findfs, hwclock, lspci, nmeter
 openvt, rdate, setkeycodes, smemcap

 also enable swapon -p priority, and wc large support

 Unsymlinked: switch_root (only useful in static version)

 setkeycodes can be used to map usb keyboard special keys
 or on devices like tablet pcs with special keys

 Tested on x86 and arm targets

Change-Id: Ib0655715897f4088a81efb4ca74731b60c14ac23