Elastix Custom Configuration files - queue

I am new in Asterisk and using Elastix 2.5 to create two queues with 2 static members per queue in a lab environment. I want to set the value of 'setqueuevar' to yes. To do that I have changed the queue_custom.conf file and set this value to yes; although I have reloaded the asterisk modules and everything looks ok, but the related channel variables (QUEUENAME, QUEUESTRATEGY,...) don't get any value!
As some of the configuration files are auto-generated by Elastix (freepbx module), would you please tell me what is the precedence of configuration files in it? Is there any relationship between them or the main files are overwritten by custom configuration files?
queues.conf file:
[general]
;
; Global settings for call queues
; (none exist currently)
;
; Note that a timeout to fail out of a queue may be passed as part of
application call
; from extensions.conf:
; Queue(queuename|[options]|[optionalurl]|[announceoverride]|[timeout])
; example: Queue(dave|t|||45)
#include queues_general_additional.conf
#include queues_custom_general.conf
[default]
;
; Default settings for queues (currently unused)
;
#include queues_custom.conf
#include queues_additional.conf
#include queues_post_custom.conf
queues_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
[1050]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=no
autopause=no
autopausebusy=no
autopausedelay=0
autopauseunavail=no
eventmemberstatus=no
eventwhencalled=no
joinempty=no
leavewhenempty=no
maxlen=0
memberdelay=0
monitor-type=mixmonitor
penaltymemberslimit=0
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=5
ringinuse=yes
servicelevel=60
strategy=rrmemory
timeout=15
timeoutpriority=app
timeoutrestart=no
weight=0
wrapuptime=0
member=Local/10501#from-queue/n,0,10501,hint:10501#ext-local
member=Local/10502#from-queue/n,0,10502,hint:10502#ext-local
[115]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=no
autopause=no
autopausebusy=no
autopausedelay=0
autopauseunavail=no
eventmemberstatus=no
eventwhencalled=no
joinempty=no
leavewhenempty=no
maxlen=0
memberdelay=0
monitor-type=mixmonitor
penaltymemberslimit=0
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=5
ringinuse=yes
servicelevel=60
strategy=rrmemory
timeout=15
timeoutpriority=app
timeoutrestart=no
weight=0
wrapuptime=0
member=Local/1151#from-queue/n,0,1151,hint:1151#ext-local
member=Local/1152#from-queue/n,0,1152,hint:1152#ext-local
queues_custom.conf:
[1050]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=no
autopause=no
autopausebusy=no
autopausedelay=0
autopauseunavail=no
eventmemberstatus=no
eventwhencalled=no
joinempty=no
leavewhenempty=no
maxlen=0
memberdelay=0
monitor-type=mixmonitor
penaltymemberslimit=0
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=5
ringinuse=yes
servicelevel=60
strategy=rrmemory
timeout=15
timeoutpriority=app
timeoutrestart=no
weight=0
wrapuptime=0
setqueuevar=yes
member=Local/10501#from-queue/n,0,10501,hint:10501#ext-local
member=Local/10502#from-queue/n,0,10502,hint:10502#ext-local
[115]
announce-frequency=0
announce-holdtime=no
announce-position=no
autofill=no
autopause=no
autopausebusy=no
autopausedelay=0
autopauseunavail=no
eventmemberstatus=no
eventwhencalled=no
joinempty=no
leavewhenempty=no
maxlen=0
memberdelay=0
monitor-type=mixmonitor
penaltymemberslimit=0
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
reportholdtime=no
retry=5
ringinuse=yes
servicelevel=60
strategy=rrmemory
timeout=15
timeoutpriority=app
timeoutrestart=no
weight=0
wrapuptime=0
setqueuevar=yes
member=Local/1151#from-queue/n,0,1151,hint:1151#ext-local
member=Local/1152#from-queue/n,0,1152,hint:1152#ext-local

Freepbx overwrite only files which ends by "_additional.conf"
You should do NOT do any changes in file, instead you have write freepbx module.
If you still want do manual changes, do changes in files which ending by "_custom.conf"
If you have same pattern in 2 files with same prio, result is UNPREDICTABLE, but in most cases first one will work.
Read this
https://www.voip-info.org/wiki/view/Asterisk+Dialplan+Introduction
Read ORelly's "Asterisk the future telephony"

