From 9fd44de7a0526c47ba1ec9e9d1f90ebae667b0d2 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 27 Apr 2026 12:10:35 -0500 Subject: [PATCH] Fixing build issues --- .gitignore | 2 +- 1337x.torrentengine.sample | 6 ---- LICENSE | 58 ++++++++++++++++++++------------------ Makefile | 27 ++++++++++-------- PKGBUILD | 7 ++--- README.md | 18 ++++++++++-- installscript | 8 ++++++ offload-wolfpack | 31 -------------------- offload-wolfpack@.service | 11 -------- offload-wolfpack@.timer | 10 ------- 10 files changed, 75 insertions(+), 103 deletions(-) delete mode 100755 1337x.torrentengine.sample create mode 100644 installscript delete mode 100755 offload-wolfpack delete mode 100644 offload-wolfpack@.service delete mode 100644 offload-wolfpack@.timer diff --git a/.gitignore b/.gitignore index e6bf8b6..68bf691 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ *.tar.zst pkg src - +wiki/** diff --git a/1337x.torrentengine.sample b/1337x.torrentengine.sample deleted file mode 100755 index f772250..0000000 --- a/1337x.torrentengine.sample +++ /dev/null @@ -1,6 +0,0 @@ -torrentengine=https://1337x.to/search/%s/1/ -torrentterms=printf https://1337x.to; grep "/torrent/" | head -n 1 | cut -f 10 -d \" -magnetposition=4 -torrentdebugging=false -searchunifier=+ -magnetseparator=" diff --git a/LICENSE b/LICENSE index 878d895..e15653d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,27 +1,31 @@ -# http://www.wtfpl.net/about/ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - - ANINIX ADDENDUM - - Trademark Pending 2017 (https://aninix.net/irc/) - - The "AniNIX" name and |> logo is trademark-pending as of 2017. All - AniNIX materials can be reproduced and re-used, though you must - contact the admins of the network to get written permission to use - the AniNIX name. - - Attribution is appreciated for other materials but not legally - required or necessary. +# http://www.wtfpl.net/about/ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + ANINIX ADDENDUM + + Trademark 2017 (https://aninix.net/) + + The "AniNIX" name and |> logo are trademarked as of 2017/11/21. + AniNIX materials may be reproduced and re-used (though you must + contact the admins of the network to get written permission to use + the AniNIX name or logo) so long as such reproduction or re-use + does not inhibit the original AniNIX use of the same. + + Attribution is appreciated for other materials but not legally + required or necessary. + + "AniNIX" trademark serial: 87177883 + |> Logo trademark serial: 87177887 diff --git a/Makefile b/Makefile index 093174e..5665e4e 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,35 @@ -compile: +compile: @echo Nothing to compile. -install: compile ./wolfpack ./offload-wolfpack ./1337x.torrentengine.sample +install: compile ./wolfpack mkdir -p ${pkgdir}/usr/local/bin/ - for i in wolfpack offload-wolfpack; do install -o root -g root -m 0755 $$i ${pkgdir}/usr/local/bin/$$i; done + install -o root -g root -m 0755 ./wolfpack ${pkgdir}/usr/local/bin/$$i mkdir -p ${pkgdir}/usr/lib/systemd/system for i in *.service *.timer; do install -o root -g root -m 0755 $$i ${pkgdir}/usr/lib/systemd/system/$$i; done mkdir -p ${pkgdir}/usr/local/etc/WolfPack chmod 0770 ${pkgdir}/usr/local/etc/WolfPack - cp ./*.pup ${pkgdir}/usr/local/etc/WolfPack; cp ./1337x.torrentengine.sample ${pkgdir}/usr/local/etc/WolfPack/torrentengine; make checkperm clean: @echo Nothing to do -test: - ./test-torrent-engine 'S01E01 Tech-TV' ./1337x.torrentengine.sample &>/dev/null - ./wolfpack --help +uninstall: /usr/local/bin/wolfpack + systemctl disable --now wolfpack.timer + systemctl disable --now wolfpack.service + rm -Rf /usr/local/bin/wolfpack /usr/local/etc/WolfPack /usr/lib/systemd/system/wolfpack.* -reverse: - for i in wolfpack offload-wolfpack; do cp /usr/local/bin/$$i .; done - for i in *.service *.timer; do cp /usr/lib/systemd/system/$$i .; done +test: + ./wolfpack --help checkperm: ${pkgdir}/usr/local/etc/WolfPack/ chmod -R ug+rw ${pkgdir}/usr/local/etc/WolfPack/ chmod 0770 ${pkgdir}/usr/local/etc/WolfPack/ chmod 0755 ${pkgdir}/usr/local/bin/*wolfpack chown root:root ${pkgdir}/usr/local/bin/*wolfpack - chmod 0660 ${pkgdir}/usr/local/etc/WolfPack/*; + +diff: + for i in /usr/local/bin/wolfpack /usr/lib/systemd/system/wolfpack.*; do diff ./$$(basename $$i) $$i; done + +reverse: + for i in wolfpack offload-wolfpack; do cp /usr/local/bin/$$i .; done + for i in *.service *.timer; do cp /usr/lib/systemd/system/$$i .; done diff --git a/PKGBUILD b/PKGBUILD index 2f9e061..85e2975 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,12 +3,11 @@ makedepends=('make>=4.2') checkdepends=() optdepends=() pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')" -pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)" +pkgver="$(git describe --tag --abbrev=0)"."$(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 ))"."$(git rev-parse --short HEAD)" pkgrel=1 pkgrel() { echo $(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 )) } -epoch="$(git log | grep -c commit)" pkgdesc="$(head -n 1 README.md)" arch=("x86_64") url="$(git config remote.origin.url | sed 's/.git$//')" @@ -16,10 +15,10 @@ license=('custom') groups=() provides=("${pkgname}") conflicts=() -replaces=("${pkgname,,}", "aninix-${pkgname,,}") +replaces=("${pkgname,,}" "aninix-${pkgname,,}") backup=() options=() -install= +install=installscript changelog= source=() noextract=() diff --git a/README.md b/README.md index 68036a8..b20876a 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,24 @@ Please note that the torrent and show functionalities are provided for legitimat Some tools included are: * wolfpack: This is the core script, using .pup files to search for various things on the Internet. Pup types include shows, torrents, downloads, and searches. * test-torrent-torrent-engine: A number of sample torrent engines have been provided to look at major sites. -** Note: torrentproject.se is currently hard to scrape due to CloudFlare protections, and 1337x has a challenging reputation. -* offload-wolfpack: This allows other machines to run the wolfpack and then copy the results to a known destination. We have also included example "pups" in this source. +# Etymology +WolfPack is named for its operation. "Pups" live on disk as .pup files -- these will grow up and retrieve the results that feed the system. An alpha sends pack members to raise a pup and collect the results for the pack. This role will update configuration to [the configuration directory](file:///usr/local/etc/WolfPack). +## VPN protection and Offloading. +Some countries and areas take issue with some searches and downloads. In your Ansible inventory, enable an SSHFS mount and configure your torrent tool to move completed results to that share. +This requires SSH keys to be set up between the offloading hosts and the target location, but this will run some version of wolfpack and send the results to the target. + +# Relevant Files and Software + +Most of this tool is built on `curl` -- configuration lives in `/usr/local/etc/WolfPack`. + +# Available Clients + +See [AniNIX/Cyberbrain](https://cyberbrain.aninix.net). + +# Equivalents or Competition +Google Alerts can provide an alternative to the WolfPack's search pup type. Downloads can be done manually, and some torrent clients will have search and queuing options. Launchers like Steam will keep software up-to-date. diff --git a/installscript b/installscript new file mode 100644 index 0000000..5594d90 --- /dev/null +++ b/installscript @@ -0,0 +1,8 @@ +pre_install() { + groupadd wolfpack &>/dev/null + useradd -g wolfpack -s /bin/false wolfpack &> /dev/null +} + +pre_remove() { + getent passwd wolfpack &>/dev/null && userdel wolfpack &> /dev/null +} diff --git a/offload-wolfpack b/offload-wolfpack deleted file mode 100755 index 5a3a1fb..0000000 --- a/offload-wolfpack +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -set -x - -target="$1" -dir=`sudo -u deluge deluge-console config download_location 2>/dev/null | head -n 1 | sed 's/download_location: //'` - -if [ -z "$target" ]; then # || [ "$(ping -c 2 "$target" &>/dev/null; echo $?)" -ne 0 ]; then - echo Usage: $0 '[target]'; - exit 1 -fi -ssh $target mkdir -p /srv/yggdrasil/new_acquisition -timeout 60 sudo -u deluge /bin/bash -l -c 'deluge-console info' 2>/dev/null | egrep '^\[S\]' | ( - while read line; do - id="$(echo "$line" | awk '{ print $4; }')" - name="$(echo "$line" | awk '{ print $3 }')" - # Clean up downloads before sending. - rm -Rf "$dir"/"$name"/*.nfo "$dir"/"$name"/*.txt "$dir"/"$name"/*.png "$dir"/"$name"/*.jpg - rsync -avzz "$dir"'/'"$name" $target:/srv/yggdrasil/new_acquisition - ret="$?" - if [ "$ret" -eq 0 ]; then - # Hack because `deluged rm -c $id` isn't working - sudo systemctl stop deluged - sudo rm -Rf /srv/deluge/.config/deluge/state"$id"; - sudo systemctl start deluged - rm -Rf "$dir"'/'"$name" - else - echo "ERROR: Return was $ret" >> "$dir"/"$name"/error.log - fi - unset name; unset id; - done -) | systemd-cat -t "offload-wolfpack" diff --git a/offload-wolfpack@.service b/offload-wolfpack@.service deleted file mode 100644 index 5ff605c..0000000 --- a/offload-wolfpack@.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=AniNIX::WolfPack \\ Data Collection Botnet, Offload to %I - -[Service] -ExecStartPre=/usr/sbin/sudo /usr/bin/systemctl start wolfpack.service -ExecStart=/usr/local/bin/offload-wolfpack %I -KillMode=process -Type=oneshot -RemainAfterExit=no -User=depriv -Group=depriv diff --git a/offload-wolfpack@.timer b/offload-wolfpack@.timer deleted file mode 100644 index 336b2aa..0000000 --- a/offload-wolfpack@.timer +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=AniNIX::WolfPack \\ Data Collection Botnet, Offload to %I (timer) - -[Timer] -OnCalendar=00/4:00 -AccuracySec=12h -Persistent=true - -[Install] -WantedBy=timers.target