mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Merge pull request #3599 from holta/transmission_compile_latest
WIP: Try 'transmission_compile_latest: True' BitTorrent software (e.g. Transmission 4.1.0-dev, instead of 3.0 from May 2020)
This commit is contained in:
		
						commit
						9db2496b95
					
				
					 8 changed files with 70 additions and 9 deletions
				
			
		|  | @ -111,23 +111,28 @@ Docs | |||
| As of June 2023, these docs appear to be the most up-to-date: | ||||
| 
 | ||||
| - https://github.com/transmission/transmission/tree/main/docs | ||||
|    - https://github.com/transmission/transmission/blob/main/docs/Building-Transmission.md | ||||
|    - https://github.com/transmission/transmission/blob/main/docs/Configuration-Files.md | ||||
|    - https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md | ||||
|    - https://github.com/transmission/transmission/blob/main/docs/Headless-Usage.md | ||||
| - https://wiki.archlinux.org/title/transmission (updated regularly) | ||||
|    - https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md | ||||
|       - https://transmission-rpc.readthedocs.io | ||||
| - https://cli-ck.io/transmission-cli-user-guide/ (2016 but still useful) | ||||
|    - https://github.com/transmission/transmission#command-line-interface-notes ("``transmission-cli`` is deprecated and exists primarily to support older hardware dependent upon it. In almost all instances, ``transmission-remote`` should be used instead.") | ||||
| - https://wiki.archlinux.org/title/transmission (updated regularly) | ||||
| - https://trac.transmissionbt.com/wiki (2006-2019) | ||||
| 
 | ||||
| Logging | ||||
| ------- | ||||
| 
 | ||||
| To turn on logging and/or record the Process ID (PID), follow these instructions: https://pawelrychlicki.pl/Home/Details/59/transmission-daemon-doesnt-create-a-log-file-nor-a-pid-file-ubuntu-server-1804 | ||||
| Increase logging by changing transmission-daemon's ``--log-level=error`` to ``--log-level=debug`` in ``/lib/systemd/system/transmission-daemon.service`` | ||||
| 
 | ||||
| This gives permissions to user ``debian-transmission`` — if you use these 3 lines in ``/lib/systemd/system/transmission-daemon.service`` : | ||||
| (Options are: ``critical``, ``error``, ``warn``, ``info``, ``debug`` or ``trace``) | ||||
| 
 | ||||
| :: | ||||
| Then run:: | ||||
| 
 | ||||
|   RuntimeDirectory=transmission-daemon | ||||
|   LogsDirectory=transmission-daemon | ||||
|   ExecStart=/usr/bin/transmission-daemon -f --log-error --log-debug --logfile /var/log/transmission-daemon/transmission.log --pid-file /run/transmission-daemon/transmission.pid | ||||
|   systemctl daemon-reload | ||||
|   systemctl restart transmission-daemon | ||||
|   journalctl -eu transmission-daemon | ||||
| 
 | ||||
| Noting that one should not normally edit files in ``/lib`` or ``/usr/lib`` — systemd has a command for customizing unit files: ``systemctl edit --full transmission-daemon.service`` | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| # Transmission is a BitTorrent downloader for large Content Packs etc | ||||
| # transmission_install: False | ||||
| # transmission_enabled: False | ||||
| # transmission_compile_latest: True | ||||
| # transmission_username: Admin | ||||
| # transmission_password: changeme | ||||
| 
 | ||||
|  |  | |||
|  | @ -10,6 +10,53 @@ | |||
|       - transmission-cli | ||||
|     state: present | ||||
| 
 | ||||
| 
 | ||||
| - block: | ||||
| 
 | ||||
|   - name: "TRY TO COMPILE & INSTALL very latest Transmission, installing ~5 binaries in /usr/local/bin to take precedence over above ~6 binaries in /usr/bin (attempt surgery on systemd unit file from apt install above!)" | ||||
|     meta: noop | ||||
| 
 | ||||
|   # https://github.com/transmission/transmission/blob/main/docs/Building-Transmission.md#on-unix | ||||
|   # https://github.com/transmission/transmission/issues/5362 tips thanks to @tearfur | ||||
|   - name: apt install build-essential cmake libcurl4-openssl-dev libssl-dev libsystemd-dev    # git python3 | ||||
|     package: | ||||
|       name: | ||||
|         - build-essential | ||||
|         - cmake | ||||
|         - libcurl4-openssl-dev | ||||
|         - libssl-dev | ||||
|         - libsystemd-dev | ||||
|       state: present | ||||
| 
 | ||||
|   - name: Git clone https://github.com/transmission/transmission to /opt/iiab/transmission | ||||
|     git: | ||||
|       repo: https://github.com/transmission/transmission | ||||
|       dest: /opt/iiab/transmission | ||||
|       #version: 4.0.x    # Otherwise default branch 'main' | ||||
|       depth: 1 | ||||
|       force: yes | ||||
| 
 | ||||
|   # https://github.com/transmission/transmission/blob/main/docs/Building-Transmission.md#building-transmission-from-git-first-time | ||||
|   - name: Compile, install & remove detritus (CAN TAKE 50 MINUTES OR MORE ON A RASPBERRY PI 4!) | ||||
|     shell: | | ||||
|       cd /opt/iiab/transmission | ||||
|       git submodule update --init --recursive | ||||
|       mkdir build | ||||
|       cd build | ||||
|       cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | ||||
|       make | ||||
|       make install | ||||
|       cd | ||||
|       rm -rf /opt/iiab/transmission    # 2023-06-12: Frees up 1.1 GB on 32-bit RasPiOS.  Frees up 1.6 GB on 64-bit RasPiOS. | ||||
| 
 | ||||
|   - name: Attempt surgery on /lib/systemd/system/transmission-daemon.service (1) changing --log-error to --log-level=error (2) changing /usr/bin/transmission* to /usr/local/bin/transmission* | ||||
|     shell: | | ||||
|       sed -i 's/--log-error/--log-level=error/' /lib/systemd/system/transmission-daemon.service    # --log-error deprecated since ~2020 | ||||
|       sed -i 's#/usr/bin/transmission#/usr/local/bin/transmission#' /lib/systemd/system/transmission-daemon.service    # daemon_reload handled by enable-or-disable.yml | ||||
| 
 | ||||
|   when: transmission_compile_latest | ||||
| 
 | ||||
| 
 | ||||
| - name: Create download dir {{ transmission_download_dir }}, owned by {{ transmission_user }}:{{ transmission_group }} | ||||
|   file: | ||||
|     state: directory | ||||
|  | @ -23,7 +70,10 @@ | |||
|     state: stopped | ||||
|   ignore_errors: yes | ||||
| 
 | ||||
| - name: Back up prior /etc/transmission-daemon/settings.json (original file from apt, or new symlink contents) to /etc/transmission-daemon/settings.json.old* | ||||
| # 'transmission-daemon -d' (--dump-settings) CAN GENERATE A NEW settings.json | ||||
| # ...then customize ~8 var lines to create a new templates/settings.json.j2 | ||||
| 
 | ||||
| - name: Back up prior /etc/transmission-daemon/settings.json (file originally from apt, or new symlink contents) to /etc/transmission-daemon/settings.json.old* | ||||
|   copy: | ||||
|     src: /etc/transmission-daemon/settings.json | ||||
|     dest: /etc/transmission-daemon/settings.json.old | ||||
|  | @ -52,7 +102,7 @@ | |||
| - name: "Reverse Transmission's fragile OOTB symlink -- instead we establish /etc/transmission-daemon/settings.json -> /var/lib/transmission-daemon/.config/transmission-daemon/settings.json -- REASON: /etc/transmission-daemon/settings.json was intermittently being IGNORED, as Transmission sometimes breaks its own symlink from /var/lib/transmission-daemon/.config/transmission-daemon/settings.json (by turning it into a file instead)" | ||||
|   file: | ||||
|     path: /etc/transmission-daemon/settings.json | ||||
|     src: /var/lib/transmission-daemon/.config/transmission-daemon/settings.json | ||||
|     src: /var/lib/transmission-daemon/.config/transmission-daemon/settings.json    # Symlink /var/lib/transmission-daemon/home/settings.json also points to this | ||||
|     state: link | ||||
|     force: yes | ||||
| 
 | ||||
|  |  | |||
|  | @ -543,6 +543,7 @@ sugarizer_port: 8089 | |||
| # Transmission is a BitTorrent downloader for large Content Packs etc | ||||
| transmission_install: False | ||||
| transmission_enabled: False | ||||
| transmission_compile_latest: True | ||||
| transmission_username: Admin | ||||
| transmission_password: changeme | ||||
| 
 | ||||
|  |  | |||
|  | @ -320,6 +320,7 @@ sugarizer_enabled: True | |||
| # BitTorrent downloader for large Content Packs etc | ||||
| transmission_install: True | ||||
| transmission_enabled: True | ||||
| transmission_compile_latest: True | ||||
| # A. UNCOMMENT LANGUAGE(S) TO DOWNLOAD KA Lite VIDEOS TO /library/transmission | ||||
| #    using https://pantry.learningequality.org/downloads/ka-lite/0.17/content/ | ||||
| transmission_kalite_languages: | ||||
|  |  | |||
|  | @ -320,6 +320,7 @@ sugarizer_enabled: True | |||
| # BitTorrent downloader for large Content Packs etc | ||||
| transmission_install: True | ||||
| transmission_enabled: True | ||||
| transmission_compile_latest: True | ||||
| # A. UNCOMMENT LANGUAGE(S) TO DOWNLOAD KA Lite VIDEOS TO /library/transmission | ||||
| #    using https://pantry.learningequality.org/downloads/ka-lite/0.17/content/ | ||||
| transmission_kalite_languages: | ||||
|  |  | |||
|  | @ -320,6 +320,7 @@ sugarizer_enabled: False | |||
| # BitTorrent downloader for large Content Packs etc | ||||
| transmission_install: False | ||||
| transmission_enabled: False | ||||
| transmission_compile_latest: True | ||||
| # A. UNCOMMENT LANGUAGE(S) TO DOWNLOAD KA Lite VIDEOS TO /library/transmission | ||||
| #    using https://pantry.learningequality.org/downloads/ka-lite/0.17/content/ | ||||
| transmission_kalite_languages: | ||||
|  |  | |||
|  | @ -320,6 +320,7 @@ sugarizer_enabled: False | |||
| # BitTorrent downloader for large Content Packs etc | ||||
| transmission_install: False | ||||
| transmission_enabled: False | ||||
| transmission_compile_latest: True | ||||
| # A. UNCOMMENT LANGUAGE(S) TO DOWNLOAD KA Lite VIDEOS TO /library/transmission | ||||
| #    using https://pantry.learningequality.org/downloads/ka-lite/0.17/content/ | ||||
| transmission_kalite_languages: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue