21 Apr 2024 |
Ward | Following works
### How to test
1. Install poetry as root (curl -sSL https://install.python-poetry.org | sudo python3 -)
2. git clone https://github.com/WardPearce/smart-ipv6-rotator
3. cd smart-ipv6-rotator
4. sudo /root/.local/bin/poetry shell
5. sudo smart-ipv6-rotator run --my-ipv6-range 2407:7000:9827:4100::/64 --service google
| 13:12:03 |
Samantaz Fox | urg, is that curl | sudo python from the official docs? | 13:24:44 |
Samantaz Fox | I wouldn't be surprised, btw. rust and a bunch of others do that too | 13:26:41 |
Ward | In reply to @samantazfox:pussthecat.org urg, is that curl | sudo python from the official docs? nah, added that otherwise poetry isn't installed for root | 13:29:25 |
Samantaz Fox | can't it be installed from a package manager or alike? | 13:30:17 |
Ward | supports pipx | 13:30:53 |
unixfox | there is actually no need to use pip, the two dependencies can be installed from the OS packaging system | 13:35:12 |
TheFrenchGhosty | Don't use pip / poetry, just pipx | 13:36:53 |
TheFrenchGhosty | (or use the docker image) | 13:37:44 |
unixfox | last time someone tried, the docker image does not work. | 13:38:20 |
TheFrenchGhosty | In reply to @unixfox:matrix.org last time someone tried, the docker image does not work. Ah | 13:38:42 |
Ward | i think using poetry would be "best practice" for the docker file & for general install to avoid MITM attacks & malicious packages from being install | 13:53:33 |
Ward | i think adding support for requirements.txt too, for people who dont want to deal with poetry is fine | 13:53:49 |
unixfox | really requirements.txt is just there for the few distrib that do not have those two very popular libraries:
pyroute2
requests
hardly anybody will ever install the libraries using pip or poetry | 13:55:48 |
Ward | yea my PR adds extra requirements like click & tinydb tho | 13:57:13 |
unixfox | ha I haven't that! | 13:58:23 |
unixfox | will send my review then | 13:58:32 |
TheFrenchGhosty | In reply to @wardpearce:matrix.org i think using poetry would be "best practice" for the docker file & for general install to avoid MITM attacks & malicious packages from being install Poetry is non-standard + curl-ing a script then executing it is absolutely disgusting | 14:04:05 |
Ward | yea that is true, maybe via the docker file install poetry via pipx | 14:04:46 |
TheFrenchGhosty | pip/pipx exist for a reason | 14:04:49 |
TheFrenchGhosty | If you want to really make the script better, you should just make it work with a `pipx install git+` (or compile to a binary) | 14:05:48 |
TheFrenchGhosty | * If you want to really make the script better, you should just make it work with a `pipx install git+<URL>` (or even better: compile to a binary) | 14:06:55 |
Samantaz Fox | Ward the code is super clean btw ^^ | 14:08:56 |
Ward | In reply to @samantazfox:pussthecat.org Ward the code is super clean btw ^^ thank u 💌 | 14:09:08 |
Ward | In reply to @thefrenchghosty:pussthecat.org If you want to really make the script better, you should just make it work with a `pipx install git+<URL>` (or even better: compile to a binary) yea agreed, installation should be improved | 14:09:43 |
unixfox | In reply to @samantazfox:pussthecat.org Ward the code is super clean btw ^^ true!!! | 14:10:12 |
Samantaz Fox | absidue you're on a rampage today or what x) 4 PRs in one day lol | 14:11:08 |
TheFrenchGhosty | In reply to @thefrenchghosty:pussthecat.org If you want to really make the script better, you should just make it work with a `pipx install git+<URL>` (or even better: compile to a binary) Ward: I hope you don't take it the wrong way by the way | 14:14:08 |
TheFrenchGhosty | it's just that basically no one other than unixfox works on the script, so it should be as simple as possible, I'm absolutely against poetry | 14:14:41 |
TheFrenchGhosty | * it's just that basically no one other than unixfox works on the script, so it should be as simple as possible + use good practices I'm absolutely against poetry | 14:14:52 |