Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace stdeb with a different way to produce Debian packages #773

Closed
apyrgio opened this issue Apr 9, 2024 · 2 comments · Fixed by #901
Closed

Replace stdeb with a different way to produce Debian packages #773

apyrgio opened this issue Apr 9, 2024 · 2 comments · Fixed by #901
Assignees
Milestone

Comments

@apyrgio
Copy link
Contributor

apyrgio commented Apr 9, 2024

Dangerzone has been using stdeb since the very beginning (early 2020). At that time, stdeb was still maintained, but this is not the case anymore. It hasn't seen a new release since October 2020 (see the PyPI releases page). Also, it seems to not work with Python 3.12, since it throws this error:

Traceback (most recent call last):
  File "/root/project/setup.py", line 34, in <module>
    setuptools.setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/stdeb/command/sdist_dsc.py", line 30, in run
    debinfo = self.get_debinfo()
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/command/common.py", line 197, in get_debinfo
    debinfo = DebianInfo(
              ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/stdeb/util.py", line 802, in __init__
    check_cfg_files(cfg_files, module_name)
  File "/usr/lib/python3/dist-packages/stdeb/util.py", line 733, in check_cfg_files
    cfg = ConfigParser.SafeConfigParser()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

The reason for the above error is that Python 3.12 has removed the long deprecated SafeConfigParser class: python/cpython#89336.

Now that we have a good reason to switch .deb builders, we should strongly consider pybuild, which is also used by SecureDrop.

apyrgio added a commit that referenced this issue Apr 17, 2024
Extend our CircleCI jobs to run CI tests in Ubuntu Noble.

This commit also adds support for building the Dangerzone .deb package
in Ubuntu Noble, but does not actually enable it. The reason is that
stdeb, which produces our Debian packages, does not work with Python
3.12, which ships with Ubuntu Noble

Refs #773
apyrgio added a commit that referenced this issue Apr 22, 2024
Extend our CircleCI jobs to run CI tests in Ubuntu Noble.

This commit also adds support for building the Dangerzone .deb package
in Ubuntu Noble, but does not actually enable it. The reason is that
stdeb, which produces our Debian packages, does not work with Python
3.12, which ships with Ubuntu Noble

Refs #773
apyrgio added a commit that referenced this issue Apr 23, 2024
Extend our CircleCI jobs to run CI tests in Ubuntu Noble.

This commit also adds support for building the Dangerzone .deb package
in Ubuntu Noble, but does not actually enable it. The reason is that
stdeb, which produces our Debian packages, does not work with Python
3.12, which ships with Ubuntu Noble

Refs #773
@apyrgio apyrgio mentioned this issue Apr 23, 2024
59 tasks
apyrgio added a commit that referenced this issue Apr 24, 2024
Bump our poetry.lock file, to get the latest versions of our
dependencies. Note that we are aware that this bump does not bring in
the latest PySide6 version.

Refs #773
apyrgio added a commit that referenced this issue Apr 24, 2024
Bump our poetry.lock file, to get the latest versions of our
dependencies. Note that we are aware that this bump does not bring in
the latest PySide6 version.

Refs #773
apyrgio added a commit that referenced this issue Apr 24, 2024
Bump our poetry.lock file, to get the latest versions of our
dependencies. Note that we are aware that this bump does not bring in
the latest PySide6 version.

Refs #773
apyrgio added a commit that referenced this issue Apr 24, 2024
Bump our poetry.lock file, to get the latest versions of our
dependencies. Note that we are aware that this bump does not bring in
the latest PySide6 version.

Refs #773
apyrgio added a commit that referenced this issue Apr 25, 2024
Bump our poetry.lock file, to get the latest versions of our
dependencies. Note that we are aware that this bump does not bring in
the latest PySide6 version.

Refs #773
@apyrgio
Copy link
Contributor Author

apyrgio commented Jul 8, 2024

apyrgio added a commit that referenced this issue Jul 8, 2024
Disable building packages in Debian Trixie, since it's Python version
has changed to 3.12, which is not compatible with `stdeb`.

Refs #773
@apyrgio apyrgio added this to the 0.8.0 milestone Aug 20, 2024
legoktm added a commit that referenced this issue Aug 20, 2024
@legoktm
Copy link
Member

legoktm commented Aug 27, 2024

I would suggest doing kinda what I outlined in #323 (comment), run python3 setup.py --command-packages=stdeb.command sdist_dsc as a one-time thing, commit the generated debian/, and then build the package using the standard dpkg-buildpackage tools. From then on, changes can be made to the debian files instead of going through stdeb.

Now that we have a good reason to switch .deb builders, we should strongly consider pybuild, which is also used by SecureDrop.

SecureDrop doesn't really use pybuild in any important way, we build our own virtualenv and ship that. But using pybuild is probably the right thing for Dangerzone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants