Troubadour can you please write an Apparmor profile for cpfp.py by time it becomes default in Whonix 10?
Itâs in the pipeline, but there is some updates to the AppArmor wiki first. Have you installed the profiles from the testers repository?
@troubadour Yes Iâm running the profiles from the whonix-developers repo and they are working great. Thanks.
Looking into linters today⌠Especially those with a pretty free web interface and such.
Whatâs your opinion on
- https://landscape.io/github/adrelanos/control-port-filter-python
-
https://landscape.io/github/adrelanos/control-port-filter-python/1/messages/smell
?
Useful or not so much? I think we should not become slaves of security irrelevant advice by (eventually broken, biased) static code analysis utilities. Maybe itâs good enough consider its opinions when getting close to releases.
[hr]
Know pylint?
sudo apt-get install pylint
pylint usr/lib/cpfp.py
[quote=âPatrick, post:104, topic:533â]Looking into linters today⌠Especially those with a pretty free web interface and such.
Whatâs your opinion on
- https://landscape.io/github/adrelanos/control-port-filter-python
- https://landscape.io/github/adrelanos/control-port-filter-python/1/messages/smell
?
Useful or not so much? I think we should not become slaves of security irrelevant advice by (eventually broken, biased) static code analysis utilities. Maybe itâs good enough consider its opinions when getting close to releases.[/quote]
Yes, weâll try to comply, eventually. For the overall bad score, see below.
Know pylint?sudo apt-get install pylint
pylint usr/lib/cpfp.py
I did not know pylint. The negative note was mostly explained by the indentation. At the time, I had read some recommendations to use two spaces indentation, and my tools were probably not properly set. Now Iâm using four spaces, no tab, and Kate and Eric (the Python IDE I use, not the best, but itâs available from Debian) are speaking the same language. Good for them.

Can you please rename:
usr/bin/controlportfilt
man/controlportfilt.8.ronn
âcontrolportfiltâ to âcpfpyâ or so?
I guess we donât need those files anyhow. Once systemd unit file has been created, /usr/lib/cpfp.py can be started by systemd.
Merged.
[hr]
Small git hint: This is how I easily audit the diff when file names were changed.
(Otherwise itâs telling the diff viewer to diff against /dev/null twice, which isnât helpful.)
Added to Whonix source code folder:
https://github.com/Whonix/Whonix/commit/2d55352787ccea7e9c7ea7458b34509833b661f2
Wanted to polish this for release of Whonix 10. Added quite some commits.
Now I need your help. When running âusr/lib/control-port-filter-python/cpfp.pyâ, âsudo usr/lib/control-port-filter-python/cpfp.pyâ or âsudo -u debian-tor usr/lib/control-port-filter-python/cpfp.pyâ it doesnât show any output and exits 0. It doesnât print anything below line âserver = SocketServer.TCPServer((IP, PORT), TCPHandler)â.
The error is probably quite a simple one. Missing dependencies. They are not yet added to the package. What debian packages need to be added to be able to run cpfp.py? We must have discussed this before, but I am not finding it anymore.
No missing dependencies. The only difference from the original script is the log file. So, letâs start from that. When changing back to âcontrolportfilt.logâ, it works. The only difference then is the log file ownership. Back to âcontrol-port-filter-python.logâ, chownâd it to debian-tor and it works, on its own as well as when restarting the service .
I have no logical explanation, because it should not matter, when the daemon is run on its own.
My mistake. Itâs working fine.
Manually starting it also works.
install control-port-filter-python https://github.com/Whonix/control-port-filter-python replacement that has been written by @troubadoour troubadoour (troubadour) ¡ GitHub rather than control-port-filter https://github.com/Whonix/control-port-filter (bash), done:
install control-port-filter-python https://github.com/Whonix/control-⌠¡ Whonix/anon-meta-packages@0a5fb6d ¡ GitHub
So next developers-only and/or testers-only version and Whonix 10 comes with cpfpy.
minor:
To hopefully allow smooth upgrades:
debian/control: added âPre-Depends: torâ so user and group âdebian-torâ exist:
https://github.com/Whonix/control-port-filter-python/commit/8b47bc0f323ca836797223d0480b65fe2a5182ce
debian/control: added âUploaders: Patrick Schleizer adrelanos@riseup.netâ to fix lintian warnings âW: control-port-filter-python source: changelog-should-mention-nmuâ and âW: control-port-filter-python source: source-nmu-has-incorrect-version-number 3:0.3-1â:
https://github.com/Whonix/control-port-filter-python/commit/164812a565dfe3baa18ccf3f4c49895b368d39f3
update for control-port-filter-python check:
https://github.com/Whonix/whonixcheck/commit/cb0d1e8b4af392c8d1dedb51263f2944b8d24467
init script: fixed âsudo service control-port-filter-python statusâ:
https://github.com/Whonix/control-port-filter-python/commit/22270c574210c67329b60ea3381e9a364e379212
bumped debian/compat version from 8 to 9:
https://github.com/Whonix/control-port-filter-python/commit/ceda2b02da46fd899a3200f057593c356f701339