commit: dcd93fd4f161f7bbec431647502536ea8b1e6ae6 Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com> AuthorDate: Sun Feb 1 14:54:20 2026 +0000 Commit: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com> CommitDate: Sun Feb 1 14:54:51 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dcd93fd4
www-servers/copyparty: Bump to 1.20.1-r1 Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com> www-servers/copyparty/Manifest | 2 +- ...ty-1.20.1-r1.ebuild => copyparty-1.20.6.ebuild} | 53 +++++++++++++--------- www-servers/copyparty/files/copyparty-user.initd | 22 +++++++++ 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/www-servers/copyparty/Manifest b/www-servers/copyparty/Manifest index 465816f0e1..cd1a731c3f 100644 --- a/www-servers/copyparty/Manifest +++ b/www-servers/copyparty/Manifest @@ -1,2 +1,2 @@ -DIST copyparty-1.20.1.tar.gz 1702376 BLAKE2B 1d4abd99740e90124efc7bce6602a223b41609f67c1ffa8d8dbd4abf84c5f29a68a06a9a9da6fb6311a67460eab3502f935c21cc80429b3e7f55b4ac2ba4eab0 SHA512 8323f0a796ba4f227255fed43c20986741117542ad35aea494d2cd1e614cc591b4d36cc266c58cbf3911cc056c112dbd92e339708319efbf082d9661e6ef5a96 DIST copyparty-1.20.2.tar.gz 1711250 BLAKE2B d9d74ae3f26a8797a567adc3a9e4219f8119d5ac24d9054bbd6ce027687821eb4240095d16f9be0a46d24f8eb3905fb36d3a2d0fd8c2c1feb15a0f60906a8790 SHA512 c179b49b4d2199c9bf62f3419a0176f6a2850da945cfd4360710bc961395f9b854fcaff733d0bf67201b33567b5b0bbe2932221b64032f20490407b6282e9e1c +DIST copyparty-1.20.6.tar.gz 1708724 BLAKE2B bc2b3a7cd9a7d084c6a815959e9f31be15fb64c6f7ecf9c25377f16bd7670d2aea438e910a1b8419b913a9afdeb9164ab363f182f712986a4e6a59baa24c2a8e SHA512 a235222fc9a05202d98ca047070181955cf321570128b076902d7430656e36728e6f65173cc22806321041c5edf76a0923857919f0388086c6ac23b03c32c6f4 diff --git a/www-servers/copyparty/copyparty-1.20.1-r1.ebuild b/www-servers/copyparty/copyparty-1.20.6.ebuild similarity index 77% rename from www-servers/copyparty/copyparty-1.20.1-r1.ebuild rename to www-servers/copyparty/copyparty-1.20.6.ebuild index b33c56e568..a90f74588d 100644 --- a/www-servers/copyparty/copyparty-1.20.1-r1.ebuild +++ b/www-servers/copyparty/copyparty-1.20.6.ebuild @@ -29,27 +29,29 @@ DISABLE_AUTOFORMATTING=y DOC_CONTENTS="\ # TODO: This package is unfinished and lacks some features -- Service scripts: - - contrib/openrc/copyparty: Hardcodes /usr/local/bin, runs as root, exposes /mnt as RW (!?) - - contrib/systemd/copyparty.service: Hardcodes /usr/local/bin, runs as root, in /var/lib/copyparty - - contrib/systemd/[email protected]: Runs as an arbitrary user, in /var/lib/copyparty-jail, at boot - - contrib/systemd/copyparty-user.service: User service, runs in /var/lib/copyparty-jail - Ideally, both systemd and openrc scripts would have the same behavior. - I also think it'd be sane to default to a new user/group named copyparty, - and create /var/lib/copyparty with the correct permissions. +- Missing service scripts: +-- OpenRC system service running as different user/group (default to copyparty) +-- Systemd system service running as different user/group (default to copyparty) +-- Systemd user service + +- Existing upstream service scripts: +-- contrib/openrc/copyparty: Hardcodes /usr/local/bin, runs as root, exposes /mnt as RW (!?) +-- contrib/systemd/copyparty.service: Hardcodes /usr/local/bin, runs as root, in /var/lib/copyparty +-- contrib/systemd/[email protected]: Runs as an arbitrary user, in /var/lib/copyparty-jail, at boot +-- contrib/systemd/copyparty-user.service: User service, runs in /var/lib/copyparty-jail - Default configuration: There's a bunch of examples, find them using: - \`find docs contrib -name '*.conf'\`. - Ideally one of these would be installed as /etc/copyparty.conf, and an - /etc/copyparty.d directory would be created. I'm not sure what would be - acceptable defaults. +\`find docs contrib -name '*.conf'\`. +Ideally one of these would be installed as /etc/copyparty.conf, and an +/etc/copyparty.d directory would be created. I'm not sure what would be +acceptable defaults. - Jailing the service with prisonparty/bubbleparty: This program is very - feature-packed, and has a decent security track record, but just has a - massive attack surface with serious repercussions. Some packages provide a - 'prisonparty' service, which runs the program in a chroot. This script - hardcodes a lot of things that I'm not sure will work on gentoo, and would - need matching openrc/systemd services as well. +feature-packed, and has a decent security track record, but just has a +massive attack surface with serious repercussions. Some packages provide a +'prisonparty' service, which runs the program in a chroot. This script +hardcodes a lot of things that I'm not sure will work on gentoo, and would +need matching openrc/systemd services as well. # Note about TLS and certificates @@ -80,10 +82,9 @@ docker. Additionally, it's difficult to package npm dependencies in gentoo. https://gist.github.com/mid-kid/cc7c0c2e1c188c8b135663d547e3dd35" src_prepare() { - # Reuse the bundled copy of fusepy for partyfuse - # patched in scripts/deps-docker/Dockerfile (under "build fusepy") - sed -e '/from fuse import/s/fuse/copyparty.web.deps.&/' \ - -i bin/partyfuse.py || die + # Use a $TMPDIR for testing, not /dev/shm + sed -e 's/\["\/dev\/shm"[^]]*\]/[]/' \ + -i tests/util.py || die distutils-r1_src_prepare } @@ -95,6 +96,13 @@ python_test() { python_install() { distutils-r1_python_install + # Reuse the bundled copy of fusepy for partyfuse + # patched in scripts/deps-docker/Dockerfile (under "build fusepy") + sed -e "1a$(printf '%s\\n' \ + 'import copyparty.web.deps.fuse as fuse,sys,os' \ + 'sys.path.append(os.path.dirname(fuse.__file__))' \ + )" -i "${D}$(python_get_scriptdir)/partyfuse" || die + # Useful utilities listed in bin/README.md # These need to be executed inside the server's data directory # Installed into /usr/libexec as not a single other package installs them @@ -106,6 +114,9 @@ src_install() { distutils-r1_src_install readme.gentoo_create_doc + exeinto /etc/user/init.d + newexe "${FILESDIR}/copyparty-user.initd" copyparty + # Not all of the documentation is useful, but it's hard to filter, # and plenty of it is quite useful. dodoc -r docs contrib diff --git a/www-servers/copyparty/files/copyparty-user.initd b/www-servers/copyparty/files/copyparty-user.initd new file mode 100644 index 0000000000..d6c182d4a8 --- /dev/null +++ b/www-servers/copyparty/files/copyparty-user.initd @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +RUNTIME="${XDG_RUNTIME_DIR}/${RC_SVCNAME}" +CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/copyparty" + +command="/usr/bin/copyparty" +command_args="-c ${CONFIG}/copyparty.conf -lo ${RUNTIME}/${RC_SVCNAME}.log" +command_background=true +pidfile="${RUNTIME}/${RC_SVCNAME}.pid" +extra_commands="checkconfig" + +checkconfig() { + "${command}" ${command_args} --exit cfg +} + +start_pre() { + # TODO: copy a system-wide default configuration to .config/copyparty/copyparty.conf + if ! checkconfig > /dev/null 2>&1; then + eerror "Invalid configuration. Use the checkconfig command for details." + return 1 + fi + checkpath -d "${RUNTIME}" +}
