• Stars
    star
    314
  • Rank 133,353 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 11 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Arch Linux website code

Archweb README

Build Status

To get a pretty version of this document, run

$ markdown README > README.html

License

See LICENSE file.

Authors

See AUTHORS file.

Dependencies

  • python
  • rsync (optional for mirrorcheck with rsync mirrors)

Python dependencies

More detail in requirements.txt and requirements_prod.txt; it is best to use virtualenv and pip to handle these. But if you insist on (Arch Linux) packages, you will probably want the following:

  • python-django
  • python-psycopg2
  • python-markdown
  • python-memcached

Testing Installation

  1. Run python -m venv env.

     cd /path/to/archweb && python -m venv ./env/
    
  2. Activate the virtualenv.

     source ./env/bin/activate
    
  3. Install dependencies through pip.

     pip install -r requirements.txt
    
  4. Copy local_settings.py.example to local_settings.py and modify. Make sure to uncomment the appropriate database section (either sqlite or PostgreSQL).

  5. Migrate changes.

     ./manage.py migrate
    
  6. Load the fixtures to pre populate some data. If you don't want some of the provided data, adjust the file glob accordingly.

     ./manage.py loaddata main/fixtures/*.json
     ./manage.py loaddata devel/fixtures/*.json
     ./manage.py loaddata mirrors/fixtures/*.json
     ./manage.py loaddata releng/fixtures/*.json
    
  7. Use the following commands to start a service instance

     ./manage.py runserver
    
  8. To optionally populate the database with real data:

     wget http://mirrors.kernel.org/archlinux/core/os/x86_64/core.db.tar.gz
     ./manage.py reporead x86_64 core.db.tar.gz
     # Package file listing
     wget http://mirrors.kernel.org/archlinux/core/os/x86_64/core.files.tar.gz
     ./manage.py reporead --filesonly x86_64 core.files.tar.gz
    

Alter architecture and repo to get x86_64 and packages from other repos if needed.

  1. Database Updates for Added/Removed packages

     sqlite3 archweb.db < packages/sql/update.sqlite3.sql
    

For PostgreSQL use packages/sql/update.postgresql_psycopg2.sql

Testing SMTP server

To be able to create an account on your test environment an SMTP server is required. A simple debugging SMTP server can be setup using Python and aiosmtpd.

Install aiosmtpd

    pip install aiosmtpd

Run the server

    python -m aiosmtpd -n -l localhost:1025

In local_settings.py add entries to set EMAIL_HOST to 'localhost' and EMAIL_PORT to 1025.

Running tests and coverage

Install the test dependencies:

    pip install -r requirements_test.txt

To the unittests execute the following commands:

    make collectstatic
    make test

Running coverage:

    make coverage
    make open-coverage

Django Debug toolbar

To use the Django Debug toolbar install django-debug-toolbar and in local_settings.py set DEBUG_TOOLBAR to True.

Management commands

Archweb provides multiple management commands for importing various sorts of data. An overview of commands:

  • generate_keyring - Assemble a GPG keyring with all known developer keys.
  • pgp_import - Import keys and signatures from a given GPG keyring.
  • read_rebuilderd_status - Import rebuilderd status into Archweb.
  • rematch_developers - Rematch flag requests and packages where user_id/packager_id is NULL to a Developer.
  • reporead - Parses a repo.db.tar.gz, repo.files.tar.gz file and updates the Arch database with the relevant changes.
  • reporead_inotify - Watches a templated patch for updates of *.files.tar.gz to update Arch databases with.
  • donor_import - Import a single donator from a mail passed to stdin
  • mirrorcheck - Poll every active mirror URLs to store the lastsnyc time and record network timing details.
  • mirrorresolv - Poll every active mirror URLs and determine wheteher they have IP4 and/or IPv6 addresses.
  • populate_signoffs - retrieves the latest commit message of a signoff-eligible package.
  • update_planet - Import all feeds for users who have a valid website and website_rss in their user profile.
  • read_links - Reads a repo.links.db.tar.gz file and updates the Soname model.
  • read_links_inotify - Watches a templated patch for updates of *.links.tar.gz to update Arch databases with.

Updating iPXE images

The binaries required for iPXE based netboot are updated by copying them from the ipxe package to the static content directory (with the run_ipxe script the binaries may be tested beforehand):

cp -v /usr/share/ipxe/x86_64/ipxe-arch.efi /usr/share/ipxe/ipxe-arch.{ipxe,lkrn} sitestatic/releng

Afterwards a detached PGP signature using a valid WKD enabled packager key is created for each file:

gpg --sender "User Name <[email protected]>" --detach-sign sitestatic/netboot/*.{efi,ipxe,lkrn}

Production Installation

Arch Linux has an Ansible role for Archweb in their infrastructure repo.

vim: set syntax=markdown et:

More Repositories

1

archinstall

Arch Linux installer - guided, templates etc.
Python
6,002
star
2

archlinux-docker

Docker Base Image for Arch Linux (read-only mirror)
Shell
450
star
3

arch-install-scripts

Useful scripts for installing Arch Linux (read-only mirror)
Shell
331
star
4

svntogit-packages

Automatic import of svn 'packages' repo (read-only mirror)
Shell
317
star
5

svntogit-community

Automatic import of svn 'community' repo (read-only mirror)
Shell
302
star
6

asp

Arch Build Source Management Tool
Shell
292
star
7

arch-boxes

Arch-boxes provides automated builds of the Arch Linux releases for different providers and post-processors (read-only mirror)
Shell
217
star
8

archiso

Official archiso scripts Repository (read-only mirror)
Shell
209
star
9

mkinitcpio

Arch Linux initramfs generation tools (read-only mirror)
Shell
201
star
10

aur

⚠️⚠️Experimental aur.git mirror⚠️⚠️ (read-only mirror)
152
star
11

archwiki

MediaWiki used on Arch Linux websites (read-only mirror)
PHP
146
star
12

archlinux-repro

Tools to reproduce arch linux packages
Shell
125
star
13

arch-security-tracker

Arch Linux Security Tracker
Python
119
star
14

alpm.rs

Rust bindings for libalpm
Rust
112
star
15

devtools

Tools for Arch Linux package maintainers (read-only mirror)
Shell
92
star
16

infrastructure

Official Arch Linux Infrastructure Repository (read-only mirror)
Jinja
92
star
17

contrib

Arch contrib scripts
Shell
64
star
18

pyalpm

Python 3 bindings for libalpm (read-only mirror)
C
56
star
19

aurweb

Hosting platform for the Arch User Repository (AUR), a collection of packaging scripts created by the Arch Linux community (read-only mirror)
Python
40
star
20

dbscripts

Arch Linux repository management scripts (read-only mirror)
Shell
30
star
21

archmanweb

Codebase for the Arch manual pages repository (read-only mirror)
Python
22
star
22

pacman-contrib

Contributed scripts and tools for pacman systems (read-only mirror)
Shell
20
star
23

arch-repro-status

Check the reproducibility status of your Arch Linux packages (read-only mirror)
Rust
19
star
24

arch-rebuild-order

WIP Rust based rebuild order generation script (read-only mirror)
Rust
19
star
25

repod

(read-only mirror)
Python
17
star
26

archlinux-keyring

Arch Linux PGP keyring (read-only mirror)
Python
11
star
27

gluebuddy

A secure helper daemon that watches several aspects of the Arch Linux infrastructure and makes sure that certain conditions are met (read-only mirror)
Rust
10
star
28

archbbs

Arch customized FluxBB install (read-only mirror)
PHP
9
star
29

libudev0-shim

libudev.so.0 compatibility library for systems with newer udev versions
C
9
star
30

conf.archlinux.org

Arch Linux Conference Website (read-only mirror)
CSS
8
star
31

.github

(read-only mirror)
8
star
32

mkinitcpio-archiso

Initcpio scripts used by archiso (read-only mirror)
Shell
7
star
33

sandcrawler

A tool to get all versions of a given of software project (read-only mirror)
6
star
34

neoasknot

Contribution landing page for Arch Linux (read-only mirror)
Svelte
5
star
35

state

Git packaging repository state (read-only mirror)
Roff
5
star
36

releng

Arch Linux release engineering (read-only mirror)
Shell
4
star
37

signstar

A secure enclave signing solution (read-only mirror)
4
star
38

arch-release-promotion

Promote official releases with signatures and additional artifacts (read-only mirror)
Python
3
star
39

tu-bylaws

The bylaws which govern the Arch Linux Trusted Users (read-only mirror)
Makefile
2
star
40

rebuilderd-website

Arch Linux Rebuilderd status webpage (read-only mirror)
JavaScript
2
star
41

pytest-pacman

A pytest plugin which provides helpers to create pacman's localdb and sync db's (read-only mirror)
Python
1
star