Browse Source

MFHead @r350386

Sponsored by:	The FreeBSD Foundation
freebsd/current/master
asomers 1 year ago
parent
commit
90daad7031
Notes: asomers 1 year ago
svn path=/projects/fuse2/; revision=350387
100 changed files with 1819 additions and 711 deletions
  1. +2
    -2
      .cirrus.yml
  2. +1
    -1
      Makefile
  3. +1
    -0
      Makefile.libcompat
  4. +12
    -5
      ObsoleteFiles.inc
  5. +38
    -0
      RELNOTES
  6. +10
    -6
      UPDATING
  7. +1
    -2
      bin/ls/Makefile
  8. +39
    -39
      cddl/contrib/opensolaris/lib/libctf/common/ctf.5
  9. +4
    -2
      cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
  10. +1
    -1
      contrib/amd/amd/amd.h
  11. +1
    -1
      contrib/amd/amd/rpc_fwd.c
  12. +15
    -2
      contrib/bzip2/CHANGES
  13. +2
    -2
      contrib/bzip2/LICENSE
  14. +8
    -28
      contrib/bzip2/README
  15. +3
    -3
      contrib/bzip2/README.COMPILATION.PROBLEMS
  16. +5
    -5
      contrib/bzip2/blocksort.c
  17. +4
    -4
      contrib/bzip2/bzip2.1
  18. +16
    -14
      contrib/bzip2/bzip2.c
  19. +6
    -4
      contrib/bzip2/bzip2recover.c
  20. +3
    -3
      contrib/bzip2/bzlib.c
  21. +2
    -2
      contrib/bzip2/bzlib.h
  22. +3
    -3
      contrib/bzip2/bzlib_private.h
  23. +2
    -2
      contrib/bzip2/compress.c
  24. +2
    -2
      contrib/bzip2/crctable.c
  25. +4
    -4
      contrib/bzip2/decompress.c
  26. +2
    -2
      contrib/bzip2/huffman.c
  27. +2
    -2
      contrib/bzip2/randtable.c
  28. +2
    -2
      contrib/bzip2/spewG.c
  29. +2
    -2
      contrib/bzip2/unzcrash.c
  30. +1
    -1
      contrib/bzip2/words2
  31. +8
    -3
      contrib/elftoolchain/common/_elftc.h
  32. +17
    -1
      contrib/elftoolchain/common/elfdefinitions.h
  33. +3
    -1
      contrib/elftoolchain/elfcopy/sections.c
  34. +3
    -0
      contrib/elftoolchain/libelftc/elftc_bfd_find_target.3
  35. +1
    -1
      contrib/elftoolchain/libelftc/elftc_set_timestamps.c
  36. +25
    -0
      contrib/elftoolchain/libelftc/libelftc_bfdtarget.c
  37. +100
    -1
      contrib/elftoolchain/readelf/readelf.c
  38. +2
    -2
      contrib/elftoolchain/strings/strings.c
  39. +3
    -0
      contrib/file/magic/Magdir/elf
  40. +11
    -1
      contrib/ipfilter/man/ipmon.8
  41. +1
    -1
      contrib/less/LICENSE
  42. +32
    -0
      contrib/less/NEWS
  43. +4
    -2
      contrib/less/README
  44. +1
    -1
      contrib/less/brac.c
  45. +18
    -18
      contrib/less/ch.c
  46. +5
    -5
      contrib/less/charset.c
  47. +1
    -1
      contrib/less/charset.h
  48. +8
    -1
      contrib/less/cmd.h
  49. +100
    -46
      contrib/less/cmdbuf.c
  50. +93
    -35
      contrib/less/command.c
  51. +18
    -24
      contrib/less/compose.uni
  52. +1
    -1
      contrib/less/cvt.c
  53. +138
    -3
      contrib/less/decode.c
  54. +16
    -9
      contrib/less/edit.c
  55. +22
    -9
      contrib/less/filename.c
  56. +2
    -1
      contrib/less/fmt.uni
  57. +10
    -11
      contrib/less/forwback.c
  58. +14
    -2
      contrib/less/funcs.h
  59. +17
    -7
      contrib/less/help.c
  60. +27
    -6
      contrib/less/ifile.c
  61. +1
    -1
      contrib/less/input.c
  62. +4
    -4
      contrib/less/jump.c
  63. +16
    -10
      contrib/less/less.h
  64. +16
    -6
      contrib/less/less.hlp
  65. +51
    -16
      contrib/less/less.nro
  66. +3
    -3
      contrib/less/lessecho.c
  67. +1
    -1
      contrib/less/lessecho.nro
  68. +3
    -3
      contrib/less/lesskey.c
  69. +1
    -1
      contrib/less/lesskey.h
  70. +2
    -2
      contrib/less/lesskey.nro
  71. +2
    -2
      contrib/less/lglob.h
  72. +17
    -25
      contrib/less/line.c
  73. +5
    -5
      contrib/less/linenum.c
  74. +6
    -2
      contrib/less/lsystem.c
  75. +20
    -28
      contrib/less/main.c
  76. +203
    -34
      contrib/less/mark.c
  77. +1
    -1
      contrib/less/mkutable
  78. +55
    -29
      contrib/less/optfunc.c
  79. +8
    -5
      contrib/less/option.c
  80. +1
    -1
      contrib/less/option.h
  81. +44
    -4
      contrib/less/opttbl.c
  82. +3
    -3
      contrib/less/os.c
  83. +25
    -4
      contrib/less/output.c
  84. +82
    -3
      contrib/less/pattern.c
  85. +8
    -1
      contrib/less/pattern.h
  86. +1
    -1
      contrib/less/pckeys.h
  87. +19
    -7
      contrib/less/position.c
  88. +1
    -1
      contrib/less/position.h
  89. +16
    -7
      contrib/less/prompt.c
  90. +175
    -103
      contrib/less/screen.c
  91. +1
    -1
      contrib/less/scrsize.c
  92. +11
    -11
      contrib/less/search.c
  93. +11
    -6
      contrib/less/signal.c
  94. +13
    -13
      contrib/less/tags.c
  95. +53
    -15
      contrib/less/ttyin.c
  96. +1
    -1
      contrib/less/ubin.uni
  97. +29
    -2
      contrib/less/version.c
  98. +11
    -9
      contrib/less/wide.uni
  99. +2
    -1
      contrib/libarchive/libarchive/archive_read.c
  100. +2
    -0
      contrib/libarchive/libarchive/archive_read_disk_posix.c

+ 2
- 2
.cirrus.yml View File

@@ -11,9 +11,9 @@ env:
task:
timeout_in: 90m
install_script:
- pkg install -y qemu-devel
- pkg install -y qemu-devel uefi-edk2-qemu-x86_64
- fetch https://people.freebsd.org/~emaste/OVMF.fd
script:
- make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel
test_script:
- OVMF=$(pwd)/OVMF.fd sh tools/boot/ci-qemu-test.sh
- sh tools/boot/ci-qemu-test.sh

+ 1
- 1
Makefile View File

@@ -138,7 +138,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
build32 distribute32 install32 buildsoft distributesoft installsoft \
builddtb xdev xdev-build xdev-install \
xdev-links native-xtools native-xtools-install stageworld stagekernel \
stage-packages \
stage-packages stage-packages-kernel stage-packages-world \
create-packages-world create-packages-kernel create-packages \
packages installconfig real-packages sign-packages package-pkg \
print-dir test-system-compiler test-system-linker


