[arch-commits] Commit in solr/trunk (PKGBUILD solr.service solr.tmpfiles)

David Runge dvzrv at gemini.archlinux.org
Mon Nov 8 21:50:01 UTC 2021


    Date: Monday, November 8, 2021 @ 21:50:01
  Author: dvzrv
Revision: 1039000

upgpkg: solr 8.10.1-2: Rebuild to link configurations to state dir.

Symlink /etc/solr/{solr.xml,zoo.cfg} to /var/lib/solr as it is the default home dir.
https://bugs.archlinux.org/task/69604
Symlink /usr/share/solr/bin/solr to /usr/bin/solr, because the script hardcodes location assumptions.
Adapt the systemd service to the new home location.
Set a less permissive permission for the configuration files.
Remove unneeded scripts.

Modified:
  solr/trunk/PKGBUILD
  solr/trunk/solr.service
  solr/trunk/solr.tmpfiles

---------------+
 PKGBUILD      |   29 ++++++++++++++++++++---------
 solr.service  |    2 +-
 solr.tmpfiles |    8 +++++---
 3 files changed, 26 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-08 21:48:43 UTC (rev 1038999)
+++ PKGBUILD	2021-11-08 21:50:01 UTC (rev 1039000)
@@ -2,7 +2,7 @@
 
 pkgname=solr
 pkgver=8.10.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Open source enterprise search platform built on Apache Lucene"
 arch=('any')
 url="https://lucene.apache.org/solr/"
