From 5e88f14c7bf31db622725a440a18088e973ecde8 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Thu, 4 Jan 2024 19:50:09 +0400 Subject: [PATCH] Remove Homebrew --- .dockerignore | 1 - .github/workflows/homebrew.yml | 51 ---------------------------------- .github/workflows/test.yml | 2 +- .gitignore | 1 - README.md | 39 +++----------------------- bin/build.sh | 1 - bin/build_brew.sh | 46 ------------------------------ bin/release.sh | 2 -- bin/release_brew.sh | 30 -------------------- bin/setup.sh | 15 ++-------- bin/test.sh | 2 +- 11 files changed, 9 insertions(+), 181 deletions(-) delete mode 100644 .github/workflows/homebrew.yml delete mode 100755 bin/build_brew.sh delete mode 100755 bin/release_brew.sh diff --git a/.dockerignore b/.dockerignore index 28505e39..7e339e5a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,6 @@ node_modules/ build/ dist/ -brew_dist/ deb_dist/ pip_dist/ assets/ diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml deleted file mode 100644 index af7a0795..00000000 --- a/.github/workflows/homebrew.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build Homebrew package - -on: - workflow_dispatch: - push: - - -jobs: - build: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - with: - submodules: true - fetch-depth: 1 - - # TODO: modify archivebox.rb to update src url, hashes, and dependencies - - - name: Build Homebrew Bottle - run: | - pip3 install --upgrade pip setuptools wheel - cd brew_dist/ - brew install --build-bottle ./archivebox.rb - # brew bottle archivebox - archivebox version - - - name: Add some links to test - run: | - mkdir data && cd data - archivebox init --setup - archivebox add 'https://example.com' - archivebox version - archivebox status - - # - name: Commit built package - # run: | - # cd brew_dist/ - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -m "Homebrew package autobuild" -a - - # - name: Push build to Github - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # repository: ArchiveBox/homebrew-archivebox - # branch: ${{ github.ref }} - # directory: brew_dist - - # TODO: push bottle homebrew core PR with latest changes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a30133a..0e6269aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,7 +93,7 @@ jobs: # TODO: remove this exception for windows once we get tests passing on that platform if: ${{ !contains(matrix.os, 'windows') }} run: | - python -m pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist --ignore=pip_dist --ignore=brew_dist + python -m pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist --ignore=pip_dist docker_tests: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index e90f1518..4e807897 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ output/ *.sw? # kotovalexarian -/brew_dist/ /deb_dist/ /docker/ /docs/ diff --git a/README.md b/README.md index 85156330..c9dc458c 100644 --- a/README.md +++ b/README.md @@ -49,13 +49,13 @@ The goal is to sleep soundly knowing the part of the internet you care about wil
-**📦  Get ArchiveBox with `docker` / `apt` / `brew` / `pip3` / `nix` / etc. ([see Quickstart below](#quickstart)).** +**📦  Get ArchiveBox with `docker` / `apt` / `pip3` / `nix` / etc. ([see Quickstart below](#quickstart)).** ```bash # Get ArchiveBox with Docker or Docker Compose (recommended) docker run -v $PWD/data:/data -it archivebox/archivebox:dev init --setup -# Or install with your preferred package manager (see Quickstart below for apt, brew, and more) +# Or install with your preferred package manager (see Quickstart below for apt, and more) pip3 install archivebox # Or use the optional auto setup script to install it @@ -220,34 +220,6 @@ See the debian-a

-
-homebrew brew (macOS) -
-
    -
  1. Install Homebrew on your system (if not already installed).
  2. -
  3. Install the ArchiveBox package using brew. -
    brew tap archivebox/archivebox
    -brew install archivebox
    -
    -
  4. -
  5. Create a new empty directory and initialize your collection (can be anywhere). -
    mkdir ~/archivebox && cd ~/archivebox
    -archivebox init --setup         # if any problems, install with pip instead
    -
    -
  6. -
  7. Optional: Start the server then login to the Web UI http://127.0.0.1:8000 ⇢ Admin. -
    archivebox server 0.0.0.0:8000
    -# completely optional, CLI can always be used without running a server
    -# archivebox [subcommand] [--args]
    -
    -
  8. -
- -See below for more usage examples using the CLI, Web UI, or filesystem/SQL/Python to manage your archive.
-See the homebrew-archivebox repo for more details about this distribution. -

-
-
Pip pip (macOS/Linux/Windows)
@@ -543,7 +515,7 @@ If not using Docker, make sure to keep the dependencies up-to-date yourself and ```bash # install python3 and archivebox with your system package manager -# apt/brew/pip/etc install ... (see Quickstart instructions above) +# apt/pip/etc install ... (see Quickstart instructions above) archivebox setup # auto install all the extractors and extras archivebox --version # see info and check validity of installed dependencies @@ -689,7 +661,6 @@ Disk usage can be reduced by using a compressed/deduplicated filesystem like ZFS -brew install archivebox
archivebox version @@ -1027,7 +998,7 @@ Extractors take the URL of a page to archive, write their output to the filesyst **The process to contribute a new extractor is like this:** 1. [Open an issue](https://github.com/ArchiveBox/ArchiveBox/issues/new?assignees=&labels=changes%3A+behavior%2Cstatus%3A+idea+phase&template=feature_request.md&title=Feature+Request%3A+...) with your propsoed implementation (please link to the pages of any new external dependencies you plan on using) -2. Ensure any dependencies needed are easily installable via a package managers like `apt`, `brew`, `pip3`, `npm` +2. Ensure any dependencies needed are easily installable via a package managers like `apt`, `pip3`, `npm` (Ideally, prefer to use external programs available via `pip3` or `npm`, however we do support using any binary installable via package manager that exposes a CLI/Python API and writes output to stdout or the filesystem.) 3. Create a new file in [`archivebox/extractors/.py`](https://github.com/ArchiveBox/ArchiveBox/blob/dev/archivebox/extractors) (copy an existing extractor like [`singlefile.py`](https://github.com/ArchiveBox/ArchiveBox/blob/dev/archivebox/extractors/singlefile.py) as a template) 4. Add config settings to enable/disable any new dependencies and the extractor as a whole, e.g. `USE_DEPENDENCYNAME`, `SAVE_EXTRACTORNAME`, `EXTRACTORNAME_SOMEOTHEROPTION` in [`archivebox/config.py`](https://github.com/ArchiveBox/ArchiveBox/blob/dev/archivebox/config.py) @@ -1055,7 +1026,6 @@ Extractors take the URL of a page to archive, write their output to the filesyst ./bin/build_docs.sh ./bin/build_pip.sh ./bin/build_deb.sh -./bin/build_brew.sh ./bin/build_docker.sh ``` @@ -1073,7 +1043,6 @@ Extractors take the URL of a page to archive, write their output to the filesyst ./bin/release_docs.sh ./bin/release_pip.sh ./bin/release_deb.sh -./bin/release_brew.sh ./bin/release_docker.sh ``` diff --git a/bin/build.sh b/bin/build.sh index b5d48115..894263ec 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -20,7 +20,6 @@ cd "$REPO_DIR" ./bin/build_docs.sh ./bin/build_pip.sh ./bin/build_deb.sh -./bin/build_brew.sh ./bin/build_docker.sh echo "[√] Done. Install the built package by running:" diff --git a/bin/build_brew.sh b/bin/build_brew.sh deleted file mode 100755 index 08ba81c9..00000000 --- a/bin/build_brew.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -### Bash Environment Setup -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html -# set -o xtrace -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -IFS=$'\n' - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" - - -CURRENT_PLAFORM="$(uname)" -REQUIRED_PLATFORM="Darwin" -if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then - echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)." - exit 0 -fi - - -cd "$REPO_DIR/brew_dist" -# make sure archivebox.rb is up-to-date with the dependencies -git pull -git status | grep 'up to date' - -echo -echo "[+] Uninstalling any exisitng archivebox versions..." -brew uninstall archivebox || true -brew untap archivebox/archivebox || true - -# echo "[*] Running Formula linters and test build..." -# brew test-bot --tap=ArchiveBox/homebrew-archivebox archivebox/archivebox/archivebox || true -# brew uninstall archivebox || true -# brew untap archivebox/archivebox || true - -echo -echo "[+] Installing and building hombrew bottle from https://Github.com/ArchiveBox/homebrew-archivebox#main" -brew tap archivebox/archivebox -brew install --build-bottle archivebox -brew bottle archivebox - -echo -echo "[√] Finished. Make sure to commit the outputted .tar.gz and bottle files!" \ No newline at end of file diff --git a/bin/release.sh b/bin/release.sh index 34256fad..0ca018eb 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -23,7 +23,6 @@ cd "$REPO_DIR" ./bin/build_docs.sh ./bin/build_pip.sh ./bin/build_deb.sh -./bin/build_brew.sh ./bin/build_docker.sh # Push relase to public repositories @@ -31,7 +30,6 @@ cd "$REPO_DIR" ./bin/release_docs.sh ./bin/release_pip.sh ./bin/release_deb.sh -./bin/release_brew.sh ./bin/release_docker.sh VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" diff --git a/bin/release_brew.sh b/bin/release_brew.sh deleted file mode 100755 index 47b3bdca..00000000 --- a/bin/release_brew.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -### Bash Environment Setup -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html -# set -o xtrace -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -IFS=$'\n' - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" - - -CURRENT_PLAFORM="$(uname)" -REQUIRED_PLATFORM="Darwin" -if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then - echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)." - exit 0 -fi - -cd "$REPO_DIR" - -./bin/build_brew.sh - -git add '*.bottle.tar.gz' -git commit -m "add new release bottle" -git pull -git push \ No newline at end of file diff --git a/bin/setup.sh b/bin/setup.sh index 8e7c9b77..ce814263 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -79,7 +79,7 @@ echo " ⚠️ If you want to use Docker, press [Ctrl-C] to cancel now. ⚠️ echo " Get Docker: https://docs.docker.com/get-docker/" echo " After you've installed Docker, run this script again." echo "" -echo "Otherwise, install will continue with apt/brew/pip in 12s... (press [Ctrl+C] to cancel)" +echo "Otherwise, install will continue with apt/pip in 12s... (press [Ctrl+C] to cancel)" echo "" sleep 12 || exit 1 echo "Proceeding with system package manager..." @@ -87,7 +87,7 @@ echo "" echo "[i] ArchiveBox Setup Script 📦" echo "" -echo " This is a helper script which installs the ArchiveBox dependencies on your system using brew/apt/pip3." +echo " This is a helper script which installs the ArchiveBox dependencies on your system using apt/pip3." echo " You may be prompted for a sudo password in order to install the following:" echo "" echo " - archivebox" @@ -123,14 +123,6 @@ if which apt-get > /dev/null; then echo "[+] Installing ArchiveBox python dependencies using pip3..." sudo python3 -m pip install --upgrade --ignore-installed archivebox # On Mac: -elif which brew > /dev/null; then - echo "[+] Installing ArchiveBox system dependencies using brew..." - brew tap archivebox/archivebox - brew update - brew install --fetch-HEAD -f archivebox - echo "" - echo "[+] Installing ArchiveBox python dependencies using pip3..." - python3 -m pip install --upgrade --ignore-installed archivebox elif which pkg > /dev/null; then echo "[+] Installing ArchiveBox system dependencies using pkg and pip (python3.9)..." sudo pkg install -y python3 py39-pip py39-sqlite3 npm wget curl youtube_dl ffmpeg git ripgrep @@ -140,9 +132,8 @@ elif which pkg > /dev/null; then # don't use sudo here so that pip installs in $HOME/.local instead of into /usr/local python3 -m pip install --upgrade --ignore-installed archivebox else - echo "[!] Warning: Could not find aptitude/homebrew/pkg! May not be able to install all dependencies automatically." + echo "[!] Warning: Could not find aptitude/pkg! May not be able to install all dependencies automatically." echo "" - echo " If you're on macOS, make sure you have homebrew installed: https://brew.sh/" echo " If you're on Linux, only Ubuntu/Debian/BSD systems are officially supported with this script." echo " If you're on Windows, this script is not officially supported (Docker is recommeded instead)." echo "" diff --git a/bin/test.sh b/bin/test.sh index f9ea3575..cce46a50 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -14,4 +14,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" source "$DIR/.venv/bin/activate" -pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist --ignore=pip_dist --ignore=brew_dist +pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist --ignore=pip_dist