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

package up rust for fedora #1163

Closed
dankamongmen opened this issue Dec 1, 2020 · 26 comments
Closed

package up rust for fedora #1163

dankamongmen opened this issue Dec 1, 2020 · 26 comments
Assignees
Labels
packaging schlepping up distro packages
Milestone

Comments

@dankamongmen
Copy link
Owner

With the successful completion of #355, we'll have our Rust bindings available in Debian. It would be a fine thing to get in Fedora as well. There, I don't believe I'll need go through any regulatory layer; we just need ensure we have our deps available, and if not, package them up ourselves. Those will require a review, so we might as well start this process up early. Fedora 34 is scheduled to be branched 2021-02-09.

@dankamongmen dankamongmen added rust packaging schlepping up distro packages labels Dec 1, 2020
@dankamongmen dankamongmen self-assigned this Dec 1, 2020
@dankamongmen
Copy link
Owner Author

Looks like we need package up cty here, as well:

Error: 
 Problem: nothing provides requested (crate(cty/default) >= 0.2.1 with crate(cty/default) < 0.3.0)

other than that, i was able to use rust2rpm libnotcurses-sys and get a pretty decent-looking specfile.

@dankamongmen
Copy link
Owner Author

I should go ahead and package up rust-cty for Fedora, although I'll need find someone to do a review swap with.

@dankamongmen
Copy link
Owner Author

I've packaged up serial_test_derive:

[localhost](0) $ ls -l /var/lib/mock/fedora-rawhide-x86_64/result/
total 268
-rw-rw-r--. 1 dank mock  34730 2020-12-08 09:16 build.log
-rw-rw-r--. 1 dank mock   2080 2020-12-08 09:14 hw_info.log
-rw-rw-r--. 1 dank mock  18826 2020-12-08 09:15 installed_pkgs.log
-rw-rw-r--. 1 dank mock 172139 2020-12-08 09:16 root.log
-rw-rw-r--. 1 dank mock  11801 2020-12-08 09:16 rust-serial_test_derive-0.5.1-1.fc34.src.rpm
-rw-rw-r--. 1 dank mock   7069 2020-12-08 09:16 rust-serial_test_derive+default-devel-0.5.1-1.fc34.noarch.rpm
-rw-rw-r--. 1 dank mock  11845 2020-12-08 09:16 rust-serial_test_derive-devel-0.5.1-1.fc34.noarch.rpm
-rw-rw-r--. 1 dank mock   1020 2020-12-08 09:16 state.log
[localhost](0) $ sudo dnf localinstall /var/lib/mock/fedora-rawhide-x86_64/result/rust-serial_test_derive-devel-0.5.1-1.fc34.noarch.rpm 
Last metadata expiration check: 5:50:34 ago on Tue 08 Dec 2020 03:27:28 AM EST.
Dependencies resolved.
================================================================================
 Package                            Arch    Version         Repository     Size
================================================================================
Installing:
 rust-serial_test_derive-devel      noarch  0.5.1-1.fc34    @commandline   12 k
Installing dependencies:
 rust-proc-macro2+default-devel     noarch  1.0.24-1.fc34   rawhide       9.8 k
 rust-proc-macro2+proc-macro-devel  noarch  1.0.24-1.fc34   rawhide       9.8 k
 rust-proc-macro2-devel             noarch  1.0.24-1.fc34   rawhide        44 k
 rust-quote+default-devel           noarch  1.0.7-2.fc33    rawhide       8.7 k
 rust-quote+proc-macro-devel        noarch  1.0.7-2.fc33    rawhide       8.8 k
 rust-quote-devel                   noarch  1.0.7-2.fc33    rawhide        35 k
 rust-syn+clone-impls-devel         noarch  1.0.53-1.fc34   rawhide        12 k
 rust-syn+default-devel             noarch  1.0.53-1.fc34   rawhide        12 k
 rust-syn+derive-devel              noarch  1.0.53-1.fc34   rawhide        12 k
 rust-syn+full-devel                noarch  1.0.53-1.fc34   rawhide        11 k
 rust-syn+parsing-devel             noarch  1.0.53-1.fc34   rawhide        12 k
 rust-syn+printing-devel            noarch  1.0.53-1.fc34   rawhide        12 k
 rust-syn+proc-macro-devel          noarch  1.0.53-1.fc34   rawhide        12 k
 rust-syn-devel                     noarch  1.0.53-1.fc34   rawhide       197 k
 rust-unicode-xid+default-devel     noarch  0.2.1-2.fc33    rawhide       8.1 k
 rust-unicode-xid-devel             noarch  0.2.1-2.fc33    rawhide        22 k

Transaction Summary
================================================================================

@dankamongmen
Copy link
Owner Author

I've created all four necessary specfiles: rust-cty, rust-serial_test_derive, rust-serial_test, and rust-libnotcurses_sys.

Now to submit these...

@dankamongmen
Copy link
Owner Author

@dankamongmen
Copy link
Owner Author

i've asked @dcantrell if he has anyone to recommend for reviewing this stack

@dankamongmen
Copy link
Owner Author