+ 1
- 0
Makefile.libcompat View File

@@ -136,6 +136,7 @@ LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \

_LC_LIBDIRS.yes= lib
_LC_LIBDIRS.yes+= gnu/lib
_LC_LIBDIRS.yes+= usr.bin/lex/lib
_LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib
_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib
_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib


+ 12
- 5
ObsoleteFiles.inc View File

@@ -38,10 +38,17 @@
# xargs -n1 | sort | uniq -d;
# done

# 20190722: cap_random(3) removed
OLD_FILES+=lib/casper/libcap_random.so.1
OLD_FILES+=usr/include/casper/cap_random.h
OLD_FILES+=usr/share/man/man3/cap_random.3.gz
OLD_FILES+=usr/share/man/man3/cap_random_buf.3.gz
# 20190708: vm_page_hold() and _unhold() removed
OLD_FILES+=usr/share/man/man9/vm_page_hold.9.gz
# 20190618: sys/capability.h removed (sys/capsicum.h is the one to use)
OLD_FILES+=usr/include/sys/capability.h
# 20190615: sys/pwm.h renamed to dev/pwmc.h
OLD_FILES+=usr/include/sys/pwm.h
# 20190615: sys/pwm.h renamed to dev/pwmc.h and pwm(9) removed
OLD_FILES+=usr/include/sys/pwm.h usr/share/man/man9/pwm.9.gz
# 20190612: new clang import which bumps version from 8.0.0 to 8.0.1.
OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/allocator_interface.h
OLD_FILES+=usr/lib/clang/8.0.0/include/sanitizer/asan_interface.h
@@ -388,6 +395,8 @@ OLD_FILES+=usr/include/sys/seq.h
# 20190222: libifconfig made INTERNALLIB
OLD_FILES+=usr/lib/libprivateifconfig.a
OLD_FILES+=usr/lib/libprivateifconfig_p.a
OLD_FILES+=usr/lib32/libprivateifconfig.a
OLD_FILES+=usr/lib32/libprivateifconfig_p.a
# 20190131: pfil(9) changed
OLD_FILES+=usr/share/man/man9/pfil_hook_get.9.gz
OLD_FILES+=usr/share/man/man9/pfil_rlock.9.gz
@@ -823,6 +832,7 @@ OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz
OLD_FILES+=usr/bin/send-pr
# 20180725: Cleanup old libcasper.so.0
OLD_LIBS+=lib/libcasper.so.0
OLD_LIBS+=usr/lib32/libcasper.so.0
# 20180722: indent(1) option renamed, test files follow
OLD_FILES+=usr/bin/indent/tests/nsac.0
OLD_FILES+=usr/bin/indent/tests/nsac.0.pro
@@ -2369,9 +2379,6 @@ OLD_FILES+=usr/tests/usr.sbin/pw/pw_useradd
OLD_FILES+=usr/tests/usr.sbin/pw/pw_userdel
OLD_FILES+=usr/tests/usr.sbin/pw/pw_usermod
OLD_FILES+=usr/tests/usr.sbin/pw/pw_usernext
# 20170322: garbage collect old references to igb(4)
OLD_FILES+=usr/share/man/man4/if_igb.4.gz
OLD_FILES+=usr/share/man/man4/igb.4.gz
# 20170319: io_test requires zh_TW.Big5 locale.
OLD_FILES+=usr/tests/lib/libc/locale/io_test
# 20170319: remove nls for non supported Big5* locales


+ 38
- 0
RELNOTES View File

@@ -0,0 +1,38 @@
Release notes for FreeBSD 13.0.

This file describes new user-visible features, changes and updates relevant to
users of binary FreeBSD releases. Each entry should describe the change in no
more than several sentences and should reference manual pages where an
interested user can find more information. Entries should wrap after 80
columns. Each entry should begin with one or more commit IDs on one line,
specified as a comma separated list and/or range, followed by a colon and a
newline. Entries should be separated by a newline.

Changes to this file should not be MFCed.

r350307:
libcap_random(3) has been removed. Applications can use native
APIs to get random data in capability mode.

r349352:
nand(4) and related components have been removed.

r349349:
The UEFI loader now supports HTTP boot.

r349335:
bhyve(8) now implements a High Definition Audio (HDA) driver, allowing
guests to play to and record audio data from the host.

r349286:
swapon(8) can now erase a swap device immediately before enabling it,
similar to newfs(8)'s -E option. This behaviour can be specified by
adding -E to swapon(8)'s command-line parameters, or by adding the
"trimonce" option to a swap device's /etc/fstab entry.

r347908-r347923:
The following network drivers have been removed: bm(4), cs(4), de(4),
ed(4), ep(4), ex(4), fe(4), pcn(4), sf(4), sn(4), tl(4), tx(4), txp(4),
vx(4), wb(4), xe(4).

$FreeBSD$

+ 10
- 6
UPDATING View File

@@ -11,11 +11,6 @@ handbook:
Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running portupgrade.

NOTE: FreeBSD has switched from gcc to clang. If you have trouble bootstrapping
from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to
the tip of head, and then rebuild without this option. The bootstrap process
from older version of current across the gcc/clang cutover is a bit fragile.

NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
FreeBSD 13.x has many debugging features turned on, in both the kernel
and userland. These features attempt to detect incorrect use of
@@ -31,7 +26,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)

20190627:
20190727:
The vfs.fusefs.sync_unmount and vfs.fusefs.init_backgrounded sysctls
and the "-o sync_unmount" and "-o init_backgrounded" mount options have
been removed from mount_fusefs(8). You can safely remove them from
@@ -43,6 +38,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
sysctls have been removed. If you felt the need to set any of them to
a non-default value, please tell asomers@FreeBSD.org why.

20190713:
Default permissions on the /var/account/acct file (and copies of it
rotated by periodic daily scripts) are changed from 0644 to 0640
because the file contains sensitive information that should not be
world-readable. If the /var/account directory must be created by
rc.d/accounting, the mode used is now 0750. Admins who use the
accounting feature are encouraged to change the mode of an existing
/var/account directory to 0750 or 0700.

20190620:
Entropy collection and the /dev/random device are no longer optional
components. The "device random" option has been removed.


+ 1
- 2
bin/ls/Makefile View File

@@ -8,8 +8,7 @@ PROG= ls
SRCS= cmp.c ls.c print.c util.c
LIBADD= util

.if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
.if ${MK_LS_COLORS} != no
CFLAGS+= -DCOLORLS
LIBADD+= termcapw
.endif


+ 39
- 39
cddl/contrib/opensolaris/lib/libctf/common/ctf.5 View File

