I made a mistake merge. Reverting it inwip/yesmanc778945806
undid the state on master, but now I realize it crippled the git merge mechanism. As the merge contained a mix of commits from `master..staging-next` and other commits from `staging-next..staging`, it got the `staging-next` branch into a state that was difficult to recover. I reconstructed the "desired" state of staging-next tree by: - checking out the last commit of the problematic range:4effe769e2
- `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken merge commit and its revert from that range (while keeping reapplication from4effe769e2
) - merging the last unaffected staging-next commit (803ca85c20
) - fortunately no other commits have been pushed to staging-next yet - applying a diff on staging-next to get it into that state
parent
4bd836b381
commit
89023c38fc
@ -1,4 +1,12 @@ |
||||
{ makeSetupHook }: |
||||
{ makeSetupHook, tests }: |
||||
|
||||
# See the header comment in ../setup-hooks/install-shell-files.sh for example usage. |
||||
makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh |
||||
let |
||||
setupHook = makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh; |
||||
in |
||||
|
||||
setupHook.overrideAttrs (oldAttrs: { |
||||
passthru = (oldAttrs.passthru or {}) // { |
||||
tests = tests.install-shell-files; |
||||
}; |
||||
}) |
||||
|
@ -0,0 +1,73 @@ |
||||
From 737452159d521aef2041a2767f3ebf9f68f4b6a9 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Kampka <christian@kampka.net>
|
||||
Date: Tue, 1 Sep 2020 13:54:35 +0200
|
||||
Subject: [PATCH] Pin abstract namespace sockets to host_os
|
||||
|
||||
Running programs with AC_RUN_IFELSE fails when cross-compiling.
|
||||
Since abstract namespace sockets are linux feature, we can easily
|
||||
assume it is available for linux and not for darwin.
|
||||
---
|
||||
configure.in | 47 ++++++-----------------------------------------
|
||||
1 file changed, 6 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index eb129db..0ed82ba 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -387,47 +387,12 @@ fi
|
||||
|
||||
#### Abstract sockets
|
||||
|
||||
-AC_MSG_CHECKING(abstract socket namespace)
|
||||
-AC_LANG_PUSH(C)
|
||||
-AC_RUN_IFELSE([AC_LANG_PROGRAM(
|
||||
-[[
|
||||
-#include <sys/types.h>
|
||||
-#include <stdlib.h>
|
||||
-#include <string.h>
|
||||
-#include <stdio.h>
|
||||
-#include <sys/socket.h>
|
||||
-#include <sys/un.h>
|
||||
-#include <errno.h>
|
||||
-]],
|
||||
-[[
|
||||
- int listen_fd;
|
||||
- struct sockaddr_un addr;
|
||||
-
|
||||
- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
|
||||
-
|
||||
- if (listen_fd < 0)
|
||||
- {
|
||||
- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
|
||||
- exit (1);
|
||||
- }
|
||||
-
|
||||
- memset (&addr, '\0', sizeof (addr));
|
||||
- addr.sun_family = AF_UNIX;
|
||||
- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
|
||||
- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
|
||||
-
|
||||
- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
|
||||
- {
|
||||
- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
|
||||
- strerror (errno));
|
||||
- exit (1);
|
||||
- }
|
||||
- else
|
||||
- exit (0);
|
||||
-]])],
|
||||
- [have_abstract_sockets=yes],
|
||||
- [have_abstract_sockets=no])
|
||||
-AC_LANG_POP(C)
|
||||
+AC_MSG_CHECKING([whether target os has abstract socket namespace])
|
||||
+if test x$target_os = xlinux-gnu ; then
|
||||
+ have_abstract_sockets=yes
|
||||
+else
|
||||
+ have_abstract_sockets=no
|
||||
+fi
|
||||
AC_MSG_RESULT($have_abstract_sockets)
|
||||
|
||||
if test x$enable_abstract_sockets = xyes; then
|
||||
--
|
||||
2.25.4
|
||||
|
@ -1,211 +0,0 @@ |
||||
Backports of
|
||||
|
||||
From 46e17f0cb4a80b36755c84b8bf15731d3386c08f Mon Sep 17 00:00:00 2001
|
||||
From: kyslov <kyslov@google.com>
|
||||
Date: Fri, 4 Jan 2019 17:04:09 -0800
|
||||
Subject: [PATCH] Fix OOB memory access on fuzzed data
|
||||
|
||||
From 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 Mon Sep 17 00:00:00 2001
|
||||
From: James Zern <jzern@google.com>
|
||||
Date: Tue, 24 Jul 2018 21:36:50 -0700
|
||||
Subject: [PATCH] vp9: fix OOB read in decoder_peek_si_internal
|
||||
|
||||
From f00890eecdf8365ea125ac16769a83aa6b68792d Mon Sep 17 00:00:00 2001
|
||||
From: James Zern <jzern@google.com>
|
||||
Date: Tue, 11 Dec 2018 18:06:20 -0800
|
||||
Subject: [PATCH] update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
|
||||
|
||||
From 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 Mon Sep 17 00:00:00 2001
|
||||
From: James Zern <jzern@google.com>
|
||||
Date: Tue, 9 Apr 2019 18:37:44 -0700
|
||||
Subject: [PATCH] update libwebm to libwebm-1.0.0.27-358-gdbf1d10
|
||||
|
||||
From 52add5896661d186dec284ed646a4b33b607d2c7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Jiang <jianj@google.com>
|
||||
Date: Wed, 23 May 2018 15:43:00 -0700
|
||||
Subject: [PATCH] VP8: Fix use-after-free in postproc.
|
||||
|
||||
to address CVE-2019-9232 CVE-2019-9325 CVE-2019-9371 CVE-2019-9433
|
||||
|
||||
--- libvpx-1.7.0.orig/test/decode_api_test.cc
|
||||
+++ libvpx-1.7.0/test/decode_api_test.cc
|
||||
@@ -138,8 +138,30 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||
}
|
||||
|
||||
-TEST(DecodeAPI, Vp9PeekSI) {
|
||||
+void TestPeekInfo(const uint8_t *const data, uint32_t data_sz,
|
||||
+ uint32_t peek_size) {
|
||||
const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
|
||||
+ // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
|
||||
+ // to decoder_peek_si_internal on frames of size < 8.
|
||||
+ if (data_sz >= 8) {
|
||||
+ vpx_codec_ctx_t dec;
|
||||
+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
||||
+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM
|
||||
+ : VPX_CODEC_CORRUPT_FRAME,
|
||||
+ vpx_codec_decode(&dec, data, data_sz, NULL, 0));
|
||||
+ vpx_codec_iter_t iter = NULL;
|
||||
+ EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||
+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||
+ }
|
||||
+
|
||||
+ // Verify behavior of vpx_codec_peek_stream_info.
|
||||
+ vpx_codec_stream_info_t si;
|
||||
+ si.sz = sizeof(si);
|
||||
+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
|
||||
+ vpx_codec_peek_stream_info(codec, data, data_sz, &si));
|
||||
+}
|
||||
+
|
||||
+TEST(DecodeAPI, Vp9PeekStreamInfo) {
|
||||
// The first 9 bytes are valid and the rest of the bytes are made up. Until
|
||||
// size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it
|
||||
// should return VPX_CODEC_CORRUPT_FRAME.
|
||||
@@ -150,24 +172,18 @@ TEST(DecodeAPI, Vp9PeekSI) {
|
||||
};
|
||||
|
||||
for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) {
|
||||
- // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
|
||||
- // to decoder_peek_si_internal on frames of size < 8.
|
||||
- if (data_sz >= 8) {
|
||||
- vpx_codec_ctx_t dec;
|
||||
- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
||||
- EXPECT_EQ(
|
||||
- (data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME,
|
||||
- vpx_codec_decode(&dec, data, data_sz, NULL, 0));
|
||||
- vpx_codec_iter_t iter = NULL;
|
||||
- EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||
- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||
- }
|
||||
-
|
||||
- // Verify behavior of vpx_codec_peek_stream_info.
|
||||
- vpx_codec_stream_info_t si;
|
||||
- si.sz = sizeof(si);
|
||||
- EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
|
||||
- vpx_codec_peek_stream_info(codec, data, data_sz, &si));
|
||||
+ TestPeekInfo(data, data_sz, 10);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+TEST(DecodeAPI, Vp9PeekStreamInfoTruncated) {
|
||||
+ // This profile 1 header requires 10.25 bytes, ensure
|
||||
+ // vpx_codec_peek_stream_info doesn't over read.
|
||||
+ const uint8_t profile1_data[10] = { 0xa4, 0xe9, 0x30, 0x68, 0x53,
|
||||
+ 0xe9, 0x30, 0x68, 0x53, 0x04 };
|
||||
+
|
||||
+ for (uint32_t data_sz = 1; data_sz <= 10; ++data_sz) {
|
||||
+ TestPeekInfo(profile1_data, data_sz, 11);
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_VP9_DECODER
|
||||
--- libvpx-1.7.0.orig/third_party/libwebm/mkvparser/mkvparser.cc
|
||||
+++ libvpx-1.7.0/third_party/libwebm/mkvparser/mkvparser.cc
|
||||
@@ -5307,8 +5307,8 @@ long VideoTrack::Parse(Segment* pSegment
|
||||
|
||||
const long long stop = pos + s.size;
|
||||
|
||||
- Colour* colour = NULL;
|
||||
- Projection* projection = NULL;
|
||||
+ std::unique_ptr<Colour> colour_ptr;
|
||||
+ std::unique_ptr<Projection> projection_ptr;
|
||||
|
||||
while (pos < stop) {
|
||||
long long id, size;
|
||||
@@ -5357,11 +5357,19 @@ long VideoTrack::Parse(Segment* pSegment
|
||||
if (rate <= 0)
|
||||
return E_FILE_FORMAT_INVALID;
|
||||
} else if (id == libwebm::kMkvColour) {
|
||||
- if (!Colour::Parse(pReader, pos, size, &colour))
|
||||
+ Colour* colour = NULL;
|
||||
+ if (!Colour::Parse(pReader, pos, size, &colour)) {
|
||||
return E_FILE_FORMAT_INVALID;
|
||||
+ } else {
|
||||
+ colour_ptr.reset(colour);
|
||||
+ }
|
||||
} else if (id == libwebm::kMkvProjection) {
|
||||
- if (!Projection::Parse(pReader, pos, size, &projection))
|
||||
+ Projection* projection = NULL;
|
||||
+ if (!Projection::Parse(pReader, pos, size, &projection)) {
|
||||
return E_FILE_FORMAT_INVALID;
|
||||
+ } else {
|
||||
+ projection_ptr.reset(projection);
|
||||
+ }
|
||||
}
|
||||
|
||||
pos += size; // consume payload
|
||||
@@ -5392,8 +5400,8 @@ long VideoTrack::Parse(Segment* pSegment
|
||||
pTrack->m_display_unit = display_unit;
|
||||
pTrack->m_stereo_mode = stereo_mode;
|
||||
pTrack->m_rate = rate;
|
||||
- pTrack->m_colour = colour;
|
||||
- pTrack->m_projection = projection;
|
||||
+ pTrack->m_colour = colour_ptr.release();
|
||||
+ pTrack->m_projection = projection_ptr.release();
|
||||
|
||||
pResult = pTrack;
|
||||
return 0; // success
|
||||
--- libvpx-1.7.0.orig/vp8/common/postproc.c
|
||||
+++ libvpx-1.7.0/vp8/common/postproc.c
|
||||
@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BU
|
||||
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
|
||||
int ppl = (int)(level + .5);
|
||||
|
||||
- const MODE_INFO *mode_info_context = cm->show_frame_mi;
|
||||
+ const MODE_INFO *mode_info_context = cm->mi;
|
||||
int mbr, mbc;
|
||||
|
||||
/* The pixel thresholds are adjusted according to if or not the macroblock
|
||||
--- libvpx-1.7.0.orig/vp8/decoder/dboolhuff.h
|
||||
+++ libvpx-1.7.0/vp8/decoder/dboolhuff.h
|
||||
@@ -76,7 +76,7 @@ static int vp8dx_decode_bool(BOOL_DECODE
|
||||
}
|
||||
|
||||
{
|
||||
- register int shift = vp8_norm[range];
|
||||
+ const unsigned char shift = vp8_norm[(unsigned char)range];
|
||||
range <<= shift;
|
||||
value <<= shift;
|
||||
count -= shift;
|
||||
--- libvpx-1.7.0.orig/vp9/vp9_dx_iface.c
|
||||
+++ libvpx-1.7.0/vp9/vp9_dx_iface.c
|
||||
@@ -97,7 +97,7 @@ static vpx_codec_err_t decoder_peek_si_i
|
||||
const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si,
|
||||
int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) {
|
||||
int intra_only_flag = 0;
|
||||
- uint8_t clear_buffer[10];
|
||||
+ uint8_t clear_buffer[11];
|
||||
|
||||
if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM;
|
||||
|
||||
@@ -158,6 +158,9 @@ static vpx_codec_err_t decoder_peek_si_i
|
||||
if (profile > PROFILE_0) {
|
||||
if (!parse_bitdepth_colorspace_sampling(profile, &rb))
|
||||
return VPX_CODEC_UNSUP_BITSTREAM;
|
||||
+ // The colorspace info may cause vp9_read_frame_size() to need 11
|
||||
+ // bytes.
|
||||
+ if (data_sz < 11) return VPX_CODEC_UNSUP_BITSTREAM;
|
||||
}
|
||||
rb.bit_offset += REF_FRAMES; // refresh_frame_flags
|
||||
vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
|
||||
--- libvpx-1.7.0.orig/vpx_dsp/bitreader.h
|
||||
+++ libvpx-1.7.0/vpx_dsp/bitreader.h
|
||||
@@ -94,7 +94,7 @@ static INLINE int vpx_read(vpx_reader *r
|
||||
}
|
||||
|
||||
{
|
||||
- register int shift = vpx_norm[range];
|
||||
+ const unsigned char shift = vpx_norm[(unsigned char)range];
|
||||
range <<= shift;
|
||||
value <<= shift;
|
||||
count -= shift;
|
||||
--- libvpx-1.7.0.orig/vpx_dsp/bitreader_buffer.c
|
||||
+++ libvpx-1.7.0/vpx_dsp/bitreader_buffer.c
|
||||
@@ -23,7 +23,7 @@ int vpx_rb_read_bit(struct vpx_read_bit_
|
||||
rb->bit_offset = off + 1;
|
||||
return bit;
|
||||
} else {
|
||||
- rb->error_handler(rb->error_handler_data);
|
||||
+ if (rb->error_handler != NULL) rb->error_handler(rb->error_handler_data);
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@ |
||||
From b49bcb6eece322b70fc2e8b0c8498f5a38ea7b82 Mon Sep 17 00:00:00 2001
|
||||
From: David McFarland <corngood@gmail.com>
|
||||
Date: Sun, 26 Jul 2020 17:29:49 -0300
|
||||
Subject: [PATCH] link radv with ld_args_build_id
|
||||
|
||||
This is needed for radv_device_get_cache_uuid to work correctly.
|
||||
---
|
||||
src/amd/vulkan/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
|
||||
index eec026e8f60..a07a0821938 100644
|
||||
--- a/src/amd/vulkan/meson.build
|
||||
+++ b/src/amd/vulkan/meson.build
|
||||
@@ -183,7 +183,7 @@ libvulkan_radeon = shared_library(
|
||||
],
|
||||
c_args : [c_vis_args, no_override_init_args, radv_flags],
|
||||
cpp_args : [cpp_vis_args, radv_flags],
|
||||
- link_args : [ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args],
|
||||
+ link_args : [ld_args_build_id, ld_args_bsymbolic, ld_args_gc_sections, libvulkan_radeon_ld_args],
|
||||
link_depends : [libvulkan_radeon_link_depends,],
|
||||
install : true,
|
||||
)
|
||||
--
|
||||
2.28.0
|
@ -0,0 +1,40 @@ |
||||
From 536108b10271f2f42d41c7d9ddb4ce2ea1851f4f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
|
||||
Date: Sat, 17 Oct 2020 19:27:08 +0200
|
||||
Subject: [PATCH] boost: Do not add system paths on nix
|
||||
|
||||
---
|
||||
mesonbuild/dependencies/boost.py | 17 +----------------
|
||||
1 file changed, 1 insertion(+), 16 deletions(-)
|
||||
|
||||
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
|
||||
index 907c0c275..ecaf11b18 100644
|
||||
--- a/mesonbuild/dependencies/boost.py
|
||||
+++ b/mesonbuild/dependencies/boost.py
|
||||
@@ -643,22 +643,7 @@ class BoostDependency(ExternalDependency):
|
||||
roots += [x for x in candidates if x.name.lower().startswith('boost') and x.is_dir()]
|
||||
else:
|
||||
tmp = [] # type: T.List[Path]
|
||||
-
|
||||
- # Homebrew
|
||||
- brew_boost = Path('/usr/local/Cellar/boost')
|
||||
- if brew_boost.is_dir():
|
||||
- tmp += [x for x in brew_boost.iterdir()]
|
||||
-
|
||||
- # Add some default system paths
|
||||
- tmp += [Path('/opt/local')]
|
||||
- tmp += [Path('/usr/local/opt/boost')]
|
||||
- tmp += [Path('/usr/local')]
|
||||
- tmp += [Path('/usr')]
|
||||
-
|
||||
- # Cleanup paths
|
||||
- tmp = [x for x in tmp if x.is_dir()]
|
||||
- tmp = [x.resolve() for x in tmp]
|
||||
- roots += tmp
|
||||
+ # Do not add any non-explicit paths on nix
|
||||
|
||||
return roots
|
||||
|
||||
--
|
||||
2.25.4
|
||||
|
@ -0,0 +1,125 @@ |
||||
{ stdenv, runCommandLocal, recurseIntoAttrs, installShellFiles }: |
||||
|
||||
let |
||||
runTest = name: env: buildCommand: |
||||
runCommandLocal "install-shell-files--${name}" ({ |
||||
nativeBuildInputs = [ installShellFiles ]; |
||||
meta.platforms = stdenv.lib.platforms.all; |
||||
} // env) buildCommand; |
||||
in |
||||
|
||||
recurseIntoAttrs { |
||||
# installManPage |
||||
|
||||
install-manpage = runTest "install-manpage" {} '' |
||||
mkdir -p doc |
||||
echo foo > doc/foo.1 |
||||
echo bar > doc/bar.2.gz |
||||
echo baz > doc/baz.3 |
||||
|
||||
installManPage doc/* |
||||
|
||||
cmp doc/foo.1 $out/share/man/man1/foo.1 |
||||
cmp doc/bar.2.gz $out/share/man/man2/bar.2.gz |
||||
cmp doc/baz.3 $out/share/man/man3/baz.3 |
||||
''; |
||||
install-manpage-outputs = runTest "install-manpage-outputs" { |
||||
outputs = [ "out" "man" "devman" ]; |
||||
} '' |
||||
mkdir -p doc |
||||
echo foo > doc/foo.1 |
||||
echo bar > doc/bar.3 |
||||
|
||||
installManPage doc/* |
||||
|
||||
# assert they didn't go into $out |
||||
[[ ! -f $out/share/man/man1/foo.1 && ! -f $out/share/man/man3/bar.3 ]] |
||||
|
||||
# foo.1 alone went into man |
||||
cmp doc/foo.1 ''${!outputMan:?}/share/man/man1/foo.1 |
||||
[[ ! -f ''${!outputMan:?}/share/man/man3/bar.3 ]] |
||||
|
||||
# bar.3 alone went into devman |
||||
cmp doc/bar.3 ''${!outputDevman:?}/share/man/man3/bar.3 |
||||
[[ ! -f ''${!outputDevman:?}/share/man/man1/foo.1 ]] |
||||
|
||||
touch $out |
||||
''; |
||||
|
||||
# installShellCompletion |
||||
|
||||
install-completion = runTest "install-completion" {} '' |
||||
echo foo > foo |
||||
echo bar > bar |
||||
echo baz > baz |
||||
echo qux > qux.zsh |
||||
echo quux > quux |
||||
|
||||
installShellCompletion --bash foo bar --zsh baz qux.zsh --fish quux |
||||
|
||||
cmp foo $out/share/bash-completion/completions/foo |
||||
cmp bar $out/share/bash-completion/completions/bar |
||||
cmp baz $out/share/zsh/site-functions/_baz |
||||
cmp qux.zsh $out/share/zsh/site-functions/_qux |
||||
cmp quux $out/share/fish/vendor_completions.d/quux |
||||
''; |
||||
install-completion-output = runTest "install-completion-output" { |
||||
outputs = [ "out" "bin" ]; |
||||
} '' |
||||
echo foo > foo |
||||
|
||||
installShellCompletion --bash foo |
||||
|
||||
# assert it didn't go into $out |
||||
[[ ! -f $out/share/bash-completion/completions/foo ]] |
||||
|
||||
cmp foo ''${!outputBin:?}/share/bash-completion/completions/foo |
||||
|
||||
touch $out |
||||
''; |
||||
install-completion-name = runTest "install-completion-name" {} '' |
||||
echo foo > foo |
||||
echo bar > bar |
||||
echo baz > baz |
||||
|
||||
installShellCompletion --bash --name foobar.bash foo --zsh --name _foobar bar --fish baz |
||||
|
||||
cmp foo $out/share/bash-completion/completions/foobar.bash |
||||
cmp bar $out/share/zsh/site-functions/_foobar |
||||
cmp baz $out/share/fish/vendor_completions.d/baz |
||||
''; |
||||
install-completion-inference = runTest "install-completion-inference" {} '' |
||||
echo foo > foo.bash |
||||
echo bar > bar.zsh |
||||
echo baz > baz.fish |
||||
|
||||
installShellCompletion foo.bash bar.zsh baz.fish |
||||
|
||||
cmp foo.bash $out/share/bash-completion/completions/foo.bash |
||||
cmp bar.zsh $out/share/zsh/site-functions/_bar |
||||
cmp baz.fish $out/share/fish/vendor_completions.d/baz.fish |
||||
''; |
||||
install-completion-cmd = runTest "install-completion-cmd" {} '' |
||||
echo foo > foo.bash |
||||
echo bar > bar.zsh |
||||
echo baz > baz.fish |
||||
echo qux > qux.fish |
||||
|
||||
installShellCompletion --cmd foobar --bash foo.bash --zsh bar.zsh --fish baz.fish --name qux qux.fish |
||||
|
||||
cmp foo.bash $out/share/bash-completion/completions/foobar.bash |
||||
cmp bar.zsh $out/share/zsh/site-functions/_foobar |
||||
cmp baz.fish $out/share/fish/vendor_completions.d/foobar.fish |
||||
cmp qux.fish $out/share/fish/vendor_completions.d/qux |
||||
''; |
||||
install-completion-fifo = runTest "install-completion-fifo" {} '' |
||||
installShellCompletion \ |
||||
--bash --name foo.bash <(echo foo) \ |
||||
--zsh --name _foo <(echo bar) \ |
||||
--fish --name foo.fish <(echo baz) |
||||
|
||||
[[ $(<$out/share/bash-completion/completions/foo.bash) == foo ]] || { echo "foo.bash comparison failed"; exit 1; } |
||||
[[ $(<$out/share/zsh/site-functions/_foo) == bar ]] || { echo "_foo comparison failed"; exit 1; } |
||||
[[ $(<$out/share/fish/vendor_completions.d/foo.fish) == baz ]] || { echo "foo.fish comparison failed"; exit 1; } |
||||
''; |
||||
} |
@ -1,52 +0,0 @@ |
||||
From 0251229bfd9617e8a35cf9dd7d338d63fff74a0c Mon Sep 17 00:00:00 2001
|
||||
From: Assaf Gordon <assafgordon@gmail.com>
|
||||
Date: Mon, 13 May 2019 16:37:40 -0600
|
||||
Subject: [PATCH] tests: avoid false-positive in date-debug test
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When debugging an invalid date due to DST switching, the intermediate
|
||||
'normalized time' should not be checked - its value can differ between
|
||||
systems (e.g. glibc vs musl).
|
||||
|
||||
Reported by Niklas Hambüchen in
|
||||
https://lists.gnu.org/r/coreutils/2019-05/msg00031.html
|
||||
Analyzed by Rich Felker in
|
||||
https://lists.gnu.org/r/coreutils/2019-05/msg00039.html
|
||||
|
||||
* tests/misc/date-debug.sh: Replace the exact normalized time
|
||||
with 'XX:XX:XX' so different values would not trigger test failure.
|
||||
---
|
||||
tests/misc/date-debug.sh | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh
|
||||
index aa47f1abb..2ce6f4ce8 100755
|
||||
--- a/tests/misc/date-debug.sh
|
||||
+++ b/tests/misc/date-debug.sh
|
||||
@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string
|
||||
date: using specified time as starting value: '02:30:00'
|
||||
date: error: invalid date/time value:
|
||||
date: user provided time: '(Y-M-D) 2006-04-02 02:30:00'
|
||||
-date: normalized time: '(Y-M-D) 2006-04-02 03:30:00'
|
||||
+date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX'
|
||||
date: --
|
||||
date: possible reasons:
|
||||
date: non-existing due to daylight-saving time;
|
||||
@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00'
|
||||
EOF
|
||||
|
||||
# date should return 1 (error) for invalid date
|
||||
-returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1
|
||||
+returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1
|
||||
+
|
||||
+# The output line of "normalized time" can differ between systems
|
||||
+# (e.g. glibc vs musl) and should not be checked.
|
||||
+# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html
|
||||
+sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \
|
||||
+ out2-t > out2 || framework_failure_
|
||||
+
|
||||
compare exp2 out2 || fail=1
|
||||
|
||||
##
|
@ -1,51 +0,0 @@ |
||||
From 3bd82a82cf4ba693d2c31c7b95aaec4e56dc92a4 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Mon, 11 Mar 2019 16:40:29 -0700
|
||||
Subject: [PATCH 1/1] strtod: fix clash with strtold
|
||||
|
||||
Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
|
||||
* lib/strtod.c (compute_minus_zero, minus_zero):
|
||||
Simplify by remving the macro / external variable,
|
||||
and having just a function. User changed. This avoids
|
||||
the need for an external variable that might clash.
|
||||
---
|
||||
ChangeLog | 9 +++++++++
|
||||
lib/strtod.c | 11 +++++------
|
||||
2 files changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/strtod.c b/lib/strtod.c
|
||||
index b9eaa51..69b1564 100644
|
||||
--- a/lib/strtod.c
|
||||
+++ b/lib/strtod.c
|
||||
@@ -294,16 +294,15 @@ parse_number (const char *nptr,
|
||||
ICC 10.0 has a bug when optimizing the expression -zero.
|
||||
The expression -MIN * MIN does not work when cross-compiling
|
||||
to PowerPC on Mac OS X 10.5. */
|
||||
-#if defined __hpux || defined __sgi || defined __ICC
|
||||
static DOUBLE
|
||||
-compute_minus_zero (void)
|
||||
+minus_zero (void)
|
||||
{
|
||||
+#if defined __hpux || defined __sgi || defined __ICC
|
||||
return -MIN * MIN;
|
||||
-}
|
||||
-# define minus_zero compute_minus_zero ()
|
||||
#else
|
||||
-DOUBLE minus_zero = -0.0;
|
||||
+ return -0.0;
|
||||
#endif
|
||||
+}
|
||||
|
||||
/* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the
|
||||
character after the last one used in the number is put in *ENDPTR. */
|
||||
@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr)
|
||||
/* Special case -0.0, since at least ICC miscompiles negation. We
|
||||
can't use copysign(), as that drags in -lm on some platforms. */
|
||||
if (!num && negative)
|
||||
- return minus_zero;
|
||||
+ return minus_zero ();
|
||||
return negative ? -num : num;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue