Age | Commit message (Collapse) | Author | Files |
|
|
|
* doc/pies.texi: Describe the use of xenv as a preprocessor.
|
|
This restores the fix introduced by commit 5f2769a0 and inadvertently
removed in 0b425c88.
* src/pies.c (init_detect): Set up SIGCHLD no if pid is 1, no matter
what the value of PIES_SYSVINIT_ENABLED.
|
|
|
|
|
|
The installation directory for pp-setup can be set at configure time
using the --with-pp-setup option. To disable installing it, use
--without-pp-setup.
* NEWS: Raise patchlevel.
* configure.ac (DEFAULT_INCLUDE_PATH): New variable.
(PIES_INCDIR): New substitution variable.
New option --with-pp-setup.
* grecs: Pull 7427077b98.
* src/Makefile.am (DEFAULT_VERSION_INCLUDE_DIR)
(DEFAULT_INCLUDE_DIR): Replace by DEFAULT_INCLUDE_PATH.
Install pp-setup conditionally.
* src/cmdline.opt (pies_help_hook): Print include path.
Fix arguments to grecs_find_include_file.
* src/pies.c (config_init): Use DEFAULT_INCLUDE_PATH to
initialize include path.
* src/piesctl.c: Likewise.
|
|
* src/pies.c (init_detect): Set init_process to 0 if PIES_SYSVINIT_ENABLED
is 0
|
|
|
|
* lib/envop.c (environ_free): Free the env block itself.
(envop_cmp): New function.
* lib/envop.h (envop_cmp): New proto.
* src/comp.c (argvcmp): Fix segmentation fault that occurred when
both a and b were NULL.
(component_match): Compare command, envop, and umask.
|
|
|
|
This is mainly to avoid failures on stale pidfiles when ruinning with
PID 1 (init or docker entrypoint) and also for less-probable cases when
starting with the same PID as the one stored in the stale pidfile.
|
|
|
|
* src/pies.c (is_docker): Fix parsing of the /proc/self/cgroup file.
|
|
* NEWS: Document changes.
* doc/pies.texi: Document changes.
* src/cmdline.opt: Don't set preprocessor if DEFAULT_PREPROCESSOR
is NULL.
* src/piesctl-cl.opt: New options: --preprocessor,
--no-preprocessor.
* src/piesctl.c (parse_config): If either client.url or
default_url is set in the program-specific config, use it
and don't parse pies.conf. This is consistent with the
documented behavior.
(main): Initialize grecs_preprocessor.
|
|
* configure.ac: Report selected preprocessor.
Version 1.5.90.
* doc/Makefile.am: Don't distribute gendocs.pl and gendocs_template
* grecs: Upgrade.
* lib/pp.c (pp_command_line): Use the grecs_preprocessor variable
instead of DEFAULT_PREPROCESSOR macro.
* src/cmdline.opt: New options: --preprocessor and --no-preprocessor.
Report the preprocessor command and setup file when called with --help.
* src/pies.c (config_init): Initialize grecs_preprocessor.
* NEWS: Document changes.
* doc/pies.texi: Document new options.
* tests/accept.at: Invoke pies with --no-preprocessor.
* tests/builtin.at: Likewise.
* tests/control.at: Likewise.
* tests/cyclic.at: Likewise.
* tests/env.at: Likewise.
* tests/envglobal.at: Likewise.
* tests/expandenv.at: Likewise.
* tests/inet.at: Likewise.
* tests/maxinst.at: Likewise.
* tests/passfd.at: Likewise.
* tests/redirect.at: Likewise.
* tests/respawn.at: Likewise.
* tests/ret-exec.at: Likewise.
* tests/ret-notify.at: Likewise.
* tests/shell.at: Likewise.
* tests/shutdown.at: Likewise.
* tests/startup.at: Likewise.
|
|
|
|
|
|
|
|
|
|
* src/syslog.c (log_message): New field: trunc.
(log_message_in_create): Initialize trunc
(log_message_in_format): Raise trunc on buffer overflow.
(log_message_enqueue): Emit the "message truncated" diagnostics
when needed.
|
|
* src/progman.c (redirect_read): Break the loop if no newline is found.
|
|
|
|
* NEWS: Update.
* doc/pies.texi: Document the global env statement.
* src/pies.c: Modify "env" callbacks to expect a envop_t **
as modifiable target.
Introduce global env statement.
* tests/envglobal.at: New test.
* tests/Makefile.am: Add new file.
|
|
* NEWS: Change wording a bit.
* src/progman.c (redirect_to_file): Close and deregister the
descriptor on error and EOF.
* src/syslog.c (pies_log_tag): Rename to log_tag.
(reopen_logger): Use PIES_LOG_DEV if log_dev is NULL.
(pies_syslog_set_dev): Free previously allocated log_tag (if any).
|
|
* src/syslog.c (pies_syslog_set_dev): Fix the return value.
|
|
1.4.96
* lib/closefds.c [HAVE_FUNC_PROC_PIDINFO] (close_fds_sys): Fix
algorithm.
* src/pies.c (cb_syslog_dev): New callback. Handle "dev" using it.
(main): Don't close fd 2 before restarting.
* src/pies_syslog.h (pies_syslog_set_dev): New proto.
* src/progman.c (prog_start,run_command): Don't close necessary fds.
* src/syslog.c (pies_log_dev): Mark as static.
(pies_syslog_set_dev): New function.
|
|
* NEWS: Version 1.4.95
* configure.ac: Likewise.
* doc/ctl.texi: Fix formatting of JSON selectors. @deffn is
unable to handle them properly.
* doc/pies.texi: Minor changes.
* src/progman.c (open_redirector): Minor change to avoid
spurious varning.
* src/syslog.c: Assume conservative value instead of unportable
HOST_NAME_MAX.
|
|
|
|
* doc/Makefile.am: Add ctl.texi
* doc/ctl.texi: New file.
* doc/pies.texi: Add anchors for ctl.texi
* src/ctl.c (json_error_reply_create): Set status depending on
the HTTP response code.
Use "message", instead of "error_message".
New endpoint: /alive
* src/inetd.c: Use grecs_getline instead of getline.
* src/sysvinit.c: Likewise.
* src/piesctl.c: Inspect "message", instead of "error_message".
|
|
* NEWS: Update.
* doc/pies.texi: Update.
* src/pies.h (component): Remove the facility field.
* src/comp.c: Likewise.
* configure.ac: Select interface to use to close fds (imported from
mailutils).
* lib/closefds.c: New file (imported from mailutils).
* lib/Makefile.am: Add closefds.c
* lib/libpies.h (pies_close_fds): New proto.
* src/pies.c: Use pies_close_fds
* src/progman.c: Likewise.
|
|
* src/pies.c (string_to_syslog_facility): Take additional length argument.
(string_to_syslog_fp): New function.
(_cb_redir): Accept full facility.priority specification.
* src/piesctl.c: Remove legacy redirector support.
|
|
Instead of spawning a subprocess for each redirection, read the
output directly from pipe and send it to syslog using an asynchronous
syslog implementation.
* src/syslog.c: New file.
* src/pies_syslog.h: New file.
* src/Makefile.am: Add syslog.c and pies_syslog.h
* src/comp.c (component_create): Use pies_log_facility.
* src/ctl.c (auth_prog)
(prog_serialize): Remove TYPE_REDIRECTOR case
* src/diag.c (syslog_printer): Use pies_vsyslog.
(syslog_open): Use pies_syslog_open.
(syslog_close): Use pies_syslog_close.
(diag_setup): Use pies_syslog_open.
* src/pies.c (log_facility, log_tag): Remove globals. Use
pies_log_facility and pies_log_tag instead.
New configuration statement syslog.dev
* src/pies.h: Include pies_syslog.h
(register_socket,register_program_socket): Additional argument: free_data.
* src/prog.h (TYPE_REDIRECTOR): Remove.
(prog.v.p.redir): Change data type.
(prog.v.r): Remove.
* src/progman.c (prog_tag)
(destroy_prog)
(progman_cleanup): Remove TYPE_REDIRECTOR case
(prog_stop_redirectors): Deregister fds
(redir_tag,register_redir)
(update_redir): Remove.
(open_redirector): Rewrite. Set up direct reader from the stream,
instead of spawning a subprocess.
(prog_start): Change open_redirector actual arguments.
* src/socket.c (sockinst): New member: free_data.
(register_socket): Initialize the free_data member.
(register_program_socket): Likewise.
|
|
|
|
* src/progman.c (prog_start_prologue): Split into two functions:
prog_init, invoked before fork, and prog_start_prologue proper,
invoked after fork. prog_init initializes the environment, argc,
and argv associated with prog.
(progman_run_comp): Call prog_init before calling prog_start_prologue
(the function is called from child process).
(prog_start): Run prog_init before forking.
|
|
|
|
|
|
* doc/pies.texi: Improve documentation of variable expansion
and the use of pies in docker entry points.
* src/pies.h (vlogmsg): New proto.
* src/progman.c (prog_start_prologue): Set ws_error member to
ensure errors from ${X:?WORD} construct are properly reported.
|
|
|
|
* NEWS: Update.
* doc/pies.texi: Document the expandenv flag.
* src/comp.c (component_finish): Warn if both "shell" and "expandenv"
are used together.
Expand command to argc/argv only unless the CF_EXPANDENV flag is given.
* src/pies.c (str_to_cf): New flag: expandenv
* src/pies.h (CF_EXPANDENV): New define.
* src/prog.h (struct prog): New member: argv.
* src/progman.c (destroy_prog): Free argv.
(prog_start_prologue): Expand the command line taking into account
the current environment if CF_EXPANDENV flag is given. Otherwise,
copy the component argv to the prog.
(prog_execute): Use prog->v.p.argv
* tests/Makefile.am: Add expandenv.at
* tests/testsuite.at: Likewise.
* tests/expandenv.at: New file.
|
|
Use modified Floyd-Warshall algorithm for cyclic dependecy detection.
The computed next vertex indices are used when reporting the cycles
found.
This fixes dead loops that occurred in earlier versions when trying to
report cycles. One of inputs that caused such behavior is used as a
new test in cyclic.at.
* src/depmap.c: Rewrite using modified Floyd-Warshall algorithm.
(depmap_cycle_detect,depmap_path_free): New functions.
* src/comp.c (report_cyclic_dependency): Take struct depmap_path *
as argument.
(component_build_depmap): Use depmap_cycle_detect to detect cyclic
dependencies.
(depmap_dump): Special handling for zero-sized depmap.
* tests/cyclic.at: Add new test.
* src/pies.h (depmap_dim, depmap_free)
(depmap_cycle_detect,depmap_path_free): New protos.
* NEWS: Document changes.
|
|
|
|
* lib/envop.c: Include sys/types.h (for ssize_t).
* src/pies.c (is_docker,no_init_option,init_detect): New functions.
(main): Call init_detect.
* src/utmp.c: Additional cpp magic to determine WTMPX_FILE and UTMPX_FILE.
* NEWS: Document the changes.
* doc/pies.texi: Likewise. Also, fix improper node name (inetd.conf).
* configure.ac: Version 1.4.91
|
|
* NEWS: Version 1.4.90
* configure.ac: Version 1.4.90
* src/pies.c (main): When running with PID 1, install a minimal
SIGCHLD handler before parsing configuration files.
|
|
* tests/builtin.at (IT_SPECIAL): Force TZ=0 to avoid false
failures due to DST.
|
|
|
|
|
|
|
|
|
|
|
|
* configure.ac: Minor changes
* lib/libpies.h: Add missing include.
* src/Makefile.am (pies_LDADD piesctl_LDADD): Add libintl libs
* src/progman.c: Remove useless code.
* tests/accept.at: Use canonical ordering of options and arguments.
* tests/builtin.at: Likewise.
* tests/inet.at: Likewise.
* tests/maxinst.at: Likewise.
* tests/passfd.at: Likewise.
* tests/version.at: Don't expect GNU sed
|