Skip to content

Commit 2dcf924

Browse files
committed
Remove snapcraft build and runtime support entirely
Snap was a best effort effort for Rustup, is currently broken, and we have no capacity to develop it. Remove it to signal clearly that issues with it are not something we're focusing on - allowing other people to step up and maintain a distribution of Rustup for Snap if desired.
1 parent 727167a commit 2dcf924

File tree

7 files changed

+9
-223
lines changed

7 files changed

+9
-223
lines changed

.github/workflows/linux-builds-on-master.yaml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
- target: armv7-unknown-linux-gnueabihf
3434
#snap_arch: armhf
3535
steps:
36-
- uses: actions/checkout@v2
36+
- name: Clone repo
37+
uses: actions/checkout@v2
3738
with:
3839
# v2 defaults to a shallow checkout, but we need at least to the previous tag
3940
fetch-depth: 0
@@ -145,25 +146,6 @@ jobs:
145146
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
146147
AWS_DEFAULT_REGION: us-west-1
147148
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
148-
- name: Build a snapcraft configuration file
149-
run: |
150-
bash ci/snapcraft.bash
151-
if: matrix.snap_arch != ''
152-
env:
153-
DO_SNAP: 1
154-
SNAP_ARCH: ${{ matrix.snap_arch }}
155-
SNAP_EDGE: 1 # skip-stable
156-
- uses: snapcore/action-build@v1
157-
id: snapcraftbuild
158-
with:
159-
path: snapcraft
160-
if: matrix.snap_arch != ''
161-
- uses: snapcore/action-publish@v1
162-
with:
163-
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
164-
snap: ${{ steps.snapcraftbuild.outputs.snap }}
165-
release: edge # skip-pr skip-stable
166-
if: matrix.snap_arch != '' # skip-pr
167149
- name: Clear the cargo caches
168150
run: |
169151
cargo install cargo-cache --no-default-features --features ci-autoclean

.github/workflows/linux-builds-on-pr.yaml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
- target: armv7-unknown-linux-gnueabihf
2727
#snap_arch: armhf
2828
steps:
29-
- uses: actions/checkout@v2
29+
- name: Clone repo
30+
uses: actions/checkout@v2
3031
with:
3132
# v2 defaults to a shallow checkout, but we need at least to the previous tag
3233
fetch-depth: 0
@@ -138,24 +139,6 @@ jobs:
138139
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
139140
AWS_DEFAULT_REGION: us-west-1
140141
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
141-
- name: Build a snapcraft configuration file
142-
run: |
143-
bash ci/snapcraft.bash
144-
if: matrix.snap_arch != ''
145-
env:
146-
DO_SNAP: 1
147-
SNAP_ARCH: ${{ matrix.snap_arch }}
148-
SNAP_EDGE: 1 # skip-stable
149-
- uses: snapcore/action-build@v1
150-
id: snapcraftbuild
151-
with:
152-
path: snapcraft
153-
if: matrix.snap_arch != ''
154-
- uses: snapcore/action-publish@v1
155-
with:
156-
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
157-
snap: ${{ steps.snapcraftbuild.outputs.snap }}
158-
if: matrix.snap_arch == 'not-for-prs' # skip-master skip-stable
159142
- name: Clear the cargo caches
160143
run: |
161144
cargo install cargo-cache --no-default-features --features ci-autoclean

.github/workflows/linux-builds-on-stable.yaml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
- target: s390x-unknown-linux-gnu # skip-pr skip-master
5757
#snap_arch: s390x # skip-pr skip-master
5858
steps:
59-
- uses: actions/checkout@v2
59+
- name: Clone repo
60+
uses: actions/checkout@v2
6061
with:
6162
# v2 defaults to a shallow checkout, but we need at least to the previous tag
6263
fetch-depth: 0
@@ -168,24 +169,6 @@ jobs:
168169
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
169170
AWS_DEFAULT_REGION: us-west-1
170171
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
171-
- name: Build a snapcraft configuration file
172-
run: |
173-
bash ci/snapcraft.bash
174-
if: matrix.snap_arch != ''
175-
env:
176-
DO_SNAP: 1
177-
SNAP_ARCH: ${{ matrix.snap_arch }}
178-
- uses: snapcore/action-build@v1
179-
id: snapcraftbuild
180-
with:
181-
path: snapcraft
182-
if: matrix.snap_arch != ''
183-
- uses: snapcore/action-publish@v1
184-
with:
185-
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
186-
snap: ${{ steps.snapcraftbuild.outputs.snap }}
187-
release: beta # skip-pr skip-master
188-
if: matrix.snap_arch != '' # skip-pr
189172
- name: Clear the cargo caches
190173
run: |
191174
cargo install cargo-cache --no-default-features --features ci-autoclean

