diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a8b59949f..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,681 +0,0 @@ -version: 2 -jobs: - prepare: - machine: - image: ubuntu-1604:201903-01 - - working_directory: ~/ - - steps: - - run: - name: Prepare - command: | - sudo rm -rf /var/lib/apt/lists/lock - sudo apt-get update - sudo rm -rf /var/lib/apt/lists/lock - sudo apt-get install -yq build-essential git unzip ncurses-dev libz-dev libssl-dev python subversion gettext gawk wget curl rsync perl libelf-dev python3.5 libpython3.5-stdlib liblzma-dev - pyenv global 3.5.2 - - build_x86_64: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: x86_64 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 50m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - sudo apt-get update - sudo apt-get install -yq libelf-dev - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 50m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_x86: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: x86 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_rpi3: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: rpi3 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_espressobin: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: espressobin - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_rpi4: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: rpi4 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_rpi2: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: rpi2 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile package/compile target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_bpi-r2: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: bpi-r2 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: | - sudo apt-get update - sudo apt-get -yq install swig2.0 - make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_wrt3200acm: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: wrt3200acm - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_wrt32: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 106 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain wrt3200acm - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_TARGET="wrt3200acm" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/wrt3200acm/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/wrt3200acm/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build wrt3200acm - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/wrt3200acm/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy wrt3200acm - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/wrt3200acm/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/wrt3200acm - rm -rf ~/openmptcprouter/wrt3200acm/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - - run: - name: Build toolchain wrt32x - no_output_timeout: 40m - command: | - cd ~/openmptcprouter/ - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_TARGET="wrt32x" - ln -s wrt3200acm wrt32x - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/wrt32x/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/wrt32x/source/key-build.pub - - - run: - name: Build wrt32x - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/wrt32x/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy wrt32x - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/wrt32x/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/wrt32x - -workflows: - version: 2 - main: - jobs: - - prepare: - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_x86_64: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_x86: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_rpi4: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_rpi3: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_espressobin: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_rpi2: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_bpi-r2: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_wrt32: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 3f83a0596..0ec23eb7e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,3 @@ github: [Ysurac] patreon: Ycarus -custom: https://www.paypal.me/ycarus +custom: https://www.paypal.me/ycarus1 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0f4d1da62..6d671c8c5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,3 +3,4 @@ Thanks for your contribution to OpenMPTCProuter! You need to follow contributing rules. Please remove this message before posting the pull request. +1 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..3f6173915 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,152 @@ +name: Build antrouter +on: [push] + +env: + REPO_URL: 'https://github.com/suyuan168/3grouter' + OMR_KERNEL: '5.4' + +jobs: + build: + strategy: + matrix: + OMR_TARGET: [rpi2, p2w_r619ac, r2s, x86_64, cm520-79f, nanopi_neo] + runs-on: ubuntu-latest + continue-on-error: true + + steps: + - name: Branch name + id: branch_name + run: | + echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} + echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} + echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + echo ::set-output name=WORKSPACE::${GITHUB_WORKSPACE} + - name: Prepare + run: | + sudo apt-get update + sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler + - name: Free disk space + run: | + df -h + sudo swapoff -a >/dev/null 2>&1 || true + sudo rm -f /swapfile >/dev/null 2>&1 || true + sudo apt-get autoremove -y >/dev/null 2>&1 || true + sudo apt-get autoclean -y >/dev/null 2>&1 || true + sudo rm -rf "/usr/local/share/boost" >/dev/null 2>&1 || true + sudo rm -rf "$AGENT_TOOLSDIRECTORY" >/dev/null 2>&1 || true + sudo docker rmi $(docker images -qf "dangling=true") >/dev/null 2>&1 || true + df -h + - name: Clone source code + working-directory: ../../ + env: + REPO_URL: https://github.com/suyuan168/3grouter + SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} + GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }} + run: | + git clone $REPO_URL omr + if [ "$SOURCE_NAME" != "develop" ]; then + cd omr + pwd + git fetch + git checkout master + else + cd omr + git checkout develop + fi + git pull + pwd + - name: Build toolchain + working-directory: ../../omr + env: + OMR_FEED_URL: https://github.com/suyuan168/openmptcprouter-feeds + SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} + OMR_TARGET: ${{ matrix.OMR_TARGET }} + OMR_HOST: ${{ secrets.OMR_HOST }} + OMR_PORT: ${{ secrets.OMR_PORT }} + run: | + OMR_FEED_SRC="${SOURCE_NAME}" sh build.sh prepare {tools,toolchain}/install -j$(nproc) || OMR_FEED_SRC="${SOURCE_NAME}" sh build.sh prepare {tools,toolchain}/install -j1 V=s + #echo -e "${{ secrets.OMR_PRIVKEY }}" > $OMR_TARGET/source/key-build + #echo -e "${{ secrets.OMR_PUBKEY }}" > $OMR_TARGET/source/key-build.pub + - name: Build packages + working-directory: ../../omr + env: + OMR_TARGET: ${{ matrix.OMR_TARGET }} + run: | + make IGNORE_ERRORS=m -C $OMR_TARGET/source package/{compile,install,index} -j$(nproc) || make IGNORE_ERRORS=m -C $OMR_TARGET/source package/{compile,install,index} -j1 V=s + - name: Build image + working-directory: ../../omr + env: + OMR_TARGET: ${{ matrix.OMR_TARGET }} + run: | + make IGNORE_ERRORS=m -C $OMR_TARGET/source target/install -j$(nproc) || make IGNORE_ERRORS=m -C $OMR_TARGET/source target/install -j1 V=s + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.OMR_TARGET }} + path: /home/runner/work/omr/${{ matrix.OMR_TARGET }}/source/bin + - if: steps.branch_name.outputs.SOURCE_BRANCH == '' + name: Deploy - Create directory + uses: ysurac/ssh-action@master + env: + SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} + SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }} + SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} + with: + command: | + mkdir -p /www/wwwroot/55860.com/bak/down/release/${{env.SOURCE_TAG}}/${{matrix.OMR_TARGET}} + host: ${{ secrets.OMR_DEPLOY_HOST }} + user: root + port: ${{ secrets.OMR_DEPLOY_PORT }} + key: ${{ secrets.PRIVATE_KEY }} + - if: steps.branch_name.outputs.SOURCE_BRANCH != '' + name: Deploy - Create directory + uses: ysurac/ssh-action@master + env: + SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} + SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }} + SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} + with: + command: | + mkdir -p /www/wwwroot/55860.com/bak/down/${{env.SOURCE_BRANCH}}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}} + host: ${{ secrets.OMR_DEPLOY_HOST }} + user: root + port: ${{ secrets.OMR_DEPLOY_PORT }} + key: ${{ secrets.PRIVATE_KEY }} + - name: Move binaries for rsync + working-directory: ../../omr + env: + OMR_TARGET: ${{ matrix.OMR_TARGET }} + GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }} + run: | + mv ${OMR_TARGET}/source/bin ${GITHUB_WORKSPACE}/ + - if: steps.branch_name.outputs.SOURCE_BRANCH == '' + name: Deploy - Upload via rsync + uses: ysurac/action-rsync@master + env: + ARGS: -av --delete-after + TARGET: /www/wwwroot/55860.com/bak/down/release/${{steps.branch_name.outputs.SOURCE_TAG}}/${{matrix.OMR_TARGET}} + SOURCE: ./bin/ + KEY: ${{ secrets.PRIVATE_KEY }} + user: root + HOST: ${{ secrets.OMR_DEPLOY_HOST }} + PORT: ${{ secrets.OMR_DEPLOY_PORT }} + SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} + SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }} + SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} + GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }} + - if: steps.branch_name.outputs.SOURCE_BRANCH != '' + name: Deploy - Upload via rsync + uses: ysurac/action-rsync@master + env: + ARGS: -av --delete-after + TARGET: /www/wwwroot/55860.com/bak/down/${{ steps.branch_name.outputs.SOURCE_BRANCH }}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}} + SOURCE: ./bin/ + KEY: ${{ secrets.PRIVATE_KEY }} + user: root + HOST: ${{ secrets.OMR_DEPLOY_HOST }} + PORT: ${{ secrets.OMR_DEPLOY_PORT }} + SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} + SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }} + SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} + GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }} + diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..71c06708d --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "30 1 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3.0.10 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days" + stale-pr-message: 'It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days' + days-before-stale: 120 + days-before-close: 5 + exempt-issue-labels: 'work-in-progress,enhancement' + exempt-pr-labels: 'work-in-progress,enhancement' diff --git a/README.md b/README.md index 57a0cfd6c..6483e1fcf 100644 --- a/README.md +++ b/README.md @@ -164,4 +164,8 @@ This is used to bypass a protocol # License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FYsurac%2Fopenmptcprouter-feeds.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FYsurac%2Fopenmptcprouter-feeds?ref=badge_large) \ No newline at end of file +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FYsurac%2Fopenmptcprouter-feeds.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FYsurac%2Fopenmptcprouter-feeds?ref=badge_large) + +## Translation status + +[![Translation status](https://weblate.openmptcprouter.com/widgets/omr/-/multi-auto.svg)](https://weblate.openmptcprouter.com/engage/omr/?utm_source=widget) diff --git a/bcm27xx-eeprom/Makefile b/bcm27xx-eeprom/Makefile index 363e8effb..fe77996c8 100644 --- a/bcm27xx-eeprom/Makefile +++ b/bcm27xx-eeprom/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcm27xx-eeprom -PKG_VERSION:=1a44b1330805663c292de8ce818065bbe9f2e130 +PKG_VERSION:=1a099a5a9de4cbd71a68afaa6421fd3b9cf3ef2e PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/rpi-eeprom/tar.gz/$(PKG_VERSION)? -PKG_HASH:=d18573a4026578ed20cd7e3ac7df029dbef7fd271729a60cd80abae2235eca25 +PKG_HASH:=c991a69fb92f60fb03cb0d0d482dafd162ae1ad0fb279509d9e2489055891ac3 PKG_LICENSE:=BSD-3-Clause Custom PKG_LICENSE_FILES:=LICENSE @@ -21,7 +21,7 @@ TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) define Package/bcm27xx-eeprom SECTION:=utils CATEGORY:=Utilities - DEPENDS:=bcm27xx-userland +blkid +pciutils +python3-light + DEPENDS:=bcm27xx-userland +blkid +pciutils +python3-light +coreutils-od TITLE:=BCM27xx EEPROM tools endef diff --git a/glorytun-udp/Makefile b/glorytun-udp/Makefile index c02f70241..121af0912 100644 --- a/glorytun-udp/Makefile +++ b/glorytun-udp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/angt/glorytun.git -PKG_SOURCE_VERSION:=3622f928caf03709c4031a34feec85c623bc5281 +PKG_SOURCE_VERSION:=97607fdf5c6c33df512ed85190a1fd93b5f45e77 PKG_NAME:=glorytun-udp PKG_VERSION:=0.3.4-$(PKG_SOURCE_VERSION) PKG_RELEASE:=23 diff --git a/glorytun-udp/init b/glorytun-udp/init index 1a3273e33..638736017 100755 --- a/glorytun-udp/init +++ b/glorytun-udp/init @@ -80,6 +80,9 @@ start_instance() { procd_close_instance + tc qdisc replace dev ${dev} root cake + + #ip link set $dev txqlen 100 #config_load network #config_foreach add_glorytun_path interface diff --git a/golang/golang-build.sh b/golang/golang-build.sh new file mode 100644 index 000000000..5e40436bb --- /dev/null +++ b/golang/golang-build.sh @@ -0,0 +1,204 @@ +#!/bin/sh + +nl=" +" + +log() { + # shellcheck disable=SC2039 + local IFS=" " + printf '%s\n' "$*" +} + +log_error() { + # shellcheck disable=SC2039 + local IFS=" " + printf 'Error: %s\n' "$*" >&2 +} + +link_contents() { + # shellcheck disable=SC2039 + local src="$1" dest="$2" IFS="$nl" dirs dir base + + if [ -n "$(find "$src" -mindepth 1 -maxdepth 1 -name "*.go" -not -type d)" ]; then + log_error "$src is already a Go library" + return 1 + fi + + dirs="$(find "$src" -mindepth 1 -maxdepth 1 -type d)" + for dir in $dirs; do + base="${dir##*/}" + if [ -d "$dest/$base" ]; then + case "$dir" in + *$GO_BUILD_DEPENDS_SRC/$GO_PKG) + log "$GO_PKG is already installed. Please check for circular dependencies." + ;; + *) + link_contents "$src/$base" "$dest/$base" + ;; + esac + else + log "...${src#$GO_BUILD_DEPENDS_SRC}/$base" + ln -sf "$src/$base" "$dest/$base" + fi + done + + return 0 +} + +configure() { + # shellcheck disable=SC2039 + local files code testdata gomod pattern extra IFS file dest + + cd "$BUILD_DIR" || return 1 + + files="$(find ./ -path "*/.*" -prune -o -not -type d -print)" + + if [ "$GO_INSTALL_ALL" != 1 ]; then + code="$(printf '%s\n' "$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$')" + testdata="$(printf '%s\n' "$files" | grep '/testdata/')" + gomod="$(printf '%s\n' "$files" | grep '/go\.\(mod\|sum\)$')" + + for pattern in $GO_INSTALL_EXTRA; do + extra="$(printf '%s\n' "$extra"; printf '%s\n' "$files" | grep -e "$pattern")" + done + + files="$(printf '%s\n%s\n%s\n%s\n' "$code" "$testdata" "$gomod" "$extra" | grep -v '^[[:space:]]*$' | sort -u)" + fi + + IFS="$nl" + + log "Copying files from $BUILD_DIR into $GO_BUILD_DIR/src/$GO_PKG" + mkdir -p "$GO_BUILD_DIR/src" + for file in $files; do + log "${file#./}" + dest="$GO_BUILD_DIR/src/$GO_PKG/${file#./}" + mkdir -p "${dest%/*}" + cp -fpR "$file" "$dest" + done + log + + if [ "$GO_SOURCE_ONLY" != 1 ]; then + if [ -d "$GO_BUILD_DEPENDS_SRC" ]; then + log "Symlinking directories from $GO_BUILD_DEPENDS_SRC into $GO_BUILD_DIR/src" + link_contents "$GO_BUILD_DEPENDS_SRC" "$GO_BUILD_DIR/src" + else + log "$GO_BUILD_DEPENDS_SRC does not exist, skipping symlinks" + fi + else + log "Not building binaries, skipping symlinks" + fi + log + + return 0 +} + +build() { + # shellcheck disable=SC2039 + local modargs pattern targets retval + + cd "$GO_BUILD_DIR" || return 1 + + if [ -f "$BUILD_DIR/go.mod" ] ; then + mkdir -p "$GO_MOD_CACHE_DIR" + modargs="$GO_MOD_ARGS" + fi + + log "Finding targets" + # shellcheck disable=SC2086 + targets="$(go list $modargs $GO_BUILD_PKG)" + for pattern in $GO_EXCLUDES; do + targets="$(printf '%s\n' "$targets" | grep -v "$pattern")" + done + log + + if [ "$GO_GO_GENERATE" = 1 ]; then + log "Calling go generate" + # shellcheck disable=SC2086 + GOOS='' GOARCH='' GO386='' GOARM='' GOMIPS='' GOMIPS64='' \ + go generate -v $targets + log + fi + + if [ "$GO_SOURCE_ONLY" = 1 ]; then + return 0 + fi + + log "Building targets" + mkdir -p "$GO_BUILD_DIR/bin" "$GO_BUILD_CACHE_DIR" + # shellcheck disable=SC2086 + go install $modargs "$@" $targets + retval="$?" + log + + if [ "$retval" -eq 0 ] && [ -z "$(find "$GO_BUILD_BIN_DIR" -maxdepth 0 -type d -not -empty 2>/dev/null)" ]; then + log_error "No binaries were built" + retval=1 + fi + + if [ "$retval" -ne 0 ]; then + cache_cleanup + fi + + return "$retval" +} + +install_bin() { + # shellcheck disable=SC2039 + local dest="$1" + install -d -m0755 "$dest/$GO_INSTALL_BIN_PATH" + install -m0755 "$GO_BUILD_BIN_DIR"/* "$dest/$GO_INSTALL_BIN_PATH/" +} + +install_src() { + # shellcheck disable=SC2039 + local dest="$1" dir="${GO_PKG%/*}" + install -d -m0755 "$dest/$GO_BUILD_DEPENDS_PATH/src/$dir" + cp -fpR "$GO_BUILD_DIR/src/$GO_PKG" "$dest/$GO_BUILD_DEPENDS_PATH/src/$dir/" +} + +cache_cleanup() { + if ! [ -d "$GO_MOD_CACHE_DIR" ]; then + return 0 + fi + + # in case go is called without -modcacherw + find "$GO_MOD_CACHE_DIR" -type d -not -perm -u+w -exec chmod u+w '{}' + + + if [ -n "$CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE" ]; then + find "$GO_MOD_CACHE_DIR" -type d -not -perm -go+rx -exec chmod go+rx '{}' + + find "$GO_MOD_CACHE_DIR" -not -type d -not -perm -go+r -exec chmod go+r '{}' + + fi + + return 0 +} + + +if [ "$#" -lt 1 ]; then + log_error "Missing command" + exit 1 +fi + +command="$1" +shift 1 + +case "$command" in + configure) + configure + ;; + build) + build "$@" + ;; + install_bin) + install_bin "$@" + ;; + install_src) + install_src "$@" + ;; + cache_cleanup) + cache_cleanup + ;; + *) + log_error "Invalid command \"$command\"" + exit 1 + ;; +esac diff --git a/golang/golang-compiler.mk b/golang/golang-compiler.mk index 5e7fe689d..e8b4b9156 100644 --- a/golang/golang-compiler.mk +++ b/golang/golang-compiler.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 Jeffery To +# Copyright (C) 2018, 2020 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -24,8 +24,8 @@ endef # $(4) additional environment variables (optional) define GoCompiler/Default/Make ( \ - cd $(1)/src ; \ - $(if $(2),GOROOT_FINAL=$(2)/lib/go-$(3)) \ + cd "$(1)/src" ; \ + $(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \ $(4) \ $(BASH) make.bash --no-banner ; \ ) @@ -34,8 +34,8 @@ endef # $(1) destination prefix # $(2) go version id define GoCompiler/Default/Install/make-dirs - $(INSTALL_DIR) $(1)/lib/go-$(2) - $(INSTALL_DIR) $(1)/share/go-$(2) + $(INSTALL_DIR) "$(1)/lib/go-$(2)" + $(INSTALL_DIR) "$(1)/share/go-$(2)" endef # $(1) source go root @@ -43,48 +43,49 @@ endef # $(3) go version id # $(4) file/directory name define GoCompiler/Default/Install/install-share-data - $(CP) $(1)/$(4) $(2)/share/go-$(3)/ - $(LN) ../../share/go-$(3)/$(4) $(2)/lib/go-$(3)/ + $(CP) "$(1)/$(4)" "$(2)/share/go-$(3)/" + $(LN) "../../share/go-$(3)/$(4)" "$(2)/lib/go-$(3)/" endef # $(1) source go root # $(2) destination prefix # $(3) go version id # $(4) GOOS_GOARCH +# $(5) install suffix (optional) define GoCompiler/Default/Install/Bin $(call GoCompiler/Default/Install/make-dirs,$(2),$(3)) $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),api) - $(INSTALL_DATA) -p $(1)/VERSION $(2)/lib/go-$(3)/ + $(INSTALL_DATA) -p "$(1)/VERSION" "$(2)/lib/go-$(3)/" - for file in AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README README.md; do \ - if [ -f $(1)/$$$$file ]; then \ - $(INSTALL_DATA) -p $(1)/$$$$file $(2)/share/go-$(3)/ ; \ + for file in AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md SECURITY.md; do \ + if [ -f "$(1)/$$$$file" ]; then \ + $(INSTALL_DATA) -p "$(1)/$$$$file" "$(2)/share/go-$(3)/" ; \ fi ; \ done - $(INSTALL_DIR) $(2)/lib/go-$(3)/bin + $(INSTALL_DIR) "$(2)/lib/go-$(3)/bin" ifeq ($(4),$(GO_HOST_OS_ARCH)) - $(INSTALL_BIN) -p $(1)/bin/* $(2)/lib/go-$(3)/bin/ + $(INSTALL_BIN) -p "$(1)/bin"/* "$(2)/lib/go-$(3)/bin/" else - $(INSTALL_BIN) -p $(1)/bin/$(4)/* $(2)/lib/go-$(3)/bin/ + $(INSTALL_BIN) -p "$(1)/bin/$(4)"/* "$(2)/lib/go-$(3)/bin/" endif - $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg - $(CP) $(1)/pkg/$(4) $(2)/lib/go-$(3)/pkg/ + $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" + $(CP) "$(1)/pkg/$(4)$(if $(5),_$(5))" "$(2)/lib/go-$(3)/pkg/" - $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg/tool/$(4) - $(INSTALL_BIN) -p $(1)/pkg/tool/$(4)/* $(2)/lib/go-$(3)/pkg/tool/$(4)/ + $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg/tool/$(4)" + $(INSTALL_BIN) -p "$(1)/pkg/tool/$(4)"/* "$(2)/lib/go-$(3)/pkg/tool/$(4)/" endef # $(1) destination prefix # $(2) go version id define GoCompiler/Default/Install/BinLinks - $(INSTALL_DIR) $(1)/bin - $(LN) ../lib/go-$(2)/bin/go $(1)/bin/go - $(LN) ../lib/go-$(2)/bin/gofmt $(1)/bin/gofmt + $(INSTALL_DIR) "$(1)/bin" + $(LN) "../lib/go-$(2)/bin/go" "$(1)/bin/go" + $(LN) "../lib/go-$(2)/bin/gofmt" "$(1)/bin/gofmt" endef # $(1) source go root @@ -110,29 +111,29 @@ define GoCompiler/Default/Install/Src $(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),test) $(FIND) \ - $(2)/share/go-$(3)/src/ \ - \! -type d -a \( -name '*.bat' -o -name '*.rc' \) \ + "$(2)/share/go-$(3)/src/" \ + \! -type d -a \( -name "*.bat" -o -name "*.rc" \) \ -delete - if [ -d $(1)/pkg/include ]; then \ - $(INSTALL_DIR) $(2)/lib/go-$(3)/pkg ; \ - $(INSTALL_DIR) $(2)/share/go-$(3)/pkg ; \ - $(CP) $(1)/pkg/include $(2)/share/go-$(3)/pkg/ ; \ - $(LN) ../../../share/go-$(3)/pkg/include $(2)/lib/go-$(3)/pkg/ ; \ + if [ -d "$(1)/pkg/include" ]; then \ + $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" ; \ + $(INSTALL_DIR) "$(2)/share/go-$(3)/pkg" ; \ + $(CP) "$(1)/pkg/include" "$(2)/share/go-$(3)/pkg/" ; \ + $(LN) "../../../share/go-$(3)/pkg/include" "$(2)/lib/go-$(3)/pkg/" ; \ fi endef # $(1) destination prefix # $(2) go version id define GoCompiler/Default/Uninstall - rm -rf $(1)/lib/go-$(2) - rm -rf $(1)/share/go-$(2) + rm -rf "$(1)/lib/go-$(2)" + rm -rf "$(1)/share/go-$(2)" endef # $(1) destination prefix define GoCompiler/Default/Uninstall/BinLinks - rm -f $(1)/bin/go - rm -f $(1)/bin/gofmt + rm -f "$(1)/bin/go" + rm -f "$(1)/bin/gofmt" endef @@ -141,6 +142,7 @@ endef # $(3) destination prefix # $(4) go version id # $(5) GOOS_GOARCH +# $(6) install suffix (optional) define GoCompiler/AddProfile # $$(1) valid GOOS_GOARCH combinations @@ -155,7 +157,7 @@ define GoCompiler/AddProfile # $$(1) override install prefix (optional) define GoCompiler/$(1)/Install/Bin - $$(call GoCompiler/Default/Install/Bin,$(2),$$(or $$(1),$(3)),$(4),$(5)) + $$(call GoCompiler/Default/Install/Bin,$(2),$$(or $$(1),$(3)),$(4),$(5),$(6)) endef # $$(1) override install prefix (optional) diff --git a/golang/golang-host-build.mk b/golang/golang-host-build.mk new file mode 100644 index 000000000..ee4f1ea31 --- /dev/null +++ b/golang/golang-host-build.mk @@ -0,0 +1,220 @@ +# +# Copyright (C) 2020 Jeffery To +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ifeq ($(origin GO_INCLUDE_DIR),undefined) + GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) +endif + +include $(GO_INCLUDE_DIR)/golang-values.mk + + +# these variables have the same meanings as in golang-package.mk +GO_HOST_INSTALL_EXTRA?=$(GO_PKG_INSTALL_EXTRA) +GO_HOST_INSTALL_ALL?=$(GO_PKG_INSTALL_ALL) +GO_HOST_SOURCE_ONLY?=$(GO_PKG_SOURCE_ONLY) +GO_HOST_BUILD_PKG?=$(GO_PKG_BUILD_PKG) +GO_HOST_EXCLUDES?=$(GO_PKG_EXCLUDES) +GO_HOST_GO_GENERATE?=$(GO_PKG_GO_GENERATE) +GO_HOST_GCFLAGS?=$(GO_PKG_GCFLAGS) +GO_HOST_LDFLAGS?=$(GO_PKG_LDFLAGS) +GO_HOST_LDFLAGS_X?=$(GO_PKG_LDFLAGS_X) +GO_HOST_TAGS?=$(GO_PKG_TAGS) +GO_HOST_INSTALL_BIN_PATH?=/bin + + +# need to repeat this here in case golang-package.mk is not included +GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/... + +GO_HOST_WORK_DIR_NAME:=.go_work +GO_HOST_BUILD_DIR=$(HOST_BUILD_DIR)/$(GO_HOST_WORK_DIR_NAME)/build +GO_HOST_BUILD_BIN_DIR=$(GO_HOST_BUILD_DIR)/bin + +GO_HOST_BUILD_DEPENDS_PATH:=/share/gocode +GO_HOST_BUILD_DEPENDS_SRC=$(STAGING_DIR_HOSTPKG)$(GO_HOST_BUILD_DEPENDS_PATH)/src + +GO_HOST_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR))) +GO_HOST_STAGING_DIR:=$(TMP_DIR)/host-stage-$(GO_HOST_DIR_NAME) +GO_HOST_STAGING_FILES_LIST_DIR:=$(HOST_BUILD_PREFIX)/stamp +GO_HOST_BIN_STAGING_FILES_LIST:=$(GO_HOST_STAGING_FILES_LIST_DIR)/$(GO_HOST_DIR_NAME)-bin.list +GO_HOST_SRC_STAGING_FILES_LIST:=$(GO_HOST_STAGING_FILES_LIST_DIR)/$(GO_HOST_DIR_NAME)-src.list + +ifeq ($(GO_HOST_PIE_SUPPORTED),1) + GO_HOST_ENABLE_PIE:=1 +endif + +GO_HOST_BUILD_CONFIG_VARS= \ + GO_PKG="$(strip $(GO_PKG))" \ + GO_INSTALL_EXTRA="$(strip $(GO_HOST_INSTALL_EXTRA))" \ + GO_INSTALL_ALL="$(strip $(GO_HOST_INSTALL_ALL))" \ + GO_SOURCE_ONLY="$(strip $(GO_HOST_SOURCE_ONLY))" \ + GO_BUILD_PKG="$(strip $(GO_HOST_BUILD_PKG))" \ + GO_EXCLUDES="$(strip $(GO_HOST_EXCLUDES))" \ + GO_GO_GENERATE="$(strip $(GO_HOST_GO_GENERATE))" \ + GO_INSTALL_BIN_PATH="$(strip $(GO_HOST_INSTALL_BIN_PATH))" \ + BUILD_DIR="$(HOST_BUILD_DIR)" \ + GO_BUILD_DIR="$(GO_HOST_BUILD_DIR)" \ + GO_BUILD_BIN_DIR="$(GO_HOST_BUILD_BIN_DIR)" \ + GO_BUILD_DEPENDS_PATH="$(GO_HOST_BUILD_DEPENDS_PATH)" \ + GO_BUILD_DEPENDS_SRC="$(GO_HOST_BUILD_DEPENDS_SRC)" + +GO_HOST_MORE_CFLAGS?= \ + -Wformat -Werror=format-security \ + -fstack-protector-strong \ + -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \ + -Wl,-z,now -Wl,-z,relro \ + $(if $(GO_HOST_ENABLE_PIE),$(FPIC)) + +GO_HOST_MORE_LDFLAGS?= \ + -znow -zrelro \ + $(if $(GO_HOST_ENABLE_PIE),$(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs) + +GO_HOST_TARGET_VARS= \ + CGO_ENABLED=1 \ + CC=gcc \ + CXX=g++ \ + PKG_CONFIG=pkg-config \ + CGO_CFLAGS="$(HOST_CFLAGS) $(GO_HOST_MORE_CFLAGS)" \ + CGO_CPPFLAGS="$(HOST_CPPFLAGS) $(GO_HOST_MORE_CPPFLAGS)" \ + CGO_CXXFLAGS="$(HOST_CFLAGS) $(GO_HOST_MORE_CFLAGS)" \ + CGO_LDFLAGS="$(HOST_LDFLAGS) $(GO_HOST_MORE_LDFLAGS)" \ + GO_GCC_HELPER_CC="$(HOSTCC)" \ + GO_GCC_HELPER_CXX="$(HOSTCXX)" \ + GO_GCC_HELPER_PATH="$$$$PATH" \ + PATH="$(STAGING_DIR_HOSTPKG)/lib/go-cross/openwrt:$$$$PATH" + +GO_HOST_BUILD_VARS= \ + GOPATH="$(GO_HOST_BUILD_DIR)" \ + GOCACHE="$(GO_BUILD_CACHE_DIR)" \ + GOMODCACHE="$(GO_MOD_CACHE_DIR)" \ + GOENV=off + +GO_HOST_VARS= \ + $(GO_HOST_TARGET_VARS) \ + $(GO_HOST_BUILD_VARS) + +GO_HOST_DEFAULT_LDFLAGS= \ + -linkmode external \ + -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(HOST_LDFLAGS) $(GO_HOST_MORE_LDFLAGS))' + +GO_HOST_CUSTOM_LDFLAGS= \ + $(GO_HOST_LDFLAGS) \ + $(patsubst %,-X %,$(GO_HOST_LDFLAGS_X)) + +GO_HOST_INSTALL_ARGS= \ + -v \ + -ldflags "all=$(GO_HOST_DEFAULT_LDFLAGS)" \ + $(if $(filter $(GO_HOST_ENABLE_PIE),1),-buildmode pie) \ + $(if $(GO_HOST_GCFLAGS),-gcflags "$(GO_HOST_GCFLAGS)") \ + $(if $(GO_HOST_CUSTOM_LDFLAGS),-ldflags "$(GO_HOST_CUSTOM_LDFLAGS) $(GO_HOST_DEFAULT_LDFLAGS)") \ + $(if $(GO_HOST_TAGS),-tags "$(GO_HOST_TAGS)") + +define GoHost/Host/Configure + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_HOST_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh configure +endef + +# $(1) additional arguments for go command line (optional) +define GoHost/Host/Compile + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_HOST_BUILD_CONFIG_VARS) \ + $(GO_HOST_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh build $(GO_HOST_INSTALL_ARGS) $(1) +endef + +define GoHost/Host/Install/Bin + rm -rf "$(GO_HOST_STAGING_DIR)" + mkdir -p "$(GO_HOST_STAGING_DIR)" "$(GO_HOST_STAGING_FILES_LIST_DIR)" + + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_HOST_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_bin "$(GO_HOST_STAGING_DIR)" + + if [ -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ]; then \ + "$(SCRIPT_DIR)/clean-package.sh" \ + "$(GO_HOST_BIN_STAGING_FILES_LIST)" \ + "$(1)" ; \ + fi + + cd "$(GO_HOST_STAGING_DIR)" && find ./ > "$(GO_HOST_STAGING_DIR).files" + + $(call locked, \ + mv "$(GO_HOST_STAGING_DIR).files" "$(GO_HOST_BIN_STAGING_FILES_LIST)" && \ + $(CP) "$(GO_HOST_STAGING_DIR)"/* "$(1)/", \ + host-staging-dir \ + ) + + rm -rf "$(GO_HOST_STAGING_DIR)" +endef + +define GoHost/Host/Install/Src + rm -rf "$(GO_HOST_STAGING_DIR)" + mkdir -p "$(GO_HOST_STAGING_DIR)" "$(GO_HOST_STAGING_FILES_LIST_DIR)" + + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_HOST_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_src "$(GO_HOST_STAGING_DIR)" + + if [ -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ]; then \ + "$(SCRIPT_DIR)/clean-package.sh" \ + "$(GO_HOST_SRC_STAGING_FILES_LIST)" \ + "$(1)" ; \ + fi + + cd "$(GO_HOST_STAGING_DIR)" && find ./ > "$(GO_HOST_STAGING_DIR).files" + + $(call locked, \ + mv "$(GO_HOST_STAGING_DIR).files" "$(GO_HOST_SRC_STAGING_FILES_LIST)" && \ + $(CP) "$(GO_HOST_STAGING_DIR)"/* "$(1)/", \ + host-staging-dir \ + ) + + rm -rf "$(GO_HOST_STAGING_DIR)" +endef + +define GoHost/Host/Install + $(if $(filter $(GO_HOST_SOURCE_ONLY),1),, \ + $(call GoHost/Host/Install/Bin,$(1)) \ + ) + $(call GoHost/Host/Install/Src,$(1)) +endef + +define GoHost/Host/Uninstall + if [ -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ]; then \ + "$(SCRIPT_DIR)/clean-package.sh" \ + "$(GO_HOST_BIN_STAGING_FILES_LIST)" \ + "$(HOST_BUILD_PREFIX)" ; \ + rm -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ; \ + fi + + if [ -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ]; then \ + "$(SCRIPT_DIR)/clean-package.sh" \ + "$(GO_HOST_SRC_STAGING_FILES_LIST)" \ + "$(HOST_BUILD_PREFIX)" ; \ + rm -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ; \ + fi +endef + + +ifneq ($(strip $(GO_PKG)),) + Host/Configure=$(call GoHost/Host/Configure) + Host/Compile=$(call GoHost/Host/Compile) + Hooks/HostCompile/Post+=Go/CacheCleanup + Host/Uninstall=$(call GoHost/Host/Uninstall,$(1)) +endif + +define GoHostBuild + Host/Install=$$(call GoHost/Host/Install,$$(1)) +endef + +define GoBinHostBuild + Host/Install=$$(call GoHost/Host/Install/Bin,$$(1)) +endef + +define GoSrcHostBuild + Host/Install=$$(call GoHost/Host/Install/Src,$$(1)) +endef diff --git a/golang/golang-package.mk b/golang/golang-package.mk index 3cb98132f..7144a4524 100644 --- a/golang/golang-package.mk +++ b/golang/golang-package.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 Jeffery To +# Copyright (C) 2018-2020 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -28,10 +28,12 @@ include $(GO_INCLUDE_DIR)/golang-values.mk # files are installed: # # * Files with one of these extensions: -# .go, .c, .cc, .h, .hh, .proto, .s +# .go, .c, .cc, .cpp, .h, .hh, .hpp, .proto, .s # # * Files in any 'testdata' directory # +# * go.mod and go.sum, in any directory +# # e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml # # @@ -54,7 +56,7 @@ include $(GO_INCLUDE_DIR)/golang-values.mk # GO_PKG_BUILD_PKG - list of build targets, default GO_PKG/... # # Build targets for compiling this Go package, i.e. arguments passed -# to 'go install' +# to 'go install'. # # e.g. GO_PKG_BUILD_PKG:=github.com/debian/ratt/cmd/... # @@ -74,28 +76,92 @@ include $(GO_INCLUDE_DIR)/golang-values.mk # not necessary. # # e.g. GO_PKG_GO_GENERATE:=1 +# +# +# GO_PKG_GCFLAGS - list of options, default empty +# +# Additional go tool compile options to use when building targets. +# +# e.g. GO_PKG_GCFLAGS:=-N -l +# +# +# GO_PKG_LDFLAGS - list of options, default empty +# +# Additional go tool link options to use when building targets. +# +# Note that the OpenWrt build system has an option to strip binaries +# (enabled by default), so -s (Omit the symbol table and debug +# information) and -w (Omit the DWARF symbol table) flags are not +# necessary. +# +# e.g. GO_PKG_LDFLAGS:=-r dir1:dir2 -u +# +# +# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty +# +# Each definition will be passed as the parameter to the -X go tool +# link option, i.e. -ldflags "-X importpath.name=value". +# +# e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH) +# +# +# GO_PKG_TAGS - list of build tags, default empty +# +# Build tags to consider satisfied during the build, passed as the +# parameter to the -tags option for 'go install'. +# +# e.g. GO_PKG_TAGS:=release,noupgrade +# +# +# GO_PKG_INSTALL_BIN_PATH - target directory path, default /usr/bin +# +# Directory path under "dest_dir" where binaries will be installed by +# '$(call GoPackage/Package/Install/Bin,dest_dir)'. +# +# e.g. GO_PKG_INSTALL_BIN_PATH:=/sbin # Credit for this package build process (GoPackage/Build/Configure and # GoPackage/Build/Compile) belong to Debian's dh-golang completely. -# https://anonscm.debian.org/cgit/pkg-go/packages/dh-golang.git +# https://salsa.debian.org/go-team/packages/dh-golang -# for building packages, not user code -GO_PKG_PATH:=/usr/share/gocode - -GO_PKG_BUILD_PKG?=$(GO_PKG)/... +GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/... +GO_PKG_INSTALL_BIN_PATH?=/usr/bin GO_PKG_WORK_DIR_NAME:=.go_work -GO_PKG_WORK_DIR:=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME) +GO_PKG_BUILD_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)/build +GO_PKG_BUILD_BIN_DIR=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS_ARCH)) -GO_PKG_BUILD_DIR:=$(GO_PKG_WORK_DIR)/build -GO_PKG_CACHE_DIR:=$(GO_PKG_WORK_DIR)/cache -GO_PKG_TMP_DIR:=$(GO_PKG_WORK_DIR)/tmp +GO_PKG_BUILD_DEPENDS_PATH:=/usr/share/gocode +GO_PKG_BUILD_DEPENDS_SRC=$(STAGING_DIR)$(GO_PKG_BUILD_DEPENDS_PATH)/src -GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if \ - $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS)_$(GO_ARCH)) +ifdef CONFIG_PKG_ASLR_PIE_ALL + ifeq ($(strip $(PKG_ASLR_PIE)),1) + ifeq ($(GO_TARGET_PIE_SUPPORTED),1) + GO_PKG_ENABLE_PIE:=1 + else + $(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH)) + endif + endif +endif -GO_PKG_BUILD_DEPENDS_SRC:=$(STAGING_DIR)$(GO_PKG_PATH)/src +ifdef CONFIG_PKG_ASLR_PIE_REGULAR + ifeq ($(strip $(PKG_ASLR_PIE_REGULAR)),1) + ifeq ($(GO_TARGET_PIE_SUPPORTED),1) + GO_PKG_ENABLE_PIE:=1 + else + $(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH)) + endif + endif +endif + +ifdef CONFIG_GOLANG_SPECTRE + ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1) + GO_PKG_ENABLE_SPECTRE:=1 + else + $(warning Spectre mitigations are not supported for $(GO_ARCH)) + endif +endif # sstrip causes corrupted section header size ifneq ($(CONFIG_USE_SSTRIP),) @@ -105,16 +171,6 @@ ifneq ($(CONFIG_USE_SSTRIP),) GO_PKG_STRIP_ARGS:=--strip-all endif STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS) - RSTRIP= \ - export CROSS="$(TARGET_CROSS)" \ - $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \ - $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \ - $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \ - NM="$(TARGET_CROSS)nm" \ - STRIP="$(STRIP)" \ - STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \ - PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \ - $(SCRIPT_DIR)/rstrip.sh endif define GoPackage/GoSubMenu @@ -123,151 +179,87 @@ define GoPackage/GoSubMenu CATEGORY:=Languages endef -define GoPackage/Environment - GOOS=$(GO_OS) \ - GOARCH=$(GO_ARCH) \ - GO386=$(GO_386) \ - GOARM=$(GO_ARM) \ - GOMIPS=$(GO_MIPS) \ - GOMIPS64=$(GO_MIPS64) \ +GO_PKG_BUILD_CONFIG_VARS= \ + GO_PKG="$(strip $(GO_PKG))" \ + GO_INSTALL_EXTRA="$(strip $(GO_PKG_INSTALL_EXTRA))" \ + GO_INSTALL_ALL="$(strip $(GO_PKG_INSTALL_ALL))" \ + GO_SOURCE_ONLY="$(strip $(GO_PKG_SOURCE_ONLY))" \ + GO_BUILD_PKG="$(strip $(GO_PKG_BUILD_PKG))" \ + GO_EXCLUDES="$(strip $(GO_PKG_EXCLUDES))" \ + GO_GO_GENERATE="$(strip $(GO_PKG_GO_GENERATE))" \ + GO_INSTALL_BIN_PATH="$(strip $(GO_PKG_INSTALL_BIN_PATH))" \ + BUILD_DIR="$(PKG_BUILD_DIR)" \ + GO_BUILD_DIR="$(GO_PKG_BUILD_DIR)" \ + GO_BUILD_BIN_DIR="$(GO_PKG_BUILD_BIN_DIR)" \ + GO_BUILD_DEPENDS_PATH="$(GO_PKG_BUILD_DEPENDS_PATH)" \ + GO_BUILD_DEPENDS_SRC="$(GO_PKG_BUILD_DEPENDS_SRC)" + +GO_PKG_TARGET_VARS= \ + GOOS="$(GO_OS)" \ + GOARCH="$(GO_ARCH)" \ + GO386="$(GO_386)" \ + GOARM="$(GO_ARM)" \ + GOMIPS="$(GO_MIPS)" \ + GOMIPS64="$(GO_MIPS64)" \ CGO_ENABLED=1 \ + CC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \ CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \ - CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" -endef + CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \ + CGO_LDFLAGS="$(TARGET_LDFLAGS)" -# false if directory does not exist -GoPackage/is_dir_not_empty=$$$$($(FIND) $(1) -maxdepth 0 -type d \! -empty 2>/dev/null) +GO_PKG_BUILD_VARS= \ + GOPATH="$(GO_PKG_BUILD_DIR)" \ + GOCACHE="$(GO_BUILD_CACHE_DIR)" \ + GOMODCACHE="$(GO_MOD_CACHE_DIR)" \ + GOENV=off -GoPackage/has_binaries=$(call GoPackage/is_dir_not_empty,$(GO_PKG_BUILD_BIN_DIR)) +GO_PKG_VARS= \ + $(GO_PKG_TARGET_VARS) \ + $(GO_PKG_BUILD_VARS) + +GO_PKG_DEFAULT_GCFLAGS= \ + $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) + +GO_PKG_DEFAULT_ASMFLAGS= \ + $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) + +GO_PKG_DEFAULT_LDFLAGS= \ + -buildid '$(SOURCE_DATE_EPOCH)' \ + -linkmode external \ + -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))' + +GO_PKG_CUSTOM_LDFLAGS= \ + $(GO_PKG_LDFLAGS) \ + $(patsubst %,-X %,$(GO_PKG_LDFLAGS_X)) + +GO_PKG_INSTALL_ARGS= \ + -v \ + -trimpath \ + -ldflags "all=$(GO_PKG_DEFAULT_LDFLAGS)" \ + $(if $(GO_PKG_DEFAULT_GCFLAGS),-gcflags "all=$(GO_PKG_DEFAULT_GCFLAGS)") \ + $(if $(GO_PKG_DEFAULT_ASMFLAGS),-asmflags "all=$(GO_PKG_DEFAULT_ASMFLAGS)") \ + $(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie) \ + $(if $(filter $(GO_ARCH),arm),-installsuffix "v$(GO_ARM)") \ + $(if $(filter $(GO_ARCH),mips mipsle),-installsuffix "$(GO_MIPS)") \ + $(if $(filter $(GO_ARCH),mips64 mips64le),-installsuffix "$(GO_MIPS64)") \ + $(if $(GO_PKG_GCFLAGS),-gcflags "$(GO_PKG_GCFLAGS) $(GO_PKG_DEFAULT_GCFLAGS)") \ + $(if $(GO_PKG_CUSTOM_LDFLAGS),-ldflags "$(GO_PKG_CUSTOM_LDFLAGS) $(GO_PKG_DEFAULT_LDFLAGS)") \ + $(if $(GO_PKG_TAGS),-tags "$(GO_PKG_TAGS)") define GoPackage/Build/Configure - ( \ - cd $(PKG_BUILD_DIR) ; \ - mkdir -p $(GO_PKG_BUILD_DIR)/bin $(GO_PKG_BUILD_DIR)/src \ - $(GO_PKG_CACHE_DIR) $(GO_PKG_TMP_DIR) ; \ - \ - files=$$$$($(FIND) ./ \ - -type d -a \( -path './.git' -o -path './$(GO_PKG_WORK_DIR_NAME)' \) -prune -o \ - \! -type d -print | \ - sed 's|^\./||') ; \ - \ - if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \ - code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|go\|h\|hh\|proto\|s\)$$$$') ; \ - testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \ - \ - for pattern in $(GO_PKG_INSTALL_EXTRA); do \ - extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \ - done ; \ - \ - files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \ - files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \ - fi ; \ - \ - echo "Copying files from $(PKG_BUILD_DIR) into $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)" ; \ - for file in $$$$files; do \ - echo $$$$file ; \ - dest=$(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/$$$$file ; \ - mkdir -p $$$$(dirname $$$$dest) ; \ - $(CP) $$$$file $$$$dest ; \ - done ; \ - echo ; \ - \ - link_contents() { \ - local src=$$$$1 ; \ - local dest=$$$$2 ; \ - local dirs dir base ; \ - \ - if [ -n "$$$$($(FIND) $$$$src -mindepth 1 -maxdepth 1 -name '*.go' \! -type d)" ]; then \ - echo "$$$$src is already a Go library" ; \ - return 1 ; \ - fi ; \ - \ - dirs=$$$$($(FIND) $$$$src -mindepth 1 -maxdepth 1 -type d) ; \ - for dir in $$$$dirs; do \ - base=$$$$(basename $$$$dir) ; \ - if [ -d $$$$dest/$$$$base ]; then \ - case $$$$dir in \ - *$(GO_PKG_PATH)/src/$(GO_PKG)) \ - echo "$(GO_PKG) is already installed. Please check for circular dependencies." ;; \ - *) \ - link_contents $$$$src/$$$$base $$$$dest/$$$$base ;; \ - esac ; \ - else \ - echo "...$$$${src#$(GO_PKG_BUILD_DEPENDS_SRC)}/$$$$base" ; \ - $(LN) $$$$src/$$$$base $$$$dest/$$$$base ; \ - fi ; \ - done ; \ - } ; \ - \ - if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \ - if [ -d $(GO_PKG_BUILD_DEPENDS_SRC) ]; then \ - echo "Symlinking directories from $(GO_PKG_BUILD_DEPENDS_SRC) into $(GO_PKG_BUILD_DIR)/src" ; \ - link_contents $(GO_PKG_BUILD_DEPENDS_SRC) $(GO_PKG_BUILD_DIR)/src ; \ - else \ - echo "$(GO_PKG_BUILD_DEPENDS_SRC) does not exist, skipping symlinks" ; \ - fi ; \ - else \ - echo "Not building binaries, skipping symlinks" ; \ - fi ; \ - echo ; \ - ) + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_PKG_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh configure endef # $(1) additional arguments for go command line (optional) define GoPackage/Build/Compile - ( \ - cd $(GO_PKG_BUILD_DIR) ; \ - export GOPATH=$(GO_PKG_BUILD_DIR) \ - GOCACHE=$(GO_PKG_CACHE_DIR) \ - GOTMPDIR=$(GO_PKG_TMP_DIR) \ - GOROOT_FINAL=$(GO_TARGET_ROOT) \ - CC=$(TARGET_CC) \ - CXX=$(TARGET_CXX) \ - $(call GoPackage/Environment) ; \ - \ - echo "Finding targets" ; \ - targets=$$$$(go list $(GO_PKG_BUILD_PKG)) ; \ - for pattern in $(GO_PKG_EXCLUDES); do \ - targets=$$$$(echo "$$$$targets" | grep -v "$$$$pattern") ; \ - done ; \ - echo ; \ - \ - if [ "$(GO_PKG_GO_GENERATE)" = 1 ]; then \ - echo "Calling go generate" ; \ - go generate -v $(1) $$$$targets ; \ - echo ; \ - fi ; \ - \ - if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \ - echo "Building targets" ; \ - case $(GO_ARCH) in \ - arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \ - mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \ - mips64|mips64le) installsuffix="-installsuffix $(GO_MIPS64)" ;; \ - esac ; \ - ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \ - go install \ - $$$$installsuffix \ - -trimpath \ - -ldflags "$$$$ldflags" \ - -v \ - $(1) \ - $$$$targets ; \ - retval=$$$$? ; \ - echo ; \ - \ - if [ "$$$$retval" -eq 0 ] && [ -z "$(call GoPackage/has_binaries)" ]; then \ - echo "No binaries were generated, consider adding GO_PKG_SOURCE_ONLY:=1 to Makefile" ; \ - echo ; \ - fi ; \ - \ - echo "Cleaning module download cache (golang/go#27455)" ; \ - go clean -modcache ; \ - echo ; \ - fi ; \ - exit $$$$retval ; \ - ) + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_PKG_BUILD_CONFIG_VARS) \ + $(GO_PKG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh build $(GO_PKG_INSTALL_ARGS) $(1) endef define GoPackage/Build/InstallDev @@ -275,27 +267,33 @@ define GoPackage/Build/InstallDev endef define GoPackage/Package/Install/Bin - if [ -n "$(call GoPackage/has_binaries)" ]; then \ - $(INSTALL_DIR) $(1)/usr/bin ; \ - $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/* $(1)/usr/bin/ ; \ - fi + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_PKG_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_bin "$(1)" endef define GoPackage/Package/Install/Src - dir=$$$$(dirname $(GO_PKG)) ; \ - $(INSTALL_DIR) $(1)$(GO_PKG_PATH)/src/$$$$dir ; \ - $(CP) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG) $(1)$(GO_PKG_PATH)/src/$$$$dir/ + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_PKG_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_src "$(1)" endef define GoPackage/Package/Install - $(call GoPackage/Package/Install/Bin,$(1)) + $(if $(filter $(GO_PKG_SOURCE_ONLY),1),, \ + $(call GoPackage/Package/Install/Bin,$(1)) \ + ) $(call GoPackage/Package/Install/Src,$(1)) endef -ifneq ($(GO_PKG),) +ifneq ($(strip $(GO_PKG)),) + ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1) + PKG_CONFIG_DEPENDS+=CONFIG_GOLANG_SPECTRE + endif + Build/Configure=$(call GoPackage/Build/Configure) Build/Compile=$(call GoPackage/Build/Compile) + Hooks/Compile/Post+=Go/CacheCleanup Build/InstallDev=$(call GoPackage/Build/InstallDev,$(1)) endif @@ -316,3 +314,14 @@ define GoSrcPackage Package/$(1)/install=$$(call GoPackage/Package/Install/Src,$$(1)) endif endef + + +# Deprecated variables - these will be removed after the next OpenWrt release +GO_PKG_PATH=$(GO_PKG_BUILD_DEPENDS_PATH) +GO_PKG_WORK_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME) +GO_PKG_CACHE_DIR=$(GO_BUILD_CACHE_DIR) +GO_PKG_DEFAULT_VARS=$(GO_PKG_VARS) +GoPackage/Environment=$(GO_PKG_VARS) +GoPackage/is_dir_not_empty=$$$$($(FIND) "$(1)" -maxdepth 0 -type d \! -empty 2>/dev/null) +GoPackage/has_binaries=$(call GoPackage/is_dir_not_empty,$(GO_PKG_BUILD_BIN_DIR)) +# End of deprecated variables diff --git a/golang/golang-values.mk b/golang/golang-values.mk index fb3b229a5..69126a1ed 100644 --- a/golang/golang-values.mk +++ b/golang/golang-values.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 Jeffery To +# Copyright (C) 2018, 2020 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,23 +9,118 @@ ifeq ($(origin GO_INCLUDE_DIR),undefined) GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) endif -include $(GO_INCLUDE_DIR)/golang-version.mk +# Unset environment variables +# There are more magic variables to track down, but ain't nobody got time for that +# From https://golang.org/cmd/go/#hdr-Environment_variables + +# General-purpose environment variables: unexport \ - GOARCH GOBIN GOCACHE GODEBUG GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \ + GCCGO \ + GOARCH \ + GOBIN \ + GOCACHE \ + GOMODCACHE \ + GODEBUG \ + GOENV \ + GOFLAGS \ + GOOS \ + GOPATH \ + GOROOT \ + GOTMPDIR +# Unmodified: +# GOINSECURE +# GOPRIVATE +# GOPROXY +# GONOPROXY +# GOSUMDB +# GONOSUMDB + +# Environment variables for use with cgo: +unexport \ + AR \ + CC \ CGO_ENABLED \ - CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \ + CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \ CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \ CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \ - CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \ - CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \ - GOARM GO386 GOMIPS GOMIPS64 \ - GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \ - CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \ - BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC - # there are more magic environment variables to track down, but ain't nobody got time for that - # deliberately left untouched: GOPROXY GONOPROXY GOSUMDB GONOSUMDB GOPRIVATE + CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \ + CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \ + CXX \ + FC +# Unmodified: +# PKG_CONFIG + +# Architecture-specific environment variables: +unexport \ + GOARM \ + GO386 \ + GOMIPS \ + GOMIPS64 \ + GOWASM + +# Special-purpose environment variables: +unexport \ + GCCGOTOOLDIR \ + GOROOT_FINAL \ + GO_EXTLINK_ENABLED +# Unmodified: +# GIT_ALLOW_PROTOCOL + +# From https://golang.org/cmd/go/#hdr-Module_support +unexport \ + GO111MODULE + +# From https://golang.org/pkg/runtime/#hdr-Environment_Variables +unexport \ + GOGC \ + GOMAXPROCS \ + GORACE \ + GOTRACEBACK + +# From https://golang.org/cmd/cgo/#hdr-Using_cgo_with_the_go_command +unexport \ + CC_FOR_TARGET \ + CXX_FOR_TARGET +# Todo: +# CC_FOR_${GOOS}_${GOARCH} +# CXX_FOR_${GOOS}_${GOARCH} + +# From https://golang.org/doc/install/source#environment +unexport \ + GOHOSTOS \ + GOHOSTARCH \ + GOPPC64 + +# From https://golang.org/src/make.bash +unexport \ + GO_GCFLAGS \ + GO_LDFLAGS \ + GO_LDSO \ + GO_DISTFLAGS \ + GOBUILDTIMELOGFILE \ + GOROOT_BOOTSTRAP + +# From https://golang.org/doc/go1.9#parallel-compile +unexport \ + GO19CONCURRENTCOMPILATION + +# From https://golang.org/src/cmd/dist/build.go +unexport \ + BOOT_GO_GCFLAGS \ + BOOT_GO_LDFLAGS + +# From https://golang.org/src/cmd/dist/buildruntime.go +unexport \ + GOEXPERIMENT + +# From https://golang.org/src/cmd/dist/buildtool.go +unexport \ + GOBOOTSTRAP_TOOLEXEC + + +# GOOS / GOARCH go_arch=$(subst \ aarch64,arm64,$(subst \ @@ -43,31 +138,117 @@ GO_HOST_OS:=$(call tolower,$(HOST_OS)) GO_HOST_ARCH:=$(call go_arch,$(subst \ armv6l,arm,$(subst \ armv7l,arm,$(subst \ - i486,i386,$(subst \ - i586,i386,$(subst \ - i686,i386,$(HOST_ARCH))))))) + i686,i386,$(HOST_ARCH))))) GO_HOST_OS_ARCH:=$(GO_HOST_OS)_$(GO_HOST_ARCH) -GO_HOST_TARGET_SAME:=$(if $(and $(findstring $(GO_OS_ARCH),$(GO_HOST_OS_ARCH)),$(findstring $(GO_HOST_OS_ARCH),$(GO_OS_ARCH))),1) -GO_HOST_TARGET_DIFFERENT:=$(if $(GO_HOST_TARGET_SAME),,1) +ifeq ($(GO_OS_ARCH),$(GO_HOST_OS_ARCH)) + GO_HOST_TARGET_SAME:=1 +else + GO_HOST_TARGET_DIFFERENT:=1 +endif -# ensure binaries can run on older CPUs -GO_386:=387 +ifeq ($(GO_ARCH),386) + # ensure binaries can run on older CPUs + GO_386:=387 -GO_ARM:=$(if $(CONFIG_arm_v7),7,$(if $(CONFIG_arm_v6),6,$(if $(findstring $(GO_ARCH),arm),5,))) + # -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors + GO_CFLAGS_TO_REMOVE:=-fno-plt -GO_MIPS:=$(if $(filter $(GO_ARCH),mips mipsle),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),) +else ifeq ($(GO_ARCH),arm) + GO_TARGET_FPU:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) -GO_MIPS64:=$(if $(filter $(GO_ARCH),mips64 mips64le),$(if $(CONFIG_HAS_FPU),hardfloat,softfloat),) + # FPU names from https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/ARM-Options.html#index-mfpu-1 + # see also https://github.com/gcc-mirror/gcc/blob/releases/gcc-8.4.0/gcc/config/arm/arm-cpus.in -# -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors -# -mips32r2: conflicts with -march=mips32 set by go -GO_CFLAGS_TO_REMOVE:=$(if \ -$(filter $(GO_ARCH),386),-fno-plt,$(if \ -$(filter $(GO_ARCH),mips mipsle),-mips32r2,)) + ifeq ($(GO_TARGET_FPU),) + GO_ARM:=5 + else ifneq ($(filter $(GO_TARGET_FPU),vfp vfpv2),) + GO_ARM:=6 + else + GO_ARM:=7 + endif + +else ifneq ($(filter $(GO_ARCH),mips mipsle),) + ifeq ($(CONFIG_HAS_FPU),y) + GO_MIPS:=hardfloat + else + GO_MIPS:=softfloat + endif + + # -mips32r2: conflicts with -march=mips32 set by go + GO_CFLAGS_TO_REMOVE:=-mips32r2 + +else ifneq ($(filter $(GO_ARCH),mips64 mips64le),) + ifeq ($(CONFIG_HAS_FPU),y) + GO_MIPS64:=hardfloat + else + GO_MIPS64:=softfloat + endif + +endif + + +# Target Go GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||powerpc64||x86_64) -GO_TARGET_PREFIX:=/usr -GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) -GO_TARGET_ROOT:=$(GO_TARGET_PREFIX)/lib/go-$(GO_TARGET_VERSION_ID) + +# ASLR/PIE + +GO_PIE_SUPPORTED_OS_ARCH:= \ + android_386 android_amd64 android_arm android_arm64 \ + linux_386 linux_amd64 linux_arm linux_arm64 \ + \ + windows_386 windows_amd64 windows_arm \ + \ + darwin_amd64 \ + freebsd_amd64 \ + \ + aix_ppc64 \ + \ + linux_ppc64le linux_s390x + +go_pie_install_suffix=$(if $(filter $(1),aix_ppc64 windows_386 windows_amd64 windows_arm),,shared) + +ifneq ($(filter $(GO_HOST_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),) + GO_HOST_PIE_SUPPORTED:=1 + GO_HOST_PIE_INSTALL_SUFFIX:=$(call go_pie_install_suffix,$(GO_HOST_OS_ARCH)) +endif + +ifneq ($(filter $(GO_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),) + GO_TARGET_PIE_SUPPORTED:=1 + GO_TARGET_PIE_INSTALL_SUFFIX:=$(call go_pie_install_suffix,$(GO_OS_ARCH)) +endif + + +# Spectre mitigations + +GO_SPECTRE_SUPPORTED_ARCH:=amd64 + +ifneq ($(filter $(GO_HOST_ARCH),$(GO_SPECTRE_SUPPORTED_ARCH)),) + GO_HOST_SPECTRE_SUPPORTED:=1 +endif + +ifneq ($(filter $(GO_ARCH),$(GO_SPECTRE_SUPPORTED_ARCH)),) + GO_TARGET_SPECTRE_SUPPORTED:=1 +endif + + +# General build info + +GO_BUILD_CACHE_DIR:=$(or $(call qstrip,$(CONFIG_GOLANG_BUILD_CACHE_DIR)),$(TOPDIR)/.go-build) +GO_MOD_CACHE_DIR:=$(DL_DIR)/go-mod-cache + +GO_MOD_ARGS= \ + -modcacherw + +GO_GENERAL_BUILD_CONFIG_VARS= \ + CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="$(CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE)" \ + GO_BUILD_CACHE_DIR="$(GO_BUILD_CACHE_DIR)" \ + GO_MOD_CACHE_DIR="$(GO_MOD_CACHE_DIR)" \ + GO_MOD_ARGS="$(GO_MOD_ARGS)" + +define Go/CacheCleanup + $(GENERAL_BUILD_CONFIG_VARS) \ + $(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh cache_cleanup +endef diff --git a/golang/golang-version.mk b/golang/golang-version.mk deleted file mode 100644 index 4933cb5d6..000000000 --- a/golang/golang-version.mk +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (C) 2018 Jeffery To -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -ifeq ($(origin GO_INCLUDE_DIR),undefined) - GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST))) -endif - - -GO_VERSION_MAJOR_MINOR:=1.13 -GO_VERSION_PATCH:=4 diff --git a/golang/golang/Config.in b/golang/golang/Config.in new file mode 100644 index 000000000..714bf01fd --- /dev/null +++ b/golang/golang/Config.in @@ -0,0 +1,33 @@ +menu "Configuration" + +config GOLANG_EXTERNAL_BOOTSTRAP_ROOT + string "External bootstrap Go root directory" + default "" + help + Path to a working Go tree (>= Go 1.4), with bin, pkg, and src + subdirectories and the Go compiler at bin/go. + + If specified, the existing Go installation will be used to + compile host (buildroot) Go. + + Leave blank to compile the default bootstrap Go. + +config GOLANG_BUILD_CACHE_DIR + string "Go build cache directory" + default "" + help + Store the Go build cache in this directory. + If not set, uses './.go-build'. + +config GOLANG_MOD_CACHE_WORLD_READABLE + bool "Ensure Go module cache is world-readable" + default n + +config GOLANG_SPECTRE + bool "Enable Spectre mitigations" + default n + depends on x86_64 + help + Currently only available for x86-64 (amd64). + +endmenu diff --git a/golang/golang/Makefile b/golang/golang/Makefile index dcce9730c..2016dfb8c 100644 --- a/golang/golang/Makefile +++ b/golang/golang/Makefile @@ -1,12 +1,14 @@ # -# Copyright (C) 2018 Jeffery To +# Copyright (C) 2018, 2020 Jeffery To # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk -include ../golang-version.mk + +GO_VERSION_MAJOR_MINOR:=1.15 +GO_VERSION_PATCH:=2 PKG_NAME:=golang PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) @@ -18,21 +20,21 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \ PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz PKG_SOURCE_URL:=$(GO_SOURCE_URLS) -PKG_HASH:=95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624 +PKG_HASH:=28bf9d0bcde251011caae230a4a05d917b172ea203f2a62f2c2f9533589d4b4d +PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jeffery To +PKG_CPE_ID:=cpe:/a:golang:go PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_DIR:=$(BUILD_DIR)/go-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 -PKG_GO_WORK_DIR:=$(PKG_BUILD_DIR)/.go_work -PKG_GO_HOST_CACHE_DIR:=$(PKG_GO_WORK_DIR)/host_cache -PKG_GO_TARGET_CACHE_DIR:=$(PKG_GO_WORK_DIR)/target_cache -PKG_GO_TMP_DIR:=$(PKG_GO_WORK_DIR)/tmp +PKG_GO_PREFIX:=/usr +PKG_GO_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) +PKG_GO_ROOT:=$(PKG_GO_PREFIX)/lib/go-$(PKG_GO_VERSION_ID) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/go-$(PKG_VERSION) HOST_BUILD_PARALLEL:=1 @@ -42,18 +44,27 @@ HOST_GO_VERSION_ID:=cross HOST_GO_ROOT:=$(HOST_GO_PREFIX)/lib/go-$(HOST_GO_VERSION_ID) HOST_GO_VALID_OS_ARCH:= \ - android_arm \ - darwin_386 darwin_amd64 darwin_arm darwin_arm64 \ - dragonfly_amd64 \ - freebsd_386 freebsd_amd64 freebsd_arm \ - linux_386 linux_amd64 linux_arm linux_arm64 \ - netbsd_386 netbsd_amd64 netbsd_arm \ - openbsd_386 openbsd_amd64 openbsd_arm \ - plan9_386 plan9_amd64 \ - solaris_amd64 \ - windows_386 windows_amd64 \ + android_386 android_amd64 android_arm android_arm64 \ + freebsd_386 freebsd_amd64 freebsd_arm freebsd_arm64 \ + linux_386 linux_amd64 linux_arm linux_arm64 \ + openbsd_386 openbsd_amd64 openbsd_arm openbsd_arm64 \ \ - linux_ppc64 linux_ppc64le linux_mips linux_mipsle linux_mips64 linux_mips64le + netbsd_386 netbsd_amd64 netbsd_arm \ + plan9_386 plan9_amd64 plan9_arm \ + windows_386 windows_amd64 windows_arm \ + \ + darwin_amd64 darwin_arm64 \ + \ + dragonfly_amd64 \ + illumos_amd64 \ + solaris_amd64 \ + \ + aix_ppc64 \ + js_wasm \ + \ + linux_ppc64 linux_ppc64le \ + linux_mips linux_mipsle linux_mips64 linux_mips64le \ + linux_riscv64 linux_s390x BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS) @@ -77,14 +88,18 @@ include $(INCLUDE_DIR)/package.mk include ../golang-compiler.mk include ../golang-package.mk -PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) -HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) -BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(BOOTSTRAP_SOURCE) +PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" +HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" +BOOTSTRAP_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_SOURCE)" -# don't strip ELF executables in test data (and go itself) +# don't strip ELF executables in test data RSTRIP:=: STRIP:=: +ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1) + PKG_CONFIG_DEPENDS+=CONFIG_GOLANG_SPECTRE +endif + define Package/golang/Default $(call GoPackage/GoSubMenu) TITLE:=Go programming language @@ -120,6 +135,10 @@ This package provides an assembler, compiler, linker, and compiled libraries for the Go programming language. endef +define Package/golang/config + source "$(SOURCE)/Config.in" +endef + define Package/golang-doc $(call Package/golang/Default) TITLE+= (documentation) @@ -143,36 +162,62 @@ This package provides the Go programming language source files needed for cross-compilation. endef -define Download/golang-bootstrap - FILE:=$(BOOTSTRAP_SOURCE) - URL:=$(BOOTSTRAP_SOURCE_URL) - HASH:=$(BOOTSTRAP_HASH) -endef -$(eval $(call Download,golang-bootstrap)) -$(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH))) -$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH))) -$(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(GO_TARGET_PREFIX),$(GO_TARGET_VERSION_ID),$(GO_OS_ARCH))) +# Bootstrap -define Host/Prepare - $(call Host/Prepare/Default) - mkdir -p $(BOOTSTRAP_BUILD_DIR) +BOOTSTRAP_ROOT_DIR:=$(call qstrip,$(CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT)) + +ifeq ($(BOOTSTRAP_ROOT_DIR),) + BOOTSTRAP_ROOT_DIR:=$(BOOTSTRAP_BUILD_DIR) + + define Download/golang-bootstrap + FILE:=$(BOOTSTRAP_SOURCE) + URL:=$(BOOTSTRAP_SOURCE_URL) + HASH:=$(BOOTSTRAP_HASH) + endef + $(eval $(call Download,golang-bootstrap)) + + define Bootstrap/Prepare + mkdir -p "$(BOOTSTRAP_BUILD_DIR)" $(BOOTSTRAP_UNPACK) -endef + endef + Hooks/HostPrepare/Post+=Bootstrap/Prepare + + $(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH))) +endif + + +# Host + +ifeq ($(GO_HOST_PIE_SUPPORTED),1) + HOST_GO_ENABLE_PIE:=1 +endif + +# when using GO_LDFLAGS to set buildmode=pie, the PIE install suffix +# does not apply (we also delete the std lib during Host/Install) + +$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX))) + +HOST_GO_VARS= \ + GOCACHE="$(GO_BUILD_CACHE_DIR)" \ + GOENV=off \ + CC="$(HOSTCC_NOCACHE)" \ + CXX="$(HOSTCXX_NOCACHE)" define Host/Compile $(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH)) $(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH)) + mkdir -p "$(GO_BUILD_CACHE_DIR)" + $(call GoCompiler/Bootstrap/Make, \ - CC=$(HOSTCC_NOCACHE) \ - CXX=$(HOSTCXX_NOCACHE) \ + $(HOST_GO_VARS) \ ) $(call GoCompiler/Host/Make, \ - GOROOT_BOOTSTRAP=$(BOOTSTRAP_BUILD_DIR) \ - CC=$(HOSTCC_NOCACHE) \ - CXX=$(HOSTCXX_NOCACHE) \ + GOROOT_BOOTSTRAP="$(BOOTSTRAP_ROOT_DIR)" \ + $(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \ + $(HOST_GO_VARS) \ ) endef @@ -187,77 +232,111 @@ define Host/Install $(call GoCompiler/Host/Install/BinLinks,) - rm -rf $(HOST_GO_ROOT)/pkg/$(GO_HOST_OS_ARCH) + rm -rf "$(HOST_GO_ROOT)/pkg/$(GO_HOST_OS_ARCH)$(if $(HOST_GO_INSTALL_SUFFIX),_$(HOST_GO_INSTALL_SUFFIX))" - $(INSTALL_DIR) $(HOST_GO_ROOT)/openwrt - $(INSTALL_BIN) ./files/go-gcc-helper $(HOST_GO_ROOT)/openwrt/ - $(LN) go-gcc-helper $(HOST_GO_ROOT)/openwrt/gcc - $(LN) go-gcc-helper $(HOST_GO_ROOT)/openwrt/g++ + $(INSTALL_DIR) "$(HOST_GO_ROOT)/openwrt" + $(INSTALL_BIN) ./files/go-gcc-helper "$(HOST_GO_ROOT)/openwrt/" + $(LN) go-gcc-helper "$(HOST_GO_ROOT)/openwrt/gcc" + $(LN) go-gcc-helper "$(HOST_GO_ROOT)/openwrt/g++" endef define Host/Uninstall - rm -rf $(HOST_GO_ROOT)/openwrt + rm -rf "$(HOST_GO_ROOT)/openwrt" $(call GoCompiler/Host/Uninstall/BinLinks,) $(call GoCompiler/Host/Uninstall,) endef + +# Target + +ifeq ($(GO_PKG_ENABLE_PIE),1) + PKG_GO_INSTALL_SUFFIX:=$(GO_TARGET_PIE_INSTALL_SUFFIX) +endif + +$(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(PKG_GO_PREFIX),$(PKG_GO_VERSION_ID),$(GO_OS_ARCH),$(PKG_GO_INSTALL_SUFFIX))) + +PKG_GO_ZBOOTSTRAP_MODS:= \ + s/defaultGO386 = `[^`]*`/defaultGO386 = `$(or $(GO_386),387)`/; \ + s/defaultGOARM = `[^`]*`/defaultGOARM = `$(or $(GO_ARM),5)`/; \ + s/defaultGOMIPS = `[^`]*`/defaultGOMIPS = `$(or $(GO_MIPS),hardfloat)`/; \ + s/defaultGOMIPS64 = `[^`]*`/defaultGOMIPS64 = `$(or $(GO_MIPS64),hardfloat)`/; \ + s/defaultGOPPC64 = `[^`]*`/defaultGOPPC64 = `power8`/; + +PKG_GO_VARS= \ + GOCACHE="$(GO_BUILD_CACHE_DIR)" \ + GOENV=off \ + GO_GCC_HELPER_PATH="$$$$PATH" \ + CC=gcc \ + CXX=g++ \ + PKG_CONFIG=pkg-config \ + PATH="$(HOST_GO_ROOT)/openwrt:$$$$PATH" + +PKG_GO_GCFLAGS= \ + $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) + +PKG_GO_ASMFLAGS= \ + $(if $(GO_PKG_ENABLE_SPECTRE),-spectre all) + +PKG_GO_LDFLAGS= \ + -buildid '$(SOURCE_DATE_EPOCH)' \ + -linkmode external \ + -extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))' \ + $(if $(CONFIG_NO_STRIP)$(CONFIG_DEBUG),,-s -w) + +# setting -trimpath is not necessary here because the paths inside the +# compiler binary are relative to GOROOT_FINAL (PKG_GO_ROOT), which is +# static / not dependent on the build environment +PKG_GO_INSTALL_ARGS= \ + -ldflags "all=$(PKG_GO_LDFLAGS)" \ + $(if $(PKG_GO_GCFLAGS),-gcflags "all=$(PKG_GO_GCFLAGS)") \ + $(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \ + $(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie) + define Build/Compile - mkdir -p \ - $(PKG_GO_HOST_CACHE_DIR) \ - $(PKG_GO_TARGET_CACHE_DIR) \ - $(PKG_GO_TMP_DIR) + mkdir -p "$(GO_BUILD_CACHE_DIR)" @echo "Building target Go first stage" $(call GoCompiler/Package/Make, \ - GOROOT_BOOTSTRAP=$(HOST_GO_ROOT) \ - GOCACHE=$(PKG_GO_HOST_CACHE_DIR) \ - GOTMPDIR=$(PKG_GO_TMP_DIR) \ + GOROOT_BOOTSTRAP="$(HOST_GO_ROOT)" \ GO_GCC_HELPER_CC="$(HOSTCC)" \ GO_GCC_HELPER_CXX="$(HOSTCXX)" \ - GO_GCC_HELPER_PATH=$$$$PATH \ - CC=gcc \ - CXX=g++ \ - PKG_CONFIG=pkg-config \ - PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \ + $(PKG_GO_VARS) \ ) + $(SED) '$(PKG_GO_ZBOOTSTRAP_MODS)' \ + "$(PKG_BUILD_DIR)/src/cmd/internal/objabi/zbootstrap.go" + @echo "Building target Go second stage" ( \ - cd $(PKG_BUILD_DIR)/bin ; \ + cd "$(PKG_BUILD_DIR)/bin" ; \ + export $(GO_PKG_TARGET_VARS) ; \ $(CP) go go-host ; \ - GOROOT_FINAL=$(GO_TARGET_ROOT) \ - GOCACHE=$(PKG_GO_TARGET_CACHE_DIR) \ - GOTMPDIR=$(PKG_GO_TMP_DIR) \ + GOROOT_FINAL="$(PKG_GO_ROOT)" \ GO_GCC_HELPER_CC="$(TARGET_CC)" \ GO_GCC_HELPER_CXX="$(TARGET_CXX)" \ - GO_GCC_HELPER_PATH=$$$$PATH \ - CC=gcc \ - CXX=g++ \ - PKG_CONFIG=pkg-config \ - PATH=$(HOST_GO_ROOT)/openwrt:$$$$PATH \ - $(call GoPackage/Environment) \ - ./go-host install -a -v std cmd ; \ - retval=$$$$? ; \ + $(PKG_GO_VARS) \ + ./go-host install -a $(PKG_GO_INSTALL_ARGS) std cmd ; \ + retval="$$$$?" ; \ rm -f go-host ; \ - exit $$$$retval ; \ + exit "$$$$retval" ; \ ) endef define Package/golang/install - $(call GoCompiler/Package/Install/Bin,$(1)$(GO_TARGET_PREFIX)) - $(call GoCompiler/Package/Install/BinLinks,$(1)$(GO_TARGET_PREFIX)) + $(call GoCompiler/Package/Install/Bin,$(1)$(PKG_GO_PREFIX)) + $(call GoCompiler/Package/Install/BinLinks,$(1)$(PKG_GO_PREFIX)) endef define Package/golang-doc/install - $(call GoCompiler/Package/Install/Doc,$(1)$(GO_TARGET_PREFIX)) + $(call GoCompiler/Package/Install/Doc,$(1)$(PKG_GO_PREFIX)) endef define Package/golang-src/install - $(call GoCompiler/Package/Install/Src,$(1)$(GO_TARGET_PREFIX)) + $(call GoCompiler/Package/Install/Src,$(1)$(PKG_GO_PREFIX)) endef # src/debug contains ELF executables as test data @@ -268,6 +347,7 @@ define Package/golang-src/extra_provides echo 'libc.so.6' endef + $(eval $(call HostBuild)) $(eval $(call BuildPackage,golang)) $(eval $(call BuildPackage,golang-doc)) diff --git a/golang/golang/files/go-gcc-helper b/golang/golang/files/go-gcc-helper index 3d3f8935d..b396e302c 100644 --- a/golang/golang/files/go-gcc-helper +++ b/golang/golang/files/go-gcc-helper @@ -1,23 +1,41 @@ #!/bin/sh me=go-gcc-helper -name=$(basename $0) +name="${0##*/}" -case $name in +log() { + # shellcheck disable=SC2039 + local IFS=" " + printf '%s\n' "$me: $*" +} + +case "$name" in gcc) - cmd=$GO_GCC_HELPER_CC + if [ -z "$GO_GCC_HELPER_CC" ]; then + log "missing GO_GCC_HELPER_CC" + exit 1 + fi + cmd="$GO_GCC_HELPER_CC" ;; g++) - cmd=$GO_GCC_HELPER_CXX + if [ -z "$GO_GCC_HELPER_CXX" ]; then + log "missing GO_GCC_HELPER_CXX" + exit 1 + fi + cmd="$GO_GCC_HELPER_CXX" ;; *) - echo "$me: unknown command \"$name\"" + log "unknown command \"$name\"" exit 1 ;; esac -export PATH="$GO_GCC_HELPER_PATH" +if [ -n "$GO_GCC_HELPER_PATH" ]; then + export PATH="$GO_GCC_HELPER_PATH" +else + log "missing GO_GCC_HELPER_PATH" +fi -echo "$me: running $cmd $@" +log "running $cmd $*" $cmd "$@" diff --git a/luci-app-dsvpn/po/de/dsvpn.po b/luci-app-dsvpn/po/de/dsvpn.po index 7c1728a81..4bea475af 100644 --- a/luci-app-dsvpn/po/de/dsvpn.po +++ b/luci-app-dsvpn/po/de/dsvpn.po @@ -1,7 +1,7 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-08-14 08:04+0000\n" -"Last-Translator: Andreas Dorfer \n" +"PO-Revision-Date: 2020-10-05 12:39+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: German \n" "Language: de\n" @@ -19,11 +19,11 @@ msgstr "DSVPN" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 msgid "Enable" -msgstr "anschalten" +msgstr "Aktivieren" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 msgid "Interface name" -msgstr "Anschluss-Bezeichnung" +msgstr "Name der Verbindung" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 msgid "Key" diff --git a/luci-app-dsvpn/po/fr/dsvpn.po b/luci-app-dsvpn/po/fr/dsvpn.po index 7eebcf23e..8f06d0390 100644 --- a/luci-app-dsvpn/po/fr/dsvpn.po +++ b/luci-app-dsvpn/po/fr/dsvpn.po @@ -1,27 +1,28 @@ msgid "" msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" -"Last-Translator: Ycarus \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"PO-Revision-Date: 2020-09-30 08:50+0000\n" +"Last-Translator: Anonymous \n" +"Language-Team: French \n" "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" #: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 #: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 #: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 msgid "DSVPN" -msgstr "" +msgstr "DSVPN" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 msgid "Enable" -msgstr "Activé" +msgstr "Activer" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 msgid "Interface name" @@ -29,7 +30,7 @@ msgstr "Nom de l'interface" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 msgid "Key" -msgstr "Clef" +msgstr "Clé" #: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 msgid "Remote host" diff --git a/luci-app-dsvpn/po/it/dsvpn.po b/luci-app-dsvpn/po/it/dsvpn.po new file mode 100644 index 000000000..dd2cd86a2 --- /dev/null +++ b/luci-app-dsvpn/po/it/dsvpn.po @@ -0,0 +1,50 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-09-21 12:51+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: Italian \n" +"Language: it\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 +#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 +#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 +msgid "DSVPN" +msgstr "DSVPN" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 +msgid "Enable" +msgstr "Attivare" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 +msgid "Interface name" +msgstr "Nome interfaccia" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 +msgid "Key" +msgstr "Key" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 +msgid "Remote host" +msgstr "Rimuovi server" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 +msgid "Remote port" +msgstr "Porta remota" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 +msgid "Settings" +msgstr "Impostazioni" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 +msgid "Tunnel local IP" +msgstr "IP locale del tunnel" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 +msgid "Tunnel remote IP" +msgstr "IP remoto del tunnel" diff --git a/luci-app-dsvpn/po/oc/dsvpn.po b/luci-app-dsvpn/po/oc/dsvpn.po new file mode 100644 index 000000000..4a806fe56 --- /dev/null +++ b/luci-app-dsvpn/po/oc/dsvpn.po @@ -0,0 +1,50 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-08-18 17:37+0000\n" +"Last-Translator: Quentin PAGÈS \n" +"Language-Team: Occitan \n" +"Language: oc\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:4 +#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:5 +#: luci-app-dsvpn/luasrc/controller/dsvpn.lua:6 +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:6 +msgid "DSVPN" +msgstr "DSVPN" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:12 +msgid "Enable" +msgstr "Activat" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:39 +msgid "Interface name" +msgstr "Nom de l’interfàcia" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:26 +msgid "Key" +msgstr "Clau" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:15 +msgid "Remote host" +msgstr "Nom de l’òste distant o adreça IP" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:21 +msgid "Remote port" +msgstr "Pòrt distant" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:8 +msgid "Settings" +msgstr "Paramètres" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:31 +msgid "Tunnel local IP" +msgstr "Adreça IP locala del tunèl" + +#: luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua:35 +msgid "Tunnel remote IP" +msgstr "Adreça IP distanta del tunèl" diff --git a/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js b/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js index 82703c320..6c0c7ae73 100644 --- a/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js +++ b/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js @@ -281,6 +281,12 @@ return view.extend({ fwtool.addLimitOption(s); fwtool.addLimitBurstOption(s); + o = s.taboption('advanced', form.Flag, 'v2ray', _('Use V2Ray'), + _('Forwards ports from server using V2Ray proxy (if enabled) instead of VPN')); + o.modalonly = true; + o.editable = true; + o.depends({ src: 'vpn', '!contains': true }); + o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'), _('Passes additional arguments to iptables. Use with care!')); o.modalonly = true; diff --git a/luci-app-firewall/po/templates/firewall.pot b/luci-app-firewall/po/templates/firewall.pot index f5f97c59a..bd49dd2ae 100644 --- a/luci-app-firewall/po/templates/firewall.pot +++ b/luci-app-firewall/po/templates/firewall.pot @@ -1,7 +1,7 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:47 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:48 msgid "" "%{src?%{dest?Forwarded:Incoming}:Outgoing} %{ipv6?%{ipv4?IPv4 and " "IPv6:IPv6}:IPv4}%{proto?, protocol %{proto#" @@ -18,325 +18,325 @@ msgid "" "val}}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:431 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:433 msgid "-- add IP --" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:479 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:481 msgid "-- add MAC --" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:117 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:118 msgid "" "Accept %{src?%{dest?forward:input}:output}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:86 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:87 msgid "Prevent source rewrite" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:80 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:81 msgid "" "Forward to %{dest}%{dest_ip? IP " "%{dest_ip}}%{dest_port? port %{dest_port}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:114 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:115 msgid "" "Drop %{src?%{dest?forward:input}:output}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:132 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:133 msgid "" "Assign DSCP classification %{set_dscp}" "" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:126 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:127 msgid "" "Assign conntrack helper %{set_helper}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:129 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:130 msgid "" "%{set_mark?Assign:XOR} firewall mark " "%{set_mark?:%{set_xmark}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:83 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:84 msgid "Automatically rewrite source IP" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:123 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:124 msgid "" "Do not track %{src?%{dest?forward:input}:" "output}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:120 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:121 msgid "" "Reject %{src?%{dest?forward:input}:output}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:80 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:81 msgid "" "Statically rewrite to source %{snat_ip?IP " "%{snat_ip}} %{snat_port?port %{snat_port}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:224 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:225 msgid "A rewrite IP must be specified!" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:212 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:213 msgid "ACCEPT - Disable address rewriting" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:172 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:228 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:363 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:157 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:207 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:173 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:229 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:364 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:158 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:208 msgid "Action" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:260 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:265 msgid "" "Additional raw iptables arguments to classify zone destination " "traffic, e.g. -p tcp --dport 443 to only match outbound HTTPS " "traffic." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:250 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:255 msgid "" "Additional raw iptables arguments to classify zone source traffic, " "e.g. -p tcp --sport 443 to only match inbound HTTPS traffic." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:137 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:181 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:135 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:92 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:138 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:182 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:136 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:93 msgid "Advanced Settings" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:222 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:227 msgid "Allow \"invalid\" traffic" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:322 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:327 msgid "Allow forward from source zones:" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:281 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:286 msgid "Allow forward to destination zones:" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:506 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:508 msgid "Any" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:429 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:445 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:257 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:273 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:430 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:446 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:258 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:274 msgid "Any day" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:314 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:316 msgid "" "Apply a bitwise XOR of the given value and the existing mark value on " "established connections. Format is value[/mask]. If a mask is specified then " "those bits set in the mask are zeroed out." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:261 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:263 msgid "Apply the given DSCP class or value to established connections." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:391 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:392 msgid "Assign the specified connection tracking helper to matched traffic." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:225 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:230 msgid "Automatic helper assignment" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:225 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:230 msgid "" "Automatically assign conntrack helpers based on traffic protocol and port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:93 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:94 msgid "Conntrack Settings" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:229 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:234 msgid "Conntrack helpers" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:15 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:16 msgid "Contents have been saved." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:650 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:652 msgid "Continue" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:192 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:197 msgid "Covered devices" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:151 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:156 msgid "Covered networks" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:197 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:202 msgid "Covered subnets" msgstr "" -#: applications/luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:53 +#: luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:54 msgid "Custom Rules" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:25 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:26 msgid "" "Custom rules allow you to execute arbitrary iptables commands which are not " "otherwise covered by the firewall framework. The commands are executed after " "each firewall restart, right after the default ruleset has been loaded." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:373 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:374 msgid "DSCP classification" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:260 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:262 msgid "DSCP mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:294 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:296 msgid "DSCP mark required" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:354 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:193 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:355 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:194 msgid "Destination address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:356 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:198 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:357 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:199 msgid "Destination port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:348 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:349 msgid "Destination zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:260 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:261 msgid "Device name" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:222 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:227 msgid "" "Do not install extra rules to reject forwarded traffic with conntrack state " "invalid. This may be required for complex asymmetric route setups." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:44 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:45 msgid "Drop invalid packets" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:180 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:234 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:163 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:181 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:235 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:164 msgid "Enable" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:247 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:248 msgid "Enable NAT Loopback" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:43 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:44 msgid "Enable SYN-flood protection" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:235 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:240 msgid "Enable logging on this zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:336 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:338 msgid "Expecting: %s" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:62 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:63 msgid "Experimental feature. Not fully compatible with QoS/SQM." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:229 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:234 msgid "Explicitly choses allowed connection tracking helpers for zone traffic" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:214 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:215 msgid "External IP address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:219 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:220 msgid "External port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:283 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:421 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:248 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:290 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:422 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:249 msgid "Extra arguments" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:260 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:265 msgid "Extra destination arguments" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:94 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:95 msgid "Extra iptables arguments" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:250 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:255 msgid "Extra source arguments" msgstr "" -#: applications/luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:3 +#: luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:3 msgid "Firewall" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:24 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:25 msgid "Firewall - Custom Rules" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:126 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:127 msgid "Firewall - NAT Rules" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:128 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:129 msgid "Firewall - Port Forwards" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:172 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:173 msgid "Firewall - Traffic Rules" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:36 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:37 msgid "Firewall - Zone Settings" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:643 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:645 msgid "Firewall configuration migration" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:49 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:131 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:50 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:132 msgid "Forward" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:29 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:30 msgid "" "Forwarded IPv4%{proto?, protocol %{proto#%{next?, }%{item.name}}}%{mark?, mark %{mark.val}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:435 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:263 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:285 +msgid "" +"Forwards ports from server using V2Ray proxy (if enabled) instead of VPN" +msgstr "" + +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:436 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:264 msgid "Friday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:38 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:39 msgid "" "From %{src}%{src_device?, interface %{src_device}}%{src_ip?, IP " "%{src_ip#%{next?, }}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:63 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:64 msgid "" "From %{src}%{src_device?, interface %{src_device}}%{src_ip?, IP " "%{src_ip#%{next?, }}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:47 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:48 msgid "" "From %{src}%{src_ip?, IP %{src_ip#%{next?, }%{item.ival}}}%{src_port?, " @@ -381,39 +386,47 @@ msgid "" "name}\"}}>%{item.ival}}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:136 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:180 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:134 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:39 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:91 -#: applications/luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:16 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:149 +msgid "Full Cone" +msgstr "" + +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:137 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:181 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:135 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:40 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:92 +#: luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:17 msgid "General Settings" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:73 +#: luci-app-firewall/root/usr/share/rpcd/acl.d/luci-app-firewall.json:3 +msgid "Grant access to firewall configuration" +msgstr "" + +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:74 msgid "Hardware flow offloading" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:271 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:203 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:272 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:208 msgid "IPv4 and IPv6" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:272 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:204 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:273 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:209 msgid "IPv4 only" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:273 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:205 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:274 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:210 msgid "IPv6 only" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:243 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:244 msgid "Inbound device" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:37 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:38 msgid "" "Incoming IPv4%{proto?, protocol %{proto#%{next?, }%{item.types?%{item.name}ICMP with " @@ -426,212 +439,212 @@ msgid "" "\"%{helper.name}\">%{helper.val}}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:47 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:129 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:48 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:130 msgid "Input" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:233 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:234 msgid "Internal IP address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:238 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:239 msgid "Internal port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:227 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:228 msgid "Internal zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:302 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:304 msgid "Invalid DSCP mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:370 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:372 msgid "Invalid limit value" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:380 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:382 msgid "Limit burst" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:238 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:243 msgid "Limit log messages" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:346 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:348 msgid "Limit matching" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:74 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:95 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:67 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:75 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:96 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:68 msgid "" "Limit matching to %{limit.num} packets per %{limit.unit}%{limit.burst? burst %{limit.burst}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:347 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:349 msgid "Limits traffic matching to the specified rate." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:252 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:253 msgid "Loopback source IP" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:211 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:212 msgid "MASQUERADE - Automatically rewrite to outbound interface IP" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:148 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:153 msgid "MSS clamping" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:145 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:146 msgid "Masquerading" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:161 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:217 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:146 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:162 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:218 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:147 msgid "Match" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:260 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:262 msgid "Match DSCP" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:284 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:285 msgid "Match ICMP type" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:240 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:241 msgid "Match device" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:194 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:195 msgid "Match forwarded traffic directed at the given IP address." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:199 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:200 msgid "" "Match forwarded traffic directed at the given destination port or port range." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:180 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:181 msgid "Match forwarded traffic from this IP or range." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:185 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:186 msgid "" "Match forwarded traffic originating from the given source port or port range." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:261 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:398 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:262 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:399 msgid "Match helper" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:220 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:221 msgid "" "Match incoming traffic directed at the given destination port or port range " "on this host" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:313 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:315 msgid "Match mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:261 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:398 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:262 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:399 msgid "Match traffic using the specified connection tracking helper." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:316 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:318 msgid "Matches a specific firewall mark or a range of different marks." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:239 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:240 msgid "Matches forwarded traffic using the specified outbound network device." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:261 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:263 msgid "Matches traffic carrying the specified DSCP marking." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:381 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:383 msgid "" "Maximum initial number of packets to match: this number gets recharged by " "one every time the limit specified above is not reached, up to this number." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:431 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:259 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:432 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:260 msgid "Monday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:441 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:269 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:442 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:270 msgid "Month Days" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:129 -#: applications/luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:43 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:130 +#: luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:44 msgid "NAT Rules" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:127 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:128 msgid "" "NAT rules allow fine grained control over the source IP to use for outbound " "or forwarded traffic." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:157 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:213 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:142 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:107 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:158 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:214 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:143 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:108 msgid "Name" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:215 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:216 msgid "Only match incoming traffic directed at the given IP address." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:196 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:197 msgid "Only match incoming traffic from these MACs." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:201 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:202 msgid "Only match incoming traffic from this IP or range." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:206 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:207 msgid "" "Only match incoming traffic originating from the given source port or port " "range on the client host" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:244 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:238 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:245 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:239 msgid "Outbound device" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:172 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:173 msgid "Outbound zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:48 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:130 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:49 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:131 msgid "Output" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:284 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:422 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:249 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:291 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:423 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:250 msgid "Passes additional arguments to iptables. Use with care!" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:247 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:252 msgid "" "Passing raw iptables arguments to source and destination traffic " "classification rules allows to match packets based on other criteria than " @@ -640,172 +653,172 @@ msgid "" "all services." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:131 -#: applications/luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:25 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:132 +#: luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:26 msgid "Port Forwards" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:129 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:130 msgid "" "Port forwarding allows remote computers on the Internet to connect to a " "specific computer or service within the private LAN." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:185 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:280 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:168 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:186 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:281 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:169 msgid "Protocol" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:239 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:240 msgid "" "Redirect matched incoming traffic to the given port on the internal host" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:234 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:235 msgid "Redirect matched incoming traffic to the specified internal host" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:74 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:75 msgid "Requires hardware NAT support. Implemented at least for mt7621" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:215 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:220 msgid "Restrict Masquerading to given destination subnets" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:208 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:213 msgid "Restrict Masquerading to given source subnets" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:268 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:202 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:269 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:207 msgid "Restrict to address family" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:214 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:215 msgid "Rewrite IP address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:215 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:216 msgid "Rewrite matched traffic to the specified source IP address." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:230 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:231 msgid "Rewrite matched traffic to the specified source port or port range." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:229 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:230 msgid "Rewrite port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:61 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:62 msgid "Routing/NAT Offloading" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:210 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:211 msgid "SNAT - Rewrite to specific source IP or port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:436 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:264 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:437 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:265 msgid "Saturday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:313 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:315 msgid "Set mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:315 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:317 msgid "" "Set the given mark value on established connections. Format is value[/mask]. " "If a mask is specified then only those bits set in the mask are modified." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:69 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:70 msgid "Software based offloading for routing/NAT" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:68 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:69 msgid "Software flow offloading" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:200 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:201 msgid "Source IP address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:195 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:338 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:196 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:339 msgid "Source MAC address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:339 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:179 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:340 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:180 msgid "Source address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:205 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:341 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:184 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:206 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:342 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:185 msgid "Source port" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:189 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:332 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:190 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:333 msgid "Source zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:261 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:262 msgid "" "Specifies whether to tie this traffic rule to a specific inbound or outbound " "network device." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:252 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:253 msgid "" "Specifies whether to use the external or the internal IP address for " "reflected traffic." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:460 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:288 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:461 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:289 msgid "Start Date (yyyy-mm-dd)" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:452 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:280 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:453 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:281 msgid "Start Time (hh.mm.ss)" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:464 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:292 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:465 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:293 msgid "Stop Date (yyyy-mm-dd)" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:456 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:284 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:457 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:285 msgid "Stop Time (hh.mm.ss)" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:430 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:258 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:431 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:259 msgid "Sunday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:644 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:646 msgid "" "The existing firewall configuration needs to be changed for LuCI to function " "properly." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:37 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:38 msgid "" "The firewall creates zones over your network interfaces to control network " "traffic flow." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:188 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:277 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:193 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:282 msgid "" "The options below control the forwarding policies between this zone (%s) and " "other zones. Destination zones cover forwarded traffic " @@ -815,7 +828,7 @@ msgid "" "not imply a permission to forward from wan to lan as well." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:103 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:104 msgid "" "This section defines common properties of %q. The input and " "output options set the default policies for traffic entering and " @@ -824,22 +837,22 @@ msgid "" "networks specifies which available networks are members of this zone." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:434 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:262 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:435 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:263 msgid "Thursday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:182 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:136 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:183 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:137 msgid "Time Restrictions" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:468 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:296 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:469 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:297 msgid "Time in UTC" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:76 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:77 msgid "" "To %{dest}%{dest_device?, interface %{dest_device}}%{dest_ip?, IP " "%{dest_ip#%{next?, }}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:48 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:49 msgid "" "To %{dest}%{dest_device?, via interface %{dest_device}}%{dest_ip?, IP %{dest_ip#%{next?, }%{item.ival}}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:56 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:57 msgid "" "To %{dest}%{dest_ip?, IP %{dest_ip#%{next?, }%{item.ival}%{item.ival}}}" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:391 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:392 msgid "Tracking helper" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:175 -#: applications/luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:34 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:176 +#: luci-app-firewall/root/usr/share/luci/menu.d/luci-app-firewall.json:35 msgid "Traffic Rules" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:173 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:174 msgid "" "Traffic rules define policies for packets traveling between different zones, " "for example to reject traffic between certain hosts or to open WAN ports on " "the router." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:432 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:260 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:433 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:261 msgid "Tuesday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:18 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js:19 msgid "Unable to save contents: %s" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:276 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:413 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:277 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:414 msgid "Unknown or not installed conntrack helper \"%s\"" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:139 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:143 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:140 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:144 msgid "Unnamed NAT" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:144 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:158 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:145 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:159 msgid "Unnamed forward" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:189 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:214 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:190 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:215 msgid "Unnamed rule" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:108 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:109 msgid "Unnamed zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:548 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:550 msgid "Unrecognized protocol" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:645 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:647 msgid "" "Upon pressing \"Continue\", \"redirect\" sections with target \"SNAT\" will " "be converted to \"nat\" sections and the firewall will be restarted to apply " "the updated configuration." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:256 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:284 +msgid "Use V2Ray" +msgstr "" + +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:257 msgid "Use external IP address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:255 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:256 msgid "Use internal IP address" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:192 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:197 msgid "" "Use this option to classify zone traffic by raw, non-uci managed " "network devices." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:197 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:202 msgid "" "Use this option to classify zone traffic by source or destination subnet " "instead of networks or devices." msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:328 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:330 msgid "Valid firewall mark required" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:433 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:261 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:434 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:262 msgid "Wednesday" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:425 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:253 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:426 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:254 msgid "Week Days" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:372 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:373 msgid "XOR firewall mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:313 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:315 msgid "XOR mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:121 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:122 msgid "Zone ⇒ Forwardings" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:80 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:81 msgid "Zones" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:367 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:55 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:137 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:368 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:56 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:138 msgid "accept" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:265 -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:431 -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:453 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:210 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:242 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:263 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:289 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:344 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:359 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:393 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:400 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:189 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:202 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:267 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:433 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:455 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:211 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:243 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:264 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:290 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:345 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:360 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:394 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:401 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:190 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:203 msgid "any" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:48 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:81 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:64 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:77 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:39 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:49 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:49 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:82 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:65 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:78 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:40 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:50 msgid "any zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:371 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:372 msgid "apply firewall mark" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:370 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:371 msgid "assign conntrack helper" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:67 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:88 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:60 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:68 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:89 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:61 msgid "day" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:233 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:234 msgid "do not rewrite" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:369 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:370 msgid "don't track" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:366 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:54 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:136 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:367 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:55 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:137 msgid "drop" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:67 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:88 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:60 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:68 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:89 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:61 msgid "hour" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:67 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:88 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:60 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:68 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:89 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:61 msgid "minute" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:368 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:53 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:135 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:369 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:54 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:136 msgid "reject" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:67 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:88 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:60 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:68 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:89 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:61 msgid "second" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:48 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:57 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:81 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:64 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:77 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:49 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:49 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:58 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js:82 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:65 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:78 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js:50 msgid "this device" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:102 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:187 -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:276 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:103 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:192 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js:281 msgid "this new zone" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:351 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:353 msgid "unlimited" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:242 +#: luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js:243 msgid "unspecified" msgstr "" -#: applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:336 +#: luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js:338 msgid "valid firewall mark" msgstr "" diff --git a/luci-app-glorytun/po/de/glorytun.po b/luci-app-glorytun/po/de/glorytun.po index bb94937c5..f3f01f7fd 100644 --- a/luci-app-glorytun/po/de/glorytun.po +++ b/luci-app-glorytun/po/de/glorytun.po @@ -1,7 +1,7 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-08-14 08:04+0000\n" -"Last-Translator: Andreas Dorfer \n" +"PO-Revision-Date: 2020-10-05 12:39+0000\n" +"Last-Translator: Anonymous \n" "Language-Team: German \n" "Language: de\n" @@ -11,11 +11,13 @@ msgstr "" "X-Generator: Weblate 4.0.4\n" msgid "Add" -msgstr "hinzufügen" +msgstr "Hinzufügen" msgid "" "Below is a list of configured Glorytun instances and their current state" -msgstr "Liste der konfigurierten Glorytun-Instanzen und ihr aktueller Status" +msgstr "" +"Nachfolgend eine Liste der konfigurierten Glorytun-Instanzen und ihre " +"aktuelle Status." msgid "Bind address" msgstr "Bindungsadresse" @@ -27,28 +29,28 @@ msgid "Bind port" msgstr "Verbindungs-Port" msgid "Enable" -msgstr "anschalten" +msgstr "Aktivieren" msgid "Enabled" -msgstr "aktiv" +msgstr "Aktiv" msgid "Glorytun" msgstr "Glorytun" msgid "Glorytun instances" -msgstr "Glorytun-Instanz" +msgstr "Glorytun-Instanzen" msgid "Instance \"%s\"" msgstr "Instanz '%s'" msgid "Interface" -msgstr "Anschluss" +msgstr "Schnittstelle" msgid "Interface name" -msgstr "Anschluss-Bezeichnung" +msgstr "Name der Verbindung" msgid "Invalid" -msgstr "ungültig" +msgstr "Ungültig" msgid "Local tunnel ip address" msgstr "IP-Adresse des lokalen Tunnels" diff --git a/luci-app-glorytun/po/fr/glorytun.po b/luci-app-glorytun/po/fr/glorytun.po index 834e578eb..7b6b678ee 100644 --- a/luci-app-glorytun/po/fr/glorytun.po +++ b/luci-app-glorytun/po/fr/glorytun.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-08-03 12:39+0000\n" +"PO-Revision-Date: 2020-10-07 10:57+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -20,19 +20,19 @@ msgid "Below is a list of configured Glorytun instances and their current state" msgstr "Ci-dessous une liste des instances Glorytun configurées et leur état actuel" msgid "Bind address" -msgstr "" +msgstr "Adresse mappée" msgid "Bind backup" -msgstr "" +msgstr "Lier la sauvegarde" msgid "Bind port" msgstr "Port de connexion" msgid "Enable" -msgstr "Active" +msgstr "Activer" msgid "Enabled" -msgstr "Activé" +msgstr "Activer" msgid "Glorytun" msgstr "Glorytun" @@ -62,7 +62,7 @@ msgid "MTU" msgstr "MTU" msgid "MTU auto" -msgstr "" +msgstr "MTU auto" msgid "Overview" msgstr "Aperçu" diff --git a/luci-app-glorytun/po/it/glorytun.po b/luci-app-glorytun/po/it/glorytun.po new file mode 100644 index 000000000..96ae2b091 --- /dev/null +++ b/luci-app-glorytun/po/it/glorytun.po @@ -0,0 +1,104 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-09-21 12:51+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: Italian \n" +"Language: it\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.0.4\n" + +msgid "Add" +msgstr "Aggiungi" + +msgid "" +"Below is a list of configured Glorytun instances and their current state" +msgstr "" +"Di seguito è riportato un elenco di istanze Glorytun configurate e il loro " +"stato corrente" + +msgid "Bind address" +msgstr "Associa indirizzo" + +msgid "Bind backup" +msgstr "Bind backup" + +msgid "Bind port" +msgstr "Bind port" + +msgid "Enable" +msgstr "Attivare" + +msgid "Enabled" +msgstr "Abilitato" + +msgid "Glorytun" +msgstr "Glorytun" + +msgid "Glorytun instances" +msgstr "Istanze di Glorytun" + +msgid "Instance \"%s\"" +msgstr "Istanza \"%s\"" + +msgid "Interface" +msgstr "Interfaccia" + +msgid "Interface name" +msgstr "Nome interfaccia" + +msgid "Invalid" +msgstr "Non valido" + +msgid "Local tunnel ip address" +msgstr "Indirizzo IP del tunnel locale" + +msgid "MPTCP" +msgstr "MPTCP" + +msgid "MTU" +msgstr "MTU" + +msgid "MTU auto" +msgstr "MTU auto" + +msgid "Overview" +msgstr "Panoramica" + +msgid "Port" +msgstr "Porta" + +msgid "Protocol" +msgstr "Protocollo" + +msgid "Remote host name or ip address" +msgstr "Nome host remoto o indirizzo IP" + +msgid "Remote tunnel ip address" +msgstr "Indirizzo IP del tunnel remoto" + +msgid "Server mode" +msgstr "Modalità server" + +msgid "Start/Stop" +msgstr "Marcia/arresto" + +msgid "Started" +msgstr "Iniziato" + +msgid "TCP port # for both local and remote" +msgstr "Porta TCP # sia per locale che per remoto" + +msgid "The secret key" +msgstr "Chiave segreta" + +msgid "Use ChaCha20 stream cipher" +msgstr "Usa il cifrario a flusso ChaCha20" + +msgid "no" +msgstr "no" + +msgid "yes (%i)" +msgstr "Sì (%i)" diff --git a/luci-app-glorytun/po/oc/glorytun.po b/luci-app-glorytun/po/oc/glorytun.po new file mode 100644 index 000000000..be34c778d --- /dev/null +++ b/luci-app-glorytun/po/oc/glorytun.po @@ -0,0 +1,103 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-10-13 07:30+0000\n" +"Last-Translator: Quentin PAGÈS \n" +"Language-Team: Occitan \n" +"Language: oc\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" + +msgid "Add" +msgstr "Ajustar" + +msgid "" +"Below is a list of configured Glorytun instances and their current state" +msgstr "" +"Çai-jos una lista de las instàncias Glorytun configuradas e lor estat actual" + +msgid "Bind address" +msgstr "Adreça mapada" + +msgid "Bind backup" +msgstr "Associar la salvagarda" + +msgid "Bind port" +msgstr "Pòrt de connexion" + +msgid "Enable" +msgstr "Activat" + +msgid "Enabled" +msgstr "Activat" + +msgid "Glorytun" +msgstr "Glorytun" + +msgid "Glorytun instances" +msgstr "Instàncias Glorytun" + +msgid "Instance \"%s\"" +msgstr "Instància « %s »" + +msgid "Interface" +msgstr "Interfàcia" + +msgid "Interface name" +msgstr "Nom de l’interfàcia" + +msgid "Invalid" +msgstr "Invalid" + +msgid "Local tunnel ip address" +msgstr "Adreça IP locala del tunèl" + +msgid "MPTCP" +msgstr "MPTCP" + +msgid "MTU" +msgstr "MTU" + +msgid "MTU auto" +msgstr "MTU auto" + +msgid "Overview" +msgstr "Apercebut" + +msgid "Port" +msgstr "Pòrt" + +msgid "Protocol" +msgstr "Protocòl" + +msgid "Remote host name or ip address" +msgstr "Nom de l’òste alonhat o adreça IP" + +msgid "Remote tunnel ip address" +msgstr "Adreça IP alonhada del tunèl" + +msgid "Server mode" +msgstr "Mòde servidor" + +msgid "Start/Stop" +msgstr "Aviar/Arrestar" + +msgid "Started" +msgstr "Aviat" + +msgid "TCP port # for both local and remote" +msgstr "Pòrt TCP local e alonhat" + +msgid "The secret key" +msgstr "La clau secrèta" + +msgid "Use ChaCha20 stream cipher" +msgstr "Utilizar lo chiframent ChaCha20" + +msgid "no" +msgstr "non" + +msgid "yes (%i)" +msgstr "òc (%i)" diff --git a/luci-app-iperf/po/fr/iperf.po b/luci-app-iperf/po/fr/iperf.po index c911e2fca..ab1afefd3 100644 --- a/luci-app-iperf/po/fr/iperf.po +++ b/luci-app-iperf/po/fr/iperf.po @@ -2,15 +2,16 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: Ycarus \n" -"Language-Team: \n" +"PO-Revision-Date: 2020-09-30 08:50+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" #: luci-app-iperf/luasrc/view/iperf/test.htm:128 msgid "0 for unlimited. Need to be limited for UDP test" @@ -87,7 +88,7 @@ msgstr "En attente de la réponse de la commande..." #: luci-app-iperf/luasrc/controller/iperf.lua:8 msgid "iPerf" -msgstr "" +msgstr "iPerf" #: luci-app-iperf/luasrc/view/iperf/test.htm:99 msgid "iPerf speed tests" @@ -95,4 +96,4 @@ msgstr "Tests de vitesse iPerf" #: luci-app-iperf/luasrc/controller/iperf.lua:7 msgid "iperf" -msgstr "" +msgstr "iperf" diff --git a/luci-app-iperf/po/it/iperf.po b/luci-app-iperf/po/it/iperf.po new file mode 100644 index 000000000..55cef15bd --- /dev/null +++ b/luci-app-iperf/po/it/iperf.po @@ -0,0 +1,96 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-09-21 12:51+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: Italian \n" +"Language: it\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:128 +msgid "0 for unlimited. Need to be limited for UDP test" +msgstr "0 per illimitato. Deve essere limitato per il test UDP" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:48 +#: luci-app-iperf/luasrc/view/iperf/test.htm:88 +msgid "Bad address specified!" +msgstr "È stato specificato un indirizzo errato!" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:66 +#: luci-app-iperf/luasrc/view/iperf/test.htm:78 +#: luci-app-iperf/luasrc/view/iperf/test.htm:83 +#: luci-app-iperf/luasrc/view/iperf/test.htm:88 +msgid "Download" +msgstr "Scarica" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:114 +msgid "Internet protocol" +msgstr "Internet Protocol (Protocollo Internet)" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:26 +#: luci-app-iperf/luasrc/view/iperf/test.htm:66 +msgid "Loading" +msgstr "Caricamento in corso" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:105 +msgid "Mode of operation" +msgstr "Modalità di funzionamento" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:133 +msgid "Number of parallel client streams to run" +msgstr "Numero di flussi client paralleli da eseguire" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:139 +msgid "Omit the first n seconds" +msgstr "Ometti i primi n secondi" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:151 +msgid "Server" +msgstr "Server" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:102 +msgid "Settings" +msgstr "Impostazioni" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:123 +msgid "Target bitrate (Mbits/s)" +msgstr "Bitrate desiderato (Mbits/s)" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:165 +msgid "Test" +msgstr "Test" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:100 +msgid "This iPerf interface is in bêta. No support for this." +msgstr "Questa interfaccia iPerf è in bêta." + +#: luci-app-iperf/luasrc/view/iperf/test.htm:145 +msgid "Time to transmit for (s)" +msgstr "È ora di trasmettere per (s)" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:26 +#: luci-app-iperf/luasrc/view/iperf/test.htm:38 +#: luci-app-iperf/luasrc/view/iperf/test.htm:43 +#: luci-app-iperf/luasrc/view/iperf/test.htm:48 +msgid "Upload" +msgstr "Carica" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:27 +#: luci-app-iperf/luasrc/view/iperf/test.htm:67 +msgid "Waiting for command to complete..." +msgstr "In attesa del completamento del comando ..." + +#: luci-app-iperf/luasrc/controller/iperf.lua:8 +msgid "iPerf" +msgstr "iPerf" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:99 +msgid "iPerf speed tests" +msgstr "Prove di velocità iPerf" + +#: luci-app-iperf/luasrc/controller/iperf.lua:7 +msgid "iperf" +msgstr "iPerf" diff --git a/luci-app-iperf/po/oc/iperf.po b/luci-app-iperf/po/oc/iperf.po new file mode 100644 index 000000000..598bb1a2f --- /dev/null +++ b/luci-app-iperf/po/oc/iperf.po @@ -0,0 +1,96 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-08-21 20:21+0000\n" +"Last-Translator: Quentin PAGÈS \n" +"Language-Team: Occitan \n" +"Language: oc\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:128 +msgid "0 for unlimited. Need to be limited for UDP test" +msgstr "0 per cap de limit. Requerís un limit pels ensages UDP" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:48 +#: luci-app-iperf/luasrc/view/iperf/test.htm:88 +msgid "Bad address specified!" +msgstr "Adreça invalida !" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:66 +#: luci-app-iperf/luasrc/view/iperf/test.htm:78 +#: luci-app-iperf/luasrc/view/iperf/test.htm:83 +#: luci-app-iperf/luasrc/view/iperf/test.htm:88 +msgid "Download" +msgstr "Telecargament" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:114 +msgid "Internet protocol" +msgstr "Protocòl Internet" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:26 +#: luci-app-iperf/luasrc/view/iperf/test.htm:66 +msgid "Loading" +msgstr "Cargament" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:105 +msgid "Mode of operation" +msgstr "Mòde de foncionament" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:133 +msgid "Number of parallel client streams to run" +msgstr "Nombre de clients en parallèl" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:139 +msgid "Omit the first n seconds" +msgstr "Sautar las primièras n segondas" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:151 +msgid "Server" +msgstr "Servidor" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:102 +msgid "Settings" +msgstr "Paramètres" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:123 +msgid "Target bitrate (Mbits/s)" +msgstr "Velocitat desirada (Mbits/s)" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:165 +msgid "Test" +msgstr "Pròva" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:100 +msgid "This iPerf interface is in bêta. No support for this." +msgstr "Aquesta interfàcia per iPerf es en beta. Cap de support per aquò." + +#: luci-app-iperf/luasrc/view/iperf/test.htm:145 +msgid "Time to transmit for (s)" +msgstr "Temps de transmission (s)" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:26 +#: luci-app-iperf/luasrc/view/iperf/test.htm:38 +#: luci-app-iperf/luasrc/view/iperf/test.htm:43 +#: luci-app-iperf/luasrc/view/iperf/test.htm:48 +msgid "Upload" +msgstr "Mandadís" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:27 +#: luci-app-iperf/luasrc/view/iperf/test.htm:67 +msgid "Waiting for command to complete..." +msgstr "En espèra d’una responsa de la comanda..." + +#: luci-app-iperf/luasrc/controller/iperf.lua:8 +msgid "iPerf" +msgstr "iPerf" + +#: luci-app-iperf/luasrc/view/iperf/test.htm:99 +msgid "iPerf speed tests" +msgstr "Pròva de velocitat iPerf" + +#: luci-app-iperf/luasrc/controller/iperf.lua:7 +msgid "iperf" +msgstr "iperf" diff --git a/luci-app-mail/po/it/mail.po b/luci-app-mail/po/it/mail.po new file mode 100644 index 000000000..524ba6ee2 --- /dev/null +++ b/luci-app-mail/po/it/mail.po @@ -0,0 +1,46 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-09-21 12:51+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: Italian \n" +"Language: it\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.0.4\n" + +msgid "From" +msgstr "Da" + +msgid "Mail settings" +msgstr "Impostazioni mail" + +msgid "Password" +msgstr "Password" + +msgid "Port" +msgstr "Porta" + +msgid "SMTP" +msgstr "SMTP" + +msgid "STARTTLS" +msgstr "STARTTLS" + +msgid "Server" +msgstr "Server" + +msgid "Set mail settings for services that need to send mails." +msgstr "" +"Configurare le impostazioni di posta per i servizi che devono inviare " +"messaggi di posta elettronica." + +msgid "TLS" +msgstr "TLS" + +msgid "To" +msgstr "A" + +msgid "Username" +msgstr "Username" diff --git a/luci-app-mail/po/oc/mail.po b/luci-app-mail/po/oc/mail.po new file mode 100644 index 000000000..c34bc1d74 --- /dev/null +++ b/luci-app-mail/po/oc/mail.po @@ -0,0 +1,46 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-08-21 20:21+0000\n" +"Last-Translator: Quentin PAGÈS \n" +"Language-Team: Occitan \n" +"Language: oc\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" + +msgid "From" +msgstr "De" + +msgid "Mail settings" +msgstr "Paramètres e-mail" + +msgid "Password" +msgstr "Senhal" + +msgid "Port" +msgstr "Pòrt" + +msgid "SMTP" +msgstr "SMTP" + +msgid "STARTTLS" +msgstr "STARTTLS" + +msgid "Server" +msgstr "Servidor" + +msgid "Set mail settings for services that need to send mails." +msgstr "" +"Definissètz los paramètres de messatjariá pels servicis que devon enviar " +"d’e-mails." + +msgid "TLS" +msgstr "TLS" + +msgid "To" +msgstr "A" + +msgid "Username" +msgstr "Nom d'utilizaire" diff --git a/luci-app-mlvpn/po/de/mlvpn.po b/luci-app-mlvpn/po/de/mlvpn.po index 007c97d04..f60844ce4 100644 --- a/luci-app-mlvpn/po/de/mlvpn.po +++ b/luci-app-mlvpn/po/de/mlvpn.po @@ -1,7 +1,7 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-08-14 08:04+0000\n" -"Last-Translator: Andreas Dorfer \n" +"PO-Revision-Date: 2020-10-05 12:39+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: German \n" "Language: de\n" @@ -11,16 +11,16 @@ msgstr "" "X-Generator: Weblate 4.0.4\n" msgid "Add" -msgstr "hinzufügen" +msgstr "Hinzufügen" msgid "Enable" -msgstr "anschalten" +msgstr "Aktivieren" msgid "First remote port" msgstr "Erster Gegenstellen-Port" msgid "Interface name" -msgstr "Anschluss-Bezeichnung" +msgstr "Name der Verbindung" msgid "Interface will increase port used beginning with this" msgstr "Der Anschluss wird die Pornummern nutzen beginnend mit diesem Wert" @@ -29,7 +29,7 @@ msgid "Interfaces" msgstr "Anschlüsse" msgid "Invalid" -msgstr "ungültig" +msgstr "Ungültig" msgid "Loss tolerance" msgstr "Verlust-Toleranz" diff --git a/luci-app-mlvpn/po/fr/mlvpn.po b/luci-app-mlvpn/po/fr/mlvpn.po index 36e5e89ab..af2708373 100644 --- a/luci-app-mlvpn/po/fr/mlvpn.po +++ b/luci-app-mlvpn/po/fr/mlvpn.po @@ -1,22 +1,23 @@ msgid "" msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" -"Last-Translator: Ycarus \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"PO-Revision-Date: 2020-10-07 10:57+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: French \n" "Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.0.4\n" msgid "Add" msgstr "Ajouter" msgid "Enable" -msgstr "Activé" +msgstr "Activer" msgid "First remote port" msgstr "Premier port distant" @@ -25,7 +26,7 @@ msgid "Interface name" msgstr "Nom de l'interface" msgid "Interface will increase port used beginning with this" -msgstr "" +msgstr "L'interface augmentera le port utilisé à partir de celui ci" msgid "Interfaces" msgstr "Interfaces" @@ -34,13 +35,13 @@ msgid "Invalid" msgstr "Invalide" msgid "Loss tolerance" -msgstr "" +msgstr "Tolérance aux pertes" msgid "MLVPN" -msgstr "" +msgstr "MLVPN" msgid "Mode" -msgstr "" +msgstr "Mode" msgid "Password" msgstr "Mot de passe" @@ -52,7 +53,7 @@ msgid "Remote/Bind port" msgstr "Port de connexion distant" msgid "Reorder buffer size" -msgstr "" +msgstr "Taille du tampon de réordonnancement" msgid "Settings" msgstr "Paramètres" diff --git a/luci-app-mlvpn/po/it/mlvpn.po b/luci-app-mlvpn/po/it/mlvpn.po new file mode 100644 index 000000000..f7c495c5c --- /dev/null +++ b/luci-app-mlvpn/po/it/mlvpn.po @@ -0,0 +1,59 @@ +msgid "" +msgstr "" +"PO-Revision-Date: 2020-09-21 12:51+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: Italian \n" +"Language: it\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.0.4\n" + +msgid "Add" +msgstr "Aggiungi" + +msgid "Enable" +msgstr "Attivare" + +msgid "First remote port" +msgstr "Prima porta remota" + +msgid "Interface name" +msgstr "Nome interfaccia" + +msgid "Interface will increase port used beginning with this" +msgstr "L'interfaccia aumenterà la porta utilizzata a partire da questa" + +msgid "Interfaces" +msgstr "Interfaccia" + +msgid "Invalid" +msgstr "Non valido" + +msgid "Loss tolerance" +msgstr "Tolleranza alla perdita" + +msgid "MLVPN" +msgstr "MLVPN" + +msgid "Mode" +msgstr "Modo" + +msgid "Password" +msgstr "Password" + +msgid "Remote host" +msgstr "Rimuovi server" + +msgid "Remote/Bind port" +msgstr "Porta remota / Bind" + +msgid "Reorder buffer size" +msgstr "" + +msgid "Settings" +msgstr "Impostazioni" + +msgid "Timeout (s)" +msgstr "" diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua index df33186e4..383498a75 100644 --- a/luci-app-mptcp/luasrc/controller/mptcp.lua +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -34,12 +34,31 @@ function interface_bandwidth(iface) end end + +function string.split(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter=='') then return false end + local pos,arr = 0, {} + -- for each divider found + for st,sp in function() return string.find(input, delimiter, pos, true) end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end + function multipath_bandwidth() local result = { }; local uci = luci.model.uci.cursor() + local res={ }; + local str=""; + local tmpstr=""; uci:foreach("network", "interface", function(s) local intname = s[".name"] + local label = s["label"] local dev = get_device(intname) if dev == "" then dev = get_device(s["ifname"]) @@ -53,17 +72,89 @@ function multipath_bandwidth() multipath = "off" end if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then + local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or "" local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or "" if bwc ~= nil then --result[dev] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" - result[intname] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" + if label ~= nil then + result[intname .. " (" .. label .. ")" ] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" + else + result[intname] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" + end else - result[dev] = "[]" + if label ~= nil then + result[intname .. " (" .. label .. ")" ] = "[]" + else + result[intname] = "[]" + end end end end end) + res["total"]={ }; + for i=1,60 do + res["total"][i]={} + for j=1,5 do + res["total"][i][j]=0 + end + end + + for key,value in pairs(result) do + res[key]={} + value=(string.gsub(value, "^%[%[", "")) + value=(string.gsub(value, "%]%]", "")) + local temp1 = string.split(value, "],") + if temp1[2] ~= nil then + res[key][1]=temp1[1] + for i=2,60 do + res[key][i]={} + if temp1[i] ~= nil then + res[key][i]=(string.gsub(temp1[i], "%[", " ")) + end + end + for i=1,60 do + res[key][i] = string.split(res[key][i], ",") + for j=1,5 do + if "string"== type(res[key][i][j]) then + res[key][i][j]= tonumber(res[key][i][j]) + end + if "string"==type(res["total"][i][j]) then + res["total"][i][j]= tonumber(res["total"][i][j]) + end + if j ==1 then + if res[key][i][j] ~= nil then + res["total"][i][j] = res[key][i][j] + else + res["total"][i][j] = 0 + end + else + if res[key][i][j] ~= nil then + res["total"][i][j] = res["total"][i][j] + res[key][i][j] + end + end + end + end + end + end + for i=1,60 do + for j=1,5 do + if "number"== type(res["total"][i][j]) then + res["total"][i][j]= tostring(res["total"][i][j]) + end + end + end + for i=1,60 do + if i == 60 then + tmpstr = "["..table.concat(res["total"][i], ",") + else + tmpstr = "["..table.concat(res["total"][i], ",").."]," + end + str = str..tmpstr + end + str = "["..str.."]]" + result["total"]=str + luci.http.prepare_content("application/json") luci.http.write_json(result) end diff --git a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm index c8b427cc1..3e72fa34b 100644 --- a/luci-app-mptcp/luasrc/view/mptcp/multipath.htm +++ b/luci-app-mptcp/luasrc/view/mptcp/multipath.htm @@ -3,9 +3,9 @@ -- Copyright 2015 OVH (OverTheBox@ovh.net) -- Simon Lelievre (simon.lelievre@corp.ovh.com) -- Sebastien Duponcheel (sebastien.duponcheel@ovh.net) --- Copyright 2018-2020 Ycarus - Yannick Chabanois (ycarus@zugaina.org) +-- Copyright 2018-2020 Ycarus - Yannick Chabanois (ycarus@zugaina.org) for OpenMPTCProuter -- --- This file is part of OverTheBox for OpenWrt. +-- Part of this file come from OverTheBox for OpenWrt. -- -- OverTheBox is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -45,6 +45,9 @@ end local curifname = luci.http.formvalue("dev") or "all" + local bandwidthtotalurl = "admin/network/mptcp/multipath_bandwidth" + local bandwidthintfurl = "admin/network/mptcp/interface_bandwidth" + -%> <%+header%> @@ -54,21 +57,23 @@ - - - + \ No newline at end of file diff --git a/luci-theme-argon/luasrc/view/themes/argon/header.htm b/luci-theme-argon/luasrc/view/themes/argon/header.htm index 9ae4b3d3d..fe238b7ba 100644 --- a/luci-theme-argon/luasrc/view/themes/argon/header.htm +++ b/luci-theme-argon/luasrc/view/themes/argon/header.htm @@ -2,7 +2,7 @@ Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template luci-theme-argon - Copyright 2019 Jerrykuku + Copyright 2020 Jerrykuku Have a bug? Please create an issue here on GitHub! https://github.com/jerrykuku/luci-theme-argon/issues @@ -29,27 +29,9 @@ local fs = require "nixio.fs" local nutil = require "nixio.util" - - -- send as HTML5 http.prepare_content("text/html") - math.randomseed(os.time()) - function glob(...) - local iter, code, msg = fs.glob(...) - if iter then - return nutil.consume(iter) - else - return nil, code, msg - end - end - - local bgcount = 0 - for f in ipairs(glob("/www/luci-static/argon/img/*")) do - bgcount = bgcount + 1 - end - - -%> @@ -60,18 +42,25 @@ <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI + - + + + + - + - LuCI"> - LuCI"> - - - - - + + + + + + <% if nixio.fs.access("/etc/dark") then %> + + <% end -%> <% if node and node.css then %> <% end -%> @@ -81,8 +70,9 @@ <% end -%> - - + + + @@ -217,17 +207,9 @@ data-page="<%= table.concat(disp.context.requestpath, "-") %>">
-
-
-
-
-
-
-
-