Age | Commit message (Collapse) | Author | Files |
|
|
|
* NEWS: Document changes.
* doc/pies.texi: Document changes.
* src/cmdline.opt: New option --list-shutdown-sequence
* src/comp.c (compute_shutdown_sequence)
(component_shutdown_list,components_list_shutdown_sequence)
(components_shutdown_sequence_numbers): New functions.
(component_config_commit): Compute shutdown sequences for
each component.
* src/pies.c: Handle the --list-shutdown-sequence option.
* src/pies.h (component) <shutdown_seqno>: New field.
(components_list_shutdown_sequence)
(components_shutdown_sequence_numbers): New prototypes.
* src/progman.c (progman_gc): Rewrite.
(progman_stop): Rewrite.
* tests/shdnseq.at: New test.
* tests/sigwait.c: Take options -n and -f FILE.
Open file in append mode. Lock it before writing.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Include new test.
|
|
* grecs: Upgrade to 03044f768f.
* lib/pp.c (pp_add_option): Don't insert grecs_preprocessor
at the begiinig yet.
(pp_command_line): Insert grecs_preprocessor at the beginning of
the resulting string. This way the --preprocessor option is
honored even if it appears after any -I or -D options in the
command line.
* src/cmdline.opt (pies_help_hook): Remove unused variable.
* configure.ac: Version 1.7.90.
* NEWS: Update.
* src/progman.c (prog_start): Minor unrelated fix
|
|
|
|
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.
|
|
* 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.
|
|
|
|
|
|
|
|
* configure.ac: New option --enable-sysvinit. Disable the init
code if RUN_LVL is not available.
(PIES_SYSVINIT_ENABLED): New configuration define.
(PIES_COND_SYSVINIT): New condition
Print configuration settings summary.
* src/pies.h (is_sysvinit): Check for PIES_SYSVINIT_ENABLED.
(SYSVINIT_ACTIVE): New macro.
* grecs: Upgrade.
* src/Makefile.am: Conditionally link sysvinit-related code.
* src/cmdline.opt: Disable the --telinit option if sysvinit support
is not available.
(parse_options): Use SYSVINIT_ACTIVE in the conditional.
* src/comp.c (component_verify): Check if component definition is
allowed by the current state of the sysvinit support.
* src/ctl.c: Disable the /runlevel entry point if sysvinit support
is not compiled.
* src/diag.c (stderr_open): Make sure sysvinit-related code is not
compiled if the sysvinit support is not available.
* src/pies.c (config_syntax_tab): Add entry for CONF_INITTAB only if
sysvinit support is available.
(_cb_initdefault,_cb_runlevels): Remove. Use cb_initdefault and cb_runlevels
instead.
(component_keywords): Disable runlevels without sysvinit support.
(pies_keywords): Same for initdefault.
Use SYSVINIT_ACTIVE to suppress compilation of sysvinit code without
sysvinit support.
* src/progman.c: Use SYSVINIT_ACTIVE to suppress compilation of
sysvinit code without sysvinit support.
* src/sysvinit.c (cb_initdefault,cb_runlevels): New functions.
|
|
|
|
|
|
This is useful if pies is run as a entrypoint process in a
docker container.
|
|
|
|
pies -T is now fully compatible with the legacy telinit command
* src/telinit.opt: New file.
* src/Makefile.am: Add telinit.opt
* src/cmdline.opt (-T): Remove explicit variable. Rest of
command line is processed specially.
* src/pies.h (telinit): Change prototype.
* src/sysvinit.c (telinit): Rewrite.
* src/.gitignore: Update.
* doc/pies.texi: Document telinit.
|
|
* src/cmdline.opt (parse_options): Change signature.
Handle sysvinit case.
* src/pies.c (set_conf_file_names): Handle sysvinit case.
(main): Move some parts of sysvinit-specific initialization
to set_conf_file_names.
|
|
Implement clean configuration reload on SIGHUP.
Use SIGUSR1 to restart the program (previously initiated by SIGHUP).
* src/Makefile.am (pies_SOURCES): Add comp.c
* src/comp.c: New file.
* src/acl.c (pies_acl_free): Don't coredump on NULL arg.
(_parse_from): Set cmp function for the sockaddr list.
(_acl_common_section_parser): Set cmp function for the ACL
(pies_acl_cmp): New function.
* src/acl.h (pies_acl_cmp): New proto.
* src/cmdline.opt: Remove option --dump-prereq. Add options
--trace-prereq and --trace-depend.
* src/ctl.c: Use prog_tag to access tag of struct prog.
* src/depmap.c (depmap_clear)
(depmap_clear_all): New functions.
* src/inetd.c (inetd_conf_file): Don't register prog right
away. This is done later in component_config_commit.
(inetd_parse_conf): Rename to inetd_config_parse.
* src/limits.c (limits_cmp): New function.
* src/pies.c (config_file): Replace with struct config_syntax.
(str_to_config_syntax): Return a pointer to struct config_syntax.
(add_config): Rename to config_file_add.
(config_file_add_type): New function.
(return_code_keywords, create_action): Change handling of actions.
(return_code_section_parser): Likewise.
(component_verify, component_create)
(component_free, component_finish): Move to comp.c
(config_parse): Remove.
(pies_config_parse): New function.
(pies_read_config,pies_reload): New function.
(pies_reload): Rename to request_reload.
(pies_status): Rename to request_status.
(pies_stop): Rename to request_stop.
(main): Change configuration file handling.
SIGHUP reloads configuration, instead of restarting the program.
(default_sigv,sig_handler): Handle SIGUSR1.
* src/pies.h (component): New members: prev, next, listidx, arridx,
ref_count, prog.
Remove act_head, act_tail, act_temp.
Add new prototypes.
* src/prog.h (prog): Remove tag and prereq.
* src/progman.c (prog_tag): New function.
(destroy_prog): Update component reference count.
(register_redir): Likewise.
(register_prog0): Take one argument.
Update component reference count.
(register_prog): Update comp->prog
(prog_rebuild_prerequisites): Remove.
(component_fixup_depend): Remove.
(fixup_prerequisites,rebuild_prerequisites)
(print_dep,progman_dump_prereq)
(progman_dump_depmap,progman_build_depmap): Remove.
(prog_start_prerequisites): Scan depmap to find prerequisites.
(prog_stop_dependents): Likewise.
(progman_wait): Remove.
(progman_wait_until): New function.
(progman_stop): Rewrite using progman_wait_until.
(react): Rewrite using grecs_list
* src/sysvinit.c: Use prog_tag when needed.
* src/userprivs.c (pies_privs_cmp, pies_privs_free): New functions.
* grecs: Update.
* lib/safe_strcmp.c: New file.
* lib/Makefile.am: Add safe_strcmp.c
* lib/libpies.h (safe_strcmp): New proto.
|
|
|
|
Old control options (--status, --restart-components) rewritten using
piesctl.
SIGUSR1 and SIGUSR2 no longer handled.
* lib/arraymember.c (array_index): New function.
* lib/libpies.h: Likewise.
* src/cmdline.opt: Fix copyright years.
* src/piesctl-cl.opt: Likewise.
* src/ctl.c (ctlio_do_command): Implement restart.
(pies_control_url): New function.
(eval_env): rename json to result.
New member cond.
Restore pcond_ functions.
(json_to_pcond): New function.
(res_programs): Conditional selection of programs to list.
Implement restart.
* src/pies.c (ctlfile, statfile): Remove.
(pies_keywords): Mark control-file and stat-file as inactive.
(default_sigv): Remove SIGUSR1 and SIGUSR2
(pies_check_status): Don't send SIGUSR2.
(stop_components): Remove.
(request_restart_components): Rewrite as a wrapper.
Call piesctl to do the job.
(list_components): New function.
* src/pies.h (ACTION_COMPRELOAD)
(ACTION_DUMPSTATS): Remove. All callers changed.
(progman_dump_stats): Remove.
* src/piesctl.c (shttp_request_send): Don't initialize conn->req; the
caller is responsible for that.
(parse_condition, json_to_string)
(parse_condition_to_uri): New functions.
(com_list): Read conditional expression from the command line.
(com_restart): Implement.
* src/progman.c (progman_dump_stats): Remove.
|
|
* configure.ac (DEFAULT_CONTROL_URL): New subst variable.
* grecs: Upgrade.
* ident/pam.c (overwrite_and_free): Free ptr.
* lib/Makefile.am: Add new sources.
* src/addrfmt.c: Move to lib/addrfmt.c
* lib/grecsasrt.c: New file.
* lib/grecsasrt.h: New file.
* lib/mkfilename.c: New file.
* lib/netrc.c: New file.
* lib/pp.c: New file.
* lib/split3.c: New file.
* src/url.c: Move from lib/url.c
(pies_url_free_user, pies_url_free_passwd): New finctions.
* lib/libpies.h (strsplit3): New proto.
(pies_url_create, pies_url_destroy)
(pies_url_get_arg, pies_url_copy)
(pies_url_free_user, pies_url_free_passwd)
(netrc_scan)
(pp_add_option, pp_command_line, mkfilename)
(sockaddr_to_str, sockaddr_to_astr): New protos
* src/Makefile.am (bin_PROGRAMS): New program: piesctl
(pies_SOURCES): Remove addrfmt.c and url.c.
(noinst_HEADERS, BUILT_SOURCES): Add piesctl-cl.h
* src/cmdline.opt: Use pp_* function family to build
preprocessor command line.
* src/ctl.c (http_header_hash): Use case-insensitive hashing.
(ctlio_finalize_reply): Don't close connection after sending 401
response.
(input): Remove ws and wsflags. All uses changed.
(input_append): Use strsplit3 to parse the request line.
* src/pies.c: Use pp_* function family to build
preprocessor command line.
Move assert_, mkfilename and _cb+_url functions into libpies.
* src/pies.h (pies_sockaddr_storage): Move to libpies.h
* src/piesctl.c: New file.
* src/piesctl-cl.opt: New file.
|
|
* grecs: Upgrade.
* doc/pies.texi: Document built-in include and line directives.
* src/cmdline.opt: New option -I (--include-directory).
* configure.ac: Version 1.2.91
* NEWS: Update.
|
|
|
|
* src/prog.h: New file.
* src/Makefile.am: Add new file.
* src/cmdline.opt: New option --telinit (-T).
* src/diag.c (vlogmsg): In sysvin it mode, write
directly to the console. Close it when finished.
* src/pies.c (_cb_initdefault, _cb_runlevels): Use is_valid_runlevel
to check if the specified runlevels are ok.
(main): In sysvinit mode, reset action to ACTION_CONT.
* src/pies.h (progman_filter): New proto.
(progman_accept,register_socket): Change signature.
(deregister_socket): New proto.
(register_program_socket): New proto.
* src/progman.c: Move constant and adatatype definitions to
prog.h
(prog_stop): Remove static qualifier.
(console_open): Likewise.
(progman_accept): Use new socket API.
(progman_stop): Correctly handle timeouts.
(progman_foreach): New function.
* src/socket.c: Register all sockets along with their handlers
in a doubly-linked list.
(sockinst): New struct.
(register_socket,deregister_socket): New functions.
(register_program_socket): New function.
(pies_pause): Traverse the list to find which fd has changed.
Use its registered handler to handle the event.
* src/sysvinit.c: Include prog.h
(is_valid_runlevel): New function.
(sysvinit_fifo_handler,check_fifo): New static functions.
(inittrans): Fix transition algorithm.
(telinit): New function.
|
|
* Makefile.am (ChangeLog): Use git2chg.awk to build it.
* NEWS: Update.
* bootstrap.conf (gnulib_modules): Grecs does not depend on gnulib any more.
* configure.ac: Version 1.2.90.
Define GRECS_HOST_PROJECT_INCLUDES, remove grecs Makefiles from
AC_CONFIG_FILES: it is now done by GRECS_SETUP itself.
* gnulib.modules (gitlog-to-changelog,argp): Remove.
(configmake): New module.
* grecs: Update to a52ab6c6.
* lib/libpies.h: Remove redefinitions of _() and N_().
* src/Makefile.am: Update for the recent grecs.
* src/acl.c: Rewrite using Grecs support for lists and symtabs.
* src/acl.h: Likewise.
* src/diag.c: Likewise.
* src/inetd.c: Likewise.
* src/meta1gram.y: Likewise.
* src/meta1lex.h: Likewise.
* src/meta1lex.l: Likewise.
* src/pies.c: Likewise.
* src/pies.h: Likewise.
* src/progman.c: Likewise.
* src/userprivs.c: Likewise.
|