Skip to content

Commit

Permalink
Merge pull request #1749 from onionshare/release-2.6.1
Browse files Browse the repository at this point in the history
Getting ready for release 2.6.1 - Part 1
  • Loading branch information
SaptakS committed Oct 4, 2023
2 parents caaab94 + ed90261 commit c4d0b64
Show file tree
Hide file tree
Showing 529 changed files with 43,660 additions and 10,516 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build.yml
@@ -1,5 +1,5 @@
name: Build
run-name: Build win64, mac (Intel) 🚀
run-name: Build win64, mac (Intel), Snap, and Flatpak 🚀
on:
push:
branches:
Expand Down Expand Up @@ -43,6 +43,12 @@ jobs:
- name: Get tor binaries from Tor Browser (64-bit)
run: cd desktop && C:\hostedtoolcache\windows\Python\3.10.11\x64\Scripts\poetry run python .\scripts\get-tor.py win64

- name: Install Go >=1.21.1
uses: actions/setup-go@v4
with:
go-version: '>=1.21.1'
- run: go version

- name: Restore cache - obfs4proxy
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -196,10 +202,10 @@ jobs:
run: |
brew install libiodbc
cd ~/Downloads
curl -O -L https://github.com/PostgresApp/PostgresApp/releases/download/v2.5.12/Postgres-2.5.12-14.dmg
hdiutil attach Postgres-2.5.12-14.dmg
cp -r /Volumes/Postgres-2.5.12-14/Postgres.app /Applications/
hdiutil detach /Volumes/Postgres-2.5.12-14
curl -O -L https://github.com/PostgresApp/PostgresApp/releases/download/v2.6.5/Postgres-2.6.5-14.dmg
hdiutil attach Postgres-2.6.5-14.dmg
cp -r /Volumes/Postgres-2.6.5-14/Postgres.app /Applications/
hdiutil detach /Volumes/Postgres-2.6.5-14
- name: Build OnionShare
run: |
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,8 +2,11 @@

## 2.6.1

* Upgrade Tor, Meek, and obfs4proxy versions
* Release updates: Automate builds with CI, make just 64-bit Windows release, make both Intel and Apple Silicon macOS releases
* Upgrade dependencies, including Tor, meek, and snowflake
* Bug fix: Restore the primary_action mode settings in a tab after OnionShare reconnects to Tor
* Bug fix: Fix issue with auto-connecting to Tor with persistent tabs open
* Bug fix: Fix packaging issue where Windows version of OnionShare conflicts with Windows version of Dangerzone

## 2.6

Expand Down
107 changes: 71 additions & 36 deletions RELEASE.md
Expand Up @@ -19,15 +19,47 @@ Unless you're a core OnionShare developer making a release, you'll probably neve
- [ ] `desktop/org.onionshare.OnionShare.appdata.xml` should have the correct release date, and links to correct screenshots
- [ ] `CHANGELOG.md` should be updated to include a list of all major changes since the last release

### Update dependencies

Check `cli/pyproject.toml` to see if any hard-coded versions should be updated. Then, update the dependencies like this:

```sh
cd cli
poetry update
cd ..
```

