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

Add DEB/RPM packaging #121

Closed
avelanarius opened this issue Nov 7, 2023 · 5 comments · Fixed by #122
Closed

Add DEB/RPM packaging #121

avelanarius opened this issue Nov 7, 2023 · 5 comments · Fixed by #122
Assignees
Milestone

Comments

@avelanarius
Copy link

The project should produce a DEB/RPM package that can be installed. The package should be similar to the one in https://github.com/scylladb/cpp-driver.

@avelanarius avelanarius self-assigned this Nov 7, 2023
@avelanarius avelanarius added this to the 0.1 milestone Nov 7, 2023
@syuu1228
Copy link
Contributor

@avelanarius Hi, I'm trying to get cpp-rust-driver able to build rpm/deb since I assigned to scylladb/scylla-pkg#3714, but it seems to RPM tools for Rust requires register your rust package at crates.io.
(reference: https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_rust_crates)

Could you publish the package to the site?

@syuu1228
Copy link
Contributor

Seems like deb package is same, it also tries to generate package from crates.io:
https://github.com/ahdinosaur/debcargo

@Lorak-mmk
Copy link
Collaborator

Lorak-mmk commented Mar 18, 2024

I don't think we should be using those tools. Yes, big part of the code in this repository is written in Rust, but this is a C++ library, not a Rust library. It produces a shared library (.so) and should be packaged like a C++-library.
It is not intended to be used by Rust code, and so it doesn't make any sense to put it on crates.io.

You can take inspiration in the packaging of original cpp-driver: https://github.com/scylladb/cpp-driver/tree/master/packaging

@syuu1228
Copy link
Contributor

I don't think we should be using those tools. Yes, big part of the code in this repository is written in Rust, but this is a C++ library, not a Rust library. It produces a shared library (.so) and should be packaged like a C++-library. It is not intended to be used by Rust code, and so it doesn't make any sense to put it on crates.io.

You can take inspiration in the packaging of original cpp-driver: https://github.com/scylladb/cpp-driver/tree/master/packaging

Okay.
But after I did investigation how to build the shared library on this repository, it is actually built by Cargo, CMake is just invoking Cargo command.
In this case we actually need to implement the rpm package as Rust based package.
I initially tried to follow Rust packaging guideline on Fedora.
But I found that it's difficult, since many dependencies on Rust are not available on Fedora repository, and if we follow the guideline we have to implement rpm for all of them.

So I decided not to follow the guideline, and found a way to apply Rust build paramaters from rpm macro to my custom .spec file.
Now it's working, I able to produce Rocky 8, Fedora 39-41 rpms.
Working repo is here:
https://github.com/syuu1228/cpp-rust-driver/tree/rpm_deb_packaging_work
I will send PR after I implemented deb packaging.

BTW, I have question.
I did not needed C++ code (src/, examples/, tests/) to build a shared library, do we really using these codes?
Maybe still using for testcases?

@roydahan
Copy link
Collaborator

roydahan commented Apr 3, 2024

BTW, I have question.
I did not needed C++ code (src/, examples/, tests/) to build a shared library, do we really using these codes?
Maybe still using for testcases?

@avelanarius ?

syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Apr 16, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Apr 16, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 2, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 2, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 2, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
@roydahan roydahan assigned syuu1228 and unassigned avelanarius May 8, 2024
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 15, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 15, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 20, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 22, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 28, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 28, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 28, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 28, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 28, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 28, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 31, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue May 31, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Jun 1, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Jun 1, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Jun 3, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Jun 7, 2024
Add build_rpm.sh and build_deb.sh build scripts to produce rpm & deb package.

closes scylladb/scylla-pkg#3714
closes scylladb#121

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
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 a pull request may close this issue.

4 participants