Size difference Pritunl v1.30 to v1.32

We are updating our machine and noticed that in the new version of Pritunl, it is consuming much more space. Comparing in the Pritunl server version 1.30.3157.70, the directory /usr/lib/pritunl is 515MB, whereas in the newer version v1.32.3732.84, this same directory is 1.8GB. Is this correct?

pritunl v1.32.3732.84:

[ec2-user@ip-10-0-1-36 lib]$ sudo du -hsx -- /usr/lib/pritunl/* | sort -rh | head -10
753M	/usr/lib/pritunl/usr
537M	/usr/lib/pritunl/lib64
537M	/usr/lib/pritunl/lib

pritunl v1.30.3157.70:

[ec2-user@ip-172-16-2-152 pritunl]$ sudo du -hsx -- /usr/lib/pritunl/* | sort -rh | head -10
515M	/usr/lib/pritunl/lib
272K	/usr/lib/pritunl/bin
4,0K	/usr/lib/pritunl/pip-selfcheck.json
0	/usr/lib/pritunl/lib64
0	/usr/lib/pritunl/include
1 Like

Releases starting with v1.32 are packaged with a Python 3.9 interpreter. This was done to keep Pritunl running on modern version of Python that is required by most of the libraries used.

@zach , that’s a good thing to hear!

However I have reasonable doubts about how packages are built:

#  du -h -d 2 /usr/lib/pritunl/
77M     /usr/lib/pritunl/lib64/python3.8
77M     /usr/lib/pritunl/lib64/python3.6
77M     /usr/lib/pritunl/lib64/python3.10
77M     /usr/lib/pritunl/lib64/python2.7
77M     /usr/lib/pritunl/lib64/python3.9
77M     /usr/lib/pritunl/lib64/python3.7
459M    /usr/lib/pritunl/lib64
730M    /usr/lib/pritunl/usr/lib
19M     /usr/lib/pritunl/usr/bin
32K     /usr/lib/pritunl/usr/share
1.1M    /usr/lib/pritunl/usr/include
750M    /usr/lib/pritunl/usr
77M     /usr/lib/pritunl/lib/python3.8
77M     /usr/lib/pritunl/lib/python3.6
77M     /usr/lib/pritunl/lib/python3.10
77M     /usr/lib/pritunl/lib/python2.7
77M     /usr/lib/pritunl/lib/python3.9
77M     /usr/lib/pritunl/lib/python3.7
459M    /usr/lib/pritunl/lib
1.7G    /usr/lib/pritunl/

This ^ is taken from Ubuntu 22.04.3 LTS which has Python 3.10 out of the box.

Is it possible to exclude unused modules for older Python versions out of the package?

The systemd service is not restarted after an update to avoid disruption. The certifi and googleapiclient Python libraries load files during runtime. If these files are removed the running process will stop working. These files are copied to all the locations for different versions of Python. The files could be changed to links to lower the size on disk but the package will already compress the duplicate files in the package. The script used to build the package is in the pritunl/pritunl-pacur repository.