Remove Debian
This commit is contained in:
parent
18164ef78a
commit
64929e4fd4
12 changed files with 2 additions and 244 deletions
|
@ -16,7 +16,6 @@ node_modules/
|
||||||
|
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
deb_dist/
|
|
||||||
assets/
|
assets/
|
||||||
|
|
||||||
data/
|
data/
|
||||||
|
|
1
.github/CONTRIBUTING.md
vendored
1
.github/CONTRIBUTING.md
vendored
|
@ -28,7 +28,6 @@ pip install -e '.[dev]' # or use: pipenv install --dev
|
||||||
```bash
|
```bash
|
||||||
./bin/lint.sh
|
./bin/lint.sh
|
||||||
./bin/test.sh
|
./bin/test.sh
|
||||||
./bin/build.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For more common tasks see the `Development` section at the bottom of the README.
|
For more common tasks see the `Development` section at the bottom of the README.
|
||||||
|
|
77
.github/workflows/debian.yml
vendored
77
.github/workflows/debian.yml
vendored
|
@ -1,77 +0,0 @@
|
||||||
name: Build Debian package
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
|
|
||||||
env:
|
|
||||||
DEB_BUILD_OPTIONS: nocheck
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Install packaging dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update -qq
|
|
||||||
sudo apt-get install -y \
|
|
||||||
python3 python3-dev python3-pip python3-venv python3-all \
|
|
||||||
dh-python debhelper devscripts dput software-properties-common \
|
|
||||||
python3-distutils python3-setuptools python3-wheel python3-stdeb
|
|
||||||
|
|
||||||
- name: Build Debian/Apt sdist_dsc
|
|
||||||
run: |
|
|
||||||
rm -Rf deb_dist/*
|
|
||||||
python3 setup.py --command-packages=stdeb.command sdist_dsc
|
|
||||||
|
|
||||||
- name: Build Debian/Apt bdist_deb
|
|
||||||
run: |
|
|
||||||
python3 setup.py --command-packages=stdeb.command bdist_deb
|
|
||||||
|
|
||||||
- name: Install archivebox from deb
|
|
||||||
run: |
|
|
||||||
cd deb_dist/
|
|
||||||
sudo apt-get install ./archivebox*.deb
|
|
||||||
cd ..
|
|
||||||
python3 -c 'from distutils.core import run_setup; result = run_setup("./setup.py", stop_after="init"); print("\n".join(result.install_requires + result.extras_require["sonic"]))' > ./requirements.txt
|
|
||||||
python3 -m pip install -r ./requirements.txt
|
|
||||||
|
|
||||||
- name: Check ArchiveBox version
|
|
||||||
run: |
|
|
||||||
# must create dir needed for snaps to run as non-root on github actions
|
|
||||||
sudo mkdir -p /run/user/1001 && sudo chmod -R 777 /run/user/1001
|
|
||||||
mkdir "${{ github.workspace }}/data" && cd "${{ github.workspace }}/data"
|
|
||||||
archivebox --version
|
|
||||||
archivebox init --setup
|
|
||||||
|
|
||||||
- name: Add some links to test
|
|
||||||
run: |
|
|
||||||
cd "${{ github.workspace }}/data"
|
|
||||||
archivebox add 'https://example.com'
|
|
||||||
archivebox status
|
|
||||||
|
|
||||||
# - name: Commit built package
|
|
||||||
# run: |
|
|
||||||
# cd deb_dist/
|
|
||||||
# git config --local user.email "action@github.com"
|
|
||||||
# git config --local user.name "GitHub Action"
|
|
||||||
# git commit -m "Debian package autobuild" -a
|
|
||||||
|
|
||||||
# - name: Push build to Github
|
|
||||||
# uses: ad-m/github-push-action@master
|
|
||||||
# with:
|
|
||||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# repository: ArchiveBox/debian-archivebox
|
|
||||||
# branch: ${{ github.ref }}
|
|
||||||
# directory: deb_dist
|
|
||||||
|
|
||||||
# - name: Push build to Launchpad PPA
|
|
||||||
# run: |
|
|
||||||
# debsign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
|
||||||
# dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -92,7 +92,7 @@ jobs:
|
||||||
# TODO: remove this exception for windows once we get tests passing on that platform
|
# TODO: remove this exception for windows once we get tests passing on that platform
|
||||||
if: ${{ !contains(matrix.os, 'windows') }}
|
if: ${{ !contains(matrix.os, 'windows') }}
|
||||||
run: |
|
run: |
|
||||||
python -m pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist
|
python -m pytest -s --basetemp=tests/out --ignore=archivebox/vendor
|
||||||
|
|
||||||
docker_tests:
|
docker_tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -28,6 +28,3 @@ output/
|
||||||
|
|
||||||
# vim
|
# vim
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
# kotovalexarian
|
|
||||||
/deb_dist/
|
|
||||||
|
|
28
README.md
28
README.md
|
@ -1014,34 +1014,6 @@ Extractors take the URL of a page to archive, write their output to the filesyst
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
#### Build pip package
|
|
||||||
|
|
||||||
<details><summary><i>Click to expand...</i></summary>
|
|
||||||
|
|
||||||
(Normally CI takes care of this, but these scripts can be run to do it manually)
|
|
||||||
```bash
|
|
||||||
./bin/build.sh
|
|
||||||
|
|
||||||
# or individually:
|
|
||||||
./bin/build_deb.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### Roll a release
|
|
||||||
|
|
||||||
<details><summary><i>Click to expand...</i></summary>
|
|
||||||
|
|
||||||
(Normally CI takes care of this, but these scripts can be run to do it manually)
|
|
||||||
```bash
|
|
||||||
./bin/release.sh
|
|
||||||
|
|
||||||
# or individually:
|
|
||||||
./bin/release_deb.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Further Reading
|
## Further Reading
|
||||||
|
|
25
bin/build.sh
25
bin/build.sh
|
@ -1,25 +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 )"
|
|
||||||
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
|
|
||||||
# pipenv install --dev
|
|
||||||
|
|
||||||
# the order matters
|
|
||||||
./bin/build_deb.sh
|
|
||||||
|
|
||||||
echo "[√] Done. Install the built package by running:"
|
|
||||||
echo " python3 setup.py install"
|
|
||||||
echo " # or"
|
|
||||||
echo " pip3 install ."
|
|
|
@ -1,44 +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'
|
|
||||||
|
|
||||||
|
|
||||||
CURRENT_PLAFORM="$(uname)"
|
|
||||||
REQUIRED_PLATFORM="Linux"
|
|
||||||
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
|
||||||
echo "[!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
|
||||||
DEBIAN_VERSION="${DEBIAN_VERSION:-1}"
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then
|
|
||||||
source "$REPO_DIR/.venv/bin/activate"
|
|
||||||
else
|
|
||||||
echo "[!] Warning: No virtualenv presesnt in $REPO_DIR.venv"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# cleanup build artifacts
|
|
||||||
rm -Rf build deb_dist dist archivebox-*.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
# build source and binary packages
|
|
||||||
# make sure the stdeb.cfg file is up-to-date with all the dependencies
|
|
||||||
python3 setup.py --command-packages=stdeb.command \
|
|
||||||
sdist_dsc --debian-version=$DEBIAN_VERSION \
|
|
||||||
bdist_deb
|
|
||||||
|
|
||||||
# should output deb_dist/archivebox_0.5.4-1.{deb,changes,buildinfo,tar.gz}
|
|
|
@ -20,11 +20,9 @@ cd "$REPO_DIR"
|
||||||
|
|
||||||
# Run all the build scripts
|
# Run all the build scripts
|
||||||
./bin/build_git.sh
|
./bin/build_git.sh
|
||||||
./bin/build_deb.sh
|
|
||||||
|
|
||||||
# Push relase to public repositories
|
# Push relase to public repositories
|
||||||
./bin/release_git.sh
|
./bin/release_git.sh
|
||||||
./bin/release_deb.sh
|
|
||||||
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||||
echo "[√] Done. Published version v$VERSION"
|
echo "[√] Done. Published version v$VERSION"
|
||||||
|
|
|
@ -1,50 +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'
|
|
||||||
|
|
||||||
|
|
||||||
CURRENT_PLAFORM="$(uname)"
|
|
||||||
REQUIRED_PLATFORM="Linux"
|
|
||||||
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
|
||||||
echo "[!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
|
||||||
DEBIAN_VERSION="${DEBIAN_VERSION:-1}"
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
|
|
||||||
|
|
||||||
echo "[+] Loading PGP keys from env vars and filesystem..."
|
|
||||||
# https://github.com/ArchiveBox/debian-archivebox/settings/secrets/actions
|
|
||||||
PGP_KEY_ID="${PGP_KEY_ID:-BC2D21B0D84E16C437300B8652423FBED1586F45}"
|
|
||||||
[[ "${PGP_PUBLIC_KEY:-}" ]] && echo "$PGP_PUBLIC_KEY" > /tmp/archivebox_gpg.key.pub
|
|
||||||
[[ "${PGP_PRIVATE_KEY:-}" ]] && echo "$PGP_PRIVATE_KEY" > /tmp/archivebox_gpg.key
|
|
||||||
gpg --import /tmp/archivebox_gpg.key.pub || true
|
|
||||||
gpg --import --allow-secret-key-import /tmp/archivebox_gpg.key || true
|
|
||||||
echo "$PGP_KEY_ID:6:" | gpg --import-ownertrust || true
|
|
||||||
|
|
||||||
echo "[*] Signing build and changelog with PGP..."
|
|
||||||
debsign --re-sign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
|
||||||
|
|
||||||
# make sure you have this in ~/.dput.cf:
|
|
||||||
# [archivebox-ppa]
|
|
||||||
# fqdn: ppa.launchpad.net
|
|
||||||
# method: ftp
|
|
||||||
# incoming: ~archivebox/ubuntu/archivebox/
|
|
||||||
# login: anonymous
|
|
||||||
# allow_unsigned_uploads: 0
|
|
||||||
|
|
||||||
|
|
||||||
echo "[^] Uploading to launchpad.net"
|
|
||||||
dput -f archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
|
|
@ -14,4 +14,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
||||||
|
|
||||||
source "$DIR/.venv/bin/activate"
|
source "$DIR/.venv/bin/activate"
|
||||||
|
|
||||||
pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist
|
pytest -s --basetemp=tests/out --ignore=archivebox/vendor
|
||||||
|
|
11
stdeb.cfg
11
stdeb.cfg
|
@ -1,11 +0,0 @@
|
||||||
[DEFAULT]
|
|
||||||
Source: archivebox
|
|
||||||
Package: archivebox
|
|
||||||
Package3: archivebox
|
|
||||||
Suite: focal
|
|
||||||
Suite3: focal
|
|
||||||
Build-Depends: debhelper, dh-python, python3-all, python3-pip, python3-setuptools, python3-wheel, python3-stdeb
|
|
||||||
Depends3: nodejs, wget, curl, git, ffmpeg, yt-dlp, ripgrep, python3-all, python3-pip, python3-setuptools, python3-croniter, python3-crontab, python3-dateparser, python3-django, python3-django-extensions, python3-django-jsonfield, python3-mypy-extensions, python3-requests, python3-w3lib
|
|
||||||
X-Python3-Version: >= 3.9
|
|
||||||
XS-Python-Version: >= 3.9
|
|
||||||
Setup-Env-Vars: DEB_BUILD_OPTIONS=nocheck
|
|
Loading…
Reference in a new issue