Skip to content

Commit

Permalink
Merge pull request #304 from ooni/release/3.8.0
Browse files Browse the repository at this point in the history
Release/3.8.0
  • Loading branch information
bassosimone authored Sep 20, 2022
2 parents 32d875f + db5e32a commit a1482a6
Show file tree
Hide file tree
Showing 4 changed files with 2,366 additions and 2,110 deletions.
25 changes: 21 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,21 @@ Then you can run:
yarn install
```

You will also need to have copied a compiled binary of `probe-cli` into the
directory for the platform you plan to do development on.
You will also need to have copied a compiled binary of `probe-cli` and `tor`
into the directory for the platform you plan to do development on.

You can download them by running:
To verify the downloaded tor binaries you should import the PGP key of the tor
developers as follows (it can be verified from:
https://support.torproject.org/tbb/how-to-verify-signature/):
```
gpg --recv-keys EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
```

You can then download the assets by running:

```bash
yarn run probe-cli
yarn run download:probe-cli
yarn run download:tor
```

## Run app in development mode
Expand Down Expand Up @@ -106,6 +114,15 @@ This will build `./dist/OONI Probe-$VERSION.dmg`.

## Build and sign an app on Windows

You will need a copy of the code signing key for windows that ends with `.p12`.

To generate a signed build you will have to set the environment variables:
```
WIN_CSC_LINK=/path/to/key.p12
WIN_CSC_KEY_PASSWORD=KEY_PASSWORD
```

You will then be able to run:
```bash
yarn install
yarn run pack:win
Expand Down
21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "OONI Probe Desktop app",
"author": "Open Observatory of Network Interference (OONI) <[email protected]>",
"productName": "OONI Probe",
"version": "3.8.0-dev",
"probeVersion": "3.15.1",
"version": "3.8.0",
"probeVersion": "3.16.3",
"main": "main/index.js",
"license": "BSD-3-Clause",
"repository": "ooni/probe-desktop",
Expand All @@ -21,6 +21,8 @@
"pack": "yarn run build:clean && electron-builder --win --mac --linux",
"pack:win": "yarn run build:clean && electron-builder --win --x64",
"pack:mac": "yarn run build:clean && electron-builder --mac",
"packonly:mac": "electron-builder --mac",
"packonly:win": "electron-builder --win --x64",
"pack:linux": "yarn run build:clean && electron-builder --linux",
"publish": "yarn run build:clean && electron-builder --mac --win -p always",
"publish:mac": "yarn run build:clean && electron-builder --mac -p always",
Expand Down Expand Up @@ -154,10 +156,10 @@
"@sentry/cli": "^1.61.0",
"@sentry/integrations": "^6.0.4",
"@sentry/node": "^5.12.1",
"@storybook/addon-actions": "5.2.1",
"@storybook/addon-links": "5.2.1",
"@storybook/addon-storysource": "5.2.1",
"@storybook/react": "5.2.1",
"@storybook/addon-actions": "5.3.18",
"@storybook/addon-links": "5.3.18",
"@storybook/addon-storysource": "5.3.18",
"@storybook/react": "5.3.18",
"@testing-library/dom": "^7.31.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^11.2.7",
Expand Down Expand Up @@ -187,7 +189,7 @@
"jest-styled-components": "^7.0.4",
"moment-range": "^4.0.2",
"next": "^10.0.3",
"ooni-components": "^0.4.7",
"ooni-components": "0.4.8",
"os-locale": "^5.0.0",
"prop-types": "15.7.2",
"raven-js": "^3.27.2",
Expand Down Expand Up @@ -231,6 +233,11 @@
"semver": "^7.3.5",
"split2": "^2.2.0"
},
"resolutions": {
"shell-quote": "1.7.3",
"immer": "9.0.6",
"minimist": "1.2.6"
},
"optionalDependencies": {
"fsevents": "2.3.2"
},
Expand Down
13 changes: 9 additions & 4 deletions scripts/download-tor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const process = require('process')
const { execSync } = require('child_process')
const { existsSync, ensureDirSync } = require('fs-extra')

const baseURL = 'https://archive.torproject.org/tor-package-archive/torbrowser/11.0.6/'
const torBrowserVersion = '11.5.1'
const torWinVersion = '0.4.7.8'
const libEventVersion = '2.1.7'

const baseURL = `https://archive.torproject.org/tor-package-archive/torbrowser/${torBrowserVersion}`

const appRoot = path.resolve(path.join(__dirname, '..'))
const dstDir = path.join(appRoot, 'build', 'tor')
Expand All @@ -20,17 +24,17 @@ const extractMac = (pkgName) => {
const ret = execSync(`hdiutil attach "${dstDir}/${pkgName}"`)
const mountPoint = ret.toString().split('\t')[2].trim()
execSync(`cp "${mountPoint}/Tor Browser.app/Contents/MacOS/Tor/tor.real" ${dstDir}/darwin_amd64/tor`)
execSync(`cp "${mountPoint}/Tor Browser.app/Contents/MacOS/Tor/libevent-2.1.7.dylib" ${dstDir}/darwin_amd64/`)
execSync(`cp "${mountPoint}/Tor Browser.app/Contents/MacOS/Tor/libevent-${libEventVersion}.dylib" ${dstDir}/darwin_amd64/`)
execSync(`hdiutil detach "${mountPoint}"`)
}

const platformMap = {
'windows_amd64': {
'pkgName': 'tor-win64-0.4.6.9.zip',
'pkgName': `tor-win64-${torWinVersion}.zip`,
'extractor': extractWin
},
'darwin_amd64': {
'pkgName': 'TorBrowser-11.0.6-osx64_en-US.dmg',
'pkgName': `TorBrowser-${torBrowserVersion}-osx64_en-US.dmg`,
'extractor': extractMac
}
}
Expand Down Expand Up @@ -61,6 +65,7 @@ const download = () => {
execSync(`gpg --quiet --verify ${dstDir}/${sig} ${dstDir}/${pkgName}`)
} catch (e) {
console.error(`Signature verification failure: ${e}`)
process.exit(1)
}
ensureDirSync(`${dstDir}/${platform}`)
extractor(pkgName)
Expand Down
Loading

0 comments on commit a1482a6

Please sign in to comment.