Related

Including edk2-libc in efi shell application

How would one approach adding support for https://github.com/tianocore/edk2-libc, say I want to include stdio and use printf in my edk2 application? I followed StdLib/Readme.txt, and am able to successfully build examples in the AppPkg, however, when I try to add StdLib to my project I get errors like these:
LibString.lib(Searching.obj) : error LNK2005: strspn already defined in LibString.lib(Searching.obj)
LibCtype.lib(CClass.obj) : error LNK2005: isspace already defined in LibCtype.lib(CClass.obj)
(...)
LibC.lib(Main.obj) : error LNK2001: unresolved external symbol main
I do have the boilerplate (!include StdLib/StdLib.inc) added to my dsc file and in inf, I have StdLib.dec added to Packages and LibC and LibStdio added to LibraryClasses. I am using VS2017 toolchain for compilation and am using edk2-stable202108 release.
I was able to achieve this using below configuration for Hello Application of AppPkg.
Hello.inf
[Defines]
INF_VERSION = 0x00010006
BASE_NAME = Hello
FILE_GUID = a912f198-7f0e-4803-b908-b757b806ec83
MODULE_TYPE = UEFI_APPLICATION
VERSION_STRING = 0.1
ENTRY_POINT = ShellCEntryLib
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
Hello.c
[Packages]
MdePkg/MdePkg.dec
ShellPkg/ShellPkg.dec
StdLib/StdLib.dec
[LibraryClasses]
UefiLib
ShellCEntryLib
BaseLib
BaseMemoryLib
MemoryAllocationLib
LibStdLib
LibStdio
LibString
DevConsole
Hello.c
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/ShellCEntryLib.h>
#include <stdio.h>
int
main (
IN int Argc,
IN char **Argv
)
{
printf("Hello, world!\n");
return 0;
}
What I have understood is that LibC has ShellAppMain() defined in it which internally calls extern main(). So You need to provide definition of main() in your source just like I did in Hello.c

Perl (MQSeries): How to connect to WMQ's channel with TLS (the "same code" works in C++)

