Skip to content

Commit

Permalink
doc: add access to latest updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Jul 16, 2024
1 parent a5c5611 commit f591540
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions docs/design/distfeed.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,40 @@ The `distfeed-setup` script simplifies the automatic setup of the repository cha
Execute the script without any additional arguments to automatically configure the repository channel based on the version of the running image.
The script is automatically executed when a subscription is enabled or disabled.

### Customization options
#### Customization options

The behavior of the distfeed-setup script can be customized using the following environment variables:

- `BASE_URL`: set the base URL for repositories. If not specified, the default value is taken from {{site.download}}.
- `CHANNEL`: define the desired channel for the repository. Possible values include stable, dev, and subscription.
By default, the script attempts to extract this information from the `/etc/os-release` file.
- `OWRT_VERSION`: specify the OpenWrt version used inside the rolling repository URL.
The script typically extracts this information from the `/etc/os-release` file.

Custom configuration example:
```
BASE_URL="https://custom-repo-url.com" CHANNEL="dev" OWRT_VERSION="21.02.3" distfeed-setup
CHANNEL="dev" OWRT_VERSION="21.02.3" distfeed-setup
```

If you want to change the base URL, set the UCI variable: `uci set ns-plug.config.repository_url=https://<your_server>`.

### Force updates on a subscription machine

A machine with a valid subscription receives updates from the subscription channel.
The subscription channel contains stable releases that have undergone additional testing.
Updates are pushed to the subscription channel after one week from the release date.

If you have a machine with a valid subscription and want to force an update, you can use the following commands:

```bash
cp /etc/opkg/distfeeds.conf /etc/opkg/distfeeds.conf.ori
cat /rom/etc/opkg/distfeeds.conf | sed 's/dev/stable/g' > /etc/opkg/distfeeds.conf
opkg update
/bin/opkg list-upgradable | /usr/bin/cut -f 1 -d ' ' | /usr/bin/xargs -r opkg upgrade && echo "Update successful!"
mv /etc/opkg/distfeeds.conf.ori /etc/opkg/distfeeds.conf
```

At the end, the original `distfeeds.conf` file is restored.

## Upstream OpenWrt repositories

You can add custom feeds by changing the `/etc/opkg/customfeeds.conf` file.
Expand Down

0 comments on commit f591540

Please sign in to comment.