diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a687f03683..f22bff0f71b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -449,6 +449,10 @@ jobs: steps: - setup_remote_docker - checkout + - git_fetch_all_tags + - run: git submodule sync + - run: git submodule update --init + - docker/check: docker-username: DOCKERHUB_USERNAME docker-password: DOCKERHUB_PASSWORD diff --git a/.circleci/template.yml b/.circleci/template.yml index 38057866f2b..857f8f44242 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -449,6 +449,10 @@ jobs: steps: - setup_remote_docker - checkout + - git_fetch_all_tags + - run: git submodule sync + - run: git submodule update --init + - docker/check: docker-username: DOCKERHUB_USERNAME docker-password: DOCKERHUB_PASSWORD diff --git a/.gitignore b/.gitignore index 5ff2726f286..2e9dcd0ffd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -/AppDir -/appimage-builder-cache -*.AppImage /lotus /lotus-miner /lotus-worker @@ -50,3 +47,8 @@ build/builtin-actors/v* build/builtin-actors/*.car dist/ + + +# The following files are checked into git and result +# in dirty git state if removed from the docker context +!extern/filecoin-ffi/rust/filecoin.pc diff --git a/AppDir/usr/share/icons/icon.svg b/AppDir/usr/share/icons/icon.svg deleted file mode 100644 index da992296a1a..00000000000 --- a/AppDir/usr/share/icons/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml deleted file mode 100644 index 4f1f56bbb26..00000000000 --- a/AppImageBuilder.yml +++ /dev/null @@ -1,71 +0,0 @@ -version: 1 -AppDir: - path: ./AppDir - app_info: - id: io.filecoin.lotus - name: Lotus - icon: icon - version: latest - exec: usr/bin/lotus - exec_args: $@ - apt: - arch: amd64 - allow_unauthenticated: true - sources: - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal universe - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates universe - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal multiverse - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse - - sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted - universe multiverse - - sourceline: deb http://security.ubuntu.com/ubuntu focal-security main restricted - - sourceline: deb http://security.ubuntu.com/ubuntu focal-security universe - - sourceline: deb http://security.ubuntu.com/ubuntu focal-security multiverse - - sourceline: deb https://cli-assets.heroku.com/apt ./ - - sourceline: deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal main - - sourceline: deb http://ppa.launchpad.net/git-core/ppa/ubuntu focal main - - sourceline: deb http://archive.canonical.com/ubuntu focal partner - include: - - ocl-icd-libopencl1 - - libhwloc15 - exclude: [] - files: - include: - - /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 - - /usr/lib/x86_64-linux-gnu/libpthread-2.31.so - - /usr/lib/x86_64-linux-gnu/libm-2.31.so - - /usr/lib/x86_64-linux-gnu/libdl-2.31.so - - /usr/lib/x86_64-linux-gnu/libc-2.31.so - - /usr/lib/x86_64-linux-gnu/libudev.so.1.6.17 - exclude: - - usr/share/man - - usr/share/doc/*/README.* - - usr/share/doc/*/changelog.* - - usr/share/doc/*/NEWS.* - - usr/share/doc/*/TODO.* - test: - fedora: - image: appimagecrafters/tests-env:fedora-30 - command: ./AppRun - use_host_x: false - debian: - image: appimagecrafters/tests-env:debian-stable - command: ./AppRun - use_host_x: false - arch: - image: appimagecrafters/tests-env:archlinux-latest - command: ./AppRun - use_host_x: false - centos: - image: appimagecrafters/tests-env:centos-7 - command: ./AppRun - use_host_x: false - ubuntu: - image: appimagecrafters/tests-env:ubuntu-xenial - command: ./AppRun - use_host_x: false -AppImage: - arch: x86_64 - diff --git a/Dockerfile b/Dockerfile index 5c147e930d0..81089517b5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,8 @@ RUN set -eux; \ COPY ./ /opt/filecoin WORKDIR /opt/filecoin +RUN scripts/docker-git-state-check.sh + ### make configurable filecoin-ffi build ARG FFI_BUILD_FROM_SOURCE=0 ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE} diff --git a/scripts/docker-git-state-check.sh b/scripts/docker-git-state-check.sh new file mode 100755 index 00000000000..6075ebf843c --- /dev/null +++ b/scripts/docker-git-state-check.sh @@ -0,0 +1,12 @@ +set -e + +if [ -z "$(git status --porcelain)" ]; then + echo "PASSED: Working directory clean" +else + echo "FAILED: Working directory not clean." + echo "This is likely because the .dockerignore file has removed something checked into git." + echo "Add the missing files listed below to the .dockerignore to fix this issue:" + echo "$(git status)" + exit 1 +fi + diff --git a/snap/local/icon.svg b/snap/local/icon.svg deleted file mode 100644 index da992296a1a..00000000000 --- a/snap/local/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml deleted file mode 100644 index 8c7323a2b8e..00000000000 --- a/snap/snapcraft.yaml +++ /dev/null @@ -1,96 +0,0 @@ -name: lotus-filecoin -base: core20 -version: latest -summary: filecoin daemon/client -icon: snap/local/icon.svg -description: | - Filecoin is a peer-to-peer network that stores files on the internet - with built-in economic incentives to ensure files are stored reliably over time - - For documentation and additional information, please see the following resources - - https://filecoin.io - - https://fil.org - - https://lotus.filecoin.io - - https://github.com/filecoin-project/lotus - -confinement: strict - -parts: - lotus: - plugin: make - source: ./ - build-snaps: - - go - - rustup - build-packages: - - git - - jq - - libhwloc-dev - - ocl-icd-opencl-dev - - pkg-config - stage-packages: - - libhwloc15 - - ocl-icd-libopencl1 - override-build: | - LDFLAGS="" make lotus lotus-miner lotus-worker - cp lotus lotus-miner lotus-worker $SNAPCRAFT_PART_INSTALL - cp scripts/snap-lotus-entrypoint.sh $SNAPCRAFT_PART_INSTALL - -layout: - /var/lib/lotus: - symlink: $SNAP_COMMON/lotus - /var/lib/lotus-miner: - symlink: $SNAP_COMMON/lotus-miner - /var/lib/lotus-worker: - symlink: $SNAP_COMMON/lotus-worker - -apps: - lotus: - command: lotus - plugs: - - network - - network-bind - - home - environment: - FIL_PROOFS_PARAMETER_CACHE: $SNAP_USER_COMMON/filecoin-proof-parameters - LOTUS_PATH: $SNAP_COMMON/lotus - LOTUS_MINER_PATH: $SNAP_COMMON/lotus-miner - LOTUS_WORKER_PATH: $SNAP_COMMON/lotus-worker - lotus-miner: - command: lotus-miner - plugs: - - network - - network-bind - - opengl - environment: - FIL_PROOFS_PARAMETER_CACHE: $SNAP_USER_COMMON/filecoin-proof-parameters - LOTUS_PATH: $SNAP_COMMON/lotus - LOTUS_MINER_PATH: $SNAP_COMMON/lotus-miner - LOTUS_WORKER_PATH: $SNAP_COMMON/lotus-worker - lotus-worker: - command: lotus-worker - plugs: - - network - - network-bind - - opengl - environment: - FIL_PROOFS_PARAMETER_CACHE: $SNAP_USER_COMMON/filecoin-proof-parameters - LOTUS_PATH: $SNAP_COMMON/lotus - LOTUS_MINER_PATH: $SNAP_COMMON/lotus-miner - LOTUS_WORKER_PATH: $SNAP_COMMON/lotus-worker - lotus-daemon: - command: snap-lotus-entrypoint.sh - daemon: simple - install-mode: disable - plugs: - - network - - network-bind - environment: - FIL_PROOFS_PARAMETER_CACHE: $SNAP_COMMON/filecoin-proof-parameters - LOTUS_PATH: $SNAP_COMMON/lotus - LOTUS_MINER_PATH: $SNAP_COMMON/lotus-miner - LOTUS_WORKER_PATH: $SNAP_COMMON/lotus-worker