Skip to content

Commit

Permalink
merge upstream dev-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
buhtz committed May 8, 2023
1 parent b299a72 commit 0f38685
Show file tree
Hide file tree
Showing 138 changed files with 6,733 additions and 2,209 deletions.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To help us diagnose the problem quickly, please provide the output of the console command `backintime --diagnostics`.

Additionally, please specify as precisely as you can the package or installation source where you got BackInTime. Sometimes there are multiple alternatives, like [for Arch-based distros](https://aur.archlinux.org/packages?K=backintime).

13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ __pycache__/
# editor backup
*~
*.sic
*.swp
\#*\#

# packaging
*.deb
Expand All @@ -31,9 +33,16 @@ debian/backintime-qt
common/Makefile
qt/Makefile

#coveralls.io status
# coveralls.io status
.coverage

#sphinx doc build
# sphinx doc build
common/doc-dev/_build/doctrees
common/doc-dev/_build/html

# PyCharm IDE project settings
.idea

# coverage result files (raw data and reports)
# .coverage # already ignored, see above
**/htmlcov/**
28 changes: 22 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
# https://docs.travis-ci.com/user/languages/python

language: python
os: linux
arch :
- amd64
- ppc64le

# ensures that we have UUID filesystem mounts for proper testing
sudo: true
dist: trusty
dist: focal

addons:
# add localhost to known_hosts to prevent ssh unknown host prompt during unit tests
ssh_known_hosts: localhost

python:
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "nightly" # currently points to 3.6-dev
- "3.6"
- "3.9"
- "3.10"
- "3.11"

before_install:
# disable mongodb as we don't need it and it sometimes temporary fails
Expand All @@ -24,9 +28,21 @@ before_install:
- sudo apt-get -qq update
# install screen, and util-linux (provides flock) for test_sshtools
- sudo apt-get install -y sshfs screen util-linux
jobs:
exclude:
- arch: ppc64le
python: "3.6"
- arch: ppc64le
python: "3.10"
- arch: ppc64le
python: "3.11"
- arch: amd64
python: "3.9"
- arch: amd64
python: "3.11"

install:
- pip install coveralls
- pip install coveralls pyfakefs
# add ssh public / private key pair to ensure user can start ssh session to localhost for tests
- ssh-keygen -b 2048 -t rsa -f /home/travis/.ssh/id_rsa -N ""
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Expand Down
204 changes: 138 additions & 66 deletions CHANGES

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# How to contribute to _Back In Time_

😊 **Thanks for taking the time to contribute!**

The maintenance team will welcome all types of contributions. No contribution
will be rejected just because it doesn't fit to our quality standards,
guidelines or rules. Every contribution is reviewed and if needed will be
improved together with the maintainers.

Please always make a new branch when preparing a Pull Request or a patch.
Baseline that feature or bug fix branch on `dev` (the latest development
state). When open a pull request please make sure that it targets
`bit-team:dev`.

Please take the following best practices into account if possible (to reduce
the work load of the maintainers and to increase the chance that your pull
request is accepted):
- Follow [PEP 8](https://peps.python.org/pep-0008/) as a minimal Style Guide
for Python Code
- Follow [Google Style Guide](https://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html) for
docstrings (see our own [HOWTO about doc generation](common/doc-dev/1_doc_maintenance_howto.md)).
- Be careful when using automatic formatters like `black` and please mention
the use of it when opening a pull request.
- Run unit tests before you open a Pull Request. You can run them via
`make`-system with `cd common && ./configure && make && make test` or you
can use `pytest`.
- Try to create new unit tests if appropriated. Use Pythons regular `unittest`
instead of `pytest`. If you know the difference please try follow the
_Classical (aka Detroit) school_ instead of _London (aka mockist) school_.

## Index

<!-- TOC start -->
- [Resources](#resources)
- [Build & Install](#build-install)
* [Dependencies](#dependencies)
* [Build and install via `make` system
(recommended)](#build-and-install-via-make-system-recommended)
* [Build own `deb` file](#build-own-deb-file)
- [Further reading](#further-reading)
- [Licensing of contributed material](#licensing-of-contributed-material)
<!-- TOC end -->

## Resources

- [Mailing list _bit-dev_](https://mail.python.org/mailman3/lists/bit-dev.python.org/) for development related topics
- [Source code documentation for developers](https://backintime-dev.readthedocs.org)
- [Translations](https://translations.launchpad.net/backintime) are done on a separate platform
- [HowTo maintain _Back In Time_](common/doc-dev/1_doc_maintenance_howto.md)

## Build & Install

This section describes how to build and install _Back In Time_ in preparation
of your own contributions. It is assumed that you `git clone` this repository
fist.

### Dependencies

The following dependencies are based on Ubuntu. Please [open an
Issue](/~https://github.com/bit-team/backintime/issues/new/choose) if something
is missing. If you use another GNU/Linux distribution, please install the
corresponding packages. Be aware that some of the named packages can be
replaced with PyPi packages.

* Runtime dependencies

- `python3` (>= 3.6)
- `rsync`
- `cron-daemon`
- `openssh-client`
- `python3-keyring`
- `python3-dbus`
- `python3-packaging`

* Recommended

- `sshfs`
- `encfs`

* Runtime dependencies for the GUI

- `x11-utils`
- `python3-pyqt5`
- `python3-dbus.mainloop.pyqt5`
- `libnotify-bin`
- `policykit-1`
- `qtwayland5` (if Wayland is used as display server instead of X11)

* Recommended for the GUI

- For SSH key storage **one** of these packages
- `python3-secretstorage`
- `python3-keyring-kwallet`
- `python3-gnomekeyring`
- For diff-like comparing files between backup snapshots **one** of these
packages
- `kompare`
- or `meld`

* Build dependencies

- `build-essential`
- `gzip`
- `gettext`
- `python3-pyfakefs`

### Build and install via `make` system (recommended)

Remember that _Back In Time_ do consists of two packages, which must be build
and installed separately accordingly.

* Command line tool
1. `cd common`
2. `./configure && make`
3. Run unit tests via `make test`
4. `sudo make install`

* Qt GUI
1. `cd qt`
2. `./configure && make`
3. Run unit tests via `make test`
4. `sudo make install`

You can use optional arguments to `./configure` for creating a Makefile.
See `common/configure --help` and `qt/configure --help` for details.

### Build own `deb` file

1. Run `./makedeb.sh` in the repositories root directory.
2. Two `deb` files are build and places in the repositories parent directory.
3. Install the packages
- `sudo dpkg -i ../backintime-common-<version>.deb`
- `sudo dpkg -i ../backintime-qt-<version>.deb`

## Further reading
- https://www.contribution-guide.org
- https://mozillascience.github.io/working-open-workshop/contributing

## Licensing of contributed material
Keep in mind as you contribute, that code, docs and other material submitted
to the project are considered licensed under the same terms (see
[LICENSE](LICENSE)) as the rest of the work.

<sub>March 2023</sub>
Loading

0 comments on commit 0f38685

Please sign in to comment.