Coder Social home page Coder Social logo

ana7r / arch-historical-archive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from archlinux/arch-historical-archive

0.0 0.0 0.0 596 KB

Scripts to upload Arch packages to archive.org (read-only mirror)

Home Page: https://gitlab.archlinux.org/archlinux/arch-historical-archive

Shell 0.82% Python 99.18%

arch-historical-archive's Introduction

Arch Linux Historical Archive

See https://wiki.archlinux.org/index.php/Arch_Linux_Archive#Historical_Archive for general documentation.

Usage

You need to configure the Internet Archive client first: https://archive.org/services/docs/api/internetarchive/quickstart.html#configuring

The script uploads all files for a given package name to archive.org:

./upload_pkg_internetarchive.py /srv/archive/packages/l/lucene++

To upload all packages or at least a large subset, combine find and parallel:

find /srv/archive/packages -mindepth 2 -maxdepth 2 -type d | parallel --bar -j16 ~/upload_pkg_internetarchive.py > result.txt

Or use:

find /srv/archive/packages -mindepth 2 -maxdepth 2 -type d -exec "/home/archive/archive-uploader/upload_pkg_internetarchive.py" {} +

The script outputs to stdout any package name it couldn't completely upload. This may be due to archive.org load issues or rate limiting. It also maintains a database so that you can run it again against all files. Files that have already been uploaded will be skipped automatically.

How it works

  • for the given package name, walk the filesystem on orion to find all files (both *.pkg.tar.xz and *.sig)

  • parse .PKGINFO from the most recent package in this list to extract the pkgdesc, license, and upstream url

  • upload all files in this list to archive.org

  • if one of the files fails to upload, report the package name to stdout. The script needs to be run again for this package name. The status is recorded in an sqlite database and used to skip successful uploads on the next run.

arch-historical-archive's People

Contributors

bluewind avatar foutrelis avatar jelly avatar

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.