2001-04-26 Rebecca Schulman Fix bugzilla.eazel.com 7934, to remove the ability to create an index for a regular user from medusa. reviewed by: * configure.in: Remove configure time check for medusa configuration files. We need to check for the existence of these files at installation time instead. * indexer/medusa-file-index-daemon.c: (main), (do_full_indexing): Remove code to act as a "listener" for index requests * libmedusa/medusa-index-progress.c: (clean_up_index_progress_file), (clean_up_index_progress_file_at_exit), (medusa_index_progress_new), (medusa_index_progress_destroy), (medusa_indexing_is_currently_in_progress), (medusa_index_progress_get_percentage_complete): * libmedusa/medusa-index-progress.h: Clean up the index progress file on exit, and log errors related to opening and writing to the file. * libmedusa/medusa-index-service.c: * libmedusa/medusa-index-service.h: Remove API related to the "index service" * index-configuration/medusa-init.in: * index-configuration/medusa.cron.in: Remove code that started and stopped the index listener, since it no longer exists. * tests/medusa-index-service-test.c: (main): Remove tests related to the index service * libmedusa/Makefile.am: Remove definition of "MEDUSA_SHAREDSTATEDIR", since we no longer are installing files in this directory. * libmedusa/medusa-indexed-search.c: (authenticate_connection), (medusa_indexed_search_new): Add more debugging output, when debugging is turned on * search-service/medusa-file-search-parse-transmission.c: (present_query_results): Add debugging output when PRESENT_QUERY_RESULTS_DEBUG is on * libmedusa/medusa-log.c: (medusa_log_error), (medusa_log_event), (medusa_log_text_index_account_data): Print log messages to the terminal also, when MEDUSA_LOG_DEBUG is turned on. * search-service/medusa-file-search-daemon.c: (main), (query_loop): Fix bugs that only occur while running the search daemon in debug mode, meaning that each new request does not fork the daemon. A daemon running in debug mode would exit on error previously. 2001-04-06 Rebecca Schulman * tests/test-system-state.c: Add stdlib.h to the headers to make tinderbox on redhat 7.0 happy. 2001-04-06 Rebecca Schulman Fix bugzilla.eazel.com bugs 7923 and 7933 (the medusa half), by removing the feature to enable/disable medusa as any normal user. reviewed by: Pavel Cisler * libmedusa/medusa-system-state.c: (medusa_system_services_are_enabled), (medusa_get_configuration_file_path), (call_state_changed_callback), (is_a_onetime_callback), (get_system_state), (check_for_system_state_changes), (medusa_setup_callback_for_system_state_change), (medusa_execute_when_system_state_changes), (medusa_execute_once_when_system_state_changes): * libmedusa/medusa-system-state.h: Change the set of states for medusa on the system from an enum to a boolean. Remove the argument of the set of states to watch for in polling callbacks, and remove the extra logic dedicated to this feature. Add "medusa_get_configuration_file_path" for nautilus so the dialog on abling search can be correct if medusa is installed in a non-standard location. * index-configuration/medusa-test-indexing-status.c: (main): Remove the check for the "blocked" state since it no longer exists * index-configuration/medusa-enable-indexing.c: * index-configuration/Makefile.am: Remove medusa enable indexing. Remove gratuitous hack about trying to decide whether to install the medusa configuration file at configure time. We should do something in the future to make the configuration file not get overwritten, but the current scheme is not working * index-configuration/medusa.conf: Remove the "blocked" attribute, and add "enabled". Make the default value for "enabled" equal "no". * libmedusa/medusa-unsearched-locations.c: (medusa_unsearched_locations_initialize), (medusa_unsearched_locations_shutdown): * libmedusa/medusa-unsearched-locations.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_create_index): * libmedusa/medusa-search-service.c: (medusa_search_service_connection_destroy): Make the list of unsearched locations free itself at exit, and remove the explicit shutdown function for them, since the list should always be available. Remove the shutdown function from the unindexed search connection code, and from the indexing code. * medusa.spec.in: Remove all stuff relating to "Shared state dir", and the removed files * tests/Makefile.am: * tests/medusa-system-state-test.c: Remove * tests/test-system-state.c: (print_current_system_state), (standard_callback_count), (print_current_system_state_and_fail_if_called_twice), (main): Rewrite system state test functions to test current state, and also add test for state changed callback, and one time state change callback, so that I could test new changes. * libmedusa/medusa-unindexed-search.c: (search_directory_contents_in_progress): Remove warning about "search being cancelled" 2001-03-30 Michael K. Fleming reviewed by: Rebecca Schulman Bug 7928: Implement "/etc/medusa/mount-type-stoplist" control file Externalizes previously hard-coded list of filesystem types that medusa should ignore when building a filesystem index. * index-configuration/Makefile.am: * index-configuration/mount-type-stoplist: * libmedusa/medusa-unsearched-locations.c: (mount_type_is_in_skip_list), (medusa_unsearched_locations_shutdown), (getline_dup), (file_stoplist_initialize), (load_mount_type_skip_list), (unsearched_mount_list_initialize_internal), (unsearched_mount_list_initialize): * medusa.spec.in: 2001-03-30 Rebecca Schulman First set of changes anticipating medusa security enhancements. reviewed by: Maciej Stachowiak * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_uid_can_read_file): Make sure that the permissions checks are in the correct order, and correspond to the way UNIX permissions checks work * search-service/medusa-authenticate.c: (medusa_authenticate_user_can_see_file), (can_read_this_file), (calculate_permissions_for_file): Debug and clarify permissions checks for files we are returning Do correct check for ability to read "/", and do just an existence check for the file itself, rather than worrying about being able to read it. Change name of authentication to be more clear. * search-service/medusa-file-search-parse-transmission.c: (present_query_results): change medusa_authenticate_uid_can_read to medusa_authenticate_user_can_see_file to go along with name change abouve 2001-03-29 Rebecca Schulman Commit John Harper's change that fixes a double free in my last commit * libmedusa/medusa-system-state.c: (medusa_system_services_are_blocked): Remove second lock release 2001-03-28 Rebecca Schulman * libmedusa/medusa-system-state.c: (medusa_system_services_are_blocked): Fix a leak of a lock that could cause programs using medusa-system-state to run out of file descriptors 2001-03-24 Fatih Demir * doc/.cvsignore: Hm, now it's really "medusa.conf.5" which is ignored. 2001-03-18 Fatih Demir * doc/.cvsignore: Added "medusa.conf.5" to the ignores. 2001-03-16 Rebecca Schulman reviewed by: Pavel Cisler * libmedusa/medusa-index-progress.c: (medusa_index_progress_new): Remove printf that is lame because of bug 7611 * medusa-idled/x-screensaver-code.c: (BadWindow_ehandler): Fix bug 7668 by reordering conditions in an if statement to appease gcc 2001-03-13 Robin * Slomkowski * configure.in: upped version to 0.5.1 to be higher than released 2001-03-12 Rebecca Schulman reviewed by: Maciej Stachowiak * index-configuration/medusa.cron.in: Fix a syntax mistake in the shell script (bugzilla.eazel.com 7691) 2001-03-07 Rebecca Schulman Fix bugzilla.eazel.com bug 7512, about a problem uninstalling the medusa package. reviewed by: Eric Fischer * medusa.spec.in: Make /com/medusa writable by root so it can be uninstalled correctly. 2001-03-05 Rebecca Schulman Work to fix bugzilla.eazel.com bug 7165, that turning medusa on and off isn't working from nautilus. reviewed by: Maciej Stachowiak * libmedusa/medusa-system-state.c: (medusa_enable_medusa_services), (get_lock_and_read_enabled_users_file), (medusa_system_services_are_blocked): Store lock files in /tmp, rather than in a directory that users can't write to. * libmedusa/medusa-lock.c: (medusa_lock_get), (medusa_lock_release): Erase the lock file when it gets released. 2001-03-02 Rebecca Schulman reviewed by: Eric Fischer * medusa.spec.in: Add rc.3d and rc5.d to the levels at which medusa should start up. 2001-03-02 Rebecca Schulman Fix bug 7291, that there are no docs to turn medusa on/off system wide reviewed by: Josh Barrow * configure.in: * doc/Makefile.am: * doc/medusa.conf.5.in: Add a man page for the medusa.conf file * README: Add descriptions of the enable/disable indexing feature, and the blocking feature 2001-03-01 Robin * Slomkowski reviewed by: Eric Fischer * medusa.spec.in: used %dir directive to make this work correctly 2001-03-01 Rebecca Schulman Fix bugzilla.eazel.com bug 7165, that medusa on/off switch doesn't work in the rpm build. reviewed by: Robin Slomkowski * configure.in: Add checks so that we don't install over configuration files if they already exist. * index-configuration/Makefile.am: Install the real file, rather than a sample file, so that we can include it in the rpm. Don't reinstall it if there is already a config file to avoid overwriting the file * index-configuration/enabled_users_file: Remove the sample file * index-configuration/sample_enabled_users_file: Start out with a default configuration file * libmedusa/medusa-system-state.c: Change the name of the enabled_users_file to the new one * medusa.spec.in: Change to add the enabled users file 2001-03-01 Rebecca Schulman Revert accidentally committed changes to medusa.spec.in, since they aren't complete yet. * medusa.spec.in: Return to the version used this morning. 2001-02-28 Rebecca Schulman Fix bug 7138, that an indexed search would crash. Hopefully this is the same problem as the reporter of the bug report -- the unindexed search would crash whenever no results were returned, and a search finished. reviewed by: Pavel Cisler * libmedusa/medusa-unindexed-search.c: (cleanup_current_directory_information), (medusa_unindexed_search_read_search_result), (search_directory): Make the offending function ignore extra cleanups, rather than crash. Make it also return a status value so we know when to "stop" cleaning up, and return no more results. 2001-02-27 Darin Adler reviewed by: John Sullivan and Mike Engber Fixed bug 7079 (Medusa build error on Redhat 7.) which was a stray semicolon. It seems there are updates the Red Hat 7 with an even newer version of gcc, because this error does not show up on our Tinderbox. Oops! kmaraas already fixed it. Well, I commit the rest of my changes anyway. * libmedusa/medusa-unsearched-locations.c: (unsearched_mount_list_initialize): Untangled ifdef strangeness and removed some unused code. (mount_point_is_cdrom_internal): New function to be shared by the mount_point_is_cdrom functions. (mount_point_is_cdrom): Untangled the ifdef strangeness by using the new shared function. * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new): Slight optimization to take advantage of default key functions. I did this a long time ago and just never committed the change. 2001-02-27 Kjartan Maraas * libmedusa/medusa-unsearched-locations.c: Fix a trailing ; after #endif. 2001-02-26 Robin * Slomkowski * configure.in: upped version to 0.3.3 for development 2001-02-26 Robin * Slomkowski * configure.in: upped version to 0.3.2 for release 2001-02-26 Eric Fischer reviewed by: Rebecca Schulman * index-configuration/medusa.cron.in: For the sake of anacron users who won't want indexing to start while everything else on their system is trying to start up too, sleep 10 minutes in the background before restarting the daemons. (bug 5520) 2001-02-26 Rebecca Schulman reviewed by: Eric Fischer * configure.in: Fix bugzilla.eazel.com 6817, that variables in the medusa man pages were not getting substituted correctly by autoconf. There seem to be two ways of "exporting" a variable from the configure script. The first, AC_DEFINE adds it to the config.h file, and the second AC_SUBST will use it as a substitution to the AC_OUTPUT files. Adding AC_SUBST macros for the variables that weren't getting properly substituted in the man pages seems to fix this problem. 2001-02-23 Rebecca Schulman Fix bugzilla.eazel.com bug 6852, that autofs mounts should not be indexed. reviewed by: Aaron Brick * libmedusa-internal/medusa-master-db.c: (medusa_master_db_create_index): Don't create an index if the specified root file is in the stoplist. * libmedusa/medusa-unsearched-locations.c: Don't index autofs mounts. 2001-02-22 Seth Nickell reviewed by: * acconfig.h: * configure.in: Add checks for -ldb. * indexer/medusa-file-index-daemon.c: (exit_if_disk_is_too_full): * libmedusa-internal/medusa-text-index-mime-module.c: (is_valid_mime_type), (is_valid_mime_pattern): * libmedusa/medusa-index-progress.c: (get_disk_used_information): * libmedusa/medusa-unindexed-search.c: (second_word_of), (last_word_of): * libmedusa/medusa-unsearched-locations.c: Fix various minor issues with casts and using the proper structures rather than ints ;-) * medusa-idled/Makefile.am: Link with -ldb using flags from configure'ing. 2001-02-21 Rebecca Schulman reviewed by: Ramiro Estrugo * libmedusa/medusa-system-state.c: (medusa_setup_callback_for_system_state_change): Let this call work even if we are not in a main loop. 2001-02-21 Pavel Cisler * libmedusa/medusa-search-service.h: * libmedusa/medusa-unindexed-search.h: Fix it even more. 2001-02-21 Pavel Cisler * gnome-vfs-module/search-method.c: Fix more build breakage. 2001-02-20 Rebecca Schulman Add a THANKS file, and a few small bug fixes * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_open), (medusa_io_handler_free): Add g_return_if_fails, so errors will produce criticals, not seg faults. * AUTHORS: Add Seth and Maciej, who wrote the gnome vfs search module and other parts of medusa. * THANKS: Add a THANKS file, and include people who've helped fix portability problems in medusa * libmedusa/medusa-unsearched-locations.c: Remove an old fixme * search-service/medusa-file-search-daemon.c: (make_sure_search_socket_is_available): Fix a leak of the search socket name 2001-02-20 Pavel Cos;er reviewed by: Rebecca Schulman * gnome-vfs-module/search-method.c: * libmedusa/medusa-indexed-search.c: * libmedusa/medusa-search-service.c: * libmedusa/medusa-unindexed-search.c: Fix Medusa build breakage, part 2. Shuffle #includes around to support recent making of gnome-vfs-private-types.h really private. 2001-02-20 Seth Nickell reviewed by: Rebecca Schulman * configure.in: Add checks for various Solaris items. * indexer/medusa-file-index-daemon.c: (exit_if_disk_is_too_full): * libmedusa-internal/medusa-conf.h: * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_mime_type_decode), (medusa_file_database_keywords_decode), (medusa_file_index_encoders_test): * libmedusa-internal/medusa-file-index-encoders.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_file), (medusa_file_index_is_text_file), (medusa_file_index_is_application), (medusa_file_index_is_music), (medusa_file_index_is_directory), (medusa_file_index_marked_with_keyword): * libmedusa-internal/medusa-query-clauses.c: (value_has_correct_type): * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-text-index-plaintext-module.c: (read_more_data), (word_contains_digits): * libmedusa-internal/medusa-uri-list-encoders.c: (medusa_uri_list_filename_decode), (medusa_uri_list_directory_name_decode): * libmedusa-internal/medusa-uri-list-queries.c: (medusa_uri_list_is_in_directory), (medusa_uri_list_is_in_directory_tree), (medusa_uri_list_is_named), (medusa_uri_list_has_name_regexp_matching), (medusa_uri_list_is_in_directory_regexp_matching), (medusa_uri_list_has_name_containing), (medusa_uri_list_is_in_directory_containing), (medusa_uri_list_has_file_name_starting_with), (medusa_uri_list_has_file_name_ending_with): * libmedusa-internal/medusa-uri-list.c: (medusa_uri_number_to_uri): * libmedusa/medusa-index-progress.c: (get_disk_used_information): * libmedusa/medusa-search-service.h: * libmedusa/medusa-system-state.c: (medusa_system_services_are_enabled): * libmedusa/medusa-system-state.h: * libmedusa/medusa-unsearched-locations.c: (file_stoplist_initialize): * libmedusa/medusa-utils.h: * medusa-idled/medusa-idled-client.c: * search-service/medusa-authenticate.c: (medusa_authenticate_create_cookie_file): * search-service/medusa-file-search-daemon.c: Correct lots of little Solaris build problems. * medusa-idled/medusa-idled.c: (main): Correct a couple minor Debian build problems. 2001-02-20 Eric Fischer * doc/Makefile.am: Add how_to_use_msearch and search_uri_rfc to EXTRA_DIST, so they will get included when you do make dist, so they will make it into the RPMs, and maybe tinderbox will actually finally succeed for once. 2001-02-20 Eric Fischer * medusa.spec.in: Actually, follow the example of other gnome .spec files and use globbing to put anything that ends up in the man directories into the RPMs, gzipped or not. 2001-02-20 Eric Fischer * medusa.spec.in: Somewhere in the RPM build process, the man pages are getting gzipped. I do not know where, but update the .spec file to reflect it so it stops failing. 2001-02-20 Eric Fischer * medusa.spec.in: Add doc/ to paths for how_to_use_msearch, search_uri_rfc 2001-02-20 Eric Fischer * medusa.spec.in: Add medusa-enable-indexing to RPM file list (bug 6678) 2001-02-20 Eric Fischer * medusa.spec.in: Add man pages to RPM file list (bug 6108) 2001-02-20 Eric Fischer * medusa.spec.in: Add %{prefix}/sbin/medusa-test-indexing-status to RPM file list (bug 6713) 2001-02-20 Rebecca Schulman Make changes that will go along with nautilus changes to add an enable/disable medusa preference to nautilus * libmedusa/medusa-system-state.h: * libmedusa/medusa-system-state.c: (medusa_enable_medusa_services), (get_lock_and_read_enabled_users_file), (medusa_system_services_are_enabled), (medusa_system_services_have_been_enabled_by_user): Have medusa_enable_medusa_services take a boolean, and deprecate medusa_disable_medusa_services. Add the medusa_system_services_have_been_enabled_by_user function. Remove a bad free that was causing a crash after repeated preference switching. * index-configuration/medusa-enable-indexing.c: (main): Use the new enable_medusa_services api 2001-02-14 Rebecca Schulman Fix bugzilla.eazel.com bug 6452 that medusa creates a world writeable file that shouldn't be world writeable. * libmedusa/medusa-index-progress.c: (medusa_index_progress_new): Stop making this file world writeable. 2001-02-14 Rebecca Schulman * libmedusa/medusa-system-state.c: (medusa_system_services_are_enabled): Add a check for NULL whose omission was causing a crash if a configuration file could not be found 2001-02-14 Rebecca Schulman * gnome-vfs-module/search-method.c: (do_read_directory): Remove warnings about files returned that give error GNOME_VFS_ERROR_NOT_FOUND now that we understand that these files exist, but are broken symbolic links. this means that 1. There is not a problem with medusa's filtering mechanism 2. We actually want to return these results * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_new): Always return SERVICE_NOT_AVAILABLE if indexing is disabled or blocked. This will prevent us from using an old outdated index if indexing ever becomes disabled * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_read_search_result), (search_directory_contents_in_progress): Fix crash here that occurred because we sent a NULL list to the search_in_progress function, by calling the function before we remove the first element of a list, not after. Also add asserts to the function to ensure it's never called with a NULL list. 2001-02-13 Rebecca Schulman Add callbacks that applications can use when medusa system state changes, as part of bugzilla.eazel.com bug 6416 reviewed by: Seth Nickell * libmedusa/medusa-system-state.c: (call_callback_if_checking_for_new_state), (is_a_onetime_callback), (get_system_state), (check_for_system_state_changes), (medusa_setup_callback_for_system_state_change), (medusa_execute_when_system_state_changes), (medusa_execute_once_when_system_state_changes), (has_update_id), (system_state_poll_destroy_and_set_to_null), (medusa_remove_state_changed_function): * libmedusa/medusa-system-state.h: Add functions that can be used to setup callbacks when system state changes. * libmedusa/Makefile.am: Add gtk flags to the build to support the above functions * libmedusa/medusa-utils.c: (medusa_g_list_remove_deep_custom): * libmedusa/medusa-utils.h: Add new list function used by the new api in medusa-system-state * .cvsignore: * doc/.cvsignore: * index-configuration/.cvsignore: Add missing generated files to the .cvsignore file 2001-02-13 Rebecca Schulman Fix most of bug 4962, that errors in loading search directories can produce "Unhandled errors" and display a dialog to the screen. * gnome-vfs-module/search-method.c: (do_read_directory): Make errors in get_file_info a search result not interrupt a directory load. 2001-02-12 Rebecca Schulman Fix bugzilla.eazel.com bug 6459, that is_not searching is backwards. reviewed by: Maciej Stachowiak * libmedusa-internal/medusa-query-optimizations.c: (replace_username_with_uid_criterion), (replace_group_with_gid_criterion), (modified_query_can_be_rephrased_as_an_and_criterion), (can_replace_modified_with_mtime), (replace_modified_with_mtime_criteria): We optimize most modified queries to become mtime is_after & mtime is_before queries, but we can't do this for "modified is_not date" queries, because medusa doesn't support "or". Therefore check specially for the is_not case and don't optimize in this case. Also remove debugging printfs that seem to have been left behind. * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_not_modified_on_date), (medusa_file_index_verify_file_is_not_modified_on_date): Add regular queries for the modified is_not case. * libmedusa-internal/medusa-file-index.c: (file_index_clauses_using_index_only): Add the new clauses to the file index. * libmedusa/medusa-indexed-search.c: (authenticate_connection): Add a timeout when looking for a cookie, instead of spinning. 2001-02-12 Eric Fischer * acconfig.h: add #defines for MEDUSA_LOCALSTATEDIR and MEDUSA_SYSCONFDIR * configure.in: dereference localstatedir and sysconfdir, and substitute them in config.h rather than in the Makefiles generate man pages that need $prefix * index-configuration/Makefile.am: install into localstatedir/medusa and sysconfdir/medusa * indexer/Makefile.am: remove special -D flags for localstatedir and sysconfdir * libmedusa-internal/Makefile.am: remove special -D flags for localstatedir and sysconfdir * libmedusa/Makefile.am: remove special -D flags for localstatedir and sysconfdir * libmedusa/medusa-index-service.c: add #include to pick up directory #defines * libmedusa/medusa-system-state.c: add #include to pick up directory #defines * medusa.spec.in: fix spec file so that RPMs will actually have the right sysconfdir and localstatedir All this is to fix the messed-up way I handled the change to localstatedir and sysconfdir the first time around. 2001-02-12 Eric Fischer * doc/msearch.1: Add manual pages for msearch 2001-02-12 Eric Fischer * doc/Makefile.am: Make Makefile install manual pages * doc/medusa-searchd.8.in: Add manual page for medusa-searchd 2001-02-12 Rebecca Schulman Fix bug 6015, that nautilus will crash if the file stoplist is not installed in the right place. * libmedusa/medusa-unsearched-locations.c: (file_stoplist_initialize): Add a missing return. We also need to figure out why the stoplist file is not getting installed in the right place in the hourly rpms. 2001-02-12 Rebecca Schulman Fix bug 6464, that medusa seems to continue searching after "stop" is pressed by correctly cancelling the unindexed search. * libmedusa/medusa-utils.c: * libmedusa/medusa-utils.h: (medusa_full_path_from_directory_and_file_name), (medusa_full_uri_from_directory_uri_and_file_name), * libmedusa-internal/medusa-uri-list.c: (medusa_uri_number_to_uri): * libmedusa-internal/medusa-master-db.c: (index_directory), (index_file), (add_public_keywords_to_index), (add_private_keywords_to_index), (index_public_metafile), (index_private_metafiles_for_user): Change names of medusa_full_path_from_directory_and_file to medusa_full_path_from_directory_and_file_name and medusa_full_uri_from_directory_and_file to medusa_full_uri_from_directory_uri_and_file_name * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new), (medusa_search_service_connection_start_search), (medusa_search_service_connection_read_search_result), (uri_to_search_method): Fix a bug that might crash the search module if the root uri in the search uri was not bracketed. Now return an INVALID_URI error. Use GNOME_VFS_ERROR_CANCELLED instead of GNOME_VFS_ERROR_INTERRUPTED, and fix a check for GNOME_VFS_OK, that was check a pointer instead of its value * libmedusa/medusa-unindexed-search.c: * libmedusa/medusa-unindexed-search.h: (medusa_unindexed_search_new), (cleanup_current_directory_information), (medusa_unindexed_search_read_search_result), (closedir_cover), (keywords_information_destroy_cover), (medusa_unindexed_search_destroy), (g_list_remove_first_link), (pop_keyword_information_and_directory_from_stacks), (search_directory_contents_in_progress), (keywords_information_destroy), (search_directory), (unbracket_root_uri): Stop doing an unindexed search in a different process, which was causing it to not cancel properly, and also possibly to crash nautilus later * msearch/medusa-command-line-search.c: (main): Add warnings and criticals in the debugger, and remove extraneous code * search-service/medusa-authenticate.c: (medusa_authenticate_uid_can_read): Change a g_return_if_fail to a silent check. 2001-02-11 Rebecca Schulman Some general cleanup, and fix the problem that medusa was creating zombie processes. * libmedusa-internal/medusa-text-index.c: Reduce word hash table size from 22 to 21. We were going to double this so we wouldn't worry about full hash tables for 1.0, but it takes up too much memory. * search-service/medusa-file-search-daemon.c: (exit_if_client_closes_socket), (main), (query_loop): Make it so children correctly exit if the client closes a socket, and can also terminate correctly, by explicitly telling the search daemo to ignore its children's termination status on exit. * search-service/medusa-authenticate.c: (medusa_authenticate_create_cookie_file): * search-service/medusa-file-search-parse-transmission.c: (send_cookie_creation_acknowledgement): Remove extraneous printfs 2001-02-11 Rebecca Schulman Fix bug 6413, to make it possible to block medusa usage. * index-configuration/medusa-test-indexing-status.c: (main): * index-configuration/Makefile.am: Add program to check whether medusa is currently enabled. * index-configuration/medusa.cron.in: * index-configuration/medusa-init.in: Only run these if indexing is enabled on the system * libmedusa/medusa-stdio-extensions.c: (medusa_read_whole_file): Fix bug that did not 0 terminate the file contents. * libmedusa/medusa-system-state.c: (get_users_with_medusa_already_on_from_system_file), (medusa_system_services_are_enabled): Be consistent about return values for get_users_with_medusa_on_from_system_file * libmedusa/medusa-system-state.h: Add glib.h to the includes because gboolean is used 2001-02-09 Ramiro Estrugo * index-configuration/medusa-enable-indexing.c: Fix broken build. Need to include for exit() 2001-02-09 Rebecca Schulman Add API to check whether medusa is enabled, disabled, or blocked, and to enable or disable the service. Blocking needs to still disable the cron job completely. Also move a few files into the public library so that they can be used by the new code reviewed by: Maciej Stachowiak * libmedusa/medusa-system-state.c: (get_users_with_medusa_already_on_from_system_file), (write_name_and_newline_to_system_file), (write_explanatory_comment_to_configuration_file), (write_users_with_medusa_enabled_to_system_file), (medusa_enable_medusa_services), (medusa_disable_medusa_services), (medusa_system_services_are_enabled), (medusa_system_services_are_blocked): * libmedusa/medusa-system-state.h: * libmedusa-internal/medusa-lock.c: * libmedusa-internal/medusa-lock.h: * libmedusa-internal/medusa-lock-file-paths.h: * libmedusa-internal/medusa-stdio-extensions.c: * libmedusa-internal/medusa-stdio-extensions.h: Move to libmedusa * libmedusa/medusa-lock.c: (get_unprivileged_lock_file_name), (medusa_read_lock_unprivileged_get_with_timeout), (medusa_write_lock_unprivileged_get_with_timeout), (medusa_lock_get_with_timeout): * libmedusa/medusa-lock.h: Add unprivileged locking to the locking API, so we can lock the configuration files * libmedusa/medusa-stdio-extensions.c: (medusa_read_whole_file): Fix a bug that would return a NULL buffer in the case where the number of bytes read was 0. Now return "". * indexer/medusa-file-index-daemon.c: * search-service/medusa-file-search-daemon.c: * libmedusa-internal/medusa-string-list.c: Change dependency information based on the above move * libmedusa-internal/Makefile.am: * libmedusa/Makefile.am: Remove and add moved files respective, also add the new system state files to the latter Makefile. * libmedusa/medusa-index-service.c: Remove invalid dependencies to files in libmedusa-internal * configure.in: Add MEDUSA_SHAREDSTATEDIR, to install the list of enabled users in * index-configuration/medusa-init.in: Kill everything when we stop * index-configuration/medusa.conf: Configuration file that will allow medusa to be blocked * index-configuration/sample_enabled_users_file: Add a sample enabled user file * index-configuration/medusa-enable-indexing.c: (main): Add command line tool to turn medusa on and off * index-configuration/.cvsignore Update, since now this directory has a compiled binary in it * index-configuration/Makefile.am: Add the above new files to the build * tests/.cvsignore: * tests/Makefile.am: * tests/medusa-system-state-test.c: (main): Add test to show what the current system state is * README: Add information on enabling, disabling and blocking, remove obsolete information, and answer some frequently asked questions 2001-02-08 Eric Fischer * doc/medusa-config.1: * doc/medusa-file-index-stoplist.5.in: * doc/medusa-idled.1: * doc/medusa-search-uri.7: A first batch of man pages. More, and supporting Makefile additions, to follow. 2001-02-07 Rebecca Schulman Make changes to medusa calls that don't properly cancel for gnome-vfs. Fixing these calls will fix bugzilla.eazel.com bug 6290, where nautilus blocks during searches. Also added refs * libmedusa/medusa-indexed-search.c: (read_cancellable), (authenticate_connection), (refresh_read_buffer_if_needed), (read_connection_line), (get_search_uri_parsing_result), (medusa_indexed_search_new), (medusa_indexed_search_read_search_result): * libmedusa/medusa-indexed-search.h: Add cancellation to the read_search_result and new calls, and fix a crash that occurred because of an improperly passed NULL buffer when the server closed the connection to the client early. (medusa_indexed_search_is_available): Rewrite this call to not block because it is called synchronously in nautilus, and can hang it * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new), (medusa_search_service_connection_read_search_result): * libmedusa/medusa-search-service.h: Add GnomeVFS context to the connection_new call, so that this call can be cancelled properly * gnome-vfs-module/search-method.c: (do_open_directory): Call connection_new with a cancellation context * msearch/medusa-command-line-search.c: (main): Add context to the connection_new call. This call is synchronous, so the context is just NULL * search-service/medusa-file-search-daemon.c: (client_has_sent_information), (query_loop): Make the forked process ref the database, to avoid using a freed database that was crashing the search daemon 2001-02-06 Rebecca Schulman * gnome-vfs-module/search-method.c: (do_get_file_info): Check for cancellation before completing * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_read_search_result): Handle NULL silently when a load is interrupted, rather then giving a critical warning. * search-service/medusa-file-search-daemon.c: (main): Stop ignoring sigpipe, so that old search daemon processes will quit transparently. * search-service/medusa-file-search-parse-transmission.c: (present_query_results): Fix off by one buggy string code 2001-02-05 Rebecca Schulman Fix bug 1353 cheaply for 1.0. reviewed by: Maciej Stachowiak * libmedusa-internal/medusa-text-index.c: Double the size of the word hash table for 1.0, as per Don's advice. The rest of this task we're moving out to 1.0.1 2001-02-05 Rebecca Schulman reviewed by: Pavel Cisler * search-service/medusa-file-search-daemon.c: Make the search service split off processes doing searches, so that several requests can be handled at once. This seems to remove timing problems that were causing some searches in nautilus to lock up. * libmedusa/medusa-search-service-private.h: * libmedusa/medusa-indexed-search.c (authenticate_connection): Add "TIMEOUT_ERROR" that we send if the client is not responsive for 5 seconds. * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission): Make a transmission of length 0 return silently rather than display a critical error 2001-02-01 Rebecca Schulman reviewed by: Maciej Stachowiak * libmedusa/medusa-index-progress.c: (medusa_index_is_currently_running), Fixed a bug that was expecting a busy indexer to return the wrong enum value. (medusa_index_progress_get_percentage_complete): Make this function return "0" if indexing is not occurring. 2001-01-31 Rebecca Schulman reviewed by: * libmedusa/medusa-search-service.c: (medusa_search_service_connection_read_search_result): Check for a cancellation message before reading each search result, rather than just the unindexed search results * libmedusa/medusa-unsearched-locations.c: (file_stoplist_initialize): Add afs volumes to the kind of volumes we don't index. 2001-01-30 Mike Fleming Updated to the new GnomeVFSMethod format * gnome-vfs-module/search-method.c: 2001-01-29 Pavel Cisler * tests/search-method-test.c: (async_directory_load_callback), (main): Update to match GnomeVFS API changes. 2001-01-29 Josh Barrow * medusa.spec.in: Changed so that the documentation is now installed. Fixes bug 6108 2001-01-29 Robin * Slomkowski * configure.in: upped version to 0.3.1 to be higher than release 2001-01-25 Eric Fischer * configure.in: Add generation of MEDUSA_SYSCONFDIR and MEDUSA_LOCALSTATEDIR to move stoplist and index files out of /usr/share and into /etc and /var. * index-configuration/.dummy: Dummy file because I don't know how to make a Makefile.am that installs an empty directory. * index-configuration/Makefile.am: Add installation of dummy directory; move file-index-stoplist * indexer/Makefile.am: Add defines for MEDUSA_SYSCONFDIR and MEDUSA_LOCALSTATEDIR * indexer/medusa-file-index-daemon.c: (exit_if_disk_is_too_full): Change MEDUSA_PREFIX locations to MEDUSA_LOCALSTATEDIR * libmedusa-internal/Makefile.am: Add defines for MEDUSA_SYSCONFDIR and MEDUSA_LOCALSTATEDIR * libmedusa-internal/medusa-conf.h: Remove define for INDEX_PATH, now implicit in LOCALSTATEDIR * libmedusa-internal/medusa-index-filenames.c: (medusa_generate_index_filename): Change MEDUSA_PREFIX locations to MEDUSA_LOCALSTATEDIR * libmedusa/Makefile.am: Add defines for MEDUSA_SYSCONFDIR and MEDUSA_LOCALSTATEDIR * libmedusa/medusa-index-service.c: (get_last_index_update_time_by_hack): Change MEDUSA_PREFIX locations to MEDUSA_LOCALSTATEDIR * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_system_index_files_look_available): Change MEDUSA_PREFIX locations to MEDUSA_LOCALSTATEDIR * libmedusa/medusa-unsearched-locations.c: Change MEDUSA_PREFIX location to MEDUSA_SYSCONFDIR * medusa.spec.in: Move file-index-stoplist; add $localstatedir 2001-01-24 Rebecca Schulman Added cancellation support to work around problems with cancellation in gnome-vfs, and changed the read loop of the search daemon to make sure it doesn't get confused by extra or abnormal requests. This bug was causing searches in nautilus to lock up. * libmedusa/medusa-search-service.c: * libmedusa/medusa-search-service.h: * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_new), (medusa_unindexed_search_read_search_result), (medusa_unindexed_search_destroy): * libmedusa/medusa-unindexed-search.h: (medusa_search_service_connection_read_search_result): * gnome-vfs-module/search-method.c: (do_read_directory): * msearch/medusa-command-line-search.c: (main): Add gnome-vfs contexts where appropriate so that we can check the context for the unindexed search and effectively cancel. The indexed search is fast enough that not cancelling shouldn't cause problems, at least for PR3. * search-service/medusa-file-search-daemon.c: (query_loop): Change the read loop to not get confused by extra transmissions to the search daemon, by timing out if we get no response. This confusion was causing future searches not to be accepted, and in turn locked nautilus up in gnome-vfs. * libmedusa/medusa-unsearched-locations.c: (medusa_unsearched_locations_shutdown): Make this free NULL tolerant, so you can shutdown more than once, which was happening and produced spam. * libmedusa/medusa-indexed-search.c: (refresh_read_buffer_if_needed), (read_connection_line), (get_search_uri_parsing_result): Make changes to prevent one crash that occurred when the search daemon closed the connection to the search service early, by explicitly checking for a read return value of -1. 2001-01-22 Eric Fischer * index-configuration/medusa-init.in: Change --with-listener option to medusa-indexd to its new name, --start-listener Put medusa-searchd back in the list of daemons to start, in accordance with Rebecka's comments to bug 4710 2001-01-22 Rebecca Schulman Fix problems in medusa necessary to fix bugzilla.eazel.com bug 2659, and add the new "unindexed_search_is_available_for_uri" function. * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_parse), (parse_search_criterion): Remove a g_return_if_fail that should have been a silent check, and a bogus return that was keeping content searches from working * libmedusa/medusa-unindexed-search.c: * libmedusa/medusa-unindexed-search.h: (medusa_unindexed_search_new), (medusa_unindexed_search_is_available_for_uri): Add new function that only returns GNOME_VFS_OK for searches where we could do a valid backup search (ie, that don't contain content requests) * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available_for_uri), (medusa_search_service_connection_new): Change these functions to take into account the fact that unindexed search is not always an option 2001-01-22 Rebecca Schulman Fix problems with running searches that occurred when a search daemon was running but no index was available. * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new): Deal with errors in the indexed search connection when searching using "index-with-backup." If no index is available, we now just do an unindexed search, instead of sending the NULL indexed search connection to the wrong places. * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_start_search), (search_directory): Exit with the correct codes and if there are problems returning results. * libmedusa/medusa-log.c: (medusa_log_error): Get rid of periods in error log output 2001-01-19 Rebecca Schulman reviewed by: John Sullivan * libmedusa-internal/medusa-search-uri.c: (get_verb_from_criterion): Fix a bug that could cause us to call "strchr" on a NULL pointer, by checking for NULL first. * libmedusa/medusa-index-service.c: (medusa_index_service_is_available), Change the return values to be of type IndexerStatus, rather than the old type which was the return of a reindexing request. "REINDEXING_FAILED" was not a reasonable way to communicate that an index was already being created. (get_last_index_update_time_by_hack): Remove spam that occurred if no index was present. * libmedusa/medusa-index-service.h: Fix indenting * libmedusa/medusa-indexed-search.h: * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_is_available), (medusa_indexed_search_system_index_files_look_available): Turn off the debugging flag (!) and add a check for the presence of index files so that the file search ui in nautilus can use it to tell the user that their index files are available, but the medusa search daemons aren't running, rather than telling them they need to remake an index. 2001-01-18 Eric Fischer * index-configuration/medusa-idled.csh.in: to avoid the error messages csh gives when referring to unitialized shell variables, just call the /bin/sh version of the script. 2001-01-17 Rebecca Schulman Fix bugzilla.eazel.com bug 5422, that other applications should be able to query the status of the index service, and whether indexed searches are currently available. * libmedusa/medusa-index-service.c: * libmedusa/medusa-index-service.h: (open_index_socket_and_send_message), (medusa_index_service_request_reindex), (medusa_index_service_is_available): Add the new index service is available call, that asks the indexer if it's up, and if so, if an index is currently being made. * libmedusa/medusa-index-service-private.h: Add the protocol for the new "is the index service available" request of the indexer. * tests/medusa-index-service-test.c: (main): Update the test program to use the new call. * libmedusa/medusa-index-progress.c: (medusa_index_is_currently_running), (medusa_index_progress_get_percentage_complete): Use the new "index_is_available" call, instead of doing an "access" * libmedusa-internal/medusa-lock.c: (medusa_write_lock_get), (medusa_lock_get), (medusa_lock_release): Fix bugs: make the write lock be a write lock instead of a read lock. Return an error instead of waiting for the lock, and close the file descriptor lock when we release instead of leaking it. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_create_index): Start the index progress before we "sleep until idle" so that nautilus will correctly report the index is being made and is "0%" complete, instead of giving you the option to make an index. * indexer/medusa-file-index-daemon.c: (daemon_init), (main), (wait_for_indexing_signal), (do_full_indexing), (initialize_index_server_socket), (file_indexer_parse_transmission): Cleanup the listener code, that didn't seem to be working. Also, make it respond to the new "is indexer available" request, instead of just accepting requests to reindex. Make the listener not start indexing automatically. Log errors when appropriate instead of using "g_return_if_fail" Fork the reindexing process, and keep listening so that we can tell future callers that the indexer is busy. Add a "daemon_init" that starts the listener as a real daemon, a "--debug-listener" to debug it without forking and losing the output. * RENAMING: Recommend changing the name "index-service" to "reindexing-service" to more clearly differentiate it from the indexed-search-service. * medusa-idled/medusa-idled.c: (daemon_init): Remove a fixme that has been fixed 2001-01-15 Eric Fischer * index-configuration/medusa-idled.csh.in: add check to see whether $DISPLAY is set, because csh considers uninitialized variables to be errors rather than simply empty strings. * index-configuration/medusa-idled.sh.in: clean up formatting 2001-01-15 Eric Fischer * medusa.spec.in: moved tmp/medusa.init back under %{prefix} because I don't seem to know how to do absolute pathnames in .spec files correctly. 2001-01-15 Eskil Heyn Olsen * index-configuration/Makefile.am: Added medusainit_DATA to extra dist, should make tinderbox happy 2001-01-15 Eric Fischer * medusa.spec.in: make path to profile.d not depend on %{prefix}, since the files will only be found at login if they're in /etc/profile.d, not /usr/local/etc/profile.d make path to tmp/medusa-init not depend on %{prefix}, since /usr/local/tmp probably doesn't exist, and probably has no reason to. 2001-01-12 Rebecca Schulman Reviewed by: John Sullivan * libmedusa-internal/medusa-master-db.c: (index_directory), (file_name_looks_invalid): Skip files with no name, as reading them as is causes an infinite loop of indexing the same directory. * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_start_search): Correctly return an error if we try to search for a uri that contains invalid criteria. Also, remove some spam that the unindexed search would spew when done. 2001-01-12 Rebecca Schulman Changes to add a --without-idle-checks option to the indexer for debugging purposes * indexer/medusa-file-index-daemon.c: (main), (wait_for_indexing_signal), (do_index_accounting), (exit_if_disk_is_too_full), (do_full_indexing), (get_index_socket_name), (initialize_index_server_socket), (file_indexer_parse_transmission): Clean this up. Make listeners get created correctly for different indexer names, and correctly truncate the path name for the index socket * libmedusa-internal/medusa-master-db-private.h: Add a "don't use idle connection" parameter to the database controller structure. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_create_index), (index_directory): * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_finish_indexing), (sleep_until_idle_when_idle_check_interval_has_passed), (sort_temp_index_data_into_permanent_index): * libmedusa-internal/medusa-text-index.h: Don't use the idle service if we request not to on the command line. * tests/medusa-text-index-test.c: (main): Change the signature of medusa_master_db_create_index to accept the added parameter * libmedusa/medusa-log.c: (open_log_file_if_necessary_or_fail), (medusa_log_event): Behave correctly in the case where the log file cannot be created, and don't accept NULL messages to be logged. * libmedusa/medusa-utils.c: (medusa_get_system_time): * libmedusa/medusa-utils.h: Add this function for testing purposes * medusa-idled/medusa-idled-client.c: (medusa_idle_service_register), (reregister_idled_connection_if_possible), (medusa_idle_service_request_current_idle_status): Correct more file descriptor leaks. * medusa-idled/medusa-idled.c: (clean_up_socket_before_exiting_cover), (initialize_server_socket): Add a function to remove the socket on exit. This prevents the problem that root running the idled would prevent others from running it later. * search-service/medusa-file-search-daemon.c: (main), (query_loop), (ensure_index_validity), (initialize_socket): Log search service errors as appropriate instead of sending them to the command line 2001-01-12 Josh Barrow reviewed by: * medusa.spec.in: Hopefully added medusa-idled to the rpm build. I have no clue about rpm spec files, but Stephane does and she said this should work. 2001-01-12 Rebecca Schulman Some cleanup, and adding specific logging to track down a bug that I'm working on with a tester who has only daily builds * indexer/medusa-file-index-daemon.c: (do_full_indexing): Remove the "get_current_log_level" function and use the medusa-log one. * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_open): use stat instead of lstat here because we are accessing the file size, and we don't want the size of the link itself. * libmedusa-internal/medusa-master-db.c: (index_directory): Add abbreviated logs of when we index a file, directory, and skip a file on the stoplist. * libmedusa-internal/medusa-stdio-extensions.c: (medusa_read_whole_file): Use stat instead of lstat here as we are getting the file size * libmedusa/medusa-log.c: (medusa_log_event): Remove extraneous \n's 2001-01-11 Rebecca Schulman Fixed the problem that if there was a search service and no index, the search service would return no results and no error message. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open): Remove extraneous warnings * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_open): Change a critical to just be a check. * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_is_available), (medusa_indexed_search_new): Return the correct error if there is a problem authenticating the connection with the search (medusa_indexed_search_start_search), (medusa_indexed_search_read_search_result): Add g_return_if_fails so NULL's don't get past to these functions, which would seg fault in this case. 2001-01-11 Eric Fischer * medusa.spec.in: remove %{prefix} from init script search list, because init script directories are at the root level, not the prefix level add a set of quotes I forgot last time, in case %{prefix} has a space in it. 2001-01-11 Eric Fischer * medusa.spec.in: add quotes to protect against the possibility of file names containing spaces remove any existing medusa startup and shutdown scripts in rc0.d and rc2.d before making new links into these directories 2001-01-11 Eric Fischer reviewed by: * configure.in: add generation of medusa-init from medusa-init.in * index-configuration/Makefile.am: add medusa-init to files to be installed * medusa.spec.in: add medusa-idled.sh and medusa-idled.csh to files to be installed; add shell coding to determine the location of the init scripts on the system and relocate medusa-init there. 2001-01-10 Rebecca Schulman Fixed bug 5318, that keyword searches were only working for public keywords and those marked as root. * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_marked_with_keyword), (medusa_file_index_not_marked_with_keyword): Changed the keyword query functions to also take the uid of the user making the query. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (file_index_clauses_using_index_only), (file_index_clauses_using_index_and_uid), (medusa_file_system_db_get_query_clauses_using_index_only), (medusa_file_system_db_get_query_clauses_using_index_and_uid): Create two kinds of queries for this database: one set that require a uid argument, and another that require only an index query argument. (medusa_file_system_db_new), (medusa_file_system_db_open), (medusa_file_system_db_free): Only load the clauses when we open the database to do queries, not when we're indexing. * libmedusa-internal/medusa-query-clauses.c: (medusa_query_clauses_unref): * libmedusa-internal/medusa-query-clauses.h: Make this NULL tolerant so that we can free the query clauses even if we didn't load them. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_run_search), (query_execute_from_parsed_search_criterion), (criterion_check_is_true_for_uri_if_check_exists), (append_uri_to_results_if_matches), (content_requests_to_uri_numbers): Change "clause_closure" to "parsed_search_criterion" to be more clear. * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (medusa_search_uri_parse), (database_and_uid_data_new), (parse_search_criterion): Make the parser take a uid argument, and add this to the parsed search criteria where it will be needed to execute the query. (parsed_search_criterion_free_cover), (medusa_parsed_search_criterion_free), (medusa_parsed_search_criterion_list_free), (medusa_parsed_search_criterion_is_content_search), (medusa_parsed_search_criterion_has_check), (medusa_parsed_search_criterion_run_check), (criterion_is_content_request), (get_verb_from_criterion), (get_direct_object_from_criterion): Change "clause" to "criterion" to be more clear * search-service/medusa-file-search-parse-transmission.c: (handle_authenticated_request): Call the search uri parse argument with the newly added uid argument * libmedusa-internal/medusa-string-list.c: (medusa_string_list_get_string): Fix an off by one error. * libmedusa/medusa-service-private.c: Turn off debugging in the checked in copy * libmedusa/medusa-string.h: Include * medusa-idled/Makefile.am: Compile with glib libraries and use gtk libraries to get the right X libraries * medusa-idled/medusa-idled-client.c: (initialize_client_socket): * medusa-idled/medusa-idled.c: close the request port when a connect fails to avoid file descriptor leaks * msearch/medusa-command-line-search.c: (output_connection_error_message_and_exit), (main): Add a "\n" to the error message, and a gnome_vfs_shutdown. * search-service/medusa-file-search-daemon.c: (initialize_socket): Fix a free that was too early and prevented searches from working in many cases. 2001-01-08 Rebecca Schulman * medusa-idled/medusa-idled.c: Fix the build on redhat 7.0 2001-01-08 Rebecca Schulman * libmedusa-internal/Makefile.am: Changed a srcdir -> builddir that showed up in a make distcheck. 2001-01-08 Rebecca Schulman Add the medusa idled service. Make other small fixes, including changing the command line search to output search results as unescaped path names. reviewed by: Eric Fischer , Pavel Cisler * medusa-idled/medusa-idled.c: (daemon_init), (idle_status_message), (notify_client_of_current_idle_status), (add_new_client_to_client_list), (notify_clients_of_current_idle_status), (clean_up_socket_before_exiting), (initialize_server_socket), (window_or_its_children_have_idled_tag), (idled_tag_is_attached_to_an_alive_window), (make_sure_no_idled_is_running_and_tag_session), (main): The daemon that detects x session idle status (using the checks described below), manages a list of clients that want this status, and updates them when the idle status changes during a session. * medusa-idled/x-screensaver-code.c: (get_visual_resource), (x_screensaver_select_events_from_screen_windows), (x_screensaver_connect_to_server_and_get_display), (screen_number), (visual_depth), (x_screensaver_initialize_per_screen_info), (idle_timer), (reset_timers), (x_screensaver_schedule_wakeup_event), (check_for_clock_skew), (timestring), (x_screensaver_check_pointer_timer), (BadWindow_ehandler), (notice_events), (notice_events_timer), (start_notice_events_timer), (x_screensaver_check_for_idle_status_changes), (query_mit_saver_extension), (query_sgi_saver_extension), (query_xidle_extension), (x_screensaver_initialize_server_extensions): * medusa-idled/x-screensaver-code.h: The code we've cutted and pasted from x-screensaver. This includes checks for idleness using pointer location checks, keyboard events, X screensaver extensions, and /proc/interrupts. I haven't yet tested any of the X screensaver extensions because I don't have any of the necessary extensions. We should probably do this before releasing this code for PR3, or ifdef out the code completely, even when the necessary extensions are installed. * medusa-idled/medusa-idled-client.c: (get_current_idle_status), (find_last_buffer_line), (read_most_current_status), (initialize_client_socket), (medusa_idle_service_register), (reregister_idled_connection_if_possible), (medusa_idle_service_request_current_idle_status), (medusa_idle_service_sleep_until_idle), (medusa_idle_service_unregister_and_destroy_connection): * medusa-idled/medusa-idled-client.h: The idle client library. This includes commands to register and unregister from the server, and to request from the server to request the current activity from the session, and a request to "sleep until idle" * medusa-idled/medusa-idled-private.h: The constants used in the communication between the idle client and the idled. * Makefile.am: * configure.in: * medusa-idled/.cvsignore: * medusa-idled/Makefile.am: Add the new medusa-idled directory to the build. * libmedusa-internal/Makefile.am: Compile the medusa-idled library into the index library, so that the indexer can use it. * libmedusa-internal/medusa-master-db-private.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_create_index), (index_directory): * libmedusa-internal/medusa-text-index.c: (medusa_text_index_finish_indexing), (sort_temp_index_data_into_permenant_index): * libmedusa-internal/medusa-text-index.h: Add the idled client structure to the database controller structure, and make calls to "sleep_until_idle" intermittently. * index-configuration/.cvsignore: * index-configuration/Makefile.am: * index-configuration/medusa-idled.csh.in: * index-configuration/medusa-idled.sh.in: Add the installation files that will get installed as part of /etc/profile.d * msearch/medusa-command-line-search.c: (main): * search-service/medusa-file-search-daemon.c: (daemon_init): * indexer/medusa-file-index-daemon.c: (main): Note that we should be initing a daemon for the "with_listener" case (where the index daemon runs as a listener for index requests) * libmedusa/medusa-index-service.h: Add "indexer status" that we will use to fix bug 5422 2001-01-08 Rebecca Schulman Fix bugzilla.eazel.com bug 5432, that file_type searches stopped working. This turned out to be an artifact of my change from using hash tables to using string lists to store mime types. This change also includes a fix to ignore a EINTR from a connect call that seems to occur on Redhat 7.0. reviewed by: John Harper * libmedusa-internal/medusa-stdio-extensions.c: (medusa_read_whole_file): * libmedusa-internal/medusa-stdio-extensions.h: Change this function to return the number of bytes read, in addition to the buffer. * libmedusa-internal/medusa-string-list.c: (string_list_file_without_header), (medusa_string_list_open), Use the number of bytes read rather than strlen to determine the size of the file we read in, since strlen doesn't work when we read "/000" characters. Also fix an off by one error in the file header parsing code of the string list. (medusa_string_list_destroy): Remove the unnecessary checks for NULL that Pavel recommended be removed during a previous review session. * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_new): Add debugging code to the indexed search. * libmedusa/medusa-service-private.c: (root_owns_search_socket), (medusa_initialize_socket_for_requests): Fix a g_return_if_fail that should have just been a check, and ignore EINTR where appropriate, since it is safe to do so on connect calls, and we don't want to report than a search connection is unavailable in that case. * RENAMING: Add renaming of uri-list to uri-index, and change the name of the search_uri_rfc to "Search URI Specification" 2001-01-05 Rebecca Schulman Fix part of bug 5421, that searches in the absence of the index service should be run slowly. I added the new index-if-available search option that will do what we want, ie use the index to do a search if possible, otherwise do an unindexed search. This is a different option than doing both searches, which is offered through nautilus using a preference Also fix two fixmes 3006, 3008 and 2971. * doc/search_uri_rfc: Add explanation of the new index-if-available option * libmedusa-internal/medusa-search-uri.c: (bypass_search_method): * libmedusa/medusa-search-service.h: * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available_for_uri), (medusa_search_service_connection_new), (medusa_search_service_connection_start_search), (medusa_search_service_connection_read_search_result), (uri_has_valid_header), (uri_to_search_method): Clean up some of the code running the indexed and unindexed searches. Add the ability to run the indexed search if available. * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_read_search_result), (medusa_indexed_search_destroy), (matches_one_name): Fix 3006, and clear the read buffer before reading. Remove functions that are replaced by their gnome-vfs equivalents. * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_destroy): Change the destroy functions of both the unindexed and indexed searches to be NULL-tolerant, and call both from the search service on each connection. * libmedusa-internal/medusa-rdb-table-async.c: * libmedusa-internal/medusa-rdb-table-async.h: Remove these unused stale files. 2000-12-21 Rebecca Schulman reviewed by: Maciej Stachowiak * libmedusa-internal/medusa-conf.h: Cleaned up types of the database fields to use the correct system types for respective information, (gid_t for group, for example). * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_uri_number_encode), (medusa_file_database_mtime_encode), (medusa_file_database_owner_encode), (medusa_file_database_group_encode), (medusa_file_database_permissions_encode), (medusa_file_database_size_encode), (medusa_file_database_uri_number_decode), (medusa_file_database_mtime_decode), (medusa_file_database_owner_decode), (medusa_file_database_group_decode), (medusa_file_database_permissions_decode), (medusa_file_database_size_decode), (medusa_file_database_keywords_decode): * libmedusa-internal/medusa-file-index-encoders.h: Fixed the types on these to be correct with the changes to the types in the database, and greatly cleaned up encoders and decoders that are converting strings to tokens and vice versa. * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_of_type), (medusa_file_index_is_not_of_type), (medusa_file_index_is_file), (medusa_file_index_is_text_file), (medusa_file_index_is_application), (medusa_file_index_is_music), (medusa_file_index_is_directory), (medusa_file_index_has_uid), (medusa_file_index_has_gid), (medusa_file_index_does_not_have_uid), (medusa_file_index_does_not_have_gid), (medusa_file_index_is_modified_before_time), (medusa_file_index_is_modified_after_time), (medusa_file_index_is_larger_than), (medusa_file_index_is_smaller_than), (medusa_file_index_is_of_size), (medusa_file_index_uid_can_read_file), (medusa_file_index_marked_with_keyword), (medusa_file_index_not_marked_with_keyword), (medusa_file_index_verify_file_is_modified_before_time), (medusa_file_index_verify_file_is_modified_after_time): * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-uri-list-queries.c (medusa_uri_list_is_in_directory), (medusa_uri_list_is_in_directory_tree), (medusa_uri_list_is_named), (medusa_uri_list_has_name_regexp_matching), (medusa_uri_list_has_name_not_regexp_matching), (medusa_uri_list_is_in_directory_regexp_matching), (medusa_uri_list_is_not_in_directory_regexp_matching), (medusa_uri_list_has_name_containing), (medusa_uri_list_has_name_not_containing), (medusa_uri_list_is_in_directory_containing), (medusa_uri_list_has_file_name_starting_with), (medusa_uri_list_has_file_name_ending_with), (medusa_uri_list_has_name_glob_matching), (medusa_uri_list_has_full_file_name), (file_glob_to_regexp): * libmedusa-internal/medusa-uri-list-queries.h: Totally cleaned these up, and made them use the right decoder directly, instead of asking the now obsolete query code to do it, since the query code had no understanding of how to deal with data of types other than integer and string. * libmedusa-internal/medusa-file-information.c: Changed the types of the elements to be the correct system types * libmedusa-internal/medusa-query-clauses.c: (value_has_correct_type): * libmedusa-internal/medusa-query-clauses.h: Changed the argument type for numerical values to be NUMBER from INTEGER since we now use long to represent all numbers translated from strings, and they're not integers. * libmedusa-internal/medusa-file-index.c: (file_index_clauses): Removed deprecated casting of functions, and changed INTEGER to NUMBER in the argument types to go along with the changes to the ArgumentType names. * libmedusa-internal/medusa-search-uri.c: (clause_to_clause_closure), (medusa_clause_closure_free): * libmedusa-internal/medusa-search-uri.h: Use union of gint64 and char * to represent the object of a search criterion instead of our old lame gpointer, which was terribly confusing in the numerical case. * libmedusa-internal/medusa-query-optimizations.c: (last_time_corresponding_to_query_object): Fixed a bug that caused within a week of and within a month of to be interpreted as within a day of, and may have crashed the search daemon when a criterion beginning with modified that was invalid was entered. * libmedusa/medusa-string.c: (medusa_str_has_prefix), (medusa_str_has_suffix), (medusa_strcase_has_prefix), (medusa_strcase_has_suffix), (medusa_strstr_case_insensitive): * libmedusa/medusa-string.h: * libmedusa/medusa-utils.c: * libmedusa/medusa-utils.h: * libmedusa/Makefile.am: * libmedusa/medusa-unindexed-search.c: (matches_one_name): Moved the string functions from medusa-utils into medusa-string, and add a new set of case insensitive ones, so case sensitivity works correctly in searches. It seemed to be only working sporadically before. Use the new functions in the revised query functions (see above), and in the unindexed search as well. * search-service/medusa-authenticate.c: * libmedusa-internal/medusa-master-db.c: * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-versioned-file.c: * libmedusa/medusa-indexed-search.c: * libmedusa/medusa-search-service.c: Use the medusa-string header instead of the medusa-utils one, being deprecated. * libmedusa/medusa-file-info-utilities.c: (medusa_group_contains): * libmedusa/medusa-file-info-utilities.h: Move the group contains function into the file info utilities with other functions that manipulate stat info. * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-rdb-query-private.h: * libmedusa-internal/medusa-rdb-query.c: * libmedusa-internal/medusa-rdb-query.h: * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-rdb-file.h: Remove the now obsolete rdb query code that caused a lot of headaches, and type issues, and removed obsolete mentions of its headers. good riddance! 2000-12-20 Rebecca Schulman Fix bug 5289, that entering "search:" as a URI crashes Nautilus. Also, this commit includes the configure changes medusa will need for the X activity daemon that is still in production. reviewed by: Mike Fleming * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available_for_uri), (medusa_search_service_connection_new), (gnome_vfs_uri_to_search_method), (uri_to_search_method): Fix bug 5289. The problem was that the uri_to_search_method call assumed it would be handed a valid uri, which was not the case. Changed the signatures of the calls to return whether the uri seemed to be valid according to these calls' knowledge, and if not tell the callers, who then return a GNOME_VFS_ERROR_INVALID_URI * acconfig.h: * configure.in: Configure changes to determine whether any of the XScreenSaver extensions or /proc/interrupts are available for use in determining how idle a system is. * libmedusa/medusa-log.h: * libmedusa/medusa-log.c: (open_log_file_if_necessary_or_fail), (current_time_as_string), (medusa_log_error), (medusa_log_fatal_error), (medusa_log_event), (medusa_log_text_index_account_data): New additions to the log system, that we will use to fix problems in logging. These changes are also part of the impending change to add the X activity daemon. They should also improve logging around the rest of medusa, and will be used to fix bug 4557. 2000-12-20 Rebecca Schulman This change should address the first part of 1353, that medusa uses data structures that can "fill up." It does not address the more difficult second part of the bug, which will require reworking the lexicon of words used by the text index. reviewed by: Pavel Cisler * libmedusa-internal/medusa-string-list.c: (string_list_file_without_header), (medusa_string_list_open), (medusa_string_list_new), (medusa_string_list_get_string), (store_string_on_disk), (medusa_string_list_store_string), (free_cache_entry), (medusa_string_list_destroy): * libmedusa-internal/medusa-string-list.h: * libmedusa-internal/Makefile.am: Add a new data structure, called a string list, which can return tokens that will with a single lookup retrieve their corresponding string. strings can be stored with varying degrees of uniqueness, and medusa uses these different levels depending on the word set. For file names, which are diffuse, no uniqueness is requested, for directory names, only that the same name not be added twice in a row, in this case the last token is re-returned. Lastly, for mime types and other data sets that occur all the time, keep a full cache in memory and so tokens and words form a 1-to-1 correspondence. this data structure, should not fill up, and should be sufficiently adjustible in size. * libmedusa-internal/medusa-uri-list-private.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_open), (medusa_uri_list_erase_constructed_index), (medusa_uri_list_move_completed_index_into_place), (medusa_uri_list_index_files_are_still_valid)., (medusa_uri_list_destroy): * libmedusa-internal/medusa-uri-list.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_open), (medusa_file_system_db_free): * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open), (medusa_master_db_create_index), (medusa_master_db_index_files_are_still_valid), (medusa_master_db_erase_constructed_index), (medusa_master_db_move_completed_index_into_place), (index_file): Changed these indices to use string lists rather than hashes. Also, stop sharing the file and directory name lists, since the file index has no need for them anymoare. This considerably simplified a bunch of code, including removing the top level database's responsibilities regarding these data structures. * libmedusa-internal/medusa-uri-list-encoders.c: (medusa_uri_list_filename_encode), (medusa_uri_list_directory_name_encode), (medusa_uri_list_filename_decode), (medusa_uri_list_directory_name_decode): * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_uri_number_encode), (medusa_file_database_mime_type_encode), (medusa_file_database_owner_encode), (medusa_file_database_mime_type_decode), (medusa_file_database_keywords_encode), (medusa_file_database_keywords_decode): Changed the encoders that previously encoded using hash tables to encode using string lists. * libmedusa-internal/medusa-stdio-extensions.c: (medusa_read_whole_file): * libmedusa-internal/medusa-stdio-extensions.h: Add a new file for local i/o utilities. More should be moved here that exist in the future. * libmedusa-internal/medusa-conf.h: Fixed some database sizes that needed to be updated now that tokens are always the size of guint32's * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_uid_can_read_file): Remove an extraneous printf * libmedusa-internal/medusa-hash.h: Added ifdef's around the MedusaToken typedef, since we now also define it in medusa-string-list.h 2000-12-19 Darin Adler * libmedusa/medusa-index-progress.c: (medusa_index_progress_new): Fixed code that assumed size_t is int. 2000-12-13 Rebecca Schulman Fixed bugzilla.eazel.com bug 3098 that we log search requests where authentication fails * libmedusa/Makefile.am: * libmedusa/medusa-log.c: (medusa_log_get_current_log_level), (medusa_log_event), (medusa_log_text_index_account_data), (medusa_close_log_file_on_exit): * libmedusa/medusa-log.h: Add the new log class, which can log medusa events to a log file, and encapsulates functionality that was spread out over medusa before * search-service/medusa-file-search-daemon.c: (main), (query_loop), (ensure_index_validity): use the get_log_level function from the medusa-log class. * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission): Log an event when authentication fails * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-enums.h: Remove obsolete header file * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-text-index.c: * libmedusa-internal/medusa-text-index.h: * libmedusa-internal/medusa-uri-list-private.h: * libmedusa-internal/medusa-uri-list.h: Include the medusa-log.h header which now includes the MedusaLogLevel type, formerly in medusa-enums.h 2000-12-08 Rebecca Schulman Fixed bugzilla.eazel.com bug 3006, that the unindexed search searched files in the stoplist. * databases/.cvsignore: * databases/Makefile.am: * databases/dummy: * databases/file-index-stoplist: Removed the databases directory as we don't use it anymore. * libmedusa/medusa-unindexed-search.c: (search_directory): 2000-12-05 Rebecca Schulman Fixes for bug, that a second search daemon will overwrite the socket of the first. * libmedusa/medusa-service-private.h: * libmedusa/medusa-service-private.c: (medusa_initialize_socket_for_requests): Changed this function's parameter from type char to const char, since the function doesn't alter the argument, and so a const char can be passed in. * search-service/medusa-file-search-daemon.c: (main), (query_loop), (ensure_index_validity), (initialize_socket): Made index_name a global variable, since there is only one per invocation of a search daemon. (make_sure_search_socket_is_available), (can_write_to_existing_socket), (remove_listening_socket_on_interrupt), Added these functions to check if another search daemon is currently using the socket. If so we exit. If it is not in use, or if another user owns the socket file (a possible security issue) we erase the path and create our own socket there. 2000-12-04 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (exit_if_disk_is_too_full): change a struct name 2000-12-04 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (main), (exit_if_disk_is_too_full), (do_full_indexing): Fixed bugzilla bug 4649, that nautilus should refuse to run without a --force flag if the disk where the index will go looks very full. * libmedusa-internal/medusa-conf.h: Add INDEX_PATH variable, instead of hard coding /share/medusa. * libmedusa-internal/medusa-text-index.c: (medusa_text_index_move_completed_index_into_place): Remove old temporary index files. * libmedusa/medusa-utils.c: (medusa_group_contains): add a check for when a getpwnam fails, even when a getgrnam succeeds. 2000-11-30 Rebecca Schulman Fixes for bugs 3298 (about critical messages about null hash tables while running the search daemon), and 3201, that requestors should ensure root owns the search socket before sending requests. Also, a small leak fix. reviewed by: Gene Regan * libmedusa-internal/medusa-master-db.c: (medusa_master_db_create_index), (medusa_master_db_destroy): move the responsibility for freeing unsearched locations information from the destroy to the create_index function when done, so that the search daemon doesn't call it in errro. This fixed 3298. * libmedusa/medusa-service-private.c: (root_owns_search_socket), (medusa_initialize_socket_for_requests): Fixed 3201 by adding a check that root owns the socket path, before doing any work like opening it. * search-service/medusa-file-search-parse-transmission.c: (handle_authenticated_request): * libmedusa-internal/medusa-master-db.c: (medusa_master_db_run_search): Have the caller of medusa_master_db_run_search free its arguments rather than the function itself, and fixed a small string leak that occurred during content searches * libmedusa-internal/medusa-query-clauses.c: (value_has_correct_type), (match_search_clause_to_query_clause): Removed extraneous g_print statements. 2000-11-28 Rebecca Schulman Added bug numbers to unlabelled fixmes. * libmedusa-internal/medusa-index-filenames.c: (medusa_move_completed_index_file_into_place): * libmedusa-internal/medusa-query-clauses.c: (value_has_correct_type), (match_search_clause_to_query_clause): * libmedusa-internal/medusa-search-uri.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_open): * libmedusa/medusa-index-service.c: * search-service/medusa-file-search-parse-transmission.c: (handle_authenticated_request): 2000-11-21 Rebecca Schulman Patch to deal with typing issues, and to reject a clause if its value has the wrong type. This prevents destructive uris from crashing the s search daemoon * libmedusa-internal/medusa-query-clauses.c: (value_has_correct_type), (match_search_clause_to_query_clause): Add a check to the query clause finder to also require that the value be of the right type 2000-11-16 Rebecca Schulman This is a FIX for part 3 of bug 3920, which checks to make sure that files actually have the correct modification date before returning them. I didn't address other search types for this bug. buddy: * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_verify_file_is_modified_before_time), (medusa_file_index_verify_file_is_modified_after_time): Added check functions that do the verifying for modtimes * libmedusa-internal/medusa-file-index.c: (file_index_clauses): Add not only evaluation functions, but also verification functions for the mtime queries. * libmedusa-internal/medusa-master-db.c: (criterion_check_is_true_for_uri_if_check_exists), (append_uri_to_results_if_matches): Add running of check procedures before we check each result. * libmedusa-internal/medusa-query-clauses.h: * libmedusa-internal/medusa-query-clauses.c: (medusa_query_clauses_add_clause_with_check), (match_search_clause_to_query_clause), (medusa_query_clauses_get_function), (medusa_query_clause_new), (medusa_query_clause_new_with_check): * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (clause_to_clause_closure), (medusa_clause_closure_has_check), (medusa_clause_closure_run_check): Add a "Verify" field to the information about each possible query, and functions to check for and run a verify function * libmedusa/medusa-utils.c: (medusa_g_list_forall): * libmedusa/medusa-utils.h: Add new utility function that returns "TRUE" if a predicate is true for all elements in a list, false otherwise 2000-11-16 Ramiro Estrugo * libmedusa-internal/medusa-index-filenames.c: * msearch/medusa-command-line-search.c: Include needed system headers. 2000-11-15 Rebecca Schulman buddy: John Sullivan * libmedusa-internal/medusa-query-optimizations.c: (medusa_query_optimizations_initialize), (request_is_too_new_for_database), (request_is_newer_than_the_present), (set_error_always_false): Add a second preprocessor for search uris that will give an "ALWAYS_FALSE" error when searching for files modified after the present time. This prevents searches for files modified in 2001, for example, from returning a message that you need a more recent index. While true, it's not exactly the right response. * libmedusa/medusa-indexed-search.c: (medusa_indexed_search_new): Fixed a bug that didn't destroy the search handle when a parse error occurred and left the search server hanging. * DEBUGGING: Fix the way the --debug flag should be used when working with gdb. 2000-11-13 Rebecca Schulman Reviewed by: Maciej Stachowiak This should be the medusa work for bug 3920, that search by last modified can return no results if the index is too new. This involved creating a new method of reporting errors, so that the error would occur at the open_directory stage, where nautilus would catch it. Now there are two stages of report back to the client after a request is made. The first tells the client the results of parsing the uri. If there is a serious error, no search is made, and no results are returned. One of the possible errors is the error for 3920, the obsoleteness of the index. The code changes here are split into a few parts, first, the parsing errors were made public, and they have corresponding strings which are sent over the socket that both the client and the server understand. Next, the parsing must be when the search uri is opened, rather then when the query is run. * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_run_search), (medusa_master_db_destroy): Remove parser from the run_search code, and change a few function names to have clearer descriptions * libmedusa-internal/medusa-query-optimizations.c: * libmedusa-internal/medusa-query-optimizations.h: (medusa_query_optimizations_initialize), (medusa_query_optimizations_perform_and_free_deep), (medusa_query_optimizations_destroy), (optimization_is_applicable), (result_is_error), (optimization_result_new), (request_is_too_new_for_database), (set_error_request_obsoletes_index), (replace_username_with_uid_criterion), (replace_group_with_gid_criterion), (replace_modified_with_mtime_criteria): Add the "optimization" to detect if the index is not new enough to return any query results. This case causes an error and the search to be aborted. * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (medusa_search_uri_parse), (medusa_search_uri_cleanup_parse_data), (medusa_uri_is_search_uri): Clean this up, add consts where appropriate, and changed the cleanup_parse_data to reflect what it's doing. Also in the cases of errors, use the new mechanism, and return syntax errors where appropriate. * libmedusa/medusa-index-service.c: (get_last_index_update_time_by_hack): Fix an error that was using the wrong index name to get the last index time * libmedusa/medusa-indexed-search.h: * libmedusa/medusa-indexed-search.c: (authenticate_connection), (initialize_connection_buffer), (refresh_read_buffer_if_needed), (read_connection_line), (get_search_uri_parsing_result), (medusa_indexed_search_is_available), (send_search_uri), (medusa_indexed_search_new), (medusa_indexed_search_start_search), (medusa_indexed_search_read_search_result): Move a bunch of stuff around. There are two stages to reading the socket output, the parsing and the results read, so share the low level code between them * libmedusa/medusa-search-service-private.h: Add the new protocol strings necessary, and separate and label the various types of protocol strings stored in this header * libmedusa/medusa-search-service.h: * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new): Update to reflect the change in signature to indexed_search_new, which now takes a uri, so the parsing can occur. * msearch/medusa-command-line-search.c: (output_connection_error_message_and_exit), (main): output error messages corresponding to the newly generated messages. * search-service/medusa-authenticate.c: (medusa_authenticate_create_cookie_file): Remove real statements enclosed in g_return_if_fail wrappers, and let provide warnings in their case instead * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission), (transmit_string), (send_back_parsing_results), (handle_authenticated_request), (present_query_results), (send_cookie_creation_acknowledgement): Move around a bunch of code to reflect the two stage return process. 2000-11-08 Rebecca Schulman Finished bug 1778. There is now a test harness for medusa, in tests/run-search-uri-test.pl that can be run as root. The data for the tests is in tests/search-uri-test-data, and the format should be fairly self-explanatory. * libmedusa-internal/medusa-index-filenames.c: (medusa_move_completed_index_file_into_place): Removed extraneous printf * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open), (medusa_master_db_create_index): Corrected incorrect error messages, and fixed a small string leak * libmedusa/medusa-index-progress.c: (medusa_index_progress_new), (medusa_index_progress_update), (medusa_index_progress_destroy), (get_disk_used_information): Deal nicely with the failure of statfs and just don't keep track of indexing progress * tests/run-search-uri-tests.pl: Correct remaining bugs and give decent output. Also change to the script to read a newer, saner file format * tests/search-uri-test-data: Change the file format to be saner 2000-11-08 Rebecca Schulman * index-configuration/.cvsignore: Added medusa.cron * search-service/medusa-file-search-daemon.c: (get_search_socket_name): Fixed a problem creating the name of the socket by the server in the default index name case * tests/run-search-uri-tests.pl: 2000-11-08 Rebecca Schulman * libmedusa/medusa-index-service.c: (get_last_index_update_time_by_hack): Fix a problem that was breaking the nautilus build * tests/run-search-uri-tests.pl: More work on bug 1778. Still not complete 2000-11-08 Rebecca Schulman * libmedusa-internal/medusa-file-index.c: * libmedusa-internal/medusa-uri-list.c: Remove invalid header strings 2000-11-07 Rebecca Schulman Made medusa be able to create named, subsequent indices, and search and index them at the same time as the main index. This is most of the fix for bug 1778, which is to create a series of index tests. We'll create a separate index called "test". * indexer/medusa-file-index-daemon.c: (main), (do_index_accounting), (get_current_log_level), (do_full_indexing), (file_indexer_parse_transmission): Get rid of all of the old lists of removes, and use calls to the central database instead. * libmedusa-internal/medusa-conf.h: Gut this file, and move to the relevant objects. This file should be deprecated at some point. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_open), (medusa_file_system_db_free), (medusa_file_system_db_erase_constructed_index), (medusa_file_system_db_move_completed_index_into_place), (medusa_file_system_db_index_files_are_still_valid): * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open), (medusa_master_db_create_index), (medusa_master_db_index_files_are_still_valid), (medusa_master_db_erase_constructed_index), (medusa_master_db_move_completed_index_into_place): * libmedusa-internal/medusa-master-db.h: Added three new api calls to each of the indices. These are to erase indices, move the index files when finished, and check if the index files are still valid. Each index is now responsible for managing its own index files, and the master index manages files that are shared between indices. * libmedusa-internal/medusa-index-filenames.c: (medusa_generate_index_filename), (medusa_erase_constructed_index_file), (medusa_move_completed_index_file_into_place), (medusa_index_file_is_newer_than_time): * libmedusa-internal/medusa-index-filenames.h: Added new set of functions that know how to generate and manage index file names * libmedusa-internal/medusa-lock.c: (get_lock_file_name), (medusa_read_lock_get), (medusa_write_lock_get): * libmedusa-internal/medusa-lock.h: Create locks based on index names, rather than just having a single lock * libmedusa-internal/medusa-text-index-private.h: Removed unneeded fields from the structure. * libmedusa/medusa-file-info-utilities.c: (medusa_file_is_newer_than_time): * libmedusa/medusa-file-info-utilities.h: Add new function to check if a file is newer, used by the indices to determine if their files are still valid. * libmedusa/medusa-index-service.c: (get_last_index_update_time_by_hack): Make this even more of a hack, and generate a sample filename by hand * libmedusa/medusa-indexed-search.c: (get_search_socket_name), (medusa_indexed_search_new): Generate a socket name based on the index name * libmedusa/medusa-unindexed-search.c: * search-service/medusa-file-search-daemon.c: (get_search_socket_name), (main), (get_current_log_level), (query_loop), (ensure_index_validity), (initialize_socket): * libmedusa-internal/Makefile.am: Add the new files * tests/medusa-text-index-test.c: (main): Use the new api for the tests * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_index_encoders_test): Deprecate the old tests. There's a bug to revive them * libmedusa-internal/medusa-debug.c: (medusa_stop_in_debugger), (medusa_stop_after_default_log_handler), (medusa_set_stop_after_default_log_handler), (medusa_make_warnings_and_criticals_stop_in_debugger), (medusa_get_available_file_descriptor_count), (medusa_str_equal_with_free): Cut and paste this from nautilus * libmedusa-internal/medusa-debug.h: * RENAMING: Update and add. 2000-11-06 Rebecca Schulman Added bug numbers to all the fixmes. * libmedusa-internal/medusa-hash.c: (medusa_hash_open), (medusa_hash_new): * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_open), (medusa_io_handler_free): * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open), (medusa_master_db_query): * libmedusa-internal/medusa-text-index-plaintext-module.c: * libmedusa-internal/medusa-text-index-queries.c: (word_to_uri_numbers): * libmedusa-internal/medusa-text-index.c: * libmedusa-internal/medusa-versioned-file.h: * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available_for_uri): * libmedusa/medusa-unsearched-locations.c: (unsearched_mount_list_initialize): * tests/run-search-uri-tests.pl: Edits to comments 2000-11-06 Rebecca Schulman Fixed bug 4043, so that the cron script is relocatable. Also added debugging flag to the search daemon so that it won't fork when debugging * configure.in: Add generation of cron job to configure.in * index-configuration/medusa.cron: Remove this * index-configuration/medusa.cron.in: Add this, with @prefix@ relocatable directory * indexer/medusa-file-index-daemon.c: (main), (register_command_line_options): Rename some unclear variables * search-service/medusa-file-search-daemon.c: (main), (register_command_line_options): Add command line parsing to the search daemon and the new debug flag. * DEBUGGING: Documentation for the new debugging flag. 2000-11-01 Robin * Slomkowski * configure.in: upped version number for development after the tag to 0.2.3 2000-11-01 Robin * Slomkowski * configure.in: Just giving medusa version number 0.2.2 2000-10-31 Darin Adler * medusa.spec.in: Got rid of vendor and packager. Checking these in is a bad idea. See the discussion in bug 3461 for details. 2000-10-31 Darin Adler * configure.in: Fix gcc option check so it works properly. * indexer/modules/Makefile.am: Remove bogus "CPPFLAGS=" line that was overriding CPPFLAGS set by autoconf. * medusa.spec.in: Got rid of "Distribution: GNOME" since no one uses that field. Fixed "Eazel Inc." to say "Eazel, Inc." instead. Turned on "make -k" and "make check" so the Tinderbox does more better error reporting and testing. 2000-10-29 Eskil Heyn Olsen * medusa.spec.in: Yes, 1.10 breaks sleipnir rpm build. I'll stick with 1.9 for now. 2000-10-29 Eskil Heyn Olsen * medusa.spec.in: Reverted to 1.10 to make sure if it's the crontab changes that borks sleipnir 2000-10-29 Eskil Heyn Olsen * medusa.spec.in: Reverted to 1.9 2000-10-29 Eskil Heyn Olsen * medusa.spec.in: Reinserted the cron stuff, it didn't help sleipnir. 2000-10-29 Eskil Heyn Olsen * medusa.spec.in: Removing the cron stuff to see if that is responsible for killing the buildserver on sleipnir. 2000-10-29 Eskil Heyn Olsen * medusa.spec.in: Removed the obsolete in -devel if $prefix/lib not in /etc/ld.so.conf, add it. 2000-10-28 Ramiro Estrugo * medusa.spec.in: Change the %post and %postun sections a bit to prevent warnings being spewed by rpm at install time. 2000-10-27 Rebecca Schulman * medusa.spec.in: Changed the cron job to have the correct (Executable) permissions 2000-10-27 Robin * Slomkowski * medusa.spec.in:just added Vendor fields and new descriptions want Maciej to vet 2000-10-27 Rebecca Schulman * index-configuration/Makefile.am: Added medusa.cron to EXTRA_DIST, which should fix the rpm build problem 2000-10-27 Rebecca Schulman Fixed cron issues in medusa, with Ramiro's help, and also made the search daemon behave like a real daemon thanks to help from Advanced Programming in the UNIX Environment * index-configuration/Makefile.am: Get rid of the install script. The spec file now just copies the cron file to the right directory * index-configuration/medusa-install-cron.sh: get rid of this file * index-configuration/medusa.cron: revise the cron job to have the right directories for the rpm (/usr/bin) on the executables * medusa.spec.in: update to do above * search-service/medusa-file-search-daemon.c: (daemon_init), (main): add daemon_init. 2000-10-25 Rebecca Schulman * libmedusa-internal/medusa-search-uri.c: (medusa_parsed_search_uri_free): Don't free a list that was already emptied. * libmedusa-internal/medusa-text-index-plaintext-module.c: (read_more_data), (word_contains_digits): Don't index words containing digits * search-service/medusa-file-search-daemon.c: (index_files_have_changed): fix a true <-> false swap. Think this fixed another seemingly unrelated bug as well. 2000-10-24 Rebecca Schulman * index-configuration/medusa-install-cron.sh: fixed this so it works for inclusion in rpms. * libmedusa-internal/medusa-conf.h: Upped the default directory hash table size. 2000-10-23 Rebecca Schulman More leak fixes * libmedusa-internal/medusa-master-db.c: (medusa_master_db_query): Free the elements of a list that ended up in two partitioned lists, by freeing each of the partitioned lists. * libmedusa-internal/medusa-query-clauses.c: (medusa_query_clauses_get_function): free the word array on one of the return paths * libmedusa-internal/medusa-query-clauses.h: add MEDUSA_ARGUMENT_TYPE_NONE. This way all clause closues have an argument type, and we can free the strings correctly. * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_parse), (medusa_parsed_search_uri_free), (clause_to_clause_closure), (medusa_clause_closure_free), (medusa_clause_closure_list_free), (get_verb_from_clause), (get_direct_object_from_clause): Various leak issues. This code needs work. * libmedusa-internal/medusa-search-uri.h: add the medusa_clause_closure_list_free functio * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new): Return the right error in the case where a nonsense uri is given (INVALID_URI) and so the command line search gives a better error message * libmedusa/medusa-utils.c: Fixed a spelling error in a comment * msearch/medusa-command-line-search.c: (main): Correct punctuation in the error message, and add a new error message about invalid uris. * search-service/medusa-file-search-daemon.c: (main): ignore sigpipe instead of trying to handle it. This should prevent massive leakage in some cases. * search-service/medusa-file-search-parse-transmission.c: (present_query_results): Fix a huge leak caused by using a list element as an iterator, and then not freeing any of the list, since the current list pointer was to the end of the list, instead of the beginning. 2000-10-21 Eskil Heyn Olsen * configure.in: Bonged version to 0.2.1 for pr2. 2000-10-20 Rebecca Schulman A few small leak fixes * libmedusa-internal/medusa-lock.c: (medusa_lock_release): * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_parse), (clause_to_clause_closure): * libmedusa-internal/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_unref_cover): * libmedusa-internal/medusa-text-index-mime-module.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_destroy): 2000-10-18 Rebecca Schulman * libmedusa-internal/medusa-tokenize.c: (medusa_string_to_token): Added a check for the condition of the hash table being full, and exit on this case with a relevant error. 2000-10-18 Rebecca Schulman * libmedusa-internal/medusa-conf.h: Changed the confusing ".bak" suffix to ".in_progress" * libmedusa-internal/medusa-hash.c: (medusa_hash_new): Added a warning if a file is not successfully made, so we can debug this in the future. 2000-10-18 Josh Barrow * indexer/medusa-file-index-daemon.c: (main): Change --help instance of "directory" to "folder." This fixes bug 3844. 2000-10-16 Rebecca Schulman * libmedusa/medusa-index-progress.c: (medusa_index_progress_update): Turn off progress warnings. 2000-10-16 Rebecca Schulman * index-configuration/medusa-install-cron.sh: Improved installation as per Ramiro's instructions * libmedusa/medusa-index-progress.c: (medusa_index_progress_new), (medusa_index_progress_update): added a check for a 0 total space calculation on the drive, to prevent spurious warnings from resulting if there is a problem with the progress measurements 2000-10-10 Rebecca Schulman * index-configuration/medusa-install-cron.sh: Added a check to start and run cron. I need to replace it with what ramiro recommended * search-service/medusa-authenticate.c: (calculate_permissions_for_file): Stop spewing annoying "critical" warning when a file in the index isn't found on disk, since this is normal * tests/run-search-uri-tests.pl: First cut at the test script * tests/search-uri-test-data: Sample for the test data, to be filled out 2000-10-10 Josh Barrow * doc/smoketests.html: Made what to type clearer. 2000-10-06 Rebecca Schulman * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_open), (medusa_io_handler_write_blank_data), (medusa_adjust_filesize_to_pagesize): Removed a few calls that were trapped inside g_return_if_fails, and only check their error codes there. Fix an off by one error in the adjust filesize code. This should make things minorly more efficient. * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_new), (medusa_rdb_file_open), (medusa_rdb_file_free): Don't write the number of records on free if you are only reading the database 2000-10-04 Ramiro Estrugo * acconfig.h: * configure.in: Add profiling support via --enable-profiler. 2000-10-04 Rebecca Schulman Fixed some problems that were causing make distcheck to fail * index-configuration/Makefile.am: Added an EXTRA_DIST field, that was needed to properly install * indexer/Makefile.am: * search-service/Makefile.am: * tests/Makefile.am: Changed library directories to be builddir instead of srcdir * tests/medusa-index-service-test.c: * tests/medusa-queue-test.c: (main): * tests/medusa-versioned-file-test.c: * tests/search-method-test.c: Fixed header file path issues 2000-10-03 Josh Barrow * doc/medusa-smoke-tests/.nautilus-metafile.xml: Forgot one file. Yes, this is intentional. 2000-10-03 Josh Barrow * doc/medusa-smoke-tests/Medusa-application-document.c: (main): * doc/medusa-smoke-tests/Medusa-emblem-document: * doc/medusa-smoke-tests/Medusa-folder-test-1/Medusa-test-1.txt: * doc/medusa-smoke-tests/Medusa-folder-test-1/Medusa-test-2.txt: * doc/medusa-smoke-tests/Medusa-folder-test-1/Medusa-test-3.txt: * doc/medusa-smoke-tests/Medusa-folder-test-1/Medusa-test.txt: * doc/medusa-smoke-tests/Medusa-folder-test-2/Medusa-test-1.txt: * doc/medusa-smoke-tests/Medusa-folder-test-2/Medusa-test-2.txt: * doc/medusa-smoke-tests/Medusa-folder-test-2/Medusa-test-3.txt: * doc/medusa-smoke-tests/Medusa-folder-test-2/Medusa-test.txt: * doc/medusa-smoke-tests/Medusa-folder-test-3/Medusa-test-1.txt: * doc/medusa-smoke-tests/Medusa-folder-test-3/Medusa-test-2.txt: * doc/medusa-smoke-tests/Medusa-folder-test-3/Medusa-test-3.txt: * doc/medusa-smoke-tests/Medusa-folder-test-3/Medusa-test.txt: * doc/medusa-smoke-tests/Medusa-folder-test/Medusa-test-1.txt: * doc/medusa-smoke-tests/Medusa-folder-test/Medusa-test-2.txt: * doc/medusa-smoke-tests/Medusa-folder-test/Medusa-test-3.txt: * doc/medusa-smoke-tests/Medusa-folder-test/Medusa-test.txt: * doc/medusa-smoke-tests/Medusa-other-user-owned-document: * doc/medusa-smoke-tests/Medusa-root-owned-document: * doc/medusa-smoke-tests/Medusa-test-1.txt: * doc/medusa-smoke-tests/Medusa-test-2.txt: * doc/medusa-smoke-tests/Medusa-test-3.txt: * doc/medusa-smoke-tests/Medusa-test.txt: * doc/medusa-smoke-tests/Oddly-named-document: * doc/medusa-smoke-tests/Oddly-named-document-1: * doc/medusa-smoke-tests/Oddly-named-document-2: * doc/medusa-smoke-tests/Oddly-named-document-3: Added a folder that testers can index that tests the capibilities of Medusa. 2000-10-03 Rebecca Schulman * libmedusa-internal/medusa-file-index.h: Update fixme to reflect actual bug number 2000-10-03 Rebecca Schulman Removed the obsolete "databases" directory, and added the "index-configuration" directory. Added a cron job and a script for the rpm to use to install it. This should do most of the work for bug 3202, to have the indexer run by default at night * Makefile.am: * configure.in: removed "databases" and added "index-configuration" to the list of SUBDIRs * index-configuration/.cvsignore: * index-configuration/Makefile.am: * index-configuration/file-index-stoplist: * index-configuration/medusa-install-cron.sh: The new shell script to install the cron job * index-configuration/medusa.cron: The cron job * indexer/medusa-file-index-daemon.c: (main), (wait_for_indexing_signal), (do_full_indexing), (register_command_line_options): Added some nice happy command line options, so the indexer is nice to normal humans now. Removed the loop, and by default the index will index once and exit * libmedusa-internal/medusa-conf.h: Fixed an error in hash table sizes that was probably causing problems in searches by file type * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_index_encoders_test): Changed the strncpy's to g_strdup's which should still work for the purposes of the test, and will compile right with the new gcc * libmedusa-internal/medusa-uri-list-queries.h: Added braces around the endif comment to be ansi compliant * libmedusa-internal/medusa-versioned-file.h: removed the comment at the end of an enum to be ansi compliant * libmedusa/medusa-unsearched-locations.c: (file_stoplist_initialize): Added the ability to include comments in the stoplist * tests/.cvsignore: comment out the new search file test executale 2000-10-03 Rebecca Schulman Performance and bug fixes. Also added an async test for gnome-vfs results * configure.in: added check for gtk, so we can include the async test * libmedusa-internal/Makefile.am: Removed old unnecessary files, the table-async files. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_free): * libmedusa-internal/medusa-file-index.h: Fix memory leaks and remove unnecessary functions * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_free): fix memory leak * libmedusa-internal/medusa-master-db.c: (medusa_master_db_query), (medusa_master_db_destroy), (index_private_metafiles): * libmedusa-internal/medusa-query-clauses.c: (medusa_query_clauses_get_function): more memory leak fixes * libmedusa-internal/medusa-query-optimizations-private.h: * libmedusa-internal/medusa-query-optimizations.h: * libmedusa-internal/medusa-query-optimizations.c: (medusa_query_optimizations_destroy), (medusa_optimization_result_destroy): move destroy function to make it public * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_free), (medusa_rdb_query_criterion_free), (medusa_rdb_query_criterion_match): Simplify query caching, so we don't store large number of unnecessary regex patterns * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_all_rows), (medusa_rdb_table_insert), (medusa_rdb_table_free): * libmedusa-internal/medusa-rdb-table.h: Get rid of data we were keeping that was never used * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_parse), (medusa_parsed_search_uri_free), (medusa_search_uri_parse_shutdown), (medusa_clause_closure_free_cover): * libmedusa-internal/medusa-search-uri.h: Added free functions and fixed memory leaks * libmedusa-internal/medusa-uri-list.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_open), (medusa_uri_list_destroy), (read_index_info_from_database): Got rid of unnecessary fields, and freed metainfo correctly. * libmedusa-internal/medusa-versioned-file.c: (read_file_header): fix memory leak * libmedusa/medusa-unsearched-locations.c: (unsearched_mount_list_initialize): memory fixes * libmedusa/medusa-utils.c: (medusa_group_contains): Moved a check for group validity, to the function that only uses * search-service/medusa-authenticate.c: (calculate_permissions_for_file): Remove moved check for group validity * search-service/medusa-file-search-daemon.c: (exit_search_service), (query_loop): Added options to run searches once or a few times for testing purposes * tests/Makefile.am: added search-method-test * tests/search-method-test.c: added test for the search method 2000-09-30 Josh Barrow * doc/smoketests.html: Added a a set of smoke tests for Medusa. These tests only test a small number of the actual things that Medusa can search for. These are not intended to be a complete set of test cases. They only test one way of searching for each thing Medusa can search for. 2000-09-29 J Shane Culpepper * libmedusa-internal/medusa-enums.h: * libmedusa-internal/medusa-query-clauses.c: * libmedusa-internal/medusa-test.c: * libmedusa/medusa-unsearched-locations.c: * tests/medusa-text-index-test.c: Fixing inlined function stuff so that the new compiler on Redhat will build. 2000-09-29 Ramiro Estrugo * configure.in: Removed GConf and OAF checks cause medusa doesnt seem to use either of these anywhere. These can be added back in the future if medusa uses them. 2000-09-27 Rebecca Schulman * doc/how_to_use_msearch: Removed old useless information * indexer/medusa-file-index-daemon.c: (main): Set to run on lowest priority by default. 2000-09-27 Rebecca Schulman * libmedusa/medusa-unsearched-locations.c: (mount_type_is_in_skip_list), (unsearched_mount_list_initialize): Fixed bugzilla.eazel.com bug 2051, to skip shm mounts. 2000-09-25 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (do_full_indexing), (exit_indexer): Added an exit function instead of using exit () to do a gnome-vfs-shutdown, and do cleanup at exit. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_update_keywords): Fixed a leak that resulted from not freeing a result of medusa_uri_number_to_uri * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_read_file_header) Fixed a leak in the field reading code, and added code (not turned on by default being tested during for efficiency during profiling) (The code doubles the size of a file after every remap to decrease the number of remappings that occur) * libmedusa-internal/medusa-text-index-plaintext-module.c: Changed the read buffer size default to improve read efficiency. This value may not be the optimal on all platforms, but it seems to work best for the x86's that I have access to. (as indicated by strace tests) * libmedusa-internal/medusa-text-index.c: (setup_temp_index_io_handlers), (medusa_text_index_destroy): Fixed a bug that would not destroy the file pointers created in the temporary index if an error occurred. * libmedusa/medusa-unsearched-locations.c: (unsearched_mount_list_initialize): Fixed errors in the mount entry reading code that was causing leaks to happen. 2000-09-25 Rebecca Schulman * libmedusa-internal/medusa-io-handler.c: (fopen_new_with_medusa_io_handler_header): * libmedusa-internal/medusa-text-index-plaintext-module.c: (read_more_data): * libmedusa/medusa-index-progress.c: (medusa_index_progress_get_percentage_complete): Removed some more unnecessary output to stdout, and fixed a bug where the indexer might lock up reading 0 length files. 2000-09-20 Rebecca Schulman more uninitialized fixes * libmedusa-internal/medusa-query-optimizations.c: (first_time_corresponding_to_query_object), (last_time_corresponding_to_query_object), (can_replace_modified_with_mtime): 2000-09-20 Rebecca Schulman * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_open): changed a g_return_if_fail to an if statement, since it wasn't a critical condition * libmedusa-internal/medusa-query-optimizations.c: fixed uninitialized error 2000-09-20 Rebecca Schulman Completed a large amount of the work for bug 1809, to provide preoptimization for queries. I think I have corrected all problems that caused slowdown I noticed without profiling, and the framework makes it easy to add ones we discover later. Made some changes that will hopefully fix bug 1874. Also, I cleaned up a lot of the messages that the search and index daemons give, to be more terse an informative. * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-query-optimizations-private.h: * libmedusa-internal/medusa-query-optimizations.c: (medusa_query_optimizations_initialize), (medusa_query_optimizations_perform_and_free_deep), (medusa_query_optimizations_new), (medusa_query_optimizations_destroy), (medusa_query_optimizations_add), (medusa_optimization_result_destroy), (query_optimization_free), (optimization_is_applicable), (result_is_constant_query), (optimization_result_new), (replace_old_criterion_with_new_and_free), (add_new_criterion_and_free), (query_criterion_get_by_category), (query_criterion_get_by_prefix), (query_criterion_get_relation), (query_criterion_get_object), (query_relation_is_negative), (make_new_criterion_with_int), (can_replace_username_with_uid), (owner_query_relation_is_invalid), (username_relation_to_corresponding_uid_relation), (replace_username_with_uid_criterion), (group_relation_to_corresponding_gid_relation), (group_query_relation_is_invalid), (can_replace_group_with_gid), (replace_group_with_gid_criterion), (modified_query_relation_is_invalid), (modified_query_relation_has_no_upper_bound), (modified_query_relation_has_no_lower_bound), (make_new_criterion_with_time_t), (object_to_date), (first_time_corresponding_to_query_object), (last_time_corresponding_to_query_object), (can_replace_modified_with_mtime), (replace_modified_with_mtime_criteria): * libmedusa-internal/medusa-query-optimizations.h: Basic framework for adding and detecting the need for optimizations. The sloppiness of a lot of this code shows that we need to parse search uri's more sanely, and not be sloppy. * doc/search_uri_rfc: Readded an mtime criterion, since we optimize "modified" queries into queries on mtimes. * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-file-index-queries.h: Removed code query handlers with processing that is now done pre-optimization. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open), (medusa_master_db_query): Handle errors when opening the database, if the files are corrupt, and do optimization before running the query. * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (print_optimization_result), (medusa_search_uri_parse), (clause_to_clause_closure), (get_next_root_uri): Handle errors in parsing, and change the name of a badly named function (now medusa_search_uri_parse) Bug 1874 changes * libmedusa/medusa-search-service-private.h: Added error transmission code * search-service/medusa-file-search-daemon.c: (query_loop), (initialize_socket): Handle errors in loading the database * libmedusa/medusa-indexed-search.c: (authenticate_connection), (medusa_indexed_search_new): Corrected some style errors, and also return an error if search daemon returned an error instead of an acknowledgement to a search request. The error means that the index files didn't exist or were unreadable. * libmedusa-internal/medusa-file-index.c: (file_index_clauses): Removed old clauses that are now handled before this point, and corrected a typo * libmedusa-internal/medusa-hash.c: (medusa_hash_open): Handle errors in creating the io-handler for the file. Documentation improvements * indexer/medusa-file-index-daemon.c: (main): Improved stdout output to be more informative * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_write_number_of_fields): Removed printf that happened when a field was written. * msearch/medusa-command-line-search.c: (main): Improved the error message to msearch to be more informative. * libmedusa-internal/medusa-text-index.c: (medusa_text_index_finish_indexing): Removed unnecessary printf General error fixing * libmedusa/medusa-unindexed-search.c: (match_string_to_date): corrected a typo * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_mtime_encode): Removed a commented piece of old code. * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission), (run_query), (get_uid_pid_key_information), (present_query_results), (goto_next_line), (another_transmission_line_exists), (send_cookie_creation_acknowledgement): Fixed bad formatting 2000-09-18 Dan Winship * configure.in: Check for sys/vfs.h * libmedusa/medusa-index-progress.c: Only include sys/vfs.h if we have it. * libmedusa/medusa-unsearched-locations.c: Fix various bugs to make this compile under BSD. (Not tested, just built.) * gnome-vfs-module/Makefile.am (INCLUDES): Need GNOME_CFLAGS for gnome-defs.h and gnome-util.h. 2000-09-15 Rebecca Schulman * libmedusa-internal/medusa-master-db-private.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open), (medusa_master_db_new), (medusa_master_db_destroy): * libmedusa-internal/medusa-text-index-plaintext-module.c: (read_more_data): Made it so that the index progress structure is only created and freed when indexing is happening. 2000-09-14 Rebecca Schulman Removed an unnecessary debugging print statement, and added a new function to the index progress api * indexer/medusa-file-index-daemon.c: (do_full_indexing): * libmedusa/medusa-index-progress.c: (medusa_index_progress_file_clear), (medusa_index_progress_update), (medusa_index_is_currently_running): * libmedusa/medusa-index-progress.h: 2000-09-14 Seth Nickell * configure.in: Add checks for various mount table library systems (getmntent, setmntent, etc). Made gcc flags that are incompatible with Solaris optional. * indexer/medusa-file-index-daemon.c: Added definitions for settings not present in Solaris. * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_group_decode), (medusa_file_index_encoders_test): uid_t != int, gid_t != int, fixed places where this was assumed by using an unsigned long instead * libmedusa-internal/medusa-file-index-encoders.h: Defined NAME_MAX if it is undefined (for Solaris), changed an int to an unsigned long to fix a gid != int problem. * libmedusa-internal/medusa-rdb-query.h: Defined NAME_MAX if it is undefined (for Solaris) * libmedusa/medusa-indexed-search.c: (authenticate_connection), (send_search_request): pid != int either! Added casts in printfs, along with changing %d's to %lus as appopriate. * libmedusa/medusa-search-service.h: * libmedusa/medusa-service-private.c: * libmedusa/medusa-service-private.h: * libmedusa/medusa-utils.h: * search-service/medusa-file-search-daemon.c: Define various settings if they are missing (on Solaris). * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_new): Define various settings if they are missing (on Solaris), add so strncpy is defined :-) * libmedusa/medusa-unsearched-locations.c: (unsearched_mount_list_initialize): Add code to deal with Solaris specific mount table stuff (mnttab). 2000-09-14 Rebecca Schulman Completed bug 2298, to create an indexing progress API for medusa. * libmedusa-internal/medusa-master-db-private.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (index_file), (medusa_master_db_destroy): Add indexing progress structure to the top level database to keep track * libmedusa/Makefile.am: * libmedusa/medusa-index-progress.c: (medusa_index_progress_new), (medusa_index_progress_update), (medusa_index_progress_destroy), (medusa_index_progress_get_percentage_complete), (get_disk_used_information), (update_new_public_percent_complete): * libmedusa/medusa-index-progress.h: Add new api to allow keeping track and to access the information from outside the indexing process. * tests/.cvsignore: 2000-09-14 Rebecca Schulman * libmedusa/medusa-index-service.h: fixed whitespace * libmedusa/medusa-unsearched-locations.c: (medusa_is_unsearched_location): Removed bogus assert statements Wed Sep 13 22:10:12 2000 George Lebl * libmedusa-internal/medusa-text-index.c (medusa_text_index_finish_indexing): When printing sizeof results always cast. On alpha this is long by default, so printf gets confused. * tests/medusa-versioned-file-test.c: Include 2000-09-13 Rebecca Schulman Completed the work for bugzilla.eazel.com 2030 which is to not keep large text index structures in virtual memory. * libmedusa-internal/medusa-text-index.c: (medusa_text_index_open), (medusa_text_index_new), (medusa_text_index_finish_indexing), (write_start_location_to_start_file), (write_end_location_to_start_file), (write_uri_number_to_location_file), (medusa_text_index_read_start_location_from_start_file), (medusa_text_index_read_end_location_from_start_file), (medusa_text_index_destroy): Added some error checking, and changed api for location and start index. * libmedusa-internal/medusa-text-index-private.h: * libmedusa-internal/medusa-text-index-queries.c: (word_to_uri_numbers): Add error checking, and read the locations where a word is found from versioned files instead of memory mapped files. * libmedusa-internal/medusa-versioned-file.h: * libmedusa-internal/medusa-versioned-file.c: (medusa_versioned_file_create), (medusa_versioned_file_open), (medusa_versioned_file_seek), (medusa_versioned_file_write), (medusa_versioned_file_read), (medusa_versioned_file_append_zeros), (medusa_versioned_file_error_notify), (medusa_versioned_file_result_to_string): Added functions to report errors to the user, and fixed an error that caused data to be appended rather than written to the right location 2000-09-12 Rebecca Schulman * libmedusa-internal/medusa-search-uri.c: (search_uri_add_type_is_regular_file): Fixed a bug caught by -Wno-initialize 2000-09-12 Rebecca Schulman Fixed a few random bugs, and worked on the first part of bug 2030, which is to not keep the large text index structures in virtual memory. To do this, I created a versioned file api, which will allow us to keep versions and magic number identifiers, but not use the io handler class * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_new), (fopen_new_with_medusa_io_handler_header): Fixed an access X_OK that should have been an F_OK. and corrected a spelling error in a comment * libmedusa-internal/medusa-text-index-private.h: Changed the name of the read_location_file functions to read_start_file, because they were actually reading the start file * libmedusa-internal/medusa-text-index-queries.c: (word_to_uri_numbers): * libmedusa-internal/medusa-text-index.c: (medusa_text_index_read_file), (medusa_text_index_finish_indexing), (add_word_to_real_index), (write_start_location_to_start_file), (write_end_location_to_start_file), (write_uri_number_to_location_file), (medusa_text_index_read_start_location_from_start_file), (medusa_text_index_read_end_location_from_start_file): Changed the unwieldly log checks to use a macro to improve code readabilitiy. Abstracted writing to the location file so we can change the underlying storage method next. * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-versioned-file.c: (medusa_versioned_file_create), (medusa_versioned_file_open), (medusa_versioned_file_get_magic_number), (medusa_versioned_file_get_version_number), (medusa_versioned_file_seek), (medusa_versioned_file_write), (medusa_versioned_file_read), (medusa_versioned_file_destroy), (make_file_header), (read_file_header), (ensure_header_version_number), (ensure_header_magic_number): * libmedusa-internal/medusa-versioned-file.h: Added a versioned file class with api, as described at the head of the entry. * tests/Makefile.am: * tests/medusa-versioned-file-test.c: (cleanup_old_test_files), (test_creating_bad_file_name), (test_creating_good_file), (test_magic_and_version_numbers_were_written_right), (test_writing_data), (test_reading_back_data), (test_closing_file), (test_reopening_file_with_wrong_magic_and_version_numbers), (test_reopening_good_file), (main): Added tests for the versioned file class 2000-09-12 Rebecca Schulman Fixed bugzilla.eazel.com bug 2018, that the search daemon crashes when searching for a file glob * libmedusa-internal/medusa-uri-list-queries.c: (file_glob_to_regexp): added an incrementer to the function, that was missing. Before the file would just write to a string until it got to illegal memory and crash 2000-09-12 Rebecca Schulman Finished up giving bug numbers to all of the FIXMEs in medusa * indexer/medusa-file-index-daemon.c: (do_full_indexing): Got rid of an unnecessary sleep that was in the index loop. It should now index every day. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_destroy): Fixed an "unindexed_locations_initialize" that should be "unindexed_locations_shutdown" in the destroy function * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_to_clause_closures): Lower-cased the search uri before processing so everything is case insensitive * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_virtual_free): * libmedusa-internal/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_remove_mime_type), (is_valid_mime_type), (is_valid_mime_pattern), (mime_pattern_matches): * libmedusa-internal/medusa-text-index-plaintext-module.c: (medusa_text_index_parse_plaintext), (read_more_data): * libmedusa-internal/medusa-text-index.c: (text_index_files_are_ready), (medusa_text_index_read_file), (sort_temp_index_data_into_permenant_index): * libmedusa-internal/medusa-tokenize.c: (medusa_string_to_token): * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_destroy): * libmedusa/medusa-file-info-utilities.c: (get_time_struct_for_beginning_of_date), (get_time_struct_for_end_of_date): * libmedusa/medusa-file-info-utilities.h: * libmedusa/medusa-indexed-search.c: (authenticate_connection), (medusa_indexed_search_is_available), (send_search_request): * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available_for_uri): * libmedusa/medusa-search-service.h: * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_new), (medusa_unindexed_search_start_search), (search_directory): * search-service/medusa-file-search-daemon.c: (initialize_socket): Added bug numbers to FIXMEs * libmedusa-internal/medusa-text-index-mime-module.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_read_file), * libmedusa-internal/medusa-uri-list.h: * libmedusa/medusa-unindexed-search.h: Removed fixmes that didn't seem useful 2000-09-11 Rebecca Schulman Fixed bugzilla.eazel.com bugs 1389 and 1924. 1389 is a bug that size requests may return directories or other non-regular files that don't really have sizes. 1924 is about cd's being indexed. * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (clause_to_clause_closure), (medusa_search_uri_add_extra_needed_criteria), (search_uri_contains_content_requests), (search_uri_add_user_can_read), (search_uri_contains_size_requests), (search_uri_add_type_is_regular_file), (request_is_for_positive_matches): created a single function to add extra criteria into the search uri when necessary. Make private functions that detect and add certain criteria. Added specific check about size requests and a function to add a check for the file type to the search uri * search-service/medusa-file-search-parse-transmission.c: (run_query): Used the simplified api for adding search criteria before running query, instead of the old checks * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (index_directory), (medusa_master_db_destroy): * libmedusa/medusa-unindexed-search.c: (medusa_unindexed_search_new), (search_directory), (medusa_unindexed_search_destroy): use the new "unsearched_locations" api to initialize the unsearched_location hash, destroy it when we are done and do a single check for all skips via a single functions * libmedusa/Makefile.am: * libmedusa/medusa-unsearched-locations.c: (medusa_is_unsearched_location), (medusa_unsearched_locations_initialize), (medusa_unsearched_locations_shutdown), (file_stoplist_initialize), (unsearched_mount_list_initialize): * libmedusa/medusa-unsearched-locations.h: Made a new file, with a simplified api for all of the file skip stuff. This file collects the stopfile system, and checks for nfs mounts and cd roms (hopefully at some point all removable media) * libmedusa/medusa-utils.c: * libmedusa/medusa-utils.h: Removed stoplist and nfs mount functions from here to move into medusa-unsearched-locations * indexer/medusa-file-index-daemon.c: Removed unneeded gtk include that broke the build after gtk was renamed to gtk-1.2. 2000-09-10 Rebecca Schulman * search-service/medusa-file-search-daemon.c: (main), (query_loop), (handle_interruption_of_results_transmission): Removed an unnecessary parameter to query_loop that was causing an uninitialized variable error. 2000-09-10 Rebecca Schulman * configure.in: * search-service/medusa-file-search-daemon.c: (main), (query_loop), (handle_interruption_of_results_transmission): 2000-09-10 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (main): Added a check for whether you are running as root or not. * search-service/medusa-file-search-daemon.c: (main): Added a check for whether you are running as root. Exits if you are not. * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission): Fixed a g_return_if_fail that could just be a simple if statement. 2000-09-10 Rebecca Schulman Some code cleanup, and added calls to open structures in addition to creating them, so that we can error in the right way if the index files don't exist, or if we try and create index files while writing over them. Also did some code cleanup and some * RENAMING: Add suggestion to change _new functions for classes that correspond to files to _create, to be more clear as to the difference between them and the new _open functions * TODO: Added idea to make the log level a globally scoped variable rather than passing it around all of the time, since it is really a global parameter. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_open): * libmedusa-internal/medusa-hash.c: (medusa_hash_open), (medusa_hash_new): * libmedusa-internal/medusa-hash.h: * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_new), (medusa_io_handler_open), (medusa_io_handler_free): * libmedusa-internal/medusa-io-handler.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_open): * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_new), (medusa_rdb_file_open): * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-text-index-private.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_open), (medusa_text_index_new), (make_temp_index_file_name), (permenant_text_index_files_exist), (text_index_files_dont_exist), (setup_temp_index_io_handlers), (medusa_text_index_destroy): * libmedusa-internal/medusa-text-index.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_open): * libmedusa-internal/medusa-uri-list.h: Added _open functions to these classes, so that we can initialize differently in the case where we are reading the files as opposed to writing them. Most importantly, we can now report errors about the state of the files more accurately, because the type of call determines the expectations of the class (whether the index file should already exist, or whether we plan on creating it. * libmedusa-internal/medusa-rdb-fields.c: (medusa_rdb_field_get_offset), (medusa_rdb_field_get_field_structure), (medusa_rdb_record_get_field_contents), (medusa_rdb_record_get_field_value), (medusa_rdb_record_set_field_value), (medusa_rdb_field_get_size), (medusa_rdb_field_get_encoder), (medusa_rdb_field_get_decoder), (medusa_rdb_field_get_header_offset), (medusa_rdb_field_get_header_size), (medusa_rdb_fields_get_first_title), (medusa_rdb_fields_get_first_size), (medusa_rdb_fields_get_first_encoder), (medusa_rdb_fields_get_first_decoder): * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-file-index-queries.c: (simple_query): Added const to many function parameters where this was appropriate, and adjusted calls to get rid of the casts that had existed before this point because of the missing const's. * search-service/medusa-file-search-daemon.c: (main), (query_loop), (ensure_index_validity), (index_files_have_changed): Use the new _open call, and reinstate the check for whether the index files still exist and haven't changed. If they change, reload them. 2000-09-08 Rebecca Schulman Fixed bugzilla.eazel.com bug 1357, which crashed the search daemon when a request closed during it. There is still the issue that we don't clean up when this happens. * search-service/medusa-file-search-daemon.c: (main), (query_loop), (initialize_socket), (handle_interruption_of_results_transmission): 2000-09-08 Rebecca Schulman * DEBUGGING: Fixed gdb instructions so that they should be complete for attaching to a running process now. * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_criterion_match), (medusa_rdb_query_test): * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_insert), (medusa_rdb_table_free): * libmedusa-internal/medusa-rdb-table.h: * libmedusa-internal/medusa-search-uri.c: (medusa_uri_is_search_uri), (get_next_root_uri): * libmedusa-internal/medusa-search-uri.h: Fixed more FIXMEs, and repaired a few really basic ones. 2000-09-07 Rebecca Schulman Removed all of the bogus (C) 1999, 2000 and changed them to (C) 2000 and indented a whole bunch of files to the standard, 8 space GNOME guidelines * libmedusa-internal/medusa-byte.c: (medusa_int_to_bytes), (medusa_bytes_to_int): * libmedusa-internal/medusa-byte.h: * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_permissions_encode), (medusa_file_database_keywords_decode): * libmedusa-internal/medusa-file-index-encoders.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_of_type): * libmedusa-internal/medusa-file-information.h: * libmedusa-internal/medusa-hash.c: (medusa_hash_new), (medusa_hash_fetch), (medusa_hash_remap), (medusa_hash_store), (medusa_hash_key_exists): * libmedusa-internal/medusa-hash.h: * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_new), (medusa_io_handler_free), (medusa_io_handler_write_header), (write_header_to_file_descriptor), (medusa_io_handler_adjust_buffer_size), (medusa_io_handler_write_blank_data), (fopen_new_with_medusa_io_handler_header), (medusa_io_handler_create_file), (medusa_io_handler_read_file_header), (medusa_io_handler_append_data), (medusa_io_handler_append_zeros), (medusa_io_handler_append_string), (medusa_io_handler_remap), (medusa_adjust_filesize_to_pagesize): * libmedusa-internal/medusa-io-handler.h: * libmedusa-internal/medusa-rdb-fields.c: (medusa_rdb_field_info_new), (medusa_rdb_field_add), (medusa_rdb_field_remove), (medusa_rdb_field_get_offset), (medusa_rdb_field_get_field_structure), (medusa_rdb_field_get_encoder), (medusa_rdb_field_get_decoder), (medusa_rdb_field_get_header_offset), (medusa_rdb_field_get_header_size), (medusa_rdb_fields_get_first_title), (medusa_rdb_fields_get_first_size), (medusa_rdb_fields_get_first_encoder), (medusa_rdb_fields_get_first_decoder), (medusa_rdb_field_contents_equal): * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-rdb-file.c: * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-rdb-query-private.h: * libmedusa-internal/medusa-rdb-query.c: * libmedusa-internal/medusa-rdb-query.h: * libmedusa-internal/medusa-rdb-record.h: * libmedusa-internal/medusa-rdb-table-async.c: (medusa_rdb_table_select_cancellable): * libmedusa-internal/medusa-rdb-table-private.h: * libmedusa-internal/medusa-test-conf.h: * libmedusa-internal/medusa-test.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_finish_indexing), (add_word_to_real_index): * libmedusa-internal/medusa-tokenize.h: * libmedusa/medusa-file-info-utilities.h: * libmedusa/medusa-utils.c: (medusa_union_of_two_descending_integer_lists), (medusa_difference_of_two_descending_integer_lists): * libmedusa/medusa-utils.h: * msearch/medusa-command-line-search.c: 2000-09-06 Pavel Cisler * configure.in: * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_index_encoders_test): * libmedusa-internal/medusa-master-db.c: (merge_new_uris_with_current_results_and_free): * libmedusa/medusa-search-service.c: (medusa_search_service_connection_start_search), (medusa_search_service_connection_read_search_result): * libmedusa/medusa-unindexed-search.c: (matches_date_modified_criterion): Get rid of -Wno-uninitialized. This way we will get uninitialized variable warnings when we do a release build (with optimizations -O1 or higher). Fix all the uninitialized variable warnings and bugs that turned up when doing a release build. 2000-09-05 Mathieu Lacage * doc/search_uri_rfc: update to the search uri spec. 2000-09-01 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (main), (wait_for_indexing_signal), (do_index_accounting), (do_full_indexing), (initialize_index_server_socket), (backup_index_files), (copy_new_index_files), (file_indexer_parse_transmission), (return_a_day_from_now): Indented this file properly, and fix the indexer's sleep mechanism so that it will work if interrupted. 2000-09-01 Darin Adler Did a bunch of testing. With these bug fixes the feature seems to work. Next, we test with Nautilus. * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_keywords_decode): Handle the case of a token == 0 and make sure it returns an empty string. * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_marked_with_keyword): Take out detokenizing strings since the decoder handles it. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_update_keywords): Take out tokenizing strings since the encoder handles it. Write out the keywords field instead of overwriting the URI field. Don't destroy the keyword set, since destroying the index as a whole destroys all the ones in the hash table. * libmedusa-internal/medusa-keyword-set.c: (medusa_keyword_set_destroy): Free the string form too, not just the keyword set. * libmedusa-internal/medusa-master-db.c: (index_private_metafiles_for_user): Use a "/" between the path and the file name. 2000-09-01 Rebecca Schulman Finished work on task 2408, the unindexed emblem search. And more work on FIXMEs, including addressing bug 2145, about group searches causing search daemon crashes if the group did not exist. * libmedusa/medusa-unindexed-search.c: * libmedusa/medusa-unindexed-search.h: (medusa_unindexed_search_new), (medusa_unindexed_search_read_search_result), (search_directory), (file_matches_criteria), (matches_all_name_criteria), (matches_all_file_info_criteria), (matches_all_mime_criteria), (matches_all_keywords_criteria), (matches_one_name), (matches_one_file_info), (matches_date_modified_criterion), (matches_owner_criterion), (matches_group_criterion), (matches_size_criterion), (matches_one_mime_type), (matches_one_keywords_criterion), (assume_file_is_directory_unless_a_link), (criterion_is_keywords_criterion): Added keyword searching. Changed a few procedure names to be more clear, and replaced many instances of EMBLEMS with KEYWORDS * libmedusa/medusa-utils.h: * libmedusa/medusa-utils.c: (medusa_str_has_prefix), (medusa_str_has_suffix), (end_element), (medusa_extract_keywords_from_metafile), (keyword_hash_table_populate_callback), (medusa_keyword_hash_table_create_for_directory): Addressed a few string function problems, fixed a bug in the metafile hash table code. * DEBUGGING: Revised debugging plans based on Darin's experiences with them. Any problems people experience with following them should go into the database. * doc/flags: added the UNINDEXED_SEARCH_DEBUG flag * libmedusa/medusa-file-info-utilities.h: * libmedusa/medusa-file-info-utilities.c: (username_exists), (group_exists), (medusa_username_to_uid), (medusa_group_to_gid): * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-file-index-queries.h: (medusa_file_index_is_owned_by), (medusa_file_index_is_in_group), (medusa_file_index_is_not_owned_by), (medusa_file_index_is_not_in_group): revised the user and group functions not to cache anymore. Caching isn't valid, since the search daemon should run for a long time, and caching could cause incorrect results to be returned if users or groups were added or removed from the system. We can do a better job optimizing anyway, by precomputing these values before we start the search. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (add_fields), (medusa_file_system_db_new), (medusa_file_system_db_free), (read_index_info_from_database): * libmedusa-internal/medusa-io-handler.c: * libmedusa-internal/medusa-io-handler.h: (fopen_new_with_medusa_io_handler_header): Documented some fixmes with bug numbers * libmedusa-internal/medusa-rdb-fields.c: * libmedusa-internal/medusa-rdb-fields.h: (medusa_rdb_field_info_free), (medusa_rdb_field_free), (medusa_rdb_field_add), (medusa_rdb_field_remove), (medusa_rdb_fields_get_first_decoder): Documented a fixme, removed unused static functions, and changed the field structure to be a glist rather than a gslist so we can free it with g_list_free_deep_custom * search-service/medusa-unindexed-search.c: * search-service/medusa-unindexed-search.h: removed these old, unused files 2000-09-01 Darin Adler More untested code. WIth this check-in, we have all the code we need for working keyword indexing. We can do further work to make it more efficient, but this should be enough to make it work, once we find and fix the bugs. * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_marked_with_keyword): Handle the case where there's no keyword properly. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_update_keywords): Now we use an empty string instead of NULL to mean an empty keyword set. * libmedusa-internal/medusa-keyword-set.c: (medusa_keyword_set_new), (medusa_keyword_set_new_from_string), (medusa_keyword_set_destroy), (medusa_keyword_set_add_public_keyword), (medusa_keyword_set_add_user_with_private_keywords), (medusa_keyword_set_add_private_keyword), (find_previous_character), (find_previous_user_id), (medusa_keyword_set_has_keyword), (medusa_keyword_set_get_string_form): Implemented all the keyword set operations. 2000-08-31 Darin Adler * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-keyword-set.h: * libmedusa-internal/medusa-keyword-set.c: Added new source files for operations on the set of keywords in the index. It was getting too complicated to do ad hoc. * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index-queries.c: (simple_query): Redid the query macros so they are not so yucky. (medusa_file_index_marked_with_keyword), (medusa_file_index_not_marked_with_keyword): Added queries for keywords. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (keywords_by_file_destroy_entry), (users_by_directory_destroy_entry), (medusa_file_system_db_free), (get_keyword_set_for_file), (medusa_file_system_db_add_public_keyword), (medusa_file_system_db_add_private_keyword), (medusa_file_system_db_add_private_keywords_directory), (add_users_to_keyword_set), (medusa_file_system_db_update_keywords): Changed indexing to use new keyword set and handle files with no keywords in the private directory properly. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_index): Do private metafiles first. (index_private_metafile): Call the new function to deal with the entire directory if there is a metafile. 2000-08-31 Rebecca Schulman More work on FIXMEs. * RENAMING: Added the suggestion that medusa-master-db be renamed to medusa-database-controller * gnome-vfs-module/search-method.c: (do_open_directory), (get_file_info_for_virtual_directory), (get_file_info_for_virtual_link), (do_read_directory), (do_is_local): fixed FIXME syntax to work correctly (added colons in the right place) * indexer/medusa-file-index-daemon.c: (wait_for_indexing_signal), (initialize_index_server_socket), (backup_index_files), (file_indexer_parse_transmission): some reformatting * indexer/medusa-text-index-mime-module.c: * indexer/medusa-text-index-mime-module.h: * indexer/medusa-text-index.c: * indexer/medusa-text-index.h: removed these obsolete files * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_keywords_decode), (medusa_file_index_encoders_test): More FIXME additions * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-file-index-queries.h: (medusa_file_index_is_modified_before_date), (medusa_file_index_is_modified_after_date): More fixme additions * libmedusa-internal/medusa-master-db.c: (index_private_metafiles_for_user): Fixed a segfault where we don't check for a nonexistent directory 2000-08-31 Darin Adler * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_uid_can_read_file): Use new get_value function and get rid of explicit decoder calls. (medusa_file_index_marked_with_keyword), (medusa_file_index_not_marked_with_keyword): Empty placeholders. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (file_index_clauses): Added clauses for keyword searches. (str_list_sort_shallow_remove_duplicates), (str_list_join), (medusa_file_system_db_update_keywords): Wrote code to update the keywords when the rest of the indexing is done. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_index): Need to pass the URI list to the update_keywords function. This may point to a design problem, but adding the parameter was an acceptable solution for now. * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-rdb-fields.c: (medusa_rdb_record_get_field_contents): Made private. (medusa_rdb_record_get_field_value): Added this public function that also does the decoding; useful everywhere since all callers of get_field_contents also have to decode. (medusa_rdb_record_set_field_value): Added this public function, since there was no way to set the value before. It does the encoding. * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_new): Added missing "(void)". (medusa_rdb_query_criterion_match): Use new get_value function and get rid of explict decoder calls. (medusa_rdb_query_test): Added missing "(void)". * libmedusa-internal/medusa-rdb-query.h: Fixed formatting. * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_all_rows): Get rid of off-by-one problem that probably doesn't matter much since it's the generation of a list that's unused for the most part. (medusa_rdb_record_number_to_record): Fixed the range checking in here, which would allow many bad record numbers through. * libmedusa-internal/medusa-uri-list.c: (medusa_uri_number_to_uri): Use new get_value function and get rid of explict decoder calls. 2000-08-30 Ramiro Estrugo * libmedusa-internal/Makefile.am: Remove the obsolete files from the Makefile too. 2000-08-30 Gene Z. Ragan * libmedusa-internal/medusa-lock-file.c: * libmedusa-internal/medusa-lock-file.h: Removed obsolete files from project. 2000-08-30 Gene Z. Ragan Fixed bug 1776, improve search database locking. I just added Maciej's new locking code to medusa. The masters of medusa should take a look at what I did since I am new to the code. * indexer/medusa-file-index-daemon.c: (main), (do_full_indexing), (file_indexer_parse_transmission): Removed old locking code and added new. * libmedusa-internal/medusa-lock-file-paths.h: Added new paths for the read and write lock files. * search-service/medusa-file-search-daemon.c: (main): * tests/medusa-text-index-test.c: (main): Removed old locking code and added new. 2000-08-30 Darin Adler * doc/search_uri_rfc: Changed the keywords clause to match what Rebecca and I settled on. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (write_index_info_to_database): Use shared version number instead of having a separate one for the file index. (medusa_file_system_db_free): Use shared code to destroy hash. (medusa_file_system_db_update_keywords): Wrote comments with an outline of the work to be done here. * libmedusa-internal/medusa-master-db.c: (index_directory), (index_public_metafile), (get_path_from_private_metafile_name): Use public constants and functions to share more code. * libmedusa-internal/medusa-search-uri.c: (bypass_search_method), (clause_is_content_request): * libmedusa/medusa-search-service.c: (uri_has_valid_header), (uri_to_search_method): * libmedusa/medusa-unindexed-search.c: (match_one_name), (match_date_modified_criterion), (match_owner_criterion), (match_group_criterion), (match_size_criterion), (match_one_mime_type), (criterion_field_is): Changed to use renamed string function by their new str names. * libmedusa/medusa-utils.h: * libmedusa/medusa-utils.c: (get_gnome_vfs_result_from_xml_error), (medusa_extract_keywords_from_metafile), (medusa_nfs_mount_list_initialize), (str_list_dup), (free_str_to_str_list_hash_table_entry), (medusa_str_to_str_list_hash_table_destroy), (keyword_hash_table_populate_callback), (keyword_hash_table_populate_from_metafile), (construct_private_metafile_path), (medusa_keyword_hash_table_create_for_directory), (medusa_keyword_hash_table_file_has_keyword), (medusa_keyword_hash_table_destroy): Renamed string functions to call the string "str" to match both GLib and Nautilus, which use "str" to mean C-style strings. Added result code to the metafile function and implemented the new code for searching metafiles for keywords that Rebecca needs for slow searching of keywords. 2000-08-30 Rebecca Schulman Changed Search URI RFC to contain the emblem criterion syntax. Began work on documenting medusa's FIXMEs in bugzilla.eazel.com. * doc/search_uri_rfc: Added the new emblem criterion syntax. * gnome-vfs-module/search-method.c: (do_open_directory), (get_file_info_for_virtual_directory), (get_file_info_for_virtual_link), (do_read_directory), (do_is_local): Added bug numbers and clarified FIXMEs. * indexer/medusa-file-index-daemon.c: (main), (wait_for_indexing_signal), (do_full_indexing): Added bug numbers and clarified relevant FIXMEs 2000-08-29 Darin Adler * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new): Add file_keywords hash table. (free_keyword_hash_table_entry), (medusa_file_system_db_free): Free file_keywords hash table. (file_index_clauses): Add FIXME for clauses for keywords. (add_keyword), (medusa_file_system_db_add_public_keyword), (medusa_file_system_db_add_private_keyword): Put keywords into hash table. (medusa_file_system_db_update_keywords): Empty function that has FIXME saying we need to re-walk the index filling in the keywords. * libmedusa-internal/medusa-file-information.c: (medusa_file_attributes_new): Remove dangerous code that could lead to a g_free of "". (medusa_index_file_attributes): Leave room for keywords field. Without this change we just core dump when we try to index. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_index): Index the private metafiles, then update the keywords when we are done with the other indexing. (add_public_keywords_to_index), (add_private_keywords_to_index), (index_public_metafile), (get_path_from_private_metafile_name), (index_private_metafile), (index_private_metafiles_for_user), (index_private_metafiles): Write the code that actually handles the public and private metafiles to replace the empty placeholders. * libmedusa-internal/medusa-query-clauses.c: Fix formatting to match mode line. 2000-08-28 Maciej Stachowiak * libmedusa-internal/medusa-lock.[ch]: New fcntl-based locking functions (not yet used). * libmedusa-internal/Makefile.am: Add to the build. 2000-08-28 Darin Adler * libmedusa-internal/medusa-conf.h: * indexer/medusa-file-index-daemon.c: (do_index_accounting), (do_full_indexing), (backup_index_files), (copy_new_index_files), (file_indexer_parse_transmission): Added handling of the keyword sets file everywhere there's handling for the MIME type file. This is a strong hint that we're "doing it wrong". It's *way* to hard to add one more file, and we should just have some loops instead of this hand-written lists everywhere. * libmedusa-internal/medusa-file-index-encoders.h: * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_mime_type_encode), (medusa_file_database_group_encode), (medusa_file_database_permissions_encode), (medusa_file_database_size_encode): Fixed code that could write past the end since it used strncpy instead of memcpy. (medusa_file_database_keywords_encode), (medusa_file_database_keywords_decode): Added encoder for the keyword sets. (medusa_file_index_encoders_test): Pass in the keyword sets file name. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (add_fields), (medusa_rdb_file_add_field_cover), (medusa_file_system_db_new), (medusa_rdb_field_add_cover), (file_index_field_info): Add the new keyword fields. Also refactored so the list of fields doesn't appear twice. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new): * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-rdb-fields.c: (medusa_rdb_field_add): * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_new), (medusa_rdb_file_add_field): * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-tokenize.c: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new): * libmedusa-internal/medusa-uri-list.h: * search-service/medusa-file-search-daemon.c: (main): * tests/medusa-text-index-test.c: (main): Use const more and pass the keyword sets file name in a few places. 2000-08-28 Darin Adler * tests/.cvsignore: Made a real ".cvsignore" for this directory instead of one with "*" in it. 2000-08-28 Darin Adler * libmedusa/medusa-utils.h: * libmedusa/medusa-utils.c: (get_attribute), (get_name_attribute), (start_element), (end_element), (medusa_extract_keywords_from_metafile): Finished the real implementation of the code to extract keywords. It uses the SAX interface to gnome-vfs so you don't need to have the whole metafile in memory at once. * indexer/medusa-file-index-daemon.c: (do_index_accounting), (do_full_indexing): Got rid of code that just stuck a "file://" on the beginning of a patch and used the gnome-vfs function that does it properly with escaping. * libmedusa/medusa-utils.c: (medusa_is_nfs_mount_point): Added a FIXME about the fact that the NFS check is done only once per executable, so it will miss changes in mount points. (medusa_file_stoplist_initialize): Changed to use the prepend/ reverse idiom. (medusa_nfs_mount_list_initialize): Changed to use the prepend/ reverse idiom and to convert the paths into URIs using the gnome-vfs function instead of just sticking a "file://" on the beginning. * search-service/medusa-authenticate.c: (medusa_authenticate_uid_can_read): Changed to use the gnome-vfs function to convert the URI into a local path instead of just removing the "file://" from the beginning. * search-service/medusa-authenticate.h: Added include so this header stands on its own. * search-service/medusa-unindexed-search.c: (execute_query_on_file): Changed to use the gnome-vfs function to convert a local path into a URI instead of just adding the "file://" to the beginning. (directory_name_matches): Fixed memory-trash problem where it would do a strncpy without a buffer. Use g_strndup instead. 2000-08-28 Rebecca Schulman Work on task 1969, to allow content searches to be done by looking for "all the words" or "any of the words". To do this, the search uri spec was changed to take content criteria that include "includes_all_of" and "includes_any_of" * libmedusa-internal/medusa-text-index-queries.c: * libmedusa-internal/medusa-text-index-queries.h: (medusa_text_index_get_uris_for_criterion), (word_to_uri_numbers): Added new procedure to deal with taking the union or intersection of the words in a content criterion * libmedusa/medusa-utils.c: * libmedusa/medusa-utils.h: (medusa_union_of_two_descending_integer_lists): Add new array union function. * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (medusa_search_uri_to_clause_closures), (clause_to_clause_closure), (medusa_search_uri_contains_content_requests), (clause_is_content_request), (get_verb_from_clause), (get_direct_object_from_clause), (request_wants_all_words_to_match), (request_should_return_matches_not_complement): Changed closure structure to include the necessary information about the type of content query. It now keeps track of whether a content search is for a union or intersection and whether the search is for the complement or not. * libmedusa-internal/medusa-master-db.c: (run_query_on_everything_but_content_results), (content_requests_to_uri_numbers): Fixed a bug in the content does not include search that was not calculating the number of uris correctly. Changed query procedure that takes a text search criterion to one that handles the new syntax * doc/search_uri_rfc: Changed spec to include information on the new syntax for content requests. * libmedusa-internal/medusa-query-clauses.h: * libmedusa-internal/medusa-query-clauses.c: (medusa_query_clauses_get_function): Changed some functions to take const char * instead of char * where appropriate * search-service/medusa-file-search-parse-transmission.c: (run_query): Remove old unindexed search skeleton. Unnecessary now that we have changed the architecture * tests/medusa-text-index-test.c: (main): Changed query function 2000-08-28 Pavel Cisler * tests/Makefile.am: Fix a subtle build breakage - the tests were linking against the libmedusa-index.la in the source tree as well as -lmedusa-index in the target install directory (the second was redundant). This would make the build fail if you never built libmedusa-index.so before. 2000-08-25 Rebecca Schulman * tests/medusa-queue-test.c: (main): Forgot to add test file for the queue 2000-08-25 Rebecca Schulman Added the unindexed search, which goes along with the indexed search. The search service is now a superclass of both of them. The unindexed search's addition created new dependencies, which I avoided by moving several files to libmedusa. New search service code * libmedusa/medusa-indexed-search.h: * libmedusa/medusa-indexed-search.c: (authenticate_connection), (medusa_indexed_search_is_available), (medusa_indexed_search_new), (send_search_request), (medusa_indexed_search_start_search), (medusa_indexed_search_read_search_result), (medusa_indexed_search_destroy): moved most functions from medusa-search-service here. * libmedusa/medusa-search-service.c: * libmedusa/medusa-search-service.h: (medusa_search_service_connection_is_available_for_uri), (medusa_search_service_connection_new), (medusa_search_service_connection_start_search), (medusa_search_service_connection_read_search_result), (medusa_search_service_connection_destroy), (uri_has_valid_header), (gnome_vfs_uri_to_search_method), (uri_to_search_method), (uri_to_string_remove_extra_slashes): Kept same API, with a few small changes, but api is now a wrapper for the indexed and unindexed saerch. * libmedusa/medusa-unindexed-search.c: * libmedusa/medusa-unindexed-search.h: (medusa_unindexed_search_new), (medusa_unindexed_search_start_search), (medusa_unindexed_search_read_search_result), (medusa_unindexed_search_destroy), (search_directory), (file_matches_criteria), (matches_all_name_criteria), (matches_all_file_info_criteria), (matches_all_mime_criteria), (matches_all_metadata_criteria), (match_one_name), (match_one_file_info), (match_date_modified_criterion), (match_owner_criterion), (match_group_criterion), (match_size_criterion), (match_one_mime_type), (get_root_directory_from_uri), (uri_to_search_string), (search_string_to_criteria), (criterion_is_name_criterion), (criterion_is_inode_criterion), (criterion_is_mime_criterion), (criterion_is_metadata_criterion), (criterion_field_is), (uri_to_file_name), (uri_to_path_name), (match_string_to_date), (second_word_of), (last_word_of), (initialize_results_file_for_writing), (initialize_results_file_for_reading): Created new search process for unindexed queries. This should mirror the indexed search process except not work for content. * doc/search_uri_rfc: added documentation for new uri syntaxes that allows a request for either index only or backed up search * gnome-vfs-module/search-method.c: (do_open_directory), (do_get_file_info): * msearch/medusa-command-line-search.c: (main): Updated to reflect new API New code, now not used (perhaps will decrement at a later time, if it is still not used) * libmedusa-internal/medusa-queue.h: * libmedusa-internal/medusa-queue.c: (medusa_queue_new), (medusa_queue_add), (medusa_queue_remove), (medusa_queue_is_empty), (medusa_queue_free), (medusa_queue_free_deep): Added new queue data structure. Libmedusa-internal -> libmedusa changes * libmedusa-internal/medusa-utils.c: * libmedusa-internal/medusa-utils.h: * libmedusa/medusa-utils.c: * libmedusa/medusa-utils.h: removed and moved to libmedusa * libmedusa/medusa-file-info-utilities.c: * libmedusa/medusa-file-info-utilities.h: (medusa_file_info_username_is_valid), (medusa_file_info_username_to_uid), (medusa_file_info_group_to_gid), (number_of_strsplit_fields_returned), (get_time_struct_for_beginning_of_date), (get_time_struct_for_end_of_date), (is_a_leap_year), (move_time_struct_a_week_into_the_past), (move_time_struct_a_week_into_the_future), (move_time_struct_a_month_into_the_past), (move_time_struct_a_month_into_the_future), (medusa_file_info_get_first_unix_time_occurring_on_date), (medusa_file_info_get_last_unix_time_occurring_on_date), (medusa_file_info_get_unix_time_a_week_before_date), (medusa_file_info_get_unix_time_a_week_after_date), (medusa_file_info_get_unix_time_a_month_before_date), (medusa_file_info_get_unix_time_a_month_after_date): * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_owned_by), (medusa_file_index_is_in_group), (medusa_file_index_is_not_owned_by), (medusa_file_index_is_modified_on_date), (medusa_file_index_is_not_modified_on_date), (medusa_file_index_is_modified_before_date), (medusa_file_index_is_modified_after_date), (medusa_file_index_is_modified_within_a_week_of_date), (medusa_file_index_is_modified_within_a_month_of_date), (medusa_file_index_is_not_in_group): * libmedusa-internal/medusa-hash.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_query), (index_directory), (run_query_on_content_results), (run_query_on_everything_but_content_results), (run_query_on_all_uris), (content_requests_to_uri_numbers), (merge_new_uris_with_current_results_and_free): moved these functions from medusa-file-index-queries to medusa-file-info-utilities, made them public, and changed their names accordingly * libmedusa-internal/medusa-uri-list.c: (read_index_info_from_database): * libmedusa-internal/medusa-uri-list.h: Moved stop list file and nfs mount check functions to libmedusa * Makefile.am: Changed compilation order of subdirectories to reflect new dependencies * indexer/Makefile.am: * libmedusa-internal/Makefile.am: * libmedusa/Makefile.am: * msearch/Makefile.am: * search-service/Makefile.am: * tests/Makefile.am: Updated to reflect new dependency of libmedusa-index on libmedusa. Link both libmedusa-index and libmedusa where just libmedusa-index was linked before * libmedusa-internal/medusa-conf.h: Moved FILE_INDEX_STOPLIST_NAME definition to medusa-utils in libmedusa. * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-rdb-query.h: * libmedusa-internal/medusa-master-db.h: * search-service/medusa-authenticate.c: Changed " " on includes to <> for files moved to libmedusa. * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_to_clause_closures), (medusa_uri_is_search_uri), (bypass_search_method): * libmedusa-internal/medusa-search-uri.h: Moved criterion variables to libmedusa, where they are used Miscellany * databases/file-index-stoplist: added /dev * .cvsignore: added new and exciting entries. 2000-08-24 Darin Adler * gnome-vfs-module/Makefile.am: Rolled out (my 1st try at fixing) Robin's change to the makefile in this directory. It was failing in libtool. Maybe Robin can do a real fix, but we need a temporary fix for now. 2000-08-24 Darin Adler The first code for indexing keywords. There's a lot more to do. This is less than 1/5th of the work. * libmedusa-internal/medusa-master-db.c: (index_directory): Fixed bug where it would turn a URI into a path without unescaping. Added hook to trigger indexing public metafiles. (medusa_master_db_destroy): Unref the text indexer. (add_keywords_to_index), (index_public_metafile): Placeholder/first cut at indexing the keywords in public metafiles. * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_to_clause_closures), (clause_to_clause_closure), (medusa_clause_closure_free), (medusa_uri_is_search_uri), (get_next_root_uri), (get_search_criteria): Style cleanups, including getting rid of some "== TRUE", reformatting, adding some FIXMEs, replacing a tricky strncpy with a simpler g_strndup. * libmedusa-internal/medusa-utils.h: * libmedusa-internal/medusa-utils.c: (medusa_full_uri_from_directory_and_file): Fixed bugs where the file name would not be escaped and a second '/' would be added to URIs other than "file:///" that end in a slash. (string_ends_with_slash): Fixed bug for 0-length string. (medusa_string_has_prefix): const. (medusa_extract_keywords_from_metafile): Partly-written function that will be used to parse both public and private metafiles. * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available): Fixed prototype. * medusa/.cvsignore: Removed this file. When you see old leftover files in this now-empty directory, remove the directory, don't re-add the ignore file. * configure.in: Added a gnome-xml dependency. * gnome-vfs-module/Makefile.am: * indexer/Makefile.am: * libmedusa-internal/Makefile.am: * search-service/Makefile.am: * tests/Makefile.am: Added the XML library to all modules that use the medusa internal library. There's got to be a cleaner way to do this, but this is how it was done for other things used by the internal library, so someone else can fix it for XML as well when they fix the rest. * libmedusa-internal/medusa-file-index-encoders.c: * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-search-uri.h: A little formatting cleanup. 2000-08-24 Robin * Slomkowski * gnome-vfs-module/Makefile.am: * indexer/Makefile.am: * search-service/Makefile.am: * tests/Makefile.am: converted references to -lmedusa-index $(top_srcdir)/libmedusa-internal/libmedusa-index.la This makes internal depencies work in clean an environment 2000-08-24 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (main): fixed indexer exit problem 2000-08-23 Rebecca Schulman * Makefile.am: yet another build fix, for dependencies. 2000-08-23 Rebecca Schulman * indexer/Makefile.am: * search-service/Makefile.am: * tests/Makefile.am: Fixed references to uninstalled libmedusa-internals that did not get updated last night. 2000-08-22 Rebecca Schulman * libmedusa-internal/Makefile.am: * libmedusa-internal/.cvsignore: Changed the name of libmedusa-internal to libmedusa-index, and installed it publicly. Added relevant changes to .cvsignore to make updating ith the new system smooth. Fri Aug 18 20:58:21 2000 George Lebl * libmedusa/medusa-index-service.h: replace MEDUSA_SEARCH_SERVICE_H with MEDUSA_INDEX_SERVICE_H to make things using this compile and work 2000-08-16 Rebecca Schulman * libmedusa/medusa-index-service-private.h: added header file that didn't get added because of its previous removal 2000-08-16 Rebecca Schulman Implemented changes relating to two bugs: bugzilla.eazel.com 1341: a signalling system to talk to the indexer, and 2071 to make the date modified search criteria more useable in nautilus * indexer/medusa-file-index-daemon.c: (main), (wait_for_indexing_signal), (initialize_index_server_socket), (file_indexer_parse_transmission): added functions to accept and parse transmission, and added the accept function into the main loop. * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_not_of_type), (medusa_file_index_is_owned_by), (medusa_file_index_is_modified_on_date), (medusa_file_index_is_not_modified_on_date), (medusa_file_index_is_modified_before_date), (medusa_file_index_is_modified_after_date), (medusa_file_index_is_modified_within_a_week_of_date), (medusa_file_index_is_modified_within_a_month_of_date), (medusa_file_index_is_modified_in_time_interval), (medusa_file_index_is_not_in_group), (username_is_valid), (username_to_uid), (group_to_gid), (number_of_strsplit_fields_returned), (get_time_struct_for_beginning_of_date), (get_time_struct_for_end_of_date), (is_a_leap_year), (move_time_struct_a_week_into_the_past), (move_time_struct_a_week_into_the_future), (move_time_struct_a_month_into_the_past), (move_time_struct_a_month_into_the_future), (get_first_unix_time_occurring_on_date), (get_last_unix_time_occurring_on_date), (get_unix_time_a_week_before_date), (get_unix_time_a_week_after_date), (get_unix_time_a_month_before_date), (get_unix_time_a_month_after_date): Removed old date functions, and wrote nifty new functions to do what we want in nautilus for searches. See the search_uri_rfc for the new spec. * doc/search_uri_rfc : updated the supported functionality list to reflect the date query changes * libmedusa-internal/medusa-file-index.c: (file_index_clauses): registered the new date modified search uri criteria, and deregistered the old ones * libmedusa-internal/medusa-lock-file.h: * libmedusa-internal/medusa-lock-file.c: (medusa_lock_file_is_available), (medusa_lock_file_acquire): added a new function, and fixed a bug in the old one * libmedusa/medusa-index-service.h: * libmedusa/medusa-index-service.c: * libmedusa/medusa-index-service-private.h: (medusa_index_service_request_reindex), (medusa_index_service_get_last_index_update_time), (get_last_index_update_time_by_hack): added this api. * libmedusa/Makefile.am: * libmedusa/medusa-common-private.h: changed support files in correspondence with general cleanup in this directory * libmedusa/medusa-service-private.h: * libmedusa/medusa-service-private.c: (medusa_initialize_socket_for_requests): changed the names of these files * libmedusa/medusa-search-service-private.h: * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new): reflect name changes, and new functionality in medusa-service-private.[ch] * tests/Makefile.am: * tests/medusa-index-service-test.c: added test stub for indexing api 2000-08-14 Robin * Slomkowski * configure.in: OK -Werror back in and version 0.2.0 2000-08-14 Robin * Slomkowski * configure.in: Changed version for release to 0.2 2000-08-10 Rebecca Schulman * DEBUGGING: * NEWS: * README: * TODO: Updated relevant documentation to be up to date, and acceptable for the preview release. 2000-08-10 John Sullivan * gnome-vfs-module/search-method.c: (do_read_directory), (do_get_file_info): Set the SYMLINK flag when returning those funky search symlinks. It turns out this doesn't matter for the way we're using it in Nautilus now, but I thought it did at the time I made the change, and it is correct, so I'm checking it in anyway. 2000-08-10 Maciej Stachowiak FreeBSD portability fixes: * acconfig.h, configure.in: Add checks for getmntent and getmntinfo. * libmedusa-internal/medusa-uri-list.c (medusa_nfs_mount_list_initialize): Make this function work on systems like FreeBSD that have getmntinfo() but not getmntent(). Fix from Bill Huey . * indexer/medusa-file-index-daemon.c, libmedusa-internal/medusa-file-index-queries.c, libmedusa-internal/medusa-rdb-query.c, libmedusa-internal/medusa-utils.c, libmedusa/medusa-search-service.c, search-service/medusa-file-search-daemon.c: Header fixes for FreeBSD compilation, also from Bill Huey . 2000-08-09 Robin * Slomkowski * medusa.spec.in: updated for current files Wed Aug 09 18:10:14 2000 George Lebl * libmedusa-internal/medusa-text-index.c (medusa_text_index_finish_indexing): Another alpha anal patch. Cast to (int) when printing %d to make sure it's an integer (sizeof is not int on alpha but it's 64bit) 2000-08-09 Rebecca Schulman * doc/search_uri_rfc: tried to update the search uri rfc to reflect both medusa's behavior and the nautilus ui spec * libmedusa-internal/medusa-conf.h: enlarged word hash table to reflect increased number of words that result from allowing '_' within words. * libmedusa-internal/medusa-uri-list.c: (uri_list_clauses): fixed a clause incorrectly bound to the wrong function 2000-08-09 Rebecca Schulman * libmedusa-internal/medusa-text-index-plaintext-module.c: (read_more_data): allow words with underscores in them to be indexed as a single word. * libmedusa/Makefile.am: * libmedusa/medusa-index-service.h: added medusa-index-service.h 2000-08-09 Rebecca Schulman Fixed part of bug 2049 by adding medusa function to answer file_type is_not queries. * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_is_not_of_type): * libmedusa-internal/medusa-file-index.c: (file_index_clauses): 2000-08-09 Pavel Cisler * gnome-vfs-module/search-method.c: (do_find_directory): gnome_vfs_find_directory now takes an optional find_if_needed parameter. 2000-08-08 Rebecca Schulman * gnome-vfs-module/search-method.c: (get_file_info_for_virtual_directory): Made the mtime of search directories the time of search. nautilus displays this information in the sidebar as the time, and this seemed to be the most logical time. 2000-08-07 Maciej Stachowiak * gnome-vfs-module/search-method.c: (get_file_info_for_virtual_directory): * indexer/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_test): * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_test): Renamedirectory mime types: x-special/directory => x-directory/normal x-special/webdav-directory => x-directory/webdav x-special/virtual-directory => x-directory/search 2000-08-07 Maciej Stachowiak * CVSVERSION: New file, used to detect whether we are configuring a cvs version or a release tarball. * configure.in: Default -Werror to off when configuring a release tarball, and to on when configuring a cvs version. 2000-08-07 John Sullivan * libmedusa/medusa-search-service.c: (medusa_search_service_connection_new): One more fix. Now the success case works as well as the failure case. Initialize result to GNOME_VFS_OK if nothing goes wrong. 2000-08-07 John Sullivan Finished bug 2005 (Search should give error message when demon isn't running) * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available): Don't call _destroy on connection if it's NULL. This makes Nautilus correctly report that search is not available when you try without the search demon. 2000-08-07 Rebecca Schulman * gnome-vfs-module/search-method.c: (do_get_file_info): * libmedusa/medusa-search-service.c: (medusa_search_service_connection_is_available): * libmedusa/medusa-search-service.h: added correct result to be returned if search service is isn't running for get_file_info 2000-08-07 Rebecca Schulman * libmedusa/medusa-search-service.c: (initialize_socket): removed annoying g_return_if_fail error message if the search service is unavailable now that we are handling it better. 2000-08-07 Rebecca Schulman * libmedusa-internal/medusa-uri-list-queries.c: (medusa_uri_list_has_file_name_starting_with), (medusa_uri_list_has_file_name_ending_with): fixed bugs that made these searches not work correctly. * libmedusa-internal/medusa-uri-list.c: (uri_list_clauses): added function to make starts_with work with nautilus. * libmedusa/medusa-search-service.c: * libmedusa/medusa-search-service.h: (medusa_search_service_connection_new): changed signature to include a gnomevfsresult structure, to enable error reporting. * msearch/medusa-command-line-search.c: (main): changed medusa_search_service_connection_new to correspond to the new call signature 2000-08-07 Gene Z. Ragan * gnome-vfs-module/search-method.c: (do_open_directory): Added a check for the GnomeVFSResult when we create a connection to medusa. Return error if one is found. 2000-08-07 Maciej Stachowiak * gnome-vfs-module/Makefile.am: Add EXTRA_DIST rule to appease the `make distcheck' gods. 2000-08-07 Rebecca Schulman * libmedusa-internal/Makefile.am: fixed lack of header file listed that failed make distcheck * libmedusa-internal/medusa-master-db.c: (medusa_master_db_query): fixed printf to only output if logging is turned on. 2000-08-07 Rebecca Schulman * doc/indexing_methodology: in progress vague algorithm/code documentation * libmedusa-internal/medusa-tokenize.c: removed unnecessary gdbm.h include 2000-08-07 Rebecca Schulman * libmedusa-internal/medusa-text-index-plaintext-module.c: only index words, not numbers. * indexer/medusa-file-index-daemon.c: (copy_new_index_files): erase temporary index files at the end of indexing. 2000-08-06 Rebecca Schulman Yetw another performance fix on the indexer. This one separates index generation io into two parts; the first writes direct to disk without memory mapped io, and the second part (where the temporary text index gets sorted) uses memory mapped io. This saves memory when creating the temp indexes, and keeps the performancewhere it is really needed. * libmedusa-internal/medusa-io-handler.h: * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_write_header), (write_header_to_file_descriptor), (fopen_new_with_medusa_io_handler_header): added a new call to write an io handler header to a normally accessed file * libmedusa-internal/medusa-text-index-private.h: added additionaly structures to keep both streams and io handlers for the temp indices * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (get_uri_number_from_temp_index_cell), (get_last_cell_from_temp_index_cell), (text_index_files_are_ready), (medusa_text_index_read_file), (medusa_text_index_finish_indexing), (setup_temp_index_io_handlers), (sort_temp_index_data_into_permenant_index), (uri_number_of_cell), (medusa_text_index_destroy): changed initial io handler declarations to use new fopen extension, and later close the temp index streams and open io handlers for the second part of the text indexing. I hope this code is even vaguely comprehensible. 2000-08-04 Rebecca Schulman Split the temporary index into 11 parts to save RAM. In retrospect, I should use a power of 2. * libmedusa-internal/medusa-conf.h: added NUMBER_OF_TEMP_INDEXES variable, and set it to 11 * libmedusa-internal/medusa-text-index-private.h: added handlers for each of the separate text indices to the struct, and state information for each of them * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (get_uri_number_from_temp_index_cell), (get_last_cell_from_temp_index_cell), (medusa_text_index_read_file), (medusa_text_index_finish_indexing), (add_word_to_real_index), (uri_number_of_cell), (medusa_text_index_destroy): Changed the text indexer to write the locations of words initially to one of 11 temporary indices. Which one to write to is decided by the value of the word's integer token mod 11. Then, to save memory, we add the data from each of the small text indexes to the large index in serial. * indexer/medusa-file-index-daemon.c: (do_full_indexing): Erase all of the new files 2000-08-03 Rebecca Schulman * DEBUGGING: yet more debugs added skipping of nfs mount points for now. we can deal with how to index them later. * libmedusa-internal/medusa-master-db.c: (index_directory): * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_is_nfs_mount_point), (medusa_nfs_mount_list_initialize): * libmedusa-internal/medusa-uri-list.h: 2000-08-02 Rebecca Schulman * DEBUGGING: Fixed error in the explanation of how to debug medusa-searchd 2000-08-02 Rebecca Schulman * DEBUGGING: Added instructions on how to run gdb on the search and index daemons 2000-08-02 Rebecca Schulman * search-service/medusa-authenticate.c: (medusa_authenticate_create_cookie_file): Fixed bug that created permissions incorrectly for the cookie directory. * Changelog finished my last changelog entry. 2000-08-02 Rebecca Schulman Fixed all of the logging stuff to actually behave according to environment variables, so that people having trouble setting up the search service can report useful errors. Information on using the logging capabilities can be found in the new DEBUGGING file. * DEBUGGING -- explanation of how to report problems with the search service. all the below changes result from changing the api for medusa-master-db, medusa-uri-list and medusa-text-index * indexer/medusa-file-index-daemon.c: (do_full_indexing): * libmedusa-internal/medusa-enums.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (index_directory), (index_file): * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-text-index-private.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (medusa_text_index_read_file), (medusa_text_index_finish_indexing), (add_word_to_real_index), (uri_number_of_cell), (text_index_add_mime_modules): * libmedusa-internal/medusa-text-index.h: * libmedusa-internal/medusa-uri-list-private.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new): * libmedusa-internal/medusa-uri-list.h: * search-service/medusa-unindexed-search.h: Tue Aug 01 18:13:36 2000 George Lebl * libmedusa-internal/medusa-text-index-plaintext-module.c (add_key_to_word_array) (handle_word_fragment): When storing an integer in pointer use GINT_TO_POINTER and GPOINTER_TO_INT * libmedusa-internal/medusa-text-index-queries.c: include string.h * libmedusa-internal/medusa-text-index.c (medusa_text_index_finish_indexing): when printing "%d" cast to int to make sure it's an int 2000-07-31 Rebecca Schulman * .cvsignore: added some files * libmedusa-internal/medusa-text-index-plaintext-module.c: (read_more_data): removed a bogus duplicate close 2000-07-31 Rebecca Schulman Fixed logging to be off by default, and added an accounting mode, as well as several levels of optional logging that will be put in place. This still doesn't cover the case where we only want certain types of data to be logged. I think that we should use a 1<< type solution so flags can be anded. But this should work to prevent the case where the medusa log grows huge, and this isn't easy to turn off. * doc/flags: recorded new flags relating to logging. * libmedusa-internal/medusa-master-db-private.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new): * libmedusa-internal/medusa-master-db.h: changed db_new arguments to include a logging level parameter. * indexer/medusa-file-index-daemon.c: (main), (do_index_accounting), (do_full_indexing), (do_fast_reindexing): * search-service/medusa-file-search-daemon.c: (main): * tests/medusa-text-index-test.c: (main): update to use new medusa_db_new call * libmedusa-internal/medusa-text-index-plaintext-module.c: (medusa_text_index_parse_plaintext), (read_more_data): fixed a few g_return_if_fails that do real operations, that Dan Winship pointed out. * libmedusa-internal/medusa-conf.h: set up medusa to use new flags (log nothing but errors by default) * libmedusa-internal/medusa-text-index.c: (medusa_text_index_read_file), (add_word_to_real_index), (text_index_add_mime_modules): changed to not output so much crap. needs to use logging level, still. * libmedusa-internal/medusa-utils.c: (medusa_g_list_free_deep_custom), (medusa_g_list_free_deep): * libmedusa-internal/medusa-utils.h: added list free deep operations to use to fix memory leak. * search-service/medusa-file-search-parse-transmission.c: (present_query_results): fixed large memory leak * text-index-account-generate.pl: added new script that analsyzes text index accounting files 2000-07-28 Rebecca Schulman so the content search should be running for plain text index files and fully integrated into the search daemon now. * RENAMING: added suggestions for medusa-utils and moving clause closure stuff * doc/flags: added permissions debugging flag for new text index induced permission checking through the index. * indexer/medusa-file-index-daemon.c: (main), (do_full_indexing), (indexing_signal_received_callback), (copy_new_index_files): added command to take a directory to index, for debugging purposes, and remove the text index file when done indexing. * libmedusa-internal/medusa-conf.h: made the word hash table bigger...it was locking up on my machine. we'll have to deal with the resize issue so that this isn't a problem. * libmedusa-internal/medusa-query-clauses.h: * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-file-index-queries.h: (medusa_file_index_is_of_type), (medusa_file_index_is_owned_by), (medusa_file_index_is_in_group), (medusa_file_index_is_not_owned_by), (medusa_file_index_is_not_in_group), (medusa_file_index_is_modified_today), (medusa_file_index_is_modified_in_last_seven_days), (medusa_file_index_is_modified_this_month), (medusa_file_index_is_not_modified_today), (medusa_file_index_is_not_modified_in_last_seven_days), (medusa_file_index_is_not_modified_this_month), (medusa_file_index_uid_can_read_file): * libmedusa-internal/medusa-uri-list-queries.c: * libmedusa-internal/medusa-uri-list-queries.h: (medusa_uri_list_has_name_containing), (medusa_uri_list_has_name_not_containing), (medusa_uri_list_is_in_directory_containing), (medusa_uri_list_has_file_name_starting_with), (medusa_uri_list_has_file_name_ending_with), (medusa_uri_list_is_in_directory_tree), (medusa_uri_list_has_name_glob_matching), (medusa_uri_list_has_full_file_name): Changed the query functions to be simpler, and not to contain the file to be checked's iteration. this was necessary to search intermittent files in the index, as we'd like to do for combination text index and file index checks * libmedusa-internal/medusa-utils.c: * libmedusa-internal/medusa-utils.h: * search-service/medusa-authenticate.c: (calculate_permissions_for_file): (medusa_full_path_from_directory_and_file), (medusa_group_contains), (medusa_string_has_prefix), (medusa_g_list_partition), (medusa_intersect_two_descending_integer_lists), (medusa_difference_of_two_descending_integer_lists): added utility functions for going over text index results, and made group_contains function public so that the permissions check can use it. * libmedusa-internal/medusa-file-index.c: (file_index_clauses): added permissions checking query * libmedusa-internal/medusa-master-db.c: * libmedusa-internal/medusa-master-db.h: (medusa_master_db_query), (query_execute_from_clause_closure), (index_directory), (append_uri_to_results_if_matches), (content_requests_to_uri_numbers), (merge_new_uris_with_current_results_and_free), (medusa_master_db_ref): added functionality to integrate text index and file index searches. * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_criterion_match): fixed a bug in the regexp hash table that was causing it to get filled with garbage with the new query design. * libmedusa-internal/medusa-search-uri.c: * libmedusa-internal/medusa-search-uri.h: (clause_to_clause_closure), (medusa_search_uri_contains_content_requests), (medusa_search_uri_add_user_can_read), (medusa_clause_closure_free), (medusa_clause_closure_is_content_search): enhanced the closures to take the infomration for arguments to text index searches, as well as file index searches. added an api to support this * libmedusa-internal/medusa-text-index-queries.c: * libmedusa-internal/medusa-text-index-queries.h: (medusa_text_index_word_to_uri_numbers): changed the way it communicates the results to avoid memory issues, and fixed a nasty off by one error. * libmedusa-internal/medusa-text-index-test.c: (main): removed. * search-service/medusa-file-search-parse-transmission.c: (run_query): added separate permissions checking for content queries. * tests/medusa-text-index-test.c: (main): 2000-07-27 Rebecca Schulman * libmedusa-internal/medusa-conf.h: keep text index turned off by default 2000-07-27 Rebecca Schulman * Makefile.am: * tests/medusa-text-index-test.c fixed build issues and added relevant file 2000-07-27 Pavel Cisler * Makefile.am: Disable the testing directory temporarily to avoid build breakage. 2000-07-27 Rebecca Schulman Oh the excitement, the text index is working. There are a few new calls. I need to fix the query stuff to make the text index work, and to massively optimize the query stuff, which is pathetic right now. you can test the text index by running tests/medusa-text-index-test * libmedusa-internal/medusa-text-index.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (get_uri_number_from_temp_index_cell), (get_last_cell_from_temp_index_cell), (medusa_text_index_read_file), (medusa_text_index_finish_indexing), (add_word_to_real_index), (write_start_location_to_location_file), (write_end_location_to_location_file), (medusa_text_index_read_start_location_from_location_file), (medusa_text_index_read_end_location_from_location_file), (uri_number_of_cell): added filling out the location and start and stop index files * libmedusa-internal/medusa-text-index-queries.h: * libmedusa-internal/medusa-text-index-queries.c: (medusa_text_index_word_to_uri_numbers): added standard text index resolution * libmedusa-internal/medusa-text-index-private.h * libmedusa-internal/Makefile.am: added medusa-text-index-private.h,for data privacy issues * tests/Makefile.am: * libmedusa-internal/medusa-text-index-test.c: (main): test file for the text index. * libmedusa-internal/medusa-tokenize.h: * libmedusa-internal/medusa-tokenize.c: (medusa_string_has_token), (medusa_unsigned_int_to_token): added a few new calls for the text index * libmedusa-internal/medusa-io-handler.h: * libmedusa-internal/medusa-io-handler.c: (medusa_io_handler_get_data_region), (medusa_io_handler_append_zeros): added two new calls used by the text index * doc/flags: updated the flags list 2000-07-26 Mathieu Lacage * libmedusa/medusa-search-service.c: (medusa_search_service_connection_read_search_result): fix bug which made it not work at all most of the time. I _LOVE_ maciej. 2000-07-24 Rebecca Schulman Rewrote and corrected medusa's permissions scheme to only return files that a user can know exists, ie they can recursively read each of the parent directories. This corrects bugzilla.eazel.com bug #1711 * doc/flags: added search results debug flag to debug the authentication process * search-service/medusa-authenticate.c: (medusa_authenticate_create_cookie_file), (medusa_authenticate_is_cookie_request), (medusa_authenticate_is_correct_cookie), (medusa_authenticate_uid_can_read), (can_read_this_directory), (calculate_permissions_for_file), (group_contains), (get_user_key): * search-service/medusa-authenticate.h: * search-service/medusa-file-search-parse-transmission.c: (present_query_results), (free_entries): 2000-07-21 Mathieu Lacage Update medusa gnome-vfs module to latest gnome-vfs changes. If you have pbs with this, please, contact me: It compiles here but I dunno how to test it. * gnome-vfs-module/search-method.c: (search_real_directory_handle_new), (search_directory_handle_destroy), (do_open_directory), (do_read_directory), (get_file_info_cancellable_cover), (do_get_file_info), (do_get_file_info_from_handle): * libmedusa-internal/medusa-master-db.c: (index_directory): 2000-07-21 Rebecca Schulman * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_criterion_match): fixed huge leak in query running. 2000-07-21 Rebecca Schulman * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (get_uri_number_from_temp_index_cell), (get_last_cell_from_temp_index_cell), (medusa_text_index_finish_indexing), (add_word_to_real_index), (write_start_location_to_location_file), (write_end_location_to_location_file), (text_index_add_mime_modules): added more code to file out the location and start and stop files * libmedusa-internal/medusa-plaintext-utilities.h: * doc/desired-modules: list of text indexing modules we should consider having soon. 2000-07-20 Rebecca Schulman Changed clauses to include the type of the argument they expect, and use that to give the query function the right type of argument. This fixes functions that expected numerical arguments, like size and date requests. Added a "state_of_queries" file, which talks about which search uri stuff is working and isn't. * libmedusa-internal/medusa-query-clauses.c: (medusa_query_clauses_add_clause), (medusa_query_clauses_get_function), (medusa_query_clause_new): * libmedusa-internal/medusa-query-clauses.h: keep track of types in MedusaQueryClause structure * libmedusa-internal/medusa-file-index.c: (file_index_clauses): * libmedusa-internal/medusa-uri-list.c: (uri_list_clauses): added types to the query clauses definitions. * libmedusa-internal/medusa-search-uri.c: (clause_to_clause_closure): * libmedusa-internal/medusa-search-uri.h: use argument types to process search uri types Started the process of creating the reverse text index from the temporary text index * libmedusa-internal/medusa-master-db.c: (medusa_master_db_index): after iterating through the files, added a call to finish up the text index stuff. * libmedusa-internal/medusa-text-index.c: (medusa_text_index_finish_indexing), (add_word_to_real_index), (text_index_clauses): * libmedusa-internal/medusa-text-index.h: added new functions to process reverse index (incomplete) Keep a file * doc/state_of_queries -- keep a file documenting known non-working things in msearch. We need to create a test harness for msearch * libmedusa-internal/medusa-file-index-queries.h: fixed a gid that was called uid 2000-07-20 Darin Adler * gnome-vfs-module/search-method.c: (parse_search_uri): Fix so this function doesn't care about the extra slashes any more, by using the path instead of the whole URI. (uri_to_string_remove_extra_slashes): Moved this function down to make it clear that it's only used in one place. 2000-07-20 Rebecca Schulman * libmedusa-internal/medusa-master-db.c: (index_file): fixed bug introduced in cvs merge 2000-07-20 Rebecca Schulman * .cvsignore: * RENAMING: * tests/data/.cvsignore: CVS housekeeping, and added renaming file 2000-07-20 Rebecca Schulman * libmedusa-internal/medusa-master-db.c: (index_file): * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (medusa_text_index_read_file): * search-service/medusa-file-search-parse-transmission.c: (run_query): some quick morning fixes to sync my version with the cvs version. Added hook to run unindexed background search to the search service 2000-07-19 Rebecca Schulman * gnome-vfs-module/search-method.c: (get_file_info_for_virtual_directory): changed mime type of virtual directories to "x-special/virtual-directory" * libmedusa-internal/medusa-conf.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_query): return immediately if the uri is garbage * libmedusa/medusa-search-service.c: (medusa_search_service_connection_read_search_result): changed a strncpy to g_strndup for clarity and checked for null case, which was causing problems 2000-07-18 Darin Adler Some work on the gnome-vfs module to simplify a bit and fix a number of bugs found by code inspection. I wasn't able to test, but Maciej tested for me and says it works OK. * gnome-vfs-module/search-method.c: (search_real_directory_handle_new), (search_wrapped_directory_handle_new), (search_directory_handle_destroy): Got rid of the URI from the directory handle, since it's not needed. (search_file_handle_new), (search_file_handle_destroy): Store the name for the file here instead of storing the entire URI. This is only really needed for get_file_info_from_handle. (uri_to_string_remove_extra_slashes): Fixed this function to work and not leak and gave it a better name. (parse_search_uri): Simplify for callers by taking GnomeVFSURI, since all the callers want to use it that way. Use g_strndup instead of g_new followed by strncpy. Add missing trailing NULL parameter to g_strconcat. Add comments. (open_cancellable_cover), (do_open), (do_create): Store the name of the file in the file handle instead of the complete URI. Also create the handle only if the file is successfully opened/created. (do_close): Move code to close the file so it's not after the return statement. (string_g_list_to_strv): Use g_new instead of g_new0 since we are writing each entry in the vector. (do_open_directory): Changed logic a bit. It worked the old way, but the new way matches the way the other calls works more closely. Now the metadata is copied elsewhere to keep allocating right. (get_file_info_for_virtual_directory), (get_file_info_for_virtual_link): Common functions to hold the code that sets up file info. Set up valid_fields when setting up file info. (do_read_directory): Fix incorrect use of "&&" to test the GNOME_VFS_FILE_INFO_FOLLOW_LINKS bit. The old code would always follow links, I believe. (get_file_info_cancellable_cover), (do_get_file_info): Fix incorrect use of "&&" to test the GNOME_VFS_FILE_INFO_FOLLOW_LINKS bit. The old code would always follow links, I believe. Share more code between the two child cases. (do_get_file_info_from_handle): Fixed storage leak caused by creating meta-key array twice. Made it return the right name for the SEARCH_URI_TYPE_IMMEDIATE_CHILD case. (do_is_local): Added more FIXMEs. (do_make_directory): Fix storage leak for the SEARCH_URI_TYPE_IMMEDIATE_CHILD case. (do_remove_directory): Fix storage leak for the SEARCH_URI_TYPE_IMMEDIATE_CHILD case. (do_move): Fix storage leak for case where either URI is a SEARCH_URI_TYPE_IMMEDIATE_CHILD. (do_unlink): Fix storage leak for the SEARCH_URI_TYPE_IMMEDIATE_CHILD case. (do_check_same_fs): Fix storage leak for case where either URI is a SEARCH_URI_TYPE_IMMEDIATE_CHILD. Also fix typo that was causing it to use an uninitialized variable (b_type twice). (do_set_file_info), (do_truncate), (do_find_directory): Make code structure match other similar functions (which fixed leaks in those functions, but there were no leaks here). (do_create_symbolic_link): Fix storage leak for the SEARCH_URI_TYPE_IMMEDIATE_CHILD case. * libmedusa-internal/medusa-uri-list-queries.c: (medusa_uri_list_has_file_name_starting_with), (medusa_uri_list_has_file_name_ending_with), (medusa_uri_list_is_in_directory_tree): * libmedusa/medusa-search-service.c: (medusa_search_service_connection_read_search_result): Fixed some calls to g_strconcat that were missing trailing NULL. * gnome-vfs-module/.cvsignore: * libmedusa/.cvsignore: Added some ignored files. 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c: (do_read_directory, do_get_file_info): Lie about the name correctly, etc. 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c: (search_directory_handle_destroy, string_g_list_to_strv): Manage meta_keys arrays better (extract_string_from_uri, parse_search_uri): Assorted bug fixes. (do_open_directory, do_get_file_info, do_get_file_info_from_handle): Fixed for meta_key memory management. 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c: (extract_string_from_uri), (parse_search_uri), (do_open_directory): * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_to_clause_closures): 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: extract_string_from_uri: New wrapper function which parses gnome_vfs_uri_to_string to get rid of the "//"s it adds; (do_open), (do_create), (do_get_file_info), (do_make_directory), (do_remove_directory), (do_move), (do_unlink), (do_check_same_fs), (do_set_file_info), (do_truncate), (do_find_directory), (do_create_symbolic_link): Changed from using "uri->text" to the new function. 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: (do_get_file_info), Added correct setting of symlink_name when dealing with immediate children. (do_get_file_info_from_handle): Implemented again...this time correctly :) 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c (do_get_file_info, do_get_file_info_from_handle): Fixed some stuff, put in FIXMEs for more. 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: (do_get_file_info), (do_get_file_info_from_handle), (do_set_file_info): Write remaining "unusual" functions (e.g. ones that are significantly different....AND ALL THE GNOME-VFS MODULE FUNCTIONS ARE IMPLEMENTED! 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c (do_open_directory): Purge yet another warning. 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c: (do_create), (do_remove_directory), (do_truncate), (do_find_directory), (do_create_symbolic_link): More fixes by inspection. 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c: (do_create, do_close, do_close_directory, do_get_file_info, do_get_file_info_from_handle, do_make_directory, do_remove_directory, do_move, do_unlink, do_set_file_info): Fix warnings and attendant massive lossage. (vfs_module_init, vfs_module_shutdown): Add gnome-vfs module system boilerplate. 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: (do_find_directory), (do_create_symbolic_link): Fix memory leaks. 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: do_create, do_unlink, do_truncate: Suck less! do_truncate_handle, do_find_directory, do_create_symbolic_link: Implemented. 2000-07-18 Maciej Stachowiak * gnome-vfs-module/search-method.c (search_real_directory_handle_new, search_directory_handle_destroy, do_open, do_create, do_open_directory, do_close_directory, do_read_directory, do_move, do_unlink, do_check_same_fs, do_truncate): All sorts of fixes. * gnome-vfs-module/Makefile.am: Set INCLUDES, not CFLAGS. 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: (do_make_directory), (do_remove_directory), (do_unlink), (do_check_same_fs), (do_truncate): Some implemented, some fixed to remove compilation problem. * configure.in: Enable more warnings. * gnome-vfs-module/search-method.c: (do_open), (do_create): Fix pointer errors. 2000-07-18 Seth Nickell * gnome-vfs-module/search-method.c: (do_close), (do_read), (do_write), (do_seek), (do_tell): Implemented. (do_create), (do_open): Implemented...I do so love creating wrappered handles... 2000-07-17 Maciej Stachowiak * gnome-vfs-module/search-method.c: Realized our life is harder than we thought; it's necessary to wrap the handles generated by the underlying filesystem oursleves. Isn't this fun? (search_real_directory_handle_new, search_wrapped_directory_handle_new, search_directory_handle_destroy, search_handle_new, search_handle_destroy): Handle wrapper handles. (do_read): implemented. (do_create, do_close, do_write, do_seek, do_tell): Put back stubs. (do_open_directory): Some work in progress. 2000-07-17 Seth Nickell * gnome-vfs-module/search-method.c: (do_is_local), (do_make_directory), (do_remove_directory): More calls to support GnomeVFS... 2000-07-17 Seth Nickell * gnome-vfs-module/search-method.c: (do_open), (do_create), (do_truncate): Implemented calls to support GnomeVFS. 2000-07-17 Maciej Stachowiak * gnome-vfs-module/search-method.c: Added markers of some functions Seth and I are implementing. (parse_search_uri, do_open_directory): Started fixing stuff. * gnome-vfs-module/search-method.h: Removed. * gnome-vfs-module/Makefile.am: Removed from build. 2000-07-17 Maciej Stachowiak * gnome-vfs-module/search-method.h, gnome-vfs-module/search-method.c: (search_directory_handle_new, search_directory_handle_destroy, parse_search_uri, do_open, do_create, do_close, do_read, do_write, do_seek, do_tell, do_truncate_handle, do_open_directory, do_close_directory, do_read_directory, do_get_file_info, do_get_file_info_from_handle, do_is_local, do_make_directory, do_remove_directory, do_move, do_unlink, do_check_same_fs, do_set_file_info, do_truncate, do_find_directory, do_create_symbolic_link): Skeleton implementation of search module, moved from gnome-vfs and made to actually compile. * gnome-vfs-module/search-methods.conf: Config file to add search URI handling. * gnome-vfs-module/Makefile.am: Make it all build and install. * Makefile.am, configure.in: add gnome-vfs-module directory to build. * msearch/Makefile.am: Don't link in medusa internal stuff. 2000-07-17 Maciej Stachowiak * libmedusa/medusa-search-service.h, libmedusa/medusa-search-service.c: (initialize_socket), (authenticate_connection), (send_search_request), (medusa_search_service_connection_start_search), (medusa_search_service_connection_read_search_result), (medusa_search_service_connection_destroy): Converted API to be synchronous, since a gnome-vfs wrapper will provide async functionality. * msearch/medusa-command-line-search.c (main): Use new synch API. 2000-07-17 Rebecca Schulman * indexer/medusa-file-index-daemon.c fixed a bug that made backup files not get erased for the text index between indexings 2000-07-17 Rebecca Schulman * libmedusa-internal/medusa-conf.h: spew debugging info about what is being indexed, if textindexing is on * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (medusa_text_index_read_file), (text_index_add_mime_modules): fixed medusa to only index plain text files 2000-07-17 Rebecca Schulman * configure.in: * indexer/Makefile.am: * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-text-index-plaintext-module.c: (medusa_text_index_parse_plaintext), (read_more_data), (enlarge_word_fragment), (transfer_hash_table_to_word_array_and_free), (add_key_to_word_array), (handle_word_fragment), (go_to_first_word_in_block), (block_is_one_word), (word_is_last_word_in_block), (go_to_next_word_in_block): * libmedusa-internal/medusa-text-index-plaintext-module.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new): Forgot to add plaintext module parsing files in their new locations last time! here they are..they read data from text files in blocks and return a list of unique words that occurred in the file. 2000-07-16 Pavel Cisler * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new): This is a temporary fix to make medusa compile. Rebecka forgot to check in two files and had to leave for an emergency. Until she gets to fix it properly this should carry us over. 2000-07-14 Rebecca Schulman the main change here is the addition of the first part of the text indexing process. things are still very raw here, however. * configure.in: * indexer/Makefile.am: * indexer/modules/Makefile.am: * libmedusa-internal/Makefile.am: * indexer/modules/medusa-text-index-plaintext-module.c * indexer/modules/medusa-text-index-plaintext-module.h Tried to make indexing modules work. It failed for now, so i am just going to put the one module that exists into libmedusa-internal. * indexer/medusa-file-index-daemon.c: (release_locks), (do_full_indexing), (do_fast_reindexing), (backup_index_files), (copy_new_index_files): some refactoring, reordering of functions to be more readable, and changed lock variables to be booleans rather than integers * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (medusa_master_db_index), (medusa_master_db_update), (medusa_master_db_query), (query_execute_from_clause_closure), (index_directory), (index_file), (medusa_master_db_ref), (medusa_master_db_unref), (medusa_master_db_destroy): reformatted, refactored some string functionality into separate methods, and added text indexing to the main index process. (it is off by default), you can turn on the partial index generation by setting TEXT_INDEX_ON * libmedusa-internal/medusa-text-index-mime-module.h: * libmedusa-internal/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_first_valid_module), (mime_pattern_matches), (dummy_return_words): fixed a leak in the module search code, changed function text parsing structure specification. * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (medusa_text_index_read_file), (array_of_words_free), (uri_number_of_cell): added plaintext module to the text indexing modules, and generation of the temporary indexing code * libmedusa-internal/medusa-conf.h: neatened up * libmedusa-internal/medusa-uri-list-encoders.c: (medusa_uri_list_filename_encode), (medusa_uri_list_directory_name_encode): fixed bug in the encoding functions where strncpy was used when memcpy should have been * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_is_stoplist_file), (medusa_uri_number_to_uri), (medusa_uri_list_get_field_info), (medusa_uri_list_get_first_real_record), (medusa_uri_list_get_query_clauses), (medusa_uri_list_number_of_uris), (medusa_uri_list_ref), (medusa_uri_list_unref), (medusa_uri_list_index_file), (uri_list_field_info), (uri_list_clauses), (medusa_uri_list_destroy), (medusa_file_stoplist_initialize): corrected formatting, fixed a few leaks. * libmedusa-internal/medusa-utils.h: * libmedusa-internal/medusa-utils.c: (medusa_full_path_from_directory_and_file), (medusa_full_uri_from_directory_and_file), (directory_name_ends_with_slash): refactored more string functionality into here. 2000-07-13 Elliot Lee * indexer/Makefile.am, libmedusa/Makefile.am, msearch/Makefile.am, search-service/Makefile.am: Fix srcdir != builddir * libmedusa-internal/medusa-text-index.c: include string.h to get strlen prototype to avoid warnings. 2000-07-13 Maciej Stachowiak Completed bugzilla tasks 1326 and 1307: * libmedusa/Makefile.am: Fix some minor typos. * libmedusa/medusa-search-service.c (authenticate_connection): Avoid double-free. (search_results_received_callback): Don't assume we're done until we have given all results to the callback; use macro for end of transmission token. (spawn_search): Fix request format. * msearch/Makefile.am: * msearch/medusa-command-line-search.c (search_callback), (main): rewrite to use the search API. * search-service/medusa-file-search-parse-transmission.c: (present_query_results): don't send garbage characters, and send newlines after each result. 2000-07-12 Maciej Stachowiak * libmedusa/medusa-search-service.c: (initialize_socket), (search_results_received_callback): Might even work now. 2000-07-11 Rebecca Schulman * README: updated the readme to be more recent * doc/how_to_use_msearch: new file describing the new msearch * libmedusa-internal/medusa-conf.h: changed root directory back to /, so medusa is useful again 2000-07-11 Maciej Stachowiak * libmedusa/medusa-search-service.c: (initialize_socket), (authenticate_connection), (g_list_remove_tail), (search_results_received_callback), (spawn_search): Closer to working (I hope). 2000-07-11 Rebecca Schulman Indexer now runs and makes shells of text index files, it doesn't fill them. * libmedusa-internal/medusa-conf.h: Added text index file names * indexer/medusa-file-index-daemon.c: (do_full_indexing), (do_fast_reindexing):added text file args to master_db_new * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (query_execute_from_clause_closure): Changed declaration for medusa-master-db to take text file name arguments * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-text-index.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_new), (medusa_text_index_read_file): changed text_index_initialize to text_index_new Some general bug fixes to synchronize the 2 databases * libmedusa-internal/medusa-file-index-queries.c: (username_to_uid), (group_to_gid): Removed frees of pwnam and grnam structures. I don't know if this is a leak or not * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_free), (write_index_info_to_database), (read_index_info_from_database): Fixed metainfo stuff to be in separate procedures * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_new): * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_number_to_uri), (uri_list_field_info): fixed bug that switched the order of the fields. * msearch/medusa-command-line-search.c: (get_key_from_cookie), (parse_results), (main): provided more intelligent parsing of results. now prints sane stuff * search-service/medusa-file-search-daemon.c: (main): * search-service/medusa-file-search-parse-transmission.c: (run_query), (present_query_results): more intelligent comments, added text index args to medusa_master_Db_new 2000-07-11 Robin * Slomkowski *indexer/Makefile.am: added $(GNOME_LIBS) $(OAF_LIBS) *search-service/Makefile.am: added $(GNOME_LIBS) $(OAF_LIBS) 2000-07-11 Robin * Slomkowski *indexer/Makefile.am: added $(OAF_LIBS) 2000-07-11 Eskil Heyn Olsen * configure.in: Added OAF and GConf tests. * indexer/modules/Makefile.am: Fixed some more .. to $(top..) 2000-07-11 Eskil Heyn Olsen * msearch/Makefile.am: * search-service/Makefile.am: * tests/Makefile.am: More s/../$(top_*dir) 2000-07-11 Eskil Heyn Olsen * configure.in: Removed to "goo" statements (??) * indexer/Makefile.am: replaced some ../ with $(top_*dir). * indexer/modules/Makefile.am: Commented out an unused _SOURCES decl. 2000-07-10 Rebecca Schulman Two things here: Most of the remaining bugs caused by the massive rewrite are fixed now. The second is some architectural work on the text index. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (medusa_master_db_index), (medusa_master_db_query), (index_file): Changed the search order, to correspond to the table's record order. Added basic text index commands to the indexing process. * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_new), (medusa_rdb_file_read_header), (medusa_rdb_file_set_metainfo), (medusa_rdb_file_get_metainfo), (medusa_rdb_file_add_field), (medusa_rdb_file_removxe_field), (medusa_rdb_file_write_initial_header), (medusa_rdb_file_write_number_of_records), (medusa_rdb_file_write_number_of_fields), (medusa_rdb_file_test): Removed the old hack of using the first db record, and replaced it with a fixed length metainfo field. For the uri list and file index the metainfo stored is the db version, and the unix time for the last indexing. I added a new pointer in the file structure to the metainfo section, and to the header section. There is a lot less hellish pointer arithmetic now, I think. * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_free): got rid of the old set and get first record and replaced it with set and get metainfo * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_destroy), (write_index_info_to_database), (read_index_info_from_database): * libmedusa-internal/medusa-uri-list.h: Changed set and get methods similar to file index, again simplifying the previous code * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_insert): Updated to reflect file structure change. * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_criterion_match): Fixed bad boolean expressions. Both positive and negative queries should work now. * libmedusa-internal/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_first_valid_module), (medusa_text_index_mime_module_get_parser), (dummy_return_words): added new functions to get appropriate mime modules * libmedusa-internal/medusa-text-index-mime-module.h: * libmedusa-internal/medusa-text-index.c: (medusa_text_index_initialize), (text_index_files_are_ready), (medusa_text_index_read_file), (uri_number_of_cell), (medusa_text_index_create_from_temp), (text_index_clauses), (medusa_text_index_destroy): * libmedusa-internal/medusa-text-index.h: started some code for the temporary index * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-text-index-queries.h: * libmedusa-internal/medusa-text-index-queries.c: added the functions that the text index will use as its vocabulary (just contains and does_not_contain) * msearch/medusa-command-line-search.c: (get_key_from_cookie), (parse_results): * search-service/medusa-authenticate.c: (medusa_authenticate_uid_can_read): * search-service/medusa-authenticate.h: changed uid_can_read to take uri's rather than file names, which are the results, now. * search-service/medusa-file-search-daemon.c: (main), (initialize_socket): a few random useless cleanups. * search-service/medusa-file-search-parse-transmission.c: (present_query_results): changed output format. This is still broken. * indexer/medusa-file-index-daemon.c: (do_full_indexing): Improved messages about indexing. They should even be vaguely accurate now. * libmedusa-internal/medusa-conf.h Medusa gets a version upgrade to 0.2, because of all of the restructuring. Fri Jul 07 22:18:02 2000 George Lebl * libmedusa/medusa-uri-list.c: Include to get rid of warning on alpha 2000-07-06 Rebecca Schulman * indexer/medusa-file-index-daemon.c: (do_full_indexing), (do_fast_reindexing), (backup_index_files), (copy_new_index_files) * libmedusa-internal/medusa-conf.h: * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_index_encoders_test) * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_free) * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new) * libmedusa-internal/medusa-uri-list.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_destroy), (medusa_file_stoplist_initialize) * search-service/medusa-file-search-daemon.c: (main) Changed the naming scheme to take file names as explicit arguments. * libmedusa-internal/medusa-uri-list-queries.c: (regexp_escape) fixed quick bug * msearch/medusa-command-line-search.c: (get_key_from_cookie) now waits more patiently for a cookie, rather than eating up cpu time * search-service/medusa-file-search-parse-transmission.c: (present_query_results) added END terminus for results * configure.in: 2000-07-06 Maciej Stachowiak * libmedusa/medusa-search-service.c: (initialize_socket), (authenticate_connection), (medusa_search_service_connection_new), (search_results_received_callback), (spawn_search), (proceed_to_next_search), (enqueue_handle), (unenqueue_handle), (medusa_search_service_connection_start_search), (medusa_search_service_connection_cancel_search): Fill in more of implementation. 2000-07-05 Eskil Heyn Olsen * libmedusa-internal/Makefile.am: * libmedusa/Makefile.am: Fixed for make dist and rpm -ta action... 2000-07-05 Robin * Slomkowski * libmedusa-internal/Makefile.am: Added headers files to noinst_HEADERS * medusa.spec.in: Changed the version info, and added a development package, and fixed the file includes 2000-07-05 Ramiro Estrugo * libmedusa/Makefile.am: Headers place for medusa is $prefix/include/libmedusa. 2000-07-05 Maciej Stachowiak * libmedusa-internal/medusa-lock-file-paths.h: Forgot to include this. 2000-07-05 Maciej Stachowiak * libmedusa/Makefile.am, indexer/medusa-file-index-daemon.c, libmedusa/medusa-common-private.h, libmedusa/medusa-index-service-private.h, libmedusa/medusa-search-service-private.h, libmedusa/medusa-search-service.c, libmedusa/medusa-search-service.h, msearch/medusa-command-line-search.c, search-service/medusa-authenticate.c, search-service/medusa-file-search-daemon.c, search-service/medusa-file-search-parse-transmission.c: Split out private parts of search/indexing API, and include the private bits where appropriate. Install some private headers for now, since Nautilus is using some of the soon-to-be-private interfaces for now. 2000-07-05 Maciej Stachowiak * libmedusa/medusa-search-service.h: Add new API. * libmedusa/medusa-search-service.c: Stub versions of all the calls. * libmedusa/Makefile.am: Build a libmedusa shared lib. 2000-07-01 Rebecca Schulman Some bug fixes for the latest giant checkin. more to come. * indexer/medusa-file-index-daemon.c: (wait_for_indexing_signal), (do_fast_reindexing), (indexing_signal_received_callback), (initialize_socket): commented out the multiprocess stuff for now * libmedusa-internal/medusa-conf.h: changed root directory to /tmp to ease debugging * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-uri-list-queries.c: (medusa_uri_list_has_full_file_name): fixed type error in query functions * libmedusa-internal/medusa-master-db.c: (medusa_master_db_query), (query_execute_from_clause_closure): added a check for null functions, skip metadata table row. * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_to_clause_closures): fixed bug that didn't initialize closure_info list variable * libmedusa-internal/medusa-uri-list-private.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_destroy), (write_index_info_to_database): added writing and reading of db info -- another bug fix * msearch/medusa-command-line-search.c: (main): fixed general bugs in the process here 2000-07-01 Maciej Stachowiak * indexer/medusa-file-index-daemon.c: (release_locks, main, do_full_indexing, do_fast_reindexing): Try to release locks on crash or exit (not sure if atexit is enough, may also need signal handlers). 2000-07-01 Rebecca Schulman * libmedusa-internal/medusa-search-uri.h forgot to commit this last time * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_get_first_real_record): * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_get_first_real_record): changed these, since the metainfo is accounted for in the first_record list. * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new): * msearch/medusa-command-line-search.c: (main): * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission): fixed a few parse bugs 2000-07-01 Rebecca Schulman Split up the single file database into two. a uri list database, and a file attribute database. created a single master database that holds both, and will also hold the text index. enabled both the uri list and the file attrbiute index to be compliant with the search uri syntax. This necessitated a lot of architectural changes. * Makefile.am: * configure.in: * libmedusa-internal/Makefile.am: Added new file make info * databases/file-index-stoplist: changed file names to uri names * indexer/medusa-file-index-daemon.c: (main), (do_full_indexing), (do_fast_reindexing), (backup_index_files), (copy_new_index_files): changed this to eliminate fast reindexing for now, and also to * libmedusa-internal/medusa-conf.h: * libmedusa-internal/medusa-db-update.h: added structure to deal with types of updates available. * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_uri_number_encode), (medusa_file_database_mime_type_encode), (medusa_file_database_size_encode), (medusa_file_database_uri_number_decode), (medusa_file_index_encoders_test): fixed a memory leak in the encoders. add uri number encode and decode functions. * libmedusa-internal/medusa-file-index-encoders.h: * libmedusa-internal/medusa-file-index-queries.c: * libmedusa-internal/medusa-file-index-queries.h: (medusa_file_index_is_of_type), (medusa_file_index_is_owned_by), (medusa_file_index_is_in_group), (medusa_file_index_is_not_owned_by), (medusa_file_index_is_not_in_group), (medusa_file_index_is_modified_today), (medusa_file_index_is_modified_in_last_seven_days), (medusa_file_index_is_modified_this_month), (medusa_file_index_is_not_modified_today), (medusa_file_index_is_not_modified_in_last_seven_days), (medusa_file_index_is_not_modified_this_month), (unix_time_at_midnight), (unix_time_seven_days_ago), (unix_time_a_month_ago), (username_to_uid), (group_to_gid): fixed these to use new clause query format as opposed to old rdb-query format. * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-information.c: (medusa_file_attributes_new), (medusa_index_file_attributes), (medusa_file_attributes_free): * libmedusa-internal/medusa-file-information.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (medusa_file_system_db_get_number_of_records), (medusa_file_system_db_get_field_info), (medusa_file_system_db_free), (medusa_file_system_db_index_file), (check_field_info_from_file), (file_index_field_info), (file_index_clauses), (medusa_file_system_db_get_first_real_record), (medusa_file_system_db_get_query_clauses): changed file index to just take in one file for a time in indexing, and the record encoding was changed to eliminate file and directory field, and to add uri number * libmedusa-internal/medusa-hash.c: (medusa_hash_new), * libmedusa-internal/medusa-hash.h: (medusa_hash_ref), (medusa_hash_unref), (medusa_hash_destroy): changed hashes to use ref counting. * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-master-db-private.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (medusa_master_db_index), (medusa_master_db_update), (medusa_master_db_query), (query_execute_from_clause_closure), (index_directory), (index_file), (medusa_master_db_destroy): added new master db class to administer indexing and accept queries. * libmedusa-internal/medusa-query-clauses.c: * libmedusa-internal/medusa-query-clauses.h: (medusa_query_clauses_new), (medusa_query_clauses_add_clause), (medusa_query_clauses_get_function), (medusa_query_clauses_ref), (medusa_query_clauses_unref), (medusa_query_result_succeeded), (medusa_query_result_get_next_record), (medusa_query_result_set_succeeded), (medusa_query_result_set_next_record), (medusa_query_result_free), (medusa_query_clauses_destroy), (medusa_query_clause_new), (medusa_query_clause_unref), (medusa_query_clause_destroy): added new query structure that takes search uri clauses * libmedusa-internal/medusa-rdb-file.c: * libmedusa-internal/medusa-rdb-file.h: (medusa_rdb_file_get_number_of_records): added get_number_of_records function as abstraction * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_insert), * libmedusa-internal/medusa-rdb-table.h: (medusa_rdb_table_get_number_of_records): added get_number_of_records function as abstraction switched record order to use prepend rather than append * libmedusa-internal/medusa-search-uri.c: (medusa_search_uri_to_clause_closures), (clause_to_clause_closure), (medusa_clause_closure_free), (medusa_uri_is_search_uri), (get_next_root_uri), (get_search_criteria): finished uri parsing -> query clause routines. * libmedusa-internal/medusa-text-index.c: (create_temporary_index_file), (medusa_text_index_destroy): added a few more design ideas. * libmedusa-internal/medusa-tokenize.h: removed bogus gdbm.h header * libmedusa-internal/medusa-uri-list-encoders.c: * libmedusa-internal/medusa-uri-list-encoders.h: (medusa_uri_list_filename_encode), (medusa_uri_list_directory_name_encode), (medusa_uri_list_is_directory_encode), (medusa_uri_list_filename_decode), (medusa_uri_list_directory_name_decode), (medusa_uri_list_is_directory_decode): added encoders for uri list (taken from file-list-encoders) * libmedusa-internal/medusa-uri-list-private.h: put struct definition in here * libmedusa-internal/medusa-uri-list-queries.c: (medusa_uri_list_has_name_containing), (medusa_uri_list_has_name_not_containing), (medusa_uri_list_is_in_directory_containing), (medusa_uri_list_has_file_name_starting_with), (medusa_uri_list_has_file_name_ending_with), (medusa_uri_list_is_in_directory_tree), (medusa_uri_list_has_name_glob_matching), (medusa_uri_list_has_full_file_name), (regexp_escape), (file_glob_to_regexp): * libmedusa-internal/medusa-uri-list-queries.h: moved some of the file index queries into uri-list-queries,c as with moving the relevant fields to uri list * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_number_to_uri), (medusa_uri_list_get_field_info), (medusa_uri_list_get_first_real_record), (medusa_uri_list_get_query_clauses), (medusa_uri_list_number_of_uris), (medusa_uri_list_index_file), (medusa_uri_list_update_file), (uri_list_field_info), (uri_list_clauses), (medusa_uri_list_destroy), (medusa_file_stoplist_initialize): * libmedusa-internal/medusa-uri-list.h: created image of medusa-file-index * msearch/medusa-command-line-search.c: (main): updated it to take search uris as opposed to old arguments * search-service/Makefile.am: * search-service/medusa-file-search-daemon.c: (main): * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission), (run_query), (present_query_results): * search-service/medusa-file-search-parse-transmission.h: changed the file search daemon to accept search uris rather than old argument format. * search-service/medusa-search-uri.c: * search-service/medusa-search-uri.h: moved these to libmedusa-internal 2000-06-30 Fatih Demir * libmedusa-internal/medusa-rdb-query.c: Added (gchar *) casts to the strcmp-call. 2000-06-28 Rebecca Schulman added uri lists, and a top level db that will talk to both the text index and the file index. Changed some file index apis to reflect the changes. changed indexes to create file names automatically, rather than having to make up names. * indexer/medusa-file-index-daemon.c: (main), (do_full_indexing), (do_fast_reindexing), (backup_index_files), (copy_new_index_files): * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-conf.h: * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_index_encoders_test): * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_queries_test): * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_new), (index_directory), (medusa_file_index_reindex_filenames), (medusa_file_index_record_to_full_file_name), (file_index_field_info), (medusa_file_index_test), (medusa_file_reindexing_test), (medusa_file_index_get_next_file_name): * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-master-db.c: (medusa_master_db_new), (medusa_master_db_index), (medusa_master_db_ref), (medusa_master_db_unref), (medusa_master_db_destroy): * libmedusa-internal/medusa-master-db.h: * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_is_empty), (medusa_rdb_file_test): * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-rdb-table.c: * libmedusa-internal/medusa-uri-list-encoders.c: (medusa_uri_list_filename_encode), (medusa_uri_list_directory_name_encode), (medusa_uri_list_filename_decode), (medusa_uri_list_directory_name_decode): * libmedusa-internal/medusa-uri-list-encoders.h: * libmedusa-internal/medusa-uri-list-private.h: * libmedusa-internal/medusa-uri-list.c: (medusa_uri_list_new), (medusa_uri_list_index), (medusa_uri_list_is_stoplist_file), (medusa_uri_list_ref), (medusa_uri_list_unref), (index_directory), (index_file), (uri_list_field_info), (medusa_uri_list_destroy), (write_index_info_to_database), (read_index_info_from_database), (medusa_file_stoplist_initialize): * libmedusa-internal/medusa-uri-list.h: * libmedusa-internal/medusa-utils.h: * search-service/medusa-file-search-daemon.c: (main), (ensure_index_validity): 2000-06-28 Rebecca Schulman * libmedusa-internal/medusa-rdb-query-private.h: * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_new), (medusa_rdb_query_free), (medusa_rdb_query_criterion_free), (medusa_rdb_query_criterion_new), (medusa_rdb_query_add_selection_criterion), (medusa_rdb_query_criterion_match), (medusa_rdb_query_match), (medusa_rdb_query_test): * libmedusa-internal/medusa-rdb-query.h: added ability to give negative queries, ie the desired result should be false rather than true. * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_select_directories), (medusa_file_index_select_by_directory_name), (medusa_file_index_select_by_file_name), (medusa_file_index_select_by_file_name_equals), (medusa_file_index_select_by_file_name_contains), (medusa_file_index_select_by_file_name_starts_with), (medusa_file_index_select_by_file_name_ends_with), (medusa_file_index_select_by_file_glob), (medusa_file_index_select_by_file_name_regexp_matches), (medusa_file_index_select_files_modified_today), (medusa_file_index_select_files_modified_in_last_seven_days), (medusa_file_index_select_files_modified_this_month), (medusa_file_index_select_files_modified_after_time), (medusa_file_index_select_files_modified_before_today), (medusa_file_index_select_files_modified_before_last_seven_days), (medusa_file_index_select_files_modified_before_this_month), (medusa_file_index_select_files_modified_before_time), (medusa_file_index_select_files_larger_than), (medusa_file_index_select_files_smaller_than), (medusa_file_index_delete_by_file_name), (medusa_file_index_delete_by_directory_name), (medusa_filename_is_in_index), (medusa_file_index_queries_test): * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_test): updated code that uses queries to reflect api changes 2000-06-28 Rebecca Schulman Renamed the following relational_database -> rdb RELATIONAL_DATABASE -> RDB RelationalDatabase -> RDB relational_table -> rdb_table to increase readability. * libmedusa-internal/medusa-file-index-encoders.c: (medusa_file_database_filename_encode), (medusa_file_database_directory_name_encode), (medusa_file_database_mime_type_encode), (medusa_file_database_mtime_encode), (medusa_file_database_owner_encode), (medusa_file_database_group_encode), (medusa_file_database_permissions_encode), (medusa_file_database_size_encode), (medusa_file_database_filename_decode), (medusa_file_database_directory_name_decode), (medusa_file_database_mime_type_decode): * libmedusa-internal/medusa-file-index-queries.c: (medusa_file_index_select_directories), (medusa_file_index_select_by_directory_name), (medusa_file_index_select_by_file_name), (medusa_file_index_select_by_file_name_equals), (medusa_file_index_select_by_file_name_contains), (medusa_file_index_select_by_file_name_starts_with), (medusa_file_index_select_by_file_name_ends_with), (medusa_file_index_select_by_file_glob), (medusa_file_index_select_by_file_name_regexp_matches), (medusa_file_index_select_files_modified_today), (medusa_file_index_select_files_modified_in_last_seven_days), (medusa_file_index_select_files_modified_this_month), (medusa_file_index_select_files_modified_after_time), (medusa_file_index_select_files_modified_before_today), (medusa_file_index_select_files_modified_before_last_seven_days), (medusa_file_index_select_files_modified_before_this_month), (medusa_file_index_select_files_modified_before_time), (medusa_file_index_select_files_larger_than), (medusa_file_index_select_files_smaller_than), (medusa_file_index_delete_by_file_name), (medusa_file_index_delete_by_directory_name), (medusa_filename_is_in_index), (medusa_file_index_queries_test): * libmedusa-internal/medusa-file-index-queries.h: * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_initialize), (medusa_file_system_db_free), (medusa_file_index_reindex_filenames), (medusa_file_index_record_to_full_file_name), (check_field_info_from_file), (file_index_field_info), (medusa_file_index_set_first_database_record), (medusa_file_index_get_first_database_record), (medusa_file_index_test), (medusa_file_index_get_next_file_name): * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-file-information.c: (append_file_information_field), (medusa_index_file_attributes): * libmedusa-internal/medusa-rdb-fields.c: (medusa_rdb_field_info_new), (medusa_rdb_field_info_free), (medusa_rdb_field_free), (medusa_rdb_field_add), (medusa_rdb_field_remove), (medusa_rdb_field_get_offset), (medusa_rdb_field_get_field_structure), (medusa_rdb_record_get_field_contents), (medusa_rdb_field_get_size), (medusa_rdb_field_get_encoder), (medusa_rdb_field_get_decoder), (medusa_rdb_field_get_header_offset), (medusa_rdb_field_get_header_size), (medusa_rdb_fields_get_first_title), (medusa_rdb_fields_get_first_size), (medusa_rdb_fields_get_first_encoder), (medusa_rdb_fields_get_first_decoder), (medusa_rdb_field_contents_equal): * libmedusa-internal/medusa-rdb-fields.h: * libmedusa-internal/medusa-rdb-file.c: (medusa_rdb_file_new), (medusa_rdb_file_free), (medusa_rdb_file_read_header), (medusa_rdb_file_add_field), (medusa_rdb_file_remove_field), (medusa_rdb_file_write_initial_header), (medusa_rdb_file_write_number_of_records), (medusa_rdb_file_write_number_of_fields), (medusa_rdb_file_test), (id_encode), (id_decode), (number_encode), (number_decode): * libmedusa-internal/medusa-rdb-file.h: * libmedusa-internal/medusa-rdb-query-private.h: * libmedusa-internal/medusa-rdb-query.c: (medusa_rdb_query_new), (medusa_rdb_query_free), (medusa_rdb_query_criterion_free), (medusa_rdb_query_criterion_new), (medusa_rdb_query_add_selection_criterion), (medusa_rdb_query_criterion_match), (medusa_rdb_query_match): * libmedusa-internal/medusa-rdb-query.h: * libmedusa-internal/medusa-rdb-record.h: * libmedusa-internal/medusa-rdb-table-async.c: (medusa_rdb_table_select_cancellable): * libmedusa-internal/medusa-rdb-table-async.h: * libmedusa-internal/medusa-rdb-table-private.h: * libmedusa-internal/medusa-rdb-table.c: (medusa_rdb_table_all_rows), (medusa_rdb_table_insert), (medusa_rdb_table_replace_record_by_number), (medusa_rdb_table_delete_record), (medusa_rdb_table_erase_record), (medusa_rdb_table_select), (medusa_rdb_table_delete), (medusa_rdb_table_virtual_insert_record), (medusa_rdb_table_free), (medusa_rdb_table_virtual_free), (medusa_rdb_record_number_to_record), (medusa_rdb_table_test): * libmedusa-internal/medusa-rdb-table.h: * search-service/.cvsignore: * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission), (run_query), (present_query_results): * search-service/medusa-search-uri-test.c: (main): * search-service/medusa-search-uri.c: * search-service/medusa-search-uri.h: 2000-06-28 Rebecca Schulman * search-service/medusa-search-uri-test.c: (main): * search-service/medusa-search-uri.c: (medusa_search_uri_to_query): fixed compile bugs; this file is in transition. 2000-06-28 Rebecca Schulman * libmedusa-internal/medusa-hash.c: (medusa_hash_new): * search-service/medusa-file-search-parse-transmission.c: * libmedusa-internal/medusa-conf.h: (medusa_file_search_parse_transmission): Added new variable to medusa conf file fixed small error in parse transmission * search-service/medusa-search-uri.c: * search-service/medusa-search-uri.h: added more; this stuff needs to be fixed. * search-service/Makefile.am: * search-service/medusa-search-uri-test.c: added test stub for search uri parser. 2000-06-26 Rebecka Schulman * doc/search_uri_rfc: * doc/text_index_ui: added doc files for others to read; updated search uri rfc to correspond to changes made in anticipation of writing the search uri parser * indexer/Makefile.am: * configure.in: * indexer/modules/.cvsignore: * indexer/modules/Makefile.am: * indexer/modules/medusa-text-index-modules-test.c: (main), (medusa_text_index_plaintext_module_test): * indexer/modules/medusa-text-index-plaintext-module.c: (transfer_hash_table_to_word_array): added directory and prototype for initial plaintext indexer * libmedusa-internal/Makefile.am: * libmedusa-internal/medusa-file-index.h: * libmedusa-internal/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_new), (medusa_text_index_mime_module_add_mime_type), (medusa_text_index_mime_module_remove_mime_type), (medusa_text_index_mime_module_add_mime_pattern), (medusa_text_index_mime_module_accepts_mime_type), (medusa_text_index_mime_module_ref), (medusa_text_index_mime_module_unref), (medusa_text_index_mime_module_destroy), (is_valid_mime_type), (is_valid_mime_pattern), (valid_mime_pattern_to_regexp_string), (mime_pattern_matches), (dummy_return_words), (medusa_text_index_mime_module_test): * libmedusa-internal/medusa-text-index-mime-module.h: * libmedusa-internal/medusa-text-index-test.c: (main): * libmedusa-internal/medusa-text-index.c: (medusa_text_index_initialize), (medusa_text_index_create), (text_index_files_are_ready), (create_temporary_index_file), (create_reverse_index_from_temporary_file), (add_file_to_temporary_index), (medusa_text_index_ref), (medusa_text_index_unref), (medusa_text_index_destroy), (free_entry), (medusa_text_index_test): * libmedusa-internal/medusa-text-index.h: added mime module package, that will keep track of the available functions for parsing files based on mime type * libmedusa-internal/medusa-utils.c: (medusa_full_path_from_directory_and_file): * libmedusa-internal/medusa-utils.h: changed function in here to reflect naming scheme * search-service/Makefile.am: * search-service/medusa-authenticate.c: (medusa_authenticate_create_cookie_file), (medusa_authenticate_is_cookie_request), (medusa_authenticate_is_correct_cookie), (medusa_authenticate_uid_can_read), (group_contains), (get_user_key): * search-service/medusa-authenticate.h: * search-service/medusa-file-search-daemon.c: (main), (initialize_socket): * search-service/medusa-file-search-parse-transmission.c: (medusa_file_search_parse_transmission), (run_query), (get_uid_pid_key_information), (present_query_results), (goto_next_line), (another_transmission_line_exists): * search-service/medusa-file-search-parse-transmission.h: * search-service/medusa-search-uri.c: (medusa_search_uri_to_query): * search-service/medusa-search-uri.h: split up the file search daemon, into four pieces for managability, and changed it to accept search uris rather than search queries. so the command line tool should no longer work 2000-06-24 Pavel Cisler * libmedusa-internal/medusa-file-index.c: (medusa_file_system_db_index), (index_directory), (reindex_file): * libmedusa-internal/medusa-file-information.c: (medusa_file_attributes_new_by_dir_and_file): * search-service/medusa-unindexed-search.c: (medusa_unindexed_search_file_matches): Update for GnomeVFS renamings. 2000-06-22 Darin Adler * .cvsignore: * libmedusa-internal/.cvsignore: Ignore some more generated files. 2000-06-22 Ramiro Estrugo * libmedusa/Makefile.am: Export medusa-search-service.h since its needed by nautilus. * indexer/.cvsignore: * libmedusa/.cvsignore: * msearch/.cvsignore: * search-service/.cvsignore: Ignore generated files. 2000-06-21 Maciej Stachowiak Moved some files around: * Makefile.am, autogen.sh, configure.in: Fixed for new build setup. * medusa/Makefile.am: Removed. * medusa/medusa-byte.c, medusa/medusa-byte.h, medusa/medusa-conf.h, medusa/medusa-file-index-encoders.c, medusa/medusa-file-index-encoders.h, medusa/medusa-file-index-queries.c, medusa/medusa-file-index-queries.h, medusa/medusa-file-index.c, medusa/medusa-file-index.h, medusa/medusa-file-information.c, medusa/medusa-file-information.h, medusa/medusa-hash.c, medusa/medusa-hash.h, medusa/medusa-io-handler.c, medusa/medusa-io-handler.h, medusa/medusa-lock-file.c, medusa/medusa-lock-file.h, medusa/medusa-rdb-fields.c, medusa/medusa-rdb-fields.h, medusa/medusa-rdb-file.c, medusa/medusa-rdb-file.h, medusa/medusa-rdb-index.h, medusa/medusa-rdb-query-private.h, medusa/medusa-rdb-query.c, medusa/medusa-rdb-query.h, medusa/medusa-rdb-record.h, medusa/medusa-rdb-table-async.c, medusa/medusa-rdb-table-async.h, medusa/medusa-rdb-table-private.h, medusa/medusa-rdb-table.c, medusa/medusa-rdb-table.h, medusa/medusa-test-conf.h, medusa/medusa-test.c, medusa/medusa-test.h, medusa/medusa-tokenize.c, medusa/medusa-tokenize.h, medusa/medusa-utils.c, medusa/medusa-utils.h: Moved to libmedusa-internal directory * libmedusa-internal/Makefile.am: New file. * medusa/medusa-search-service.h: Moved to libmedusa directory. * libmedusa/Makefile.am: New file. * medusa/medusa-file-search-daemon.c, medusa/medusa-unindexed-search.c, medusa/medusa-unindexed-search.h: Moved to search-service directory. * search-service/Makefile.am: New file. * medusa/medusa-file-index-daemon.c, medusa/medusa-text-index-mime-module.c, medusa/medusa-text-index-mime-module.h, medusa/medusa-text-index.c, medusa/medusa-text-index.h: Moved to indexer directory. * indexer/Makefile.am: New file. * medusa/medusa-text-index-plaintext-module.c medusa/medusa-text-index-plaintext-module.h: Moved to indexer/modules. * medusa/medusa-command-line-search.c: Moved to msearch directory. * msearch/Makefile.am : New file. * tests/Makefile.am: Don't build test program, it's broken right now. 2000-06-21 Rebecca Schulman * medusa/medusa-conf.h: Added new text index hash table size variables * medusa/medusa-file-index.c: * medusa/medusa-file-index.h: (medusa_file_index_reindex_filenames), (medusa_file_index_record_to_full_file_name), (medusa_file_index_get_records_handle), (medusa_file_index_get_next_file_name): added new api to read the file names out of the file index * medusa/medusa-file-search-daemon.c: (present_query_results): * medusa/medusa-hash.c: (medusa_hash_new), (medusa_hash_store): * medusa/medusa-hash.h: * medusa/medusa-io-handler.c: (medusa_io_handler_new), (medusa_io_handler_write_header), (medusa_io_handler_create_file), (medusa_io_handler_append_string): * medusa/medusa-io-handler.h: changed char * to const char * where appropriate * medusa/medusa-rdb-query.c: (medusa_relational_database_query_criterion_match): fixed bug in g_return_if_fail. * medusa/medusa-text-index.c: (medusa_text_index_initialize), (medusa_text_index_create), (medusa_text_index_ref), (medusa_text_index_unref), (medusa_text_index_destroy), (free_entry): * medusa/medusa-text-index.h: added some source for basic functions 2000-06-20 Rebecca Schulman * medusa/medusa-text-index-mime-module.h: * medusa/medusa-text-index-mime-module.c: (dummy_return_words): * medusa/medusa-text-index.c: Got rid of some abstract types (location and semantic unit for char *) they should get readded later, but aren't really useful without associated objects * medusa/Makefile.am: * medusa/medusa-text-index-plaintext-module.c: (medusa_text_index_parse_plaintext), (read_more_data), (transfer_hash_table_to_word_array): * medusa/medusa-text-index-plaintext-module.h: Added new module to split plaintext into words. this module is totally untested, and 99.9% chance doesn't work yet * medusa/medusa-conf.h: added plaintext debugging flag 2000-06-19 Rebecca Schulman * medusa/Makefile.am: added new text index files * medusa/medusa-file-index-queries.c: (medusa_file_index_select_directories): changed get_directories function to use the correct mime type, now x-special/directory * medusa/medusa-rdb-file.h: added ifdef for header * medusa/medusa-rdb-query.c: (medusa_relational_database_query_criterion_match): changed MEDUSA_TEST_SYSTEM_CALL to g_return_val_if_fail * medusa/medusa-rdb-table.h: * medusa/medusa-test-conf.h: got rid of some old invalid test vars * medusa/medusa-text-index-mime-module.c: (medusa_text_index_mime_module_new), (medusa_text_index_mime_module_add_mime_type), (medusa_text_index_mime_module_remove_ mime_type), (medusa_text_index_mime_module_add_mime_pattern), (medusa_text_index_mime_module_accepts_mime_type), (medusa_text_index_mime_module_ref), (medusa_text_index_mime_module_unref), (medusa_text_index_mime_module_destroy), (is_valid_mime_type), (is_valid_mime_pattern), (valid_mime_pattern_to_regexp_string), (mime_pattern_matches), (dummy_return_words), (medusa_text_index_mime_module_test): added code to handle indexing code * medusa/medusa-text-index-mime-module.h: basic mime module api. * medusa/medusa-text-index.c: * medusa/medusa-text-index.h: speced out types for text indexing * tests/medusa-run-tests.c: (main), (medusa_unindexed_search_test): Got rid of hardcoded tests that don't work anymore. there should be some new ones at some point Sun Jun 18 00:41:18 2000 George Lebl * medusa/medusa-file-index-queries.c, medusa/medusa-file-information.c, medusa/medusa-rdb-fields.c, medusa/medusa-utils.c: include * medusa/medusa-io-handler.c: use G_MAXINT and G_MININT instead of LONG_MIN and LONG_MAX as that was actually an int and not a long 2000-06-16 Maciej Stachowiak * medusa/medusa-byte.h, medusa/medusa-conf.h, medusa/medusa-file-index-encoders.h, medusa/medusa-file-index-queries.h, medusa/medusa-file-index.h, medusa/medusa-file-information.h, medusa/medusa-hash.h, medusa/medusa-io-handler.h, medusa/medusa-rdb-fields.h, medusa/medusa-rdb-index.h, medusa/medusa-rdb-query-private.h, medusa/medusa-rdb-query.h, medusa/medusa-rdb-record.h, medusa/medusa-rdb-table-async.h, medusa/medusa-rdb-table-private.h, medusa/medusa-rdb-table.h, medusa/medusa-search-service.h, medusa/medusa-test-conf.h, medusa/medusa-test.h, medusa/medusa-tokenize.h, medusa/medusa-unindexed-search.h, medusa/medusa-utils.h: Added #include guards for all of these. 2000-06-16 Rebecka Schulman * TODO: * medusa/Makefile.am: * medusa/medusa-rdb-table-async.c: (medusa_relational_table_select_cancellable): * medusa/medusa-rdb-table-async.h: wrote basic async stuff * medusa/medusa-rdb-table-private.h: hid virtual free in private header * medusa/medusa-rdb-table.c: (medusa_relational_table_insert), (medusa_relational_table_delete_record), (medusa_relational_table_free), (medusa_relational_table_virtual_free), (medusa_rdb_table_test): added a new virtual_free function, and pointed out existing bugs in the table freeing code * medusa/medusa-rdb-table.h: changed include headers 2000-06-15 Rebecka Schulman * medusa/medusa-unindexed-search.c: * medusa/medusa-unindexed-search.h: * medusa/Makefile.am: Added slow background search in synchronous form * medusa/medusa-file-index-daemon.c: (main): Switched the process order to enhance debugging * medusa/medusa-file-index.c: (reindex_directory): Added new reindex debugging flag * medusa/medusa-rdb-file.c: * medusa/medusa-conf.h: Added indenting info * medusa/medusa-rdb-query-private.h: * medusa/medusa-rdb-query.c: Moved QueryCriterion definition into medusa-rdb-query-private * medusa/medusa-rdb-table.c: (medusa_relational_table_delete_record), (medusa_relational_table_erase_record), (medusa_relational_table_select_cancellable): * medusa/medusa-rdb-table.h: Added skeleton structure for medusa_relational_table_select_cancellable * tests/medusa-run-tests.c: (main), (number_decode), (medusa_unindexed_search_test): Added new test function for unindexed search 2000-06-15 Rebecka Schulman * medusa/medusa-file-search-daemon.c: (is_cookie_request), (create_cookie_file), (run_query), (present_query_results), (parse_transmission), (main), (ensure_index_validity), (query_request_is_valid), (get_user_key), (get_user_query), (remove_user_query), (character_to_medusa_rdb_operator), (medusa_file_index_record_to_full_file_name), (uid_can_read), (group_contains): Refactor this code so that it is at least slightly more readable 2000-06-15 Rebecka Schulman * medusa/medusa-file-index-daemon.c: (main), (wait_for_indexing_signal), (do_full_indexing), (do_fast_reindexing), (indexing_signal_received_callback), (initialize_socket), (backup_index_files), (copy_new_index_files): Refactored most of the code to be more comprehensible, and then added index signal system * medusa/medusa-search-service.h: Added some search api suggestions Added index request names * medusa/medusa-conf.h: Fixed typo in lock file name 2000-06-14 Rebecca Schulman * doc/search_daemon_request_format: * medusa/medusa-search-service.h: Put in some commented out suggestions for the new search service api in * medusa/medusa-file-index-daemon.c: * medusa/medusa-file-search-daemon.c: modified headers 2000-06-14 Maciej Stachowiak * medusa/medusa-file-index-daemon.c: Use mtime, not ctime. * medusa/medusa-file-index-encoders.c: (medusa_file_database_mtime_encode, medusa_file_database_mtime_decode, medusa_file_index_encoders_test): Likewise. * medusa/medusa-file-index-encoders.h: Likewise. * medusa/medusa-file-index-queries.c: (medusa_file_index_select_files_modified_today, medusa_file_index_select_files_modified_in_last_seven_days, medusa_file_index_select_files_modified_this_month, medusa_file_index_select_files_modified_after_time, medusa_file_index_select_files_modified_before_today, medusa_file_index_select_files_modified_before_last_seven_days, medusa_file_index_select_files_modified_before_this_month, medusa_file_index_select_files_modified_before_time): Likewise. * medusa/medusa-file-index.c (medusa_file_system_db_initialize, reindex_directory, file_index_field_info, medusa_file_index_test): Likewise. * medusa/medusa-file-information.c (medusa_file_attributes_new, medusa_index_file_attributes): Likewise. * medusa/medusa-rdb-table.c (medusa_rdb_table_test): Likewise. * tests/database-test.c (main): Likewise. 2000-06-14 Maciej Stachowiak * medusa/medusa-conf.h, medusa/medusa-file-index-daemon.c: Fix #define for backup lock file. 2000-06-14 Fatih Demir * configure.in: Added comments. * medusa-config.in: Added the vfs libs and cflags to the script. 2000-06-14 Pavel Cisler * medusa/medusa-file-index-daemon.c: A temporary fix to prevent build-breakage. 2000-06-14 Fatih Demir * databases/.cvsignore: Hmm, no Makefile.in wished in the CVS repo, I think. * .cvsignore: Added the medusa-config script. * Makefile.am: Added medusa-config.in to the EXTRA_DIST. * configure.in: Get the variables necessary for the medusa-config script and put this medusa-config script out. * medusa-config: Removed it from the CVS repo. * medusa-config.in: Added a generation-base for the medusa-config script. 2000-06-14 Rebecca Schulman * medusa/Makefile.am: * medusa/medusa-conf.h: added * medusa/medusa-search-service.h: added installation of medusa external header file, medusa-search-service.h * medusa/medusa-file-index-queries.c: * medusa/medusa-file-index-queries.h: Added new procedure to delete by directory name. Used the delete by file name in * medusa/medusa-file-information.c: * medusa/medusa-file-index-daemon.c: * medusa/medusa-file-search-daemon.c: * medusa/medusa-command-line-daemon.c: updated headers to deal with new change 2000-06-14 Maciej Stachowiak Task 1339 * medusa/medusa-lock-file.h, medusa/medusa-lock-file.c: (medusa_lock_file_acquire, medusa_lock_file_release): Anally correct handling for lock files (even safe for NFS). * medusa/Makefile.am: Add them to the build. * medusa/medusa-conf.h: Add extra files for backup database, so searches can run in the middle of reindexing. * medusa/medusa-file-index-daemon.c (main): Use lock files properly. * medusa/medusa-file-search-daemon.c (main): Likewise. 2000-06-13 Rebecca Schulman * doc/search_daemon_request_format Defined special communication format for nautilus level requests. 2000-06-13 Rebecca Schulman * TODO adding stylistic issues category * README added warning about indexing time being long, and fixed search examples to work better 2000-06-13 Rebecca Schulman Added file * doc/search_uri_scheme to specify new search: uri scheme (actually, gnome-search:) 2000-06-13 Maciej Stachowiak * medusa/medusa-byte.h, medusa/medusa-file-index-daemon.c, medusa/medusa-file-index.h, medusa/medusa-file-information.c, medusa/medusa-file-information.h, medusa/medusa-io-handler.c, medusa/medusa-io-handler.h, medusa/medusa-tokenize.h: Minor formatting tweaks. 2000-06-13 Rebecca Schulman * medusa/medusa-rdb-table.c medusa_rdb_table_select doesn't crash now whne given tables with 0 records 2000-06-12 Rebecca Schulman * medusa/medusa-file-index-daemon.c -- fixed unlink assertions that were buggy (i thought i already fixed this!) * medusa/medusa-file-index-queries.c 2000-06-12 Eskil Heyn Olsen * medusa.spec.in: Added a .spec file for packaging medusa to RPM. * Makefile.am: Added the spec file to extra dist * configure.in: Generate the spec file * medusa/Makefile.am: Added some missing headers to noinst headers. Medusa now neatly fits into a 72k size rpm. 2000-06-11 Rebecca Schulman Added makefile to install stoplist file * Makefile.am * databases/Makefile.am (new) * configure.in Fixed configure script to create variable MEDUSA_PREFIX, so things will install correctly. * acconfig.h (new) * configure.in Eliminated unnecessary stuff from the stoplist * databases/file-index-stoplist Fixed configuration file to support new MEDUSA_PREFIX file * medusa/medusa-conf.h Added config.h declarations * medusa/medusa-file-index-encoders.c * medusa/medusa-file-index-queries.c * medusa/medusa-file-index-daemon.c * medusa/medusa-file-search-daemon.c 2000-06-11 Rebecca Schulman * configure.in commented out new config lines that don't work yet 2000-06-11 Rebecca Schulman * medusa-config -- oops! Forgot to supply the new build script 2000-06-11 Rebecca Schulman * Makefile.am -- added the medusa-config build script reference * medusa-config the new build script * medusa/medusa-file-index-queries.c Added a test stub * tests/medusa-run-tests.c added the file index query tests 2000-06-09 Rebecca Schulman * medusa/medusa-file-index-daemon.c Added database locking for the concurrent processes that both write. Unfortunately there are still problems with this. * medusa/medusa-file-index-queries.c * medusa/medusa-file-index-queries.h Fleshed out the API to include all functions that are necessary for search within Nautilus. Wrote all of the functions. They compile but test code needs to be written. 2000-06-06 Rebecca Schulman * medusa/medusa-file-index-queries.c * medusa/medusa-file-index-queries.h Fixed a few bugs in query generation Added new functions: medusa_filename_is_in_index medusa_file_index_get_directories This api needs to be determined. * medusa/medusa-file-index.c Fixed reindexing to work more thoroughly, since name additions to notify all parent directories, just the immediate one. 2000-06-06 Rebecca Schulman Added the software to reindex shallowly every 10 minutes (this number is configurable) * medusa/medusa-file-index.c * medusa/medusa-file-index.h Added reindexing function * medusa/medusa-file-information.c * medusa/medusa-file-information.h Added free function for the file attributes structure, and a pre stat file attributes function * medusa/medusa-conf.h --added variables for hash tables sizes, file index lock file, and filename indexing interval New files include * medusa/medusa-file-index-queries.c * medusa/medusa-file-index-queries.h These files will perform common queries with a convenient api. The first cut of the api will match the needs of nautilus * medusa/medusa-utils.c * medusa/medusa-utils.h -- location for general utility functions * Makefile.am -- reorganized and added source files 2000-06-06 Rebecca Schulman Added new capabilities to the file indexer to allow it to respond to file indexing requests, and also to do shallow reindexing of file names every n minutes. * medusa/medusa-file-index-daemon.c Added major capabilities to the file as above, so that it now runs three processes one waiting for search requests, one doing quick reindexing, and one doing full reindexing. * medusa/medusa-conf.h Added INDEX_SOCKET_PATH and changed old SOCKET_PATH to SEARCH_SOCKET_PATH. The indexing path is for the indexer's index requests, and the search path is for the search daemon's search requests * medusa/medusa-file-search-daemon.c Changed SOCKET_PATH to SEARCH_SOCKET_PATH, and fixed a buggy return value * medusa/medusa-command-line-search.c Changed SOCKET_PATH to SEARCH_SOCKET_PATH since there is now a second INDEX_SOCKET_PATH Added new cvs ignore files databases/.cvsignore tests/data/.cvsignore 2000-06-01 Rebecca Schulman Fixed a few minor bugs in the file searching. * medusa/medusa-command-line-search.c -- parses the string equals symbol now (^) * medusa/medusa-file-search-daemon.c -- fixed a memory error in query generation * medusa/medusa-rdb-query.c -- fixed string equal to use strcmp Added a few more tests * medusa/medusa-rdb-table.c 2000-05-31 Rebecca Schulman Added build stuff to medusa. * scripts * scripts/m-clean * scripts/m-rerun 2000-05-31 Rebecca Schulman The file index daemon and the search daemon should both work now, with the operators listed in medusa-rdb-query.h * medusa/medusa-file-index-daemon.c The file indexer now erases everything and writes new files when reindexing. Not reindexing isn't really any slower, and avoids lots of bugs * medusa/medusa-file-search-daemon.c Added the new operator capability (see below) and a shell for a test script (writing this would be welcome!) Fixed the typing issues in the querying, by separating string equals, and number equals, and assuming types for regexp (string), less than and greater than (number). Changing the available operators changed code that had used the query api up until this point. * medusa/medusa-rdb-query.c * medusa/medusa-rdb-query.h * medusa/medusa-file-information.c Added lots of new test code, including tests for * medusa/medusa-file-index-encoders.c * medusa/medusa-file-index-encoders.h (added sig) * medusa/medusa-file-index.c * medusa/medusa-file-index.h (added sig) * medusa/medusa-rdb-table.c * medusa/medusa-rdb-table.h * medusa/medusa-test-conf.h * tests/medusa-run-tests.c * README Updated examples for msearch * medusa/medusa-conf.h Changed group and owner field size values to use int instead of system types. This may need to be fixed later * medusa/medusa-file-index-encoders.h Changed the system types on the encoder and decoder signatures. They use int instead. * medusa/medusa-hash.c Added checks for receiving bad keys * medusa/medusa-rdb-fields.c Cleaned up get field contents procedure 2000-05-30 Rebecca Schulman Made the file tests work with the exception of dealing with loading file fields, and getting the rest of the info from static tables, which will be my next change. Tests that pertain to this feature have been commented out * medusa/medusa-rdb-file.c * medusa/Makefile.am Got rid of medusa-test binary in this directory. It is now in the test directory Changed the rdb-fields api to get rid of extraneous "_by_title" endings and to separated the meaning of getting field structures and field contents. This affected all files that currently use the medusa-rdb-fields.h api * medusa/medusa-rdb-fields.h * medusa/medusa-rdb-fields.c * medusa/medusa-file-index-encoders.c * medusa/medusa-file-information.c * medusa/medusa-file-search-daemon.c * medusa/medusa-rdb-query.c Fixed an error in the test data file names * medusa/medusa-test-conf.h 2000-05-30 Rebecca Schulman * medusa/medusa-file-search-daemon.c Updated file search daemon to use new encode and decode functions Got rid of underscores in struct names, and moved struct definitions to .c files from .h files, where appropriate. Added commentary to many files * medusa/medusa-rdb-file.h Changed struct name * medusa/medusa-byte.h Added explanation of the file * medusa/medusa-conf.h Added free software header, and commentary on the file * medusa/medusa-file-index.h Changed struct name and added commentary * medusa/medusa-file-information.c moved struct into file and encode and decode functions out * medusa/medusa-file-information.h moved struct out and changed struct name * medusa/medusa-hash.c Changed medusa_io_handler_new_handler function name to medusa_io_handler_new * medusa/medusa-io-handler.h * medusa/medusa-io-handler.c * medusa/medusa-hash.h Changed structure name * medusa/medusa-rdb-query.c Moved in structure name * medusa/medusa-rdb-query.h Changed structure name and moved it to .c file * medusa/medusa-rdb-table.c Added commentary * medusa/medusa-rdb-table.h Added commentary and changed structure name * medusa/medusa-tokenize.h Changed structure name, and added commentary Redid the testing framework for medusa. Each file should now have its own test class at the end, and macros have been added in tests/medusa-test.h to check results. * medusa/medusa-rdb-file.c Added new testing function * medusa/medsa-rdb-file.h Added signature for testing function * medusa/.cvsignore Added attic directory and medusa-test binary. Attic has the old files that you don't want on the repository. * medusa/medusa-test-conf.h Added configuration file for testing * medusa/medusa-test.c Added test functions (macros for running tests ) * medusa/medusa-test.h Added header file for above. Include this in files that you run tests with * tests/medusa-run-tests.c Added program to run tests. It compiles into tests/medusa-test-run, which should be run to test all testing functions Removed the old testing files * tests/byte-test.c * tests/database-test.c * tests/medusa-file-index-test.c * tests/medusa-rdb-test.c * tests/medusa-tokenize-test.c Fixed many of the encoders to take the file_system_db as dat * medusa/medusa-file-index-encoders.c Changed encoders to get size information from the field_info structure instead of #define variables * medusa/medusa-file-index-encoders.h Changed signatures to reflect parameter changes necessary for above 2000-05-25 Rebecca Schulman The big change here is building encoding and decoding functions into the MedusaRelationalDatabaseField structure. The big change here is that it removes all of the ugly casting and that sort of thing, and makes reading the data format really easy, and thus doing compares and matches really easy. * medusa/Makefile.am Added new files for compilation * medusa/medusa-conf.h Added comments * medusa/medusa-file-index.c Changed the old memcpy record encoding to use the new MedusaRDBField encode and decode functions * medusa/medusa-file-information.c Changed debugging reporting th use the encode and decode functions * medusa/medusa-file-information.h changed MedusaFileAttributes to keep track of actual strings rather than tokens * medusa/medusa-rdb-fields.c added new functions to support encoding * medusa/medusa-rdb-fields.h * medusa/medusa-rdb-file.c updated field_add to take encode and decode functions * medusa/medusa-rdb-file.h * medusa/medusa-rdb-query.c added new operators to the select function Added files * medusa/medusa-file-index-encoders.h file index database encoder spec * medusa/medusa-file-index-encoders.c file index database encoders 2000-05-25 Rebecca Schulman * medusa/.cvsignore Had cvs ignore results of compilation * tests/.cvsignore * databases/.cvsignore * medusa/medusa-command-line-search.c Separate operator, operand and field name by spaces when sending them to the server * medusa/medusa-file-search-daemon.c Added ability to deal with multiple kinds of operators, include "=", ">", "<", and "~" (regexp match) 2000-05-25 Rebecca Schulman * README made the readme usable. Please read it! * doc/flags added SEARCH_DAEMON_DEBUG debug flag * medusa/medusa-conf.h * medusa/medusa-command-line-search.c Can receive results now. Prints file names to stdout * medusa/medusa-file-search-daemon.c Receives file names and checks for permissions on std unix file systems and only returns to the user files they have permission to read. Feel free to try and break the security model and report bugs. 2000-05-25 Rebecca Schulman * TODO Added new items 2000-05-24 Rebecca Schulman * medusa/medusa-conf.h Changed database field names to omit spaces * medusa/medusa-rdb-fields.c Fixed field name -> size bug. Halts if given valid field name * medusa/medusa-rdb-table.c fixed casting error, and changed g_list_append to g_list_prepend in initial table creation * tests/Makefile.am added file-database-test to tests * tests/database-test.c made it medusa-conf.h compliant * medusa/medusa-file-search-daemon.c actual creates queries and talks to the file database. prints file name results. Does not filter them for permissions! please be careful with this code! IT is a serious, serious, security hole. Thank you. 2000-05-24 Rebecca Schulman * medusa/medusa-file-search-daemon.c Creates queries now. * medusa-file-index.c Fixed bug with checking stoplist files Added files * databases/file-index-stoplist added list of files to skip during indexing 2000-05-24 Rebecca Schulman * medusa/Makefile.am Added ability to compile command line tool * medusa/medusa-command-line-search.c Removed unneeded headers 2000-05-24 Ramiro Estrugo * .cvsignore * doc/.cvsignore * medusa/.cvsignore * tests/.cvsignore cvsignore generated files. 2000-05-24 Rebecca Schulman * medusa/medusa-command-line-search.c * medusa/medusa-file-search-daemon.c Fixed cookie communication with keys. 2000-05-24 Rebecca Schulman * medusa/medusa-command-line-search.c * medusa/medusa-file-search-daemon.c Added cookie communication 2000-05-23 Ramiro Estrugo * autogen.sh: New file. Added to be unbreak build. 2000-05-23 Rebecca Schulman * medusa/medusa-file-index-daemon.c Removed #define stuff, and added it to medusa-conf.h * medusa/medusa-file-index.h Removed #define stuff, and added it to medusa-conf.h * medusa/medusa-file-index.c Included medusa-conf.h * medusa/medusa-file-information.c Included medusa-conf.h * medusa/medusa-file-search-daemon.c Can receive data, beginnings of cookie architecture * medusa/ Added file * medusa/medusa-conf.h Collection of configuration variables * medusa/medusa-command-line-search.c Command line tool that will serve as a test/command line tool for the file database 2000-05-23 Maciej Stachowiak bugzilla.eazel.com task #936, make medusa use autoconf and make it part of the eazel build. * Makefile: Removed * configure.in, Makefile.am, doc/Makefile.am, tests/Makefile.am: Spiffy new Autoconf/Automake setup. * tests/medusa-file-index-test.c (main): Don't gnome_init * tests/medusa-io-handler-test.c (main): Don't gnome_init * macros/*: removed. * databases/dummy: Empty file to make this dir check out when you cvs uopdate -dP 5-23 Rebecca Schulman medusa/medusa-file-index.c Adding debugging tags medusa/medusa-file-information.c medusa/medusa-rdb-fields.c medusa/medusa-rdb-file.c medusa/medusa-rdb-query.c medusa/medusa-rdb-table.c medusa/medusa-file-search-daemon.c Should accept connections (doesn't do anything else, yet) Makefile added make for search daemon, changed indexer name to file-indexd Added files: docs/flags list of debugging flags and their meanings 5-23 Rebecca Schulman medusa/medusa-file-information.c removed encoding on permissions, etc. fields they are just written to the database raw now medusa/medusa-rdb-fields.c fixed bug in medusa_relational_database_record_get_by_number medusa/medusa-rdb-query.c added error checks in query_criterion_match and removed some debug tags medusa/medusa-rdb-table.c Added replacement capability so that files can be deleted, and the space is later used for insertion fixed a few bugs in deletion 5-23 Rebecca Schulman Massive bug fixes. A file indexing daemon that should work to store and retreive file and directory names. The search daemon is started. Makefile medusa/medusa-file-index.c medusa/medusa-file-index.h medusa/medusa-file-information.c medusa/medusa-file-information.h medusa/medusa-io-handler.c medusa/medusa-io-handler.h medusa/medusa-rdb-fields.c medusa/medusa-rdb-fields.h medusa/medusa-rdb-file.c medusa/medusa-rdb-query.c medusa/medusa-rdb-query.h medusa/medusa-rdb-table.c medusa/medusa-rdb-table.h medusa/medusa-tokenize.c medusa/medusa-tokenize.h Added Files: medusa/medusa-byte.c medusa/medusa-byte.h medusa/medusa-file-index-daemon.c medusa/medusa-file-search-daemon.c tests/byte-test.c 5-19-2000 Rebecca Schulman * medusa-file-index.c Added file indexing capabilities medusa-file-index.h medusa-rdb-file.c medusa-rdb-file.h medusa-file-information.c medusa-file-information.h * medusa-rdb-index.c Architecture for future file indexing medusa-rdb-index.h * medusa-rdb-query.c medusa-rdb-query.h * medusa-rdb-fields.c Fixed memory issues in here. More are undoubtedly still there medusa-rdb-fields.h medusa-rdb-record.h medusa-tokenize.c medusa-tokenize.h medusa-io-handler.c medusa-io-handler.h * Makefile add new files, ability to test file indexer * doc/ui.txt changed some design issues for nautilus ui 5-15-2000 Rebecca Schulman rebecka@eazel.com Added basic equivalence selection functionality 5-15-2000 Rebecca Schulman rebecka@eazel.com Added simple relational database. Select functionality doesn't work yet. Should compile and run a few things. 2000-05-12 Miguel de Icaza * configure.in (MEDUSA_LIBS): Close the AC_OUTPUT. 5-11-2000 This doesn't work right now! It does not have a configure script, or any of those sorts of goodies! There is code that doesn't compile! Please don't complain about this right now. It will be righted in a day or two. What it does have: data structures: a tokenizer, and an io-handler, to permit easy mmap'ed io. tests for these data structures an api for a simple relational database like thing