# Eclipse Temurin mirror (pkg.shecan.ir)

> Mirror of Eclipse Temurin (Adoptium): the apt and rpm repositories of packages.adoptium.net (temurin-<version>-jdk/-jre) at /deb/ and /rpm/, the release archives and installers of github.com/adoptium/temurin<N>-binaries at /github/temurin<N>-binaries/releases/download/<tag>/<file>, and api.adoptium.net's /v3/binary and /v3/installer "latest" links, whose redirects point at the mirror.

- Upstream: packages.adoptium.net, api.adoptium.net, GitHub Releases (adoptium/temurin*-binaries)
- Mirror URLs: <https://mirror-adoptium.pkg.shecan.ir/deb/>, <https://mirror-adoptium.pkg.shecan.ir/rpm/>
- Clients: apt, dnf, yum, curl
- Service status: <https://pkg.shecan.ir/status.json> (key `adoptium`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/adoptium/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/adoptium.json>

## Limitations

- apt and dnf still verify Adoptium's signature; release archives have a .sha256.txt next to them.
- Only the Temurin release repositories on GitHub are served (no other GitHub content), and of api.adoptium.net only /v3/binary and /v3/installer.
- Tools that resolve JDKs themselves (Gradle toolchains via foojay, SDKMAN, actions/setup-java) keep using their own download URLs.
- Docker images (eclipse-temurin) come from the Docker Hub mirror.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### apt: persistent (user- or system-wide configuration)

Run, Ubuntu or Debian (linux)

```sh
sudo install -d /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/adoptium.asc https://mirror-adoptium.pkg.shecan.ir/api/gpg/key/public
. /etc/os-release
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://mirror-adoptium.pkg.shecan.ir/deb $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt update && sudo apt install -y temurin-21-jdk
```

Undo / restore the default, Ubuntu or Debian (linux)

```sh
sudo rm -f /etc/apt/sources.list.d/adoptium.list /etc/apt/keyrings/adoptium.asc
sudo apt update
```

### dnf, yum: persistent (user- or system-wide configuration)

Configuration file (linux): `/etc/yum.repos.d/adoptium.repo`

```ini
[adoptium]
name=Eclipse Temurin
baseurl=https://mirror-adoptium.pkg.shecan.ir/rpm/rhel/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://mirror-adoptium.pkg.shecan.ir/api/gpg/key/public
```

Undo / restore the default (linux)

```sh
sudo rm -f /etc/yum.repos.d/adoptium.repo
sudo dnf clean all
```

### curl: temporary (one command or the current shell; nothing saved)

Run (linux, macos)

```sh
curl -fL -o temurin-21-jdk.tar.gz https://mirror-adoptium.pkg.shecan.ir/v3/binary/latest/21/ga/linux/x64/jdk/hotspot/normal/eclipse
```

Run (linux)

```sh
curl -fLO https://mirror-adoptium.pkg.shecan.ir/github/temurin21-binaries/releases/download/jdk-21.0.13%2B9/OpenJDK21U-jre_x64_linux_hotspot_21.0.13_9.tar.gz
curl -fLO https://mirror-adoptium.pkg.shecan.ir/github/temurin21-binaries/releases/download/jdk-21.0.13%2B9/OpenJDK21U-jre_x64_linux_hotspot_21.0.13_9.tar.gz.sha256.txt
sha256sum -c OpenJDK21U-jre_x64_linux_hotspot_21.0.13_9.tar.gz.sha256.txt
```
