wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

Enable rpm package autobuilds on Fedora Copr

Open lsm5 opened this issue 3 years ago • 4 comments
trafficstars

This commit adds .copr/Makefile and .copr/wasmtime.spec.in which combined with a webhook will trigger rpm package builds on Fedora's Copr environment after every upstream PR merge.

Successful copr build needs to ensure a successful:

make -f .copr/Makefile srpm outdir=FOO

The resulting rpm package epoch:name-version-release will have the format: 101:wasmtime-0.0-$(BUILD_TIMESTAMP).$(GIT_SHORTCOMMIT).$(DIST)

  • Epoch is set to 101 to override any distro-supplied wasmtime packages, regardless of version.
  • Version is set to 0.0 to reflect unreleased version.
  • The $(DIST) tag will be the output of rpm --eval %{?dist}. So, Fedora 36 will have .fc36, rhel9 will have .el9 and so on.

Fixes: #4570

Signed-off-by: Lokesh Mandvekar [email protected]

Please ensure that the following steps are all taken care of before submitting the PR.

  • [x] This has been discussed in issue #4570 , or if not, please tell us why here.
  • [x] A short description of what this does, why it is needed; if the description becomes long, the matter should probably be discussed in an issue first.
  • [-] This PR contains test cases, if meaningful.
  • [-] A reviewer from the core maintainer team has been assigned for this PR. If you don't know who could review this, please indicate so. The list of suggested reviewers on the right can help you.

Please ensure all communication adheres to the code of conduct.

@alexcrichton @cfallin PTAL and please include any rpm testers you know of to review this.

Successful copr build with this commit is at: https://copr.fedorainfracloud.org/coprs/lsm5/wasmtime/build/4725938/

To test the current build:

$ sudo dnf -y copr enable lsm5/wasmtime
$ sudo dnf install wasmtime

@giuseppe @font @flouthoc PTAL and test if you have the time.

I will add copr integration info in a followup comment.

lsm5 avatar Aug 11 '22 14:08 lsm5

Failing CI / Check (pull_request) seems to be unrelated to this PR afaics.

flouthoc avatar Aug 11 '22 15:08 flouthoc

See: https://github.com/bytecodealliance/wasmtime/issues/4570#issuecomment-1212130549 for webhook info

lsm5 avatar Aug 11 '22 15:08 lsm5

CI failures are because today's release of Rust 1.63 reports a new warning. #4691 is merged fixing that, so please rebase and then hopefully CI will pass.

jameysharp avatar Aug 11 '22 18:08 jameysharp

Thanks @lsm5! I successfully tested the build using a basic hello world test:

[vagrant@fedora36 ~]$ sudo dnf -y copr enable lsm5/wasmtime
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
<https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr>,
and packages are not held to any quality or security level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.
Repository successfully enabled.
[vagrant@fedora36 ~]$ sudo dnf install -y wasmtime
Copr repo for wasmtime owned by lsm5                                                                                                                                                                                                                                                           12 kB/s | 3.3 kB     00:00
Dependencies resolved.
==============================================================================================================================================================================================================================================================================================================================
 Package                                                       Architecture                                                Version                                                                                    Repository                                                                                         Size
==============================================================================================================================================================================================================================================================================================================================
Installing:
 wasmtime                                                      x86_64                                                      101:0.0-20220815174844.df43290.fc36                                                        copr:copr.fedorainfracloud.org:lsm5:wasmtime                                                      3.5 M

Transaction Summary
==============================================================================================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 3.5 M
Installed size: 11 M
Downloading Packages:
wasmtime-0.0-20220815174844.df43290.fc36.x86_64.rpm                                                                                                                                                                                                                                            18 MB/s | 3.5 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                                                                          18 MB/s | 3.5 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                                                                                      1/1
  Installing       : wasmtime-101:0.0-20220815174844.df43290.fc36.x86_64                                                                                                                                                                                                                                                  1/1
  Running scriptlet: wasmtime-101:0.0-20220815174844.df43290.fc36.x86_64                                                                                                                                                                                                                                                  1/1
  Verifying        : wasmtime-101:0.0-20220815174844.df43290.fc36.x86_64                                                                                                                                                                                                                                                  1/1

Installed:
  wasmtime-101:0.0-20220815174844.df43290.fc36.x86_64

Complete!
[vagrant@fedora36 ~]$ mkdir hello-wasmtime/; cd hello-wasmtime/
[vagrant@fedora36 hello-wasmtime]$ echo 'fn main() {
    println!("Hello, world!");
    }' > hello.rs
[vagrant@fedora36 hello-wasmtime]$ rustc hello.rs --target wasm32-wasi
[vagrant@fedora36 hello-wasmtime]$ wasmtime hello.wasm
Hello, world!
[vagrant@fedora36 hello-wasmtime]$

font avatar Aug 15 '22 19:08 font