@@ -24,14 +24,14 @@
         "${pkgname}.tmpfiles")
 sha512sums=('06c94b48277153c2be959b27c1458eb5b043ca209da0273e6ece7c068f268387edf3768a581da2abe424475c19fecb6cd53fcf1ef28440c055d9708441d35529'
             'SKIP'
-            'a34121427e9d3362e3424c8bf1f13e50dccbee4a1870bd8713a39c8bf79450462b12a98cc981af3a3522d176094b05e300468465100f27bcd44f08129f324430'
+            'd9a5dcc7a30bf449abf9028bc4aa88e196c953d82b884661ec3191d4a06ec50b106c01ecdcd225e3526ab4f4ce5634d6dcd4a03f1e128fdd4c26febb1b742532'
             '06e5e40b96d2b6668790e4b166fc2867b9e694a2c72fd57eec702526e009b8b0495acbe16a5a27e259827477f4783ce87742f1f806254d8a2baec23b0b317058'
-            '9cc97763a50c11c305b06ce07f0b2936b8fcb0b1d43f8b469fe1399850cb009fc1eba297d295a386a556e5c042e189dba1b1fc96a54aa46964ed4db8e17d40a8')
+            '0f7c9e102e2796bad8974adacbc1a155f0e88d01ee4f982f07a33f8b49d507f5087e80a414295b57712f7e256db423b59f012ed0b075e81ca2ed50aefc866851')
 b2sums=('51591b5e249a7330eaf8811fc5c55c1af8c089c3d44d704b1879851ae0848d3e006f0ae0760467d969c74dceaebc2e91fde08531f0d8b6fd79f0f8a2d7e4aba2'
         'SKIP'
-        '05f5927019eb0e622417092399ed8358184cd332ba7bf929af74e64cfb190f7e7c88c0caaac9b3fa182b063085045431bf74e7b7dd9d31f7041778fc92c923f5'
+        'f970329fad0358cb19af9b9337047612d5949af8aea2dc7acd6c8424ba494644940d22f46b98a9cf1362ea2e5d966b863907de35e7c0edc2e48f7b0ed00473b7'
         '60ff37059a4ab8362551518d56ee105e7d19199727605d5ad6f3236bd31dde1cc5fa37ffa37009820ee3115da36ae64df4754454cef1db51d1c13cac039245cb'
-        'a596a3d33e8466861fc0947d9b573812835ca5adccf20dac7c9de5ba88b206de5f0cb2e317edae239b7c47cfb0e3ef5f5c8778ee719d6b955de934e9e8267596')
+        'd90f7ff5fdf0dff74e27ac5e771817a3933051e5630c7d2ce62f20f6f50a07d5601f60b0a5dda8d7103b7daf066927404c56a8434200736b420d450f1e082ed4')
 # list of trusted signing keys: https://downloads.apache.org/lucene/KEYS
 validpgpkeys=('2085660D9C1FCCACC4A479A3BF160FF14992A24C'  # Ishan Chattopadhyaya <ishan at apache.org>
               'E58A6F4D5B2B48AC66D5E53BD4F181881A42F9E6'  # Ignacio Vera (CODE SIGNING KEY) <ivera at apache.org>
@@ -79,8 +79,15 @@
   # removing unneeded sources and build artifacts
   rm -rvf ${pkgname}/contrib/*/src
   find . -type f \( -iname "*build.xml" -o -iname "*ivy.xml" \) -delete
-  # script
-  install -vDm 755 "${pkgname}/bin/${pkgname}" -t "${pkgdir}/usr/bin"
+  # remove unneeded and OS specific scripts
+  rm -rvf "${pkgname}/bin/"{install_solr_service.sh,solr.cmd,solr.in.cmd}
+
+  # make target script executable
+  chmod 755 "${pkgname}/bin/${pkgname}"
+  # symlink script into PATH
+  install -vdm 755 "${pkgdir}/usr/bin/"
+  ln -sv "/usr/share/${pkgname}/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+
   # configuration
   install -vDm 644 "${pkgname}/bin/${pkgname}.in.sh" \
     -t "${pkgdir}/etc/${pkgname}"
@@ -91,16 +98,20 @@
   install -vDm 644 "${pkgname}/server/${pkgname}/zoo.cfg" \
     -t "${pkgdir}/etc/${pkgname}/"
   install -vdm 755 "${pkgdir}/usr/share/${pkgname}"
+
   # copy application
   cp -rvL "${pkgname}/"{bin,contrib,dist,docs,example,licenses,server} \
     "${pkgdir}/usr/share/${pkgname}"
+
   # symlink configuration into place
   ln -svf "/etc/${pkgname}/${pkgname}.in.sh" \
     "${pkgdir}/usr/share/${pkgname}/"
+
+  install -vdm 750 "${pkgdir}/var/lib/${pkgname}"
   ln -svf "/etc/${pkgname}/${pkgname}.xml" \
-    "${pkgdir}/usr/share/${pkgname}/server/${pkgname}"
+    "${pkgdir}/var/lib/${pkgname}"
   ln -svf "/etc/${pkgname}/zoo.cfg" \
-    "${pkgdir}/usr/share/${pkgname}/server/${pkgname}"
+    "${pkgdir}/var/lib/${pkgname}"
   for config in {jetty,jetty-{http,https,https8,ssl},webdefault}.xml; do
     ln -svf "/etc/${pkgname}/server/${config}" \
       "${pkgdir}/usr/share/${pkgname}/server/etc/${config}"

Modified: solr.service
===================================================================
--- solr.service	2021-11-08 21:48:43 UTC (rev 1038999)
+++ solr.service	2021-11-08 21:50:01 UTC (rev 1039000)
@@ -8,7 +8,7 @@
 Environment=SOLR_LOGS_DIR=/var/log/solr/
 User=solr
 WorkingDirectory=/var/lib/solr
-ExecStart=/usr/bin/solr start -f -d /usr/share/solr/server -s /usr/share/solr/server/solr -t /var/lib/solr
+ExecStart=/usr/bin/solr start -f -d /usr/share/solr/server -s /var/lib/solr
 PrivateTmp=true
 ProtectSystem=strict
 ProtectHome=true

Modified: solr.tmpfiles
===================================================================
--- solr.tmpfiles	2021-11-08 21:48:43 UTC (rev 1038999)
+++ solr.tmpfiles	2021-11-08 21:50:01 UTC (rev 1039000)
@@ -1,3 +1,5 @@
-d %L/solr 750 solr solr
-d %t/solr 750 solr solr
-d %S/solr 750 solr solr
+d %L/solr 750 solr solr - -
+d %t/solr 750 solr solr - -
+d %S/solr 750 solr solr - -
+z /etc/solr/solr.xml 640 root solr - -
+z /etc/solr/zoo.cfg 640 solr solr - -



More information about the arch-commits mailing list