]> Kevux Git Server - controller/log
controller
3 months agoCleanup: Build settings and fakefile mode related settings and documentation.
Kevin Day [Thu, 1 Aug 2024 03:45:12 +0000 (22:45 -0500)]
Cleanup: Build settings and fakefile mode related settings and documentation.

3 months agoCleanup: Alphabetize some of the settings.
Kevin Day [Thu, 1 Aug 2024 03:18:13 +0000 (22:18 -0500)]
Cleanup: Alphabetize some of the settings.

3 months agoRefactor: Change bit-wise enumerations into defines.
Kevin Day [Wed, 31 Jul 2024 02:45:38 +0000 (21:45 -0500)]
Refactor: Change bit-wise enumerations into defines.

I did some reviewing of how the enumerations used for flags are used.
These generally are not being used as a type.
An enumeration slightly increases the resulting binary size.
Enumeration values might be limited to just type of int.

This seems like an easy (small) optimization to just use defines rather than enumerations for flags and other bit-wise numbers.

3 months agoCleanup: Remove unused IKi substitution parameter.
Kevin Day [Wed, 31 Jul 2024 00:32:15 +0000 (19:32 -0500)]
Cleanup: Remove unused IKi substitution parameter.

3 months agoUpdate: Stand alone build settings.
Kevin Day [Tue, 30 Jul 2024 02:03:37 +0000 (21:03 -0500)]
Update: Stand alone build settings.

3 months agoUpdate: The stand alone build needs _di_f_string_format_sentence_end_quote_s_ and...
Kevin Day [Tue, 30 Jul 2024 00:58:59 +0000 (19:58 -0500)]
Update: The stand alone build needs _di_f_string_format_sentence_end_quote_s_ and _di_f_string_format_sentence_end_s_.

3 months agoCleanup: Stand alone build settings.
Kevin Day [Mon, 29 Jul 2024 02:44:39 +0000 (21:44 -0500)]
Cleanup: Stand alone build settings.

3 months agoCleanup: Improve fakefile help using the bracketed IKI syntax.
Kevin Day [Mon, 29 Jul 2024 01:39:18 +0000 (20:39 -0500)]
Cleanup: Improve fakefile help using the bracketed IKI syntax.

3 months agoUpdate: The global static sentence end strings based on related changes in the FLL...
Kevin Day [Sun, 28 Jul 2024 22:20:47 +0000 (17:20 -0500)]
Update: The global static sentence end strings based on related changes in the FLL project.

3 months agoCleanup: Miscellaneous things.
Kevin Day [Fri, 26 Jul 2024 04:11:01 +0000 (23:11 -0500)]
Cleanup: Miscellaneous things.

3 months agoRegression: Handle print thread locking when printing errors.
Kevin Day [Fri, 26 Jul 2024 00:31:05 +0000 (19:31 -0500)]
Regression: Handle print thread locking when printing errors.

3 months agoRegression: The wrong error is being printed for fll_control_group_prepare() call.
Kevin Day [Fri, 26 Jul 2024 00:17:31 +0000 (19:17 -0500)]
Regression: The wrong error is being printed for fll_control_group_prepare() call.

3 months agoRegression: Incorrect invalid parameter error when -s/--settings and similar paramete...
Kevin Day [Fri, 26 Jul 2024 00:11:44 +0000 (19:11 -0500)]
Regression: Incorrect invalid parameter error when -s/--settings and similar parameters are correctly passed.

During migration I forgot to add the if conditions before throwing the error.

3 months agoCleanup: Source code path in documentation comments.
Kevin Day [Fri, 26 Jul 2024 00:11:29 +0000 (19:11 -0500)]
Cleanup: Source code path in documentation comments.

3 months agoBugfix: Incorrect length on string CONTROLLER_rule_print_control_groups_prepare_s.
Kevin Day [Fri, 26 Jul 2024 00:03:51 +0000 (19:03 -0500)]
Bugfix: Incorrect length on string CONTROLLER_rule_print_control_groups_prepare_s.

3 months agoCleanup: Re-organize the build settings flags to be alphabetical by mode.
Kevin Day [Thu, 25 Jul 2024 03:26:06 +0000 (22:26 -0500)]
Cleanup: Re-organize the build settings flags to be alphabetical by mode.

3 months agoUpdate: Overlooked copyright and correct the readme.txt file.
Kevin Day [Thu, 25 Jul 2024 03:11:29 +0000 (22:11 -0500)]
Update: Overlooked copyright and correct the readme.txt file.

I overlooked changing this year from 2023 to 2024 at some point.

