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 debian build path #1331

Merged
merged 7 commits into from Jan 24, 2023
Merged

Fix debian build path #1331

merged 7 commits into from Jan 24, 2023

Conversation

leoleoasd
Copy link
Contributor

@leoleoasd leoleoasd commented Jan 22, 2023

Fixes #1329

  • cargo fmt has been run
  • cargo clippy has been run
  • cargo test has been run and passes
  • book chapter included (if relevant)
  • design document included (if relevant)

@Firstyear
Copy link
Member

I'll leave it to @yaleman to review as they are the debian build person, but also add yourself to contributors.md :)

@leoleoasd
Copy link
Contributor Author

https://manpages.debian.org/testing/debhelper/dh_usrlocal.1.en.html
https://unix.stackexchange.com/questions/409800/dh-usrlocal-is-not-a-directory

It seems that it isn't standard to put files under /usr/local. Should we override it or put the binaries under /usr/sbin?

@yaleman
Copy link
Member

yaleman commented Jan 23, 2023

Can you please provide an authoritative link to the Debian policy on that? I am pretty burnt by trying to follow their packaging stuff, which is a nightmare of vague or conflicting information.

@leoleoasd
Copy link
Contributor Author

@leoleoasd
Copy link
Contributor Author

Does it seem that /usr/local is only for applications that aren't installed from the system package manager (like manually built and locally installed)?

@yaleman
Copy link
Member

yaleman commented Jan 23, 2023

Thanks for that, I guess it's better to replace /usr/local with /usr in the scripts?

@leoleoasd
Copy link
Contributor Author

then the systemd service should be updated as well. Are they used anywhere else?

@leoleoasd
Copy link
Contributor Author

Is the systemd service file under examples directory meant to be referenced by users who manually build this? I copied them to platform/debian and updated paths.

@leoleoasd
Copy link
Contributor Author

forgot to push this one. @yaleman can you approve actions again?

@yaleman
Copy link
Member

yaleman commented Jan 24, 2023

platform/debian/pam-config-kanidm is used in the simple_pkg.sh script, so that'll need updating, and I'm not sure if just putting it into the package dir includes it into the OS PAM config somehow? (Also, that'll need testing, because ... automagically enabling PAM is risky)

@leoleoasd
Copy link
Contributor Author

leoleoasd commented Jan 24, 2023

it won't be automatically emabled. you need to run pam-auth-update and select kanidm

@leoleoasd
Copy link
Contributor Author

image

@leoleoasd
Copy link
Contributor Author

Putting it into package dir will make it installed by https://man7.org/linux/man-pages/man1/dh_installpam.1.html

@yaleman
Copy link
Member

yaleman commented Jan 24, 2023

Very cool, thanks for the context! 😄

@leoleoasd
Copy link
Contributor Author

leoleoasd commented Jan 24, 2023

I made a few more modifications:

  1. Merged kanidm-ssh and kanidm-unixd, as discussed here
  2. Updated CI scripts so now it will build debs for ubuntu and debian
  3. add bash in makefiles when invoking .sh files to make it work with lower version of make (used in ubuntu 18.04)
  4. deleted jetli/wasm-pack-action, since it doesn't support running inside containers and wasm-pack will be run in later make debs/xxx anyway.
  5. move actions/download-artifact to a new job that runs after build on all platforms to upload all debs to releases.
  6. add DEBIAN_FRONTEND: noninteractive so tzdata won't ask for TZ and hangs the CI buildflow.

@leoleoasd
Copy link
Contributor Author

Rebased on upstream/master and removed useless CI debug commits.

@Firstyear
Copy link
Member

This looks fantastic, thank you very much @leoleoasd

@yaleman yaleman merged commit 251feac into kanidm:master Jan 24, 2023
@yaleman
Copy link
Member

yaleman commented Jan 24, 2023

Thanks @leoleoasd 🥳

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.

Serval questions about ubuntu packaging
3 participants