aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rader2023-09-14 11:39:10 -0400
committerDavid Rader2023-09-14 11:39:10 -0400
commitf0705f523a36a36bab4c42f4552405828e6ff7fe (patch)
tree0f7acdd639f37b618ad38811b45ac5b00429ee28
parent9054882f29bc8aba459d046b5b1bb6b5b470295f (diff)
downloadaur-f0705f523a36a36bab4c42f4552405828e6ff7fe.tar.gz
corrected upstream url to be our repo, cleaned up post_install message, add server install info to README
-rw-r--r--.SRCINFO4
-rw-r--r--BUILDING.md10
-rw-r--r--PKGBUILD6
-rw-r--r--README.md50
-rw-r--r--keepalived.install51
5 files changed, 81 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 75421f8ea2af..28a650cf2d6a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = keepalived-openrc
pkgdesc = keepalived bundled as an openrc based service
pkgver = 2.2.8
- pkgrel = 2
- url = https://www.keepalived.org
+ pkgrel = 3
+ url = https://gitlab.com/drad/keepalived
install = keepalived.install
arch = x86_64
license = GPL3
diff --git a/BUILDING.md b/BUILDING.md
new file mode 100644
index 000000000000..35028af036b0
--- /dev/null
+++ b/BUILDING.md
@@ -0,0 +1,10 @@
+# Building
+
+- make changes as needed
+- increment PKGBUILD > pkgrel
+- test locally as needed
+- generate new .SRCINFO: `makepkg --printsrcinfo > .SRCINFO`
+- add changes to git: `git add`
+- commit: `git commit -m '...'`
+- push to origin: `git push origin`
+- push to aur: `git push aur`
diff --git a/PKGBUILD b/PKGBUILD
index f405c95121c4..aa585adff863 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,10 +9,10 @@
pkgname=keepalived-openrc
_pkgname=keepalived
pkgver="2.2.8"
-pkgrel="2"
+pkgrel="3"
pkgdesc="keepalived bundled as an openrc based service"
arch=("x86_64")
-url='https://www.keepalived.org'
+url='https://gitlab.com/drad/keepalived'
license=('GPL3')
depends=(openrc)
makedepends=('gcc' 'openssl' 'libnl' 'net-snmp')
@@ -20,7 +20,7 @@ makedepends=('gcc' 'openssl' 'libnl' 'net-snmp')
#~ conflicts=()
install=keepalived.install
#changelog=CHANGELOG.md
-source=("$_pkgname-$pkgver.tar.gz::$url/software/$_pkgname-$pkgver.tar.gz")
+source=("$_pkgname-$pkgver.tar.gz::https://www.keepalived.org/software/$_pkgname-$pkgver.tar.gz")
md5sums=('8c26f75a8767e5341d82696e1e717115')
#~ prepare() {}
diff --git a/README.md b/README.md
index 3bebe309b412..dcc91d88bef7 100644
--- a/README.md
+++ b/README.md
@@ -2,24 +2,44 @@
A build of keepalived for openrc deployment - nothing fancy, nothing special.
-### Get
-
-NOTE: we recommend cloning into the ~/.aur/ directory - its not necessary but documentation assumes this location.
-
-NOTE: if you are running this as root you will need to preface all commands with `su user -c "command"`
-
-- get PKGBUILD: `cd ~/.aur && git clone https://gitlab.com/drad/keepalived.git`
-
-### Build
-
-Build with: `cd ~/.aur/keepalived && makepkg -src`
-
### Install
-Install with: `cd ~/.aur/keepalived && sudo pacman -U keepalived{version}.pkg.tar.zst`
+Most installations of this package will likely be on a server (which likely is not using or have a user account). If this is the case you can install as nobody user as follows:
+
+1. install needed dependencies:
+```
+pacman -S gcc openssl libnl net-snmp git
+```
+2. create a build directory and set it up to be owned by the nobody user
+```
+mkdir ~/.aur
+chgrp nobody ~/.aur
+chmod g+ws ~/.aur
+setfacl -m u::rwx,g::rwx ~/.aur
+setfacl -d --set u::rwx,g::rwx,o::- ~/.aur
+```
+3. Now you can clone and build:
+```
+git clone https://gitlab.com/drad/keepalived.git \
+ && cd keepalived \
+ && sudo -u nobody makepkg -c \
+ && ls -lh keepalived*.zst
+```
+4. Finally install:
+```
+pacman -U keepalived-openrc-{version-arch}.pkg.tar.zst
+```
+
+Optionally, you can installed the usual AUR way:
+
+```
+git clone https://gitlab.com/drad/keepalived.git
+cd keepalived
+makepkg -sirc
+```
-### Remove
-Remove with: `sudo pacman -R keepalived`
+### Remove
+Remove with: `pacman -R keepalived-openrc`
diff --git a/keepalived.install b/keepalived.install
index 372658e4f50f..d4befcb83f8b 100644
--- a/keepalived.install
+++ b/keepalived.install
@@ -1,22 +1,33 @@
post_install() {
- echo ">> "
- echo ">> keepalived has been installed and an init.d script deployed as /etc/init.d/keepalived"
- echo ">> "
- echo ">> The init.d script has not been registered nor started."
- echo ">> "
- echo ">> To register the init.d script:"
- echo ">> rc-update add keepalived default"
- echo ">> To start the service:"
- echo ">> rc-service keepalived start"
- echo ">> To get keepalived status:"
- echo ">> rc-service keepalived status"
- echo ">> To stop keepalived:"
- echo ">> rc-service keepalived stop"
- echo ">> "
- echo ">> NOTICE: No keepalive.conf (config file) has been deployed;"
- echo ">> although, a sample config file has been provided and is available"
- echo ">> at /etc/keepalived/keepalived.conf.sample. You will need to create"
- echo ">> the /etc/keepalived/keepalived.conf file with your settings before"
- echo ">> keepalive will run!"
- echo ">> "
+ cat << EOF
+
+keepalived has been installed and an init.d script deployed (/etc/init.d/keepalived)
+
+The init.d script has not been registered nor started.
+
+ To register the init.d script:
+ rc-update add keepalived default
+ To start the service:
+ rc-service keepalived start
+ To get keepalived status:
+ rc-service keepalived status
+ To stop keepalived:
+ rc-service keepalived stop
+
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃ ┳┓┏┓┏┳┓┳┏┓┏┓ ┃
+┃ ┃┃┃┃ ┃ ┃┃ ┣ ┃
+┃ ┛┗┗┛ ┻ ┻┗┛┗┛ ┃
+┃ ┃
+┃ No config file (keepalive.conf) has been deployed, you must ┃
+┃ create/configure a config file before keepalived will run! ┃
+┃ ┃
+┃ A sample config file has been provided and is available at ┃
+┃ /etc/keepalived/keepalived.conf.sample. ┃
+┃ ┃
+┃ You will need to create the /etc/keepalived/keepalived.conf file ┃
+┃ and configure it per your needs. ┃
+┃ ┃
+┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
+EOF
}