The readme.txt is still referencing a non-existent build script (the bootstrap script).

4 months agoUpdate: Setup the stand alone disable defines config.h and setup the build settings...
Kevin Day [Thu, 18 Jul 2024 04:18:59 +0000 (23:18 -0500)]
Update: Setup the stand alone disable defines config.h and setup the build settings and fakefile.

4 months agoProgress: Add initial stand alone builds for both controller and init programs.
Kevin Day [Wed, 17 Jul 2024 04:21:46 +0000 (23:21 -0500)]
Progress: Add initial stand alone builds for both controller and init programs.

Bring in the stand alone build that includes the FLL source files in a build settings file.
The associated fakefile will be updated and tested later.

The config.h files are currently incomplete.

Currently to test the stand alone builds:
  - Use an empty config.h file.
  - Copy the sources from the monolithic FLL package into the sources directory under sources/c/fll/.
  - Build the controller stand alone program via:
    # fake -s data/build/stand_alone/settings.controller build
  - Build the init stand alone program via:
    # fake -s data/build/stand_alone/settings.init build

Due to using an empty config.h file the resulting binary is oversized due to including unneeded code.
This will change once the controller.config.h and init.config.h are appropriately updated.

4 months agoUpdate: Restructure the project to make it easy to switch to or from stand alone...
Kevin Day [Wed, 17 Jul 2024 04:17:39 +0000 (23:17 -0500)]
Update: Restructure the project to make it easy to switch to or from stand alone builds, and other fixes.

Move the sources for the program to be under the program/controller directory.
This makes the structure more one to one with how it is installed.
This then makes a drop in place stand alone build easier.

Update the git ignore file:
- Add the FLL directory so that a drop in place stand alone build is unlikely to be accidentally added to this repository.
- Add the config.c and config.h to prevent accidental inclusion of local configuration source file and header file.

Fix incorrect dependencies, adding missing ones and removing non-existent ones.

Make GCC and CLang upper case in descriptions.

4 months agoUpdate: Finish migrating the project.
Kevin Day [Tue, 16 Jul 2024 01:43:33 +0000 (20:43 -0500)]
Update: Finish migrating the project.

The project appears to work as far as basic testing and code reviewing goes.

I imagine that once I put this to regular use I will fine additional problems.
Commits after this point will be normal commits rather than migration progress commits.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sun, 14 Jul 2024 04:52:46 +0000 (23:52 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 13 Jul 2024 05:10:03 +0000 (00:10 -0500)]
Progress: Continue migrating the project.

4 months agoBugfix: Controller is adding an extra '/' to the file name.
Kevin Day [Fri, 12 Jul 2024 03:52:34 +0000 (22:52 -0500)]
Bugfix: Controller is adding an extra '/' to the file name.

This does not cause a problem unless the local filesystem is very picky about extra slashes.

The error printing revealed the problem as descibed in the examples below.

Example Incorrect Error Message:
  ERROR: Unable to open file './/entries/utility.entry', could not find.

Example Correct Error Message:
  ERROR: Unable to open file './entries/utility.entry', could not find.

4 months agoProgress: Continue migrating the project, and do some restructuring.
Kevin Day [Fri, 12 Jul 2024 03:27:43 +0000 (22:27 -0500)]
Progress: Continue migrating the project, and do some restructuring.

Don't provide default examples as the settings.
Move all of these into an examples directory.
The examples directory is placed under a data directory that is intended to be for files such as those under the /usr/share directory.

This shows that the Featureless Make build settings specification is missing the "build_sources_data" which is a /usr/share equivalent of "-build_sources_setting" (aka /etc).

4 months agoProgress: Continue migrating the project, updating documentation and fixing some...
Kevin Day [Thu, 11 Jul 2024 05:48:49 +0000 (00:48 -0500)]
Progress: Continue migrating the project, updating documentation and fixing some bugs.

Update the specifications and documentation.

Drop the "/var" default in "/var/run" to just be "/run".
This is nice and newer systems are following this.

The process flags should actually be on a flag variable inside the process structure.
This flag variable got lost in migration and is now back.

Provide additional lock structural changes.
Make stronger attempts to re-establish the read locks.
(There will likely be more updates to follow regarding F_lock_read and F_lock_write.)

The need to release a read lock to get a write lock within the same thread is unideal.
I do not like how this is.
It has probably annoyed me in the past and it annoys me yet again.
The POSIX thread documentation man pages are quite lacking in some critical information in this area.
I will have to do a lot of research.
Maybe at some point in the future I might depend on a different threading system that is more sane.

