From bf37b428359b21bc43fcf6b09778b4def4c57f60 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Wed, 20 Oct 2021 16:57:51 +0000 Subject: [PATCH] Added Docs/Readme --- Readme.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ SetupEnv.md | 34 +++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 Readme.md create mode 100644 SetupEnv.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..cfdb3d4 --- /dev/null +++ b/Readme.md @@ -0,0 +1,66 @@ +# Brammp's alpine packages + +# Package list +| Name | Description | +|------|:-----------:| +| minisatip | A small SAT>IP server from https://github.com/catalinii/minisatip | +| custom-firmware-mn88472 | Panasonic MN88472 firmware for Xbox One tuner | + +# How to build packages +## Initial Setup +First follow `SetupEnv.md` +## Getting this repo +Make sure you are logged-in as the user from `SetupEnv.md`. +``` +git clone https://git.bprieshof.nl/brammp/AlpinePackages.git +``` +## Updating repo +Use the following command to update the local git repo. +``` +git pull +``` + +## Building package +To build a package, go to the directory and use the `abuild` command. +``` +cd ~/AlpinePackages/ +abuild -r +``` +* -r to install dependencies for building the package + +## Serving/installing the packages +By default, the packages are stored in the `~/packages` directory. +The public signing is stored as `*.pub` in the `~/.abuild` directory. +The `packages` folder can be used as web root to act as a repo for the packages. +TIP: For easy of use, copy the public signing key to `packages` folder. +### Local system +The public signing does not have to be added, since `SetupEnv.md` has automatically done this. +#### Add as repo +Add the following to `/etc/apk/repositories` +``` +/home//packages/AlpinePackages/ +``` +To install the package use +``` +apk add +``` +#### Single shot install +``` +apk add --repository /home/USER/packages/AlpinePackages +``` +### On a remote system +Add/download the public signing key to `/etc/apk/keys`. +#### Add as repo +Add the following to `/etc/apk/repositories` +``` +http:///AlpinePackages/ +``` +To install the package use +``` +apk add +``` +#### Single shot install +``` +apk add --repository http:///AlpinePackages/ +``` + diff --git a/SetupEnv.md b/SetupEnv.md new file mode 100644 index 0000000..3fccccf --- /dev/null +++ b/SetupEnv.md @@ -0,0 +1,34 @@ +# Setting up build environment +The packages will be built with architecture of build system. + +## Requirements +To build a package for Alpine Linux you need an Alpine Linux installation. (For more info see: https://wiki.alpinelinux.org/wiki/Installation) +## Setup +### Install requirements +``` +apk add alpine-sdk sudo git +``` +### Setup user account +This is needed since `abuild` refuses to run as root. +``` +adduser +addgroup abuild +``` +Add the following to the sudoers file `/etc/sudoers` using the `visudo` command. +``` + ALL=(ALL) ALL +``` +### Set file permissions +``` +chgrp abuild /var/cache/distfiles +chmod g+w /var/cache/distfiles +``` +### Generating key for signing packages +Login as the newly created user, then run the following command. +``` +abuild-keygen -a -i +``` +* -a Will set `PACKAGER_PRIVKEY` to the generated key, this is for signing the packages +* -i Will install the key in to the `apk` package manager (/etc/apk/keys) +## Source +https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package \ No newline at end of file