Giter Club home page Giter Club logo

debian-archivebox's Introduction

debian-archivebox

⚠️ We're looking for volunteers to help package ArchiveBox for apt!


This is the official apt/dpkg package for ArchiveBox, the self-hosted internet archiving solution.

Warning

This ArchiveBox apt package is several versions behind our main pip distribution, as Debian strongly encourages building everything from source and ArchiveBox depends on a number of binary packages that make this difficult (e.g. playwright). We've followed this process so far, but we're looking for contributors to help improve it.

See here for the main ArchiveBox Ubuntu/Debian install documentation:
https://github.com/ArchiveBox/ArchiveBox/wiki/Install#option-c-bare-metal-setup

Quickstart

Add the repo to your sources:

# on Ubuntu 20.04 and up you can do:
sudo add-apt-repository -u ppa:archivebox/archivebox

# on other systems you should add the repo to your sources manually:
echo "deb http://ppa.launchpad.net/archivebox/archivebox/ubuntu focal main" > /etc/apt/sources.list.d/archivebox.list
echo "deb-src http://ppa.launchpad.net/archivebox/archivebox/ubuntu focal main" >> /etc/apt/sources.list.d/archivebox.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C258F79DCC02E369
sudo apt update

Install it:

sudo apt install archivebox

# get the latest version of archivebox its pip depenencies from PyPI
pip install --upgrade --ignore-installed archivebox yt-dlp playwright
playwright install --with-deps chromium

Try it out:

archivebox version

mkdir -p ~/archivebox/data && cd ~/archivebox/data
archivebox init --setup
archivebox add 'https://example.com'
archivebox help

Tested on Ubuntu 22.04, should work on all Debian/Ubuntu based systems.

https://github.com/ArchiveBox/ArchiveBox/wiki/Install#option-c-bare-metal-setup


Development

The debian package is built using stdeb: https://github.com/astraw/stdeb and hosted on Launchpad: https://launchpad.net/~archivebox.

https://launchpad.net/~archivebox/+archive/ubuntu/archivebox/+packages

The config file / package definition is here: ArchiveBox/stdeb.cfg.

To build this package, make sure you are in the ArchiveBox main repo first.

apt upgrade -qq
apt install -y python3 python3-dev python3-pip python3-venv python3-all python-all \
            dh-python debhelper devscripts dput software-properties-common \
            python3-distutils python3-setuptools python3-wheel python3-stdeb jq fakeroot
python3 -m pip install --upgrade pip setuptools pdm

cd ArchiveBox/
git pull --recurse-submodules

# Build the debian package
./bin/build_deb.sh

docker run -v $PWD:/data -it ubuntu:22.04 /bin/bash -c "dpkg-deb --build archivebox; apt-get update -qq; env DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y ./archivebox.deb"

# Install the built package locally during testing
apt install ./archivebox.deb
# or:
dpkg -i ./archivebox.deb

# Push the Apt/Debian package to the LaunchPad PPA
./bin/release.sh

To setup your GPG keys for signing the debian package these commands may be helpful:

gpg --refresh-keys
gpg --list-keys
gpg --export ${ID} > public.key
gpg --export-secret-key ${ID} > private.key

gpg --import public.key
gpg --import --allow-secret-key-import private.key

# test that it works
debsign -k YOURGPGKEYID deb_dist/archivebox_*_source.changes
gpg --verify YOURGPGKEYID deb_dist/archivebox_*_source.changes

docker run -v $PWD:/data ubuntu:latest /bin/bash -c "apt-get update -qq; apt-get install -qq -y devscripts gpg; cd /data; gpg --import public.key; gpg --import private.key; dpkg-source -b archivebox-0.7.1; cd archivebox-0.7.1; dpkg-genchanges --build=source,all -sa > ../archivebox_0.7.1-1_source.changes; cd ..; debsign -k 52423FBED1586F45 ./archivebox_0.7.1-1_source.changes"

A full guide for doing Python packaging on Debian with stdeb is available here: https://docs.monadical.com/s/BkF2EoKqw

TODO: switch to FPM? https://fpm.readthedocs.io/en/latest/intro.html

debian-archivebox's People

Contributors

pirate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

debian-archivebox's Issues

Settings for Ubuntu groovy missing

Hi,

looks like is not compatible for >= 20.04 . I installed a new Ubuntu 20.10 and got the following:

sudo add-apt-repository -u ppa:archivebox/archivebox
apt install archivebox
More info: https://launchpad.net/~archivebox/+archive/ubuntu/archivebox
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/archivebox-ubuntu-archivebox-groovy.list
Adding deb entry to /etc/apt/sources.list.d/archivebox-ubuntu-archivebox-groovy.list
Found existing deb-src entry in /etc/apt/sources.list.d/archivebox-ubuntu-archivebox-groovy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archivebox-ubuntu-archivebox-groovy.list
Adding key to /etc/apt/trusted.gpg.d/archivebox-ubuntu-archivebox.gpg with fingerprint 2BCCD744CC1AD54C9DC77DE8C258F79DCC02E369
Ign:1 http://ppa.launchpad.net/archivebox/archivebox/ubuntu groovy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu groovy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu groovy-updates InRelease
Err:4 http://ppa.launchpad.net/archivebox/archivebox/ubuntu groovy Release
  404  Not Found [IP: 2001:67c:1560:8008::19 80]
Hit:5 http://archive.ubuntu.com/ubuntu groovy-security InRelease
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/archivebox/archivebox/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@archivebox:~# apt update
Ign:1 http://ppa.launchpad.net/archivebox/archivebox/ubuntu groovy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu groovy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu groovy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu groovy-security InRelease
Err:5 http://ppa.launchpad.net/archivebox/archivebox/ubuntu groovy Release
  404  Not Found [IP: 2001:67c:1560:8008::19 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/archivebox/archivebox/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@archivebox:~#

Would be nice to get this fixed.

Thank you very much!

v0.6.3 Package broken because python3-django==3.19 is no longer available as a debian package

After a recent system update, I noticed that archivebox doesn't work anymore.

Running archivebox always fails with the following error:

ValueError: Primary key 'django.db.models.UUIDField' referred by core.apps.CoreConfig.default_auto_field must subclass AutoField.

Similar issues raised in the main repo (ArchiveBox/ArchiveBox#738 (comment), ArchiveBox/ArchiveBox#728 (comment)) mention that the Django version should be exactly 3.19. However, the debian packaged Django version for bookworm is already at 3.2.19 (see https://packages.debian.org/bookworm/python3-django).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.