Re: Look for help: how to package Rust project

2024-03-22 Thread Ivan Chavero
I have the same problem for an internal project that I'm working on. Since
some of the crates we use are not yet in Fedora we took the decision to
package them ourselves following the Rust Package Guidelines[1] and submit
them to the distribution.
This is more work but remember that if you create the package for the
crates you're using you are helping another developer and making Fedora
better :)

Cheers,
Iván


[1]https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/

El vie, 22 mar 2024 a las 10:00, Fabio Valentini ()
escribió:

> On Fri, Mar 22, 2024 at 3:26 PM Ming Lei  wrote:
> >
> > I love this easy way.
> >
> > But when I try to build in this way, I got the following failure:
> >
> >  Problem 1: nothing provides requested (crate(ilog/default) >= 1.0.1
> > with crate(ilog/default) < 2.0.0~)
> >  Problem 2: nothing provides requested (crate(libublk/default) >=
> > 0.3.0 with crate(libublk/default) < 0.4.0~)
> >  Problem 3: nothing provides requested (crate(qcow2-rs/default) >=
> > 0.1.2 with crate(qcow2-rs/default) < 0.2.0~)
> >  Problem 4: nothing provides requested (crate(shared_memory/default)
> > >= 0.12.4 with crate(shared_memory/default) < 0.13.0~)
> >  Problem 5: nothing provides requested (crate(smol/default) >= 1.3.0
> > with crate(smol/default) < 2.0.0~)
> >
> > I guess it is because that all above crate aren't packaged in Fedora,
> > can you share how to
> > deal with this issue?
>
> Yes, these error messages represent all the crate dependencies that
> cannot be resolved from Fedora repositories.
> They will need to be packaged separately if you want to submit this as
> an official package for Fedora.
> Or if you want a "quick and dirty" solution for unofficial packages,
> you can use "rust2rpm --vendor".
>
> Fabio
> --
> ___
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
> Do not reply to spam, report it:
> https://pagure.io/fedora-infrastructure/new_issue
>
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Look for help: how to package Rust project

2024-03-22 Thread Fabio Valentini
On Fri, Mar 22, 2024 at 3:26 PM Ming Lei  wrote:
>
> I love this easy way.
>
> But when I try to build in this way, I got the following failure:
>
>  Problem 1: nothing provides requested (crate(ilog/default) >= 1.0.1
> with crate(ilog/default) < 2.0.0~)
>  Problem 2: nothing provides requested (crate(libublk/default) >=
> 0.3.0 with crate(libublk/default) < 0.4.0~)
>  Problem 3: nothing provides requested (crate(qcow2-rs/default) >=
> 0.1.2 with crate(qcow2-rs/default) < 0.2.0~)
>  Problem 4: nothing provides requested (crate(shared_memory/default)
> >= 0.12.4 with crate(shared_memory/default) < 0.13.0~)
>  Problem 5: nothing provides requested (crate(smol/default) >= 1.3.0
> with crate(smol/default) < 2.0.0~)
>
> I guess it is because that all above crate aren't packaged in Fedora,
> can you share how to
> deal with this issue?

Yes, these error messages represent all the crate dependencies that
cannot be resolved from Fedora repositories.
They will need to be packaged separately if you want to submit this as
an official package for Fedora.
Or if you want a "quick and dirty" solution for unofficial packages,
you can use "rust2rpm --vendor".

Fabio
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Look for help: how to package Rust project

2024-03-22 Thread Ming Lei
On Thu, Mar 21, 2024 at 6:27 PM Fabio Valentini  wrote:
>
> On Thu, Mar 21, 2024 at 9:25 AM Richard W.M. Jones  wrote:
> >
> > On Thu, Mar 21, 2024 at 11:04:13AM +0800, Ming Lei wrote:
> > > Hello Richard and Guys,
> > >
> > > I plan to package rublk to Fedora, and it is one Rust project.
> >
> > Hi, I'm on holiday at the moment, but please do look at how we
> > packaged libblkio in Fedora:
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=2124697
> >
> > > Can you provide a little guide about how to do that? such as,
> > > where can I find the guide doc? And is it github or crates which
> > > should be used as source for Fedora packaging?
> >
> > Everything has to start with a source tarball, so normally github
> > would be the best source.
> >
> > > [1] https://github.com/ublk-org/rublk
> > > [2] https://crates.io/crates/rublk
>
> If the project is a single "crate" (i.e. one compilation unit) and
> will continue to be published on crates.io, I would recommend using
> the sources published there instead of GitHub sources. Using files
> distributed via crates.io makes packaging a bit easier and avoids some
> work that is necessary for non-crate Rust packages.
>
> I would recommend reading the Rust packaging guidelines for this case:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_rust_crates
> You should get a working spec file by just running "rust2rpm -s rublk".

