Debian packaging for Solr 6 [SOLR-26]
authorWayne Schneider <wayne@indexdata.com>
Thu, 4 Aug 2016 20:05:36 +0000 (15:05 -0500)
committerWayne Schneider <wayne@indexdata.com>
Thu, 4 Aug 2016 20:05:36 +0000 (15:05 -0500)
13 files changed:
README
debian/control
debian/links [deleted file]
debian/masterkey-lui-solr5.links [new file with mode: 0644]
debian/masterkey-lui-solr5.postrm [new file with mode: 0755]
debian/masterkey-lui-solr5.prerm [new file with mode: 0755]
debian/masterkey-lui-solr6.dirs [new file with mode: 0644]
debian/masterkey-lui-solr6.install [new file with mode: 0644]
debian/masterkey-lui-solr6.links [new file with mode: 0644]
debian/masterkey-lui-solr6.postinst [new file with mode: 0755]
debian/masterkey-lui-solr6.postrm [new file with mode: 0755]
debian/masterkey-lui-solr6.prerm [new file with mode: 0755]
debian/postrm [deleted file]

diff --git a/README b/README
index 7d7a9c5..e304563 100644 (file)
--- a/README
+++ b/README
@@ -22,4 +22,6 @@ $ ../git-tools/id-deb-build/id-mk-deb-changelog.sh && dpkg-buildpackage -us -uc
 And to install LUI Solr:
 $ cd ..
 $ sudo dpkg -i masterkey-lui-solr5_*.indexdata_all.deb
+  OR
+$ sudo dpkg -i masterkey-lui-solr6_*.indexdata_all.deb
 
index c3e2c51..14aa8b5 100644 (file)
@@ -8,10 +8,20 @@ Homepage: http://www.indexdata.com/masterkey
 
 Package: masterkey-lui-solr5
 Architecture: all
-Depends: openjdk-7-jdk, ${misc:Depends}
+Depends: openjdk-7-jdk | openjdk-8-jdk, ${misc:Depends}
 Conflicts: masterkey-lui-solr4-common, masterkey-lui-solr4-master, masterkey-lui-solr4-slave, masterkey-lui-solr4-zookeeper, masterkey-lui-solr4-common-tomcat6, masterkey-lui-solr4-master-tomcat6, masterkey-lui-solr4-slave-tomcat6, masterkey-lui-solr4-common-tomcat8, masterkey-lui-solr4-master-tomcat8, masterkey-lui-solr4-slave-tomcat8
 Replaces: masterkey-lui-solr4-common, masterkey-lui-solr4-master, masterkey-lui-solr4-slave, masterkey-lui-solr4-zookeeper, masterkey-lui-solr4-common-tomcat6, masterkey-lui-solr4-master-tomcat6, masterkey-lui-solr4-slave-tomcat6, masterkey-lui-solr4-common-tomcat8, masterkey-lui-solr4-master-tomcat8, masterkey-lui-solr4-slave-tomcat8
 Description: Local Unified Index (Solr)
  The Local Unified Index is a index that contains multiple logical indexes 
  (subdatabases). The underlying index is a Solr/Lucene 5 index configured 
  to use a specific LUI schema.
