| Commit message (Collapse) | Author | Age |
| |
|
|
| |
Fixes: 9cf37a57bf2dbe671ddcbb6e902bd2962ba47c51
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Built-in audioc support and a new theme for para_gui
----------------------------------------------------
This series contains two significant improvements for para_gui: (a) The built-in
audioc support and (b) the new figlet theme. The patch that implements (a)
splits audioc.c so that code that can be shared with para_gui goes to the
new audioc_common.c. The next few preparatory patches on top of that rig
up struct gui_theme to give each theme full control over the top window,
paving the way for (b).
* t/gui:
web: Add/replace gui screenshots.
gui: Remove the "version" command.
gui: Rename curses windows.
gui: New theme: figlet.
gui: Remove two confusing local variables of init_wins().
gui: Introduce ->print_status_items() of struct gui_theme.
gui: Require ncurses.
gui: Inline clear_all_items().
gui: Avoid the para_audioc process.
gui/audiod: Replace for_each_stat_item() by parse_status_items().
gui: Don't request a minimal delay when an external command is running.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes gui.c to no longer spawn a para_audioc process to get the status
items from para_audiod. Instead, the para_gui process connects directly to
audiod using the same mechanism as para_audioc. Besides being more efficient,
this approach has the advantage that status item updates are now atomic in
the sense that complete sideband packages (containing any number of status
items) are received, so torn status items can no longer occur.
To implement this, move the code that can be shared between gui and audioc
to a separate file, audioc_common.c. This file contains only one public
function: connect_audiod(). Since this function uses unix socket magic and
employs the sideband API, para_gui needs to link in net.o and sideband.o,
in addition to the new audioc_common.o.
With these changes in place, para_gui's --stat-command option becomes
unused. Drop it, as it's not worth the pain to introduce a depreciation
period. On the other hand, para_gui now needs an option to specify the path
to the socket on which para_audiod is expected to listen, so move the lopsub
stanza of para_audioc's --socket option to the new socket.m4 file and include
it from both the audioc and the gui lopsub suites.
|
| |\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Improved test suite
-------------------
The test suite has become a little dusty, so here are a few cleanups, one
of which re-enables unrestricted parallel builds.
* t/test-lib:
test: Change suffix of test scripts to .bash.
test: Rename makefile.test.
test: Use bash case modification.
test: Simplify color output.
test: Replace echo by printf.
test: Remove unused --immediate and --long.
test: Trivial coding style cleanups.
|
| | |
| |
| |
| |
| | |
The lopsub and the bison makefiles which are included from Makefile.real
are simply called "makefile", so let's be consistent.
|
| | |
| |
| |
| |
| |
| |
| | |
This variable used to contain additional flags to enable additional gcc
warnings on Linux, but these days the variable just accumulates options
which are then used on any OS. Avoid the misnomer by renaming the variable
to XCFLAGS, in analogy to the existing XCPPFLAGS.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Treat this variable in the same way as we handle CFLAGS: Use an internal
variable to assemble the flags, then pass both the internal variable and
$(CPPFLAGS) to the compiler, in this order.
Define the new XCPPFLAGS as a simply expanded make(1) variable, because this
should be faster.
|
| | |
| |
| |
| |
| |
| |
| | |
We have STRICT_CFLAGS (which is a misnomer, and the variable will be renamed
later in this series) to incrementally assemble the C flags, then pass
$(STRICT_CFLAGS) $(CFLAGS) to the compiler so that the user can overwrite
our choices by setting CFLAGS.
|
| |/
|
|
|
|
|
|
|
|
|
| |
This innocent looking change made a huge difference on one system with ccache
enabled, where the running time of
make clean; make -j > /dev/null
went down from 11s to 2s. The reason for this speedup are the three
$(cc-option) calls, Before, we ran the compiler three times per .c file,
just to set STRICT_CFLAGS. Now we run it three times per make invocation.
|
| |
|
|
|
|
|
|
|
|
|
| |
None of the four char arrays are C strings, and they are not supposed to be
passed to functions like strcpy() which look for the first NUL byte.
The nonstring attribute tells the compiler about this fact. Without it, gcc-16
complains, suggesting to annotate the affected variables with __attribute__
((nonstring)). Unfortunately, at least clang-19.1.7 does not know this
attribute and issues a warning, so we check at compile time whether $(CC)
supports it and define __nonstring accordingly.
|
| |
|
|
|
| |
Combine two short lines, and remove a space between the target and the colon
that separates targets from prerequisites.
|
| |
|
|
| |
This generally results in shorter build times.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider the following scenario:
git checkout old # header file is still present
make
git checkout new # header no longer exists
make
The second make invocation reads in the .d files created by the first
invocation, These .d files state that the corresponding object files depend
on a header file which no longer exists, causing the build to fail.
Instruct the build to run cc with -MP to work around this problem. Quoting
from the gcc info page:
This option instructs CPP to add a phony target for each dependency other
than the main file, causing each to depend on nothing. These dummy rules
work around errors 'make' gives if you remove header files without updating
the 'Makefile' to match.
This is typical output:
test.o: test.c test.h
test.h:
|
| |
|
|
|
|
| |
This works because only the server links with user_list.o. Since struct user
contains a list head, list.h must now be included *before* server.h, which
requires some trivial header shuffling in the .c files that include server.h.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove dccp support
The first patch of this series removes the dccp sender and receiver. Both are
deprecated as of paraslash-0.7.6, released in 2025-11. The short depreciation
period should not be a problem because dccp was never adopted widely, and
the linux kernel no longer supports the protocol.
The removal paves the way for quite some subsequent cleanups. In particular,
the acl and chunk queue APIs, which used to be shared between the http and
the dccp sender, no longer need to be public, so subsequent patches of the
series move acl.c and chunk_queue.c into http_send.c.
* refs/heads/t/rm_dccp:
http_send.c: Simplify format_url().
Move format_url() from net.c to http_send.c.
Merge acl.c into http_send.c.
Merge chunk_queue.c into http_send.c.
http_send.c: Move header_sent to struct private_http_sender_data.
http_send.c: Move chunk queue into struct private_http_sender_data.
struct sender: Remove unused sched pointer argument of ->post_monitor().
struct sender: Remove unused chunks_sent parameter of ->send().
http_send.c: Kill http_send_ok_msg() and http_send_err_msg().
http_send.c: Remove trivial shutdown wrapper.
http_send.c: Merge free_sender_status() into http_shutdown().
http_send.c: Merge init_sender_status() into http_send_init().
http_send.c: Rename or remove generic_foo().
http_send.c: Remove sender_status pointer arguments.
Move struct sender_status into http_send.c.
Move send_common.c into http_send.c.
Remove dccp.
|
| | |
| |
| |
| |
| | |
Another small file whose functions are only called from http_send.c.
This makes all acl functions static and dedoxifies them.
|
| | |
| |
| |
| |
| |
| | |
The former is only ~150 lines long and has no users outside of http_send.c. The
merge allows us to mark the chunk queue related functions static, and some
pointless doxygen comments can go away as well.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With dccp gone, almost everything of send_common.c is specific to the
http sender. The only exception is parse_fec_url(), which is called from
com_sender() of command.c and from udp_send.c. Move this function
to server.c and the rest to http_send.c. Make the latter static and
dedoxify them.
The generic_ function prefix indicates that the function works for both the
http and the dccp transport. With dccp gone, this has become meaningless. We
keep the prefix, though, to keep the patch small.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This removes all traces of dccp, specifically dccp_recv.c and dccp_send.c.
The flowops related functions of net.c can go away as well, as flowops were
only needed for the dccp transport. A few other functions are simplified by
dropping the flowops or protocol parameter.
Further cleanups are possible, but are deferred to subsequent commits. In
particular, some functions of send_common.c are only called by the http
transport now. These can be moved to http_send.c and then be made static.
|
| | |
| |
| |
| |
| |
| | |
With the resample filter gone, para_write is the only remaining user of the
check_wav API. Make the check_wav code local, make all functions static,
and dedoxify the documentation.
|
| |/
|
|
|
|
|
|
| |
The resample filter did not turn out to be very useful in the 10+ years of
its existence, so remove it. This filter was the penultimate user of the
check_wav API, so the removal clears the way for further cleanups.
No changes to audiod.c, filter.c play.c are necessary.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Various small audio{c,d} related improvements and preparatory patches. The
main patch towards the end of the series implements the backwards compatible
v2 protocol for the local connection between para_audioc and para_audiod. The
v2 code calls the existing functions of sideband.c to tag output packets
with a band designator, which enables para_audioc to improve its error
diagnostics. The last commit of the series deprecates the grab audiod command
because it adds quite a bit complexity for little gain.
* refs/heads/t/audioc_sideband:
Fix the audioc sideband fix.
audioc sideband: Fix early error handling.
Deprecate the audiod grab subcommand.
Employ sideband API for audioc-audiod connections.
Use iovecs for unix socket credentials.
Make send_cred_buffer() and recv_cred_buffer() local.
Remove E_RECVMSG and E_SENDMSG.
audioc: Return early from audioc_i9e_line_handler() on empty strings.
Remove para_strcat().
audioc: Centralize argument concatenation for connect_audiod().
audioc.c: Simplify connect_audiod().
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, para_audioc writes the data it received over the local socket from
audiod to stdout. This include error messages, if any. Also, para_audioc
does not know whether the subcommand passed to para_audiod was successful,
and exits successfully even if the subcommand failed.
Thanks to the sideband API, para_client is much smarter in this regard. This
patch employs the existing API also for the connection between para_audioc and
para_audiod. Besides comment updates and the new sideband_log() helper, no
changes to the sideband API are necessary. The client code stays unmodified
as well. The new helper has three callers, two in audioc.c and one in
client_common.c.
Remove a pointless NULL check and a debug log message from dispatch_sbb()
of client_common.c while at it. The message was useful for testing but is
no longer needed.
The new code is backwards compatible, i.e., an old para_audioc can still
communicate with a new para_audiod and vice versa. Thus, we have to maintain
two "protocols" for the audioc-audiod communication, named v1 and v2 in the
code and in what follows.
For example, if audioc or audiod are unpatched (so that v1 is in use), then
./para_audioc aaa > /dev/null
prints nothing because with v1 the error message goes to stdout, and the
command exits successfully (exit code 0). If both sides support v2, the same
command prints
audiod: errctx: aaa
audiod: invalid subcommand
main: audiod dispatch error
to stderr, then exits unsuccessfully (exit code 1).
Only the server reply is sideband-encoded. The way how command line arguments
are passed from audioc to audiod is also changed, though. Instead of
terminating the arguments with newlines, a v2 audioc prepends an additional
\0 byte to the argument list, and terminates each argument with \0 in the
same way the --print0 directive of GNU find(1) does.
An v1 audiod interprets the leading NUL as an empty command line and closes
the connection without sending any data. This can never happen with a v2
audiod because that always sends an empty sideband package to indicate
success/failure. So the v2 code of audioc.c retries with v1 in this case.
Conversely, a v1 client never sends an empty string, so a leading \0 identifies
a v2 client. Thus, the patched audiod only needs to check the first byte of
the received buffer to select the right "protocol" version.
The stat and grab subcommands need special treatment because these may stay
active after the command handler returns. Thus, the command handler must not
send an EXIT_SUCCESS sideband packet in this case. Moreover, the protocol
version needs to be communicated with the status/grab client tasks. This is
done by adding a flag to the existing flags bitmask of struct stat_client
and struct grab_client.
After v0.8.0 has been released, the compatibility code can be dropped.
|
| |/
|
|
|
|
|
|
| |
Two of the four functions exposed in close_on_fork.h are only called from
server.c, the other two from the senders. The former two can now be made
static. Since both were implemented as one-line wrappers of the static
deplete_cof_list(), we keep only that, remove the wrappers and adjust the
two callers.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Nobody except bots download tarballs these days, and the tarballs bloat the
generated www directory considerably. The single commit of this series gets
rid of www/releases/ and all references to it, reducing the www directory
size from 39M to 6M,
* refs/heads/t/no-more-tarballs:
No longer provide tarballs.
|
| | |
| |
| |
| |
| |
| | |
Nobody needs tarballs in 2025, so remove the documentation and all links
which refer to files in the releases directory. The tarball make(1) target
can go away as well.
|
| |/
|
|
|
| |
Both public functions of base64.c, uudecode() and base64_decode(), are only
called from crypt_common.c. Now they can be made static.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The series first drops the para_upgrade_db executable because it is no longer
needed. This removes the penultimate user of the sha1 infrastructure. The
remaining commits deal with the last user: the handshake between para_client
and para_server. Since paraslash-0.7.0, client and server employ sha256
by default, but fall back to sha1 in order to stay compatible to old 0.6.x
versions. After this series, server and client always employ sha256 as the
hash algorithm, breaking compatibility with 0.6.x clients. As a result,
the sha1 hash algorithm is no longer used anywhere, so the corresponding
infrastructure is no longer needed. This gets rid of a fair amount of code.
* refs/heads/t/rm_sha1:
Rename hash2 -> hash.
Remove sha1.
Remove para_upgrade_db.
aft: Compare the full hash, not just the first 20 bytes.
|
| | |
| |
| |
| |
| | |
It is no longer needed since everybody should have upgraded by now, and it
blocks the road towards the removal of sha1.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the library is not installed we currently build the audio format handler
anyway, but only support id3v1 tags and do not implement ->rewrite_tags()
to modify the id3 tags.
Since id3v1 tags are rather limited and long superseded by id3v2, let's
drop the code from mp3_afh.c which is only compiled in if libid3tag is not
installed, and disable server side mp3 support instead in this case. This
requires a few additions to the build system to make the audio format handler
optional, but thanks to the removals in mp3_afh.c, this still results in a
negative diffstat. Removed code is debugged code, after all.
The manual and the test suite need small adjustments as well.
|
| |
|
|
| |
It is implied by -Wextra, which is the same as -W, but more descriptive.
|
| |
|
|
|
|
| |
$(RM) implies -f, but not -r.
Fixes: 35a7569b2a7c66e40246aeaa135224f469584209
|
| |
|
|
| |
This dependency is also covered by the CC_PREREQUISITES variable.
|
| |
|
|
|
|
| |
Instruct make(1) to never remove any intermediate files by defining
.SECONDARY. This way we don't need to maintain the list of precious
targets.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a "fresh build" (e.g. after a make clean) we create the .d and the
.o file in one go to speed up this common case. However, if one runs
"make clean" followed by e.g. "make para_audioc", this will create
*all* object and dependency files, not just the ones needed to build
para_audioc. This behaviour is unfortunate because most dependencies
are irrelevant for a single target, and even the few which do matter
are ignored as well in this case because the object file does not
exist and needs to be recreated anyway,
Work around this shortcoming by shuffling the commands of the four
rules a little so that the clean target only removes object files
but keeps the dependency files.
Also remove the calls to SAY in the recipe of the clean targets because
with the rm commands spelled out it is clear what is being removed.
|
| |
|
|
|
|
|
|
|
| |
They only clutter the Makefile for no good reason. Just create all
build directories beforehand when running ./version-gen.sh.
One order-only dependency remains: We want to invoke the compiler
only after all generated .h files have been created. Otherwise the
.d files may be created incorrectly.
|
| |
|
|
|
|
|
|
|
| |
The new #define in oggdec_filter.c gets rid of the warnings such as
'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used [-Wunused-variable]
on NetBSD. With the patch applied, the code still compiles without
warnings. Tested on Linux, FreeBSD and NetBSD.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This rewrites GIT-VERSION-GEN and renames it to version-gen.sh. The
main difference is that the script now generates version.c rather
than version.h, speeding up the build because switching branches
or transitioning from a clean to a dirty work-tree (or vice versa)
changes the version string. Before the patch, all files which included
version.h were recompiled. With the patch applied, only the short
version.c needs to be recompiled.
The generated version,c defines one function which returns the
single-line version string and a second function which returns
the multi-line version information (author, copyright, git URL
etc). This information is now passed to version-gen.sh via environment
variables. The CPP macros we had before are removed.
|
| |
|
|
|
|
|
|
|
| |
This is a preparatory patch for the upcoming revamp of the git
version script. The revamped script generates version.c, a file
which is currently tracked by git. We can easily get rid of it (and
of version.h) since all paraslash executables link in both string.o
and version.o. So let's move the three small functions of version.c
to string.c and their declarations from version.h to string.h.
|
| |
|
|
|
|
|
|
|
|
| |
When executing para_client or para_audioc from para_mixer or para_gui
we currently pass an absolute path whose directory part is BINDIR
to execvp(2). This is unnecessary because execvp(2) honors $PATH.
This commit modifies gui.c and mixer.c to pass only the basename of
the executable instead, allowing us to remove the BINDIR preprocessor
define. We still need the bindir make variable, though, because it
is referenced in the recipe of the two install targets.
|
| |
|
|
| |
Happy new year!
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The series starts with a few cleanups and crypto-backend tweaks to
beat the openssl specific code into shape for the main objective:
the switch of the RSA encryption and decryption routines to the
high-level EVP API. This has become necessary because the old RSA
API functions have been deprecated in openssl-3.
This merge conflicted against commit a18458cff51c (No longer check
for CRYPTO_cleanup_all_ex_data()). The resolution is to remove the
checks which that commit removed and to add the checks which commit
0485079436ad (openssl: Use the EVP library for RSA public encryption)
of this series introduced.
Cooking for four months.
* refs/heads/t/openssl-3:
openssl: Reactivate openssl warnings.
openssl: Use the EVP library for RSA private decryption.
openssl: Use the EVP library for RSA public encryption.
apc_priv_decrypt: Let the callee allocate the buffer.
apc_pub_encrypt: Let the callee allocate the buffer.
openssl: Assume that openssl allocation functions functions succeed.
openssl: Introduce openssl_perror().
openssl: Don't pass pointers to RSA structures around.
openssl: Kill rsa coefficient computations.
client: Check buffer size returned by apc_priv_decrypt().
|
| | |
| |
| |
| |
| |
| |
| | |
Now that we use the EVP API for RSA if openssl-3 was detected, the
openssl code no longer calls deprecated functions, so turn back on
the warnings for uses of openssl library functions which are marked
as deprecated.
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This small series contains a few minor tweaks for para_play. The most
obvious change is that para_play is no longer built on systems which
lack libreadline.
The merge conflicted badly in configure.ac due to the changes
introduced by the earlier merge of the "built" topic branch. The
resolution needs to modify the non-conflicting Makefile.real to exclude
para_play from the list of executables if libreadline is not present
while the corresponding commit of the "play" topic branch implemented
the logic in configure.ac.
Cooking for a month.
* refs/heads/t/play:
play: Shut down alsa on input EOF.
play: Simplify and improve get_key_map_seq().
play: Remove pointless goto in play_post_monitor().
Return from filter_setup() so callers can reset the terminal.
Let para_play depend on libreadline.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The old name is misleading since there are additional objects which
correspond to the C files generated by lopsub. Those use different
dependency tracking.
Simplify the code a bit by creating the list in one step.
|
| | |
| |
| |
| |
| |
| |
| | |
This is actually easier and removes some duplication as we currently
have two copies of the logic which decides whether or not to build
each executable. We lose the summary output at the end of the configure
output, but that was incomplete anyway.
|
| | |
| |
| |
| |
| | |
This removes the last caller of add_dot_o() in configure.ac, so remove
this function.
|
| | | |
|
| | | |
|
| | | |
|