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

Debian package #730

Merged
merged 2 commits into from
Jul 10, 2023
Merged

Debian package #730

merged 2 commits into from
Jul 10, 2023

Conversation

sharkAndshark
Copy link
Collaborator

Add deb package by cargo-deb

  • add deb package metadata
  • more research on systemd integration

To inspect the package:

# install cargo-deb dependices
sudo apt install dpkg
sudo apt install dpkg-dev
sudo apt install liblzma-dev

cargo install cargo-deb
cd martin
cargo deb
The Debian package will be created in `target/debian/martin_0.8.7_amd64.deb` . 

To decompress this package:

dpkg -x martin_0.8.7_amd64.deb path_of_decompress  

@nyurik
Copy link
Member

nyurik commented Jun 28, 2023

i'm all for adding .deb support, thx!

A few things:

  • do we really need to set up readme param? Per docs, readme param is already pointing to the readme file by default.
  • does [package.metadata.deb] need to duplicate maintainer text, or can it simply reuse the main one?
  • please add any needed targets to the jsonfile, probably similar to other ones that do a check first. Note that dependencies should be tested first, to avoid sudo without needing to do that.

@sharkAndshark
Copy link
Collaborator Author

sharkAndshark commented Jul 3, 2023

Hi @nyurik Maybe we could keep these params?

readme issue

Without readme param, the content of readme in the decompressed package would be:

../README.md

maintainer parame

Without maintainer in [package.metadata.deb], there would be only one author based on the cargo-deb doc.
apt-cache show martin after dpkg -i without maintainer in [package.metadata.deb]

Package: martin
Status: install ok installed
Priority: optional
Installed-Size: 14998
Maintainer: Stepan Kuzmin <to.stepan.kuzmin@gmail.com>
......

apt-cache show martin after dpkg -i with maintainer in in [package.metadata.deb]

Package: martin
Status: install ok installed
Priority: optional
Installed-Size: 14998
Maintainer: Stepan Kuzmin <to.stepan.kuzmin@gmail.com>, Yuri Astrakhan <YuriAstrakhan@gmail.com>, MapLibre contributors
......

CI

You mentioned adding any necessary targets to the jsonfile, but I didn't find any such file in the repository. Did you mean to suggest updating the CI workflow to include publishing a deb package?

@nyurik
Copy link
Member

nyurik commented Jul 3, 2023

@sharkAndshark I meant this file. Thx for explaining about the fields.

@sharkAndshark
Copy link
Collaborator Author

Hi @nyurik :)
By now, we could generate debian package in CI.yml or jsut debian-package.
But I think there are still some chaos in the code . Would you mind give some guide?

@sharkAndshark sharkAndshark marked this pull request as ready for review July 7, 2023 04:46
Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks really good, I think we are almost there, left a few comments

justfile Outdated Show resolved Hide resolved
justfile Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@sharkAndshark sharkAndshark marked this pull request as draft July 10, 2023 02:00
Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there, a few tiny auto-fixes, and we can merge :)

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@nyurik nyurik enabled auto-merge (squash) July 10, 2023 18:02
@nyurik nyurik merged commit e1f7436 into maplibre:main Jul 10, 2023
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.

2 participants