Compare commits

...

5 Commits

Author SHA1 Message Date
2d87cde887 Make a 2.0.2 release 2019-06-08 21:34:27 +01:00
212efc4f52 [Packaging] Move user out of systemd files and add to tarball
With the `deluge` user specified in the unit files it ties it to
that user and makes it unavailable for re-use by systemd user instance.

Remove the user and group from the unit files and put them in a separate
`user.conf` file that should be installed as an override file e.g. for
deluged.service this would be placed as follows:

    /etc/systemd/service/deluge.service.d/user.conf

Add the systemd files to the tarball for package maintainers.

Closes: #2034
2019-06-08 21:31:49 +01:00
879a397215 [Packaging] Add updated launchd scripts
Copy from Trac UserGuide and updated with proper naming and deluge-web
version.

The bin location is default for brew with pip install.

Closes: #3073
2019-06-08 21:31:49 +01:00
957cd5dd9c [Core] Fix SimpleNamespace on Python2 2019-06-08 21:31:49 +01:00
25087d3f2d [Docs] Add release notes and update pages 2019-06-08 16:42:25 +01:00
16 changed files with 188 additions and 28 deletions

View File

@ -21,12 +21,15 @@ matrix:
include:
- name: Unit tests
env: TOX_ENV=py3
- name: Unit tests (libtorrent 1.2)
- name: Unit tests - libtorrent 1.2
env: TOX_ENV=py3
addons:
apt:
sources: [sourceline: "ppa:libtorrent.org/1.2-daily"]
packages: [python3-libtorrent, python3-venv]
- name: Unit tests - Python 2
env: TOX_ENV=py27
python: 2.7
- if: commit_message =~ SECURITY_TEST
env: TOX_ENV=security
- name: Code linting
@ -44,6 +47,7 @@ addons:
- sourceline: "ppa:libtorrent.org/rc-1.1-daily"
- deadsnakes
packages:
- python-libtorrent
- python3-libtorrent
# Install py36 specifically for pre-commit to run black formatter.
- python3.6

View File

@ -1,7 +1,19 @@
# Changelog
## 2.0.2 (2019-06-08)
### Packaging
- Add systemd deluged and deluge-web service files to package tarball (#2034)
### Core
- Fix Python 2 compatiblity issue with SimpleNamespace.
## 2.0.1 (2019-06-07)
### Packaging
- Fix setup.py build error without git installed.
## 2.0.0 (2019-06-06)

View File

@ -8,6 +8,7 @@ include version.py
include gen_web_gettext.py
graft docs/man
graft packaging/systemd
include deluge/i18n/*.po
recursive-exclude deluge/i18n *.mo

View File

@ -28,6 +28,14 @@ from deluge.common import decode_bytes
log = logging.getLogger(__name__)
try:
SimpleNamespace = types.SimpleNamespace # Python 3.3+
except AttributeError:
class SimpleNamespace(object): # Python 2.7
def __init__(self, **attr):
self.__dict__.update(attr)
class AlertManager(component.Component):
"""AlertManager fetches and processes libtorrent alerts"""
@ -126,7 +134,7 @@ class AlertManager(component.Component):
if log.isEnabledFor(logging.DEBUG):
log.debug('Handling alert: %s', alert_type)
# Copy alert attributes
alert_copy = types.SimpleNamespace(
alert_copy = SimpleNamespace(
**{
attr: getattr(alert, attr)
for attr in dir(alert)

View File

@ -5,3 +5,4 @@ This is a guide to help with developing Deluge.
- [Tutorials](tutorials/index.md)
- [How-to guides](how-to/index.md)
- [Packaging](packaging/index.md)
- [Changelog](../changelog.md)

View File

@ -9,7 +9,7 @@ Contents
Getting started <intro/index.md>
How-to guides <how-to/index.md>
Changelog <changelog.md>
Release notes <releases/index.md>
Contributing <contributing/index.md>
Developer guide <devguide/index.md>
Reference <reference/index.rst>

View File

@ -9,7 +9,7 @@ feel free to make suggestions for improvement.
Until the stable PPA is updated, the development version of Deluge can be used:
sudo add-apt-repository -u ppa:deluge-team/develop
sudo add-apt-repository -u ppa:deluge-team/stable
sudo apt install deluge
### <i class="icon-python"></i> PyPi
@ -46,20 +46,20 @@ There is no installer package currently for Windows, but can try Deluge as follo
There is no `.app` package currently for macOS, but can try Deluge with homebrew.
1. Install [Homebrew]
2. Open a terminal.
3. Run the following to install required packages:
1. Install [Homebrew]
2. Open a terminal.
3. Run the following to install required packages:
brew install pyobject3 gtk+3 adwaita-icon-theme
brew install libtorrent-rasterbar
brew install pyobject3 gtk+3 adwaita-icon-theme
brew install libtorrent-rasterbar
4. To fix translations:
4. To fix translations:
brew link gettext --force
brew link gettext --force
5. Install Deluge:
5. Install Deluge:
pip3 install deluge
pip3 install deluge
[develop ppa]: https://launchpad.net/~deluge-team/+archive/ubuntu/develop/
[homebrew]: https://brew.sh/

View File

@ -1,16 +1,38 @@
# Deluge Web UI
The Deluge web interface is intended to be a full featured interface built using
the ExtJS framework, running on top of a Twisted webserver.
The Deluge web interface is a full featured interface built using the ExtJS framework,
running on top of a Twisted webserver.
## SSL Configuration
By default the web interface will use the same private key and certificate as
the Deluge daemon. If you wish to use a different certificate/key (see
[How to Create a SSL Certificate](http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/))
for information on creating one) you are able to specify which you want to use.
the Deluge daemon. You can use a different certificate/key and specify it in the Web UI
config, see below for details.
There are 2 ways to enable SSL encryption in the webserver, 1 is to specify it
in your configuration (accessible via the Preferences window). The other is to
add '--ssl' when running the webserver, which will override the configuration
value and enable SSL.
### Create SSL Certificate Examples
Sample guide: [How to Create a SSL Certificate][ssl cert]
#### Linux
openssl req -new -x509 -nodes -out deluge.cert.pem -keyout deluge.key.pem
#### Windows
C:\OpenSSL\bin\openssl.exe req -config C:\OpenSSL\bin\openssl.cnf -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem
### Enable Web UI SSL
There are two ways to enable SSL encryption in the webserver:
- Specify in your config (accessible via the Preferences window).
- Use `--ssl` when running the webserver, overriding the configuration value to enable SSL.
## Enable Development mode
Add `?dev=true` to the webui url to enable development mode, uses the source js files
(if available) rather than compressed versions:
http://127.0.0.1:8112/?dev=true
[ssl cert]: http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/

View File

@ -0,0 +1,45 @@
# Deluge 2.0 release notes
Welcome to the latest release of Deluge, a long time in the making!
## What's new
Some of the highlights since the last major release.
- Migrated to Python 3 with minimal support retained for Python 2.7.
- Shiny new logo.
- Multi-user support.
- Performance updates to handle thousands of torrents with faster loading times.
- A New Console UI which emulates GTK/Web UIs.
- GTK UI migrated to GTK3 with UI improvements and additions.
- Magnet pre-fetching to allow file selection when adding torrent.
- Fully support libtorrent 1.2 release.
- Language switching support.
- Improved documentation hosted on ReadTheDocs.
- AutoAdd plugin replaces built-in functionality.
## Packaging
Unfortunately there are no packages yet for [Windows] or MacOS but they are being worked
on. For now alternative [install] methods are available for testing.
## Upgrade considerations
Deluge 2.0 is not compatible with Deluge 1.x clients or daemons so these will require
upgrading too. Also third-party Python scripts may not be compatible if they directly
connect to the Deluge client and will need migrating.
Always make a backup of your [config] before a major version upgrade to guard against
data loss.
Translations may not be as up-to date so please help out, see [translations] page.
Plugins written for Deluge 1.3 will need upgrading for Deluge 2.0, due to the
requirement of Python 3 and GTK3 UI. There is a [update plugin] document to help
Plugin authors update their plugins.
[update plugin]: ../devguide/how-to/update-1.3-plugin.md
[windows]: https://dev.deluge-torrent.org/ticket/3201
[install]: https://deluge.readthedocs.io/en/latest/intro/01-install.html
[config]: https://dev.deluge-torrent.org/wiki/Faq#WheredoesDelugestoreitssettingsconfig
[translations]: ../contributing/translations.md

View File

@ -0,0 +1,10 @@
# Release notes
A summary of the important changes in major releases of Deluge. For more details see
the [changelog] or the [git commit log].
- [Changelog]
- [Deluge 2.0 release notes](2.0.md)
[git commit log]: http://git.deluge-torrent.org/deluge/log/?h=master
[changelog]: ../changelog.md

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.deluge-torrent.deluge-web</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/deluge-web</string>
<string>-d</string>
<string>-L</string>
<string>error</string>
<string>-l</string>
<string>/var/log/deluge-web.log</string>
</array>
<key>StandardOutPath</key>
<string>/tmp/deluge-web.stdout</string>
<key>StandardErrorPath</key>
<string>/tmp/deluge-web.stderr</string>
<!-- To enable running as 'deluge' user remove comments.
<key>UserName</key>
<string>deluge</string>
-->
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.deluge-torrent.deluged</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/deluged</string>
<string>-d</string>
<string>-L</string>
<string>error</string>
<string>-l</string>
<string>/var/log/deluged.log</string>
</array>
<key>StandardOutPath</key>
<string>/tmp/deluged.stdout</string>
<key>StandardErrorPath</key>
<string>/tmp/deluged.stderr</string>
<!-- To enable running as 'deluge' user remove comments.
<key>UserName</key>
<string>deluge</string>
-->
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

View File

@ -6,9 +6,6 @@ Wants=deluged.service
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
ExecStart=/usr/bin/deluge-web -d

View File

@ -5,8 +5,6 @@ After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=007
ExecStart=/usr/bin/deluged -d

View File

@ -0,0 +1,4 @@
# Override service user
[Service]
User=deluge
Group=deluge

View File

@ -591,7 +591,7 @@ setup(
'Operating System :: POSIX',
'Topic :: Internet',
],
python_requires='>=3.5',
python_requires='>=2.7',
license='GPLv3+',
cmdclass=cmdclass,
setup_requires=setup_requires,