commit a8c036fdd64cea7487f317af009ec94a199dd3e055271ee8c185defdce6bd4e3 Author: William Brown Date: Thu Jul 7 00:37:44 2022 +0000 Accepting request 986982 from home:MSirringhaus wasi-libc needed for the wasm-wasi build-target OBS-URL: https://build.opensuse.org/request/show/986982 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/wasi-libc?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..d6b0566 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://github.com/WebAssembly/wasi-libc + git + 0.1 + main + + + + *.tar + xz + + + diff --git a/_service:obs_scm:wasi-libc-0.1.1649882024.05cd0af.obscpio b/_service:obs_scm:wasi-libc-0.1.1649882024.05cd0af.obscpio new file mode 100644 index 0000000..da03abf --- /dev/null +++ b/_service:obs_scm:wasi-libc-0.1.1649882024.05cd0af.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb501337d1e48e9ac12550479ada8e49edb370abf99da76cacdbbd06a13d0cf9 +size 5880845 diff --git a/_service:obs_scm:wasi-libc.obsinfo b/_service:obs_scm:wasi-libc.obsinfo new file mode 100644 index 0000000..a2b7cf9 --- /dev/null +++ b/_service:obs_scm:wasi-libc.obsinfo @@ -0,0 +1,4 @@ +name: wasi-libc +version: 0.1.1649882024.05cd0af +mtime: 1649882024 +commit: 05cd0af0af4b5a191117d47a182adff1d6546b87 diff --git a/wasi-libc-0.1.1649882024.05cd0af.obscpio b/wasi-libc-0.1.1649882024.05cd0af.obscpio new file mode 100644 index 0000000..3862f5a --- /dev/null +++ b/wasi-libc-0.1.1649882024.05cd0af.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fbdcb828773e62894155c6656c629f6f0a1d85772a7441168dc32338aa98d8e +size 5880845 diff --git a/wasi-libc-0.1.1649882024.05cd0af.tar.xz b/wasi-libc-0.1.1649882024.05cd0af.tar.xz new file mode 100644 index 0000000..f41deff --- /dev/null +++ b/wasi-libc-0.1.1649882024.05cd0af.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc2653e05f020c6851237ddb77ec23850819253ae2c40239be2407538de458d0 +size 1086636 diff --git a/wasi-libc-rpmlintrc b/wasi-libc-rpmlintrc new file mode 100644 index 0000000..855ed16 --- /dev/null +++ b/wasi-libc-rpmlintrc @@ -0,0 +1,6 @@ +# Those files ARE arch-independent, but named like they are not (*.a, etc.) so the script is wrong here +setBadness('arch-dependent-file-in-usr-share', 0) +# There are empty dummy-files in the sysroot +setBadness('lto-no-text-in-archive', 0) +setBadness('devel-file-in-non-devel-package', 0) + diff --git a/wasi-libc.changes b/wasi-libc.changes new file mode 100644 index 0000000..2ea72c6 --- /dev/null +++ b/wasi-libc.changes @@ -0,0 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 20 13:32:28 UTC 2022 - Martin Sirringhaus + +- Add rpmlintrc to suppress errors for now +- Add workaround-broken-makefile.patch for cleaner build/install + separation + +------------------------------------------------------------------- +Wed Apr 20 12:48:58 UTC 2022 - Martin Sirringhaus + +- Initial commit diff --git a/wasi-libc.spec b/wasi-libc.spec new file mode 100644 index 0000000..09b679f --- /dev/null +++ b/wasi-libc.spec @@ -0,0 +1,52 @@ +# +# spec file for package wasi-libc +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: wasi-libc +Version: 0.1.1649882024.05cd0af +Release: 0 +Summary: WASI libc implementation for WebAssembly +# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses +License: MIT +URL: https://github.com/WebAssembly/wasi-libc +Source: %{name}-%{version}.tar.xz +Source1: wasi-libc-rpmlintrc +Patch1: workaround-broken-makefile.patch +BuildRequires: clang > 8 +BuildRequires: llvm > 8 + +%description + +%prep +%setup -q +%patch1 -p1 + +%build +export CC=clang +%make_build + +%install +export CC=clang +# The makefile is stupid and compiles everything again if we do `make install`, so we +# do it only once +%make_install INSTALL_DIR="%{buildroot}/%{_datadir}/wasi-sysroot" + +%files +%license LICENSE +%{_datadir}/wasi-sysroot/ + +%changelog diff --git a/workaround-broken-makefile.patch b/workaround-broken-makefile.patch new file mode 100644 index 0000000..fea6bf8 --- /dev/null +++ b/workaround-broken-makefile.patch @@ -0,0 +1,14 @@ +# Workaround as per https://github.com/WebAssembly/wasi-libc/issues/156 +diff --git a/Makefile b/Makefile +index b9f3c00..cd044b0 100644 +--- a/Makefile ++++ b/Makefile +@@ -565,7 +565,7 @@ check-symbols: startup_files libc + # This ignores whitespace because on Windows the output has CRLF line endings. + diff -wur "$(CURDIR)/expected/$(MULTIARCH_TRIPLE)" "$(SYSROOT_SHARE)" + +-install: finish ++install: + mkdir -p "$(INSTALL_DIR)" + cp -r "$(SYSROOT)/lib" "$(SYSROOT)/share" "$(SYSROOT)/include" "$(INSTALL_DIR)" +