ci/actions-templates/linux-builds-template.yaml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ jobs:
6464
- target: s390x-unknown-linux-gnu # skip-pr skip-master
6565
#snap_arch: s390x # skip-pr skip-master
6666
steps:
67-
- uses: actions/checkout@v2
67+
- name: Clone repo
68+
uses: actions/checkout@v2
6869
with:
6970
# v2 defaults to a shallow checkout, but we need at least to the previous tag
7071
fetch-depth: 0
@@ -176,27 +177,6 @@ jobs:
176177
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
177178
AWS_DEFAULT_REGION: us-west-1
178179
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
179-
- name: Build a snapcraft configuration file
180-
run: |
181-
bash ci/snapcraft.bash
182-
if: matrix.snap_arch != ''
183-
env:
184-
DO_SNAP: 1
185-
SNAP_ARCH: ${{ matrix.snap_arch }}
186-
SNAP_EDGE: 1 # skip-stable
187-
- uses: snapcore/action-build@v1
188-
id: snapcraftbuild
189-
with:
190-
path: snapcraft
191-
if: matrix.snap_arch != ''
192-
- uses: snapcore/action-publish@v1
193-
with:
194-
store_login: ${{ secrets.SNAPCRAFT_TOKEN }}
195-
snap: ${{ steps.snapcraftbuild.outputs.snap }}
196-
release: edge # skip-pr skip-stable
197-
release: beta # skip-pr skip-master
198-
if: matrix.snap_arch != '' # skip-pr
199-
if: matrix.snap_arch == 'not-for-prs' # skip-master skip-stable
200180
- name: Clear the cargo caches
201181
run: |
202182
cargo install cargo-cache --no-default-features --features ci-autoclean

ci/snapcraft.bash

Lines changed: 0 additions & 125 deletions
This file was deleted.

doc/src/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ info: downloading self-updates
3333
If your `rustup` was built with the [no-self-update feature](https://github.com/rust-lang/rustup/blob/master/Cargo.toml#L25), it can not update
3434
itself. This is not the default, and only versions of `rustup` built with
3535
`--no-default-features`, or obtained from a third-party distributor who has
36-
disabled it (such as the Ubuntu snap store).
36+
disabled it (such as Nixos).
3737

3838
Otherwise Rustup can update itself. It is possible to control Rustup's automatic
3939
self update mechanism with the `auto-self-update` configuration variable. This

src/cli/common.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -292,23 +292,6 @@ pub(crate) fn self_update_permitted(explicit: bool) -> Result<SelfUpdatePermissi
292292
Ok(SelfUpdatePermission::Permit)
293293
} else {
294294
// Detect if rustup is not meant to self-update
295-
match process().var("SNAP") {
296-
Ok(_) => {
297-
// We're running under snappy so don't even bother
298-
// trying to self-update
299-
// TODO: Report this to the user?
300-
// TODO: Maybe ask snapd if there's an update and report
301-
// that to the user instead?
302-
debug!("Skipping self-update because SNAP was detected");
303-
if explicit {
304-
return Ok(SelfUpdatePermission::HardFail);
305-
} else {
306-
return Ok(SelfUpdatePermission::Skip);
307-
}
308-
}
309-
Err(env::VarError::NotPresent) => {}
310-
Err(e) => return Err(e).context("Could not interrogate SNAP environment variable"),
311-
}
312295
let current_exe = env::current_exe()?;
313296
let current_exe_dir = current_exe.parent().expect("Rustup isn't in a directory‽");
314297
if let Err(e) = tempfile::Builder::new()

0 commit comments

Comments
 (0)