From 2611539723ac7eed5a5592cc66e6d2710859813a Mon Sep 17 00:00:00 2001 From: langfingaz Date: Thu, 29 Apr 2021 12:09:36 +0200 Subject: [PATCH] gnupg: work in progress --- archiso.sh | 11 ++++-- pkg/de-p1st-gnupg/PKGBUILD | 37 +++++++++++++++++++ pkg/de-p1st-gnupg/README.md | 9 +++++ pkg/de-p1st-gnupg/generate-gpg-conf.sh | 5 +++ .../{PKGBUILD => PKGBUILD_TODO.txt} | 2 +- pkg/de-p1st-nano/TODO | 0 pkg/de-p1st-repo/PKGBUILD | 2 +- pkg/de-p1st-systemd/PKGBUILD | 2 +- 8 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 pkg/de-p1st-gnupg/PKGBUILD create mode 100644 pkg/de-p1st-gnupg/README.md create mode 100755 pkg/de-p1st-gnupg/generate-gpg-conf.sh rename pkg/de-p1st-installer/{PKGBUILD => PKGBUILD_TODO.txt} (97%) create mode 100644 pkg/de-p1st-nano/TODO diff --git a/archiso.sh b/archiso.sh index 0f6abec..78b0cf9 100755 --- a/archiso.sh +++ b/archiso.sh @@ -9,19 +9,22 @@ # -> git # BUILD_DIR=./archlive -PKGS=('git' 'de-p1st-keyboard' 'de-p1st-pacman' 'de-p1st-mirrorlist' 'de-p1st-systemd' 'de-p1st-installer') +PKGS=('git' 'de-p1st-keyboard' 'de-p1st-pacman' 'de-p1st-pacman-mirrorlist' 'de-p1st-systemd' 'de-p1st-installer') PACMAN_CFG_ADDITION='pkg/de-p1st-pacman/pacman.d/de-p1st' # will be used to extend the builder's pacman.conf ################################ -if [ -d "${BUILD_DIR}" ] ; then +if [ "$1" = "clean" ] ; then + sudo rm -r "${BUILD_DIR}" || exit +elif [ -d "${BUILD_DIR}" ] ; then echo "Build dir does already exist and may not be empty!" + echo "Run '$0 clean' to start a clean ISO build." exit 1 -else - mkdir "$BUILD_DIR" || exit fi +mkdir "$BUILD_DIR" || exit + # The releng profile is used to create the official monthly installation ISO PROFILE=/usr/share/archiso/configs/releng/ if [ ! -d "${PROFILE}" ] ; then diff --git a/pkg/de-p1st-gnupg/PKGBUILD b/pkg/de-p1st-gnupg/PKGBUILD new file mode 100644 index 0000000..7b45e23 --- /dev/null +++ b/pkg/de-p1st-gnupg/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Daniel Langbein +_pkgname=gnupg +_reponame=arch +pkgname="de-p1st-$_pkgname" +pkgver=0.0.1 +pkgrel=1 +pkgdesc="gnupg with configuration" +arch=('any') +url="https://codeberg.org/privacy1st/${_reponame}" +license=('MIT') +groups=() +depends=('gnupg') +makedepends=('git') +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=("git+${url}.git" 'git+https://github.com/ioerror/duraconf.git') +noextract=() +sha256sums=('SKIP' 'SKIP') + +build() { + cp duraconf/configs/gnupg/gpg.conf "${_reponame}/pkg/${pkgname}/gpg.conf.template" + cd "${_reponame}/pkg/${pkgname}" + + generate-gpg-conf.sh +} + +package() { + cd "${_reponame}/pkg/${pkgname}" + + install -Dm0644 gpg.conf "$pkgdir"/etc/gnupg/gpgconf.conf +} diff --git a/pkg/de-p1st-gnupg/README.md b/pkg/de-p1st-gnupg/README.md new file mode 100644 index 0000000..9c5c787 --- /dev/null +++ b/pkg/de-p1st-gnupg/README.md @@ -0,0 +1,9 @@ +# gnupg + +* https://riseup.net/en/security/message-security/openpgp/best-practices + * https://github.com/ioerror/duraconf/blob/master/configs/gnupg/gpg.conf + +The gpg configuration can be placed in: +* `~/.gnupg/gpg.conf` +* `/etc/gnupg/gpgconf.conf` + diff --git a/pkg/de-p1st-gnupg/generate-gpg-conf.sh b/pkg/de-p1st-gnupg/generate-gpg-conf.sh new file mode 100755 index 0000000..5953a1a --- /dev/null +++ b/pkg/de-p1st-gnupg/generate-gpg-conf.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +DEFAULT_KEY='0x94F3D3DDAC22802258FC044B6C47C753F0823002' + +sed "s|^#default-key\\s*.*\$|default-key ${DEFAULT_KEY}|" < gpg.conf.template > gpg.conf diff --git a/pkg/de-p1st-installer/PKGBUILD b/pkg/de-p1st-installer/PKGBUILD_TODO.txt similarity index 97% rename from pkg/de-p1st-installer/PKGBUILD rename to pkg/de-p1st-installer/PKGBUILD_TODO.txt index 1d55368..4926147 100644 --- a/pkg/de-p1st-installer/PKGBUILD +++ b/pkg/de-p1st-installer/PKGBUILD_TODO.txt @@ -9,7 +9,7 @@ arch=('any') url="https://codeberg.org/privacy1st/${_reponame}" license=('MIT') groups=() -depends=('bash') +depends=() makedepends=('git') optdepends=() provides=() diff --git a/pkg/de-p1st-nano/TODO b/pkg/de-p1st-nano/TODO new file mode 100644 index 0000000..e69de29 diff --git a/pkg/de-p1st-repo/PKGBUILD b/pkg/de-p1st-repo/PKGBUILD index 2b86dd2..febef43 100644 --- a/pkg/de-p1st-repo/PKGBUILD +++ b/pkg/de-p1st-repo/PKGBUILD @@ -9,7 +9,7 @@ arch=('any') url="https://codeberg.org/privacy1st/${_reponame}" license=('MIT') groups=() -depends=('openssh' 'bash' 'aurutils') # arch-repo-vercmp uses "aur vercmp" which is part of "aurutils" +depends=('openssh' 'aurutils') # arch-repo-vercmp uses "aur vercmp" which is part of "aurutils" makedepends=('git') optdepends=() provides=() diff --git a/pkg/de-p1st-systemd/PKGBUILD b/pkg/de-p1st-systemd/PKGBUILD index b76ca1d..3227804 100644 --- a/pkg/de-p1st-systemd/PKGBUILD +++ b/pkg/de-p1st-systemd/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=systemd _reponame=arch pkgname="de-p1st-$_pkgname" -pkgver=0.0.1 +pkgver=0.0.2 pkgrel=1 pkgdesc="systemd with configuration" arch=('any')