I was tasked with implementing TLS support in one of our legacy perl scripts. It should be fairly simple but I failed (I am not able to connect to the queue manager through an encrypted channel). Could anyone tell me what am I missing?
My code in TestConnect.pl:
#!/usr/bin/perl
use strict;
use MQSeries;
use MQSeries::QueueManager;
my $qmgr = MQSeries::QueueManager->new(
QueueManager => $ENV{MQMANAGER},
AutoConnect => 0,
ClientConn => {
ChannelName => $ENV{MQCHANNEL},
TransportType => 'TCP',
ConnectionName => $ENV{MQHOSTNAME} . "(" . $ENV{MQPORT} . ")",
SSLCipherSpec => $ENV{MQ_CIPH},
Version => MQCD_VERSION_7
},
SSLConfig => {
KeyRepository => $ENV{MQKEYR},
CertificateLabel => $ENV{MQ_C_LABEL},
Version => MQSCO_VERSION_5
}
);
if (!$qmgr->Connect()) {
print STDERR "Unable to connect to queue manager\nCompCode => " . $qmgr->CompCode() . "\nReason => " . $qmgr->Reason() . " (" . MQReasonToText($qmgr->Reason()) . ")\n";
}
else {
print STDERR "\n\nALL OK!!\n\n"
}
Similar code in C++:
#pragma GCC diagnostic ignored "-Wwrite-strings"
#include <iostream>
#include <cstring>
#include <cmqc.h>
#include <cmqxc.h>
#include <cmqstrc.h>
#include <cstdlib>
#include <cstdio>
int main(int argc, char** argv) {
MQHCONN hconn;
MQLONG lCompCode=(MQLONG)0;
MQLONG lReason=(MQLONG)0;
MQCNO connectOpts = {MQCNO_DEFAULT};
MQCD clientConn = {MQCD_CLIENT_CONN_DEFAULT};
MQSCO sslConfig = {MQSCO_DEFAULT};
connectOpts.Version = MQCNO_VERSION_5;
strncpy(connectOpts.StrucId, MQCNO_STRUC_ID, 4);
strcpy((char*)connectOpts.ConnTag, (const char*)MQCT_NONE);
connectOpts.ClientConnPtr = &clientConn;
connectOpts.SSLConfigPtr = &sslConfig;
strcpy(clientConn.ChannelName, std::getenv("MQCHANNEL"));
clientConn.TransportType = MQXPT_TCP;
sprintf(clientConn.ConnectionName, "%s(%s)", std::getenv("MQHOSTNAME"), std::getenv("MQPORT"));
strcpy(clientConn.SSLCipherSpec, std::getenv("MQ_CIPH"));
clientConn.Version = MQCD_VERSION_7;
strcpy(sslConfig.KeyRepository, std::getenv("MQKEYR"));
strcpy(sslConfig.CertificateLabel, std::getenv("MQ_C_LABEL"));
sslConfig.Version = MQSCO_VERSION_5;
MQCONNX(std::getenv("MQMANAGER"), &connectOpts, &hconn, &lCompCode, &lReason);
std::cout << "connection result " << MQCC_STR(lCompCode) << " with reason " << MQRC_STR(lReason) << "\n";
}
Please disregard strcpy instead of strncpy, not closing the connection and other less important things - I wanted the code to be as simple as possible (for the sake of tests).
All the environment variables above are set by me to proper values during execution, so that I can test the same connection details through Perl and through C++. I'm deliberately using non-standard names (e.g. avoid $MQSSLKEYR) to not pollute my environment with MQM variables, thus eliminating any possible side effects...
There are two tests: $MQCHANNEL points to a non-encrypted channel, with $MQ_CIPH empty: this works from both Perl and C++.
When I setup my $MQCHANNEL to point to a TLS-channel with $MQ_CIPH set accordingly, it works like a charm from C++ but in Perl, it shows:
MQCONN failed (Reason = 2393) (SSL initialization error.) at ./TestConnect.pl line 25.
Unable to connect to queue manager
CompCode => 2
Reason => 2393 (SSL initialization error.)
Unfortunately, the documentation is really vague and the error logs on MQ server say that there might be something wrong with the keys or certificate. But I know there's nothing wrong with these because I tested the C++ solution on multiple QManagers with TLS channels. The Perl solution does not work in the exact same circumstances.
There are those additional settings in connectOpts (MQCNO struct), which I wasn't able to simulate in Perl (so I assume they are not as important there). Also, I hope that the positional nature of MQCD and MQSCO structs has no impact on Perl handling of the hashes.
I don't see any typo in my connection options (and if there was any, Params::Validate takes care of the validation in QueueManager).
If it's of any use, the configuration of the channel is:
CHANNEL(CHANNEL_TLS) CHLTYPE(SVRCONN)
ALTDATE(2020-12-07) ALTTIME(09.30.54)
CERTLABL( ) COMPHDR(NONE)
COMPMSG(NONE)
DESCR()
DISCINT(0) HBINT(300)
KAINT(AUTO) MAXINST(300)
MAXINSTC(999999999) MAXMSGL(16777216)
MCAUSER(mqm) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SHARECNV(40) SSLCAUTH(REQUIRED)
SSLCIPH(TLS_RSA_WITH_AES_128_CBC_SHA256)
SSLPEER( ) TRPTYPE(TCP)
The non-TLS channel simply has SSLCIPH empty.
PS: This is the response in /var/mqm/errors/AMQERR01.LOG:
01/19/2021 08:33:51 AM - Process(24037.1) User(mqm) Program(TestConnect.pl)
Host(localhost.localdomain) Installation(Installation1)
VRMF(9.1.0.1)
Time(2021-01-19T08:33:51.725Z)
RemoteHost(10.132.4.9(1414))
CommentInsert1(CHANNEL_TLS)
CommentInsert2(host1 (10.132.4.9)(1414))
AMQ9642E: No SSL or TLS certificate for channel 'CHANNEL_TLS'.
EXPLANATION:
The channel 'CHANNEL_TLS' did not supply a certificate to use during SSL or
TLS handshaking, but a certificate is required by the remote queue manager.
The remote host is 'host1 (10.132.4.9)(1414)'.
The channel did not start.
ACTION:
Ensure that the key repository of the local queue manager or MQ client contains
a certificate which is associated with the queue manager or client. If you have
configured a certificate label, check that the certificate exists.
Alternatively, if appropriate, change the remote channel definition so that its
SSLCAUTH attribute is set to OPTIONAL and it has no SSLPEER value set.
----- cmqxrfpt.c : 690 --------------------------------------------------------

Yocto variable not defined but set with _ operator

I'm struggling with something I'm not sure to address correctly.
In a Yocto environment (for STM32MP1 by the way) I have to configure a new target.
Hence I added to meta-st/meta-st-stm32mp/conf/machine/include/st-machine-extlinux-config-stm32mp.inc this section, that looks like the other already available:
EXTLINUX_BOOTDEVICE_EMMC = "mmc1"
EXTLINUX_BOOTDEVICE_SDCARD = "mmc0"
EXTLINUX_ROOT_EMMC = "${#bb.utils.contains('ST_VENDORFS','1','root=/dev/mmcblk1p4','root=/dev/mmcblk1p3',d)}"
EXTLINUX_ROOT_NAND = "ubi.mtd=UBI rootfstype=ubifs root=ubi0:rootfs"
# Define available targets to use
UBOOT_EXTLINUX_CONFIGURED_TARGETS += "mp151a_sdcard"
UBOOT_EXTLINUX_CONFIGURED_TARGETS += "mp151a_emmc"
# Define bootprefix for each target
UBOOT_EXTLINUX_BOOTPREFIXES_mp151a_sdcard = "${EXTLINUX_BOOTDEVICE_SDCARD}_stm32mp151a_"
UBOOT_EXTLINUX_BOOTPREFIXES_mp151a_emcc = "${EXTLINUX_BOOTDEVICE_EMCC}_stm32mp151a_"
# Define labels for each target
UBOOT_EXTLINUX_LABELS_mp151a_sdcard = "stm32mp151a-sdcard"
UBOOT_EXTLINUX_LABELS_mp151a_emcc = "stm32mp151a-emcc"
# Define default boot config for each target
UBOOT_EXTLINUX_DEFAULT_LABEL_mp151a_sdcard ?= "stm32mp151a-sdcard"
UBOOT_EXTLINUX_DEFAULT_LABEL_mp151a_emcc ?= "stm32mp151a-emcc"
# Define FDT overrides for all labels
UBOOT_EXTLINUX_FDT_stm32mp151a-sdcard = "/stm32mp151a.dtb"
UBOOT_EXTLINUX_FDT_stm32mp151a-emcc = "/stm32mp151a.dtb"
# Define ROOT overrides for all labels
UBOOT_EXTLINUX_ROOT_stm32mp151a-sdcard = "${EXTLINUX_ROOT_SDCARD}"
UBOOT_EXTLINUX_ROOT_stm32mp151a-emcc = "${EXTLINUX_ROOT_EMCC}"
But when I bitbake <image> (that includes the file above) I get this output:
DEBUG: Executing python function update_extlinuxconf_targets
NOTE: UBOOT_EXTLINUX_CONFIGURED_TARGETS: mp157a-dk1_sdcard mp157a-dk1_sdcard-optee mp157c-dk2_sdcard mp157c-dk2_sdcard-optee mp157c-ed1_emmc mp157c-ed1_emmc-optee mp157c-ed1_sdcard mp157c-ed1_sdcard-optee mp157c-ev1_emmc mp157c-ev1_emmc-optee mp157c-ev1_nand mp157c-ev1_nor-sdcard mp157c-ev1_nor-emmc mp157c-ev1_sdcard mp157c-ev1_sdcard-optee mp151a_sdcard mp151a_emmc
NOTE: UBOOT_EXTLINUX_CONFIG_FLAGS: emmc sdcard
NOTE: *** Loop for config_label: emmc
NOTE: *** Loop for devicetree: stm32mp151a
NOTE: >>> New target label: mp151a_emmc
NOTE: >>> Append mp151a_emmc to UBOOT_EXTLINUX_TARGETS
NOTE: *** Loop for config_label: sdcard
NOTE: *** Loop for devicetree: stm32mp151a
NOTE: >>> New target label: mp151a_sdcard
NOTE: >>> Append mp151a_sdcard to UBOOT_EXTLINUX_TARGETS
NOTE: >>> UBOOT_EXTLINUX_TARGETS (updated): mp151a_emmc mp151a_sdcard
DEBUG: Python function update_extlinuxconf_targets finished
DEBUG: Executing python function do_create_multiextlinux_config
ERROR: UBOOT_EXTLINUX_ROOT not defined
DEBUG: Python function do_create_multiextlinux_config finished
ERROR: Function failed: do_create_multiextlinux_config
As you can see, the file is actually processed because it added the targets I've defined.
But it doesn't find the UBOOT_EXTLINUX_ROOT even if it's "set" with the _ operator:
UBOOT_EXTLINUX_ROOT_stm32mp151a-sdcard = "${EXTLINUX_ROOT_SDCARD}"
UBOOT_EXTLINUX_ROOT_stm32mp151a-emcc = "${EXTLINUX_ROOT_EMCC}"
I also tried to set the main variable to something like:
UBOOT_EXTLINUX_ROOT = ""
or
UBOOT_EXTLINUX_ROOT = "root=/dev/mmcblk1p4"
to see if it was the problem but it doesn't change nothing.
Is this something related to Yocto itself (I mean, something wrong in my syntax) or it's very specific to the SDK (meta-st) ?
The error above should be raised by this file:
root = localdata.getVar('UBOOT_EXTLINUX_ROOT')
if not root:
bb.fatal('UBOOT_EXTLINUX_ROOT not defined')
UPDATE
I checked the (huge) output of bitbake -e and among other targets I see:
# $UBOOT_EXTLINUX_ROOT [41 operations]
[...]
# "${EXTLINUX_ROOT_NOREMMC}"
# override[stm32mp157c-ev1-m4-examples-sdcard]:set /local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp/conf/machine/include/st-machine-extlinux-config-stm32mp.inc:274
# "${EXTLINUX_ROOT_SDCARD}"
# override[stm32mp157c-ev1-m4-examples-sdcard-optee]:set /local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp/conf/machine/include/st-machine-extlinux-config-stm32mp.inc:275
# "${EXTLINUX_ROOT_SDCARD_OPTEE}"
# override[stm32mp151a-sdcard]:set /local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp/conf/machine/include/st-machine-extlinux-config-stm32mp.inc:296
# "${EXTLINUX_ROOT_SDCARD}"
# override[stm32mp151a-emcc]:set /local/STM32MP15-Ecosystem-v1.1.0/Distribution-Package/openstlinux-4.19-thud-mp1-19-10-09/layers/meta-st/meta-st-stm32mp/conf/machine/include/st-machine-extlinux-config-stm32mp.inc:297
[...]
# pre-expansion value:
# ""
UBOOT_EXTLINUX_ROOT=""
# $UBOOT_EXTLINUX_ROOT_cubemx-nor-sdcard
UBOOT_EXTLINUX_ROOT_cubemx-nor-sdcard="root=/dev/mmcblk0p3"
# $UBOOT_EXTLINUX_ROOT_cubemx-sdcard
UBOOT_EXTLINUX_ROOT_cubemx-sdcard="root=/dev/mmcblk0p6"
# $UBOOT_EXTLINUX_ROOT_stm32mp151a-emcc
UBOOT_EXTLINUX_ROOT_stm32mp151a-emcc="\${EXTLINUX_ROOT_EMCC}"
# $UBOOT_EXTLINUX_ROOT_stm32mp151a-sdcard
UBOOT_EXTLINUX_ROOT_stm32mp151a-sdcard="root=/dev/mmcblk0p6"
So far, if I understand correctly, the override values are correctly assigned (but not the ${EXTLINUX_ROOT_EMCC} - I don't understand where the \ comes from) but the main variable is still empty.
Adding UBOOT_EXTLINUX_ROOT = "root=/dev/mmcblk1p4" at the beginning of the above file, seems to do the trick (even if before I wrote the opposite, perhaps I forgot to clear the cache?) but I don't think it's the right way to do it.
You should specify the wanted name of the machine as a target to build, i.e.:
MACHINE=stm32mp151a-sdcard bitbake <image>
This way, the UBOOT_EXTLINUX_ROOT gets the non-empty value "root=/dev/mmcblk0p6" (from the UBOOT_EXTLINUX_ROOT_stm32mp151a-sdcard variant of the variable).

Jump to the first file or directory that starts with a specific letter

In the VS Code Explorer, how do jump to the first file or directory that starts with a specific letter?
For example, in the node_modules directory, I want to be able to press W and jump to wcwidth in the following directory list.
.bin
abbrev
accepts
acorn
after
agent-base
align-text
amdefine
ansi-align
ansi-regex
ansi-styles
ansicolors
any-promise
anymatch
archy
argparse
arr-diff
arr-flatten
array-differ
array-find-index
array-slice
array-uniq
array-unique
arraybuffer.slice
arrify
asn1
assert-plus
async
async-done
async-each
async-each-series
async-settle
atob
aurelia-animator-css
aurelia-binding
aurelia-bootstrapper
aurelia-cli
aurelia-dependency-injection
aurelia-event-aggregator
aurelia-fetch-client
aurelia-framework
aurelia-history
aurelia-history-browser
aurelia-loader
aurelia-loader-default
aurelia-logging
aurelia-logging-console
aurelia-metadata
aurelia-pal
aurelia-pal-browser
aurelia-path
aurelia-polyfills
aurelia-route-recognizer
aurelia-router
aurelia-task-queue
aurelia-templating
aurelia-templating-binding
aurelia-templating-resources
aurelia-templating-router
aurelia-testing
aurelia-tools
aws-sign2
bach
backo2
balanced-match
base64-arraybuffer
base64id
batch
beeper
benchmark
better-assert
binary-extensions
bl
blob
bluebird
body-parser
boom
boxen
brace-expansion
braces
breeze-dag
breeze-nexttick
breeze-queue
browser-sync
browser-sync-client
browser-sync-ui
bs-recipes
builtin-modules
bytes
callsite
camelcase
camelcase-keys
capture-stack-trace
cardinal
caseless
center-align
chalk
chokidar
cli-boxes
cli-table
cli-usage
cliui
clone
clone-stats
code-point-at
colors
columnify
combined-stream
commander
component-bind
component-emitter
component-inherit
concat-map
concat-stream
configstore
connect
connect-history-api-fallback
content-type
convert-source-map
core-js
core-util-is
create-error-class
cryptiles
css
ctype
currently-unhandled
custom-event
d
dateformat
debug
decamelize
deep-extend
deep-is
default-resolution
defaults
delayed-stream
depd
destroy
detect-file
detect-indent
detect-newline
dev-ip
di
diff
dom-serialize
dot-prop
duplexer
duplexer2
duplexify
easy-extender
eazy-logger
ee-first
emitter-steward
end-of-stream
engine.io
engine.io-client
engine.io-parser
ent
error-ex
es5-ext
es6-iterator
es6-symbol
es6-weak-map
escape-html
escape-string-regexp
escodegen
esprima-fb
estraverse
esutils
etag
event-stream
eventemitter3
expand-braces
expand-brackets
expand-range
expand-tilde
express
extend
extend-shallow
extglob
fancy-log
fast-levenshtein
filename-regex
fileset
fill-range
filled-array
finalhandler
find-up
findup-sync
fined
first-chunk-stream
flagged-respawn
for-in
for-own
forever-agent
form-data
formidable
fresh
from
fs-access
fs-exists-sync
fs-extra
fs.realpath
function-bind
gaia-tsort
generate-function
generate-object-property
get-stdin
glob
glob-base
glob-parent
glob-stream
glob-watcher
global-modules
global-prefix
glogg
got
graceful-fs
graceful-readlink
growly
gulp
gulp-changed-in-place
gulp-notify
gulp-plumber
gulp-rename
gulp-sourcemaps
gulp-tslint
gulp-typescript
gulp-util
gulplog
handlebars
har-validator
has
has-ansi
has-binary
has-cors
has-flag
has-gulplog
hawk
hoek
hosted-git-info
http-errors
http-proxy
http-proxy-agent
http-signature
https-proxy-agent
iconv-lite
immutable
imurmurhash
indent-string
indexof
inflight
inherits
ini
interpret
invariant
invert-kv
is
is-absolute
is-arrayish
is-binary-path
is-buffer
is-builtin-module
is-dotfile
is-equal-shallow
is-extendable
is-extglob
is-finite
is-fullwidth-code-point
is-glob
is-my-json-valid
is-npm
is-number
is-obj
is-plain-obj
is-posix-bracket
is-primitive
is-property
is-redirect
is-relative
is-retry-allowed
is-stream
is-unc-path
is-utf8
is-valid-glob
is-windows
isarray
isbinaryfile
isexe
isobject
isstream
istanbul
jasmine-core
js-tokens
js-yaml
json-stable-stringify
json-stringify-safe
json3
jsonfile
jsonify
jsonpointer
jsrsasign
jwt-decode
karma
karma-chrome-launcher
karma-cli
karma-coverage
karma-firefox-launcher
karma-jasmine
karma-requirejs
karma-spec-reporter
karma-typescript-preprocessor
kind-of
klaw
last-run
latest-version
lazy-cache
lazy-req
lazystream
lcid
levn
liftoff
limiter
listify
load-json-file
localtunnel
lockfile
lodash
lodash.assign
lodash.assignwith
lodash.clonedeep
lodash.debounce
lodash.defaults
lodash.escape
lodash.filter
lodash.flatten
lodash.foreach
lodash.initial
lodash.isarguments
lodash.isarray
lodash.isempty
lodash.isequal
lodash.isfunction
lodash.isplainobject
lodash.isstring
lodash.keys
lodash.last
lodash.map
lodash.mapvalues
lodash.pick
lodash.reduce
lodash.restparam
lodash.sortby
lodash.template
lodash.templatesettings
lodash._arraycopy
lodash._arrayeach
lodash._baseassign
lodash._baseclone
lodash._basecopy
lodash._basefor
lodash._basetostring
lodash._basevalues
lodash._bindcallback
lodash._createassigner
lodash._getnative
lodash._isiterateecall
lodash._reescape
lodash._reevaluate
lodash._reinterpolate
lodash._root
log4js
longest
loose-envify
loud-rejection
lowercase-keys
lru-cache
make-error
make-error-cause
map-cache
map-obj
map-stream
marked
marked-terminal
matchdep
media-typer
meow
merge-stream
micromatch
mime
mime-db
mime-types
minimatch
minimist
mkdirp
ms
multipipe
mute-stdout
negotiator
next-tick
node-emoji
node-notifier
node-status-codes
node-uuid
node.extend
nopt
normalize-package-data
normalize-path
now-and-later
npm
null-check
number-is-nan
oauth-sign
object-assign
object-component
object-path
object.omit
object.pick
on-finished
once
openurl
opn
optimist
optionator
options
ordered-read-streams
os-homedir
os-locale
os-tmpdir
osenv
package-json
parse-filepath
parse-glob
parse-json
parsejson
parseqs
parseuri
parseurl
path-exists
path-is-absolute
path-root
path-root-regex
path-type
pause-stream
pify
pinkie
pinkie-promise
pkg-conf
popsicle
popsicle-proxy-agent
popsicle-retry
popsicle-status
portscanner
prelude-ls
prepend-http
preserve
pretty-hrtime
process-nextick-args
promise-finally
qs
randomatic
range-parser
raw-body
rc
read-all-stream
read-pkg
read-pkg-up
readable-stream
readdirp
rechoir
redent
redeyed
regex-cache
registry-url
repeat-element
repeat-string
repeating
replace-ext
request
require-main-filename
requirejs
requires-port
resolve
resolve-dir
resolve-url
resp-modifier
right-align
rimraf
rx
semver
semver-diff
semver-greatest-satisfied-range
semver-regex
send
serve-index
serve-static
server-destroy
set-blocking
set-immediate-shim
setprototypeof
shellwords
signal-exit
slide
sntp
socket.io
socket.io-adapter
socket.io-client
socket.io-parser
sort-keys
source-map
source-map-resolve
source-map-url
sparkles
spdx-correct
spdx-exceptions
spdx-expression-parse
spdx-license-ids
split
sprintf-js
stack-trace
statuses
stream-combiner
stream-exhaust
stream-shift
stream-throttle
string-template
string-width
stringstream
string_decoder
strip-ansi
strip-bom
strip-bom-stream
strip-indent
strip-json-comments
supports-color
symbol
text
tfunk
thenify
throat
through
through2
through2-filter
throwback
tildify
time-stamp
timed-out
to-absolute-glob
to-array
touch
tough-cookie
trim-newlines
tslint
tunnel-agent
type-check
type-is
typedarray
typescript
typings
typings-core
ua-parser-js
uglify-js
uglify-to-browserify
ultron
unc-path-regex
underscore
underscore.string
undertaker
undertaker-registry
unique-stream
unpipe
unzip-response
update-notifier
urix
url-parse-lax
user-home
useragent
utf8
util-deprecate
utils-merge
uuid
v8flags
vali-date
validate-npm-package-license
vinyl
vinyl-fs
void-elements
wcwidth
weinre
whatwg-fetch
which
widest-line
window-size
wordwrap
wrap-ansi
wrappy
wreck
write-file-atomic
ws
xdg-basedir
xmlhttprequest-ssl
xtend
y18n
yargs
yargs-parser
yeast
zip-object
This already works in the Windows File Explorer. It's called "When typing into list view, Select the typed item in the view." Does a similar feature exist in the Visual Studio Code Explorer?

gmake: a target completes but $(realpath ...) doesn't find it

Environment stuff:
Solaris NFS file servers running NFS 3
Errors occur in Linux or Solaris environments
Using GNU Make 3.82
Using Sun Studio compilers, if that matters
This is a vastly simplified example of the build I'm looking at:
all: ${list of shared objects to build}
#do whatever
lib1.so: ${1s objects}
lib2.so: ${2s objects}
lib3.so: ${3s objects}
#...
%.so:
$(call CHECK_DEPENDENCIES_EXIST)
#${LD} ${LDFLAGS} ${^} -o ${#}
%.o : %.c
#do stuff
%.o : %.cc
#do stuff
define CHECK_DEPENDENCIES_EXIST =
$(if $(realpath ${^}),,$(warning No dependencies specified for ${#})false)
endef
The short & sweet: $(realpath x y z) (x/y/z get returned if they exist; returns an absolute path including no symlinks) is removing files from the list under some circumstances, and I think it has to do with NFS. It isn't predictable which target will fail. Sometimes a target will fail when it's succeeded the last 10 times. If I take #false out of the macro, the build continues without error -- that is, the linker does not complain about the supposedly missing file(s).
I'll spare you the drawn-out explanation; suffice it to say, the macro is helpful for debugging.
Turns out there's a bug in gmake. From the GNU Make 3.82 source, function.c, on or about line 2026:
while ((path = find_next_token (&p, &len)) != 0 ) {
/* ... */
if (
#ifdef HAVE_REALPATH
realpath (in, out)
#else
abspath (in, out) && stat (out, &st) == 0
#endif
)
{
/* ... */
}
}
}
/* ... */
Ocasionally, various calls to realpath would get interrupted (EINTR); nothing in this code checks errno, so it just silently fails.
So, it wasn't that the file didn't exist, it was that $(realpath ...) was being interrupted by a signal (presumably a child instance of gmake signaling its completion or something similar) and this function wasn't designed to recover from that sort of event.
To fix the problem:
while ((path = find_next_token (&p, &len)) != 0 ) {
... becomes:
while ( errno == EINTR || (path = find_next_token (&p, &len)) != 0 ) {
The || will shortcut & prevent it from marching on to the next token.