{"id":31701876,"url":"https://github.com/getlantern/flashlight-build","last_synced_at":"2025-10-08T21:09:42.634Z","repository":{"id":24259015,"uuid":"27652771","full_name":"getlantern/flashlight-build","owner":"getlantern","description":"Repeatable builds for Lantern, using docker.","archived":false,"fork":false,"pushed_at":"2024-03-07T14:29:47.000Z","size":188649,"stargazers_count":14,"open_issues_count":4,"forks_count":5,"subscribers_count":20,"default_branch":"valencia","last_synced_at":"2024-06-19T02:06:50.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlantern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-06T23:27:18.000Z","updated_at":"2020-02-14T01:32:40.000Z","dependencies_parsed_at":"2024-06-19T01:59:16.010Z","dependency_job_id":null,"html_url":"https://github.com/getlantern/flashlight-build","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/getlantern/flashlight-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fflashlight-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fflashlight-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fflashlight-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fflashlight-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlantern","download_url":"https://codeload.github.com/getlantern/flashlight-build/tar.gz/refs/heads/valencia","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fflashlight-build/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000716,"owners_count":26082837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-08T21:09:39.258Z","updated_at":"2025-10-08T21:09:42.625Z","avatar_url":"https://github.com/getlantern.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lantern [![Travis CI Status](https://travis-ci.org/getlantern/lantern.svg?branch=devel)](https://travis-ci.org/getlantern/lantern)\u0026nbsp;[![Coverage Status](https://coveralls.io/repos/getlantern/lantern/badge.png?branch=devel)](https://coveralls.io/r/getlantern/lantern)\n\nlantern is a [gost](https://github.com/getlantern/gost) project that\nprovides repeatable builds and consolidated pull requests for lantern. **It's very important to read the gost documentation thoroughly in\norder to build this project.**\n\n## Building Lantern\n\n### Requisites\n\n* [Go 1.4.x](https://golang.org/dl/).\n* [Docker](https://www.docker.com/).\n* [GNU Make](https://www.gnu.org/software/make/)\n* An OSX or Linux host.\n\nWe are going to create a Docker image that will take care of compiling Lantern\nfor Windows and Linux, in order to compile Lantern for OSX you'll need an OSX\nhost, this is a limitation caused by Lantern depending on C code and OSX build\ntools for certain features.\n\n### Building the docker image\n\nIn order to build the docker image open a terminal, `cd` into the\n`lantern` project and execute `make docker`:\n\n```sh\ncd lantern\nmake docker\n```\n\nThis will take a while, be patient, you only need to do this once.\n\n## Building Lantern binaries\n\n### Building for Linux\n\nIf you want to build for Linux on all supported architectures, use:\n\n```sh\nmake linux\n```\n\nYou can also build for Linux 386:\n\n```sh\nmake linux-386\nfile lantern_linux_386\n# lantern_linux_386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped\n```\n\nOr only for amd64:\n\n```sh\nmake linux-amd64\nfile lantern_linux_amd64\n# lantern_linux_amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped\n```\n\n### Building for Windows\n\nLantern supports the 386 architecture on Windows. In order to build Lantern on\nWindows use:\n\n```sh\nmake windows\nfile lantern_windows_386.exe\n# lantern_windows_386.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit\n```\n\n### Building for OSX\n\nLantern supports the amd64 architecture on OSX. In order to build Lantern on\nOSX you'll need an OSX host. Run the following command:\n\n```sh\nmake darwin\nfile lantern_darwin_amd64\n# lantern_darwin_amd64: Mach-O 64-bit executable x86_64\n```\n\n### Building all binaries\n\nIf you want to build all supported binaries of Lantern use the `binaries` task:\n\n```sh\nmake binaries\n```\n\n### Building headless version\n\nIf `HEADLESS` environment variable is set, the generated binaries will be\nheadless, that is, it doesn't depend on the systray support libraries, and\nwill not show systray or UI.\n\n## Packaging\n\nPackaging requires some special environemnt variables.\n\n### OSX\n\nLantern on OS X is packaged as the `Lantern.app` app bundle, distributed inside\nof a drag-and-drop dmg installer. The app bundle and dmg can be created using:\n\n```sh\nVERSION=2.0.0-beta2 make package-darwin\nfile Lantern.dmg\n# Lantern.dmg: bzip2 compressed data, block size = 100k\n```\n\n`make package-darwin` signs the Lantern.app using the BNS code signing\ncertificate in your KeyChain. The\n[certificate](https://github.com/getlantern/too-many-secrets/blob/master/osx-code-signing-certificate.p12)\nand\n[password](https://github.com/getlantern/too-many-secrets/blob/master/osx-code-signing-certificate.p12.txt)\ncan be obtained from\n[too-many-secrets](https://github.com/getlantern/too-many-secrets) and must be\ninstalled to the system's key chain beforehand.\n\nIf signing fails, the script will still build the app bundle and dmg, but the\napp bundle won't be signed. Unsigned app bundles can be used for testing but\nshould never be distributed to end users.\n\nThe background image for the DMG is\n`installer-resources/darwin/dmgbackground.svg`.\n\n### Packaging for Windows\n\nLantern on Windows is distributed as an installer built with\n[nsis](http://nsis.sourceforge.net/). The installer is built and signed with\n`make package-windows`.\n\nFor `make package-windows` to be able to sign the executable, the environment varaibles\n`SECRETS_DIR` and `BNS_CERT_PASS` must be set to point to the secrets directory\nand the\n[password](https://github.com/getlantern/too-many-secrets/blob/master/build-installers/env-vars.txt#L3)\nof the BNS certificate.  You can set the environment variables and run the\nscript on one line, like this:\n\n```sh\nSECRETS_DIR=$PATH_TO_TOO_MANY_SECRETS BNS_CERT_PASS='***' \\\nVERSION=2.0.0-beta1 make package-windows\n```\n\n### Packaging for Ubuntu\n\nLantern on Ubuntu is distributed as a `.deb` package. You can generate a Debian\npackage with:\n\n```sh\nVERSION=2.0.0-beta2 make package-linux\n```\n\nThe version string must match the Debian requirements:\n\nhttps://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version\n\nThis will build both 386 and amd64 packages.\n\n### Generating all packages\n\nUse the `make packages` task combining all the arguments that `package-linux`,\n`package-windows` and `package-darwin` require.\n\n```sh\nSECRETS_DIR=$PATH_TO_TOO_MANY_SECRETS BNS_CERT_PASS='***' \\\nVERSION=2.0.0-beta1 make packages\n```\n\n## Creating releases\n\n### Releasing for QA\n\nIn order to release for QA, first obtain an [application token][1] from Github\n(`GH_TOKEN`) and then make sure that [s3cmd](https://github.com/s3tools/s3cmd)\nis correctly configured:\n\n```\ns3cmd --config\n```\n\nThen, create all distribution packages:\n\n```\n[...env variables...] make packages\n```\n\nFinally, use `release-qa` to upload the packages that were just generated to\nboth AWS S3 and the Github release page:\n\n```\nTAG='2.0.0-beta5' GH_TOKEN=$GITHUB_TOKEN make release-qa\n```\n\n### Releasing Beta\n\nIf you want to release a Beta you must have created a package for QA first,\nthen use the `release-beta` task:\n\n```\nmake release-beta\n```\n\n`release-beta` will promote the QA files that are currently in S3 to beta.\n\n## Other tasks\n\n### Creating libgojni.so\n\nThe `libgojni.so` is the Lantern library for Android. This is a work in\nprogress but if you're feeling adventurous you can build it by using the\n`android` target:\n\n```\nmake android-lib\n```\n\n### Generating assets\n\n```sh\nmake genassets\n```\n\nIf the environment variable `UPDATE_DIST=true` is set, `make genassets` also\nupdates the resources in the dist folder.\n\nAn annotated tag can be added like this:\n\n```sh\ngit tag -a v1.0.0 -m\"Tagged 1.0.0\"\ngit push --tags\n```\n\nUse `make create-tag` as a shortcut for creating and uploading tags:\n\n```\nTAG='2.0.0-beta5' make create-tag\n```\n\nIf you want to both create a package and upload a tag run the `create-tag` task\nright after the `packages` task.\n\n```\n[...env variables...] make packages create-tag\n```\n\n### Updating Icons\n\nThe icons used for the system tray are stored in\n`src/github/getlantern/lantern/icons`. To apply changes to the icons, make\nyour updates in the icons folder and then run `make update-icons`.\n\n### Continuous Integration with Travis CI\n\nContinuous builds are run on Travis CI. These builds use the `.travis.yml`\nconfiguration.  The github.com/getlantern/cf unit tests require an envvars.bash\nto be populated with credentials for cloudflare. The original `envvars.bash` is\navailable\n[here](https://github.com/getlantern/too-many-secrets/blob/master/envvars.bash).\nAn encrypted version is checked in as `envvars.bash.enc`, which was encrypted\nper the instructions [here](http://docs.travis-ci.com/user/encrypting-files/).\n\n[1]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Fflashlight-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlantern%2Fflashlight-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Fflashlight-build/lists"}