| Commit message (Collapse) | Author | Age |
| ... | |
| |/
|
|
|
| |
Both callers pass the same value for the delimiters, so we can
remove the last argument of the function.
|
| |\
| |
| |
| |
| |
| |
| |
| | |
Was cooking for more than a year.
* refs/heads/t/multiple-source-dirs:
create_rsync_argv(): Allocate correctly sized arg array.
Support multiple source directories.
|
| | |
| |
| |
| |
| |
| | |
In the calculation of the length of the argv array we did not take
into account that --source-dir may be given multiple times. This can
result in an invalid write at the end of the allocated space.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
rsync is capable of copying multiple source directories to a single
destination, but this is currently not supported by dss. This commit
adds this functionality. The implementation is straight-forward,
except that we don't want to add a trailing slash to every source
directory. The new comment in dss.c explains this in more detail.
Suggested-By: Sanja Jasek <sanja.jasek@tuebingen.mpg.de>
Tested-By: Sanja Jasek <sanja.jasek@tuebingen.mpg.de>
|
| | |
| |
| |
| |
| |
| | |
This comment went stale ten years ago in commit 360bcc95d588 (Clean
up snapshot removal logic) which changed the type of the return value
of find_redundant_snapshot() from int to struct snapshot *.
|
| | |
| |
| |
| | |
The old comment did not provide any information at all..
|
| |/
|
|
|
| |
People who like dss might also be interested in other projects of
the author.
|
| |
|
|
| |
Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When handle_signal(), the signal dispatcher of the run subcommand,
detects that SIGINT or SIGTERM was received, it calls kill_children()
to terminate any running rsync or rm processes. It then returns
negative which terminates the select loop. However, after select_loop()
returns, kill_children() is called again. Also the error message is
logged twice.
Not a biggie, but let's get rid of this redundancy by removing the
first call to kill_children().
Since handle_signal() is only called from com_run(), this patch
affects only the run subcommand.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function computes the average idle time between snapshots and adds
this value to the completion time of the last snapshot to obtain the
start time for the next snapshot.
However, if the last snapshot happens to be incomplete, its completion
time is set to -1. Hence the computed next snapshot time is going to
be in the past, so we start the next snapshot immediately.
Although this is incorrect, the bug is benign because the correct next
snapshot time should also be in the past since we decided earlier to
create the snapshot which was now found incomplete.
Fix this by using the completion time of the last _complete_ snapshot
instead.
|
| |
|
|
|
| |
scan-build correctly points out that the value stored to 'name'
is never read.
|
| |
|
|
|
|
|
| |
We never pass a NULL pointer to create_snapshot(), but scan-build
is unable to prove this and claims that the array access results in
a null pointer dereference. The added assertion helps the reader of
the code, and it quietens scan-build.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gets rid of existing copyright templates in favor of just the
one-liner SPDX (Software Package Data Exchange) notice. All files are
licensed under the GPL-2.0, so the same tag is added to each file. No
copyright is changed by this commit.
Several files (mostly the very short ones) did not contain a license
text so far. By default all files without license information are
under the default license of this package, which is GPL version 2.
This commit adds the missing SPDX line so that now all files except
dss.css, index.html.in, INSTALL, NEWS and README have it.
We also remove author and copyright year, since the author is the same
everywhere, and the year hasn't been updated any more since at least
six years. Accurate information is available from the git log.
The COPYING file can also be removed because the license text at
https://spdx.org/licenses/GPL-2.0.html is immutable.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two patches which make life easier for shutdown scripts which need
to terminate the dss process, but would like to wait until the exit
hook completed.
The merge conflicted in dss.suite, but this was trivial to fix.
Cooking for a week.
* refs/heads/t/kill-w:
kill: New option --wait.
run: Wait for children to die.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simply running "dss kill" during system shutdown to terminate the
dss process does not work as expected because the kill subcommand
exits after the signal has been sent, which might be long before the
targeted dss process terminates.
For example, the dss main process might be running its exit hook to
inform the system administrator about the fact that the dss service
is going down when the shutdown procedure already has deactivated the
network. Or the shutdown procedure kills the exit hook with SIGKILL
during its normal "killing remaining processes" phase before file
systems are unmounted.
With the --wait option, the kill subcommand will not return until the
dss process has died or the timeout expires. We hardcode the timeout
in send_signal() for the time being. It can be made configurable if
this turns out to be necessary.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When the select loop returns and dss is about to terminate, it sends
SIGTERM to any running rm or rsync processes and exits. It does not
wait for these processes to die, however. This is trivial to implement,
and it makes life easier for shutdown scripts which like to proceed
with unmounting file systems.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A fix for a long standing issue with the exit hook.
Cooking for a week.
* refs/heads/t/exit-hook:
Allow word-splitting for exit hook.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All hooks except the exit hook are run via dss_exec_cmdline_pid(),
which performs word splitting to create the argument vector for
exec(2). For the exit hook, however, we build the argument vector
manually, so the command line for the exit hook is not split.
This commit removes this inconsistency. However, we can't use
dss_exec_cmdline_pid() here because we need to append the error string
which caused dss to exit to the argument vector as a single argument,
and this string may well contain whitespace characters.
Hence we run split_args() on the argument to --exit-hook to obtain
an argument vector, append the error string as another element,
and then run dss_exec().
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A simple patch which improves the ls output.
Cooking for 10 days.
* refs/heads/t/ls-incomplete-duration:
ls: Print current duration of incomplete snapshots.
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently the duration of incomplete (and orphaned) snapshots is shown
as 0:00. It's more interesting to see for how long the snapshot is
already being created, so print the difference of the current time
and the start time instead.
Fix an overlong line and a whitespace issue while at it.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A new main option which aborts dss if the destination file system is
not mounted.
Cooking for two weeks.
* refs/heads/t/mountpoint:
New option: --mountpoint.
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new option applies to run, create, ls and prune. The feature
could be implemented as a pre-create hook, but since it is so common,
it makes sense to add it to dss proper.
As for the implementation we simply check that "." and ".." are on
different devices (or are identical).
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A few patches which change dss_log() to only print the time stamp
and the function if dss is executing the "run" subcommand.
Cooking for a week.
* refs/heads/t/short-log:
Subcommand sensitive logging.
Save the subcommand pointer in a global variable.
main(): Don't initialize user data pointer.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's kind of silly to log the current time and the function name for
subcommands other than "run", since these commands run only for a
short time.
This commit changes dss_log() to only print this additional information
when dss run is being executed.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is needed for subcommand sensitive logging which will be
introduced in a subsequent commit. For now it allows to drop the
argument of check_config(), which is good given that handle_sighup()
already played dirty games by "knowing" it is only called from the
run subcommand.
|
| | |/ /
| | |
| | |
| | |
| | |
| | | |
It is never used uninitialized. The unnecessary initialization only
hides the warning from the compiler if it ever should ever be used
uninitialized.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
It is kind of obvious that find_orphaned_snapshot() looks for, well,
orphaned snapshots. The new message at least gives the user a vague
idea what this means.
|
| | | |
| | |
| | |
| | | |
Sending a signal is a significant event which deserves a log message.
|
| | | |
| | |
| | |
| | |
| | | |
This message does not add any information and just spams the log
file. Remove it.
|
| | | |
| | |
| | |
| | |
| | | |
In standard English, the verb "allows" can never take an infinitive as
its direct object.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The only purpose of this macro is to have a way to include static
inline functions into the doxygen source code documentation (but omit
normal static functions in .c files). Since dss does not use doxygen,
the macro is pointless.
Remove the equally pointless documentation of dss_rename(), one
of the two users of _static_inline_, while converting it to plain
static inline.
|
| | | |
| | |
| | |
| | | |
It contained three macros which are no longer used.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A single patch which adds the new configtest subcommand, plus a fixup
for a formatting issue which was noticed only after the branch had
already been merged to next.
* refs/heads/t/configtest:
show_subcommand_summary(): Increase column width.
New subcommand: configtest.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Since the new configtest command is 10 characters long, there was no
whitespace between the command name and the short description.
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Similar to the identically named subcommand of apache2ctl. This is
trivial to implement because we only need to describe the subcommand
in dss.suite and create a command handler which prints an OK message
and returns success. If the config file contains errors, we abort
earlier anyway.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
* maint:
Fix snapshot removal reason.
|
| | | |
| | |
| | |
| | |
| | | |
If the oldest snapshot has to be removed because disk space is low,
we currently log "orphaned" as the reason, which is incorrect.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We never had .a files in the tree, and the .cmdline.[ch] files went
away when we switched to lopsub. The generated index.html was always
missing.
Moreover, let's add *.swp, the swap files created by vim to recover
crashed editing sessions.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
The typo in README was introduced two years ago in commit 05e75054
(README: Explain that there are no incremental backups) while the
one in INSTALL is more than five years old, see commit a0b6810b (doc:
Add a second example config file).
|
| | | |
| | |
| | |
| | |
| | | |
The http link gives 502 (Couldn't parse server headers) at the moment
while https works.
|
| | | |
| | |
| | |
| | | |
The tilde caused the URL to 404.
|
| |\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
One commit which changes the way dss.png is built and another one
which adds the generated dss.png to .gitignore.
* refs/heads/t/im-logo:
Add dss.png to .gitignore.
Replace dss.dia by a shell script.
|
| | | |
| | |
| | |
| | | |
It's a generated file which should never be under version control.
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The dia command line tool misaligns the text on the dss logo, and the
dia application started to segfault on my home box after a library
upgrade.
This patch replaces the dia source file by the mklogo bash script
which runs the convert utility of ImageMagick to write the dss logo
in png format to stdout.
The result looks almost identical.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conversion to lopsub and a few other improvements on top of it.
* refs/heads/t/lopsub:
INSTALL: Explain how to use CPPFLAGS and LDFLAGS.
build: Introduce DSS_CPPFLAGS.
build: Fix cc command which creates dependencies,
build: Combine CFLAGS and DEBUG_CFLAGS.
Implement --checksum.
run: Improve error diagnostics for chdir(2) failure.
run: Improve error message if dss is already running.
run: Fix exit status in case another dss process is running.
build: Add target install and install-strip.
Convert dss to lopsub.
Remove --no-resume.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As with CFLAGS, it is good practice to leave CPPFLAGS unset in the
Makefile and append it to the cc command after our own flags, to give
the user a chance to override our settings.
This patch initializes DSS_CPPFLAGS with the VERSION_STRING define
which was part of the receipe and adds -Wunused macros, which is a
preprocessor flag rather than a compiler flag.
DSS_CPPFLAGS and CPPFLAGS are added to the two relevant commands,
in addition to the existing DSS_CFLAGS and CFLAGS.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
The command to create Makefile.deps was hardcoded as gcc in Makefile.
This patch changes the command to $(CC) and adds the usual set of
flags which we use for compiling.
|