diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2020-03-07 23:52:30 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2020-03-07 23:58:06 +0100 |
commit | 0a2039af1cc491eb6d90ac8e235c4882b8f77d1d (patch) | |
tree | e5032da988ebc4d741e085d13c17f023b9d29e22 | |
parent | 389daab980c4dc01f4e962dbc56380a7a946d7e3 (diff) | |
download | aports-0a2039af1cc491eb6d90ac8e235c4882b8f77d1d.tar.bz2 aports-0a2039af1cc491eb6d90ac8e235c4882b8f77d1d.tar.xz |
community/open-vm-tools: move default powerOps script(s) to /usr/share
-rw-r--r-- | community/open-vm-tools/APKBUILD | 23 | ||||
-rw-r--r-- | community/open-vm-tools/change-statechange.subr-location.patch | 11 |
2 files changed, 31 insertions, 3 deletions
diff --git a/community/open-vm-tools/APKBUILD b/community/open-vm-tools/APKBUILD index faba3a9bcf..e0335cc5c9 100644 --- a/community/open-vm-tools/APKBUILD +++ b/community/open-vm-tools/APKBUILD @@ -73,6 +73,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/vmware/open-vm-tools/archive mock-res_ninit-and-res_nclose.patch fix-mount.vmhgfs-symlink.patch change-default-log-dir.patch + change-statechange.subr-location.patch tools.conf.patch $pkgname.initd @@ -125,17 +126,32 @@ check() { } package() { + local confdir="$pkgdir/etc/vmware-tools" + local sharedir="$pkgdir/usr/share/$pkgname" + make -C open-vm-tools install DESTDIR="$pkgdir" cd "$pkgdir" chmod -x ./etc/vmware-tools/*.conf* - mv ./etc/vmware-tools/tools.conf.example ./etc/vmware-tools/tools.conf - mv ./etc/vmware-tools/vm-support ./usr/bin/vm-support + mv "$confdir"/tools.conf.example "$confdir"/tools.conf + mv "$confdir"/vm-support ./usr/bin/vm-support + + # *-vm-default scripts are identical and they are not supposed to be + # modified by the user, so move the script to /usr/share and symlink back. + mkdir -p "$sharedir" + mv "$confdir"/statechange.subr "$sharedir"/ + cp -a ./etc/vmware-tools/poweroff-vm-default "$sharedir"/statechange.sh + local path; for path in ./etc/vmware-tools/*-vm-default; do + cmp "$path" "$sharedir"/statechange.sh \ + || die '*-vm-default scripts are not identical!' + rm $path + ln -s ../../usr/share/$pkgname/statechange.sh $path + done # This script works with NetworkManager only. # TODO: Write network script for Alpine. - rm -f ./etc/vmware-tools/scripts/vmware/network + rm -f "$confdir"/scripts/vmware/network install -D -m 755 "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname install -D -m 644 "$srcdir"/$pkgname.confd ./etc/conf.d/$pkgname @@ -256,6 +272,7 @@ c18280eb3fdfe1e3ecc5aa116369908c71917bd4dd49743a9abf78e0096e8d6c7d4323057cf506ef 8288503c54c5a15268b1590d747d4f246fa348734ebc70f3bd56f8cec6419d032ee6bf52a7579ee088f2c80f5b0d85f050e0615d6ad6cd8da016efa2a626ce17 mock-res_ninit-and-res_nclose.patch dbcec24beafbbe94c8ed12482f9d0c643a6bbec256198cdc898513410271a3e2c0b7e35b0997ee0e91b1567f4ed0ecf44740b8c972dd5b2fc4bf21643653153a fix-mount.vmhgfs-symlink.patch 87057ae614d34af2e5581f31b5e028363f316bce4e255b5199438bade96891e798160424aee5804314280773de98ed514fcac7a790bec1f1ae63f3daa1fbef9c change-default-log-dir.patch +6494fe94f332706a130dd12afa18b881f6b6c4e0523570ff866e1678e37af6bd6148c4cf7d957e12f8dc2a51b4f07aa849c4e947911bcbe20d0c81049a2b6974 change-statechange.subr-location.patch 44d4f149bdb15b364c5a11657514f432dba7d3fd35907cb58b3c47d54165f439d7775db128f8b476e9f7002d9741cb11d4cba83ce8998db003bfad761c4db710 tools.conf.patch d4d0c0c3042eef4d241c933de6f7c398a88275744b3576efc2f909acd681752f548e4ae4a17eca7db731ee0b9254b46169a48463d12a72ec6354065d788159f4 open-vm-tools.initd 820ff0ed2911c63970ee7cfad4cd9ea4a0eeee000de4e87e2d231bf8816a48af3af73ad288cca0adddf9e8fed7f36c72298fe0549fe945aded33fc186a6b31dd open-vm-tools.confd diff --git a/community/open-vm-tools/change-statechange.subr-location.patch b/community/open-vm-tools/change-statechange.subr-location.patch new file mode 100644 index 0000000000..74abb74287 --- /dev/null +++ b/community/open-vm-tools/change-statechange.subr-location.patch @@ -0,0 +1,11 @@ +--- a/open-vm-tools/scripts/common/statechange.sh ++++ b/open-vm-tools/scripts/common/statechange.sh +@@ -71,7 +71,7 @@ + export TOOLS_CONFDIR + + # Pull in subroutines like Panic. +-. "$TOOLS_CONFDIR"/statechange.subr ++. /usr/share/open-vm-tools/statechange.subr + + + # |