@@ -231,9 +231,9 @@ The
is defined as follows:
.Bd -literal
typedef struct ctf_preamble {
ushort_t ctp_magic; /* magic number (CTF_MAGIC) */
uchar_t ctp_version; /* data format version number (CTF_VERSION) */
uchar_t ctp_flags; /* flags (see below) */
uint16_t ctp_magic; /* magic number (CTF_MAGIC) */
uint8_t ctp_version; /* data format version number (CTF_VERSION) */
uint8_t ctp_flags; /* flags (see below) */
} ctf_preamble_t;
.Ed
.Pp
@@ -313,14 +313,14 @@ and the two have a combined size of 36 bytes.
.Bd -literal
typedef struct ctf_header {
ctf_preamble_t cth_preamble;
uint_t cth_parlabel; /* ref to name of parent lbl uniq'd against */
uint_t cth_parname; /* ref to basename of parent */
uint_t cth_lbloff; /* offset of label section */
uint_t cth_objtoff; /* offset of object section */
uint_t cth_funcoff; /* offset of function section */
uint_t cth_typeoff; /* offset of type section */
uint_t cth_stroff; /* offset of string section */
uint_t cth_strlen; /* length of string section in bytes */
uint32_t cth_parlabel; /* ref to name of parent lbl uniq'd against */
uint32_t cth_parname; /* ref to basename of parent */
uint32_t cth_lbloff; /* offset of label section */
uint32_t cth_objtoff; /* offset of object section */
uint32_t cth_funcoff; /* offset of function section */
uint32_t cth_typeoff; /* offset of type section */
uint32_t cth_stroff; /* offset of string section */
uint32_t cth_strlen; /* length of string section in bytes */
} ctf_header_t;
.Ed
.Pp
@@ -541,8 +541,8 @@ Each label is encoded in the file format using the following eight byte
structure:
.Bd -literal
typedef struct ctf_lblent {
uint_t ctl_label; /* ref to name of label */
uint_t ctl_typeidx; /* last type associated with this label */
uint32_t ctl_label; /* ref to name of label */
uint32_t ctl_typeidx; /* last type associated with this label */
} ctf_lblent_t;
.Ed
.Lp
@@ -728,23 +728,23 @@ The following definitions describe the short and long forms:
#define CTF_MAX_LSIZE UINT64_MAX

typedef struct ctf_stype {
uint_t ctt_name; /* reference to name in string table */
ushort_t ctt_info; /* encoded kind, variant length */
uint32_t ctt_name; /* reference to name in string table */
uint16_t ctt_info; /* encoded kind, variant length */
union {
ushort_t _size; /* size of entire type in bytes */
ushort_t _type; /* reference to another type */
uint16_t _size; /* size of entire type in bytes */
uint16_t _type; /* reference to another type */
} _u;
} ctf_stype_t;

typedef struct ctf_type {
uint_t ctt_name; /* reference to name in string table */
ushort_t ctt_info; /* encoded kind, variant length */
uint32_t ctt_name; /* reference to name in string table */
uint16_t ctt_info; /* encoded kind, variant length */
union {
ushort_t _size; /* always CTF_LSIZE_SENT */
ushort_t _type; /* do not use */
uint16_t _size; /* always CTF_LSIZE_SENT */
uint16_t _type; /* do not use */
} _u;
uint_t ctt_lsizehi; /* high 32 bits of type size in bytes */
uint_t ctt_lsizelo; /* low 32 bits of type size in bytes */
uint32_t ctt_lsizehi; /* high 32 bits of type size in bytes */
uint32_t ctt_lsizelo; /* low 32 bits of type size in bytes */
} ctf_type_t;

#define ctt_size _u._size /* for fundamental types that have a size */
@@ -754,7 +754,7 @@ typedef struct ctf_type {
Type sizes are stored in
.Sy bytes .
The basic small form uses a
.Sy ushort_t
.Sy uint16_t
to store the number of bytes.
If the number of bytes in a structure would exceed 0xfffe, then the alternate
form, the
@@ -806,8 +806,8 @@ various kinds.
Integers, which are of type
.Sy CTF_K_INTEGER ,
have no variable length arguments.
Instead, they are followed by a four byte
.Sy uint_t
Instead, they are followed by a
.Sy uint32_t
which describes their encoding.
All integers must be encoded with a variable length of zero.
The
@@ -937,9 +937,9 @@ member is set to zero.
The structure that follows an array is defined as:
.Bd -literal
typedef struct ctf_array {
ushort_t cta_contents; /* reference to type of array contents */
ushort_t cta_index; /* reference to type of array index */
uint_t cta_nelems; /* number of elements */
uint16_t cta_contents; /* reference to type of array contents */
uint16_t cta_index; /* reference to type of array index */
uint32_t cta_nelems; /* number of elements */
} ctf_array_t;
.Ed
.Lp
@@ -1005,17 +1005,17 @@ all members are encoded using the same structure.
The structure for members is as follows:
.Bd -literal
typedef struct ctf_member {
uint_t ctm_name; /* reference to name in string table */
ushort_t ctm_type; /* reference to type of member */
ushort_t ctm_offset; /* offset of this member in bits */
uint32_t ctm_name; /* reference to name in string table */
uint16_t ctm_type; /* reference to type of member */
uint16_t ctm_offset; /* offset of this member in bits */
} ctf_member_t;

typedef struct ctf_lmember {
uint_t ctlm_name; /* reference to name in string table */
ushort_t ctlm_type; /* reference to type of member */
ushort_t ctlm_pad; /* padding */
uint_t ctlm_offsethi; /* high 32 bits of member offset in bits */
uint_t ctlm_offsetlo; /* low 32 bits of member offset in bits */
uint32_t ctlm_name; /* reference to name in string table */
uint16_t ctlm_type; /* reference to type of member */
uint16_t ctlm_pad; /* padding */
uint32_t ctlm_offsethi; /* high 32 bits of member offset in bits */
uint32_t ctlm_offsetlo; /* low 32 bits of member offset in bits */
} ctf_lmember_t;
.Ed
.Lp
@@ -1088,8 +1088,8 @@ The enumerators encoded in an enumeration have the following structure in the
variable list:
.Bd -literal
typedef struct ctf_enum {
uint_t cte_name; /* reference to name in string table */
int cte_value; /* value associated with this name */
uint32_t cte_name; /* reference to name in string table */
int32_t cte_value; /* value associated with this name */
} ctf_enum_t;
.Ed
.Pp


+ 4
- 2
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c View File

@@ -1281,12 +1281,14 @@ mountpoint_cmp(const void *arga, const void *argb)
}

/*
* Reutrn true if path2 is a child of path1
* Return true if path2 is a child of path1 or path2 equals path1 or
* path1 is "/" (path2 is always a child of "/").
*/
static boolean_t
libzfs_path_contains(const char *path1, const char *path2)
{
return (strstr(path2, path1) == path2 && path2[strlen(path1)] == '/');
return (strcmp(path1, path2) == 0 || strcmp(path1, "/") == 0 ||
(strstr(path2, path1) == path2 && path2[strlen(path1)] == '/'));
}




+ 1
- 1
contrib/amd/amd/amd.h View File

@@ -625,7 +625,7 @@ extern void map_flush_srvr(fserver *);
extern void mapc_add_kv(mnt_map *, char *, char *);
extern mnt_map *mapc_find(char *, char *, const char *, const char *);
extern void mapc_free(opaque_t);
extern int mapc_keyiter(mnt_map *, key_fun, opaque_t);
extern int mapc_keyiter(mnt_map *, key_fun *, opaque_t);
extern void mapc_reload(void);
extern int mapc_search(mnt_map *, char *, char **);
extern void mapc_showtypes(char *buf, size_t l);


+ 1
- 1
contrib/amd/amd/rpc_fwd.c View File

