summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-02 15:42:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-11-02 15:42:16 +0000
commit8a0476ff24e9f58b00036052d30e3c2192f7db6f (patch)
tree498efc63a8d59d7e95dc26ab741c5f207f0b2306
parentAdding upstream version 0.0~git20221206.8b7148f. (diff)
downloadwasi-libc-8a0476ff24e9f58b00036052d30e3c2192f7db6f.tar.xz
wasi-libc-8a0476ff24e9f58b00036052d30e3c2192f7db6f.zip
Adding debian version 0.0~git20221206.8b7148f-1~exp1.debian/0.0_git20221206.8b7148f-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/README.source18
-rw-r--r--debian/changelog106
-rw-r--r--debian/control33
-rw-r--r--debian/copyright307
-rw-r--r--debian/gbp.conf5
-rw-r--r--debian/patches/debian-flags.patch38
-rw-r--r--debian/patches/disable-warning.patch10
-rw-r--r--debian/patches/dont-rebuild-install.patch44
-rw-r--r--debian/patches/series3
-rwxr-xr-xdebian/rules27
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/lintian-overrides1
-rw-r--r--debian/wasi-libc.install3
-rw-r--r--debian/wasi-libc.lintian-overrides6
-rw-r--r--debian/watch4
15 files changed, 606 insertions, 0 deletions
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..e770741
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,18 @@
+Embedded MUSL
+=============
+
+This package embeds a copy of MUSL because its main reverse-dependency (rustc)
+is very sensitive to its exact ABI and we do not want to have to co-ordinate
+upgrades with the main musl package in Debian.
+
+Updating the package
+====================
+
+- In ``rust.git`` run ``debian/rules update-version`` as normal.
+- Look at ``debian/control`` and get the commit hash from Build-Depends-Indep
+- commit=<THE COMMIT HASH YOU GOT>
+- git remote add upstream https://github.com/WebAssembly/wasi-libc || true
+- git fetch upstream && git checkout upstream-orig && git reset --hard "$commit" && git push origin
+- git checkout master && uscan --verbose
+- gbp import-orig ../wasi-libc_0.0~git*.$commit.orig.tar.xz
+- Finally, update debian/* as normal
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0ebe959
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,106 @@
+wasi-libc (0.0~git20221206.8b7148f-1~exp1) experimental; urgency=medium
+
+ * Team upload.
+
+ [ Blair Noctis ]
+ * New upstream version
+ * Refresh patches
+
+ -- Fabian Gr├╝nbichler <debian@fabian.gruenbichler.email> Wed, 26 Jul 2023 21:28:48 +0200
+
+wasi-libc (0.0~git20220510.9886d3d-2) unstable; urgency=medium
+
+ * d/copyright: add missing license info
+ * bump Standards-Version to 4.6.1
+ * bump debhelper compat to 13
+
+ -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Wed, 07 Dec 2022 19:57:26 +0100
+
+wasi-libc (0.0~git20220510.9886d3d-1) unstable; urgency=medium
+
+ * Upload to unstable.
+
+ -- Fabian Gruenbichler <debian@fabian.gruenbichler.email> Wed, 07 Dec 2022 17:37:58 +0100
+
+wasi-libc (0.0~git20220510.9886d3d-1~exp1) experimental; urgency=medium
+
+ * New upstream release
+ * Update to LLVM 14, same as rustc (Closes: #1017661)
+
+ -- Fabian Gr├╝nbichler <f.gruenbichler@proxmox.com> Thu, 29 Sep 2022 12:11:17 +0200
+
+wasi-libc (0.0~git20210922.ad51334-1) unstable; urgency=medium
+
+ * Upload to unstable.
+
+ -- Ximin Luo <infinity0@debian.org> Tue, 08 Mar 2022 10:49:36 +0000
+
+wasi-libc (0.0~git20210922.ad51334-1~exp1) experimental; urgency=medium
+
+ [ Fabian Gruenbichler ]
+ * New upstream version needed by rustc 1.57.0
+
+ [ Ximin Luo ]
+ * Update to LLVM 13, same as rust. (Closes: #1000910)
+
+ -- Ximin Luo <infinity0@debian.org> Sun, 06 Mar 2022 21:29:02 +0000
+
+wasi-libc (0.0~git20201130.5879558-1) unstable; urgency=medium
+
+ * Upload to unstable.
+
+ -- Ximin Luo <infinity0@debian.org> Wed, 29 Sep 2021 19:55:26 +0100
+
+wasi-libc (0.0~git20201130.5879558-1~exp1) experimental; urgency=medium
+
+ * New upstream version needed by rustc 1.51.0.
+
+ -- Ximin Luo <infinity0@debian.org> Wed, 07 Apr 2021 01:43:35 +0100
+
+wasi-libc (0.0~git20200731.215adc8-2) unstable; urgency=medium
+
+ * Update to LLVM 11. (Closes: #974787)
+
+ -- Ximin Luo <infinity0@debian.org> Tue, 01 Dec 2020 20:03:39 +0000
+
+wasi-libc (0.0~git20200731.215adc8-1) unstable; urgency=medium
+
+ * Upload to unstable.
+
+ -- Ximin Luo <infinity0@debian.org> Sat, 07 Nov 2020 20:58:46 +0000
+
+wasi-libc (0.0~git20200731.215adc8-1~exp1) experimental; urgency=medium
+
+ * New upstream version needed by rustc 1.47.0.
+
+ -- Ximin Luo <infinity0@debian.org> Fri, 04 Sep 2020 17:29:07 +0100
+
+wasi-libc (0.0~git20200319.9efc2f4-2) unstable; urgency=medium
+
+ * Update to LLVM 10.
+
+ -- Ximin Luo <infinity0@debian.org> Wed, 05 Aug 2020 21:52:23 +0100
+
+wasi-libc (0.0~git20200319.9efc2f4-1) unstable; urgency=medium
+
+ * New upstream version needed by rustc 1.44.1.
+
+ -- Ximin Luo <infinity0@debian.org> Sat, 04 Jul 2020 17:25:29 +0100
+
+wasi-libc (0.0~git20200114.1fad338-1) unstable; urgency=medium
+
+ * New upstream version needed by rustc 1.42.0.
+
+ -- Ximin Luo <infinity0@debian.org> Sat, 04 Apr 2020 02:54:16 +0100
+
+wasi-libc (0.0~git20191220.a280fea-2) unstable; urgency=medium
+
+ * Mark as M-A: foreign for cross-compiling.
+
+ -- Ximin Luo <infinity0@debian.org> Sat, 04 Apr 2020 01:12:55 +0100
+
+wasi-libc (0.0~git20191220.a280fea-1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Ximin Luo <infinity0@debian.org> Sun, 08 Mar 2020 22:38:19 +0000
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..452b601
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,33 @@
+Source: wasi-libc
+Section: devel
+Priority: optional
+Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+Uploaders: Ximin Luo <infinity0@debian.org>
+Build-Depends: debhelper-compat (= 13), clang-14, llvm-14
+Standards-Version: 4.6.1
+Homepage: https://github.com/CraneStation/wasi-libc
+Vcs-Browser: https://salsa.debian.org/rust-team/wasi-libc
+Vcs-Git: https://salsa.debian.org/rust-team/wasi-libc.git
+
+Package: wasi-libc
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Description: WASI libc implementation for WebAssembly
+ This is a work in progress. It's usable for many purposes, though the APIs
+ aren't stable yet. For example, this is used by the Rust compiler to build
+ its standard library for the wasm32-wasi target.
+ .
+ First, it's a usable libc. It builds a "libc" which can be used by compilers,
+ such as Clang 8.0, using the wasm32-wasi target. It's a work in progress, but
+ it is already sufficient to run basic programs.
+ .
+ Second, it's a "reference" implementation, which means the interfaces defined
+ here can be used by other tools and libraries, even if they don't use all the
+ actual implementations here. For example, we don't expect everyone will want to
+ use the exact malloc implementation provided here, but tools and libraries
+ using an ABI-compatible malloc interface will be able to interoperate
+ regardless of which actual implementation is used.
+ .
+ Third, it's an example showing the use of the WASI API. The libc functionality
+ is implemented using calls to WASI functions.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..3e5d175
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,307 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: wasi-libc
+Upstream-Contact: Dan Gohman <sunfish@mozilla.com>
+Source: https://github.com/WebAssembly/wasi-libc
+
+Files: *
+Copyright:
+ 2018-2020 Dan Gohman <sunfish@mozilla.com>
+ 2018-2020 wasi-libc contributors
+License: CC0-1.0
+
+Files: libc-bottom-half/sources/accept.c
+Copyright: 2022 Harald Hoyer <harald@profian.com>
+License: BSD-2-clause
+
+Files: libc-bottom-half/cloudlibc/*
+Copyright: 2015-2017 Nuxi (https://nuxi.nl/) and contributors
+License: BSD-2-clause
+
+Files: libc-bottom-half/libpreopen/*
+Copyright:
+ 2016-2017 Stanley Uche Godfrey
+ 2016-2018 Jonathan Anderson
+License: BSD-2-clause
+
+Files: tools/wasi-headers/*
+Copyright:
+ 2018-2020 Dan Gohman <sunfish@mozilla.com>
+ 2018-2020 wasi-libc contributors
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2020 Ximin Luo <infinity0@debian.org>
+License: MIT
+
+License: CC0-1.0
+ On Debian systems, the full text of the CC0 1.0 Universal License can be found
+ in the file `/usr/share/common-licenses/CC0-1.0'.
+
+License: Apache-2.0
+ Debian systems provide the Apache 2.0 license in
+ /usr/share/common-licenses/Apache-2.0
+
+# Everything below here is for the embedded copy of musl, and is essentially
+# lifted off musl's debian/copyright.
+
+Files: libc-top-half/musl/*
+Copyright: 2005-2019 Rich Felker <dalias@aerifal.cx>
+ 2005-2019 Many other contributors
+License: MIT
+
+Files: libc-top-half/musl/include/*
+ libc-top-half/musl/arch/*/bits/*
+ libc-top-half/musl/crt/*
+Copyright: 2005-2014 Rich Felker <dalias@aerifal.cx>
+License: public-domain
+ The following files are trivial, in my opinion not copyrightable in
+ the first place, and hereby explicitly released to the Public Domain:
+ .
+ All public headers: include/*, arch/*/bits/*
+ Startup files: crt/*
+
+Files: libc-top-half/musl/src/regex/reg*
+ libc-top-half/musl/src/regex/tre*
+Copyright: 2001-2008 Ville Laurikari <vl@iki.fi>
+ 2012 Rich Felker <dalias@aerifal.cx>
+License: BSD-2-clause
+
+Files: libc-top-half/musl/src/math/tgammal.c
+ libc-top-half/musl/src/math/lgammal.c
+ libc-top-half/musl/src/math/powl.c
+ libc-top-half/musl/src/math/logl.c
+ libc-top-half/musl/src/math/log2l.c
+ libc-top-half/musl/src/math/log1pl.c
+ libc-top-half/musl/src/math/log10l.c
+ libc-top-half/musl/src/math/erfl.c
+ libc-top-half/musl/src/math/expm1l.c
+ libc-top-half/musl/src/math/expl.c
+ libc-top-half/musl/src/math/__polevll.c
+Copyright: 2008 Stephen L. Moshier <steve@moshier.net>
+ 1993 Sun Microsystems, Inc.
+License: ISC
+
+Files: libc-top-half/musl/src/math/fmal.c
+ libc-top-half/musl/src/math/fmaf.c
+ libc-top-half/musl/src/math/fma.c
+ libc-top-half/musl/src/math/exp2l.c
+Copyright: 2005-2011 David Schultz <das@freebsd.org>
+ 1993 Sun Microsystems, Inc.
+License: BSD-2-clause
+
+Files: libc-top-half/musl/src/math/tanf.c
+ libc-top-half/musl/src/math/tan.c
+ libc-top-half/musl/src/math/sqrtf.c
+ libc-top-half/musl/src/math/sqrt.c
+ libc-top-half/musl/src/math/sinf.c
+ libc-top-half/musl/src/math/sincosf.c
+ libc-top-half/musl/src/math/sincos.c
+ libc-top-half/musl/src/math/sin.c
+ libc-top-half/musl/src/math/scalbf.c
+ libc-top-half/musl/src/math/scalb.c
+ libc-top-half/musl/src/math/log1pf.c
+ libc-top-half/musl/src/math/log1p.c
+ libc-top-half/musl/src/math/log10f.c
+ libc-top-half/musl/src/math/log10.c
+ libc-top-half/musl/src/math/lgammaf_r.c
+ libc-top-half/musl/src/math/lgamma_r.c
+ libc-top-half/musl/src/math/j*.c
+ libc-top-half/musl/src/math/expm1f.c
+ libc-top-half/musl/src/math/expm1.c
+ libc-top-half/musl/src/math/erf.c
+ libc-top-half/musl/src/math/erff.c
+ libc-top-half/musl/src/math/cosf.c
+ libc-top-half/musl/src/math/cos.c
+ libc-top-half/musl/src/math/cbrt*.c
+ libc-top-half/musl/src/math/atanl.c
+ libc-top-half/musl/src/math/atanf.c
+ libc-top-half/musl/src/math/atan2*.c
+ libc-top-half/musl/src/math/atan.c
+ libc-top-half/musl/src/math/asinl.c
+ libc-top-half/musl/src/math/asinf.c
+ libc-top-half/musl/src/math/asin.c
+ libc-top-half/musl/src/math/acosl.c
+ libc-top-half/musl/src/math/acosf.c
+ libc-top-half/musl/src/math/acos.c
+ libc-top-half/musl/src/math/__tan*.c
+ libc-top-half/musl/src/math/__sin*.c
+ libc-top-half/musl/src/math/__rem*.c
+ libc-top-half/musl/src/math/__cos*.c
+Copyright: 1993, 2004 Sun Microsystems, Inc.
+ 2008, 2009-2011 Bruce D. Evans
+ 2008, 2009-2011 Steven G. Kargl
+ 2008, 2009-2011 David Schultz
+License: permissive
+ Developed at SunPro, a Sun Microsystems, Inc. business.
+ Permission to use, copy, modify, and distribute this
+ software is freely granted, provided that this notice
+ is preserved.
+
+Files: libc-top-half/musl/src/math/logf.c
+ libc-top-half/musl/src/math/logf_data.*
+ libc-top-half/musl/src/math/log2.c
+ libc-top-half/musl/src/math/log2_data.*
+ libc-top-half/musl/src/math/log2f.c
+ libc-top-half/musl/src/math/log2f_data.*
+ libc-top-half/musl/src/math/log.c
+ libc-top-half/musl/src/math/log_data.*
+ libc-top-half/musl/src/math/exp.c
+ libc-top-half/musl/src/math/exp_data.*
+ libc-top-half/musl/src/math/exp2.c
+ libc-top-half/musl/src/math/expf.c
+ libc-top-half/musl/src/math/exp2f.c
+ libc-top-half/musl/src/math/exp2f_data.*
+ libc-top-half/musl/src/math/pow.c
+ libc-top-half/musl/src/math/pow_data.c
+ libc-top-half/musl/src/math/powf.c
+ libc-top-half/musl/src/math/powf_data.*
+Copyright: 2017-2018 Arm Limited.
+License: MIT
+
+Files: libc-top-half/musl/arch/riscv64/*
+ libc-top-half/musl/src/*/riscv64/*
+Copyright: Alex Suykov <alex.suykov@gmail.com>
+ Aric Belsito <lluixhi@gmail.com>
+ Drew DeVault <sir@cmpwn.com>
+ Michael Clark <mjc@sifive.com>
+ Michael Forney <mforney@mforney.org>
+ Stefan O'Rear <sorear2@gmail.com>
+ Rich Felker <dalias@aerifal.cx>
+License: MIT
+
+Files: libc-top-half/musl/src/crypt/crypt_blowfish.c
+Copyright: 1998-2012 Solar Designer <solar@openwall.com>
+ 2012 Rich Felker <dalias@aerifal.cx>
+License: public-domain
+ Written by Solar Designer <solar at openwall.com> in 1998-2012.
+ No copyright is claimed, and the software is hereby placed in the public
+ domain. In case this attempt to disclaim copyright and place the software
+ in the public domain is deemed null and void, then the software is
+ Copyright (c) 1998-2012 Solar Designer and it is hereby released to the
+ general public under the following terms:
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted.
+ .
+ There's ABSOLUTELY NO WARRANTY, express or implied.
+ .
+ It is my intent that you should be able to use this on your system,
+ as part of a software package, or anywhere else to improve security,
+ ensure compatibility, or for any other purpose. I would appreciate
+ it if you give credit where it is due and keep your modifications in
+ the public domain as well, but I don't require that in order to let
+ you place this code and any modifications you make under a license
+ of your choice.
+
+Files: libc-top-half/musl/src/crypt/crypt_des.c
+Copyright: 1994 David Burren
+ 2000,2002,2010,2012 Solar Designer <solar@openwall.com>
+ 2012 Rich Felker <dalias@aerifal.cx>
+License: BSD-3-clause
+
+Files: libc-top-half/musl/src/stdlib/qsort.c
+Copyright: 2011 Valentin Ochs
+License: MIT
+
+Files: libc-top-half/musl/src/setjmp/x32/longjmp.s
+ libc-top-half/musl/src/setjmp/x32/setjmp.s
+ libc-top-half/musl/src/setjmp/x86_64/longjmp.s
+ libc-top-half/musl/src/setjmp/x86_64/setjmp.s
+ libc-top-half/musl/src/thread/x32/__set_thread_area.s
+ libc-top-half/musl/src/thread/x32/__unmapself.s
+ libc-top-half/musl/src/thread/x86_64/__set_thread_area.s
+ libc-top-half/musl/src/thread/x86_64/__unmapself.s
+Copyright: 2011-2012 Nicholas J. Kain
+License: MIT
+
+Files: libc-top-half/musl/arch/mips64/*
+ libc-top-half/musl/src/*/mips64/*
+Copyright: 2016 Mahesh Bodapati
+ 2016 Jaydeep Patil
+ 2016 Imagination Technologies
+License: MIT
+
+Files: libc-top-half/musl/src/string/arm/memcpy_le.S
+Copyright: 2008 The Android Open Source Project
+License: BSD-2-clause
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the author nor the names of other contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..6f81bbe
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,5 @@
+[DEFAULT]
+upstream-tree = upstream
+
+[import-orig]
+upstream-vcs-tag = upstream-orig
diff --git a/debian/patches/debian-flags.patch b/debian/patches/debian-flags.patch
new file mode 100644
index 0000000..3c8ef0b
--- /dev/null
+++ b/debian/patches/debian-flags.patch
@@ -0,0 +1,38 @@
+--- a/expected/wasm32-wasi/posix/predefined-macros.txt
++++ b/expected/wasm32-wasi/posix/predefined-macros.txt
+@@ -1119,7 +1119,6 @@
+ #define NAN (0.0f/0.0f)
+ #define NBBY 8
+ #define NCARGS 131072
+-#define NDEBUG 1
+ #define ND_NA_FLAG_OVERRIDE 0x00000020
+ #define ND_NA_FLAG_ROUTER 0x00000080
+ #define ND_NA_FLAG_SOLICITED 0x00000040
+@@ -3113,7 +3112,7 @@
+ #define and_eq &=
+ #define asin(x) __tg_real_complex(asin, (x))
+ #define asinh(x) __tg_real_complex(asinh, (x))
+-#define assert(x) (void)0
++#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
+ #define atan(x) __tg_real_complex(atan, (x))
+ #define atan2(x,y) __tg_real_2(atan2, (x), (y))
+ #define atanh(x) __tg_real_complex(atanh, (x))
+--- a/expected/wasm32-wasi/single/predefined-macros.txt
++++ b/expected/wasm32-wasi/single/predefined-macros.txt
+@@ -1119,7 +1119,6 @@
+ #define NAN (0.0f/0.0f)
+ #define NBBY 8
+ #define NCARGS 131072
+-#define NDEBUG 1
+ #define ND_NA_FLAG_OVERRIDE 0x00000020
+ #define ND_NA_FLAG_ROUTER 0x00000080
+ #define ND_NA_FLAG_SOLICITED 0x00000040
+@@ -3073,7 +3072,7 @@
+ #define and_eq &=
+ #define asin(x) __tg_real_complex(asin, (x))
+ #define asinh(x) __tg_real_complex(asinh, (x))
+-#define assert(x) (void)0
++#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
+ #define atan(x) __tg_real_complex(atan, (x))
+ #define atan2(x,y) __tg_real_2(atan2, (x), (y))
+ #define atanh(x) __tg_real_complex(atanh, (x))
diff --git a/debian/patches/disable-warning.patch b/debian/patches/disable-warning.patch
new file mode 100644
index 0000000..46098d4
--- /dev/null
+++ b/debian/patches/disable-warning.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -294,6 +294,7 @@
+ -Wno-missing-braces \
+ -Wno-ignored-pragmas \
+ -Wno-unused-but-set-variable \
++ -Wno-unused-command-line-argument \
+ -Wno-unknown-warning-option
+
+ # Configure support for threads.
diff --git a/debian/patches/dont-rebuild-install.patch b/debian/patches/dont-rebuild-install.patch
new file mode 100644
index 0000000..a72b006
--- /dev/null
+++ b/debian/patches/dont-rebuild-install.patch
@@ -0,0 +1,44 @@
+--- a/Makefile
++++ b/Makefile
+@@ -556,6 +556,8 @@
+ # Remove selected header files.
+ $(RM) $(patsubst %,$(SYSROOT_INC)/%,$(MUSL_OMIT_HEADERS))
+
++ touch $@
++
+ startup_files: include_dirs
+ #
+ # Build the startup files.
+@@ -566,6 +568,8 @@
+ mkdir -p "$(SYSROOT_LIB)" && \
+ mv *.o "$(SYSROOT_LIB)"
+
++ touch $@
++
+ libc: include_dirs \
+ $(SYSROOT_LIB)/libc.a \
+ $(SYSROOT_LIB)/libc-printscan-long-double.a \
+@@ -575,6 +579,8 @@
+ $(SYSROOT_LIB)/libwasi-emulated-getpid.a \
+ $(SYSROOT_LIB)/libwasi-emulated-signal.a
+
++ touch $@
++
+ finish: startup_files libc
+ #
+ # Create empty placeholder libraries.
+@@ -586,6 +592,7 @@
+ #
+ # The build succeeded! The generated sysroot is in $(SYSROOT).
+ #
++ touch $@
+
+ # The check for defined and undefined symbols expects there to be a heap
+ # alloctor (providing malloc, calloc, free, etc). Skip this step if the build
+@@ -687,5 +694,6 @@
+ clean:
+ $(RM) -r "$(OBJDIR)"
+ $(RM) -r "$(SYSROOT)"
++ $(RM) -f include_dirs startup_files libc finish
+
+ .PHONY: default startup_files libc finish install include_dirs clean
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cf9c25b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+dont-rebuild-install.patch
+debian-flags.patch
+disable-warning.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..7e83d5d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+include /usr/share/dpkg/buildflags.mk
+
+export NM = llvm-nm-14
+export AR = llvm-ar-14
+export CC = clang-14
+
+# stack protector not yet supported, see
+# https://github.com/CraneStation/wasi-libc/issues/157
+export EXTRA_CFLAGS = $(CFLAGS) $(LDFLAGS) -fno-stack-protector
+
+%:
+ dh $@
+
+.PHONY: build
+build:
+ dh $@
+
+override_dh_auto_build:
+ dh_auto_build -- finish
+
+override_dh_auto_install:
+ dh_auto_install -- INSTALL_DIR=$(CURDIR)/debian/tmp/usr
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..d4bbec9
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1 @@
+wasi-libc source: globbing-patterns-out-of-order * *
diff --git a/debian/wasi-libc.install b/debian/wasi-libc.install
new file mode 100644
index 0000000..6868f56
--- /dev/null
+++ b/debian/wasi-libc.install
@@ -0,0 +1,3 @@
+usr/share/wasm32-wasi
+usr/lib/wasm32-wasi
+usr/include/* /usr/include/wasm32-wasi
diff --git a/debian/wasi-libc.lintian-overrides b/debian/wasi-libc.lintian-overrides
new file mode 100644
index 0000000..adac81e
--- /dev/null
+++ b/debian/wasi-libc.lintian-overrides
@@ -0,0 +1,6 @@
+# wasm object files count as arch-independent for now,
+# at least until we starting offering Debian in wasm
+wasi-libc: arch-independent-package-contains-binary-or-object [usr/lib/*-wasi/*.a]
+wasi-libc: no-code-sections [usr/lib/*-wasi/*.a]
+# this one is for ftp-masters, which uses bullseye lintian with different output!
+wasi-libc binary: arch-independent-package-contains-binary-or-object usr/lib/*-wasi/*.a
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..b4fd414
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="mode=git, pgpmode=none" \
+https://salsa.debian.org/rust-team/wasi-libc \
+heads/upstream-orig