* Add flake8 configuration
.flake8:
Add flake8 configuration that limits the line length to 120 chars and
outputs to flake8.txt
* Add flake8.txt to gitignore
.gitignore:
Add flake8.txt (flake8 output file) to ignore.
* Syntax fixes and cleanup for top-level wscript
wscript:
Fix syntax of wscript according to pep8 (but do not break long lines).
Remove unused imports and move all module level imports to the top of
the file.
Fix broken build target of IIO driver (source argument to
`create_driver_obj()` supplied an uninitialized variable).
Break lines at 120 chars.
* Fix common/wscript syntax
common/wscript:
Fix syntax problems, unneeded imports and break lines at 120 chars.
* Fix compat/alloca/wscript syntax
compat/alloca/wscript:
Fix compat/alloca/wscript syntax
* Fix compat/wscript syntax
compat/wscript:
Fix compat/wscript syntax
* Fix dbus/wscript syntax
dbus/wscript:
Fix syntax and break lintes at 120 chars.
* Fix example-clients/wscript syntax
example-clients/wscript:
Fix syntax and remove commented code.
* Fix tests/wscript syntax
tests/wscript:
Fix syntax and commented code.
* Fix tools/wscript syntax
tools/wscript:
Fix tools/wscript syntax.
* Add github workflow for linting wscripts
.github/workflows/lint.yml:
Add github workflow for linting wscripts using findutils and flake8.
* Fix project version extraction in CI
.github/workflows/build.yml:
Adapt the project version extraction in CI to the syntax changes in
the top-level wscript.
* macOS: Pass JackMachSemaphore send right via mach_msg IPC
Previously, JackMachSemaphore would communicate the send right for the
semaphore object from the server to a client via a named service
registered via `bootstrap_register`. However, to do this, it would
register the semaphore's port as the service port directly.
In theory this ought to be fine, however in practice, macOS `launchd`,
which provides the `bootstrap_register` interface, does not correctly
detect when such a port becomes dead, and incorrectly believes that the
service that it provides is forever alive, even past the end of the
`jackd` process' (and therefore the semaphore's) existence. This seems
to be *specific* to semaphore ports, as `launchd` is expecting a
standard IPC port, owned by the task, not the kernel. This prevents
`jackd` from later registering another service with the same name, as
`launchd` rejects the registration as conflicting with an active service.
To get around this, `jackd` previously added a counter to the end of the
named service registrations, allowing old services to remain in the
system until the end of the session. To prevent things getting out of
hand, this was capped at 98 service registrations for a given semaphore
name. This led to #784, in which running a client for the 99th time
resulted in the semaphore creation failing and the client failing to
connect.
As `launchd` outlives multiple runs of `jackd`, this situation persisted
across restarts of `jackd`, requiring a restart of the user's session
(i.e. a reboot) to fix.
An initial attempt at fixing this (see #785) tried passing the port
rights directly via shared memory, however mach is too clever for us and
foils that plan by having port names be looked up in a per-task table
(sensible when you think about it).
In this commit, we use mach IPC messages to transfer the send right for
the semaphore from the server to the client. By registering a standard
IPC port with the bootstrap server, the service registrations are
correctly torn down when the ports are destroyed.
It works something like this:
* Server creates IPC port and registers it globally via `bootstrap_register`
* Server listens on IPC port for messages
* Client looks up IPC port via `bootstrap_look_up`
* Client sends it a message
* Server replies with a message containing a send right to the
semaphore's port
* Client is then free to use the semaphore port as before.
This resolves#784.
* Improve error handling
* Add myself to Authors
* Add guide for compiling on MinGW using waf
* Update wscripts and guide for MinGW
* Fix README_MINGW typos
* Add instructions for ASIO support
* Update jackd example
* Patch for metadata support on Windows
* Update VS project for building JackRouter
* JackRouter/VS: add int redefinition fix to all build configurations
* VS: ignore Visual Studio build files and user settings
* Revise and extend README_MINGW
* Fix typos in README_MINGW
* Update MinGW build guide
* Replace MAX_PATH with PATH_MAX (win32)
* Include limits.h in JackMetadata.h
Co-authored-by: Schrödinger's Cat <6382400+Schroedingers-Cat@users.noreply.github.com>
* Fix generation of client uuid
Signed-off-by: falkTX <falktx@falktx.com>
* Remove all client properties when removed; Cleanup a few things
Signed-off-by: falkTX <falktx@falktx.com>
* Make all uuid function arguments use jack_uuid_t type; Fix warnings
Signed-off-by: falkTX <falktx@falktx.com>
* Rework uuids to never be int, more cleanup
Signed-off-by: falkTX <falktx@falktx.com>
* [metadata] Metadata properties implementation.
* [metadata] Fixed for shared server metadata-base accessor; alsofixed coding/naming style.
* [metadata] Fixed a tab for space.
* [metadata] Use of Berkeley DB is now truly optional on configure time.
* [metadata] Fixed tabs for spaces, again.
* [metadata] Fixed for shared metadata-base initialization and external clients.
* [metadata] Blind-fix for windows codebase.
* [metadata] Metadata API moved into client-side library only.
* [metadata] Fixed jack_port_uuid() stubbiness, now returning a proper UUID from port index.
* [metadata] Uniform method names.
* [metadata] Fixed PropertyChangeNotify through server async call.
The jack_group2gid() function does a thread-safe lookup of a unix gid from a
unix group name.
The jack_promiscuous_perms() function adjusts the permissions of a shared
resource (socket, semaphore, shm segment, ...) referenced by a fd and/or a
path so it can be used by any member of the provided unix group.
By using those functions it will be possible to enable a secure promiscuous
mode. 'Secure' meaning here that one is not forced to launch every clients
with a (way) too permissive 0000 umask.
This wrapper driver has the same usage as its parent JackWaitThreadedDriver,
but for non-threaded (callback) drivers. After waiting for Initialize to
return, its main thread simply ends instead of calling the driver's Process
method in a loop. The decorated driver, which must extends JackRestarerDriver
instead of JackWaiterDriver, can restart the wait cycle by calling its
RestartWait method.
In-server components are called netmanager.so, inprocess.so and so on,
not libnetmanager.so.
The waf syntax for this purpose has been changed between waf-1.5 and
waf-1.6.