kremlin [Tue, 5 Aug 2014 02:50:37 +0000 (21:50 -0500)]
(8) [final] modify main() to call correct clean sequence
main() now sets the signal handlers (via function from previous
commit) before establishing the GMainLoop as well as invoke the
proper clean()'s after unref'ing the loop. at this point all four
interfaces are at the same place structurally. builds all cases.
kremlin [Tue, 5 Aug 2014 02:37:30 +0000 (21:37 -0500)]
(7) add set_signal_handlers() to bind functions during init
this function calls attached the ones from the previous commit to the
GLib runtime properly. since we are working solely in the default context
(in terms on the GMainLoop) we are guaranteed the attached functions will
only run once.
kremlin [Tue, 5 Aug 2014 02:30:41 +0000 (21:30 -0500)]
(6) add handler for unix termination signals
it prints a message and calls foo_mem_clean(), swiftly and safely
bringing the runtime down before letting the calling thread it was
ready to exit. note, this is handled through GLib which guarantees
it is only fired once, rather than unwrapped signals that can occur
wildly.
kremlin [Tue, 5 Aug 2014 02:18:51 +0000 (21:18 -0500)]
(5) fix foo_mem_clean() functions to avoid race cond.
mem_clean functions previously free()'d our pointer array without
first checking that the name/interface had properly been unexported from
dbus. checking first better guarantees all operations implicating that date
have ceased, and that it is safe to go ahead and stop the GMainLoop before
immediately returning. this causes the code just after the main_loop_begin()
call to start functioning, in our case the actual free() calls (which are now
*absolutley* safe to call)
kremlin [Tue, 5 Aug 2014 02:03:58 +0000 (21:03 -0500)]
(4) move on_name_acquired functionality to on_bus_acquired
work that was previously done in foo_on_name_acquired(), such as attaching
the interface to the name, is now done in foo_on_bus_acquired(), as GIO docs
suggest. this fixed a bug with logind failing to export, the name_acquired function
executed executed too late to export a big interface like logind.
fix some minor error msg/consistency stuff in hostnamed, merge across pals. builds
kremlin [Tue, 29 Jul 2014 07:40:03 +0000 (02:40 -0500)]
(3) add needed GLib headers, move loop and bus descr out of main into global
minor variable placement changes. added gboolean dbus_interface_exported,
which due to the guarantees of the name_lost, bus_acquired, and name_acquired
is a reliable source of whether not it is reasonable to try and unexport it
kremlin [Tue, 29 Jul 2014 07:26:14 +0000 (02:26 -0500)]
(2) move on_name_lost() callback to appropriate commend-bounded region
minor, builds
kremlin [Tue, 29 Jul 2014 07:20:14 +0000 (02:20 -0500)]
(1) add <interface>.h and #include it in corresponding .c
nessecary for compiler unambiguity. minor, builds
kremlin [Tue, 29 Jul 2014 07:11:07 +0000 (02:11 -0500)]
see full message -- safe signal/lifetime/glib code
this unusually dense commit is the product of me using hostnamed as a
prototyping bed, you should instead follow the next numbered series of
commits to proceed this one, as they are the same changes but made
incrementally and gradually across the other three interfaces.
added:
* proper lifetime handling, everything coordinated in a gmainloop such that
daemons don't clean their memory twice or trip over the last instance's unclosed
file descriptors, etc.
* threadsafe unix termination signal handling
* more intuitive runtime, daemons immidietly either start up perfectly and print
a verification or crash and print a reason/probable solution
* some bugfixes detailed in further individual commits
kremlin [Tue, 29 Jul 2014 02:27:48 +0000 (21:27 -0500)]
minor, clarify what "misc functions" are in comments
kremlin [Tue, 29 Jul 2014 02:16:57 +0000 (21:16 -0500)]
minor, clarify "dbus signal" vs. "unix signal" in comments
kremlin [Tue, 29 Jul 2014 02:07:38 +0000 (21:07 -0500)]
include glib-unix.h in interface files
it's a good idea to use glib signal handling, most use cases will
be running gnome
kremlin [Tue, 22 Jul 2014 22:24:48 +0000 (17:24 -0500)]
minor, add tmpfile to preserve now-empty bin dirs
kremlin [Tue, 22 Jul 2014 21:46:16 +0000 (16:46 -0500)]
update TODO
kremlin [Tue, 22 Jul 2014 21:45:10 +0000 (16:45 -0500)]
update TODO
kremlin [Tue, 22 Jul 2014 21:43:00 +0000 (16:43 -0500)]
minor, add genfiles to gitignore
kremlin [Tue, 22 Jul 2014 21:41:27 +0000 (16:41 -0500)]
update service files to run with root permissions
root is needed for gethostname(3), setlocale(3), setting system time,
and handling login enviornments.
kremlin [Tue, 22 Jul 2014 21:34:50 +0000 (16:34 -0500)]
modify makefile and script to work with previous commit
last commit created discrepencies in makefile and gen-gdbus-interfaces.sh, fix
kremlin [Tue, 22 Jul 2014 21:27:05 +0000 (16:27 -0500)]
organize configs in conf/ into new subdirectories
introspection xml -> conf/introspect-xml/
service files -> conf/service-files/
dbus policies -> conf/sysbus-policy/
kremlin [Tue, 22 Jul 2014 21:15:50 +0000 (16:15 -0500)]
remove genfiles from repo, instead generate in makefile
genfiles (-gen.{c,h}) should be generated at build time instead of
being included in the repo. remove them & add relevant recipes/pre-reqs
include genfiles in 'clean' recipe
kremlin [Tue, 22 Jul 2014 20:54:34 +0000 (15:54 -0500)]
refactor makefile with env variables
per ajacoutot's reccomendation
kremlin [Tue, 22 Jul 2014 20:26:23 +0000 (15:26 -0500)]
edit TODO
kremlin [Tue, 22 Jul 2014 20:22:46 +0000 (15:22 -0500)]
update gitignore to include all binaries
additionally get rid of unused -handler rule
kremlin [Tue, 22 Jul 2014 20:21:12 +0000 (15:21 -0500)]
get rid of objects in repository
i thought i could make some cool looking diffs in gitweb or something :)
kremlin [Tue, 22 Jul 2014 03:12:29 +0000 (22:12 -0500)]
(minor) update binaries
kremlin [Tue, 22 Jul 2014 03:12:02 +0000 (22:12 -0500)]
copy and regex localed, timedated, and logind from hostnamed
they now start up and display the proper methods/functions on the
system bus, albeit with no functionality
kremlin [Tue, 22 Jul 2014 02:18:42 +0000 (21:18 -0500)]
cut out cruft in dbus confs
kremlin [Tue, 22 Jul 2014 02:00:27 +0000 (21:00 -0500)]
add DBus service files, change Makefile to install them
kremlin [Tue, 22 Jul 2014 01:40:09 +0000 (20:40 -0500)]
(minor) update binaries
kremlin [Tue, 22 Jul 2014 01:39:43 +0000 (20:39 -0500)]
conf file will now be used to set intranslatable properties
kremlin [Tue, 22 Jul 2014 01:37:56 +0000 (20:37 -0500)]
update TODO
kremlin [Tue, 22 Jul 2014 01:37:41 +0000 (20:37 -0500)]
hostname1 now returns hostname minus domain info
also initializes pointer array properly, no more GLib warnings
kremlin [Tue, 22 Jul 2014 00:55:40 +0000 (19:55 -0500)]
clean up hostnamed.c, clear out localed.c for copying
fix minor memory management issues in hostnamed.c. localed.c
was previously based on a version of hostnamed.c i copied,
however it has strayed too far away from the working version
and must be recopied/refactored.
kremlin [Tue, 22 Jul 2014 00:35:57 +0000 (19:35 -0500)]
empty main.c
kremlin [Tue, 22 Jul 2014 00:34:37 +0000 (19:34 -0500)]
(minor) update object binaries
kremlin [Tue, 22 Jul 2014 00:34:02 +0000 (19:34 -0500)]
cut out config.c & config.h, they are unnessecary
kremlin [Tue, 22 Jul 2014 00:24:55 +0000 (19:24 -0500)]
tighten up memory management in hostnamed.c
kremlin [Mon, 21 Jul 2014 23:57:34 +0000 (18:57 -0500)]
refactor hostnamed.c to work with namespace genfile change
kremlin [Mon, 21 Jul 2014 23:42:33 +0000 (18:42 -0500)]
cut comments in main.c, prepare it to be removed
kremlin [Mon, 21 Jul 2014 23:16:57 +0000 (18:16 -0500)]
change gen script to use ksh, remove namespace option, regen genfiles
rewrite scripts/gen-gdbus-interfaces.sh to use ksh (#!/bin/sh) to cut
down on inbox spam, also fixed prior bug where generated files had bad
paths in their #includes. removed namespacing option from gdbus-codegen
as linked objects do not run into naming conflicts as the previous
commits did. regenerate all genfiles (src/interfaces/foo/foo-gen.{c.h})
accordingly.
kremlin [Tue, 15 Jul 2014 05:11:01 +0000 (00:11 -0500)]
minor, update binaries
kremlin [Tue, 15 Jul 2014 05:09:59 +0000 (00:09 -0500)]
include gprintf.h in hostnamed.c/localed.c to allow strict compilation
kremlin [Tue, 15 Jul 2014 05:03:17 +0000 (00:03 -0500)]
revamp makefile, build and link objects instead of #include'ing them
previously main.c #include'd files which themselves #include'd all source
files. now, we (correctly) build objects from the genfile, which are linked
to our sources.
kremlin [Tue, 15 Jul 2014 04:59:35 +0000 (23:59 -0500)]
cut out unnessecary #include's in main.c, prepare to deprecate
we're going to move towards having all four daemons exist as seperate
executables managed exclusively by DBus (startup, lifetime, etc.) so
i'm moving towards getting rid of the one "main" executable.
kremlin [Tue, 15 Jul 2014 04:57:18 +0000 (23:57 -0500)]
minor, bring in standalone daemon executables
kremlin [Tue, 15 Jul 2014 04:56:11 +0000 (23:56 -0500)]
minor, update objects from genfile
kremlin [Tue, 15 Jul 2014 04:55:24 +0000 (23:55 -0500)]
remove includes in non-gen'd interf files, they're linked properly now
no need to include foo-gen.c as its functionality exists inside linked object
built by makefile in future commit. additionally, make all non-generated
interface files executable with a dummy main() that runs foo_init() after
setting everything up properly with a g_main_loop
kremlin [Tue, 15 Jul 2014 04:51:11 +0000 (23:51 -0500)]
untouched genfiles now work with linking system, revert localed-gen.c
previously you needed to edit genfiles as to not re-implement
boilerplate methods. linking (instead of #include'ing) avoids this
and allows genfiles to work without edit, as intended.
kremlin [Tue, 15 Jul 2014 04:48:05 +0000 (23:48 -0500)]
get rid of non-generated interface headers, we don't need them
kremlin [Tue, 15 Jul 2014 03:46:04 +0000 (22:46 -0500)]
bring in genfile objects, remove git filler in bin
kremlin [Tue, 15 Jul 2014 03:21:23 +0000 (22:21 -0500)]
add bin/obj directory & populate w/ tmpfile; mod gitignore accordingly
kremlin [Tue, 15 Jul 2014 02:44:45 +0000 (21:44 -0500)]
get rid of ifdef maze in main.c, the binaries will be compiled sep.
kremlin [Thu, 10 Jul 2014 16:24:40 +0000 (11:24 -0500)]
set hostnamed's 'hostname' property before export
kremlin [Tue, 8 Jul 2014 08:15:51 +0000 (03:15 -0500)]
more work on managing four interfaces as separate PIDs, new makefile rules for building and installing standalone interface binaries, a little documentation and preproccessor logic
kremlin [Tue, 8 Jul 2014 06:41:59 +0000 (01:41 -0500)]
(1) regenerate leaner genfiles, we're not using the object manager functionality (2) modify gen-gdbus-interfaces to exclude object manager functionality (3) make localed skeleton (4) namespace hostnamed's and localed's bus/name functions properly (5) edit main.c to init localed
kremlin [Tue, 8 Jul 2014 06:04:16 +0000 (01:04 -0500)]
"build-proper renamed" to "publish" in makefile
kremlin [Tue, 8 Jul 2014 03:12:09 +0000 (22:12 -0500)]
regenerate proper namespaced code for other 3 interfaces, fix their includes accordingly
kremlin [Tue, 8 Jul 2014 03:07:58 +0000 (22:07 -0500)]
fix previous commit (forgot to escape newline), regenerate hostnamed with proper namespace changes, fix hostnamed.c accordingly
kremlin [Tue, 8 Jul 2014 02:53:20 +0000 (21:53 -0500)]
fix gen-gdbus-interfaces.sh to namespace generated functions by targetted DBus interface
kremlin [Thu, 3 Jul 2014 15:26:51 +0000 (10:26 -0500)]
cut out old XML install cruft
kremlin- [Wed, 2 Jul 2014 06:06:15 +0000 (01:06 -0500)]
(1) modify gen-gdbus-interfaces.sh to generate nessecary subclasses
(2) regenerate hostnamed genfiles accordingly
(3) add in skeleton functions for handling hostnamed properties.
(4) celebrate, as hostnamed.c now serves as a copyable skeleton for the other three
kremlin- [Wed, 2 Jul 2014 03:28:33 +0000 (22:28 -0500)]
following last commit, freshen up all ispect xml files with a on an updated archlinux box. also format all XML files to follow the same style (spacing/doctypes/etc)
kremlin- [Wed, 2 Jul 2014 03:21:46 +0000 (22:21 -0500)]
(1) updated ispect xml to reflect recent undocumented changes in hostnamed
(2) implemented skeleton functions for hostnamed, attached to interface which is now
(3) exported on DBus properly as a generated GDBusInterfaceSkeleton
kremlin [Sun, 29 Jun 2014 20:33:51 +0000 (15:33 -0500)]
minor forgot to wrap email in <>'s in txts
kremlin- [Thu, 26 Jun 2014 23:55:42 +0000 (18:55 -0500)]
retab
kremlin- [Thu, 26 Jun 2014 23:50:14 +0000 (18:50 -0500)]
replace C++ style comments
kremlin- [Thu, 26 Jun 2014 23:36:31 +0000 (18:36 -0500)]
remove -pedantic, screw that
kremlin- [Thu, 26 Jun 2014 23:21:13 +0000 (18:21 -0500)]
bring in skeleton conf, add to makefile install target
kremlin- [Thu, 26 Jun 2014 23:18:26 +0000 (18:18 -0500)]
cut out install code that should be handled in makefile
kremlin- [Thu, 26 Jun 2014 23:05:38 +0000 (18:05 -0500)]
clean up makefile, add -std=c89 and -pedantic to build-proper flags
kremlin [Thu, 26 Jun 2014 06:30:17 +0000 (01:30 -0500)]
clean up config.c
kremlin [Thu, 26 Jun 2014 06:08:06 +0000 (01:08 -0500)]
drop persistent file handlers, use rc.d 'reload' instead
kremlin- [Thu, 26 Jun 2014 04:18:16 +0000 (23:18 -0500)]
more work on xml configuration setting..
kremlin- [Thu, 26 Jun 2014 02:25:45 +0000 (21:25 -0500)]
minor, fix system call logic
kremlin- [Thu, 26 Jun 2014 02:17:03 +0000 (21:17 -0500)]
see previous commit, forgot 'git add'..
kremlin- [Thu, 26 Jun 2014 02:16:18 +0000 (21:16 -0500)]
fix up merge conflicts to compile on strict settings
kremlin- [Thu, 26 Jun 2014 02:06:06 +0000 (21:06 -0500)]
fixing merge conflicts
kremlin- [Thu, 26 Jun 2014 01:44:39 +0000 (20:44 -0500)]
merge license, hostname buffer changes from master branch
kremlin [Sun, 22 Jun 2014 06:11:25 +0000 (01:11 -0500)]
change buffer size for gethostname() to HOST_NAME_MAX to avoid accidently truncating the terminating byte on systems that handle gethostname() poorly
kremlin [Sun, 22 Jun 2014 02:51:09 +0000 (21:51 -0500)]
shebang /bin/sh instead of bash for gdbus interface generator script
kremlin [Sun, 22 Jun 2014 02:49:37 +0000 (21:49 -0500)]
add license ISC license blurbs
kremlin- [Fri, 20 Jun 2014 05:26:47 +0000 (00:26 -0500)]
goodnight
kremlin- [Fri, 20 Jun 2014 02:59:38 +0000 (21:59 -0500)]
exit func for config, close()s and free()s
kremlin- [Fri, 20 Jun 2014 02:38:50 +0000 (21:38 -0500)]
finish migrating old code to work with gdbus-codegen types, cleaned up config IO/install, cleaned up code all-around to work with strict compiler flags
kremlin- [Thu, 19 Jun 2014 21:48:25 +0000 (16:48 -0500)]
blow away unnessecary errata whose functionality is covered by code from generated interfaces, clean up code, conform better to GLib, bring in gio-unix-2.0
kremlin- [Thu, 19 Jun 2014 20:44:36 +0000 (15:44 -0500)]
prepare old hostnamed.c code for use through proper generated gdbus interface code
kremlin- [Thu, 19 Jun 2014 19:59:16 +0000 (14:59 -0500)]
regenerate interface types, clean up gen script
kremlin- [Thu, 19 Jun 2014 19:50:05 +0000 (14:50 -0500)]
blow away improperly generated interface types (bad prefix)
kremlin- [Thu, 19 Jun 2014 19:49:33 +0000 (14:49 -0500)]
add script for generating interface types (gdbus-codegen)
kremlin [Tue, 17 Jun 2014 15:18:33 +0000 (10:18 -0500)]
add gdbus-codegen files
kremlin- [Fri, 13 Jun 2014 02:01:30 +0000 (21:01 -0500)]
fleshed out config and hostnamed more, structure for other 3 daemons..
kremlin- [Fri, 13 Jun 2014 00:22:06 +0000 (19:22 -0500)]
furthering hostnamed, begining configuration..
kremlin- [Tue, 10 Jun 2014 03:57:52 +0000 (22:57 -0500)]
property handling...
kremlin- [Tue, 10 Jun 2014 03:40:48 +0000 (22:40 -0500)]
export proper xml FINALLY..
kremlin- [Tue, 10 Jun 2014 02:20:37 +0000 (21:20 -0500)]
cut out literals
kremlin- [Tue, 10 Jun 2014 02:19:19 +0000 (21:19 -0500)]
bring in new configs
kremlin- [Tue, 10 Jun 2014 01:54:08 +0000 (20:54 -0500)]
blow away xmldefs, will read from file and checksum isntead...
kremlin- [Sun, 8 Jun 2014 06:19:46 +0000 (01:19 -0500)]
started work on xml file installation/configuration
kremlin [Sun, 8 Jun 2014 01:04:10 +0000 (21:04 -0400)]
syncing...
kremlin [Sat, 7 Jun 2014 07:45:04 +0000 (03:45 -0400)]
XML configs will be either compiled in (default) or installed (flagged), rm workarounds