diff --git a/.vscode/launch.json b/.vscode/launch.json index 9ab69494..4a4217be 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Run copyparty", - "type": "python", + "type": "debugpy", "request": "launch", "module": "copyparty", "console": "integratedTerminal", @@ -11,30 +11,46 @@ "justMyCode": false, "env": { "PYDEVD_DISABLE_FILE_VALIDATION": "1", - "PYTHONWARNINGS": "always", //error + "PYTHONWARNINGS": "always" //error }, "args": [ - //"-nw", - "-ed", - "-emp", + //"-nw", // no-write; for testing uploads without writing to disk + //"-q", // quiet; speedboost when console output is not needed + + // # increase debugger performance: + //"no-htp", + //"hash-mt=0", + //"mtag-mt=1", + //"th-mt=1", + + // # listen for FTP and TFTP + "--ftp=3921", + "--ftp-pr=12000-12099", + "--tftp=3969", + + // # listen on all IPv6, all IPv4, and unix-socket + "-i::,unix:777:a.sock", + + // # misc + "--dedup", "-e2dsa", "-e2ts", - "-mtp=.bpm=f,bin/mtag/audio-bpm.py", + "--rss", + "--shr=/shr", + "--stats", + "-z", + + // # users + volumes "-aed:wark", - "-vsrv::r:rw,ed:c,dupe", - "-vdist:dist:r" + "-vdist:dist:r", + "-vsrv::r:rw,ed", + "-vsrv/junk:junk:r:A,ed", + "--ver" ] }, - { - "name": "No debug", - "preLaunchTask": "no_dbg", - "type": "python", - //"request": "attach", "port": 42069 - // fork: nc -l 42069 /dev/null && continue + err=1; echo ERROR: missing dependency: $x +done +[ $err ] && exit 1 + for v in "$@"; do [ "$v" = clean ] && clean=1 [ "$v" = hclean ] && hclean=1 @@ -56,7 +63,7 @@ filt= for a in $sarchs; do # arm/v6 podman pull --arch=$a alpine:latest done - + podman images --format "{{.ID}} {{.History}}" | awk '/library\/alpine/{print$1}' | while read id; do diff --git a/scripts/make-sfx.sh b/scripts/make-sfx.sh index 100792ca..9ec9601a 100755 --- a/scripts/make-sfx.sh +++ b/scripts/make-sfx.sh @@ -178,6 +178,8 @@ necho() { } [ $repack ] || { + (cd ../scripts; ./genlic.py ../copyparty/res/COPYING.txt) + necho collecting ipaddress f="../build/ipaddress-1.0.23.tar.gz" [ -e "$f" ] || @@ -307,8 +309,6 @@ necho() { # remove type hints before build instead (cd copyparty; PYTHONPATH="..:$PYTHONPATH" "$pybin" ../../scripts/strip_hints/a.py; rm uh) - - (cd ../scripts; ./genlic.py ../copyparty/res/COPYING.txt) } [ ! -e copyparty/web/deps/mini-fa.woff ] && [ $dl_wd ] && { diff --git a/scripts/pyinstaller/deps.sha512 b/scripts/pyinstaller/deps.sha512 index 5aa63686..c16278b7 100644 --- a/scripts/pyinstaller/deps.sha512 +++ b/scripts/pyinstaller/deps.sha512 @@ -1,14 +1,14 @@ f117016b1e6a7d7e745db30d3e67f1acf7957c443a0dd301b6c5e10b8368f2aa4db6be9782d2d3f84beadd139bfeef4982e40f21ca5d9065cb794eeb0e473e82 altgraph-0.17.4-py2.py3-none-any.whl -6a624018f30da375581d5751eca0080edbbe37f102f643f856279fcfded3a4379fd1b6fb0661cdb2e72bbbbc726ca714a1f5990cc348df365db62bc53e4c4503 Git-2.45.2-32-bit.exe 17ce52ba50692a9d964f57a23ac163fb74c77fdeb2ca988a6d439ae1fe91955ff43730c073af97a7b3223093ffea3479a996b9b50ee7fba0869247a56f74baa6 pefile-2023.2.7-py3-none-any.whl b297ff66ec50cf5a1abcf07d6ac949644c5150ba094ffac974c5d27c81574c3e97ed814a47547f4b03a4c83ea0fb8f026433fca06a3f08e32742dc5c024f3d07 pywin32_ctypes-0.2.3-py3-none-any.whl -085d39ef4426aa5f097fbc484595becc16e61ca23fc7da4d2a8bba540a3b82e789e390b176c7151bdc67d01735cce22b1562cdb2e31273225a2d3e275851a4ad setuptools-70.3.0-py3-none-any.whl -644931f8e1764e168c257c11c77b3d2ac5408397d97b0eef98168a058efe793d3ab6900dc2e9c54923a2bd906dd66bfbff8db6ff43418513e530a1bd501c6ccd upx-5.0.1-win32.zip +fd88d00c7231f9fcbe0fb9037217b6ae5dcb5b06a98be56243400542671a32f003d594b2e1852f77d316e9327ad4c643321e1f9f3ea20cc8500ac5bba8ae170e upx-5.0.2-win32.zip # win7 +d9d30ff960365307833425e340bf0a642fd54e35155f18ff1d9746bc1ecf8ecb864aad24948735e8fd994503b659dc8968e6ba337eeb4568217ebdf97dd292dd Git-2.46.2-32-bit.exe 3253e86471e6f9fa85bfdb7684cd2f964ed6e35c6a4db87f81cca157c049bef43e66dfcae1e037b2fb904567b1e028aaeefe8983ba3255105df787406d2aa71e en_windows_7_professional_with_sp1_x86_dvd_u_677056.iso ab0db0283f61a5bbe44797d74546786bf41685175764a448d2e3bd629f292f1e7d829757b26be346b5044d78c9c1891736d93237cee4b1b6f5996a902c86d15f en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso d130bfa136bd171b9972b5c281c578545f2a84a909fdf18a6d2d71dd12fb3d512a7a1fa5cf7300433adece1d306eb2f22d7278f4c90e744e04dc67ba627a82c0 future-1.0.0-py3-none-any.whl 0b4d07434bf8d314f42893d90bce005545b44a509e7353a73cad26dc9360b44e2824218a1a74f8174d02eba87fba91baffa82c8901279a32ebc6b8386b1b4275 importlib_metadata-6.7.0-py3-none-any.whl +085d39ef4426aa5f097fbc484595becc16e61ca23fc7da4d2a8bba540a3b82e789e390b176c7151bdc67d01735cce22b1562cdb2e31273225a2d3e275851a4ad setuptools-70.3.0-py3-none-any.whl 9d2c31701a4d3fef553928c00528a48f9e1854ab5333528b50e358a214eba90029d687f039bcda5760b6fdf9f2de3bcf3784ae21a6374cf2a97a845d33b636c6 packaging-24.0-py3-none-any.whl 5d7462a584105bccaa9cf376f5a8c5827ead099c813c8af7392d478a4398f373d9e8cac7bbad2db51b335411ab966b21e119b1b1234c9a7ab70c6ddfc9306da6 pip-24.0-py3-none-any.whl f298e34356b5590dde7477d7b3a88ad39c622a2bcf3fcd7c53870ce8384dd510f690af81b8f42e121a22d3968a767d2e07595036b2ed7049c8ef4d112bcf3a61 pyinstaller-5.13.2-py3-none-win32.whl @@ -21,14 +21,15 @@ ea73aa54cc6d5db20dfb127e54562dabf890e4cd6171a91b10a51af2bcfc76e1d64cbdce4546df2d 479a63e14586ab2f2228208116fc149ed8ee7b1e4ff360754f5bda4bf765c61af2e04b5ef123976623d04df4976b7886e0445647269da81436bd0a7b5671d361 windows6.1-kb2533623-x86.msu ac96786e5d35882e0c5b724794329c9125c2b86ae7847f17acfc49f0d294312c6afc1c3f248655de3f0ccb4ca426d7957d02ba702f4a15e9fcd7e2c314e72c19 zipp-3.15.0-py3-none-any.whl # win10 +f4b4e330995ebe96c0bd06e16e5b26062ece9473f06d369775aa68eab261dedcf32dfdd159acaa227502bbf9fa2cd8bbe57cddb89fc6f2196fef7a9ed5a80ae9 Git-2.51.0-64-bit.exe 0a2cd4cadf0395f0374974cd2bc2407e5cc65c111275acdffb6ecc5a2026eee9e1bb3da528b35c7f0ff4b64563a74857d5c2149051e281cc09ebd0d1968be9aa en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso -16cc0c58b5df6c7040893089f3eb29c074aed61d76dae6cd628d8a89a05f6223ac5d7f3f709a12417c147594a87a94cc808d1e04a6f1e407cc41f7c9f47790d1 virtio-win-0.1.248.iso +16cc0c58b5df6c7040893089f3eb29c074aed61d76dae6cd628d8a89a05f6223ac5d7f3f709a12417c147594a87a94cc808d1e04a6f1e407cc41f7c9f47790d1 virtio-win-0.1.285.iso 9a7f40edc6f9209a2acd23793f3cbd6213c94f36064048cb8bf6eb04f1bdb2c2fe991cb09f77fe8b13e5cd85c618ef23573e79813b2fef899ab2f290cd129779 jinja2-3.1.6-py3-none-any.whl 00731cfdd9d5c12efef04a7161c90c1e5ed1dc4677aa88a1d4054aff836f3430df4da5262ed4289c21637358a9e10e5df16f76743cbf5a29bb3a44b146c19cf3 MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl 8a6e2b13a2ec4ef914a5d62aad3db6464d45e525a82e07f6051ed10474eae959069e165dba011aefb8207cdfd55391d73d6f06362c7eb247b08763106709526e mutagen-1.47.0-py3-none-any.whl a726fb46cce24f781fc8b55a3e6dea0a884ebc3b2b400ea74aa02333699f4955a5dc1e2ec5927ac72f35a624401f3f3b442882ba1cc4cadaf9c88558b5b8bdae packaging-25.0-py3-none-any.whl 3e39ea6e16b502d99a2e6544579095d0f7c6097761cd85135d5e929b9dec1b32e80669a846f94ee8c2cca9be2f5fe728625d09453988864c04e16bb8445c3f91 pillow-11.3.0-cp313-cp313-win_amd64.whl -59fbbcae044f4ee73d203ac74b553b27bfad3e6b2f3fb290fd3f8774753c6b545176b6b3399c240b092d131d152290ce732750accd962dc1e48e930be85f5e53 pyinstaller-6.14.1-py3-none-win_amd64.whl -fc6f3e144c5f5b662412de07cb8bf0c2eb3b3be21d19ec448aef3c4244d779b9ab8027fd67a4871e6e13823b248ea0f5a7a9241a53aef30f3b51a6d3cb5bdb3f pyinstaller_hooks_contrib-2025.5-py3-none-any.whl +b9b98714dfca6fa80b0b3f222965724d63be9c54d19435d1fe768e07016913d6db8d6e043fcb185b55a9bd6fe370a80cf961814fc096046a5f4640d99ed575ef pyinstaller-6.15.0-py3-none-win_amd64.whl +cad0f7cf39de691813b1d4abc7d33f8bda99a87d9c5886039b814752e8690364150da26fb61b3e28d5698ff57a90e6dcd619ed2b64b04f72b5aadb75e201bdb0 pyinstaller_hooks_contrib-2025.8-py3-none-any.whl 36db028e9f3d6805a57e89320283c07bd5eb0bb15c6edcd2ae4a7e46b06bfe6c96ed0793e8936cbb09b4f6b680a3f06dace2220a1e7d8b74ab6047698871db9e python-3.13.7-amd64.exe 2a0420f7faaa33d2132b82895a8282688030e939db0225ad8abb95a47bdb87b45318f10985fc3cee271a9121441c1526caa363d7f2e4a4b18b1a674068766e87 setuptools-80.9.0-py3-none-any.whl diff --git a/scripts/pyinstaller/deps.txt b/scripts/pyinstaller/deps.txt index 3328c765..30dc9c19 100644 --- a/scripts/pyinstaller/deps.txt +++ b/scripts/pyinstaller/deps.txt @@ -27,7 +27,7 @@ https://support.microsoft.com/en-us/topic/microsoft-security-advisory-insecure-l see web.archive.org links below # direct links to version-frozen deps -https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.248-1/virtio-win-0.1.248.iso +https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.285-1/virtio-win-0.1.285.iso https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe https://www.python.org/ftp/python/3.7.9/python-3.7.9.exe https://web.archive.org/web/20200412130846if_/https://download.microsoft.com/download/2/D/7/2D78D0DD-2802-41F5-88D6-DC1D559F206D/Windows6.1-KB2533623-x86.msu diff --git a/scripts/pyinstaller/notes.txt b/scripts/pyinstaller/notes.txt index 6cce39d0..f6dccd6e 100644 --- a/scripts/pyinstaller/notes.txt +++ b/scripts/pyinstaller/notes.txt @@ -14,9 +14,11 @@ qemu-system-x86_64 -m 4096 -enable-kvm --machine q35 -cpu host -smp 4 -usb -devi ## ============================================================ ## first-time setup in a stock win7x32sp1 and/or win10x64 vm: -## +## -grab & install from ftp2host: Git-2.45.2-32-bit.exe +grab & install from ftp2host: + win7: Git-2.46.2-32-bit.exe + win10: Git-*-64-bit.exe ...and do this on the host so you can grab these notes too: unix2dos <~/dev/copyparty/scripts/pyinstaller/notes.txt >~/dev/pyi/notes.txt @@ -30,7 +32,7 @@ fns=( altgraph-0.17.4-py2.py3-none-any.whl pefile-2023.2.7-py3-none-any.whl pywin32_ctypes-0.2.3-py3-none-any.whl - upx-5.0.1-win32.zip + upx-5.0.2-win32.zip ) [ $w10 ] && fns+=( jinja2-3.1.6-py3-none-any.whl @@ -38,8 +40,8 @@ fns=( mutagen-1.47.0-py3-none-any.whl packaging-25.0-py3-none-any.whl pillow-11.3.0-cp313-cp313-win_amd64.whl - pyinstaller-6.14.1-py3-none-win_amd64.whl - pyinstaller_hooks_contrib-2025.5-py3-none-any.whl + pyinstaller-6.15.0-py3-none-win_amd64.whl + pyinstaller_hooks_contrib-2025.8-py3-none-any.whl python-3.13.7-amd64.exe setuptools-80.9.0-py3-none-any.whl ) @@ -124,13 +126,13 @@ note: if you keep accidentally killing the vm with alt-f4 then remove "-device u rm -f win7-x32.qcow2 qemu-img create -f qcow2 win7-x32.qcow2 64g qemu-system-x86_64 -m 4096 -enable-kvm --machine q35 -cpu host -smp 4 -usb -device usb-tablet -net bridge,br=virhost0 -net nic,model=e1000e -drive file=win7-x32.qcow2,discard=unmap,detect-zeroes=unmap \ - -cdrom ~/iso/win7-X17-59183-english-32bit-professional.iso + -cdrom ~/iso/~/iso/en_windows_7_professional_with_sp1_x86_dvd_u_677056.iso # win10: use virtio hdd and net (viostor+netkvm), but do NOT use qxl graphics (kills mouse cursor) rm -f win10-e2021.qcow2 qemu-img create -f qcow2 win10-e2021.qcow2 64g qemu-system-x86_64 -m 4096 -enable-kvm --machine q35 -cpu host -smp 4 -usb -device usb-tablet -net bridge,br=virhost0 -net nic,model=virtio -drive file=win10-e2021.qcow2,if=virtio,discard=unmap \ - -drive file=$HOME/iso/virtio-win-0.1.248.iso,media=cdrom -cdrom $HOME/iso/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso + -drive file=$HOME/iso/virtio-win-0.1.285.iso,media=cdrom -cdrom $HOME/iso/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso tweak stuff to your preference, but also do these steps in order: * press ctrl-alt-g so you don't accidentally alt-f4 the vm @@ -148,7 +150,7 @@ tweak stuff to your preference, but also do these steps in order: * WIN7-ONLY: connect to ftp, download 4g.nul to desktop, then delete it (poor man's fstrim...) and finally take snapshots of the VMs by copypasting this stuff into your shell: -vmsnap() { zstd --long=31 -vT0 -19 <$1 >$1.$2; }; +vmsnap() { zstd --long=31 -vT0 -19 -o $1.$2 $1; }; vmsnap win7-x32.qcow2 snap1 vmsnap win10-e2021.qcow2 snap1