@@ -221,7 +221,7 @@ fwd_locate(u_int id)
* different address.
*/
int
fwd_packet(int type_id, char *pkt, int len, struct sockaddr_in *fwdto, struct sockaddr_in *replyto, opaque_t cb_arg, fwd_fun cb)
fwd_packet(int type_id, char *pkt, int len, struct sockaddr_in *fwdto, struct sockaddr_in *replyto, opaque_t cb_arg, fwd_fun *cb)
{
rpc_forward *p;
u_int *pkt_int;


+ 15
- 2
contrib/bzip2/CHANGES View File

@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -325,3 +325,16 @@ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2.
Izdebski.

* Make the documentation build on Ubuntu 10.04

1.0.7 (27 Jun 19)
~~~~~~~~~~~~~~~~~

* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH

* bzip2: Fix return value when combining --test,-t and -q.

* bzip2recover: Fix buffer overflow for large argv[0]

* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189)

* Make sure nSelectors is not out of range (CVE-2019-12900)

+ 2
- 2
contrib/bzip2/LICENSE View File

@@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Julian Seward, jseward@bzip.org
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Julian Seward, jseward@acm.org
bzip2/libbzip2 version 1.0.7 of 27 June 2019

--------------------------------------------------------------------------

+ 8
- 28
contrib/bzip2/README View File

@@ -6,8 +6,8 @@ This version is fully compatible with the previous public releases.
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in this file.

@@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.

It's difficult for me to support compilation on all these platforms.
My approach is to collect binaries for these platforms, and put them
on the master web site (http://www.bzip.org). Look there. However
on the master web site (https://sourceware.org/bzip2/). Look there. However
(FWIW), bzip2-1.0.X is very standard ANSI C and should compile
unmodified with MS Visual C. If you have difficulties building, you
might want to read README.COMPILATION.PROBLEMS.
@@ -161,43 +161,22 @@ WHAT'S NEW IN 0.9.5 ?
* Many small improvements in file and flag handling.
* A Y2K statement.

WHAT'S NEW IN 1.0.0 ?
WHAT'S NEW IN 1.0.x ?

See the CHANGES file.

WHAT'S NEW IN 1.0.2 ?

See the CHANGES file.

WHAT'S NEW IN 1.0.3 ?

See the CHANGES file.

WHAT'S NEW IN 1.0.4 ?

See the CHANGES file.

WHAT'S NEW IN 1.0.5 ?

See the CHANGES file.

WHAT'S NEW IN 1.0.6 ?

See the CHANGES file.


I hope you find bzip2 useful. Feel free to contact me at
jseward@bzip.org
jseward@acm.org
if you have any suggestions or queries. Many people mailed me with
comments, suggestions and patches after the releases of bzip-0.15,
bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this
feedback. I thank you for your comments.

bzip2's "home" is http://www.bzip.org/
bzip2's "home" is https://sourceware.org/bzip2/

Julian Seward
jseward@bzip.org
jseward@acm.org
Cambridge, UK.

18 July 1996 (version 0.15)
@@ -213,3 +192,4 @@ Cambridge, UK.
20 December 2006 (bzip2, version 1.0.4)
10 December 2007 (bzip2, version 1.0.5)
6 Sept 2010 (bzip2, version 1.0.6)
27 June 2019 (bzip2, version 1.0.7)

+ 3
- 3
contrib/bzip2/README.COMPILATION.PROBLEMS View File

@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -12,7 +12,7 @@ This program is released under the terms of the license contained
in the file LICENSE.
------------------------------------------------------------------

bzip2-1.0.6 should compile without problems on the vast majority of
bzip2 should compile without problems on the vast majority of
platforms. Using the supplied Makefile, I've built and tested it
myself for x86-linux and amd64-linux. With makefile.msc, Visual C++
6.0 and nmake, you can build a native Win32 version too. Large file


+ 5
- 5
contrib/bzip2/blocksort.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap,
bhtab [ 0 .. 2+(nblock/32) ] destroyed
*/

#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31))
#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31))
#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31)))
#define WORD_BH(zz) bhtab[(zz) >> 5]
#define UNALIGNED_BH(zz) ((zz) & 0x01f)



+ 4
- 4
contrib/bzip2/bzip2.1 View File

@@ -1,6 +1,6 @@
.TH bzip2 1
.SH NAME
bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6
bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7
.br
bzcat \- decompresses files to stdout
.br
@@ -404,7 +404,7 @@ I/O error messages are not as helpful as they could be.
tries hard to detect I/O errors and exit cleanly, but the details of
what the problem is sometimes seem rather misleading.

This manual page pertains to version 1.0.6 of
This manual page pertains to version 1.0.7 of
.I bzip2.
Compressed data created by this version is entirely forwards and
backwards compatible with the previous public releases, versions
@@ -426,9 +426,9 @@ with MaybeUInt64 set to be an unsigned 64-bit integer.


.SH AUTHOR
Julian Seward, jsewardbzip.org.
Julian Seward, jseward@acm.org.

http://www.bzip.org
https://sourceware.org/bzip2/

The ideas embodied in
.I bzip2


+ 16
- 14
contrib/bzip2/bzip2.c View File

@@ -7,8 +7,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -554,7 +554,7 @@ static
Bool testStream ( FILE *zStream )
{
BZFILE* bzf = NULL;
Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i;
Int32 bzerr, bzerr_dummy, ret, streamNo, i;
UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
@@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream )
streamNo++;

while (bzerr == BZ_OK) {
nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler;
}
if (bzerr != BZ_STREAM_END) goto errhandler;
@@ -749,7 +749,7 @@ void panic ( const Char* s )
"\n%s: PANIC -- internal consistency error:\n"
"\t%s\n"
"\tThis is a BUG. Please report it to me at:\n"
"\tjseward@bzip.org\n",
"\tjseward@acm.org\n",
progName, s );
showFileNames();
cleanUpAndFail( 3 );
@@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" The user's manual, Section 4.3, has more info on (1) and (2).\n"
" \n"
" If you suspect this is a bug in bzip2, or are unsure about (1)\n"
" or (2), feel free to report it to me at: jseward@bzip.org.\n"
" or (2), feel free to report it to me at: jseward@acm.org.\n"
" Section 4.3 of the user's manual describes the info a useful\n"
" bug report should have. If the manual is available on your\n"
" system, please try and read it before mailing me. If you don't\n"
@@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" The user's manual, Section 4.3, has more info on (2) and (3).\n"
" \n"
" If you suspect this is a bug in bzip2, or are unsure about (2)\n"
" or (3), feel free to report it to me at: jseward@bzip.org.\n"
" or (3), feel free to report it to me at: jseward@acm.org.\n"
" Section 4.3 of the user's manual describes the info a useful\n"
" bug report should have. If the manual is available on your\n"
" system, please try and read it before mailing me. If you don't\n"
@@ -1609,7 +1609,7 @@ void license ( void )
" \n"
" This program is free software; you can redistribute it and/or modify\n"
" it under the terms set out in the LICENSE file, which is included\n"
" in the bzip2-1.0.6 source distribution.\n"
" in the bzip2 source distribution.\n"
" \n"
" This program is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -2005,12 +2005,14 @@ IntNative main ( IntNative argc, Char *argv[] )
testf ( aa->name );
}
}
if (testFailsExist && noisy) {
fprintf ( stderr,
"\n"
"You can use the `bzip2recover' program to attempt to recover\n"
"data from undamaged sections of corrupted files.\n\n"
);
if (testFailsExist) {
if (noisy) {
fprintf ( stderr,
"\n"
"You can use the `bzip2recover' program to attempt to recover\n"
"data from undamaged sections of corrupted files.\n\n"
);
}
setExit(2);
exit(exitValue);
}


+ 6
- 4
contrib/bzip2/bzip2recover.c View File

@@ -7,8 +7,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -309,11 +309,12 @@ Int32 main ( Int32 argc, Char** argv )
UInt32 buffHi, buffLo, blockCRC;
Char* p;

strcpy ( progName, argv[0] );
strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
progName[BZ_MAX_FILENAME-1]='\0';
inFileName[0] = outFileName[0] = 0;

fprintf ( stderr,
"bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" );
"bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" );

if (argc != 2) {
fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
@@ -457,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv )
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
bsPutUInt32 ( bsWr, blockCRC );
bsClose ( bsWr );
outFile = NULL;
}
if (wrBlock >= rbCtr) break;
wrBlock++;


+ 3
- 3
contrib/bzip2/bzlib.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -47,7 +47,7 @@ void BZ2_bz__AssertH__fail ( int errcode )
fprintf(stderr,
"\n\nbzip2/libbzip2: internal error number %d.\n"
"This is a bug in bzip2/libbzip2, %s.\n"
"Please report it to me at: jseward@bzip.org. If this happened\n"
"Please report it to me at: jseward@acm.org. If this happened\n"
"when you were using some program which uses libbzip2 as a\n"
"component, you should also report this bug to the author(s)\n"
"of that program. Please make an effort to report this bug;\n"


+ 2
- 2
contrib/bzip2/bzlib.h View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 3
- 3
contrib/bzip2/bzlib_private.h View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -36,7 +36,7 @@

/*-- General stuff. --*/

#define BZ_VERSION "1.0.6, 6-Sept-2010"
#define BZ_VERSION "1.0.7, 27-Jun-2019"

typedef char Char;
typedef unsigned char Bool;


+ 2
- 2
contrib/bzip2/compress.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 2
- 2
contrib/bzip2/crctable.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 4
- 4
contrib/bzip2/decompress.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -285,9 +285,9 @@ Int32 BZ2_decompress ( DState* s )

/*--- Now the selectors ---*/
GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR);
GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
for (i = 0; i < nSelectors; i++) {
j = 0;
while (True) {


+ 2
- 2
contrib/bzip2/huffman.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 2
- 2
contrib/bzip2/randtable.c View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 2
- 2
contrib/bzip2/spewG.c View File

@@ -13,8 +13,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 2
- 2
contrib/bzip2/unzcrash.c View File

@@ -17,8 +17,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.

bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>

Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.


+ 1
- 1
contrib/bzip2/words2 View File

@@ -1,5 +1,5 @@

Checking test results. If any of the four "cmp"s which follow
report any differences, something is wrong. If you can't easily
figure out what, please let me know (jseward@bzip.org).
figure out what, please let me know (jseward@acm.org).


+ 8
- 3
contrib/elftoolchain/common/_elftc.h View File

@@ -374,11 +374,14 @@ extern const char *__progname;

#include <libkern/OSByteOrder.h>
#define htobe32(x) OSSwapHostToBigInt32(x)
#define htole32(x) OSSwapHostToLittleInt32(x)
#ifndef roundup2
#define roundup2 roundup
#endif

#define ELFTC_BYTE_ORDER _BYTE_ORDER
#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN
#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN
#define ELFTC_BYTE_ORDER __DARWIN_BYTE_ORDER
#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
#define ELFTC_BYTE_ORDER_BIG_ENDIAN __DARWIN_BIG_ENDIAN

#define ELFTC_HAVE_MMAP 1
#define ELFTC_HAVE_STRMODE 1
@@ -418,7 +421,9 @@ extern const char *__progname;
/* Whether we need to supply {be,le}32dec. */
#define ELFTC_NEED_BYTEORDER_EXTENSIONS 1

#ifndef roundup2
#define roundup2 roundup
#endif

#endif /* __GLIBC__ || __linux__ */



+ 17
- 1
contrib/elftoolchain/common/elfdefinitions.h View File

@@ -33,7 +33,7 @@
* See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
* - The May 1998 (version 1.5) draft of "The ELF-64 object format".
* - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
* ia64, and powerpc processors.
* ia64, powerpc, and RISC-V processors.
* - The "Linkers and Libraries Guide", from Sun Microsystems.
*/

@@ -426,6 +426,22 @@ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE, 0x00010000UL, \
"-mrelocatable flag") \
_ELF_DEFINE_EF(EF_PPC_RELOCATABLE_LIB, 0x00008000UL, \
"-mrelocatable-lib flag") \
_ELF_DEFINE_EF(EF_RISCV_RVC, 0x00000001UL, \
"Compressed instruction extension") \
_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_MASK, 0x00000006UL, \
"Floating point ABI") \
_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SOFT, 0x00000000UL, \
"Software emulated floating point") \
_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SINGLE, 0x00000002UL, \
"Single precision floating point") \
_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_DOUBLE, 0x00000004UL, \
"Double precision floating point") \
_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_QUAD, 0x00000006UL, \
"Quad precision floating point") \
_ELF_DEFINE_EF(EF_RISCV_RVE, 0x00000008UL, \
"RV32E embedded ABI") \
_ELF_DEFINE_EF(EF_RISCV_TSO, 0x00000010UL, \
"RVTSO memory consistency model") \
_ELF_DEFINE_EF(EF_SPARC_EXT_MASK, 0x00ffff00UL, \
"Vendor Extension mask") \
_ELF_DEFINE_EF(EF_SPARC_32PLUS, 0x00000100UL, \


+ 3
- 1
contrib/elftoolchain/elfcopy/sections.c View File

@@ -1403,7 +1403,7 @@ init_shstrtab(struct elfcopy *ecp)
struct section *s;
size_t indx, sizehint;

if (elf_getshstrndx(ecp->ein, &indx) != 0) {
if (elf_getshdrstrndx(ecp->ein, &indx) == 0) {
shstrtab = elf_getscn(ecp->ein, indx);
if (shstrtab == NULL)
errx(EXIT_FAILURE, "elf_getscn failed: %s",
@@ -1413,6 +1413,8 @@ init_shstrtab(struct elfcopy *ecp)
elf_errmsg(-1));
sizehint = shdr.sh_size;
} else {
/* Clear the error from elf_getshdrstrndx(3). */
(void)elf_errno();
sizehint = 0;
}



+ 3
- 0
contrib/elftoolchain/libelftc/elftc_bfd_find_target.3 View File

@@ -76,6 +76,9 @@ Known descriptor names and their properties include:
.It Li elf32-powerpc Ta ELF Ta MSB Ta 32
.It Li elf32-powerpc-freebsd Ta ELF Ta MSB Ta 32
.It Li elf32-powerpcle Ta ELF Ta LSB Ta 32
.It Li elf32-riscv Ta ELF Ta LSB Ta 32
.It Li elf64-riscv Ta ELF Ta LSB Ta 64
.It Li elf64-riscv-freebsd Ta ELF Ta LSB Ta 64
.It Li elf32-sh Ta ELF Ta MSB Ta 32
.It Li elf32-shl Ta ELF Ta LSB Ta 32
.It Li elf32-sh-nbsd Ta ELF Ta MSB Ta 32


+ 1
- 1
contrib/elftoolchain/libelftc/elftc_set_timestamps.c View File

@@ -37,7 +37,7 @@ ELFTC_VCSID("$Id$");
* stat'.
*/

#if defined(__FreeBSD__) || defined(__NetBSD__)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
#define ATIME st_atimespec
#define MTIME st_mtimespec
#define LIBELFTC_HAVE_UTIMES 1


+ 25
- 0
contrib/elftoolchain/libelftc/libelftc_bfdtarget.c View File

@@ -315,6 +315,31 @@ struct _Elftc_Bfd_Target _libelftc_targets[] = {
.bt_machine = EM_PPC64,
},

{
.bt_name = "elf32-riscv",
.bt_type = ETF_ELF,
.bt_byteorder = ELFDATA2LSB,
.bt_elfclass = ELFCLASS32,
.bt_machine = EM_RISCV,
},

{
.bt_name = "elf64-riscv",
.bt_type = ETF_ELF,
.bt_byteorder = ELFDATA2LSB,
.bt_elfclass = ELFCLASS64,
.bt_machine = EM_RISCV,
},

{
.bt_name = "elf64-riscv-freebsd",
.bt_type = ETF_ELF,
.bt_byteorder = ELFDATA2MSB,
.bt_elfclass = ELFCLASS64,
.bt_machine = EM_RISCV,
.bt_osabi = ELFOSABI_FREEBSD,
},

{
.bt_name = "elf64-sh64",
.bt_type = ETF_ELF,


+ 100
- 1
contrib/elftoolchain/readelf/readelf.c View File

@@ -431,6 +431,13 @@ static struct eflags_desc powerpc_eflags_desc[] = {
{0, NULL}
};

static struct eflags_desc riscv_eflags_desc[] = {
{EF_RISCV_RVC, "RVC"},
{EF_RISCV_RVE, "RVE"},
{EF_RISCV_TSO, "TSO"},
{0, NULL}
};

static struct eflags_desc sparc_eflags_desc[] = {
{EF_SPARC_32PLUS, "v8+"},
{EF_SPARC_SUN_US1, "ultrasparcI"},
@@ -2073,6 +2080,74 @@ dwarf_reg(unsigned int mach, unsigned int reg)
case 49: return "ldtr";
default: return (NULL);
}
case EM_RISCV:
switch (reg) {
case 0: return "zero";
case 1: return "ra";
case 2: return "sp";
case 3: return "gp";
case 4: return "tp";
case 5: return "t0";
case 6: return "t1";
case 7: return "t2";
case 8: return "s0";
case 9: return "s1";
case 10: return "a0";
case 11: return "a1";
case 12: return "a2";
case 13: return "a3";
case 14: return "a4";
case 15: return "a5";
case 16: return "a6";
case 17: return "a7";
case 18: return "s2";
case 19: return "s3";
case 20: return "s4";
case 21: return "s5";
case 22: return "s6";
case 23: return "s7";
case 24: return "s8";
case 25: return "s9";
case 26: return "s10";
case 27: return "s11";
case 28: return "t3";
case 29: return "t4";
case 30: return "t5";
case 31: return "t6";
case 32: return "ft0";
case 33: return "ft1";
case 34: return "ft2";
case 35: return "ft3";
case 36: return "ft4";
case 37: return "ft5";
case 38: return "ft6";
case 39: return "ft7";
case 40: return "fs0";
case 41: return "fs1";
case 42: return "fa0";
case 43: return "fa1";
case 44: return "fa2";
case 45: return "fa3";
case 46: return "fa4";
case 47: return "fa5";
case 48: return "fa6";
case 49: return "fa7";
case 50: return "fs2";
case 51: return "fs3";
case 52: return "fs4";
case 53: return "fs5";
case 54: return "fs6";
case 55: return "fs7";
case 56: return "fs8";
case 57: return "fs9";
case 58: return "fs10";
case 59: return "fs11";
case 60: return "ft8";
case 61: return "ft9";
case 62: return "ft10";
case 63: return "ft11";
default: return (NULL);
}
case EM_X86_64:
switch (reg) {
case 0: return "rax";
@@ -2290,10 +2365,34 @@ dump_eflags(struct readelf *re, uint64_t e_flags)
}
edesc = mips_eflags_desc;
break;
case EM_PPC:
case EM_PPC64:
switch (e_flags) {
case 0: printf(", Unspecified or Power ELF V1 ABI"); break;
case 1: printf(", Power ELF V1 ABI"); break;
case 2: printf(", OpenPOWER ELF V2 ABI"); break;
default: break;
}
/* explicit fall through*/
case EM_PPC:
edesc = powerpc_eflags_desc;
break;
case EM_RISCV:
switch (e_flags & EF_RISCV_FLOAT_ABI_MASK) {
case EF_RISCV_FLOAT_ABI_SOFT:
printf(", soft-float ABI");
break;
case EF_RISCV_FLOAT_ABI_SINGLE:
printf(", single-float ABI");
break;
case EF_RISCV_FLOAT_ABI_DOUBLE:
printf(", double-float ABI");
break;
case EF_RISCV_FLOAT_ABI_QUAD:
printf(", quad-float ABI");
break;
}
edesc = riscv_eflags_desc;
break;
case EM_SPARC:
case EM_SPARC32PLUS:
case EM_SPARCV9:


+ 2
- 2
contrib/elftoolchain/strings/strings.c View File

@@ -194,13 +194,13 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;

cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL);
cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL, CAP_MMAP_R);
fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN);
if (fa == NULL)
err(1, "Unable to initialize casper fileargs");

