Update some docs
Ximin Luo
3 years ago
0 | 0 | #!/bin/bash |
1 | # Build a packaged crate. | |
2 | # | |
3 | # This script is not run directly, but linked into ./build/ when running one of | |
4 | # the other scripts, so you should do that instead of running this directly. | |
5 | # | |
6 | # Usage: [REALVER=<EXACTVER>] ./build.sh <CRATE> [<SEMVER>] [<EXTRA DEPENDENCY DEB> ...] | |
7 | # | |
8 | # Envvars: | |
9 | # IGNORE_MISSING_BUILD_DEPS=1 | |
10 | # Don't abort on missing build deps. You'll need | |
11 | # this when giving extra dependency debs. | |
12 | # DISTRIBUTION=$suite | |
13 | # Release to something other than unstable, e.g. experimental | |
14 | # CHROOT=$chroot | |
15 | # Build using another schroot than debcargo-unstable-amd64-sbuild | |
1 | 16 | set -e |
2 | 17 | |
3 | 18 | SCRIPTDIR="$(dirname $(readlink -f "$0"))" |
109 | 124 | if [ -n "${EXTRA_DEBS[*]}" ]; then |
110 | 125 | EXTRA_DEBS_SBUILD=("${EXTRA_DEBS[@]/#/--extra-package=}") |
111 | 126 | EXTRA_DEBS_REPO_TMP=$(mktemp -d "${SRCNAME}_REPO_XXXXXXXX") |
127 | # trap cleans up even if user does Ctrl-C | |
128 | # https://stackoverflow.com/a/14812383 inside "trap" avoids running handler twice | |
129 | trap 'excode=$?; rm -rf "'"$EXTRA_DEBS_REPO_TMP"'"; trap - EXIT' EXIT HUP INT QUIT PIPE TERM | |
112 | 130 | # symlinks don't work here |
113 | 131 | ln -f "${EXTRA_DEBS[@]}" "$EXTRA_DEBS_REPO_TMP/" |
114 | 132 | ( cd "$EXTRA_DEBS_REPO_TMP"; apt-ftparchive packages . > Packages ) |
141 | 159 | "$SCRIPTDIR/dev/rust-regressions.sh" "$BUILDNAME.test.log" |
142 | 160 | fi |
143 | 161 | |
144 | if [ -d "$EXTRA_DEBS_REPO_TMP" ]; then | |
145 | rm -rf "$EXTRA_DEBS_REPO_TMP"; | |
146 | fi | |
147 | ||
148 | 162 | changestool "$BUILDNAME.changes" adddsc "$SRCNAME.dsc" |
149 | 163 | report "build complete: $BUILDNAME.changes" |
150 | 164 |
0 | 0 | #!/bin/bash |
1 | # | |
2 | # Envvars: | |
3 | # INST_CACHE | |
4 | # If running this script multiple times, set this to a path where we will | |
5 | # write data to be re-used next time. This makes the script slightly | |
6 | # quicker, but if the data is too old it will give inaccurate results. | |
1 | 7 | |
2 | 8 | set -e |
3 | 9 | shopt -s lastpipe # important for populating associative arrays via pipes |
72 | 72 | fi |
73 | 73 | if [ -z "$DEB_RUST_SKIP_CI_DL" ]; then |
74 | 74 | echo >&2 "Downloading CI test logs. If you did this recently and want to skip, re-run me with DEB_RUST_SKIP_CI_DL=1" |
75 | wget -nv --mirror $(< rust-regressions.list) | |
75 | if ! wget -nv --mirror $(< rust-regressions.list); then | |
76 | if [ -z "$DEB_RUST_NOFAIL_CI_DL" ]; then | |
77 | echo >&2 "abort: Download failed or partially-failed. If you want me to continue, re-run me with DEB_RUST_NOFAIL_CI_DL=1" | |
78 | exit 1 | |
79 | fi | |
80 | fi | |
76 | 81 | fi |
77 | 82 | cat rust-regressions.list | while read url; do |
78 | 83 | classify "${url#https://}" |
0 | 0 | #!/bin/bash |
1 | # Release a packaged crate to Debian. | |
2 | # | |
3 | # Usage: [REALVER=<EXACTVER>] ./release.sh <CRATE> [<SEMVER>] | |
4 | # | |
5 | # Envvars: | |
6 | # See also ./vars.sh.frag for its envvars, which we pass through. | |
7 | # See also ./build.sh for its envvars, which we pass through. | |
8 | # RERELEASE=1 | |
9 | # Bump the changelog for a source-only reupload, required for migration to | |
10 | # Debian Testing, and automatically dput the tarball. You need this after a | |
11 | # NEW upload. This is a dumb consequence of two independently-thought-out | |
12 | # policies but nobody on either team has expressed interest in fixing it, | |
13 | # claiming "not my department". | |
14 | # NOUPDATE=1 | |
15 | # Tell debcargo not to attempt to update to the latest version, i.e. | |
16 | # autodetect REALVER. Set this if you get unexpected diffs when releasing. | |
17 | # We probably want to switch this on by default, please complain in our IRC | |
18 | # channel if you agree. | |
19 | # REUSE_EXISTING_ORIG_TARBALL=1 | |
20 | # Re-use the existing .orig tarball. This is needed if it was previously | |
21 | # generated with an old version of debcargo, otherwise you'll get | |
22 | # auto-REJECT from Debian FTP. TODO: we probably want to set this | |
23 | # automatically on if the Debian version ends with -2 or above. | |
1 | 24 | |
2 | 25 | . ./vars.sh.frag |
3 | 26 |
0 | 0 | #!/bin/sh |
1 | # Repackage a crate at the exact version that it was packaged at. | |
2 | # | |
3 | # Usage: ./repackage.sh <CRATE> [<SEMVER>] | |
1 | 4 | |
2 | 5 | . ./vars.sh.frag |
3 | 6 |