# Fedora mirror (pkg.shecan.ir)

> Mirror of dl.fedoraproject.org/pub/fedora/linux for dnf.

- Upstream: dl.fedoraproject.org
- Mirror URL: <https://mirror-fedora.pkg.shecan.ir/>
- Clients: dnf
- Service status: <https://pkg.shecan.ir/status.json> (key `fedora`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/fedora/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/fedora.json>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `fedora`, mirror `shecan`): <https://audit.shecan.ir/#fedora>

## Limitations

- dnf verifies packages with the official Fedora keys. Mirror paths match dl.fedoraproject.org/pub/fedora/linux (for example releases/43 and updates/43).
- The fedora-cisco-openh264 repository is not mirrored and is still fetched from Cisco.

## 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.

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

Back up first (linux)

```sh
sudo cp /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.bak && sudo cp /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.bak
```

Run (linux)

```sh
sudo sed -i 's/^metalink=/#metalink=/; s|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirror-fedora.pkg.shecan.ir|' /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo
```

Run (linux)

```sh
sudo dnf makecache
sudo dnf install -y jq
```

Undo / restore the default (linux)

```sh
sudo mv /etc/yum.repos.d/fedora.repo.bak /etc/yum.repos.d/fedora.repo && sudo mv /etc/yum.repos.d/fedora-updates.repo.bak /etc/yum.repos.d/fedora-updates.repo
```