If you update `flask-socketio`, ensure that you also update the [socket.io.min.js](https://github.com/micahflee/onionshare/blob/develop/cli/onionshare_cli/resources/static/js/socket.io.min.js) file to a version that is [supported](https://flask-socketio.readthedocs.io/en/latest/#version-compatibility) by the updated version of `flask-socketio`.

Check `desktop/pyproject.toml` to see if any hard-coded versions should be updated. Then, update the dependencies like this:

```
cd desktop
poetry update
cd ..
```

Update the docs dependencies like this:

```
cd docs
poetry update
cd ..
```

Update the versions of `meek`, `obfs4proxy`, and `snowflake` in the `desktop/scripts/build-pt-*` scripts, both the bash and PowerShell scripts. You can find the latest versions by looking at the tags in their git repos: [meek](https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek/-/tags), [obfs4proxy](https://gitlab.com/yawning/obfs4/-/tags), [snowflake](https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/tags).

### Update the documentation

- [ ] Update all of the documentation in `docs` to cover new features, including taking new screenshots if necessary

### Finalize localization

- [ ] Merge all the translations from weblate
- [ ] Merge all the translations from weblate:
```
git remote add weblate https://hosted.weblate.org/projects/onionshare/translations/
git pull weblate main
```
- [ ] In `docs` run `poetry run ./check-weblate.py [API_KEY]` to see which translations are >90% in the app and docs
- [ ] Edit `cli/onionshare_cli/settings.py`, make sure `self.available_locales` lists only locales that are >90% translated
- [ ] From the `desktop` folder in the virtual env, run `./scripts/countries-update-list.py` to make sure the localized country list for censorship circumvention is available in all available languages
Expand All @@ -46,51 +78,54 @@ In `snap/snapcraft.yaml`:

- [ ] The `tor`, `libevent`, `obfs4`, `snowflake-client`, and `meek-client` parts should be updated if necessary
- [ ] In the `onionshare` part, in the `override-pull` section, all of the dependencies in the `requirements.txt` file should match the dependencies listed in `cli/pyproject.toml` and `desktop/pyproject.toml`, with the exception of PySide2
- [ ] With every commit to the `main` branch, Snapcraft's CI should trigger builds. Make sure the builds all succeeded at https://snapcraft.io/onionshare/builds (you must be logged in), and test them. You can install them with: `snap install onionshare --edge`

### Make sure the Flatpak packaging works
To test locally:

In `flatpak/org.onionshare.OnionShare.yaml`:
- Install snapcraft with: `sudo snap install snapcraft --classic`
- Build snap with: `snapcraft`
- Install with: `sudo snap install ./onionshare_${VERSION}_amd64.snap --devmode`

- [ ] Update `tor`, `libevent`, `obfs4`, `meek-client`, and `snowflake-client` dependencies, if necessary
- [ ] Built the latest python dependencies using [this tool](https://github.com/flatpak/flatpak-builder-tools/blob/master/pip/flatpak-pip-generator) (see below)
- [ ] Test the Flatpak package, ensure it works

```
pip3 install toml requirements-parser
To in the edge branch:

# clone flatpak-build-tools
git clone https://github.com/flatpak/flatpak-builder-tools.git
# get onionshare-cli dependencies
cd poetry
./flatpak-poetry-generator.py ../../onionshare/cli/poetry.lock
cd ..
# get onionshare dependencies
cd pip
./flatpak-pip-generator $(python3 -c 'import toml; print("\n".join(toml.loads(open("../../onionshare/desktop/pyproject.toml").read())["tool"]["poetry"]["dependencies"]))' |grep -vi onionshare_cli |grep -vi python | grep -vi pyside6 | grep -vi cx_freeze |tr "\n" " ")
cd ..
With every commit to the `main` branch, Snapcraft's CI should trigger builds. Make sure the builds all succeeded at https://snapcraft.io/onionshare/builds (you must be logged in), and test them. You can install them with: `snap install onionshare --edge`

# convert to yaml
./flatpak-json2yaml.py -o onionshare-cli.yml poetry/generated-poetry-sources.json
./flatpak-json2yaml.py -o onionshare.yml pip/python3-modules.json
```
### Make sure the Flatpak packaging works

Now, merge `onionshare-cli.yml` and `onionshare.yml` into the Flatpak manifest.
In `flatpak/org.onionshare.OnionShare.yaml`:

Build and test the Flatpak package before publishing:
- [ ] Update `tor` and `libevent`
- [ ] Update `obfs4proxy`, `meek-client`, and `snowflake-client` dependencies, if necessary using [this tool](https://github.com/micahflee/flatpak-builder-tools/tree/fix-go/go):
```sh
cd flatpak-builder-tools/go

```sh
flatpak-builder build --force-clean --install-deps-from=flathub --install --user org.onionshare.OnionShare.yaml
flatpak run org.onionshare.OnionShare
# For each these, incorporate the output into the Flatpak maniest
# Make sure to update the version numbers
./flatpak-go-deps.py git.torproject.org/pluggable-transports/meek.git/meek-client@v0.38.0
./flatpak-go-deps.py git.torproject.org/pluggable-transports/snowflake.git/client@v2.6.0
./flatpak-go-deps.py gitlab.com/yawning/obfs4.git/obfs4proxy@obfs4proxy-0.0.14
```
Merge the output of each of these commands into the Flatpak manifest.
- [ ] Update the Python dependencies using [this tool](https://github.com/flatpak/flatpak-builder-tools/blob/master/pip/flatpak-pip-generator) along with `flatpak/poetry-to-requirements.py`:
```sh
cd flatpak-build-tools/pip

# get onionshare-cli dependencies
./flatpak-pip-generator $(../../onionshare/flatpak/poetry-to-requirements.py ../../onionshare/cli/pyproject.toml)
../flatpak-json2yaml.py ./python3-modules.json
mv python3-modules.yml onionshare-cli.yaml

# get onionshare dependencies
./flatpak-pip-generator $(../../onionshare/flatpak/poetry-to-requirements.py ../../onionshare/desktop/pyproject.toml | grep -v PySide6)
../flatpak-json2yaml.py ./python3-modules.json
mv python3-modules.yml onionshare-desktop.yaml
```
Now, merge `onionshare-desktop.yaml` and `onionshare-cli.yaml` into the Flatpak manifest.
- [ ] Build and test the Flatpak package to ensure it works:
```sh
flatpak-builder build --force-clean --jobs=$(nproc) --install-deps-from=flathub --install --user flatpak/org.onionshare.OnionShare.yaml
flatpak run org.onionshare.OnionShare
```

### Update to the latest version of Tor

- [ ] Edit `desktop/scripts/get-tor.py` to use the latest version of Tor Browser, and the latest sha256 checksums.
- [ ] Update the version of `meek`, `obfs4proxy`, and `snowflake` in the `desktop/scripts/build-pt-*` scripts, both the bash and PowerShell scripts.

### Create a signed git tag

- [ ] There must be a PGP-signed git tag for the version, e.g. for OnionShare 2.1, the tag must be `v2.1`
Expand Down
4 changes: 2 additions & 2 deletions cli/onionshare_cli/resources/torrc_template-snowflake
@@ -1,3 +1,3 @@
# Enable built-in snowflake bridge
Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://snowflake-broker.torproject.net.global.prod.fastly.net/ front=cdn.sstatic.net ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
Bridge snowflake 192.0.2.4:80 8838024498816A039FCBBAB14E6F40A0843051FA fingerprint=8838024498816A039FCBBAB14E6F40A0843051FA url=https://snowflake-broker.torproject.net.global.prod.fastly.net/ front=cdn.sstatic.net ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.net:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://snowflake-broker.torproject.net.global.prod.fastly.net/ front=foursquare.com ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
Bridge snowflake 192.0.2.4:80 8838024498816A039FCBBAB14E6F40A0843051FA fingerprint=8838024498816A039FCBBAB14E6F40A0843051FA url=https://snowflake-broker.torproject.net.global.prod.fastly.net/ front=foursquare.com ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.net:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn
32 changes: 19 additions & 13 deletions cli/onionshare_cli/settings.py
Expand Up @@ -55,42 +55,48 @@ def __init__(self, common, config=False):
# Dictionary of available languages in this version of OnionShare,
# mapped to the language name, in that language
self.available_locales = {
# "ar": "العربية", # Arabic
"af": "Afrikaans", # Afrikaans
"sq": "Shqip", # Albanian
"ar": "العربية", # Arabic
"be": "Беларуская", # Belarusian
# "bn": "বাংলা", # Bengali
# "ca": "Català", # Catalan
# "zh_Hant": "正體中文 (繁體)", # Traditional Chinese
"ca": "Català", # Catalan
"zh_Hant": "正體中文 (繁體)", # Traditional Chinese
"zh_Hans": "中文 (简体)", # Simplified Chinese
"hr": "Hrvatski", # Croatian
"cs": "čeština", # Czech
# "da": "Dansk", # Danish
# "nl": "Nederlands", # Dutch
"en": "English", # English
# "fi": "Suomi", # Finnish
# "fr": "Français", # French
"fi": "Suomi", # Finnish
"fr": "Français", # French
# "gl": "Galego", # Galician
"de": "Deutsch", # German
"el": "Ελληνικά", # Greek
"is": "Íslenska", # Icelandic
# "id": "Bahasa Indonesia", # Indonesian
# "ga": "Gaeilge", # Irish
# "it": "Italiano", # Italian
"it": "Italiano", # Italian
"ja": "日本語", # Japanese
# "ckb": "Soranî", # Kurdish (Central)
# "lt": "Lietuvių Kalba", # Lithuanian
# "nb_NO": "Norsk Bokmål", # Norwegian Bokmål
# "fa": "فارسی", # Persian
# "pl": "Polski", # Polish
# "pt_BR": "Português (Brasil)", # Portuguese Brazil
"lt": "Lietuvių Kalba", # Lithuanian
"nb_NO": "Norsk Bokmål", # Norwegian Bokmål
"fa": "فارسی", # Persian
"pl": "Polski", # Polish
"pt_BR": "Português (Brasil)", # Portuguese Brazil
# "pt_PT": "Português (Portugal)", # Portuguese Portugal
# "ro": "Română", # Romanian
# "ru": "Русский", # Russian
"ru": "Русский", # Russian
"sn": "chiShona", # Shona
# "sr_Latn": "Srpska (latinica)", # Serbian (latin)
# "sk": "Slovenčina", # Slovak
"sv": "Svenska", # Swedish
"es": "Español", # Spanish
"sw": "Kiswahili", # Swahili
"sv": "Svenska", # Swedish
# "te": "తెలుగు", # Telugu
"tr": "Türkçe", # Turkish
"uk": "Українська", # Ukrainian
"vi": "Tiếng Việt", # Vietnamese
}

# These are the default settings. They will get overwritten when loading from disk
Expand Down

0 comments on commit c4d0b64

Please sign in to comment.