Hello Fabio,

I love this easy way.

But when I try to build in this way, I got the following failure:

 Problem 1: nothing provides requested (crate(ilog/default) >= 1.0.1
with crate(ilog/default) < 2.0.0~)
 Problem 2: nothing provides requested (crate(libublk/default) >=
0.3.0 with crate(libublk/default) < 0.4.0~)
 Problem 3: nothing provides requested (crate(qcow2-rs/default) >=
0.1.2 with crate(qcow2-rs/default) < 0.2.0~)
 Problem 4: nothing provides requested (crate(shared_memory/default)
>= 0.12.4 with crate(shared_memory/default) < 0.13.0~)
 Problem 5: nothing provides requested (crate(smol/default) >= 1.3.0
with crate(smol/default) < 2.0.0~)

I guess it is because that all above crate aren't packaged in Fedora,
can you share how to
deal with this issue?

Thanks,
Ming
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Look for help: how to package Rust project

2024-03-21 Thread Fabio Valentini
On Thu, Mar 21, 2024 at 9:25 AM Richard W.M. Jones  wrote:
>
> On Thu, Mar 21, 2024 at 11:04:13AM +0800, Ming Lei wrote:
> > Hello Richard and Guys,
> >
> > I plan to package rublk to Fedora, and it is one Rust project.
>
> Hi, I'm on holiday at the moment, but please do look at how we
> packaged libblkio in Fedora:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=2124697
>
> > Can you provide a little guide about how to do that? such as,
> > where can I find the guide doc? And is it github or crates which
> > should be used as source for Fedora packaging?
>
> Everything has to start with a source tarball, so normally github
> would be the best source.
>
> > [1] https://github.com/ublk-org/rublk
> > [2] https://crates.io/crates/rublk

If the project is a single "crate" (i.e. one compilation unit) and
will continue to be published on crates.io, I would recommend using
the sources published there instead of GitHub sources. Using files
distributed via crates.io makes packaging a bit easier and avoids some
work that is necessary for non-crate Rust packages.

I would recommend reading the Rust packaging guidelines for this case:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_rust_crates
You should get a working spec file by just running "rust2rpm -s rublk".

Fabio
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Look for help: how to package Rust project

2024-03-21 Thread Richard W.M. Jones
On Thu, Mar 21, 2024 at 11:04:13AM +0800, Ming Lei wrote:
> Hello Richard and Guys,
> 
> I plan to package rublk to Fedora, and it is one Rust project.

Hi, I'm on holiday at the moment, but please do look at how we
packaged libblkio in Fedora:

https://bugzilla.redhat.com/show_bug.cgi?id=2124697

> Can you provide a little guide about how to do that? such as,
> where can I find the guide doc? And is it github or crates which
> should be used as source for Fedora packaging?

Everything has to start with a source tarball, so normally github
would be the best source.

> [1] https://github.com/ublk-org/rublk
> [2] https://crates.io/crates/rublk

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Look for help: how to package Rust project

2024-03-20 Thread Sumantro Mukherjee
On Thu, Mar 21, 2024 at 8:35 AM Ming Lei  wrote:

> Hello Richard and Guys,
>
> I plan to package rublk to Fedora, and it is one Rust project.
>
> Can you provide a little guide about how to do that? such as,
> where can I find the guide doc? And is it github or crates which
> should be used as source for Fedora packaging?
>
>
> [1] https://github.com/ublk-org/rublk
> [2] https://crates.io/crates/rublk
>
> Thanks,
>

Hey Ming,

You can find the rust packaging guideline here
https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/
Rust Packages are maintained by Rust SIG (you should join this SIG)
https://fedoraproject.org/wiki/SIGs/Rust
If you are not a packager already, you will need some blessing from someone
who is experienced, for rust,
you  may try to reach out to https://fedoraproject.org/wiki/User:Jistone
(He does a lot with rust packaging and SIG)

I hope this helps!

-- 
//sumantro
Fedora QE
TRIED AND PERSONALLY TESTED, ERGO TRUSTED 
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Look for help: how to package Rust project

2024-03-20 Thread Ming Lei
Hello Richard and Guys,

I plan to package rublk to Fedora, and it is one Rust project.

Can you provide a little guide about how to do that? such as,
where can I find the guide doc? And is it github or crates which
should be used as source for Fedora packaging?


[1] https://github.com/ublk-org/rublk
[2] https://crates.io/crates/rublk

Thanks,
--
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue