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

Enable rpm package autobuilds on Fedora Copr #4688

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lsm5
Copy link

@lsm5 lsm5 commented Aug 11, 2022

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.

  • This has been discussed in issue [Downstream Usability] Autobuild RPM packages on every merged commit #4570 , or if not, please tell us why
    here.
  • 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.

@flouthoc
Copy link

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

@lsm5
Copy link
Author

lsm5 commented Aug 11, 2022

See: #4570 (comment) for webhook info

@jameysharp
Copy link
Contributor

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.

@font
Copy link
Contributor

font commented Aug 15, 2022

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]$

@lsm5 lsm5 changed the title Enable rpm package autobuilds on Fedora Copr [WIP - DO NOT MERGE] Enable rpm package autobuilds on Fedora Copr Aug 16, 2022
@lsm5 lsm5 changed the title [WIP - DO NOT MERGE] Enable rpm package autobuilds on Fedora Copr Enable rpm package autobuilds on Fedora Copr Aug 17, 2022
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: bytecodealliance#4570

Signed-off-by: Lokesh Mandvekar <[email protected]>
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 this pull request may close these issues.

[Downstream Usability] Autobuild RPM packages on every merged commit
4 participants