]> git.proxmox.com Git - rustc.git/blobdiff - debian/README.source
add wasm32 libc patch
[rustc.git] / debian / README.source
index 385066df3da2bd82bd3cf2e3ede75ec29585e0ac..3495c255f0b7daa7b9cfef1fa7cb2401a78d013d 100644 (file)
@@ -13,32 +13,15 @@ for package maintainers" section further below.
 Embedded libraries
 ==================
 
-This source package embeds several external libraries (foeked and managed
-by rust upstream as git submodules).
-In early stages, many more libraries were forked/emebedded but we are steadily
-progressing in splitting them out.
+The upstream source package embeds many external libraries. We make a great
+effort to remove them and use system versions where possible, but there are a
+few more remaining:
 
-Here below the remaining ones, with the technical reasons.
+ * vendor/backtrace-sys, vendor/dlmalloc, vendor/walkdir
 
- * jemalloc from https://github.com/rust-lang/jemalloc
-   -> system-wide one can't be used due to rust using a "je_" prefix.
-
-   This is intentional upstream design and won't change soon, see:
-    - https://github.com/rust-lang/rust/pull/18678
-    - http://smallcultfollowing.com/babysteps/blog/2014/11/14/allocators-in-rust/
-
- * compiler-rt from https://github.com/rust-lang/compiler-rt
-   -> system-wide compiler-rt fails during linkage
-
-   Bug reported upstream, still to be fixed, see:
-    - https://github.com/rust-lang/rust/issues/15054
-    - https://github.com/rust-lang/rust/issues/15708
-
-As a summary, we plan to:
- * keep embedding jemalloc (probably forever)
- * work with upstream to fix compiler-rt linkage soon.
-
- -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 06 May 2017 13:26:08 +0200
+   These are small C libraries designed to be statically linked; their upstream
+   does not support building them as a shared library and they are too small to
+   justify their own Debian package.
 
 
 Building from source
@@ -147,22 +130,35 @@ Maintaining this package
 Import of a new upstream version
 --------------------------------
 
-$ uscan --verbose
-$ ver=UPDATE-ME # whatever it is, X.YY.0 probably
-$ tar xf ../rustc-$ver-src.tar.gz && ( cd rustc-$ver-src/ && ../debian/prune-unused-deps ) && rm -rf rustc-$ver-src/
-# ^ If this fails, you probably need to refresh patches or edit debian/prune-unused-deps
-$ git commit -m "Update Files-Excluded for new upstream version $ver" debian/copyright
-$ uscan --verbose # yes, again, to pick up the new Files-Excluded stuff
+$ apt install equivs python3-magic
+$ sudo mk-build-deps -irt 'aptitude -R'
+$ uscan --verbose                       # or debian/rules source_orig-beta, for beta
+$ ver=UPDATE-ME                         # whatever it is, probably X.YY.Z or X.YY.Z~beta.N
+
+$ tar xf ../rustc-${ver/\~/-}-src.tar.xz && ( cd rustc-${ver/*~*/beta}-src/ && pwd && ../debian/prune-unused-deps ) && rm -rf rustc-${ver/*~*/beta}-src/
+# ^ If this fails, you probably need to refresh the patches used by debian/prune-unused-deps
+$ git diff
+# Review the diff. If it removes too much stuff, it could mean that rustc
+# pulled in new unnecessary dependencies in this newer version. See if you can
+# drop them by amending the patch "d-0000-ignore-removed-submodules.patch".
+# Rerun the above "tar ..." commands again and check that your patch works.
+# For example, there is absolutely no reason why rustc should need openssl.
+
+$ git commit -m "Update Files-Excluded for new upstream version ${ver/\~/-}" debian/copyright
+$ uscan --verbose                       # yes, again, to pick up the new Files-Excluded stuff
+                                        # or debian/rules source_orig-beta, for beta
 
 # Keep running this and follow its instructions, until it gives no output:
 $ debian/check-orig-suspicious.sh $ver
 # When you are satisfied with the above, proceed:
 
+$ git checkout debian/experimental
 $ gbp import-orig ../rustc_$ver+dfsg1.orig.tar.xz
-$ dch -v $ver+dfsg1-1 -m "New upstream release."
+$ dch -v $ver+dfsg1-1~exp1 "New upstream release."
 $ debian/rules update-version
 # might also need to bump the version of the cargo Build-Depends
 # then refresh patches, etc etc
+# Use /usr/share/cargo/scripts/guess-crate-copyright to help update d/copyright quickly
 
 # If you need to repack again, bump the 'repacksuffix' in d/watch then run
 $ uscan --verbose --force-download
@@ -188,8 +184,9 @@ Comparing Debian rustc vs upstream rustc
 
 This package does things the Debian way, which differs significantly from
 upstream practices. If you find a bug, you might want to check if it is present
-in the upstream package. Run "debian/rules debian/configure-upstream" to
-generate a script, that you can then run in an unpacked upstream directory.
+in the upstream package. Run "debian/rules debian/config.toml" to generate our
+config.toml that you can then use in an upstream directory **unpacked from the
+release tarball*. (It is more complex to get this working with their git repo.)
 
 This will configure it in a "halfway" style between upstream and Debian.
 Specifically, it will not build LLVM nor download stuff from crates.io, yet
@@ -232,12 +229,9 @@ Useful links
 The Fedora rust team is more active than the Debian one. Here are their links:
 
 Source code
-https://src.fedoraproject.org/cgit/rpms/rust.git/tree/
+https://src.fedoraproject.org/rpms/rust/tree/
 
 Binary packages and test logs
 https://kojipkgs.fedoraproject.org//packages/rust/
 If the same test fails both on Fedora and Debian it's a good indication that
 we're not Doing It Wrong and can file a valid bug upstream.
-
-Package metadata
-https://admin.fedoraproject.org/pkgdb/package/rpms/rust/