diff --git a/README-bup-web.Fedora.md b/README-bup-web.Fedora.md new file mode 100644 index 0000000..cb0db5d --- /dev/null +++ b/README-bup-web.Fedora.md @@ -0,0 +1,82 @@ +Notes on Fedora bup-web Package +=============================== + +The bup-web package provides the `bup web` command which runs a web server for +browsing through bup repositories. +For convenience, it also provides a systemd unit file for running `bup web` +as a service with the systemd user instance (i.e. `systemd --user`). + + +Usage +----- + +### Managing systemd user service + +*NOTE: All commands should be executed as an ordinary (non-root) user.* + +To enable the bup-web user service, execute: + + systemctl --user enable bup-web.service + +To start the bup-web user service, execute: + + systemctl --user start bup-web.service + +To see the status of the bup-web user service, execute: + + systemctl --user status bup-web.service + +To stop the bup-web user service, execute: + + systemctl --user stop bup-web.service + +To disable the bup-web user service, execute: + + systemctl --user disable bup-web.service + +### Browsing bup repositories + +Open your web browser and go to: + + 127.0.0.1:8080 + +*NOTE: By default, bup-web only accepts requests from local clients. +To expose it to whole network, add `0.0.0.0:` to its command line. +For more details on editing bup-web's configuration, see the next section.* + + +Configuration +------------- + +Currently, bup-web user service can only be configured by manually editing its +systemd unit file. + +If you've previously enabled bup-web user service, disable it with: + + systemctl --user disable bup-web.service + +Then copy the package-provided unit file to your systemd user instance +configuration directory: + + cp /usr/lib/systemd/user/bup-web.service ~/.config/systemd/user/ + +Edit the unit file to suit your needs. + +Finally, enable the bup-web user service with: + + systemctl --user enable bup-web.service + + +Troubleshooting +--------------- + +If the bup-web user service fails to start, examine its journal records by +executing: + + journalctl --user-unit bup-web.service + + +Authors +------- + +Tadej Janež diff --git a/README.Fedora b/README.Fedora deleted file mode 100644 index 276bf32..0000000 --- a/README.Fedora +++ /dev/null @@ -1,12 +0,0 @@ -Notes on Fedora bup Package -=========================== - -by Tadej Janež -updated: May 13, 2015 - -Support for generating and/or using "recovery blocks" with the external 'par2' -tool in 'bup fsck' command is intentionally disabled since the current packaged -version of 'par2' (part of the par2cmdline package) is outdated and can leave -files in worse condition than before running 'par2'. -A bug report asking about the future of par2cmdline tool has been filed in -Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1221165. diff --git a/README.Fedora.md b/README.Fedora.md new file mode 100644 index 0000000..e2a2165 --- /dev/null +++ b/README.Fedora.md @@ -0,0 +1,19 @@ +Notes on Fedora bup Package +=========================== + + +The `par2` support in `bup fsck` is disabled +-------------------------------------------- + +Support for generating and/or using "recovery blocks" with the external `par2` +tool in `bup fsck` command is intentionally disabled since the current packaged +version of `par2` (part of the par2cmdline package) is outdated and can leave +files in worse condition than before running `par2`. +A bug report asking about the future of par2cmdline tool has been filed in +Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1221165. + + +Authors +------- + +Tadej Janež diff --git a/bup-web.service b/bup-web.service index 22bd19c..b0c96ce 100644 --- a/bup-web.service +++ b/bup-web.service @@ -1,6 +1,6 @@ [Unit] Description=Web server for browsing through bup repositories -Documentation=man:bup-web(1) +Documentation=man:bup-web(1) file:/usr/share/doc/bup-web/README.Fedora.md After=network.target [Service] diff --git a/bup.spec b/bup.spec index a53bcd7..8280851 100644 --- a/bup.spec +++ b/bup.spec @@ -15,8 +15,9 @@ Summary: Very efficient backup system based on the git packfile format License: LGPLv2 and BSD and Python URL: https://bup.github.io/ Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz -Source1: README.Fedora +Source1: README.Fedora.md Source2: bup-web.service +Source3: README-bup-web.Fedora.md # Replace calls to 'python' with calls to '$PYTHON' in all tests. In # combination with setting the 'PYTHON' environment variable to 'python2', this @@ -100,6 +101,8 @@ bup repositories. %prep %autosetup -n %{name}-%{commit} -S git cp %{SOURCE1} . +mkdir bup-web +cp %{SOURCE3} bup-web/README.Fedora.md %build @@ -148,13 +151,14 @@ make test PYTHON=%{__python2} %files web +%doc bup-web/README.Fedora.md %{_libdir}/%{name}/cmd/bup-web %{_libdir}/%{name}/web/ %{_userunitdir}/bup-web.service %{_mandir}/man1/bup-web.1* %files -%doc README.md README.Fedora +%doc README.md README.Fedora.md %license LICENSE %{_bindir}/%{name} %{_libdir}/%{name}/ @@ -166,10 +170,12 @@ make test PYTHON=%{__python2} %changelog -* Sun Nov 22 2015 Tadej Janež 0.27-0.3 +* Mon Nov 23 2015 Tadej Janež 0.27-0.3 - Split bup web server into a separate sub-package. - Added systemd service for running the bup web server. - Added a work-around for a bug in systemd's %%systemd_user_post macro. +- Added a README with Fedora-specific notes on using the bup-web package. +- Converted the main README with Fedora-specific notes to Markdown. * Wed Oct 14 2015 Tadej Janež 0.27-0.2 - Added perl(Time::HiRes) to BuildRequires since it is required for running the