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

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

Merged
merged 3 commits into from
Jun 24, 2020

Conversation

KIAaze
Copy link
Contributor

@KIAaze KIAaze commented May 20, 2020

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"

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
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

Any progress? 🥺

@thomasoliveira
Copy link

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
Copy link

Baltix commented Jun 15, 2020

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
Copy link
Owner

arsenetar commented Jun 16, 2020

@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
Owner

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

@necarnot
Copy link

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