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

Multiple issues encountered while fixing package in Debian. #28

Open
plugwash opened this issue Jun 24, 2022 · 0 comments
Open

Multiple issues encountered while fixing package in Debian. #28

plugwash opened this issue Jun 24, 2022 · 0 comments

Comments

@plugwash
Copy link

I was recently alerted to the rust-num-format package being broken in Debian, and worked through mulitple issues to get us a usable package. The full set of patches can be found at https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/num-format/debian/patches/dont-fail-build-deprecated.diff, some of them are Debian-specific (for example we remove windows-related dependencies), but others are more generally relavent, I'll describe the more generally relavent ones here.

Firstly the package outright refused to build because it uses std::mem::uninitialised feature of std and is set to deny calls to deprecated functions. I removed the deny to get the package building but ideally the package should switch to maybeuninit. https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/num-format/debian/patches/dont-fail-build-deprecated.diff

Secondly dependencies needed updating for the versions in Debian. I bumped num-bigint to 0.4 and rand to 0.8 with no changes needed beyond the version bump. I bumped itoa to version 1 and needed to remove references to the "i128" and "default" feature flags which no longer exist and no longer seem to be needed. The trickiest dependency was arrayvec, this has changed the way it's generic parameters work, involving a bunch of patching to upgrade to 0.7, a patch can be found at https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/num-format/debian/patches/dont-fail-build-deprecated.diff

Thirdly building with the with-serde, or with-system-locale features fails if the std feature is not also enabled, I made these features depend on std.

Foruthly the testsuite fails if the system happens to have locales installed (e.g. on a debian system if the locales-all package happens to be installed) that are not compatible with num-format, I modified the test to skip known-incompatible locales. https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/num-format/debian/patches/tolerate-unsupported-locales.diff

Finally as already reported in #26 the tests fail on 32-bit architectures, I'll follow up that issue over in that bug.

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

No branches or pull requests

1 participant