要获得此文档的漂亮版本,请运行
$ markdown README > README.html
请参阅许可证文件。
请参阅作者文件。
requirements.txt中的更多requirements_prod.txt信息。最好使用Virtualenv和Pip来处理它们。但是,如果您坚持(Arch Linux)软件包,则可能需要以下内容:
运行python -m venv env 。
cd /path/to/archweb && python -m venv ./env/
激活Virtualenv。
source ./env/bin/activate
通过pip安装依赖项。
pip install -r requirements.txt
copy local_settings.py.example to local_settings.py和修改。确保删除适当的数据库部分(SQLite或PostgreSQL)。
迁移变化。
./manage.py migrate
加载固定装置以预先填充一些数据。如果您不想要一些提供的数据,请相应地调整文件网。
./manage.py loaddata main/fixtures/*.json
./manage.py loaddata devel/fixtures/*.json
./manage.py loaddata mirrors/fixtures/*.json
./manage.py loaddata releng/fixtures/*.json
使用以下命令开始服务实例
./manage.py runserver
可选地使用真实数据填充数据库:
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
更改架构和存储库以在需要时获取X86_64并从其他存储库中获取包装。
添加/删除软件包的数据库更新
sqlite3 archweb.db < packages/sql/update.sqlite3.sql
用于postgresql使用软件包/sql/update.postgresql_psycopg2.sql
为了能够在测试环境上创建一个帐户,需要SMTP服务器。可以使用Python和aiosmtpd设置简单的调试SMTP服务器。
安装aiosmtpd
pip install aiosmtpd
运行服务器
python -m aiosmtpd -n -l localhost:1025
在local_settings.py中,添加了将email_host的条目添加到'localhost'和email_port到1025。
安装测试依赖项:
pip install -r requirements_test.txt
对Unitests执行以下命令:
make collectstatic
make test
运行覆盖范围:
make coverage
make open-coverage
要使用django调试工具栏安装django-debug-toolbar和local_settings.py设置debug_toolbar到true。
ArchWeb提供了多个管理命令,用于导入各种数据。命令的概述:
通过将IPXE软件包复制到静态内容目录(使用run_ipxe脚本,可以事先测试二进制文件),可以更新基于IPXE的NetBoot所需的二进制文件:
cp -v /usr/share/ipxe/x86_64/ipxe-arch.efi /usr/share/ipxe/ipxe-arch.{ipxe,lkrn} sitestatic/releng
之后,使用有效的WKD启用Packager键为每个文件创建了独立的PGP签名:
for artifact in sitestatic/netboot/*.{efi,pxe,lkrn}; do
gpg --sender "User Name <[email protected]>" --detach-sign "$artifact"
done
Arch Linux在其基础架构存储库中扮演了Ardsible的角色。
VIM:SET语法= Markdown et: