While some parts of Koha will require RabbitMQ, we should make rabbitmq-server a suggested dependency rather than a required dependency, since it shouldn't have to be run on the same server as Koha. In fact, the RabbitMQ website explicitly recommends not collocating RabbitMQ on the same server as other applications.
Created attachment 112012 [details] [review] Bug 26741: Remove rabbitmq-server requirements (replace with suggestions)
Created attachment 112083 [details] [review] Bug 26741: Make rabbitmq-server a 'recommended' package to test... 1/ apply patch, build new package 2/ install package with 'apt install koha-common', observe rabbitmq-server package is installed 3/ install package with 'apt install --no-install-recommends koha-common', observe rabbitmq-server package is *not* installed
I'm trying to build on Jessie but getting the following: E: Unable to locate package libemail-stuffer-perl E: Unable to locate package libplack-middleware-logwarn-perl But Jessie is EOL iirc so I guess it's time to update the build box...
dpkg-source: warning: unknown information field 'Recommended' in input data in package's section of control info file dpkg-source: warning: unknown information field 'Recommended' in input data in package's section of control info file That should be Recommends rather than Recommended
Comment on attachment 112083 [details] [review] Bug 26741: Make rabbitmq-server a 'recommended' package Review of attachment 112083 [details] [review]: ----------------------------------------------------------------- ::: debian/koha-common.postinst @@ +261,5 @@ > +# config rmq, if rmq is installed > +if dpkg-query -W -f='${db:Status-Abbrev}' rabbitmq-server | grep -q ^.i ; then > + rabbitmq-plugins enable rabbitmq_stomp > + service rabbitmq-server restart > +fi I haven't tested this yet, but why not just do "dpkg -l rabbitmq-server"? The if/then construct will do the right thing with the exit code.
Created attachment 112091 [details] [review] Bug 26741: Change information field from Recommended to Recommends
(In reply to Mason James from comment #2) > Created attachment 112083 [details] [review] [review] > Bug 26741: Make rabbitmq-server a 'recommended' package > > to test... > > 1/ apply patch, build new package > > 2/ install package with 'apt install koha-common', observe rabbitmq-server > package is installed > > 3/ install package with 'apt install --no-install-recommends koha-common', > observe rabbitmq-server package is *not* installed My test plan 1. Apply the patch to a Koha git repo 2. Download https://gitlab.com/minusdavid/koha-deb-builder-docker and follow the instructions in the README 3. Run winpty docker run --rm -it debian:stretch 4. Copy the built koha-common*.deb package into the new empty Docker container 5. apt-get update 6. apt-get install wget gnupg 7. wget -q -O- https://debian.koha-community.org/koha/gpg.asc | apt-key add - 8. echo 'deb http://debian.koha-community.org/koha stable main' | tee /etc/apt/sources.list.d/koha.list 9. apt-get update 10. apt install ./<built koha-common*.deb package> 11. Review "The following NEW packages will be installed" and note rabbitmq-server is included 12. apt install --no-install-recommends ./<built koha-common*.deb package> 13. Review "The following NEW packages will be installed" and note rabbitmq-server is included
Note that there are a lot of recommended packages that aren't installed when using "--no-install-recommends": Recommended packages: ssl-cert default-mta | mail-transport-agent exim4 | postfix | mail-transport-agent docbook-xml iamerican | ispell-dictionary wamerican | wordlist rabbitmq-server liburi-escape-xs-perl libasync-interrupt-perl libev-perl | libevent-perl libguard-perl libcgi-fast-perl libfreezethaw-perl libclass-xsaccessor-perl libclass-c3-xs-perl libconfig-tiny-perl libdevel-argnames-perl libdate-calc-xs-perl libsql-translator-perl libmoosex-nonmoose-perl gcc libmime-tools-perl libsys-hostname-long-perl libauthen-sasl-perl libdevel-lexalias-perl libglib2.0-data xdg-user-dirs libpod-coverage-perl libtest-pod-perl ghostscript gsfonts libintl-xs-perl javascript-common libjson-xs-perl libnet-idn-encode-perl krb5-locales liblog-dispatch-perl libipc-shareable-perl libmath-random-isaac-xs-perl libev-perl libio-socket-ip-perl libio-socket-socks-perl libmojo-server-fastcgi-perl libdevel-partialdump-perl libgpm2 libgssapi-perl libio-pty-perl libtext-wrapper-perl libfcgi-perl libfcgi-procmanager-perl libmodule-refresh-perl libhijk-perl libhtml-lint-perl libtype-tiny-xs-perl tcpd libwww-form-urlencoded-xs-perl libxml-sax-expat-perl libtie-ixhash-perl libxml-xpathengine-perl | libxml-xpath-perl libterm-readkey-perl bzip2 file xz-utils xauth rename psmisc libserver-starter-perl I think that this probably will have unintended consequences, so I'm thinking it's best to fail this one for now. I think the original idea of using Suggests rather than Recommends might be the safest.
Created attachment 112972 [details] [review] Bug 26741: Remove rabbitmq-server requirements (replace with suggestions) Signed-off-by: Mason James <mtj@kohaaloha.com>
(In reply to David Cook from comment #8) > Note that there are a lot of recommended packages that aren't installed when > using "--no-install-recommends": > > I think the original idea of using Suggests rather than Recommends might be > the safest. i'm happy with this idea, so i sign-off :)
(In reply to Mason James from comment #10) > > i'm happy with this idea, so i sign-off :) Great!
When this and related bugs are pushed, we can also update koha-testing-docker to use a separate Docker container for the RabbitMQ server...
> 4. Copy the built koha-common*.deb package into the new empty Docker container Like with a volume? Also, got an error when building, reported here: https://gitlab.com/minusdavid/koha-deb-builder-docker/-/issues/1
(In reply to Victor Grousset/tuxayo from comment #13) > > 4. Copy the built koha-common*.deb package into the new empty Docker container > > Like with a volume? > Nah just with "docker cp" > Also, got an error when building, reported here: > https://gitlab.com/minusdavid/koha-deb-builder-docker/-/issues/1 Yeah, I'm fairly familiar with that error at this point. I'll comment there.
Why was the shebang changed in /debian/koha-common.postinst ? -#!/bin/sh +a!/bin/sh
13. Review "The following NEW packages will be installed" and note rabbitmq-server is included Not included right?
(In reply to Victor Grousset/tuxayo from comment #15) > Why was the shebang changed in /debian/koha-common.postinst ? > > -#!/bin/sh > +a!/bin/sh That's definitely a vim typo
(In reply to Victor Grousset/tuxayo from comment #16) > 13. Review "The following NEW packages will be installed" and note > rabbitmq-server is included > > Not included right? Hopefully... October feels a long time ago. I'd probably mark this as Failed QA. I doubt I'm going to work on it again though. Plus, I think that this is handled by a different bug now anyway...
For the record, > 11. Review "The following NEW packages will be installed" and note > rabbitmq-server is included Indeed, rabbitmq-server is listed in: - The following additional packages will be installed: - The following NEW packages will be installed: > 13. Review "The following NEW packages will be installed" and note > rabbitmq-server is included Indeed, rabbitmq-server is listed in: - The following additional packages will be installed: - The following NEW packages will be installed: (In reply to David Cook from comment #18) > (In reply to Victor Grousset/tuxayo from comment #16) > > 13. Review "The following NEW packages will be installed" and note > > rabbitmq-server is included > > > > Not included right? > > Hopefully... October feels a long time ago. I don't know, the original text matches the test plan results, so maybe I just confused you ^^ > I'd probably mark this as Failed QA. > > I doubt I'm going to work on it again though. Plus, I think that this is > handled by a different bug now anyway... Failed QA (+unassigned) is because that would better indicate that this can be eventually rescued right? Compared to in discussion. (not an expert in statuses ^^)
(In reply to Victor Grousset/tuxayo from comment #19) > Failed QA (+unassigned) is because that would better indicate that this can > be eventually rescued right? Compared to in discussion. (not an expert in > statuses ^^) You're probably right. Although I keep thinking that Mason, myself, and others talked about how we're going to stay with "requires" for the time being. I can't find that conversation now though. Plus Bug 26672 provides some alternatives for people who don't want to install rabbitmq-server on the same server, although I'm not sure how functional those are in practice..
We answer this problem with the new debian packages: koha-core vs koha-full.