From e56852bf8af79026b290a8d7ff5fbf29f8e9fd5e Mon Sep 17 00:00:00 2001 From: langfingaz Date: Fri, 23 Apr 2021 12:55:23 +0200 Subject: [PATCH] add networkmanager; update README --- README.md | 9 ++++- pkg/de-p1st-base-efi/PKGBUILD | 9 +++-- pkg/de-p1st-networkmanager/PKGBUILD | 30 ++++++++++++++++ pkg/de-p1st-networkmanager/README.md | 14 ++++++++ .../de-p1st-networkmanager.install | 35 +++++++++++++++++++ pkg/de-p1st-networkmanager/scratch | 3 -- pkg/de-p1st-networkmanager/systemd.preset | 1 + prototype/proto-systemctl.install | 35 +++++++++++++++++++ 8 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 pkg/de-p1st-networkmanager/PKGBUILD create mode 100644 pkg/de-p1st-networkmanager/README.md create mode 100644 pkg/de-p1st-networkmanager/de-p1st-networkmanager.install delete mode 100644 pkg/de-p1st-networkmanager/scratch create mode 100644 pkg/de-p1st-networkmanager/systemd.preset create mode 100644 prototype/proto-systemctl.install diff --git a/README.md b/README.md index 34a66e4..a92a9ff 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Package names are prefixed with `de-p1st` as this is one of my domains ([p1st.de]()) which itself is an abbreviation of -[cloud.privacy1st.de]() +[privacy1st.de]() ### creating config files @@ -43,3 +43,10 @@ Example: [pkg/de-p1st-pacman/PKGBUILD](pkg/de-p1st-pacman/PKGBUILD) ### enabling services **TODO**: using systemd.preset + +* systemd.preset - Service enablement presets +* [man 5 systemd.preset](https://www.systutorials.com/docs/linux/man/5-systemd.preset/) + +Example preset file: [archi3linux systemd.preset](https://gitlab.com/archi3linux/meta/-/blob/c08ad57993095a575f2e7453c2fe92de97923276/systemd.preset) + +Example pkg: [pkg/de-p1st-networkmanager](pkg/de-p1st-networkmanager) diff --git a/pkg/de-p1st-base-efi/PKGBUILD b/pkg/de-p1st-base-efi/PKGBUILD index 2919e95..5f27c28 100644 --- a/pkg/de-p1st-base-efi/PKGBUILD +++ b/pkg/de-p1st-base-efi/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=base-efi _reponame=arch-pkg pkgname="de-p1st-$_pkgname" -pkgver=0.0.1 +pkgver=0.0.2 pkgrel=1 pkgdesc="Arch Linux base packages" arch=('any') @@ -10,7 +10,7 @@ url="https://git.privacy1st.de/langfingaz/${_reponame}" license=('MIT') groups=() -depends=('base' 'meta-group-base-devel' 'linux-firmware' 'man-db' 'man-pages' 'nano' 'usbutils') +depends=('base' 'meta-group-base-devel' 'linux-firmware' 'man-db' 'man-pages' 'nano') # metapackage for 'linux' and 'linux-headers' depends+=('de-p1st-kernel') # pacman config @@ -19,12 +19,17 @@ depends+=('de-p1st-pacman') # depends+=('de-p1st-ucode') # !! TODO !! # bootmanager depends+=('de-p1st-grub' 'efibootmgr') +# shell +depends+=('zsh' 'grml-zsh-config') # virtual console keyboard config depends+=('de-p1st-keyboard') # fonts depends+=('noto-fonts' 'ttf-material-design-icons-git' 'ttf-unifont') +# other +# depends+=('usbutils') + optdepends=() provides=() conflicts=() diff --git a/pkg/de-p1st-networkmanager/PKGBUILD b/pkg/de-p1st-networkmanager/PKGBUILD new file mode 100644 index 0000000..ddd18b1 --- /dev/null +++ b/pkg/de-p1st-networkmanager/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Daniel Langbein +_pkgname=networkmanager +_reponame=arch-pkg +pkgname="de-p1st-$_pkgname" +pkgver=0.0.1 +pkgrel=1 +pkgdesc="NetworkManager with configuration" +arch=('any') +url="https://git.privacy1st.de/langfingaz/${_reponame}" +license=('MIT') +groups=() +depends=('networkmanager') +makedepends=('git') +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install="${pkgname}.install" +changelog= +source=("git+${url}.git") +noextract=() +sha256sums=('SKIP') + +package() { + cd "${_reponame}/pkg/${pkgname}" + + install -Dm0644 systemd.preset "$pkgdir"/usr/lib/systemd/system-preset/"$pkgname".preset +} diff --git a/pkg/de-p1st-networkmanager/README.md b/pkg/de-p1st-networkmanager/README.md new file mode 100644 index 0000000..483a098 --- /dev/null +++ b/pkg/de-p1st-networkmanager/README.md @@ -0,0 +1,14 @@ +## vpn-support + +* [https://wiki.archlinux.org/index.php/NetworkManager#VPN_support]() + +## local network hostname resolution + +* [https://wiki.archlinux.org/index.php/Network_Configuration#Local_network_hostname_resolution]() + +Either with `systemd-resolved` or `Avahi`. +As we use `systemd-resolved` Avahi is not required. + +* `pacman -S avahi` and + `systemctl enable enable avahi-daemon.service` + diff --git a/pkg/de-p1st-networkmanager/de-p1st-networkmanager.install b/pkg/de-p1st-networkmanager/de-p1st-networkmanager.install new file mode 100644 index 0000000..24823e5 --- /dev/null +++ b/pkg/de-p1st-networkmanager/de-p1st-networkmanager.install @@ -0,0 +1,35 @@ +# This is a default template for a post-install scriptlet. +# Uncomment only required functions and remove any functions +# you don't need (and this header). + +## arg 1: the new package version +#pre_install() { + # do something here +#} + +## arg 1: the new package version +post_install() { + systemctl preset-all +} + +## arg 1: the new package version +## arg 2: the old package version +#pre_upgrade() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + systemctl preset-all +} + +## arg 1: the old package version +#pre_remove() { + # do something here +#} + +## arg 1: the old package version +# post_remove() { + # do something here +# } diff --git a/pkg/de-p1st-networkmanager/scratch b/pkg/de-p1st-networkmanager/scratch deleted file mode 100644 index 8ca375d..0000000 --- a/pkg/de-p1st-networkmanager/scratch +++ /dev/null @@ -1,3 +0,0 @@ -depend on networkmanager, openvpn plugin - -enalbe the systemctl service \ No newline at end of file diff --git a/pkg/de-p1st-networkmanager/systemd.preset b/pkg/de-p1st-networkmanager/systemd.preset new file mode 100644 index 0000000..c134302 --- /dev/null +++ b/pkg/de-p1st-networkmanager/systemd.preset @@ -0,0 +1 @@ +enable NetworkManager.service \ No newline at end of file diff --git a/prototype/proto-systemctl.install b/prototype/proto-systemctl.install new file mode 100644 index 0000000..24823e5 --- /dev/null +++ b/prototype/proto-systemctl.install @@ -0,0 +1,35 @@ +# This is a default template for a post-install scriptlet. +# Uncomment only required functions and remove any functions +# you don't need (and this header). + +## arg 1: the new package version +#pre_install() { + # do something here +#} + +## arg 1: the new package version +post_install() { + systemctl preset-all +} + +## arg 1: the new package version +## arg 2: the old package version +#pre_upgrade() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + systemctl preset-all +} + +## arg 1: the old package version +#pre_remove() { + # do something here +#} + +## arg 1: the old package version +# post_remove() { + # do something here +# }