+
+Package: masterkey-lui-solr6
+Architecture: all
+Depends: openjdk-8-jdk, ${misc:Depends}
+Conflicts: masterkey-lui-solr4-common, masterkey-lui-solr4-master, masterkey-lui-solr4-slave, masterkey-lui-solr4-zookeeper, masterkey-lui-solr4-common-tomcat6, masterkey-lui-solr4-master-tomcat6, masterkey-lui-solr4-slave-tomcat6, masterkey-lui-solr4-common-tomcat8, masterkey-lui-solr4-master-tomcat8, masterkey-lui-solr4-slave-tomcat8, masterkey-lui-solr5
+Replaces: masterkey-lui-solr4-common, masterkey-lui-solr4-master, masterkey-lui-solr4-slave, masterkey-lui-solr4-zookeeper, masterkey-lui-solr4-common-tomcat6, masterkey-lui-solr4-master-tomcat6, masterkey-lui-solr4-slave-tomcat6, masterkey-lui-solr4-common-tomcat8, masterkey-lui-solr4-master-tomcat8, masterkey-lui-solr4-slave-tomcat8, masterkey-lui-solr5
+Description: Local Unified Index (Solr)
+ The Local Unified Index is a index that contains multiple logical indexes 
+ (subdatabases). The underlying index is a Solr/Lucene 6 index configured 
+ to use a specific LUI schema.
diff --git a/debian/links b/debian/links
deleted file mode 100644 (file)
index 1d33fc4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-etc/masterkey/lui/solr/lui-solr.in.sh etc/default/lui-solr.in.sh
\ No newline at end of file
diff --git a/debian/masterkey-lui-solr5.links b/debian/masterkey-lui-solr5.links
new file mode 100644 (file)
index 0000000..1d33fc4
--- /dev/null
@@ -0,0 +1 @@
+etc/masterkey/lui/solr/lui-solr.in.sh etc/default/lui-solr.in.sh
\ No newline at end of file
diff --git a/debian/masterkey-lui-solr5.postrm b/debian/masterkey-lui-solr5.postrm
new file mode 100755 (executable)
index 0000000..b11b87e
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+case "$1" in
+    purge|remove)
+       # Remove Solr installation
+       rm -f /usr/share/masterkey/lui/lui-solr
+       rm -rf /usr/share/masterkey/lui/solr-*
+       ;;
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+       ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+exit 0
diff --git a/debian/masterkey-lui-solr5.prerm b/debian/masterkey-lui-solr5.prerm
new file mode 100755 (executable)
index 0000000..5d3cdbf
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+case "$1" in
+    remove|upgrade|remove|deconfigure)
+        # Stop lui-solr service
+        if [ -x "/etc/init.d/lui-solr" ]; then
+           invoke-rc.d lui-solr stop || exit $?
+        fi
+
+       ;;
+    failed-upgrade)
+       ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+exit 0
diff --git a/debian/masterkey-lui-solr6.dirs b/debian/masterkey-lui-solr6.dirs
new file mode 100644 (file)
index 0000000..efa7cc4
--- /dev/null
@@ -0,0 +1,6 @@
+etc/default
+usr/share/masterkey/lui/dist
+usr/share/doc/masterkey-lui-solr6
+etc/masterkey/lui/solr
+var/log/masterkey/lui
+var/lib/masterkey/lui/solr/lui
diff --git a/debian/masterkey-lui-solr6.install b/debian/masterkey-lui-solr6.install
new file mode 100644 (file)
index 0000000..3424ccd
--- /dev/null
@@ -0,0 +1,6 @@
+dist/solr-6*.tgz usr/share/masterkey/lui/dist
+dist/install_solr6_service.sh usr/share/masterkey/lui/dist
+conf/solr/* etc/masterkey/lui/solr
+doc/apache-solr-ref-guide-6*.pdf usr/share/doc/masterkey-lui-solr6
+doc/debian-install.md usr/share/doc/masterkey-lui-solr6
+doc/upgrade.md usr/share/doc/masterkey-lui-solr6
diff --git a/debian/masterkey-lui-solr6.links b/debian/masterkey-lui-solr6.links
new file mode 100644 (file)
index 0000000..1d33fc4
--- /dev/null
@@ -0,0 +1 @@
+etc/masterkey/lui/solr/lui-solr.in.sh etc/default/lui-solr.in.sh
\ No newline at end of file
diff --git a/debian/masterkey-lui-solr6.postinst b/debian/masterkey-lui-solr6.postinst
new file mode 100755 (executable)
index 0000000..b93590c
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+case "$1" in
+    configure|upgrade)
+       # Create the solr user
+       adduser --system --shell /bin/bash --group --disabled-password --home /var/lib/masterkey/lui lui-solr
+       # Set directory permissions
+       chown -R lui-solr /var/lib/masterkey/lui
+       chown -R lui-solr /var/log/masterkey/lui
+       chown -R lui-solr /etc/masterkey/lui/solr/solr-home
+       # Run Solr installation script
+       /usr/share/masterkey/lui/dist/install_solr6_service.sh /usr/share/masterkey/lui/dist/solr-6.1.0.tgz -d /var/lib/masterkey/lui -i /usr/share/masterkey/lui -s lui-solr -u lui-solr -f
+        # Remove extra files created by Solr installation
+        rm -f /var/lib/masterkey/lui/log4j.properties
+        rm -rf /var/lib/masterkey/lui/logs
+        rm -rf /var/lib/masterkey/lui/data
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument '$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
diff --git a/debian/masterkey-lui-solr6.postrm b/debian/masterkey-lui-solr6.postrm
new file mode 100755 (executable)
index 0000000..b11b87e
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+case "$1" in
+    purge|remove)
+       # Remove Solr installation
+       rm -f /usr/share/masterkey/lui/lui-solr
+       rm -rf /usr/share/masterkey/lui/solr-*
+       ;;
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+       ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+exit 0
diff --git a/debian/masterkey-lui-solr6.prerm b/debian/masterkey-lui-solr6.prerm
new file mode 100755 (executable)
index 0000000..5d3cdbf
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+case "$1" in
+    remove|upgrade|remove|deconfigure)
+        # Stop lui-solr service
+        if [ -x "/etc/init.d/lui-solr" ]; then
+           invoke-rc.d lui-solr stop || exit $?
+        fi
+
+       ;;
+    failed-upgrade)
+       ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+exit 0
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100755 (executable)
index b11b87e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh -e
-
-case "$1" in
-    purge|remove)
-       # Remove Solr installation
-       rm -f /usr/share/masterkey/lui/lui-solr
-       rm -rf /usr/share/masterkey/lui/solr-*
-       ;;
-    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-       ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-esac
-
-exit 0