summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordian Edenhofer2017-10-19 22:18:04 +0200
committerGordian Edenhofer2017-10-19 22:24:28 +0200
commit6cbe490eaf53e6fb153cd41fac8b91758ca42d01 (patch)
tree44c2d51db28bd33d5227502154545a4ca022adba
parent4cb13f1269c12bd0ea0dc98019fa1d3b1ed399e7 (diff)
downloadaur-6cbe490eaf53e6fb153cd41fac8b91758ca42d01.tar.gz
upgpkg: slurm-llnl 17.02.8.1-1
* Cleanup bash code in .install * Replace `echo -e` with makepkg's internal `msg` function * Streamline commenting style upgpkg: slurm-llnl-dev 17.11.0.0pre2-1 upgpkg: slurm-llnl-git 17.11.0.0pre2.r1028.gb10c33df25-1
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD12
-rw-r--r--slurm-llnl.install50
3 files changed, 29 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3faf8e7cacb6..e2d8e047df87 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = slurm-llnl
pkgdesc = Simple Linux Utility for Resource Management
- pkgver = 17.02.7.1
+ pkgver = 17.02.8.1
pkgrel = 1
url = https://www.schedmd.com
install = slurm-llnl.install
@@ -30,12 +30,12 @@ pkgbase = slurm-llnl
source = slurmctld.service
source = slurmd.service
source = slurmdbd.service
- source = https://github.com/SchedMD/slurm/archive/slurm-17-02-7-1.tar.gz
+ source = https://github.com/SchedMD/slurm/archive/slurm-17-02-8-1.tar.gz
sha512sums = 61f07699353d607ec43bab2a4fe29b4a380dab10108619e67ca2737193ab044a6e263179f7def932660acefd34c790c9d2b301cd6a49d92b8b80deeb1c7b8011
sha512sums = f74dacaaffa35fa11a62bb9efa492bb4ef9b197748f28c15210f362382da27ec1dd88a57a48fc6807029c93c9033c82e11545ea36622c683ae7bd09970ef8710
sha512sums = a1c2478a049dc1c024d773a73f363da6c9106d9533137f919394e8213376cb9167c8fcca7b038d1c45c441a1adce4524ccb68b6dd269a1000aba11b84b5352d5
sha512sums = ae2d0275bc9e0aac15d0d1dd4913b70ed4d4032e76c9c6ffdeae345c55834219f6495429d1d1c9129779221d6d08bada1228ccdb1c671b05d4a92ed6088bf55c
sha512sums = 56459e20d7f2624a8e8dd2982693b257e65df22c3609d991afdc1b2f79adaefc0586a76fd5fdd7dc2bdd39b3af0c91f38ddc4b1139081968903450bc28aca304
- sha512sums = 055f64227c384a06cd17895bee2ac2ff81164db4e1491365c42f6bf0b6a0816c027ed16b8912ae15dde1b99bdd802afcef85c3ac8b25323e55b55972a3313deb
+ sha512sums = 9d7f7d0e7380e39d6345a8555a539422935e81189fc7ec828b95689fe944684ad29f4151b4c8f95908e4e1577284db8a5ee94bfaa9d769aa7d29351b25a90dcf
pkgname = slurm-llnl
diff --git a/PKGBUILD b/PKGBUILD
index d3d4056cf839..1d4535ecc825 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Submitter: Fredrik Tegenfeldt <fredrik.tegenfeldt@unige.ch>
pkgname=slurm-llnl
-pkgver=17.02.7.1
+pkgver=17.02.8.1
# Hyphens (-) are prohibited however they are used by the package author
# therefore it is necessary to invoke ${pkgver} like ${pkgver//./-}
# this will substitute any full stops (.) with hyphens
@@ -42,7 +42,7 @@ sha512sums=('61f07699353d607ec43bab2a4fe29b4a380dab10108619e67ca2737193ab044a6e2
'a1c2478a049dc1c024d773a73f363da6c9106d9533137f919394e8213376cb9167c8fcca7b038d1c45c441a1adce4524ccb68b6dd269a1000aba11b84b5352d5'
'ae2d0275bc9e0aac15d0d1dd4913b70ed4d4032e76c9c6ffdeae345c55834219f6495429d1d1c9129779221d6d08bada1228ccdb1c671b05d4a92ed6088bf55c'
'56459e20d7f2624a8e8dd2982693b257e65df22c3609d991afdc1b2f79adaefc0586a76fd5fdd7dc2bdd39b3af0c91f38ddc4b1139081968903450bc28aca304'
- '055f64227c384a06cd17895bee2ac2ff81164db4e1491365c42f6bf0b6a0816c027ed16b8912ae15dde1b99bdd802afcef85c3ac8b25323e55b55972a3313deb')
+ '9d7f7d0e7380e39d6345a8555a539422935e81189fc7ec828b95689fe944684ad29f4151b4c8f95908e4e1577284db8a5ee94bfaa9d769aa7d29351b25a90dcf')
build() {
@@ -77,7 +77,7 @@ package() {
make DESTDIR="${pkgdir}" install
- # slurm configs and license
+ # Install slurm's configs and license
install -D -m644 etc/slurm.conf.example "${pkgdir}/etc/slurm-llnl/slurm.conf.example"
install -D -m644 etc/slurmdbd.conf.example "${pkgdir}/etc/slurm-llnl/slurmdbd.conf.example"
install -D -m644 LICENSE.OpenSSL "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.OpenSSL"
@@ -85,17 +85,17 @@ package() {
install -D -m644 ../slurm-llnl-default-conf "${pkgdir}/etc/default/slurm-llnl"
- # init related install
+ # Install init related files
install -D -m755 etc/init.d.slurm "${pkgdir}/etc/rc.d/slurm"
install -D -m755 etc/init.d.slurmdbd "${pkgdir}/etc/rc.d/slurmdbd"
- # SystemD related install
+ # Install SystemD related files
install -D -m644 ../slurmctld.service "${pkgdir}/usr/lib/systemd/system/slurmctld.service"
install -D -m644 ../slurmd.service "${pkgdir}/usr/lib/systemd/system/slurmd.service"
install -D -m644 ../slurmdbd.service "${pkgdir}/usr/lib/systemd/system/slurmdbd.service"
install -D -m644 ../slurm-tmpfiles.conf "${pkgdir}/usr/lib/tmpfiles.d/slurm-tmpfiles.conf"
- # creating a log and a lib dir
+ # Create a log and a lib dir
install -d -m755 "${pkgdir}/var/log/slurm-llnl"
install -d -m755 "${pkgdir}/var/lib/slurm-llnl"
}
diff --git a/slurm-llnl.install b/slurm-llnl.install
index f91c5e958c88..6ccc367a37c5 100644
--- a/slurm-llnl.install
+++ b/slurm-llnl.install
@@ -1,70 +1,60 @@
-## arg 1: the new package version
post_install() {
- id slurm >&/dev/null
- if [ $? -ne 0 ]; then
- echo -e "\e[34;1m==>\e[39;1m Adding slurm system group... \e[0m"
- groupadd -g 64030 -r slurm
- [ $? -ne 0 ] && groupadd -r slurm
+ if ! id slurm >&/dev/null; then
+ msg "Adding slurm system group..."
+ groupadd -g 64030 -r slurm || groupadd -r slurm
- echo -e "\e[34;1m==>\e[39;1m Adding slurm system user... \e[0m"
- useradd -r -c "Slurm Daemon" -d /var/log/slurm-llnl -g slurm -u 64030 slurm
- [ $? -ne 0 ] && useradd -r -c "Slurm Daemon" -d /var/log/slurm-llnl -g slurm slurm
+ msg "Adding slurm system user..."
+ useradd -r -c "Slurm Daemon" -d /var/log/slurm-llnl -g slurm -u 64030 slurm || useradd -r -c "Slurm Daemon" -d /var/log/slurm-llnl -g slurm slurm
- echo -e "\e[34;1m==>\e[39;1m Locking Slurm User Account...\e[0m"
+ msg "Locking Slurm User Account..."
passwd -l slurm &>/dev/null
fi
- # securing the log dir
+ # Secure the log dir
if [ -d /var/log/slurm-llnl ]; then
chown -R slurm:slurm /var/log/slurm-llnl
fi
- echo -e "\e[34;1m==>\e[39;1m NOTE: You have to create a slurm configuration-file in /etc/slurm-llnl/ \e[0m"
- echo -e "\e[34;1m==>\e[39;1m prior to starting any slurm daemons. \e[0m"
+ msg "You have to create a slurm configuration-file in /etc/slurm-llnl/ prior to starting any slurm daemons."
}
-## arg 1: the new package version
-## arg 2: the old package version
post_upgrade() {
- # THIS HAS TO BE REMOVED ONEDAY - TODO
- if [ -f /etc/slurm/slurm.conf ]; then
+ # REMOVE ONEDAY - TODO
+ if [[ -f /etc/slurm/slurm.conf ]]; then
mv /etc/slurm/* /etc/slurm-llnl/
rmdir /etc/slurm
- echo -e "\e[34;1m==>\e[39;1m Your configuration-files were moved from /etc/slurm to /etc/slurm-llnl ! \e[0m"
+ msg "Your configuration-files were moved from /etc/slurm to /etc/slurm-llnl !"
fi
}
-## arg 1: the old package version
pre_remove() {
- which systemctl >& /dev/null
- if [ $? -eq 0 ]; then
- echo -e "\e[34;1m==>\e[39;1m Stopping slurm daemons through SystemD... \e[0m"
+ if which systemctl >& /dev/null; then
+ msg "Stopping slurm daemons through SystemD..."
systemctl stop slurmd.service
systemctl stop slurmdbd.service
systemctl stop slurmctld.service
- echo -e "\e[34;1m==>\e[39;1m Disabling SystemD related file(s)... \e[0m"
+ msg "Disabling SystemD related file(s)..."
systemctl disable slurmd.service
systemctl disable slurmdbd.service
systemctl disable slurmctld.service
else
- echo -e "\e[34;1m==>\e[39;1m Stopping slurm daemons... \e[0m"
+ msg "Stopping slurm daemons..."
/etc/rc.d/slurm stop
/etc/rc.d/slurmdbd stop
fi
}
-## arg 1: the old package version
post_remove() {
- # Deleting remnant recusivly
+ # Delete remnant recusivly
rm -rf /var/lib/slurm-llnl
# Change directories which formerly belonged to slurm to be owned by root
[[ -d /var/spool/slurm ]] && chown -R root:root /var/spool/slurm
- # notifying the user of kept dirs
- [[ -d /etc/slurm-llnl ]] && echo -e "\e[34;1m==>\e[39;1m NOTE: Custom configuration-file(s) in /etc/slurm-llnl/ were kept on your system.\e[0m"
- [[ -d /var/log/slurm-llnl ]] && chown -R root:root /var/log/slurm-llnl && echo -e "\e[34;1m==>\e[39;1m NOTE: Logfiles were preserved. They reside under /var/log/slurm-llnl .\e[0m"
+ # Notify the user of kept dirs
+ [[ -d /etc/slurm-llnl ]] && msg "Custom configuration-file(s) in /etc/slurm-llnl/ were kept on your system."
+ [[ -d /var/log/slurm-llnl ]] && chown -R root:root /var/log/slurm-llnl && msg "Logfiles were preserved. They reside under /var/log/slurm-llnl ."
- echo -e "\e[34;1m==>\e[39;1m Removing slurm system user/group... \e[0m"
+ msg "Removing slurm system user/group..."
userdel slurm
}