├── linux ├── pkgrev ├── .gitignore ├── README.md ├── portmaster_logo.png ├── templates │ ├── snippets │ │ ├── common.sh │ │ ├── post-remove.sh │ │ ├── pre-remove.sh │ │ ├── post-upgrade.sh │ │ ├── install-systemd-utils.sh │ │ └── post-install.sh │ ├── rules │ ├── preinstall.sh │ ├── preremove.sh │ ├── arch.install │ ├── postremove.sh │ ├── postinstall.sh │ └── PKGBUILD ├── .chglog.yml ├── tests │ ├── test-upgrade.sh │ ├── common.sh │ ├── test-uninstall.sh │ └── test-install.sh ├── portmaster.desktop ├── portmaster_notifier.desktop ├── portmaster.service ├── Makefile ├── PKGBUILD ├── nfpm.yaml.template ├── arch.install └── schema.json ├── windows ├── sign.bat ├── portmaster.bmp ├── portmaster.ico ├── install_finish.rtf ├── README.md ├── install_summary.rtf ├── Makefile ├── languages.nsh ├── shortcut-properties.nsh ├── portmaster-installer.nsi └── LICENSE.txt ├── AUTHORS ├── .github ├── actions │ └── build-nsis │ │ ├── entrypoint.sh │ │ ├── action.yml │ │ ├── Dockerfile_old │ │ └── Dockerfile ├── ISSUE_TEMPLATE │ ├── suggest-feature.md │ ├── config.yml │ └── report-bug.md └── workflows │ ├── windows.yml │ └── linux.yml ├── .gitignore ├── README.md ├── TRADEMARKS └── LICENSE /linux/pkgrev: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | /portmaster-start 2 | /scripts 3 | /icons 4 | /nfpm.yaml 5 | /dist 6 | -------------------------------------------------------------------------------- /windows/sign.bat: -------------------------------------------------------------------------------- 1 | call signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 %* -------------------------------------------------------------------------------- /linux/README.md: -------------------------------------------------------------------------------- 1 | # Linux Package Scripts 2 | 3 | ## Building Packages 4 | 5 | Run `make`. 6 | -------------------------------------------------------------------------------- /windows/portmaster.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SQL-enwiki/portmaster-packaging/master/windows/portmaster.bmp -------------------------------------------------------------------------------- /windows/portmaster.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SQL-enwiki/portmaster-packaging/master/windows/portmaster.ico -------------------------------------------------------------------------------- /linux/portmaster_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SQL-enwiki/portmaster-packaging/master/linux/portmaster_logo.png -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | All files in this repository (unless otherwise noted) are authored, owned and copyrighted by Safing ICS Technologies GmbH (Austria). 2 | -------------------------------------------------------------------------------- /linux/templates/snippets/common.sh: -------------------------------------------------------------------------------- 1 | # common.sh 2 | # 3 | log() { 4 | printf "\033[33;1mportmaster:\033[0m %s\n" "$@" 5 | } 6 | 7 | set -e 8 | -------------------------------------------------------------------------------- /linux/.chglog.yml: -------------------------------------------------------------------------------- 1 | conventional-commits: false 2 | deb: 3 | distribution: [] 4 | urgency: "" 5 | debug: false 6 | owner: "Safing ICS Technologies GmbH" 7 | package-name: "portmaster" 8 | -------------------------------------------------------------------------------- /.github/actions/build-nsis/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | cd windows 5 | 6 | make 7 | 8 | mv ./*.exe ../ 9 | filename='portmaster-installer.exe' 10 | echo ::set-output name=filename::$filename -------------------------------------------------------------------------------- /linux/templates/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | #export DH_VERBOSE = 1 3 | 4 | %: 5 | dh $@ 6 | 7 | #Don't run strip for go-binaries 8 | override_dh_strip: 9 | 10 | override_dh_installsystemd: 11 | dh_installsystemd -r 12 | -------------------------------------------------------------------------------- /linux/tests/test-upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | 5 | # run installation tests here as well. 6 | . ${SCRIPT_DIR}/test-install.sh 7 | 8 | finish_tests -------------------------------------------------------------------------------- /linux/portmaster.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Portmaster 3 | GenericName=Application Firewall 4 | Exec=/opt/safing/portmaster/portmaster-start app --data=/opt/safing/portmaster 5 | Icon=portmaster 6 | Terminal=false 7 | Type=Application 8 | Categories=System 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.deb 2 | /portmaster_*.* 3 | /linux/portmaster-start 4 | /linux/debian/files 5 | /linux/debian/*.log 6 | /linux/debian/*.substvars 7 | /linux/debian/*.debhelper 8 | /linux/debian/portmaster/ 9 | *.exe 10 | /windows/install_summary.nsh 11 | /windows/install_finish.nsh 12 | /windows/.wine -------------------------------------------------------------------------------- /linux/portmaster_notifier.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Portmaster Notifier 3 | GenericName=Application Firewall Notifier 4 | Exec=/opt/safing/portmaster/portmaster-start notifier --data=/opt/safing/portmaster 5 | Icon=portmaster 6 | Terminal=false 7 | Type=Application 8 | Categories=System 9 | NoDisplay=true 10 | -------------------------------------------------------------------------------- /.github/actions/build-nsis/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build Windows NSIS installer' 2 | description: 'Build a Windows installer using NSIS' 3 | outputs: 4 | filename: 5 | description: 'Name of the built `.exe` file' 6 | 7 | runs: 8 | using: docker 9 | image: Dockerfile 10 | 11 | branding: 12 | icon: package 13 | color: gray-dark 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggest-feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "💡 Suggest a Packaging/Installer Improvement or Feature" 3 | about: Suggest an enhancement or a new feature for installing the Portmaster 4 | labels: suggestion 5 | --- 6 | 7 | **What would you like to add or change?**: 8 | 9 | 10 | 11 | **Why do you and others need this?**: 12 | 13 | 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > **Check out the main project repository [safing/portmaster](https://github.com/safing/portmaster)** 2 | 3 | # Portmaster Packaging 4 | 5 | This repo holds the source for Portmaster installers and packages for different platforms. Due to complex signing requirements, this repo is currently not built in CI/CD. 6 | 7 | Select a directory to check out the different platform packages. 8 | -------------------------------------------------------------------------------- /linux/templates/preinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | {{ file.Read "templates/snippets/common.sh"}} 4 | 5 | if [ -d /var/lib/portmaster/updates ]; then 6 | log "Detected previous installation of Portmaster at" 7 | log "/var/lib/portmaster" 8 | log "Please uninstall the portmaster package and try again!" 9 | log "You settings will be migrated automatically during re-installation." 10 | exit 1 11 | fi -------------------------------------------------------------------------------- /windows/install_finish.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \fs18\f0\b0 3 | Thanks for installing the Portmaster!\ 4 | \ 5 | If you want to contribute to this open source project, you can:\ 6 | \~\bullet\~ Give feedback\ 7 | \~\bullet\~ Report bugs\ 8 | \~\bullet\~ Spread the word\ 9 | \ 10 | In case you decide to uninstall the Portmaster, we would love to know why.\ 11 | \ 12 | Please take note that the Portmaster updates itself automatically.\ 13 | } 14 | -------------------------------------------------------------------------------- /linux/templates/snippets/post-remove.sh: -------------------------------------------------------------------------------- 1 | rm -rf /opt/safing/portmaster/updates ||: 2 | 3 | # file is marked as a ghost on RPM system so it might have 4 | # been automatically deleted by the package manager. 5 | rm /lib/systemd/system/portmaster.service 2>/dev/null >&2 ||: 6 | rm /usr/share/applications/portmaster.desktop 2>/dev/null >&2 ||: 7 | rm /usr/share/applications/portmaster_notifier.desktop 2>/dev/null >&2 ||: 8 | 9 | if [ "$1" = "purge" ]; then 10 | rm -rf /opt/safing/portmaster ||: 11 | fi 12 | -------------------------------------------------------------------------------- /linux/templates/snippets/pre-remove.sh: -------------------------------------------------------------------------------- 1 | # stop the portmaster service and disable it if it's enabled. 2 | if command -V systemctl >/dev/null 2>&1; then 3 | if (systemctl -q is-active portmaster.service); then 4 | log "Stopping portmaster.service" 5 | systemctl stop portmaster.service ||: 6 | fi 7 | if (systemctl -q is-enabled portmaster.service); then 8 | log "Disabling portmaster.service to launch at boot" 9 | systemctl disable portmaster.service ||: 10 | fi 11 | fi -------------------------------------------------------------------------------- /.github/workflows/windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build-nsis: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - uses: ./.github/actions/build-nsis 16 | id: build 17 | 18 | - uses: actions/upload-artifact@v1 19 | with: 20 | name: ${{ steps.build.outputs.filename }} 21 | path: ${{ steps.build.outputs.filename }} 22 | 23 | -------------------------------------------------------------------------------- /windows/README.md: -------------------------------------------------------------------------------- 1 | # Windows Installer 2 | 3 | The Windows Installer is built with NSIS. 4 | 5 | Usage: 6 | ```sh 7 | cd portmaster-packaging/.github/actions/build-nsis 8 | # Build the Container 9 | sudo docker build -t build-nsis . 10 | cd ../../.. 11 | # Run the container to build the Installer 12 | sudo docker run --rm -ti -v $(pwd):/workspace -w /workspace build-nsis 13 | 14 | # If you want to sign the executable, add SIGN=yes so the build process stops 15 | # and waits for you to sign the binaries. You will need a Windows VM with 16 | # your signing token and access to the build directory. 17 | 18 | sudo docker run --rm -e SIGN=yes -ti -v $(pwd):/workspace -w /workspace build-nsis 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /windows/install_summary.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \f0\b1\fs25 Install Summary 3 | \f1\b0\fs18 \ 4 | \ 5 | Install size\ 6 | ~300MB to download, ~500MB on disk\ 7 | \ 8 | Install location, program data and settings\ 9 | C:\\ProgramData\\Safing\\Portmaster\ 10 | \ 11 | Symlink at\ 12 | C:\\Program Files\\Safing\\Portmaster\ 13 | \ 14 | Startmenu\ 15 | ...\\Start Menu\\Programs\\Portmaster\ 16 | \ 17 | Autostart\ 18 | ...\\Start Menu\\Programs\\Startup\\Portmaster Notifier\ 19 | \ 20 | Service\ 21 | PortmasterCore\ 22 | \ 23 | Registry\ 24 | HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Portmaster\ 25 | HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\\{7F00FB48-65D5-4BA8-A35B-F194DA7E1A51\}\\LocalServer32\ 26 | } 27 | -------------------------------------------------------------------------------- /TRADEMARKS: -------------------------------------------------------------------------------- 1 | The names "Safing", "Portmaster", "Gate17" and their logos are trademarks owned by Safing ICS Technologies GmbH (Austria). 2 | 3 | Although our code is free, it is very important that we strictly enforce our trademark rights, in order to be able to protect our users against people who use the marks to commit fraud. This means that, while you have considerable freedom to redistribute and modify our software, there are tight restrictions on your ability to use our names and logos in ways which fall in the domain of trademark law, even when built into binaries that we provide. 4 | 5 | This file is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Parts of it were taken from https://www.mozilla.org/en-US/foundation/licensing/. 6 | -------------------------------------------------------------------------------- /linux/templates/preremove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | {{ file.Read "templates/snippets/common.sh" }} 4 | 5 | preremove() { 6 | {{ file.Read "templates/snippets/pre-remove.sh" | strings.Indent 4 " " }} 7 | } 8 | 9 | action="$1" 10 | if [ "$1" = "remove" ] && [ -z "$2" ]; then 11 | # Alpine linux does not pass args 12 | # deb passes $1=remove 13 | # rpm passes $1=0 14 | action="uninstall" 15 | elif [ "$1" = "upgrade" ] && [ -n "$2" ]; then 16 | # deb passes $1=upgrade $2=version 17 | # rpm passes $1=1 18 | action="upgrade" 19 | fi 20 | 21 | case "$action" in 22 | "0" | "uninstall") 23 | preremove 24 | ;; 25 | "1" | "upgrade") 26 | # this is pre-remove of an upgrade 27 | true; 28 | ;; 29 | *) 30 | # $1 == version being installed 31 | log "Alpine linux is not yet supported" 32 | exit 1 33 | ;; 34 | esac -------------------------------------------------------------------------------- /linux/templates/arch.install: -------------------------------------------------------------------------------- 1 | {{/* Template file expects repo root as working directory */}} 2 | {{- define "log" -}} 3 | log() { 4 | echo "$@" 5 | } 6 | {{- end -}} 7 | 8 | post_install() { 9 | {{ template "log" }} 10 | {{ file.Read "templates/snippets/install-systemd-utils.sh" | strings.Indent 4 " " }} 11 | {{ file.Read "templates/snippets/post-install.sh" | strings.Indent 4 " " }} 12 | } 13 | 14 | post_upgrade() { 15 | {{ template "log" }} 16 | {{ file.Read "templates/snippets/install-systemd-utils.sh" | strings.Indent 4 " " }} 17 | {{ file.Read "templates/snippets/post-upgrade.sh" | strings.Indent 4 " " }} 18 | } 19 | 20 | pre_remove() { 21 | {{ template "log" }} 22 | {{ file.Read "templates/snippets/pre-remove.sh" | strings.Indent 4 " " }} 23 | } 24 | 25 | post_remove() { 26 | {{ template "log" }} 27 | {{ file.Read "templates/snippets/post-remove.sh" | strings.Indent 4 " " }} 28 | } 29 | -------------------------------------------------------------------------------- /.github/actions/build-nsis/Dockerfile_old: -------------------------------------------------------------------------------- 1 | 2 | FROM debian:experimental 3 | LABEL maintainer="Patrick Pacher " 4 | 5 | # Installs the `dpkg-buildpackage` command 6 | RUN apt-get update && apt-get install --no-install-recommends -y build-essential curl 7 | RUN dpkg --add-architecture i386 && \ 8 | apt-get update && apt upgrade -y 9 | RUN apt-cache search libgcc 10 | RUN apt-get install -y --no-install-recommends libc6-i686 libgcc-s1-i386-cross 11 | RUN apt-get install --no-install-recommends -y \ 12 | wine \ 13 | wine32 \ 14 | cabextract 15 | RUN apt-get -t experimental update && apt-get -t experimental install ca-certificates -y --no-install-recommends nsis && apt-get clean 16 | 17 | # Copies your code file from your action repository to the filesystem path `/` of the container 18 | COPY entrypoint.sh /entrypoint.sh 19 | 20 | # Code file to execute when the docker container starts up (`entrypoint.sh`) 21 | ENTRYPOINT ["/entrypoint.sh"] 22 | -------------------------------------------------------------------------------- /.github/actions/build-nsis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | # wine settings 6 | ENV WINEARCH win32 7 | ENV WINEDEBUG fixme-all 8 | ENV WINEPREFIX /wine 9 | 10 | RUN set -x \ 11 | && dpkg --add-architecture i386 \ 12 | && apt-get update -qy \ 13 | && apt-get install --no-install-recommends -qfy wine32-development wine-development wget curl ca-certificates build-essential \ 14 | && apt-get clean \ 15 | && wget -q http://downloads.sourceforge.net/project/nsis/NSIS%203/3.05/nsis-3.05-setup.exe \ 16 | && wine nsis-3.05-setup.exe /S \ 17 | && while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \ 18 | && rm -rf /tmp/.wine-* \ 19 | && echo 'wine '\''C:\Program Files\NSIS\makensis.exe'\'' "$@"' > /usr/bin/makensis \ 20 | && chmod +x /usr/bin/* 21 | 22 | # Copies your code file from your action repository to the filesystem path `/` of the container 23 | COPY entrypoint.sh /entrypoint.sh 24 | 25 | # Code file to execute when the docker container starts up (`entrypoint.sh`) 26 | ENTRYPOINT ["/entrypoint.sh"] 27 | -------------------------------------------------------------------------------- /linux/templates/postremove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | {{ file.Read "templates/snippets/common.sh"}} 4 | 5 | uninstall() { 6 | {{ file.Read "templates/snippets/post-remove.sh" | strings.Indent 4 " " }} 7 | } 8 | 9 | action="$1" 10 | if [ "$1" = "remove" ] && [ -z "$2" ]; then 11 | # Alpine linux does not pass args 12 | # deb passes $1=remove 13 | # rpm passes $1=0 14 | action="uninstall" 15 | elif [ "$1" = "purge" ] && [ -z "$2" ]; then 16 | # deb passes $1=purge, Alpine and RPM does not have purge at all 17 | action="purge" 18 | elif [ "$1" = "upgrade" ] && [ -n "$2" ]; then 19 | # deb passes $1=upgrade $2=version 20 | # rpm passes $1=1 21 | action="upgrade" 22 | fi 23 | 24 | case "$action" in 25 | "0" | "uninstall" | "purge") 26 | log "post remove of complete uninstall" 27 | uninstall "$action" 28 | ;; 29 | "1" | "upgrade") 30 | log "post remove of upgrade" 31 | ;; 32 | *) 33 | # $1 == version being installed 34 | log "post remove of alpine" 35 | log "Alpine linux is not yet supported" 36 | exit 1 37 | ;; 38 | esac 39 | 40 | -------------------------------------------------------------------------------- /linux/templates/postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | {{ file.Read "templates/snippets/common.sh"}} 4 | 5 | download_agent="${PMSTART_UPDATE_AGENT:=Start}" 6 | skip_downloads="${PMSTART_SKIP_DOWNLOAD:=False}" 7 | 8 | {{ file.Read "templates/snippets/install-systemd-utils.sh" }} 9 | 10 | cleanInstall() { 11 | {{ file.Read "templates/snippets/post-install.sh" | strings.Indent 4 " " }} 12 | } 13 | 14 | upgrade() { 15 | {{ file.Read "templates/snippets/post-upgrade.sh" | strings.Indent 4 " " }} 16 | 17 | cleanInstall 18 | } 19 | 20 | # Step 2, check if this is a clean install or an upgrade 21 | action="$1" 22 | if [ "$1" = "configure" ] && [ -z "$2" ]; then 23 | # Alpine linux does not pass args, and deb passes $1=configure 24 | action="install" 25 | elif [ "$1" = "configure" ] && [ -n "$2" ]; then 26 | # deb passes $1=configure $2= 27 | action="upgrade" 28 | fi 29 | 30 | case "$action" in 31 | "1" | "install") 32 | cleanInstall 33 | ;; 34 | "2" | "upgrade") 35 | upgrade 36 | ;; 37 | *) 38 | # Alpine 39 | # $1 == version being installed 40 | cleanInstall 41 | ;; 42 | esac 43 | -------------------------------------------------------------------------------- /linux/templates/snippets/post-upgrade.sh: -------------------------------------------------------------------------------- 1 | # 2 | # As of 0.4.0 portmaster-control has been renamed to portmaster-start 3 | # and is not placed in /usr/bin anymore. Unfortunately, the postrm script 4 | # of the old installer does not get rid of portmaster-control so we should 5 | # take care during an upgrade. 6 | # 7 | rm /usr/bin/portmaster-control 2>/dev/null >&2 ||: 8 | 9 | # 10 | # If there's already a /var/lib/portmaster installation we're going to move 11 | # configs and databases and remove the complete directory 12 | # The preinstall.sh already checked that /var/lib/portmaster/updates MUST NOT 13 | # exist so we should be safe to touch the databases here. 14 | # 15 | if [ -d /var/lib/portmaster ]; then 16 | if [ ! -d /opt/safing/portmaster/config.json ]; then 17 | log "Migrating from previous installation at /var/lib/portmaster to /opt/safing/portmaster ..." 18 | mv /var/lib/portmaster/databases /opt/safing/portmaster/databases ||: 19 | mv /var/lib/portmaster/config.json /opt/safing/portmaster/config.json ||: 20 | fi 21 | log "Removing previous installation directory at /var/lib/portmaster" 22 | rm -r /var/lib/portmaster 2>/dev/null >&2 ||: 23 | fi 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | 2 | # Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser 3 | blank_issues_enabled: true # default: true 4 | contact_links: 5 | 6 | - name: "🛠 Create Issue for Portmaster" 7 | url: https://github.com/safing/portmaster/issues/new/choose 8 | about: "Create issue related to the main application" 9 | 10 | - name: "🎨 Create Issue for User Interface" 11 | url: https://github.com/safing/portmaster-ui/issues/new/choose 12 | about: "Create issue for everything connected to the Portmaster's User Interface" 13 | 14 | # - name: "📦 Create Issue for Packaging & Installers" 15 | # url: https://github.com/safing/portmaster-packaging/issues/new/choose 16 | # about: "Create issue for things related to Portmaster's installers, packaging and distribution" 17 | 18 | - name: "Contribution Guideline" 19 | url: https://docs.safing.io/portmaster/guides/contribute 20 | about: Learn how to best contribute and make sure your work is aligned with Safing’s current goals and focus 21 | 22 | - name: "Support Requests & Community" 23 | url: https://www.reddit.com/r/safing 24 | about: Ask for support and any questions you might have on reddit 25 | 26 | - name: "Code of Conduct" 27 | url: https://docs.safing.io/community/code-of-conduct 28 | about: Be nice to other community members 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/report-bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "🐞 Report a Packaging/Installer Bug" 3 | about: Report a bug encountered while installing the Portmaster 4 | labels: bug 5 | --- 6 | 7 | 10 | 11 | **Pre-Submit Checklist**: 12 | 13 | - Check applicable sources for existing issues: 14 | - [Windows Known Issues](https://docs.safing.io/portmaster/install/windows#known-issues) 15 | - [Linux Known Issues](https://docs.safing.io/portmaster/install/linux#compatibility) 16 | - [Github Issues](https://github.com/safing/portmaster-packaging/issues?q=is%3Aissue+label%3Abug) 17 | 18 | **What happened**: 19 | 20 | 21 | 22 | **What did you expect to happen?**: 23 | 24 | 25 | 26 | **How did you reproduce it?**: 27 | 28 | 29 | 30 | **Debug Information**: 31 | 32 | 45 | -------------------------------------------------------------------------------- /linux/tests/common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Utility methods for writing debug, warning and error messages 5 | # for github-actions. 6 | # 7 | error_count=0 8 | debug() { 9 | printf "::debug::%s\n" "$@" 10 | } 11 | info() { 12 | printf "::notice::%s\n" "$@" 13 | } 14 | error() { 15 | ((error_count++)) 16 | printf "::error::%s\n" "$@" 17 | } 18 | warn() { 19 | printf "::warning::%s\n" "$@" 20 | } 21 | group() { 22 | printf "::group::%s\n" "$1" 23 | } 24 | endgroup() { 25 | printf "::endgroup::\n" 26 | } 27 | 28 | # 29 | # Source /etc/os-release and gather some facts 30 | # for os/distribution specific tests 31 | # 32 | . /etc/os-release 33 | 34 | systemd_running="" 35 | 36 | # is_systemd_running lazily detects if systemd is running in the current 37 | # environment. 38 | is_systemd_running() { 39 | if [ "${systemd_running}" = "" ]; then 40 | systemd_running="False" 41 | if [ "$(pgrep systemd | head -n1)" = "1" ]; then 42 | debug "Found systemd running at $(pgrep systemd | head -1)" 43 | systemd_running="True" 44 | fi 45 | fi 46 | 47 | if [ "${systemd_running}" = "True" ]; then 48 | return 0 49 | fi 50 | 51 | return 1 52 | } 53 | 54 | finish_tests() { 55 | # 56 | # Abort with a non-zero exit code if we found at least one 57 | # error. 58 | # 59 | if [ "$error_count" -gt 0 ]; then 60 | echo "::error::${error_count} errors encountered" 61 | exit 1 62 | fi 63 | } -------------------------------------------------------------------------------- /linux/tests/test-uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | . ${SCRIPT_DIR}/common.sh 5 | 6 | group "Ensure portmaster is not running" 7 | if is_systemd_running; then 8 | if systemctl is-active portmaster.service ; then 9 | error "portmaster.service should have been stopped on uninstall" 10 | fi 11 | else 12 | debug "Skipping systemd service check ..." 13 | fi 14 | endgroup 15 | 16 | # 17 | # A normal uninstallation should keep user data 18 | # and logs in-place 19 | # 20 | # group "Settings and logs are kept" 21 | # if ! [ -d /opt/safing/portmaster/databases ] ; then 22 | # error "Portmaster databases should have been left in tree" 23 | # else 24 | # debug "Portmaster databases are left in tree as expected" 25 | # fi 26 | # 27 | # if ! [ -e /opt/safing/portmaster/config.json ]; then 28 | # error "Portmaster global settings should have been left in tree" 29 | # else 30 | # debug "Portmaster global settings are left in tree as expected" 31 | # fi 32 | # 33 | # if ! [ -d /opt/safing/portmaster/logs ] ; then 34 | # error "Portmaster logs should have been left in tree" 35 | # else 36 | # debug "Portmaster logs are left in tree as expected" 37 | # fi 38 | # endgroup 39 | 40 | group "Binaries are deleted" 41 | if [ -d /opt/safing/portmaster/updates ]; then 42 | error "Updates directory should have been removed" 43 | else 44 | debug "Updates directory has been removed as expected" 45 | fi 46 | endgroup 47 | 48 | finish_tests -------------------------------------------------------------------------------- /linux/templates/snippets/install-systemd-utils.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Prepares systemd support by creating a symlink for the .service file 3 | # and enabling/disabling certain features of our .service unit based on 4 | # the available systemd version. 5 | # 6 | installSystemdSupport() { 7 | local changed="False" 8 | if command -V systemctl >/dev/null 2>&1; then 9 | local systemd_version="$(systemctl --version | head -1 | sed -n 's/systemd \([0-9]*\).*/\1/p')" 10 | # not all distros have migrated /lib to /usr/lib yet but all that 11 | # have provide a symlink from /lib -> /usr/lib so we just prefix with 12 | # /lib here. 13 | ln -s /opt/safing/portmaster/portmaster.service /lib/systemd/system/portmaster.service 2>/dev/null >&2 ||: 14 | 15 | # rhel/centos8 does not yet have ProtectKernelLogs available 16 | if [ "${systemd_version}" -lt 244 ]; then 17 | sed -i "s/^ProtectKernelLogs/#ProtectKernelLogs/g" /opt/safing/portmaster/portmaster.service ||: 18 | changed="True" 19 | fi 20 | 21 | # SystemCallFilter groups are added in 231 so make sure we comment it out 22 | if [ "${systemd_version}" -lt 231 ]; then 23 | sed -i "s/^SystemCall/#SystemCall/g" /opt/safing/portmaster/portmaster.service ||: 24 | changed="True" 25 | fi 26 | 27 | if [ "${changed}" = "True" ] && [ "$1" = "upgrade" ]; then 28 | systemctl daemon-reload ||: 29 | fi 30 | 31 | log "Configuring portmaster.service to launch at boot" 32 | systemctl enable portmaster.service ||: 33 | fi 34 | } -------------------------------------------------------------------------------- /linux/portmaster.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Portmaster by Safing 3 | Documentation=https://safing.io 4 | Documentation=https://docs.safing.io 5 | Before=nss-lookup.target network.target shutdown.target 6 | After=systemd-networkd.service 7 | Conflicts=shutdown.target 8 | Conflicts=firewalld.service 9 | Wants=nss-lookup.target 10 | 11 | [Service] 12 | Type=simple 13 | Restart=on-failure 14 | RestartSec=10 15 | LockPersonality=yes 16 | MemoryDenyWriteExecute=yes 17 | NoNewPrivileges=yes 18 | PrivateTmp=yes 19 | PIDFile=/opt/safing/portmaster/core-lock.pid 20 | Environment=LOGLEVEL=info 21 | Environment=PORTMASTER_ARGS= 22 | EnvironmentFile=-/etc/default/portmaster 23 | ProtectSystem=true 24 | #ReadWritePaths=/var/lib/portmaster 25 | #ReadWritePaths=/run/xtables.lock 26 | RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 27 | RestrictNamespaces=yes 28 | RestrictSUIDSGID=yes 29 | # In future version portmaster will require access to user home 30 | # directories to verify application permissions. 31 | ProtectHome=read-only 32 | ProtectKernelTunables=yes 33 | ProtectKernelLogs=yes 34 | ProtectControlGroups=yes 35 | PrivateDevices=yes 36 | AmbientCapabilities=cap_chown cap_kill cap_net_admin cap_net_bind_service cap_net_broadcast cap_net_raw cap_sys_module cap_sys_ptrace cap_dac_override 37 | CapabilityBoundingSet=cap_chown cap_kill cap_net_admin cap_net_bind_service cap_net_broadcast cap_net_raw cap_sys_module cap_sys_ptrace cap_dac_override 38 | SystemCallArchitectures=native 39 | SystemCallFilter=@system-service @module 40 | SystemCallErrorNumber=EPERM 41 | ExecStart=/opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster core -- $PORTMASTER_ARGS 42 | ExecStopPost=-/opt/safing/portmaster/portmaster-start recover-iptables 43 | 44 | [Install] 45 | WantedBy=multi-user.target 46 | -------------------------------------------------------------------------------- /linux/templates/snippets/post-install.sh: -------------------------------------------------------------------------------- 1 | # 2 | # install .desktop files, either using desktop-file-install when available 3 | # or by just copying the files into /usr/share/applications. 4 | # 5 | if command -V desktop-file-install >/dev/null 2>&1; then 6 | desktop-file-install /opt/safing/portmaster/portmaster.desktop ||: 7 | desktop-file-install /opt/safing/portmaster/portmaster_notifier.desktop ||: 8 | elif [ -d /usr/share/applications ]; then 9 | cp /opt/safing/portmaster/portmaster.desktop /usr/share/applications 2>/dev/null ||: 10 | cp /opt/safing/portmaster/portmaster_notifier.desktop /usr/share/applications 2>/dev/null ||: 11 | fi 12 | 13 | installSystemdSupport 14 | 15 | # 16 | # Fix selinux permissions for portmaster-start 17 | # 18 | if command -V getenforce >/dev/null 2>&1; then 19 | chcon -t bin_t /opt/safing/portmaster/portmaster-start 20 | fi 21 | 22 | # 23 | # Prepare the installation directory tree 24 | # 25 | /opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster clean-structure 26 | 27 | # 28 | # Finally, trigger downloading modules. As this requires internet access 29 | # it is more likely to fail and is thus the last thing we do. 30 | # 31 | if [ "${skip_downloads}" = "True" ]; then 32 | log "Downloading of Portmaster modules skipped!" 33 | log "Please run '/opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster update' manually.\n" 34 | return 35 | fi 36 | log "Downloading portmaster modules. This may take a while ..." 37 | /opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster update --update-agent "${download_agent}" 2>/dev/null >/dev/null || ( 38 | log "Failed to download modules" 39 | log "Please run '/opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster update' manually.\n" 40 | ) -------------------------------------------------------------------------------- /linux/Makefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | STARTURL ?= https://updates.safing.io/latest/linux_amd64/start/portmaster-start\?CI 3 | NFPM ?= nfpm 4 | 5 | .PHONY: icons test-debian test-ubuntu nfpm.yaml 6 | 7 | all: deb rpm 8 | 9 | nfpm.yaml: portmaster-start 10 | sed -e "s/^version:.*$$/version: v$(shell ./portmaster-start version --short)-$(shell cat ./pkgrev)/g" ./nfpm.yaml.template > ./nfpm.yaml 11 | 12 | build: icons nfpm.yaml gen-scripts gen-pkgbuild 13 | 14 | icons: 15 | for res in 16 32 48 96 128 ; do \ 16 | mkdir -p icons/$${res}x$${res} ; \ 17 | convert ./portmaster_logo.png -resize "$${res}x$${res}" "icons/$${res}x$${res}/portmaster.png" ; \ 18 | done 19 | 20 | portmaster-start: 21 | curl --fail --user-agent GitHub -o portmaster-start $(STARTURL) 22 | chmod +x ./portmaster-start 23 | 24 | deb: distdir build 25 | $(NFPM) package --packager deb -t dist 26 | 27 | rpm: distdir build 28 | $(NFPM) package --packager rpm -t dist 29 | 30 | distdir: 31 | mkdir -p ./dist 32 | 33 | clean: 34 | rm -r ./portmaster-start ./scripts ./dist icons/ PKGBUILD arch.install nfpm.yaml src pkg portmaster-bin-*.pkg.tar.xz|| true 35 | 36 | test-debian: build deb 37 | docker run -ti --rm -v $(shell pwd)/dist:/work -w /work debian:latest bash -c 'apt update && apt install -y ca-certificates && dpkg -i /work/portmaster*.deb ; bash' 38 | 39 | test-ubuntu: build deb 40 | docker run -ti --rm -v $(shell pwd)/dist:/work -w /work ubuntu:latest bash -c 'apt update && apt install -y ca-certificates && dpkg -i /work/portmaster*.deb ; bash' 41 | 42 | increase-pkgrev: 43 | bash -c 'rev=$$(cat pkgrev) ; ((rev++)) ; echo $${rev} > ./pkgrev' 44 | 45 | reset-pkgrev: 46 | echo 1 > ./pkgrev 47 | 48 | gen-scripts: 49 | mkdir -p ./scripts 50 | for file in "rules" "preinstall.sh" "postinstall.sh" "preremove.sh" "postremove.sh"; do \ 51 | gomplate -f "templates/$${file}" > "./scripts/$${file}" ; \ 52 | done; 53 | 54 | gen-pkgbuild: nfpm.yaml 55 | gomplate -d "nfpm=./nfpm.yaml" -f templates/arch.install > arch.install 56 | gomplate -d "nfpm=./nfpm.yaml" -f templates/PKGBUILD > PKGBUILD 57 | 58 | lint: 59 | shellcheck ./scripts/* ./arch.install -------------------------------------------------------------------------------- /linux/templates/PKGBUILD: -------------------------------------------------------------------------------- 1 | {{/* Template file expects repo root as working directory */}} 2 | {{- $nfpm := (datasource "nfpm") -}} 3 | # Maintainer: {{ $nfpm.maintainer }} 4 | # 5 | {{ strings.Indent 1 "# " $nfpm.description -}} 6 | # 7 | pkgname=portmaster-bin 8 | pkgver={{ index ($nfpm.version | strings.TrimPrefix "v" | strings.SplitN "-" 2) 0 }} 9 | pkgrel={{ index ($nfpm.version | strings.SplitN "-" 2) 1 }} 10 | pkgdesc='Application Firewall: Block Mass Surveillance - Love Freedom' 11 | arch=('x86_64') 12 | url='https://safing.io/portmaster' 13 | license=('AGPL3') 14 | depends=('libnetfilter_queue') 15 | makedepends=('imagemagick') # for convert 16 | optdepends=('libappindicator-gtk3: for systray indicator') 17 | options=('!strip') 18 | provides=('portmaster') 19 | conflicts=('portmaster') 20 | install=arch.install 21 | source=("portmaster-start::https://updates.safing.io/linux_amd64/start/portmaster-start_v${pkgver//./-}" 22 | 'portmaster.desktop' 23 | 'portmaster_notifier.desktop' 24 | 'portmaster_logo.png' 25 | "portmaster.service") 26 | noextract=('portmaster-start') 27 | sha256sums=('{{ file.Read "portmaster-start" | crypto.SHA256 }}' 28 | '{{ file.Read "portmaster.desktop" | crypto.SHA256 }}' 29 | '{{ file.Read "portmaster_notifier.desktop" | crypto.SHA256 }}' 30 | '{{ file.Read "portmaster_logo.png" | crypto.SHA256 }}' 31 | '{{ file.Read "portmaster.service" | crypto.SHA256 }}') 32 | 33 | prepare() { 34 | for res in 16 32 48 96 128 ; do 35 | local iconpath="${srcdir}/icons/${res}x${res}/" 36 | mkdir -p "${iconpath}" ; 37 | convert ./portmaster_logo.png -resize "${res}x${res}" "${iconpath}/portmaster.png" ; 38 | done 39 | } 40 | 41 | package() { 42 | {{- range $nfpm.contents }} 43 | {{- if not (index . "type") }} 44 | {{- $mode := 0644 }} 45 | {{- with (index . "file_info") }} 46 | {{- $mode = (or (index . "mode") 0644 ) }} 47 | {{- else }} 48 | {{- end }} 49 | install -Dm {{ printf "%#o" $mode }} "${srcdir}/{{.src}}" "${pkgdir}{{.dst}}" 50 | {{- else if eq (index . "type") "symlink" }} 51 | install -dm 0755 "${pkgdir}{{ path.Dir .dst }}" 52 | ln -s "{{.src}}" "${pkgdir}{{.dst}}" 53 | {{- end }} 54 | {{- end }} 55 | } 56 | -------------------------------------------------------------------------------- /linux/tests/test-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | . ${SCRIPT_DIR}/common.sh 5 | 6 | # 7 | # Perform our tests 8 | # 9 | group "Systemd Integration" 10 | # 11 | # the following tests only work if the system is booted using 12 | # systemd 13 | # 14 | if is_systemd_running ; then 15 | debug "Test if portmaster.service can be reached" 16 | if ! systemctl cat portmaster.service 2>/dev/null >&2 ; then 17 | error "portmaster.service not found" 18 | else 19 | debug "portmaster.service found by systemd" 20 | fi 21 | else 22 | debug "Skipping systemctl checks ..." 23 | fi 24 | 25 | # 26 | # The following tests should work without the daemon running except 27 | # on Mint19 ... 28 | # 29 | if ! [ "${VERSION}" = "19 (Tara)" ] || is_systemd_running ; then # Skip systemd tests on Mint19 ... 30 | debug "Use systemd-analyze to verify portmaster.service" 31 | if ! systemd-analyze verify portmaster.service ; then 32 | error "systemd-analyze returned an error for portmaster.service" 33 | else 34 | debug "systemd-analyze check successful" 35 | fi 36 | else 37 | debug "Skipping systemd-analyze checks ..." 38 | fi 39 | endgroup 40 | 41 | group "Desktop file" 42 | debug "Testing portmaster.desktop" 43 | if ! desktop-file-validate /usr/share/applications/portmaster.desktop ; then 44 | error "portmaster.desktop seems invalid" 45 | else 46 | debug "portmaster.desktop seems valid" 47 | fi 48 | 49 | debug "Testing portmaster_notifier.desktop" 50 | if ! desktop-file-validate /usr/share/applications/portmaster_notifier.desktop ; then 51 | error "portmaster_notifier.desktop seems invalid" 52 | else 53 | debug "portmaster_notifier.desktop seems valid" 54 | fi 55 | endgroup 56 | 57 | group "Modules" 58 | if ! [ -e /opt/safing/portmaster/updates/stable.json ]; then 59 | error "Expected stable.json to have been downloaded" 60 | else 61 | debug "stable.json correctly downloaded from update server" 62 | fi 63 | endgroup 64 | 65 | 66 | finish_tests -------------------------------------------------------------------------------- /windows/Makefile: -------------------------------------------------------------------------------- 1 | # Note: Built for execution in container .github/actions/build-nsis 2 | 3 | STARTURL ?= https://updates.safing.io/latest/windows_amd64/start/portmaster-start.exe 4 | MAKENSIS ?= makensis 5 | WINEPREFIX ?= 6 | 7 | all: portmaster-uninstaller.exe portmaster-installer.exe 8 | 9 | prepare-wine: 10 | wget -O /tmp/nsis-installer.exe https://downloads.sourceforge.net/project/nsis/NSIS%203/3.08/nsis-3.08-setup.exe\?ts\=gAAAAABhgOi_QwQAJSZpPpH77UeO42NdRuMrbb9gHArOw_q1xuPE-qVke0568R-KvtJXhFvZ6Z142oyJlQYiDDLQtylZsOvtAw%3D%3D\&r\=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fnsis%2Ffiles%2FNSIS%25203%2F3.08%2Fnsis-3.08-setup.exe%2Fdownload%3Fuse_mirror%3Dnav%26download%3D 11 | WINEPREFIX=$(shell pwd)/.wine wine /tmp/nsis-installer.exe 12 | @echo "run: 'export WINEPREFIX=$(shell pwd)/.wine'" 13 | 14 | wine-setup: 15 | ifeq (,$(findstring $(shell pwd),$(WINEPREFIX))) 16 | which sudo && sudo chown -R $$(id -u):$$(id -g) $(WINEPREFIX) || true 17 | endif 18 | 19 | portmaster-start.exe: 20 | curl --fail --user-agent GitHub -o portmaster-start.exe $(STARTURL) 21 | 22 | portmaster-uninstaller.exe: wine-setup portmaster-installer.nsi install_summary.nsh install_finish.nsh 23 | $(MAKENSIS) -DUNINSTALLER portmaster-installer.nsi 24 | wine ./uninstaller_pkg.exe 25 | ifdef SIGN 26 | @echo -e "If wanted, sign now (on Windows) using:\nsign.bat portmaster-uninstaller.exe\npress enter to continue" 27 | @read x 28 | endif 29 | 30 | install_summary.nsh: install_summary.rtf 31 | echo -n '$${NSD_SetText} $$0 "' > install_summary.nsh 32 | perl -p -e 's/\r?\n/\$$\\r\$$\\n/' install_summary.rtf >> install_summary.nsh 33 | echo '"' >> install_summary.nsh 34 | 35 | install_finish.nsh: install_finish.rtf 36 | echo -n '$${NSD_SetText} $$0 "' > install_finish.nsh 37 | perl -p -e 's/\r?\n/\$$\\r\$$\\n/' install_finish.rtf >> install_finish.nsh 38 | echo '"' >> install_finish.nsh 39 | 40 | portmaster-installer.exe: wine-setup portmaster-start.exe portmaster-installer.nsi portmaster-uninstaller.exe install_summary.nsh install_finish.nsh 41 | $(MAKENSIS) -DINSTALLER -DPRODUCTION portmaster-installer.nsi #Production enables good compression (takes longer) 42 | ifdef SIGN 43 | @echo -e "If wanted, sign now (on Windows) using:\nsign.bat portmaster-installer.exe\npress enter to continue" 44 | @read x 45 | endif 46 | 47 | test: portmaster-installer.exe 48 | mkdir -p /tmp/test-wine 49 | rm -rf /tmp/test-wine/prefix || true 50 | WINEPREFIX=/tmp/test-wine/prefix wine ./portmaster-installer.exe 51 | 52 | clean: 53 | rm -f portmaster-uninstaller.exe 54 | rm -f uninstaller_pkg.exe 55 | rm -f portmaster-installer.exe 56 | rm -f install_summary.nsh 57 | rm -f install_finish.nsh 58 | rm -rf portmaster-start.exe 59 | -------------------------------------------------------------------------------- /windows/languages.nsh: -------------------------------------------------------------------------------- 1 | ;;; 2 | ; Multilanguage 3 | ;;; 4 | ; The Multi-Language-Part is a modified version of the MultiLanguage-NSIS-Example 5 | !insertmacro MUI_LANGUAGE "English" ; The first language is the default language 6 | !insertmacro MUI_LANGUAGE "French" 7 | !insertmacro MUI_LANGUAGE "German" 8 | !insertmacro MUI_LANGUAGE "Spanish" 9 | !insertmacro MUI_LANGUAGE "SpanishInternational" 10 | !insertmacro MUI_LANGUAGE "SimpChinese" 11 | !insertmacro MUI_LANGUAGE "TradChinese" 12 | !insertmacro MUI_LANGUAGE "Japanese" 13 | !insertmacro MUI_LANGUAGE "Korean" 14 | !insertmacro MUI_LANGUAGE "Italian" 15 | !insertmacro MUI_LANGUAGE "Dutch" 16 | !insertmacro MUI_LANGUAGE "Danish" 17 | !insertmacro MUI_LANGUAGE "Swedish" 18 | !insertmacro MUI_LANGUAGE "Norwegian" 19 | !insertmacro MUI_LANGUAGE "NorwegianNynorsk" 20 | !insertmacro MUI_LANGUAGE "Finnish" 21 | !insertmacro MUI_LANGUAGE "Greek" 22 | !insertmacro MUI_LANGUAGE "Russian" 23 | !insertmacro MUI_LANGUAGE "Portuguese" 24 | !insertmacro MUI_LANGUAGE "PortugueseBR" 25 | !insertmacro MUI_LANGUAGE "Polish" 26 | !insertmacro MUI_LANGUAGE "Ukrainian" 27 | !insertmacro MUI_LANGUAGE "Czech" 28 | !insertmacro MUI_LANGUAGE "Slovak" 29 | !insertmacro MUI_LANGUAGE "Croatian" 30 | !insertmacro MUI_LANGUAGE "Bulgarian" 31 | !insertmacro MUI_LANGUAGE "Hungarian" 32 | !insertmacro MUI_LANGUAGE "Thai" 33 | !insertmacro MUI_LANGUAGE "Romanian" 34 | !insertmacro MUI_LANGUAGE "Latvian" 35 | !insertmacro MUI_LANGUAGE "Macedonian" 36 | !insertmacro MUI_LANGUAGE "Estonian" 37 | !insertmacro MUI_LANGUAGE "Turkish" 38 | !insertmacro MUI_LANGUAGE "Lithuanian" 39 | !insertmacro MUI_LANGUAGE "Slovenian" 40 | !insertmacro MUI_LANGUAGE "Serbian" 41 | !insertmacro MUI_LANGUAGE "SerbianLatin" 42 | !insertmacro MUI_LANGUAGE "Arabic" 43 | !insertmacro MUI_LANGUAGE "Farsi" 44 | !insertmacro MUI_LANGUAGE "Hebrew" 45 | !insertmacro MUI_LANGUAGE "Indonesian" 46 | !insertmacro MUI_LANGUAGE "Mongolian" 47 | !insertmacro MUI_LANGUAGE "Luxembourgish" 48 | !insertmacro MUI_LANGUAGE "Albanian" 49 | !insertmacro MUI_LANGUAGE "Breton" 50 | !insertmacro MUI_LANGUAGE "Belarusian" 51 | !insertmacro MUI_LANGUAGE "Icelandic" 52 | !insertmacro MUI_LANGUAGE "Malay" 53 | !insertmacro MUI_LANGUAGE "Bosnian" 54 | !insertmacro MUI_LANGUAGE "Kurdish" 55 | !insertmacro MUI_LANGUAGE "Irish" 56 | !insertmacro MUI_LANGUAGE "Uzbek" 57 | !insertmacro MUI_LANGUAGE "Galician" 58 | !insertmacro MUI_LANGUAGE "Afrikaans" 59 | !insertmacro MUI_LANGUAGE "Catalan" 60 | !insertmacro MUI_LANGUAGE "Esperanto" 61 | ;!insertmacro MUI_LANGUAGE "Asturian" 62 | !insertmacro MUI_LANGUAGE "Basque" 63 | !insertmacro MUI_LANGUAGE "Pashto" 64 | !insertmacro MUI_LANGUAGE "ScotsGaelic" 65 | !insertmacro MUI_LANGUAGE "Georgian" 66 | !insertmacro MUI_LANGUAGE "Vietnamese" 67 | !insertmacro MUI_LANGUAGE "Welsh" 68 | !insertmacro MUI_LANGUAGE "Armenian" 69 | !insertmacro MUI_LANGUAGE "Corsican" 70 | !insertmacro MUI_LANGUAGE "Tatar" 71 | !insertmacro MUI_LANGUAGE "Hindi" 72 | 73 | !insertmacro MUI_RESERVEFILE_LANGDLL 74 | -------------------------------------------------------------------------------- /linux/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Safing ICS Technologies 2 | # 3 | # Application Firewall: Block Mass Surveillance - Love Freedom 4 | # The Portmaster enables you to protect your data on your device. You 5 | # are back in charge of your outgoing connections: you choose what data 6 | # you share and what data stays private. Read more on docs.safing.io. 7 | # 8 | pkgname=portmaster-bin 9 | pkgver=0.7.0 10 | pkgrel=1 11 | pkgdesc='Application Firewall: Block Mass Surveillance - Love Freedom' 12 | arch=('x86_64') 13 | url='https://safing.io/portmaster' 14 | license=('AGPL3') 15 | depends=('libnetfilter_queue') 16 | makedepends=('imagemagick') # for convert 17 | optdepends=('libappindicator-gtk3: for systray indicator') 18 | options=('!strip') 19 | provides=('portmaster') 20 | conflicts=('portmaster') 21 | install=arch.install 22 | source=("portmaster-start::https://updates.safing.io/linux_amd64/start/portmaster-start_v${pkgver//./-}" 23 | 'portmaster.desktop' 24 | 'portmaster_notifier.desktop' 25 | 'portmaster_logo.png' 26 | "portmaster.service") 27 | noextract=('portmaster-start') 28 | sha256sums=('6ade636aaf2b608f251972fd98b25a8020b301023a6377e5275de5195a132e7f' 29 | '7b0c03e4552dd86caeff2d628b13346cfe70a646af11abac6555e348e46c28da' 30 | '490b586f185218fdd947e8f12aa2dc412d78d89c8ce9b8ef5a75cb2e5ffb94ae' 31 | 'ecb02625952594af86d3b53762363c1e227c2b9604fc9c9423682fc87a92a957' 32 | 'd08a3b5f3aee351f8e120e6e2e0a089964b94c9e9d0a9e5fa822e60880e315fd') 33 | 34 | prepare() { 35 | for res in 16 32 48 96 128 ; do 36 | local iconpath="${srcdir}/icons/${res}x${res}/" 37 | mkdir -p "${iconpath}" ; 38 | convert ./portmaster_logo.png -resize "${res}x${res}" "${iconpath}/portmaster.png" ; 39 | done 40 | } 41 | 42 | package() { 43 | install -Dm 0755 "${srcdir}/portmaster-start" "${pkgdir}/opt/safing/portmaster/portmaster-start" 44 | install -Dm 0644 "${srcdir}/portmaster.desktop" "${pkgdir}/opt/safing/portmaster/portmaster.desktop" 45 | install -Dm 0644 "${srcdir}/portmaster_notifier.desktop" "${pkgdir}/opt/safing/portmaster/portmaster_notifier.desktop" 46 | install -dm 0755 "${pkgdir}/etc/xdg/autostart" 47 | ln -s "/opt/safing/portmaster/portmaster_notifier.desktop" "${pkgdir}/etc/xdg/autostart/portmaster_notifier.desktop" 48 | install -Dm 0644 "${srcdir}/portmaster.service" "${pkgdir}/opt/safing/portmaster/portmaster.service" 49 | install -Dm 0644 "${srcdir}/icons/32x32/portmaster.png" "${pkgdir}/usr/share/pixmaps/portmaster.png" 50 | install -Dm 0644 "${srcdir}/icons/16x16/portmaster.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/portmaster.png" 51 | install -Dm 0644 "${srcdir}/icons/32x32/portmaster.png" "${pkgdir}/usr/share/icons/hicolor/32x32/apps/portmaster.png" 52 | install -Dm 0644 "${srcdir}/icons/48x48/portmaster.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/portmaster.png" 53 | install -Dm 0644 "${srcdir}/icons/96x96/portmaster.png" "${pkgdir}/usr/share/icons/hicolor/96x96/apps/portmaster.png" 54 | install -Dm 0644 "${srcdir}/icons/128x128/portmaster.png" "${pkgdir}/usr/share/icons/hicolor/128x128/apps/portmaster.png" 55 | } 56 | -------------------------------------------------------------------------------- /linux/nfpm.yaml.template: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=./schema.json 2 | name: "portmaster" 3 | arch: "amd64" 4 | platform: "linux" 5 | version: # set by make template 6 | section: "default" 7 | priority: "extra" 8 | maintainer: "Safing ICS Technologies " 9 | description: | 10 | Application Firewall: Block Mass Surveillance - Love Freedom 11 | The Portmaster enables you to protect your data on your device. You 12 | are back in charge of your outgoing connections: you choose what data 13 | you share and what data stays private. Read more on docs.safing.io. 14 | vendor: "Safing ICS Technologies" 15 | homepage: "https://safing.io" 16 | license: "AGPL" 17 | #changelog: "changelog.yaml" 18 | contents: 19 | - src: portmaster-start 20 | dst: /opt/safing/portmaster/portmaster-start 21 | file_info: 22 | mode: 0755 23 | 24 | - src: portmaster.desktop 25 | dst: /opt/safing/portmaster/portmaster.desktop 26 | 27 | - src: /opt/safing/portmaster/portmaster.desktop 28 | dst: /usr/share/applications/portmaster.desktop 29 | type: ghost 30 | 31 | - src: portmaster_notifier.desktop 32 | dst: /opt/safing/portmaster/portmaster_notifier.desktop 33 | 34 | - src: portmaster_notifier.desktop 35 | dst: /usr/share/applications/portmaster_notifier.desktop 36 | type: ghost 37 | 38 | - src: /opt/safing/portmaster/portmaster_notifier.desktop 39 | dst: /etc/xdg/autostart/portmaster_notifier.desktop 40 | type: symlink 41 | 42 | - src: portmaster.service 43 | dst: /opt/safing/portmaster/portmaster.service 44 | - src: portmaster.service 45 | dst: /lib/systemd/system/portmaster.service 46 | type: ghost 47 | 48 | # 49 | # Icons 50 | # 51 | - src: icons/32x32/portmaster.png 52 | dst: /usr/share/pixmaps/portmaster.png 53 | - src: icons/16x16/portmaster.png 54 | dst: /usr/share/icons/hicolor/16x16/apps/portmaster.png 55 | - src: icons/32x32/portmaster.png 56 | dst: /usr/share/icons/hicolor/32x32/apps/portmaster.png 57 | - src: icons/48x48/portmaster.png 58 | dst: /usr/share/icons/hicolor/48x48/apps/portmaster.png 59 | - src: icons/96x96/portmaster.png 60 | dst: /usr/share/icons/hicolor/96x96/apps/portmaster.png 61 | - src: icons/128x128/portmaster.png 62 | dst: /usr/share/icons/hicolor/128x128/apps/portmaster.png 63 | scripts: 64 | preinstall: ./scripts/preinstall.sh 65 | postinstall: ./scripts/postinstall.sh 66 | preremove: ./scripts/preremove.sh 67 | postremove: ./scripts/postremove.sh 68 | 69 | overrides: 70 | deb: 71 | depends: 72 | - libc6 73 | - libnetfilter-queue1 74 | recommends: 75 | - libappindicator3-1 76 | # - gir1.2-harfbuzz-0.0 77 | rpm: 78 | depends: 79 | - glibc-devel 80 | - libnetfilter_queue 81 | recommends: 82 | - libappindicator 83 | suggests: 84 | # Gnome-40 does not provide a systray anymore by default 85 | # The following extension re-adds support for appindicator 86 | # Note: users must still configure and enable the extension, 87 | # theres nothing we can do. 88 | - gnome-shell-extension-appindicator 89 | 90 | rpm: 91 | # The package group. This option is deprecated by most distros 92 | # but required by old distros like CentOS 5 / EL 5 and earlier. 93 | group: Unspecified 94 | 95 | deb: 96 | scripts: 97 | rules: ./scripts/rules 98 | triggers: 99 | activate: 100 | - update-icon-caches 101 | - update-desktop-database -------------------------------------------------------------------------------- /windows/shortcut-properties.nsh: -------------------------------------------------------------------------------- 1 | !include LogicLib.nsh 2 | !include Win\Propkey.nsh 3 | !include Win\COM.nsh 4 | 5 | !define /ifndef PKEY_AppUserModel_ToastActivatorCLSID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",26' ; The GUID of the property key, not the set CLSID DO NOT CHANGE! 6 | !define /ifndef VT_CLSID 72 7 | !define /ifndef STGM_READWRITE 2 8 | 9 | ; Errorhandler 10 | ; if $0 != 0, break and output Returncode and description of the current point in code; r0 is always used for the returncodes of the System::Call 11 | ; TODO: safely clean Memory on Error 12 | !define Shortcut_returnOnError `!insertmacro Shortcut_returnOnError $0` 13 | !macro Shortcut_returnOnError _retVal _Msg 14 | ${If} ${_retVal} <> 0 ; (<>) == (!=) 15 | DetailPrint "Error-Point: ${_Msg}" 16 | DetailPrint "Error-Code: ${_retVal}" 17 | Goto Shortcut_onError 18 | ${EndIf} 19 | !macroend 20 | 21 | ;;; 22 | ; Sets specified AppID and CLSID as File-Property in the way needed for Toast Notifications 23 | ; Pushes return-value (Windows HRESULT) to stack (0: Success) 24 | ; Example: !insertmacro ShortcutSetToastProperties "$SMPROGRAMS\test.lnk" "{32860D72-BA7F-64CC-AF50-72B6FB1ECE26}" "com.example.nsisdemo" ; DON'T USE THIS GUID!!! 25 | ; WARNING: Because of the limited lifetime of the installer and the minimal RAM usage, it wasn't taken care of freeing all allocated stuff, especially in the case, something goes wrong 26 | ;;; 27 | !macro ShortcutSetToastProperties ShortcutPath CLSID AppID 28 | 29 | DetailPrint "Add Toast-Properties to Shortcut" 30 | 31 | System::Store S ; Seems to save the variables $0-$9 somewhere so we can use this variables without danger 32 | 33 | 34 | ; internal Variable-Usage: 35 | ; $0: Return-Value of operations (was successful?) 36 | ; $1: COM-Object-Pointer 37 | ; $2: IPersistFile-Pointer 38 | ; $3: IPropertyStore-Pointer 39 | ; $4: Propertystore-Key-Struct 40 | ; $5: Propertystore-Val-Struct 41 | ; $6: temporary Property-Val extra storage (if val is pointer) 42 | ; $7: temporary length OR strlen of a string 43 | 44 | ; Set $0-$9 to known invalid values as additional prevention of unwanted behaviour 45 | IntOp $0 0 - 1 46 | IntOp $1 0 + 0 47 | IntOp $2 0 + 0 48 | IntOp $3 0 + 0 49 | IntOp $4 0 + 0 50 | IntOp $5 0 + 0 51 | IntOp $6 0 + 0 52 | IntOp $7 0 - 1 53 | IntOp $8 0 + 0 54 | IntOp $9 0 + 0 55 | 56 | !insertmacro ComHlpr_CreateInProcInstance ${CLSID_ShellLink} ${IID_IShellLink} r1 ".r0" ; creates ComHlpr_CreateInProcInstance into $1 57 | ${Shortcut_returnOnError} "CoCreateInstance" ; check for Errors 58 | 59 | ${IUnknown::QueryInterface} $1 '("${IID_IPersistFile}",.r2)i.r0' ; creates IPersistFile into $2 60 | ${Shortcut_returnOnError} "Create IPersistFile QueryInterface" 61 | 62 | ${IPersistFile::Load} $2 "('${ShortcutPath}', ${STGM_READWRITE})i.r0" ; Loads Shortcut 63 | ${Shortcut_returnOnError} "Load Shortcut" 64 | 65 | ${IUnknown::QueryInterface} $1 '("${IID_IPropertyStore}",.r3)i.r0' ; creates IPropertyStore into $3 66 | ${Shortcut_returnOnError} "Create IID_IPropertyStore QueryInterface" 67 | 68 | 69 | ;;; 70 | ; CLSID 71 | ;;; 72 | System::Call '*${SYSSTRUCT_PROPERTYKEY}(${PKEY_AppUserModel_ToastActivatorCLSID})p.r4' ; Sets up Struct for PropertyKey (CLSID) 73 | System::Call '*(&g16 "${CLSID}")p.r6' ; Store CLSID into struct just to have the Value stored somewhere we can point to (I don't know, how to define plain variables, so an Struct which has no overhead is used) 74 | System::Call '*${SYSSTRUCT_PROPVARIANT}(${VT_CLSID},,p r6)p.r5' ; Sets up Struct for PropertyValue (actually, the value is a pointer to the actual value) 75 | 76 | ${IPropertyStore::SetValue} $3 '($4,$5)i.r0' ; Actually sets Key-Value-Pair in IPropertyStore-Object ($3) 77 | ${Shortcut_returnOnError} "Set CLSID" 78 | 79 | System::Free $6 ; Free temporary value-struct 80 | ; The structs $4 and $5 are reused for AppID 81 | 82 | 83 | ;;; 84 | ; AppID 85 | ;;; 86 | ; $4 and $5 are reused, $6 is reallocated 87 | 88 | System::Call '*$4${SYSSTRUCT_PROPERTYKEY}(${PKEY_AppUserModel_ID})' ; Loads PropertyKey into already existing struct $4 89 | 90 | ; Calculate the Bytes needed to allocate for copying the AppID as wstring, write number into $7 91 | StrLen $7 "${AppID}" 92 | IntOp $7 $7 + 1 ; incl. \0 93 | IntOp $7 $7 * 2 ; wchars are 2 Byte wide in Windows 94 | System::Call "ole32::CoTaskMemAlloc(i $7)p.r6" ; allocate $7 Bytes into $6 for temporarily storing the AppID as WSTRING (a pointer to the String is required, so we need manual allocation) 95 | 96 | ${If} $6 = 0 ; Is the pointer to the allocated Memory NULL? (= No space left for allocation, then return a Error) 97 | DetailPrint "No RAM could be allocated for AppID" 98 | Goto Shortcut_onError 99 | ${EndIf} 100 | 101 | StrLen $7 ${AppID} ; Now store the stringlength of the AppID into $7, not the Bytecount! 102 | IntOp $7 $7 + 1 ; Add \0 103 | System::Call '*$6(&w$7 "${AppID}")' ; memcpy (wstring)AppID into $6 the temporary storage of the PropertyValue 104 | System::Call '*$5${SYSSTRUCT_PROPVARIANT}(${VT_LPWSTR},,p r6)' ; Load Property-Val into $5 105 | 106 | ${IPropertyStore::SetValue} $3 '($4,$5)i.r0' ; Actually sets Key-Value-Pair in IPropertyStore-Object ($3) 107 | ${Shortcut_returnOnError} "Save AppID" 108 | 109 | ${IPropertyStore::Commit} $3 "i.r0" ; Commit changes in IPropertyStore-Object ($3) 110 | ${Shortcut_returnOnError} "Commit changes to PropertyStore" 111 | 112 | ${IPersistFile::Save} $2 '("${ShortcutPath}",1)r.r0' ; Save changes into Shortcut at ${ShortcutPath} (IPersistFile at $2) 113 | ${Shortcut_returnOnError} "Save Shortcut" 114 | 115 | ; Freeing&Releasing stuff (TODO: do in case of Error?) 116 | System::Call "ole32::CoTaskMemFree(p r6)" ; Free the temporary Storage; It was allocated using ole32::CoTaskMemAlloc(), therefore it needs to be freeed using ole32::CoTaskMemFree() 117 | System::Free $4 ; Freeing PropertyKey-Struct 118 | System::Free $5 ; Freeing PropertyValue-Struct 119 | ${IUnknown::Release} $3 "" ; Releasing IPropertyStore-Object at $3 120 | ${IUnknown::Release} $2 "" ; Releasing IPersistFile at $2 121 | ${IUnknown::Release} $1 "" ; Releasing COM-Object at $1 122 | 123 | DetailPrint "Successfully added Toast-Properties to Shortcut" 124 | 125 | Shortcut_onError: ; Label to which is jumped on previous Error 126 | push $0 ; pushes return Value to Stack 127 | System::Store L ; Seems to load the previous values of $0-$9 ... 128 | !macroend 129 | -------------------------------------------------------------------------------- /.github/workflows/linux.yml: -------------------------------------------------------------------------------- 1 | name: Linux 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | shellcheck: 11 | name: Shellcheck 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: Run ShellCheck 16 | uses: ludeeus/action-shellcheck@master 17 | with: 18 | ignore_paths: windows linux/templates linux/tests 19 | 20 | build: 21 | name: Build artifacts 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@v2 25 | 26 | - name: Install nfpm@latest 27 | run: curl -o /tmp/nfpm.tar.gz -sSL https://github.com/goreleaser/nfpm/releases/download/v2.7.1/nfpm_2.7.1_Linux_x86_64.tar.gz && cd /tmp && tar xf /tmp/nfpm.tar.gz && sudo mv nfpm /usr/local/bin && sudo chmod a+x /usr/local/bin/nfpm 28 | 29 | - name: Install gomplate 30 | run: sudo curl -o /usr/local/bin/gomplate -sSL https://github.com/hairyhenderson/gomplate/releases/download/v3.10.0/gomplate_linux-amd64 && sudo chmod +x /usr/local/bin/gomplate 31 | 32 | - name: Build packages 33 | run: make all 34 | working-directory: linux 35 | 36 | - name: Upload artifacts 37 | uses: actions/upload-artifact@v2 38 | with: 39 | name: portmaster-current 40 | path: linux/dist/* 41 | 42 | - name: Build with next pkgrev 43 | run: make clean && make increase-pkgrev && make all 44 | working-directory: linux 45 | 46 | - name: Upload artifacts with next pkgrev 47 | uses: actions/upload-artifact@v2 48 | with: 49 | name: portmaster-next 50 | path: linux/dist/* 51 | 52 | test-ubuntu: 53 | name: Test DEB package (ubuntu VM) 54 | runs-on: ubuntu-latest 55 | needs: build 56 | steps: 57 | - uses: actions/download-artifact@v2 58 | with: 59 | name: portmaster-current 60 | path: linux 61 | 62 | - name: Install tooling 63 | run: sudo bash -c "apt-get update && apt-get install -y systemd desktop-file-utils" 64 | env: 65 | DEBIAN_FRONTEND: noninteractive 66 | 67 | - name: Install dependencies 68 | run: sudo apt-get install -y libnetfilter-queue1 ca-certificates 69 | env: 70 | DEBIAN_FRONTEND: noninteractive 71 | 72 | - name: Install deb package 73 | run: yes | sudo dpkg -i ./linux/portmaster_*.deb 74 | 75 | - uses: actions/checkout@v2 76 | - name: Verify installation 77 | run: ./linux/tests/test-install.sh 78 | 79 | - uses: actions/download-artifact@v2 80 | with: 81 | name: portmaster-next 82 | path: linux/next 83 | 84 | - name: "Upgrade to next pkgrev" 85 | run: yes | sudo dpkg -i ./linux/next/portmaster_*.deb || ls -R 86 | 87 | - name: Verify upgrade 88 | run: ./linux/tests/test-upgrade.sh 89 | 90 | - name: Uninstall portmaster 91 | run: sudo apt-get remove -y portmaster 92 | 93 | - name: Verify uninstallation 94 | run: ./linux/tests/test-uninstall.sh 95 | 96 | test-deb: 97 | name: Test DEB package 98 | runs-on: ubuntu-latest 99 | strategy: 100 | matrix: 101 | container: 102 | - hugojosefson/popos 103 | - ubuntu:latest 104 | - ubuntu:rolling 105 | - ubuntu:xenial 106 | - debian:stable 107 | - debian:unstable 108 | - debian:oldstable 109 | - debian:testing 110 | - linuxmintd/mint20-amd64 111 | - linuxmintd/mint19-amd64 112 | needs: build 113 | steps: 114 | - uses: actions/download-artifact@v2 115 | with: 116 | name: portmaster-current 117 | path: linux 118 | 119 | - name: Install tooling 120 | run: sudo bash -c "apt-get update && apt-get install -y systemd desktop-file-utils" 121 | env: 122 | DEBIAN_FRONTEND: noninteractive 123 | 124 | - name: Install dependencies 125 | run: sudo apt-get install -y libnetfilter-queue1 ca-certificates 126 | env: 127 | DEBIAN_FRONTEND: noninteractive 128 | 129 | - name: Install deb package 130 | run: yes | sudo dpkg -i ./linux/portmaster_*.deb 131 | 132 | - uses: actions/checkout@v2 133 | - name: Verify installation 134 | run: sudo ./linux/tests/test-install.sh 135 | 136 | - uses: actions/download-artifact@v2 137 | with: 138 | name: portmaster-next 139 | path: ./linux/next 140 | 141 | - name: "Upgrade to next pkgrev" 142 | run: yes | sudo dpkg -i ./linux/next/portmaster_*.deb 143 | 144 | - name: Verify upgrade 145 | run: ./linux/tests/test-upgrade.sh 146 | 147 | - name: Uninstall portmaster 148 | run: sudo apt-get remove -y portmaster 149 | 150 | - name: Verify uninstallation 151 | run: ./linux/tests/test-uninstall.sh 152 | 153 | test-rpm: 154 | name: Test RPM package 155 | runs-on: ubuntu-latest 156 | needs: build 157 | strategy: 158 | matrix: 159 | container: 160 | - fedora:32 161 | - fedora:33 162 | - fedora:34 163 | - centos:7 164 | - centos:8 165 | container: ${{ matrix.container }} 166 | steps: 167 | - uses: actions/download-artifact@v2 168 | with: 169 | name: portmaster-current 170 | path: linux 171 | 172 | - name: Install tooling 173 | run: yum install -y systemd desktop-file-utils procps-ng 174 | 175 | # we use yum localinstall instead of dnf install because 176 | # not all tested distro versions have dnf available and those 177 | # that have dnf have it aliased as yum. 178 | - name: Install package 179 | run: yum localinstall -y ./linux/portmaster-*.rpm 180 | 181 | - uses: actions/checkout@v2 182 | - name: Verify installation 183 | run: ./linux/tests/test-install.sh 184 | 185 | - uses: actions/download-artifact@v2 186 | with: 187 | name: portmaster-next 188 | path: ./linux/next 189 | 190 | - name: "Upgrade to next pkgrev" 191 | run: yum localinstall -y ./linux/next/portmaster-*.rpm 192 | 193 | - name: Verify upgrade 194 | run: ./linux/tests/test-upgrade.sh 195 | 196 | - name: Uninstall portmaster 197 | run: yum remove -y portmaster 198 | 199 | - name: Verify uninstallation 200 | run: ./linux/tests/test-uninstall.sh 201 | -------------------------------------------------------------------------------- /linux/arch.install: -------------------------------------------------------------------------------- 1 | post_install() { 2 | log() { 3 | echo "$@" 4 | } 5 | # 6 | # Prepares systemd support by creating a symlink for the .service file 7 | # and enabling/disabling certain features of our .service unit based on 8 | # the available systemd version. 9 | # 10 | installSystemdSupport() { 11 | local changed="False" 12 | if command -V systemctl >/dev/null 2>&1; then 13 | local systemd_version="$(systemctl --version | head -1 | sed -n 's/systemd \([0-9]*\).*/\1/p')" 14 | # not all distros have migrated /lib to /usr/lib yet but all that 15 | # have provide a symlink from /lib -> /usr/lib so we just prefix with 16 | # /lib here. 17 | ln -s /opt/safing/portmaster/portmaster.service /lib/systemd/system/portmaster.service 2>/dev/null >&2 ||: 18 | 19 | # rhel/centos8 does not yet have ProtectKernelLogs available 20 | if [ "${systemd_version}" -lt 244 ]; then 21 | sed -i "s/^ProtectKernelLogs/#ProtectKernelLogs/g" /opt/safing/portmaster/portmaster.service ||: 22 | changed="True" 23 | fi 24 | 25 | # SystemCallFilter groups are added in 231 so make sure we comment it out 26 | if [ "${systemd_version}" -lt 231 ]; then 27 | sed -i "s/^SystemCall/#SystemCall/g" /opt/safing/portmaster/portmaster.service ||: 28 | changed="True" 29 | fi 30 | 31 | if [ "${changed}" = "True" ] && [ "$1" = "upgrade" ]; then 32 | systemctl daemon-reload ||: 33 | fi 34 | 35 | log "Configuring portmaster.service to launch at boot" 36 | systemctl enable portmaster.service ||: 37 | fi 38 | } 39 | # 40 | # install .desktop files, either using desktop-file-install when available 41 | # or by just copying the files into /usr/share/applications. 42 | # 43 | if command -V desktop-file-install >/dev/null 2>&1; then 44 | desktop-file-install /opt/safing/portmaster/portmaster.desktop ||: 45 | desktop-file-install /opt/safing/portmaster/portmaster_notifier.desktop ||: 46 | elif [ -d /usr/share/applications ]; then 47 | cp /opt/safing/portmaster/portmaster.desktop /usr/share/applications 2>/dev/null ||: 48 | cp /opt/safing/portmaster/portmaster_notifier.desktop /usr/share/applications 2>/dev/null ||: 49 | fi 50 | 51 | installSystemdSupport 52 | 53 | # 54 | # Fix selinux permissions for portmaster-start 55 | # 56 | if command -V getenforce >/dev/null 2>&1; then 57 | chcon -t bin_t /opt/safing/portmaster/portmaster-start 58 | fi 59 | 60 | # 61 | # Prepare the installation directory tree 62 | # 63 | /opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster clean-structure 64 | 65 | # 66 | # Finally, trigger downloading modules. As this requires internet access 67 | # it is more likely to fail and is thus the last thing we do. 68 | # 69 | if [ "${skip_downloads}" = "True" ]; then 70 | log "Downloading of Portmaster modules skipped!" 71 | log "Please run '/opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster update' manually.\n" 72 | return 73 | fi 74 | log "Downloading portmaster modules. This may take a while ..." 75 | /opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster update --update-agent "${download_agent}" 2>/dev/null >/dev/null || ( 76 | log "Failed to download modules" 77 | log "Please run '/opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster update' manually.\n" 78 | ) 79 | } 80 | 81 | post_upgrade() { 82 | log() { 83 | echo "$@" 84 | } 85 | # 86 | # Prepares systemd support by creating a symlink for the .service file 87 | # and enabling/disabling certain features of our .service unit based on 88 | # the available systemd version. 89 | # 90 | installSystemdSupport() { 91 | local changed="False" 92 | if command -V systemctl >/dev/null 2>&1; then 93 | local systemd_version="$(systemctl --version | head -1 | sed -n 's/systemd \([0-9]*\).*/\1/p')" 94 | # not all distros have migrated /lib to /usr/lib yet but all that 95 | # have provide a symlink from /lib -> /usr/lib so we just prefix with 96 | # /lib here. 97 | ln -s /opt/safing/portmaster/portmaster.service /lib/systemd/system/portmaster.service 2>/dev/null >&2 ||: 98 | 99 | # rhel/centos8 does not yet have ProtectKernelLogs available 100 | if [ "${systemd_version}" -lt 244 ]; then 101 | sed -i "s/^ProtectKernelLogs/#ProtectKernelLogs/g" /opt/safing/portmaster/portmaster.service ||: 102 | changed="True" 103 | fi 104 | 105 | # SystemCallFilter groups are added in 231 so make sure we comment it out 106 | if [ "${systemd_version}" -lt 231 ]; then 107 | sed -i "s/^SystemCall/#SystemCall/g" /opt/safing/portmaster/portmaster.service ||: 108 | changed="True" 109 | fi 110 | 111 | if [ "${changed}" = "True" ] && [ "$1" = "upgrade" ]; then 112 | systemctl daemon-reload ||: 113 | fi 114 | 115 | log "Configuring portmaster.service to launch at boot" 116 | systemctl enable portmaster.service ||: 117 | fi 118 | } 119 | # 120 | # As of 0.4.0 portmaster-control has been renamed to portmaster-start 121 | # and is not placed in /usr/bin anymore. Unfortunately, the postrm script 122 | # of the old installer does not get rid of portmaster-control so we should 123 | # take care during an upgrade. 124 | # 125 | rm /usr/bin/portmaster-control 2>/dev/null >&2 ||: 126 | 127 | # 128 | # If there's already a /var/lib/portmaster installation we're going to move 129 | # configs and databases and remove the complete directory 130 | # The preinstall.sh already checked that /var/lib/portmaster/updates MUST NOT 131 | # exist so we should be safe to touch the databases here. 132 | # 133 | if [ -d /var/lib/portmaster ]; then 134 | if [ ! -d /opt/safing/portmaster/config.json ]; then 135 | log "Migrating from previous installation at /var/lib/portmaster to /opt/safing/portmaster ..." 136 | mv /var/lib/portmaster/databases /opt/safing/portmaster/databases ||: 137 | mv /var/lib/portmaster/config.json /opt/safing/portmaster/config.json ||: 138 | fi 139 | log "Removing previous installation directory at /var/lib/portmaster" 140 | rm -r /var/lib/portmaster 2>/dev/null >&2 ||: 141 | fi 142 | 143 | } 144 | 145 | pre_remove() { 146 | log() { 147 | echo "$@" 148 | } 149 | # stop the portmaster service and disable it if it's enabled. 150 | if command -V systemctl >/dev/null 2>&1; then 151 | if (systemctl -q is-active portmaster.service); then 152 | log "Stopping portmaster.service" 153 | systemctl stop portmaster.service ||: 154 | fi 155 | if (systemctl -q is-enabled portmaster.service); then 156 | log "Disabling portmaster.service to launch at boot" 157 | systemctl disable portmaster.service ||: 158 | fi 159 | fi 160 | } 161 | 162 | post_remove() { 163 | log() { 164 | echo "$@" 165 | } 166 | rm -rf /opt/safing/portmaster/updates ||: 167 | 168 | # file is marked as a ghost on RPM system so it might have 169 | # been automatically deleted by the package manager. 170 | rm /lib/systemd/system/portmaster.service 2>/dev/null >&2 ||: 171 | rm /usr/share/applications/portmaster.desktop 2>/dev/null >&2 ||: 172 | rm /usr/share/applications/portmaster_notifier.desktop 2>/dev/null >&2 ||: 173 | 174 | if [ "$1" = "purge" ]; then 175 | rm -rf /opt/safing/portmaster ||: 176 | fi 177 | 178 | } 179 | -------------------------------------------------------------------------------- /windows/portmaster-installer.nsi: -------------------------------------------------------------------------------- 1 | Unicode true ; The Multi-Language-Part is a modified version of the MultiLanguage-NSIS-Example 2 | 3 | !define MUI_ICON "portmaster.ico" 4 | !define MUI_UNICON "portmaster.ico" 5 | !define MUI_HEADERIMAGE 6 | 7 | !include MUI2.nsh 8 | !include nsDialogs.nsh 9 | !include LogicLib.nsh 10 | !include WinVer.nsh 11 | !include x64.nsh 12 | !include shortcut-properties.nsh 13 | 14 | Name "Portmaster" 15 | 16 | !ifdef UNINSTALLER 17 | SilentInstall silent 18 | OutFile "uninstaller_pkg.exe" 19 | SetCompress off 20 | !endif 21 | !ifdef INSTALLER 22 | OutFile "portmaster-installer.exe" 23 | 24 | !ifdef PRODUCTION 25 | SetCompressor /SOLID lzma 26 | !else 27 | SetCompress off 28 | !endif 29 | !endif 30 | 31 | #InstallDir "$Programfiles64\Safing\Portmaster" 32 | !define ProgrammFolderLink "$Programfiles64\Safing\Portmaster.lnk" 33 | !define Parent_ProgrammFolderLink "$Programfiles64\Safing" 34 | !define ExeName "portmaster-start.exe" 35 | !define LogoName "portmaster.ico" 36 | !define SnoreToastExe "SnoreToast.exe" 37 | 38 | !define MUI_ABORTWARNING 39 | !define MUI_LANGDLL_ALLLANGUAGES ; The Multi-Language-Part is a modified version of the MultiLanguage-NSIS-Example 40 | 41 | Var InstDir_parent 42 | 43 | ;; 44 | ; Pages 45 | ;; 46 | ;!insertmacro MUI_PAGE_WELCOME 47 | !insertmacro MUI_PAGE_LICENSE "LICENSE.txt" 48 | ;!insertmacro MUI_PAGE_COMPONENTS 49 | ;!insertmacro MUI_PAGE_DIRECTORY 50 | Page custom fnc_PageSummary_Show 51 | !insertmacro MUI_PAGE_INSTFILES 52 | Page custom fnc_PageFinish_Show 53 | !insertmacro MUI_PAGE_FINISH 54 | 55 | ; Uninstaller Pages 56 | !ifdef UNINSTALLER 57 | !insertmacro MUI_UNPAGE_CONFIRM 58 | !insertmacro MUI_UNPAGE_COMPONENTS 59 | !insertmacro MUI_UNPAGE_INSTFILES 60 | !insertmacro MUI_UNPAGE_FINISH 61 | !endif 62 | 63 | !include languages.nsh 64 | 65 | Function fnc_PageSummary_Show 66 | nsDialogs::Create 1018 67 | Pop $0 68 | ${If} $0 == error 69 | Abort 70 | ${EndIf} 71 | !insertmacro MUI_HEADER_TEXT "Install Summary" "" 72 | 73 | nsDialogs::CreateControl "RichEdit20A" ${ES_READONLY}|${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_VSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN} ${WS_EX_STATICEDGE} 0 0 100% 119u '' 74 | Pop $0 75 | !include install_summary.nsh 76 | 77 | nsDialogs::Show 78 | FunctionEnd 79 | 80 | Function fnc_PageFinish_Show 81 | nsDialogs::Create 1018 82 | Pop $0 83 | ${If} $0 == error 84 | Abort 85 | ${EndIf} 86 | !insertmacro MUI_HEADER_TEXT "Install Successfull" "" 87 | 88 | nsDialogs::CreateControl "RichEdit20A" ${ES_READONLY}|${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_VSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN} ${WS_EX_STATICEDGE} 0 0 100% 119u '' 89 | Pop $0 90 | !include install_finish.nsh 91 | 92 | nsDialogs::Show 93 | FunctionEnd 94 | 95 | Function .onInit 96 | ReadEnvStr $0 PROGRAMDATA 97 | StrCpy $InstDir "$0\Safing\Portmaster" 98 | StrCpy $InstDir_parent "$0\Safing" 99 | SetRebootFlag true 100 | FunctionEnd 101 | 102 | Function un.onInit 103 | ReadEnvStr $0 PROGRAMDATA 104 | StrCpy $InstDir "$0\Safing\Portmaster" 105 | StrCpy $InstDir_parent "$0\Safing" 106 | SetRebootFlag true 107 | FunctionEnd 108 | 109 | !ifdef INSTALLER 110 | Section "Install" 111 | SetOutPath $INSTDIR 112 | 113 | SetShellVarContext all 114 | 115 | IfFileExists "$Programfiles64\Safing\Portmaster" 0 noAncientUpdate 116 | DetailPrint "Removing old Portmaster Files" 117 | 118 | RMDIR /R "$SMPROGRAMS\Portmaster" 119 | Delete "$SMSTARTUP\Portmaster Notifier.lnk" 120 | RMDir /R /REBOOTOK "$Programfiles64\Safing\Portmaster" 121 | noAncientUpdate: 122 | 123 | IfFileExists "$INSTDIR\${ExeName}" 0 dontUpdate 124 | DetailPrint "Removing old Portmaster Files" 125 | 126 | ; The Exe already exists, so we will have to move the old exe first 127 | Delete "$INSTDIR\${ExeName}.bak" 128 | Rename "$INSTDIR\${ExeName}" "$INSTDIR\${ExeName}.bak" 129 | Delete /REBOOTOK "$INSTDIR\${ExeName}.bak" 130 | dontUpdate: 131 | File "${ExeName}" 132 | 133 | File "${LogoName}" 134 | File "portmaster-uninstaller.exe" 135 | 136 | CreateDirectory "${Parent_ProgrammFolderLink}" 137 | CreateShortcut "${ProgrammFolderLink}" "$InstDir" 138 | 139 | SetShellVarContext all 140 | CreateDirectory "$SMPROGRAMS\Portmaster" 141 | CreateShortcut "$SMPROGRAMS\Portmaster\Portmaster.lnk" "$INSTDIR\${ExeName}" "app --data=$InstDir" "$INSTDIR\portmaster.ico" 142 | CreateShortcut "$SMPROGRAMS\Portmaster\Portmaster Notifier.lnk" "$INSTDIR\${ExeName}" "notifier --data=$InstDir" "$INSTDIR\portmaster.ico" 143 | CreateShortcut "$SMSTARTUP\Portmaster Notifier.lnk" "$INSTDIR\${ExeName}" "notifier --data=$InstDir" "$INSTDIR\portmaster.ico" 144 | 145 | ; The GUID can be read out like this: strings snoretoast.exe | grep -E '^\{[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}\}$' (maybe additional lines with false-positives) 146 | !insertmacro ShortcutSetToastProperties "$SMPROGRAMS\Portmaster\Portmaster.lnk" "{7F00FB48-65D5-4BA8-A35B-F194DA7E1A51}" "io.safing.portmaster" 147 | pop $0 148 | ${If} $0 <> 0 149 | MessageBox MB_ICONEXCLAMATION "Shortcut-Attributes to enable Toast Messages could not be set" 150 | SetErrors 151 | Abort 152 | ${EndIf} 153 | DetailPrint "Sucessfully added Shortcut-Attributes for Toast Messages. Return Code: $0 (0: S_OK)" 154 | 155 | WriteRegStr HKLM "SOFTWARE\Classes\CLSID\{7F00FB48-65D5-4BA8-A35B-F194DA7E1A51}\LocalServer32" "" '"$INSTDIR\${ExeName}" notifier-snoretoast' 156 | 157 | ; prepare directory structure 158 | nsExec::ExecToStack '$INSTDIR\${ExeName} clean-structure --data=$InstDir' 159 | pop $0 160 | pop $1 161 | ; we ignore the error here as a reboot is suggested anyway and that will 162 | ; fix the above error as well. 163 | DetailPrint "Prepared the installation directory." 164 | 165 | ; download 166 | DetailPrint "Downloading Portmaster (~300MB), depending on download speeds this may take a while ..." 167 | nsExec::ExecToStack '$INSTDIR\${ExeName} update --data=$InstDir' 168 | pop $0 169 | pop $1 170 | ; DetailPrint $1 ; # would print > BOF from portmaster-start log 171 | ${If} $0 <> 0 172 | MessageBox MB_ICONEXCLAMATION "Failed to download Portmaster assets required for installation. Please check your Internet connection and try installing again." 173 | SetErrors 174 | Abort 175 | ${EndIf} 176 | DetailPrint "Sucessfully downloaded Portmaster." 177 | 178 | ; register Service 179 | nsExec::ExecToStack '$INSTDIR\${ExeName} install core-service --data=$InstDir' 180 | pop $0 181 | pop $1 182 | DetailPrint $1 183 | ${If} $0 <> 0 184 | MessageBox MB_ICONEXCLAMATION "Windows Service registration failed. Please contact our support at support@safing.io." 185 | SetErrors 186 | Abort 187 | ${EndIf} 188 | DetailPrint "Successfully registered Portmaster as a Windows Service." 189 | 190 | ;Actually gets placed at HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster because NSIS is 32 Bit 191 | ;WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 192 | ; "InstallDate" "" ; TODO 193 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 194 | "DisplayName" "Portmaster" 195 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 196 | "UninstallString" "$\"$INSTDIR\portmaster-uninstaller.exe$\"" 197 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 198 | "InstallLocation" "$\"$INSTDIR$\"" 199 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 200 | "DisplayIcon" "$\"$INSTDIR\portmaster.ico$\"" 201 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 202 | "Publisher" "Safing ICS Technologies GmbH" 203 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 204 | "HelpLink" "https://safing.io" 205 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 206 | "NoRepair" 1 207 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" \ 208 | "NoModify" 1 209 | 210 | SectionEnd 211 | 212 | !endif 213 | 214 | !ifdef UNINSTALLER 215 | Section "Uninstaller" 216 | WriteUninstaller "$EXEDIR\portmaster-uninstaller.exe" 217 | SectionEnd 218 | 219 | ;TODO: Double-check if everything is removed 220 | Section Un.Portmaster SectionPortmaster 221 | SectionIn RO 222 | SetShellVarContext all 223 | 224 | ; unregister Service 225 | nsExec::ExecToStack '$INSTDIR\${ExeName} uninstall core-service --data=$InstDir' 226 | pop $0 227 | pop $1 228 | DetailPrint $1 229 | ${If} $0 <> 0 230 | MessageBox MB_ICONEXCLAMATION "Deleting service was unsuccessfull, see details." 231 | SetErrors 232 | Abort 233 | ${EndIf} 234 | Delete "$SMSTARTUP\Portmaster Notifier.lnk" 235 | 236 | DeleteRegKey HKLM "SOFTWARE\Classes\CLSID\{7F00FB48-65D5-4BA8-A35B-F194DA7E1A51}\LocalServer32" 237 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Portmaster" 238 | 239 | Delete "${ProgrammFolderLink}" 240 | RMDir "${Parent_ProgrammFolderLink}" 241 | RMDIR /R "$SMPROGRAMS\Portmaster" 242 | RMDIR /R /REBOOTOK "$InstDir\updates" 243 | Delete /REBOOTOK "$InstDir\portmaster-start.exe" 244 | Delete /REBOOTOK "$InstDir\portmaster-uninstaller.exe" 245 | Delete /REBOOTOK "$InstDir\portmaster.ico" 246 | SectionEnd 247 | 248 | Section Un.Data SectionData 249 | RMDIR /R /REBOOTOK "$InstDir" 250 | RMDIR /REBOOTOK "$InstDir_parent" 251 | SectionEnd 252 | 253 | !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN 254 | !insertmacro MUI_DESCRIPTION_TEXT ${SectionData} "Permanently delete all user-configured global settings and application settings, as well as logs and caches." 255 | !insertmacro MUI_DESCRIPTION_TEXT ${SectionPortmaster} "Uninstall Portmaster from Windows and remove system integrations such as shortcuts, registry keys and services." 256 | !insertmacro MUI_UNFUNCTION_DESCRIPTION_END 257 | !endif 258 | -------------------------------------------------------------------------------- /linux/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$ref": "#/definitions/Config", 4 | "description": "nFPM configuration definition file", 5 | "definitions": { 6 | "APK": { 7 | "properties": { 8 | "signature": { 9 | "$schema": "http://json-schema.org/draft-04/schema#", 10 | "$ref": "#/definitions/APKSignature", 11 | "title": "apk signature" 12 | }, 13 | "scripts": { 14 | "$schema": "http://json-schema.org/draft-04/schema#", 15 | "$ref": "#/definitions/APKScripts", 16 | "title": "apk scripts" 17 | } 18 | }, 19 | "additionalProperties": false, 20 | "type": "object" 21 | }, 22 | "APKScripts": { 23 | "properties": { 24 | "preupgrade": { 25 | "type": "string", 26 | "title": "pre upgrade script" 27 | }, 28 | "postupgrade": { 29 | "type": "string", 30 | "title": "post upgrade script" 31 | } 32 | }, 33 | "additionalProperties": false, 34 | "type": "object" 35 | }, 36 | "APKSignature": { 37 | "properties": { 38 | "key_file": { 39 | "type": "string", 40 | "title": "key file", 41 | "examples": [ 42 | "key.gpg" 43 | ] 44 | }, 45 | "key_id": { 46 | "type": "string", 47 | "title": "key id", 48 | "examples": [ 49 | "bc8acdd415bd80b3" 50 | ] 51 | }, 52 | "key_name": { 53 | "type": "string", 54 | "title": "key name", 55 | "default": "maintainer_email.rsa.pub", 56 | "examples": [ 57 | "origin" 58 | ] 59 | } 60 | }, 61 | "additionalProperties": false, 62 | "type": "object" 63 | }, 64 | "Config": { 65 | "required": [ 66 | "name", 67 | "arch", 68 | "version" 69 | ], 70 | "properties": { 71 | "replaces": { 72 | "items": { 73 | "type": "string" 74 | }, 75 | "type": "array", 76 | "title": "replaces directive" 77 | }, 78 | "provides": { 79 | "items": { 80 | "type": "string" 81 | }, 82 | "type": "array", 83 | "title": "provides directive" 84 | }, 85 | "depends": { 86 | "items": { 87 | "type": "string" 88 | }, 89 | "type": "array", 90 | "title": "depends directive" 91 | }, 92 | "recommends": { 93 | "items": { 94 | "type": "string" 95 | }, 96 | "type": "array", 97 | "title": "recommends directive" 98 | }, 99 | "suggests": { 100 | "items": { 101 | "type": "string" 102 | }, 103 | "type": "array", 104 | "title": "suggests directive" 105 | }, 106 | "conflicts": { 107 | "items": { 108 | "type": "string" 109 | }, 110 | "type": "array", 111 | "title": "conflicts directive" 112 | }, 113 | "contents": { 114 | "items": { 115 | "$schema": "http://json-schema.org/draft-04/schema#", 116 | "$ref": "#/definitions/Content" 117 | }, 118 | "type": "array", 119 | "title": "files to add to the package" 120 | }, 121 | "empty_folders": { 122 | "items": { 123 | "type": "string" 124 | }, 125 | "type": "array", 126 | "title": "empty folders to be created when installing the package" 127 | }, 128 | "scripts": { 129 | "$schema": "http://json-schema.org/draft-04/schema#", 130 | "$ref": "#/definitions/Scripts", 131 | "title": "scripts to execute" 132 | }, 133 | "rpm": { 134 | "$schema": "http://json-schema.org/draft-04/schema#", 135 | "$ref": "#/definitions/RPM", 136 | "title": "rpm-specific settings" 137 | }, 138 | "deb": { 139 | "$schema": "http://json-schema.org/draft-04/schema#", 140 | "$ref": "#/definitions/Deb", 141 | "title": "deb-specific settings" 142 | }, 143 | "apk": { 144 | "$schema": "http://json-schema.org/draft-04/schema#", 145 | "$ref": "#/definitions/APK", 146 | "title": "apk-specific settings" 147 | }, 148 | "name": { 149 | "type": "string", 150 | "title": "package name" 151 | }, 152 | "arch": { 153 | "type": "string", 154 | "title": "target architecture", 155 | "examples": [ 156 | "amd64" 157 | ] 158 | }, 159 | "platform": { 160 | "type": "string", 161 | "title": "target platform", 162 | "default": "linux", 163 | "examples": [ 164 | "linux" 165 | ] 166 | }, 167 | "epoch": { 168 | "type": "string", 169 | "title": "version epoch", 170 | "default": "extracted from version", 171 | "examples": [ 172 | "2" 173 | ] 174 | }, 175 | "version": { 176 | "type": "string", 177 | "title": "version", 178 | "examples": [ 179 | "v1.0.2", 180 | "2.0.1" 181 | ] 182 | }, 183 | "version_schema": { 184 | "enum": [ 185 | "semver", 186 | "none" 187 | ], 188 | "type": "string", 189 | "title": "version schema", 190 | "default": "semver" 191 | }, 192 | "release": { 193 | "type": "string", 194 | "title": "version release", 195 | "examples": [ 196 | "1" 197 | ] 198 | }, 199 | "prerelease": { 200 | "type": "string", 201 | "title": "version prerelease", 202 | "default": "extracted from version" 203 | }, 204 | "version_metadata": { 205 | "type": "string", 206 | "title": "version metadata", 207 | "examples": [ 208 | "git" 209 | ] 210 | }, 211 | "section": { 212 | "type": "string", 213 | "title": "package section", 214 | "examples": [ 215 | "default" 216 | ] 217 | }, 218 | "priority": { 219 | "type": "string", 220 | "title": "package priority", 221 | "examples": [ 222 | "extra" 223 | ] 224 | }, 225 | "maintainer": { 226 | "type": "string", 227 | "title": "package maintainer", 228 | "examples": [ 229 | "me@example.com" 230 | ] 231 | }, 232 | "description": { 233 | "type": "string", 234 | "title": "package description" 235 | }, 236 | "vendor": { 237 | "type": "string", 238 | "title": "package vendor", 239 | "examples": [ 240 | "MyCorp" 241 | ] 242 | }, 243 | "homepage": { 244 | "type": "string", 245 | "title": "package homepage", 246 | "examples": [ 247 | "https://example.com" 248 | ] 249 | }, 250 | "license": { 251 | "type": "string", 252 | "title": "package license", 253 | "examples": [ 254 | "MIT" 255 | ] 256 | }, 257 | "changelog": { 258 | "type": "string", 259 | "title": "package changelog", 260 | "description": "see https://github.com/goreleaser/chglog for more details", 261 | "examples": [ 262 | "changelog.yaml" 263 | ] 264 | }, 265 | "disable_globbing": { 266 | "type": "boolean", 267 | "title": "wether to disable file globbing" 268 | }, 269 | "overrides": { 270 | "patternProperties": { 271 | ".*": { 272 | "$schema": "http://json-schema.org/draft-04/schema#", 273 | "$ref": "#/definitions/Overridables" 274 | } 275 | }, 276 | "type": "object", 277 | "title": "overrides", 278 | "description": "override some fields when packaging with a specific packager" 279 | } 280 | }, 281 | "additionalProperties": false, 282 | "type": "object" 283 | }, 284 | "Content": { 285 | "properties": { 286 | "src": { 287 | "type": "string" 288 | }, 289 | "dst": { 290 | "type": "string" 291 | }, 292 | "type": { 293 | "type": "string" 294 | }, 295 | "packager": { 296 | "type": "string" 297 | }, 298 | "file_info": { 299 | "$schema": "http://json-schema.org/draft-04/schema#", 300 | "$ref": "#/definitions/ContentFileInfo" 301 | } 302 | }, 303 | "additionalProperties": false, 304 | "type": "object" 305 | }, 306 | "ContentFileInfo": { 307 | "required": [ 308 | "group" 309 | ], 310 | "properties": { 311 | "owner": { 312 | "type": "string" 313 | }, 314 | "group": { 315 | "type": "string" 316 | }, 317 | "mode": { 318 | "type": "integer" 319 | }, 320 | "mtime": { 321 | "type": "string", 322 | "format": "date-time" 323 | } 324 | }, 325 | "additionalProperties": false, 326 | "type": "object" 327 | }, 328 | "Deb": { 329 | "properties": { 330 | "scripts": { 331 | "$schema": "http://json-schema.org/draft-04/schema#", 332 | "$ref": "#/definitions/DebScripts", 333 | "title": "scripts" 334 | }, 335 | "triggers": { 336 | "$schema": "http://json-schema.org/draft-04/schema#", 337 | "$ref": "#/definitions/DebTriggers", 338 | "title": "triggers" 339 | }, 340 | "breaks": { 341 | "items": { 342 | "type": "string" 343 | }, 344 | "type": "array", 345 | "title": "breaks" 346 | }, 347 | "signature": { 348 | "$schema": "http://json-schema.org/draft-04/schema#", 349 | "$ref": "#/definitions/DebSignature", 350 | "title": "signature" 351 | } 352 | }, 353 | "additionalProperties": false, 354 | "type": "object" 355 | }, 356 | "DebScripts": { 357 | "properties": { 358 | "rules": { 359 | "type": "string", 360 | "title": "rules" 361 | }, 362 | "templates": { 363 | "type": "string", 364 | "title": "templates" 365 | }, 366 | "config": { 367 | "type": "string", 368 | "title": "config" 369 | } 370 | }, 371 | "additionalProperties": false, 372 | "type": "object" 373 | }, 374 | "DebSignature": { 375 | "properties": { 376 | "key_file": { 377 | "type": "string", 378 | "title": "key file", 379 | "examples": [ 380 | "key.gpg" 381 | ] 382 | }, 383 | "key_id": { 384 | "type": "string", 385 | "title": "key id", 386 | "examples": [ 387 | "bc8acdd415bd80b3" 388 | ] 389 | }, 390 | "type": { 391 | "enum": [ 392 | "origin", 393 | "maint", 394 | "archive" 395 | ], 396 | "type": "string", 397 | "title": "signer role", 398 | "default": "origin" 399 | } 400 | }, 401 | "additionalProperties": false, 402 | "type": "object" 403 | }, 404 | "DebTriggers": { 405 | "properties": { 406 | "interest": { 407 | "items": { 408 | "type": "string" 409 | }, 410 | "type": "array", 411 | "title": "interest" 412 | }, 413 | "interest_await": { 414 | "items": { 415 | "type": "string" 416 | }, 417 | "type": "array", 418 | "title": "interest await" 419 | }, 420 | "interest_noawait": { 421 | "items": { 422 | "type": "string" 423 | }, 424 | "type": "array", 425 | "title": "interest noawait" 426 | }, 427 | "activate": { 428 | "items": { 429 | "type": "string" 430 | }, 431 | "type": "array", 432 | "title": "activate" 433 | }, 434 | "activate_await": { 435 | "items": { 436 | "type": "string" 437 | }, 438 | "type": "array", 439 | "title": "activate await" 440 | }, 441 | "activate_noawait": { 442 | "items": { 443 | "type": "string" 444 | }, 445 | "type": "array", 446 | "title": "activate noawait" 447 | } 448 | }, 449 | "additionalProperties": false, 450 | "type": "object" 451 | }, 452 | "Overridables": { 453 | "properties": { 454 | "replaces": { 455 | "items": { 456 | "type": "string" 457 | }, 458 | "type": "array", 459 | "title": "replaces directive" 460 | }, 461 | "provides": { 462 | "items": { 463 | "type": "string" 464 | }, 465 | "type": "array", 466 | "title": "provides directive" 467 | }, 468 | "depends": { 469 | "items": { 470 | "type": "string" 471 | }, 472 | "type": "array", 473 | "title": "depends directive" 474 | }, 475 | "recommends": { 476 | "items": { 477 | "type": "string" 478 | }, 479 | "type": "array", 480 | "title": "recommends directive" 481 | }, 482 | "suggests": { 483 | "items": { 484 | "type": "string" 485 | }, 486 | "type": "array", 487 | "title": "suggests directive" 488 | }, 489 | "conflicts": { 490 | "items": { 491 | "type": "string" 492 | }, 493 | "type": "array", 494 | "title": "conflicts directive" 495 | }, 496 | "contents": { 497 | "items": { 498 | "$ref": "#/definitions/Content" 499 | }, 500 | "type": "array", 501 | "title": "files to add to the package" 502 | }, 503 | "empty_folders": { 504 | "items": { 505 | "type": "string" 506 | }, 507 | "type": "array", 508 | "title": "empty folders to be created when installing the package" 509 | }, 510 | "scripts": { 511 | "$ref": "#/definitions/Scripts", 512 | "title": "scripts to execute" 513 | }, 514 | "rpm": { 515 | "$ref": "#/definitions/RPM", 516 | "title": "rpm-specific settings" 517 | }, 518 | "deb": { 519 | "$ref": "#/definitions/Deb", 520 | "title": "deb-specific settings" 521 | }, 522 | "apk": { 523 | "$ref": "#/definitions/APK", 524 | "title": "apk-specific settings" 525 | } 526 | }, 527 | "additionalProperties": false, 528 | "type": "object" 529 | }, 530 | "RPM": { 531 | "properties": { 532 | "scripts": { 533 | "$schema": "http://json-schema.org/draft-04/schema#", 534 | "$ref": "#/definitions/RPMScripts", 535 | "title": "rpm-specific scripts" 536 | }, 537 | "group": { 538 | "type": "string", 539 | "title": "package group", 540 | "examples": [ 541 | "Unspecified" 542 | ] 543 | }, 544 | "summary": { 545 | "type": "string", 546 | "title": "package summary" 547 | }, 548 | "compression": { 549 | "enum": [ 550 | "gzip", 551 | "lzma", 552 | "xz" 553 | ], 554 | "type": "string", 555 | "title": "compression algorithm to be used", 556 | "default": "gzip" 557 | }, 558 | "signature": { 559 | "$schema": "http://json-schema.org/draft-04/schema#", 560 | "$ref": "#/definitions/RPMSignature", 561 | "title": "rpm signature" 562 | } 563 | }, 564 | "additionalProperties": false, 565 | "type": "object" 566 | }, 567 | "RPMScripts": { 568 | "properties": { 569 | "pretrans": { 570 | "type": "string", 571 | "title": "pretrans script" 572 | }, 573 | "posttrans": { 574 | "type": "string", 575 | "title": "posttrans script" 576 | } 577 | }, 578 | "additionalProperties": false, 579 | "type": "object" 580 | }, 581 | "RPMSignature": { 582 | "properties": { 583 | "key_file": { 584 | "type": "string", 585 | "title": "key file", 586 | "examples": [ 587 | "key.gpg" 588 | ] 589 | }, 590 | "key_id": { 591 | "type": "string", 592 | "title": "key id", 593 | "examples": [ 594 | "bc8acdd415bd80b3" 595 | ] 596 | } 597 | }, 598 | "additionalProperties": false, 599 | "type": "object" 600 | }, 601 | "Scripts": { 602 | "properties": { 603 | "preinstall": { 604 | "type": "string", 605 | "title": "pre install" 606 | }, 607 | "postinstall": { 608 | "type": "string", 609 | "title": "post install" 610 | }, 611 | "preremove": { 612 | "type": "string", 613 | "title": "pre remove" 614 | }, 615 | "postremove": { 616 | "type": "string", 617 | "title": "post remove" 618 | } 619 | }, 620 | "additionalProperties": false, 621 | "type": "object" 622 | } 623 | } 624 | } 625 | -------------------------------------------------------------------------------- /windows/LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------