I accidentally had the instance action lock being locked when the regular instance lock should be grabbed.
This caused the utility execution (or anything that executes based on a PID file) to just sit there after the first run.
This is a migration mistake that is now fixed.

I did notice that on PID file error this thread still does not exit but the 0.6 version does exit.
This is likely another migration bug that needs to be fixed.
Or this is a problem resulting from adding the F_lock_read and F_lock_write return values without getting the time to go and have the callers expect this return result.

Add some new functions for returning a pointer so that I can make the pointer a constant in the execute functions.

4 months agoProgress: Continue migrating the project, also updating files and licenses.
Kevin Day [Wed, 10 Jul 2024 02:38:31 +0000 (21:38 -0500)]
Progress: Continue migrating the project, also updating files and licenses.

Synchronize the examples, the license files, the documentations, and the specifications.

Fix some problems.

I noticed that the example utility is not working as expect and so there will be more migration commits once I identify and solve this problem.

4 months agoProgress: Continue migrating the project, possibly wrapping up the migration.
Kevin Day [Tue, 9 Jul 2024 04:13:43 +0000 (23:13 -0500)]
Progress: Continue migrating the project, possibly wrapping up the migration.

Additional review and tests are still required but this fixes some additional problems encountered during testing.

Try to improve grammar by treating special variables as proper nouns, such as Entry, Exit, Rule, Item, etc...

Move the environment map onto the Instance.
I decided not to put it on the cache but I might change my mind as this is being added for cache purposes.
This should help reduce repeated allocations on every execute.
I may want to add features to the Controller program to better control when to clear or deallocate memory for more security at the cost of resources and performance.
This would allow for post-compile-time configuration.

A mistake exposed a lack of error reporting for when Items is an empty array.
Add controller_print_error_rule_item_execute_none() to account for this.

The bug is that "object" and "content" in controller_rule_parameters_read() are actually optional.
I was returning a parameter error when these were not defined.

Reduce the local allocation of f_state_t and pass it along as a parameter.
These particular functions should be being called sequentially and should be able to safely pass along the state between them.
The settings for the IKI read state is temporarily modified as appropriate and then restored when finished.

Don't assign enabled variable on lock failure to avoid potential race condition.

4 months agoProgress: Continue migrating the project.
Kevin Day [Mon, 8 Jul 2024 03:08:05 +0000 (22:08 -0500)]
Progress: Continue migrating the project.

I did some testing and found some problems and some things to clean up.

Further reduce the small allocation to 4 which shows a decent reduction in memory waste.

4 months agoProgress: Continue migrating the project, getting close to wrapping up migration.
Kevin Day [Mon, 8 Jul 2024 00:42:31 +0000 (19:42 -0500)]
Progress: Continue migrating the project, getting close to wrapping up migration.

The program appears to run and work for simple scripts.
I have not done an extensive code review.
I have not done an extensive runtime test.

This reduces the small allocation down from 16 to 8 which shows a closer allocation level to that of the 0.6 version of Controller.
The number of allocations is still fewer even with this change, so that is real good.

Add some missing code and handle other problems such as allocation problems.

An incorrect lock is being used on the execution.
I need to look out for other accidental lock migration mistakes.

This performs the time calculation changes that I recently added as a separate commit in the 0.6 version of Controller.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sun, 7 Jul 2024 04:38:02 +0000 (23:38 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project, addressing instances double-pointer.
Kevin Day [Sat, 6 Jul 2024 23:58:47 +0000 (18:58 -0500)]
Progress: Continue migrating the project, addressing instances double-pointer.

I forgot that instances is a double-pointer.
Adjust the code to ensure that the double-pointer is handled and that the locks are allocated and de-allocated.

Add additional comments regarding things that need to be done.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 6 Jul 2024 05:19:58 +0000 (00:19 -0500)]
Progress: Continue migrating the project.

This gets the last of the print functions moved into the print directories and files.

Additional organizational changes may come in the future but for now I am considering the print format re-organization to be complete.