caph_cache_catpages();
if (caph_limit_stdio() < 0 && caph_enter_casper() < 0) {
if (caph_limit_stdio() < 0 || caph_enter_casper() < 0) {
fileargs_free(fa);
err(1, "Unable to enter capability mode");
}


+ 3
- 0
contrib/file/magic/Magdir/elf View File

@@ -108,6 +108,9 @@
>18 leshort 19 Intel 80960,
>18 leshort 20 PowerPC or cisco 4500,
>18 leshort 21 64-bit PowerPC or cisco 7500,
>>48 lelong 0 Unspecified or Power ELF V1 ABI,
>>48 lelong 1 Power ELF V1 ABI,
>>48 lelong 2 OpenPOWER ELF V2 ABI,
>18 leshort 22 IBM S/390,
>18 leshort 23 Cell SPU,
>18 leshort 24 cisco SVIP,


+ 11
- 1
contrib/ipfilter/man/ipmon.8 View File

@@ -7,6 +7,10 @@ ipmon \- monitors /dev/ipl for logged packets
[
.B \-abBDFhnpstvxX
] [
.B "\-B <binarylogfile>"
] [
.B "\-C <configfile>"
] [
.B "\-N <device>"
] [
.B "\-L <facility>"
@@ -92,6 +96,10 @@ Enable logging of the raw, unformatted binary data to the specified
\fI<binarylogfilename>\fP file. This can be read, later, using \fBipmon\fP
with the \fB-f\fP option.
.TP
.B \-C <configfilename>
This option specifies a file to be used to specify optional extra actions
when it sees specific log entries from the kernel.
.TP
.B \-D
Cause ipmon to turn itself into a daemon. Using subshells or backgrounding
of ipmon is not required to turn it into an orphan so it can run indefinitely.
@@ -178,9 +186,11 @@ recorded data.
.br
/dev/ipstate
.br
/etc/ipmon.conf
.br
/etc/services
.SH SEE ALSO
ipl(4), ipf(8), ipfstat(8), ipnat(8)
ipl(4), ipmon(5), ipf(8), ipfstat(8), ipnat(8)
.SH BUGS
.PP
If you find any, please send email to me at darrenr@pobox.com

+ 1
- 1
contrib/less/LICENSE View File

@@ -2,7 +2,7 @@
------------

Less
Copyright (C) 1984-2016 Mark Nudelman
Copyright (C) 1984-2018 Mark Nudelman

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions


+ 32
- 0
contrib/less/NEWS View File

@@ -9,6 +9,38 @@

To report bugs, suggestions or comments, send email to bug-less@gnu.org

======================================================================

Major changes between "less" versions 530 and 551

* Add --mouse option.

* Add --wheel-lines option.

* Add --no-histdups option.

* Add --save-marks option.

* Support PCRE2 regular expression library.

* Redraw screen on SIGWINCH even if screen size doesn't change.

* Shell-escape filenames in history so they can be used again.

* Ring bell if user enters invalid long option name.

* Use PCRE_UTF8 flag for pcre regular expressions when in UTF-8 mode.

* Windows: use wide-char string to set console title.

* Don't count lines in initial screen if using -X with -F.

* Support mingw build system.

* Fix bug in v command on empty file.

* Fix bug in v command when filename contains shell metacharacters.

======================================================================

Major changes between "less" versions 487 and 530


+ 4
- 2
contrib/less/README View File

@@ -7,9 +7,9 @@
**************************************************************************
**************************************************************************

Less, version 530
Less, version 551

This is the distribution of less, version 530, released 05 Dec 2017.
This is the distribution of less, version 551, released 11 Jun 2019.
This program is part of the GNU project (http://www.gnu.org).

This program is free software. You may redistribute it and/or
@@ -56,6 +56,7 @@ INSTALLATION (Unix systems only):
finds a regular expression library automatically. Other values are:
gnu Use the GNU regex library.
pcre Use the PCRE library.
pcre2 Use the PCRE2 library.
posix Use the POSIX-compatible regcomp.
regcmp Use the regcmp library.
re_comp Use the re_comp library.
@@ -63,6 +64,7 @@ INSTALLATION (Unix systems only):
regcomp-local Use Henry Spencer's V8-compatible regcomp
(source is supplied with less).
none No regular expressions, only simple string matching.

--with-secure
Builds a "secure" version of less, with some features disabled
to prevent users from viewing other files, accessing shell


+ 1
- 1
contrib/less/brac.c View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2017 Mark Nudelman
* Copyright (C) 1984-2019 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.


+ 18
- 18
contrib/less/ch.c View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2017 Mark Nudelman
* Copyright (C) 1984-2019 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -144,7 +144,7 @@ static int ch_addbuf();
* Get the character pointed to by the read pointer.
*/
int
ch_get()
ch_get(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
@@ -392,7 +392,7 @@ ch_ungetchar(c)
* If we haven't read all of standard input into it, do that now.
*/
public void
end_logfile()
end_logfile(VOID_PARAM)
{
static int tried = FALSE;

@@ -417,7 +417,7 @@ end_logfile()
* Write all the existing buffered data to the log file.
*/
public void
sync_logfile()
sync_logfile(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
@@ -515,7 +515,7 @@ ch_seek(pos)
* Seek to the end of the file.
*/
public int
ch_end_seek()
ch_end_seek(VOID_PARAM)
{
POSITION len;

@@ -542,7 +542,7 @@ ch_end_seek()
* Seek to the last position in the file that is currently buffered.
*/
public int
ch_end_buffer_seek()
ch_end_buffer_seek(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
@@ -570,7 +570,7 @@ ch_end_buffer_seek()
* beginning of the pipe is no longer buffered.
*/
public int
ch_beg_seek()
ch_beg_seek(VOID_PARAM)
{
struct bufnode *bn;
struct bufnode *firstbn;
@@ -602,7 +602,7 @@ ch_beg_seek()
* Return the length of the file, if known.
*/
public POSITION
ch_length()
ch_length(VOID_PARAM)
{
if (thisfile == NULL)
return (NULL_POSITION);
@@ -619,7 +619,7 @@ ch_length()
* Return the current position in the file.
*/
public POSITION
ch_tell()
ch_tell(VOID_PARAM)
{
if (thisfile == NULL)
return (NULL_POSITION);
@@ -630,7 +630,7 @@ ch_tell()
* Get the current char and post-increment the read pointer.
*/
public int
ch_forw_get()
ch_forw_get(VOID_PARAM)
{
int c;

@@ -653,7 +653,7 @@ ch_forw_get()
* Pre-decrement the read pointer and get the new current char.
*/
public int
ch_back_get()
ch_back_get(VOID_PARAM)
{
if (thisfile == NULL)
return (EOI);
@@ -693,7 +693,7 @@ ch_setbufspace(bufspace)
* Flush (discard) any saved file state, including buffer contents.
*/
public void
ch_flush()
ch_flush(VOID_PARAM)
{
struct bufnode *bn;

@@ -760,7 +760,7 @@ ch_flush()
* The buffer is added to the tail of the buffer chain.
*/
static int
ch_addbuf()
ch_addbuf(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
@@ -785,7 +785,7 @@ ch_addbuf()
*
*/
static void
init_hashtbl()
init_hashtbl(VOID_PARAM)
{
int h;

@@ -800,7 +800,7 @@ init_hashtbl()
* Delete all buffers for this file.
*/
static void
ch_delbufs()
ch_delbufs(VOID_PARAM)
{
struct bufnode *bn;

@@ -840,7 +840,7 @@ seekable(f)
* This is used after an ignore_eof read, during which the EOF may change.
*/
public void
ch_set_eof()
ch_set_eof(VOID_PARAM)
{
ch_fsize = ch_fpos;
}
@@ -890,7 +890,7 @@ ch_init(f, flags)
* Close a filestate.
*/
public void
ch_close()
ch_close(VOID_PARAM)
{
int keepstate = FALSE;

@@ -933,7 +933,7 @@ ch_close()
* Return ch_flags for the current file.
*/
public int
ch_getflags()
ch_getflags(VOID_PARAM)
{
if (thisfile == NULL)
return (0);


+ 5
- 5
contrib/less/charset.c View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2017 Mark Nudelman
* Copyright (C) 1984-2019 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -245,7 +245,7 @@ icharset(name, no_error)
* Define a charset, given a locale name.
*/
static void
ilocale()
ilocale(VOID_PARAM)
{
int c;

@@ -315,7 +315,7 @@ setfmt(s, fmtvarptr, attrptr, default_fmt)
*
*/
static void
set_charset()
set_charset(VOID_PARAM)
{
char *s;

@@ -338,7 +338,7 @@ set_charset()
* LESSCHARSET is not defined: try LESSCHARDEF.
*/
s = lgetenv("LESSCHARDEF");
if (s != NULL && *s != '\0')
if (!isnullenv(s))
{
ichardef(s);
return;
@@ -395,7 +395,7 @@ set_charset()
* Initialize charset data structures.
*/
public void
init_charset()
init_charset(VOID_PARAM)
{
char *s;



+ 1
- 1
contrib/less/charset.h View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2017 Mark Nudelman
* Copyright (C) 1984-2019 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.


+ 8
- 1
contrib/less/cmd.h View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2017 Mark Nudelman
* Copyright (C) 1984-2019 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -71,6 +71,13 @@
#define A_RRSHIFT 59
#define A_CLRMARK 62
#define A_SETMARKBOT 63
#define A_X11MOUSE_IN 64
#define A_X11MOUSE_IGNORE 65
#define A_F_MOUSE 66
#define A_B_MOUSE 67
/* Note "X116" refers to extended (1006) X11 mouse reporting. */
#define A_X116MOUSE_IN 68
#define A_X116MOUSE_IGNORE 69

#define A_INVALID 100
#define A_NOACTION 101


+ 100
- 46
contrib/less/cmdbuf.c View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1984-2017 Mark Nudelman
* Copyright (C) 1984-2019 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -22,6 +22,8 @@

extern int sc_width;
extern int utf_mode;
extern int no_hist_dups;
extern int marks_modified;

static char cmdbuf[CMDBUF_SIZE]; /* Buffer for holding a multi-char command */
static int cmd_col; /* Current column of the cursor */
@@ -58,6 +60,7 @@ public char closequote = '"';
#define HISTFILE_FIRST_LINE ".less-history-file:"
#define HISTFILE_SEARCH_SECTION ".search"
#define HISTFILE_SHELL_SECTION ".shell"
#define HISTFILE_MARK_SECTION ".mark"

/*
* A mlist structure represents a command history.
@@ -114,7 +117,7 @@ static int cmd_mbc_buf_index;
* Reset command buffer (to empty).
*/
public void
cmd_reset()
cmd_reset(VOID_PARAM)
{
cp = cmdbuf;
*cp = '\0';
@@ -129,7 +132,7 @@ cmd_reset()
* Clear command line.
*/
public void
clear_cmd()
clear_cmd(VOID_PARAM)
{
cmd_col = prompt_col = 0;
cmd_mbc_buf_len = 0;
@@ -169,7 +172,7 @@ cmd_putstr(s)
* How many characters are in the command buffer?
*/
public int
len_cmdbuf()
len_cmdbuf(VOID_PARAM)
{
char *s = cmdbuf;
char *endline = s + strlen(s);
@@ -302,7 +305,7 @@ cmd_repaint(old_cp)
* and set cp to the corresponding char in cmdbuf.
*/
static void
cmd_home()
cmd_home(VOID_PARAM)
{
while (cmd_col > prompt_col)
{
@@ -321,7 +324,7 @@ cmd_home()
* Shift the cmdbuf display left a half-screen.
*/
static void
cmd_lshift()
cmd_lshift(VOID_PARAM)
{
char *s;
char *save_cp;
@@ -359,7 +362,7 @@ cmd_lshift()
* Shift the cmdbuf display right a half-screen.
*/
static void
cmd_rshift()
cmd_rshift(VOID_PARAM)
{
char *s;
char *save_cp;
@@ -389,7 +392,7 @@ cmd_rshift()
* Move cursor right one character.
*/
static int
cmd_right()
cmd_right(VOID_PARAM)
{
char *pr;
char *ncp;
@@ -424,7 +427,7 @@ cmd_right()
* Move cursor left one character.
*/
static int
cmd_left()
cmd_left(VOID_PARAM)
{
char *ncp;
int width = 0;
@@ -492,7 +495,7 @@ cmd_ichar(cs, clen)
* Delete the char to the left of the cursor.
*/
static int
cmd_erase()
cmd_erase(VOID_PARAM)
{
char *s;
int clen;
@@ -541,7 +544,7 @@ cmd_erase()
* Delete the char under the cursor.
*/
static int
cmd_delete()
cmd_delete(VOID_PARAM)
{
if (*cp == '\0')
{
@@ -560,7 +563,7 @@ cmd_delete()
* Delete the "word" to the left of the cursor.
*/
static int
cmd_werase()
cmd_werase(VOID_PARAM)
{
if (cp > cmdbuf && cp[-1] == ' ')
{
@@ -586,7 +589,7 @@ cmd_werase()
* Delete the "word" under the cursor.
*/
static int
cmd_wdelete()
cmd_wdelete(VOID_PARAM)
{
if (*cp == ' ')
{
@@ -612,7 +615,7 @@ cmd_wdelete()
* Delete all chars in the command buffer.
*/
static int
cmd_kill()
cmd_kill(VOID_PARAM)
{
if (cmdbuf[0] == '\0')
{
@@ -702,6 +705,7 @@ cmd_updown(action)
s = ml->string;
if (s == NULL)
s = "";
cmd_offset = 0;
cmd_home();
clear_eol();
strcpy(cmdbuf, s);
@@ -718,6 +722,31 @@ cmd_updown(action)
}
#endif

/*
*
*/
static void
ml_link(mlist, ml)
struct mlist *mlist;
struct mlist *ml;
{
ml->next = mlist;
ml->prev = mlist->prev;
mlist->prev->next = ml;
mlist->prev = ml;
}

/*
*
*/
static void
ml_unlink(ml)
struct mlist *ml;
{
ml->prev->next = ml->next;
ml->next->prev = ml->prev;
}

/*
* Add a string to an mlist.
*/
@@ -736,6 +765,21 @@ cmd_addhist(mlist, cmd, modified)
if (strlen(cmd) == 0)
return;

if (no_hist_dups)
{
struct mlist *next = NULL;
for (ml = mlist->next; ml->string != NULL; ml = next)
{
next = ml->next;
if (strcmp(ml->string, cmd) == 0)
{
ml_unlink(ml);
free(ml->string);
free(ml);
}
}
}

/*
* Save the command unless it's a duplicate of the
* last command in the history.
@@ -750,10 +794,7 @@ cmd_addhist(mlist, cmd, modified)
ml = (struct mlist *) ecalloc(1, sizeof(struct mlist));
ml->string = save(cmd);
ml->modified = modified;
ml->next = mlist;
ml->prev = mlist->prev;
mlist->prev->next = ml;
mlist->prev = ml;
ml_link(mlist, ml);
}
/*
* Point to the cmd just after the just-accepted command.
@@ -768,13 +809,13 @@ cmd_addhist(mlist, cmd, modified)
* Add it to the currently selected history list.
*/
public void
cmd_accept()
cmd_accept(VOID_PARAM)
{
#if CMD_HISTORY
/*
* Nothing to do if there is no currently selected history list.
*/
if (curr_mlist == NULL)
if (curr_mlist == NULL || curr_mlist == ml_examine)
return;
cmd_addhist(curr_mlist, cmdbuf, 1);
curr_mlist->modified = 1;
@@ -799,7 +840,7 @@ cmd_edit(c)
#if TAB_COMPLETE_FILENAME
#define not_in_completion() in_completion = 0
#else
#define not_in_completion()
#define not_in_completion(VOID_PARAM)
#endif
/*
@@ -934,7 +975,7 @@ cmd_istr(str)
* cursor at the end of the word.
*/
static char *
delimit_word()
delimit_word(VOID_PARAM)
{
char *word;
#if SPACES_IN_FILENAMES