summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | Assorted typo fixes in comments.Andre Noll2015-01-06
| |
* | Fix typo in documentation of --logfile.Andre Noll2015-01-06
| |
* | Shut down the signal subsystem on exit.Andre Noll2015-01-06
| | | | | | | | No biggy since we exit anyway a few lines later, but still..
* | tv.c: Remove unused functions.Andre Noll2015-01-06
| | | | | | | | | | | | | | | | Quite a few public functions of tv.c are not used anywhere in dss, so let's get rid of them. We can easily add them back in case they are neeed in the future. Found by cppcheck.
* | str.c: Remove pointless initialization.Andre Noll2015-01-06
| | | | | | | | | | | | | | The variable p is initialized to a different value a few lines later and the value set in the definition is not used in between. Found by cppcheck.
* | Remove non-functional SEE ALSO links from index.html.Andre Noll2015-01-06
|/ | | | | | | It's nice to have references to ssh and rsync in the SEE ALSO section of the man page. On the web page, however, they do not add much value since the links generated by man2html do not work. This patch omits the broken links.
* NEWS updateAndre Noll2015-01-06
|
* Change background color of web pages to white.Andre Noll2014-12-12
| | | | The old colors looked a little like the 90s ;)
* Merge branch 'refs/heads/t/min-complete'Andre Noll2014-12-12
|\
| * Introduce --min-complete.Andre Noll2014-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently dss cowardly refuses to remove the last complete snapshot even if disk space is low, and fails if there is not enough disk space left for a second snapshot. However, in some situations it is more important to have a recent snapshot and to to keep dss up and running. This commit introduces a new integer option, --min-complete, which defaults to one to resemble the old behaviour. If it is set to zero, dss will happily remove the last complete snapshot, even if it is used as the reference directory for rsync's --link-dest option. This is dangerous, but it's the only way to keep dss going. Conversely, --min-complete may be set to a value greater than one to guarantee there is always a certain number of complete snapshots available.
* | NEWS: Fix indentation of 0.1.5 items.Andre Noll2014-09-24
| | | | | | | | The generated html looked terrible. No real changes.
* | index.html.in: Fix gitweb link.Andre Noll2014-09-24
| | | | | | | | | | | | | | | | | | Apparently the symlink workaround for the gitweb pages on git.tuebingen.mpg.de does not work any more although the symlink dss->dss.git is still in place. This commit changes the link on the web page to include the .git suffix.
* | Change email address and URLs.Andre Noll2014-08-19
|/ | | | | | | | The web and email service of systemlinux.org was down for two weeks. Meanwhile the dss web pages found a new home at the MPI campus of Tübingen. This commit changes the email addresses and the home page URL.
* Silence clang warnings.Andre Noll2014-01-22
| | | | | | | | The -Wno-sign-compare option is supposed to not print the noisy warnings for comparisons between signed and unsigned values. Currently, in DEBUG_CFLAGS this option is followed by -W which causes clang (but not gcc) to turn on these warnings again. As CFLAGS contains -Wall, the -W option was redundant anyway, so this patch removes it.
* dss-0.1.5.v0.1.5Andre Noll2014-01-14
|
* Merge branch 't/exit_fix'Andre Noll2014-01-14
|\ | | | | | | Was cooking since 2013-10.
| * Kill children on fatal errors.Andre Noll2013-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If dss is about to die because it received SIGINT or SIGTERM, we first restart the rsync process by sending SIGCONT, then send SIGTERM to both the rsync and the rm process to get rid of any child processes. This works fine, but there are other fatal errors for which we miss to clean up as thoroughly, most importantly if there is not enough free disk space for a single snapshot. This patch moves the signal-related cleanup part to the new function kill_children(), and changes handle_signal() and com_run() to call this function right before the exit hook is invoked.
| * Trivial: Remove trailing semicolon.Andre Noll2013-10-16
| |
* | Merge branch 't/dia'Andre Noll2013-10-16
|\ \ | |/ |/| | | | | | | | | | | | | The single commit of this branch is more than one year old. I totally forgot about it, but here it is: 311ec5 Switch logo from skencil to dia. The web page has been updated to contain the new image.
| * Switch logo from skencil to dia.Andre Noll2012-08-15
| | | | | | | | | | | | | | | | | | | | | | The sketch/skencil project appears to be inactive for years, and it is no longer shipped on recent Linux distributions. This commit replaces the sketch source file dss.sk by dss.dia, a source file for dia, an GTK+ based diagram creation program. The new logo looks very similar to the old one but was created from scratch. dia allows to convert a .dia file to PNG image data. This patch also adjusts the Makefile to produce the dss.png logo from dss.dia.
* | rsync: Remove hardcoded --quiet option.Andre Noll2013-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running in daemon mode, the stdout and stderr stream of dss and all its child processes are redirected to /dev/null. In particular any output from the rsync process is discarded. Therefore, whenever a new snapshot is created, dss currently passes --quiet to the underlying rsync command, along with --archive and --delete. However, as was pointed out by Sebastian Schultheiß, if the rsync command fails for unknown reasons, the --quiet option complicates debugging for the questionable benefit of saving the I/O for a few writes to /dev/null. This patch removes the --quiet option.
* | Merge branch 't/zero-rsync-fix'Andre Noll2012-12-20
|\ \
| * | Don't create two snapshots in the same second.Andre Noll2012-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can only happen if all of the follwing are true: (a) source and destination directories are small (b) rsync completes successfully within one second (c) At most two snapshots are missing In this case the rename() call which changes the snapshot name from *-incomplete to the proper name fails for the second snapshot with EEXIST. This is because the previous snapshot name coincides with the name of the second snapshot. The fix is a bit ugly but also non-invasive and simple: Just sleep one second in this case.
* | | Reject insane number of intervals.Andre Noll2012-10-28
|/ / | | | | | | | | | | | | | | | | | | | | | | Nobody needs more than 2^30 snapshots. More importantly, values larger than 32 for --num_intervals cause an integer overflow in desired_number_of_snapshots() because the number of snapshots in interval zero does not fit in an unsigned int in this case. This patch adds a test to check_config() that rejects values larger than 30 for the --num_intervals option. Many thanks to Klaus Kopec for pointing out this bug.
* | Merge branch 't/rename_system_files'Andre Noll2012-09-16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has been cooking for several weeks. The conflicts daemon.c exec.c file.c ipc.c sig.c are trivial and can be resolved easily.
| * | Rename source files which also exist as system headers.Andre Noll2012-08-15
| |/ | | | | | | | | | | | | | | | | As pointed out by Daniel Richard G. some of the dss header files are named the same as system header files. This patch renames these headers as well as their corresponding .c files. Specifically, error.h, fd.h, signal.h, string.h and time.h become err.h, file.h, sig.h, str.h and tv.h.
* | Make the dss log facility C89 conform.Daniel Richard G2012-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variadic macros were introduced in C99, so they are not supported on ANSI C compilers. Since currently all DSS_*_LOG macros are variadic, we need a replacement for these. Moreover, since not all compilers support __func__ or an equivalent, we need to check for this feature as well and provide a workaround if necessary. This patch introduces the new public function dss_log_set_params() which saves the given log level, filename, line number and the function name in global variables. The DSS_*_LOG macros are changed to receive a single argument only, which is the usual variadic list, enclosed in additional parentheses. The new DSS_*_LOG macros first set the log parameters by calling dss_log_set_params(), then call dss_log() with the variadic list as the argument. dss_log() is patched to print the function name only if __func__ is supported and fall back to file name and the line number otherwise. All DSS_*_LOG() calls are changed to the new syntax.
* | ipc.c: Eliminate per-field struct initializations.Daniel Richard G2012-08-15
| | | | | | | | | | This replaces the C99-only initializations in mutex_lock() and mutex_try_lock() by equivalent but portable code.
* | Have foo.c #include foo.h.Daniel Richard G2012-08-15
| | | | | | | | | | This is both to ensure function signature consistency, and to eliminate GCC's "no previous declaration for _____" warnings.
* | Mark find_oldest_removable_snapshot() as static.Daniel Richard G2012-08-15
|/ | | | It is not used outside the source file in which it is defined.
* Merge branch 't/gcc-compat_fix'Andre Noll2012-08-15
|\ | | | | | | * e1f886 Only define gcc function attributes on gcc.
| * Only define gcc function attributes on gcc.Daniel Richard G2012-08-06
| | | | | | | | | | | | | | | | | | These gcc extensions help the compiler optimize function calls, but are unavailable if dss is not compiled with gcc. This patch defines the corresponding macros to empty if __GNUC__ is not defined, or if the gcc version is too old to support the particular function attribute.
* | Merge branch 't/cleanups'Andre Noll2012-08-15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in this branch are an attempt to make dss compile cleanly with the more strict compiler flags (GCC 4.6 on Linux). -pedantic -fno-common -W -Wall -Wcast-align -Wformat=2 -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual -Wmissing-declarations -Wnested-externs -Wstrict-prototypes This is only a first step that addresses the easier warnings. Some, like the ones stemming from the variadic macros, have yet to be fixed. * 9e6c2f Remove some debug messages. * 899f88 string.c: Fix a statement-before-declaration issue. * 83ebb4 Remove trailing commas. * 2ed0d7 snap.h: Fix HSA_ITEM. * 508350 Fix "comma after last element" warning. * 97fbf4 compare_snapshots(): Add const keyword. * b28495 Avoid per-element initializers. * 9528cf dss.c: Fix initialization of argv[]. * 4526f9 dss.c: Remove redundant const. * 2183c6 Makefile: Split CPPFLAGS. Conflicts: error.h
| * | Remove some debug messages.Daniel Richard G2012-08-04
| | | | | | | | | | | | | | | These were only helpful during development and are commented out for quite some time now. Remove them.
| * | string.c: Fix a statement-before-declaration issue.Daniel Richard G2012-08-04
| | |
| * | Remove trailing commas.Daniel Richard G2012-08-04
| | |
| * | snap.h: Fix HSA_ITEM.Daniel Richard G2012-08-04
| | | | | | | | | | | | | | | This changes the second definition of HSA_ITEM to avoid C99 subscripted element initializers.
| * | Fix "comma after last element" warning.Daniel Richard G2012-08-04
| | | | | | | | | | | | | | | | | | | | | This changes the definition of DSS_ERRORS so that it includes the commas, and removes the comma from both definitions of DSS_ERROR. This avoids "comma after last element" warnings, which on some compilers produces an error.
| * | compare_snapshots(): Add const keyword.Daniel Richard G2012-08-04
| | | | | | | | | | | | This fixes a "cast drops const qualifier" warning.
| * | Avoid per-element initializers.Daniel Richard G2012-08-04
| | | | | | | | | | | | | | | | | | Per-element struct initializers are not supported in ANSI C. This construct doesn't gain much in terms of readability, and breaks compatibility with older/stricter compilers.
| * | dss.c: Fix initialization of argv[].Daniel Richard G2012-08-04
| | | | | | | | | | | | | | | | | | argv[] can't be declared in this way because the initializers are not computable at compile time. GCC allows this construct, but stricter compilers don't.
| * | dss.c: Remove redundant const.Daniel Richard G2012-08-04
| | | | | | | | | | | | hook_status_description[] had a redundant const keyword, per GCC.
| * | Makefile: Split CPPFLAGS.Daniel Richard G2012-08-04
| |/ | | | | | | | | -W*/-O*/-g options belong in CFLAGS, not CPPFLAGS. CPPFLAGS is for preprocessor-specific (-D*/-I*) options.
* | Merge branch 't/ipc'Andre Noll2012-08-10
|\ \ | |/ |/| | | | | | | | | | | | | | | 4d9f41 mutex_get(): Change parameter from key_t to int. 55c90e Implement --reload. 492928 Add the --kill subcommand. dd42f7 Use semaphore locking to avoid starting dss multiple times. 17eea8 Introduce get_config_file_name(). That topic was cooking in next for a quite some time now.
| * mutex_get(): Change parameter from key_t to int.Andre Noll2012-08-03
| | | | | | | | | | | | | | | | The two callers obtain the key from get_key_or_die(), which returns int. So pass an int anyway. This fixes a warning on NetBSD: ipc.c:263: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'key_t'
| * Implement --reload.Andre Noll2012-06-01
| | | | | | | | | | This is literally the same as --kill, the only difference being that SIGHUP rather than SIGTERM is sent.
| * Add the --kill subcommand.Andre Noll2012-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It works as follows: Whenever a semaphore operation is performed, the PID of the process is stored in the sempid field of the semaphore. This PID can be obtained from a different process by calling semctl with the GETPID command. com_kill() first tries to acquire the lock by calling the new mutex_try_lock() function of ipc.c. In contrast to mutex_lock(), mutex_try_lock() only operates on the first semaphore in the semaphore set, leaving the sempid field of the second semaphore unchanged. If mutex_try_lock() succeeds, no running dss process is holding the lock and the kill command fails. Otherwise, some dss process is running whose PID can be obtained by calling semctl() on the second semaphore.
| * Use semaphore locking to avoid starting dss multiple times.Andre Noll2012-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's trickier than one might expect but it is hopefully also much better than any pidfile-based approach. This patch adds ipc.c and ipc.h containing the public lock_dss() function which acquires a semaphore-based lock whose key is based on the hash of the resolved path name of the dss config file. This allows different instances of dss to coexist. All semaphore operations are called with both the SEM_UNDO and the IPC_NOWAIT flag. SEM_UNDO guarantees that no stale lock remains after dss was killed by SIGKIlL while IPC_NOWAIT makes the call to lock_dss() fail if another process is already holding the lock. The prune/create/run commands simply take the lock at startup and exit if it could not be acquired. The underlying semaphore set contains two semaphores. This is necessary to implement the --kill subcommand which is done in a subsequent patch.
| * Introduce get_config_file_name().Andre Noll2012-06-01
| | | | | | | | | | | | ATM, the config file name is computed in parse_config(). However, for the ipc stuff we'll need that information as well, so move the computation to a separate helper function().
* | error.h: Remove is_errno().Andre Noll2012-08-03
| | | | | | | | This inline function is unused.