4 months agoProgress: Continue migrating the project.
Kevin Day [Fri, 5 Jul 2024 02:45:51 +0000 (21:45 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Wed, 3 Jul 2024 05:01:08 +0000 (00:01 -0500)]
Progress: Continue migrating the project.

4 months agoCleanup: Add time based version in each of the documentation and specification files...
Kevin Day [Wed, 3 Jul 2024 04:56:55 +0000 (23:56 -0500)]
Cleanup: Add time based version in each of the documentation and specification files where it is missing.

I am just setting the current date rather than trying to figure out the date of last change.

I also noticed that the documents/time.txt file has an incorrect license specified.
The original files from the 0.6 and 0.7 branches of the FLL project already show the open-standard-license-1.0-or-later as the license.
Make sure the documents/time.txt correctly identifies the license as open-standard-license-1.0-or-later to avoid confusion.

4 months agoProgress: Continue migrating the project.
Kevin Day [Tue, 2 Jul 2024 04:36:27 +0000 (23:36 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sun, 30 Jun 2024 03:40:51 +0000 (22:40 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 29 Jun 2024 04:03:48 +0000 (23:03 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Fri, 28 Jun 2024 03:59:42 +0000 (22:59 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project, where the code now compiles without error.
Kevin Day [Thu, 27 Jun 2024 02:56:23 +0000 (21:56 -0500)]
Progress: Continue migrating the project, where the code now compiles without error.

The migration is not complete.
This simply has all of the compilation problems addressed.

There are still several print functions that need to be migrated.
There are probably a lot of out of date comments, which will be fixed as discovered.

I need to walk through each and every function, from a start to finish perspective, and make sure that all the logic is still valid.
I have good reason to believe that there are a lot of things to correct.

4 months agoProgress: Continue migrating the project.
Kevin Day [Tue, 25 Jun 2024 04:22:53 +0000 (23:22 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Mon, 24 Jun 2024 03:08:46 +0000 (22:08 -0500)]
Progress: Continue migrating the project.

4 months agoProgress: Continue migrating the project.
Kevin Day [Sun, 23 Jun 2024 03:03:39 +0000 (22:03 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Thu, 20 Jun 2024 02:32:00 +0000 (21:32 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Mon, 17 Jun 2024 04:41:42 +0000 (23:41 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 15 Jun 2024 04:28:34 +0000 (23:28 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Sun, 9 Jun 2024 23:46:12 +0000 (18:46 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 8 Jun 2024 05:48:14 +0000 (00:48 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Fri, 7 Jun 2024 04:34:24 +0000 (23:34 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Tue, 4 Jun 2024 05:35:02 +0000 (00:35 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project, notably refactoring out controller_global_t.
Kevin Day [Sun, 2 Jun 2024 23:51:58 +0000 (18:51 -0500)]
Progress: Continue migrating the project, notably refactoring out controller_global_t.

A lot of the changes made it possible to remove th controller_global_t.
Restructure the code to do this.

Most of the compile errors are fixed.

I still need to go over the logic and fix things.
I still need to copy over some functions.
I still need to move the print functions around.
I still need to do runtime tests once all of the above is completed.

5 months agoProgress: Continue migrating the project.
Kevin Day [Sun, 2 Jun 2024 17:28:29 +0000 (12:28 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 1 Jun 2024 23:32:11 +0000 (18:32 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 1 Jun 2024 05:50:46 +0000 (00:50 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Fri, 31 May 2024 03:35:16 +0000 (22:35 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Thu, 30 May 2024 01:39:13 +0000 (20:39 -0500)]
Progress: Continue migrating the project.

5 months agoProgress: Continue migrating the project.
Kevin Day [Wed, 29 May 2024 02:24:35 +0000 (21:24 -0500)]
Progress: Continue migrating the project.

5 months agoUpdate: Remove the ++first and ++last parameters and relating logic.
Kevin Day [Thu, 23 May 2024 04:41:32 +0000 (23:41 -0500)]
Update: Remove the ++first and ++last parameters and relating logic.

I have used this for a while and have decided these are not worth the effort.
The addition is very nice but the additional code and logic is just extra maintenance and complexity for very little gain.

6 months agoSecurity: Potential buffer overflow on 0 length array.
Kevin Day [Thu, 9 May 2024 01:51:11 +0000 (20:51 -0500)]
Security: Potential buffer overflow on 0 length array.

The length_name_item variable can potentially be zero.
The assignment of "name_item[length_name_item] = 0;" will then result in an assignment on a 0 length array.

This issue has been exposed via GCC's -fanalyzer.

6 months agoProgress: Continue migrating the project.
Kevin Day [Wed, 8 May 2024 02:52:45 +0000 (21:52 -0500)]
Progress: Continue migrating the project.

6 months agoProgress: Continue migrating the project.
Kevin Day [Tue, 7 May 2024 03:35:34 +0000 (22:35 -0500)]
Progress: Continue migrating the project.

6 months agoProgress: Continue migrating the project.
Kevin Day [Thu, 2 May 2024 01:11:31 +0000 (20:11 -0500)]
Progress: Continue migrating the project.

6 months agoProgress: Continue migrating the project.
Kevin Day [Sat, 27 Apr 2024 06:01:38 +0000 (01:01 -0500)]
Progress: Continue migrating the project.

7 months agoProgress: Continue migrating the project.
Kevin Day [Wed, 17 Apr 2024 02:01:12 +0000 (21:01 -0500)]
Progress: Continue migrating the project.

7 months agoProgress: Continue migrating the project.
Kevin Day [Mon, 15 Apr 2024 04:12:45 +0000 (23:12 -0500)]
Progress: Continue migrating the project.

7 months agoProgress: Continue migrating the project.
Kevin Day [Fri, 12 Apr 2024 01:45:08 +0000 (20:45 -0500)]
Progress: Continue migrating the project.

7 months agoProgress: Continue migrating the project.
Kevin Day [Thu, 11 Apr 2024 03:46:56 +0000 (22:46 -0500)]
Progress: Continue migrating the project.

Start brining in the enumerations and types.
There is still a lot of inconsistency in the type delete functions to deal with.
Many of the "delete" functions may end up being replaced with a "resize" method.

This removes the "--init" parameter.
I figure I might as well simplify the design a little and have the init and controller be more separate.

7 months agoUpdate: Add new parameters to fll_program_print_copyright().
Kevin Day [Wed, 10 Apr 2024 02:52:38 +0000 (21:52 -0500)]
Update: Add new parameters to fll_program_print_copyright().

7 months agoProgress: Continue migrating the project.
Kevin Day [Tue, 9 Apr 2024 02:55:01 +0000 (21:55 -0500)]
Progress: Continue migrating the project.

7 months agoUpdate: Better utilize functionality of C for extern types.
Kevin Day [Tue, 9 Apr 2024 01:37:34 +0000 (20:37 -0500)]
Update: Better utilize functionality of C for extern types.

I am creating a string pointer and passing it through a structure to dynamically pass different progam names for each program.
This is fine for many languages that are not C/C++.

For C/C++, this can be done in a cleaner and more efficient way.
The extern type can be declared in the main project and use that.
Then, the final binary is the only case where the actual implementation of the extern variable must exist.
That means each program (init and controller) will define their own program name string.
No extra memory in the structure needs to be used.
This is cleaner, simpler, and more maintainable.

7 months agoUpdate: Remove -D_FORTIFY_SOURCE because several systems automatically add this and...
Kevin Day [Sun, 7 Apr 2024 15:44:21 +0000 (10:44 -0500)]
Update: Remove -D_FORTIFY_SOURCE because several systems automatically add this and the screen is spammed with warnings.

7 months agoProgress: Begin migrating the project, doing some initial preparations.
Kevin Day [Thu, 4 Apr 2024 03:20:54 +0000 (22:20 -0500)]
Progress: Begin migrating the project, doing some initial preparations.

Tweak the fakefile structure.
Remove the "as_init" fakefile mode.
Use library instead of object so that both controller and init may use the same library.
I may want to create a custon "init only" mode where init uses libinit.so rather than libcontroller.so.

Have the build settings pass "-D_controller_as_init_" directly for the init fakefile.

Add the child process exit code.
I may end up changing this again, but I wanted to start off very consistent with other projects design.

Finish the help printing process.
The program name is moved into the specific programs.

Add missing control group header file include.

Fix a mistake whee the main thread signal function is calling itself rather than the main signal handler.
This bad behavior results in a segfault.

7 months agoUpdate: Remove bootstrap script.
Kevin Day [Thu, 4 Apr 2024 00:33:18 +0000 (19:33 -0500)]
Update: Remove bootstrap script.

This doesn't need to exist here now that this is in a separate project.
The bootstrap script is also very limited in design and the Controller project uses a lot more advanced functionality.

7 months agoProgress: Synchronize changes with recent develpments and remove accidentally committ...
Kevin Day [Fri, 29 Mar 2024 04:14:39 +0000 (23:14 -0500)]
Progress: Synchronize changes with recent develpments and remove accidentally committed build data.

7 months agoProgress: Do some initial clean up and preparations.
Kevin Day [Sat, 23 Mar 2024 04:03:57 +0000 (23:03 -0500)]
Progress: Do some initial clean up and preparations.

8 months agoUpdate: Initial import of the project with a skeleton based off of the example project.
Kevin Day [Wed, 20 Mar 2024 03:15:23 +0000 (22:15 -0500)]
Update: Initial import of the project with a skeleton based off of the example project.

This has some initial files copied over from the controller program from the fll project.