serial-test and serial-test-derive are in.

@dankamongmen
Copy link
Owner Author

rust-cty is approved and about to go in! that's the last necessary dep. https://bugzilla.redhat.com/show_bug.cgi?id=1907014

@dankamongmen
Copy link
Owner Author

https://pagure.io/releng/fedora-scm-requests/issue/31962 requests the home for rust-cty

@dankamongmen
Copy link
Owner Author

We got feedback on https://bugzilla.redhat.com/show_bug.cgi?id=1907017, which I will address. Hopefully my module request for rust-cty gets approved today, in which case I can upload that, and then we'll be ready to roll once rust-libnotcurses-sys gets approved.

@dankamongmen
Copy link
Owner Author

It appears that we need a license file in the crate source itself. @joseluis , do you know whether we can do a symlink and have it work with cargo? Eh, shit in a hat, let's just copy the file; the two aren't really bound by anything (I know @joseluis mentioned relicensing to MIT+Apache2).

@dankamongmen
Copy link
Owner Author

I've just uploaded rust-cty 0.2.1 to Fedora Rawhide Core. =]

@dankamongmen
Copy link
Owner Author

https://bugzilla.redhat.com/show_bug.cgi?id=1907017 has been updated to point at fresh 2.1.8 materia, including the all-important LICENSE. Hopefully it gets approved. I uploaded rust-cty for f33; it doesn't look like it'll make it into f32, fair enough.

@WSLUser
Copy link

WSLUser commented Feb 4, 2021

Once in Fedora, do you think you can cross add to CentOS 7.9 or is that too old to be supported? Also would it be likely to even be accepted?

@dcantrell
Copy link
Contributor

You can't add it to CentOS 7.9, but you can add it to EPEL-7. EPEL branches live in the Fedora package repos, so all you need to do is request that branch in the notcurses repo and build it there.

@dankamongmen
Copy link
Owner Author

@WSLUser I never interact directly with CentOS. So far as I'm aware, CentOS forks off from RHEL (until it dies at the end of this year). I've tried adding Notcurses to EPEL before, but have had little success, due to an ancient CMake. I've got an open bug on it at #851.

Last I looked into it, there would be a newer CMake sometime this year, at which point it ought be straightforward. I even looked into supporting older CMake, but it was a pretty significant loss of functionality, and the only thing worse than spending time writing CMake is spending time backporting to older CMake.

@dankamongmen
Copy link
Owner Author

aaaaaaaand we are GO! requesting git module now

[dank@localhost fedpkg]$ fedpkg request-repo rust-libnotcurses-sys 1907017
https://pagure.io/releng/fedora-scm-requests/issue/32031
[dank@localhost fedpkg]$

who here thinks they already know the work of maya angelou?!?!

@dankamongmen dankamongmen added this to the 2.2.0 milestone Feb 5, 2021
@dankamongmen
Copy link
Owner Author

Also, I got the branch made for rust-cty in f32, so rust-libnotcurses-sys ought be going there, also. OK! w00t!

@dankamongmen
Copy link
Owner Author

@WSLUser I never interact directly with CentOS. So far as I'm aware, CentOS forks off from RHEL (until it dies at the end of this year). I've tried adding Notcurses to EPEL before, but have had little success, due to an ancient CMake. I've got an open bug on it at #851.

Last I looked into it, there would be a newer CMake sometime this year, at which point it ought be straightforward. I even looked into supporting older CMake, but it was a pretty significant loss of functionality, and the only thing worse than spending time writing CMake is spending time backporting to older CMake.

Huh, according to https://bugzilla.redhat.com/show_bug.cgi?id=1756974, while EPEL8 indeed lacks a modern cmake, EPEL7 has 3.18? how does that work? anyway, let me request a epel-7 branch and see what's good.

@WSLUser
Copy link

WSLUser commented Feb 5, 2021

Probably because CentOS 8 is becoming abandoned since that is going EOL this year while CentOS 7 still has 3 years to go.

@dankamongmen
Copy link
Owner Author

Probably because CentOS 8 is becoming abandoned since that is going EOL this year while CentOS 7 still has 3 years to go.

probably? that epel7 would have newer packages than epel8 was not something i had considered, to my discredit. i expect to have notcurses in epel7 shortly after being granted the branch. it would have been there months ago. [shakes fist at sky]

@dankamongmen
Copy link
Owner Author

it seems the Fedora Project took a personal day, but hopefully we'll get our modules and branches monday.

@dankamongmen dankamongmen modified the milestones: 2.2.0, 2.3.0 Feb 8, 2021
@dankamongmen
Copy link
Owner Author

we got our module! building now. getting BuildError: package rust-libnotcurses-sys not in list for tag f34-updates-candidate but we'll hopefully figure that out shortly.

@dankamongmen
Copy link
Owner Author

We successfully build an x86_64 package, but most other architectures fail; see #1339. I'm going to go ahead and close this bug as a success since all the procedural work is done.

@dankamongmen dankamongmen modified the milestones: 3.0.0, 2.3.0 Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging schlepping up distro packages
Projects
None yet
Development

No branches or pull requests

3 participants