Skip to content

Fix packaging on *ubuntu 20.04 (more specifically python version >=3.8)#665

Merged
arsenetar merged 3 commits into
arsenetar:masterfrom
KIAaze:fix_packaging_ubu20.04
Jun 24, 2020
Merged

Fix packaging on *ubuntu 20.04 (more specifically python version >=3.8)#665
arsenetar merged 3 commits into
arsenetar:masterfrom
KIAaze:fix_packaging_ubu20.04

Conversation

@KIAaze

@KIAaze KIAaze commented May 20, 2020

Copy link
Copy Markdown
Contributor

Since the PPA did not have a package for Ubuntu 20.04, I tried creating it myself and ran into an attribute error (no platform.dist() function).

The following changes fix it and might help with issue #484.

Of course, maybe it would be better to check for the python version or use another way instead of a try/except statement. But at least try/except should be robust.

I also changed the option to dpkg-buildpackage, so it actually makes the .deb packages I wanted.

I split my changes into two commits, depending on whether or not the second change is desirable.

The package can be built using the instructions from README.md:
$ bash -c "python3 -m venv --system-site-packages env && source env/bin/activate && pip install -r requirements.txt && python3 build.py --clean && python3 package.py"

KIAaze added 2 commits May 20, 2020 23:13
platform.dist() is deprecated since python version 3.5 and was removed in version 3.8.
Added exception to use the distro package in that case, as suggested by the python documentation:
https://docs.python.org/3.7/library/platform.html?highlight=platform#module-platform
@arsenetar

Copy link
Copy Markdown
Owner
  1. Looks like for the packaging we should be moving away from platform.dist completely as this has been deprecated since 3.5. If we get equivalent output we should just change to using that. Based on the documentation it seems like that should be the case.
  2. Currently have some newly introduced flake8 issues here that need to be cleaned up.
  3. Perhaps @eugenesan could comment on the -S vs -F and if there are any versions in changing that here, I don't see an issue with this but not sure as I have not worked with the Linux packaging.

@soredake

Copy link
Copy Markdown

Any progress? 🥺

@thomasoliveira

Copy link
Copy Markdown

While this fix is not applied and if you are not used to applying the changes by hand, an alternative way to install dupeGuru is using the dupeguru_4.0.4-0~eugenesan~bionic1.tar.xz file.

If you don't install it using sudo, you can still run dupeGuru from dupeguru-4.0.4/debian/dupeguru/usr/share/dupeguru/run.py

@Baltix

Baltix commented Jun 15, 2020

Copy link
Copy Markdown

I can build and upload Ubuntu 20.04 package to https://launchpad.net/~dupeguru/+archive/ubuntu/ppa but you should include correctly formatted debian/changelog file into pkg/debian folder - there is a "def build_debian_changelog" in hscommon/build.py (see also package.py line 84).
I've created Ubuntu packaging recipe for automated builds for all supported Ubuntu releases, see https://code.launchpad.net/~dupeguru/+recipe/dupeguru-packages , but currently automated packaging recipe fails, because there are no debian/changelog file in pkg/debian folder :(
See #484 (comment) for more info

@arsenetar

arsenetar commented Jun 16, 2020

Copy link
Copy Markdown
Owner

@Baltix, if all we need is the changelog, I can create one from the existing build. The debian build as it is right now does not seem to be setup to work with a PPA (in an automated fashion). Calling package.py will create what is most likely needed for a debian package in build/dupeguru-4.0.4~unstable/. Can you confirm having the changlog in pkg/debian will work? (Most information I have seen asks for a debian folder at what appears to be root level, unless nest-part works for this.)

- Add distro as a requirement
- Use distro.id() to get the id as it is a bit cleaner than distro.linux_distribution()
@arsenetar arsenetar merged commit 7658cda into arsenetar:master Jun 24, 2020
@arsenetar

Copy link
Copy Markdown
Owner

Merging this in, additional conversation around the PPA should probably happen over at #484.

@necarnot

Copy link
Copy Markdown

Since the PPA did not have a package for Ubuntu 20.04, I tried creating it myself

Hello KIAaze,

Thank you for taking the time to fix this issue.
As I'm not skilled enough to build this pkg by myself, do you think you could find a way to provide us the .deb for 20.04 please?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants