Support other build targets #65
Comments
Can I volunteer for this? I'd love to help setting up CI (Travis?), and I could even update the build process documentation in the meantime. |
Thanks! For now I'm setting up Travis on my own repo, I'll let you know once it's ready. I'm actually not familiar with Jenkins, but the build process should be easy to port once I get it up and running. |
Got a working version here : https://travis-ci.org/fxthomas/libresonic (see this commit). It's still weird for me that Maven can't pick up artifacts from inter-module dependencies automatically without installing, but other than that it appears to work for :
Things that need progress :
For the first 3 points it's only a matter of time, but the last two are quite annoying to setup on a CI server. |
I have decided to put this off until after 6.2, due to the Spring Boot migration. We'll revisit this around 6.3. |
For what it's worth, having the standalone JAR only would suffice, as it can be run with scripts on any platform. I have always used the JAR from Subsonic for this very reason, as it requires the least dependencies. That would be more useful/important than exe/pkg/deb/rpm. |
If we get a standalone jar for libresonic, I would gladly submit a port based on www/subsonic-standalone to the FreeBSD ports repository. |
@josh4trunks The current pre-release artifacts for 6.2 can be used standalone. Its a little counter intuitive because they are war files, but they are also standalone executables. |
@muff1nman ohh, awesome. Are the startup flags documented somewhere. Sorry, I'm being lazy asking here. |
https://github.com/Libresonic/libresonic/blob/develop/documentation/CONFIGURATION.md however that doc isnt really conclusive/complete yet. There are also the parameters to control the initial default music folder, playlist etc that would probably be helpful as a package maintainer. In addition there are some spring boot parameters that can be used as well. |
Ok, can I assume the parameters are the same as the subsonic standalone ones? Here's what we set for FreeBSD for subsonic |
Is still relevant, except its now libresonic.X
Are no longer controlled directly by libresonic, but can be done via spring boot config:
Here is the full reference on all settings for spring boot. Not all of them will apply, but definitely take a look at the |
Awesome, that should give me everything I need. I'll try to get this in the FreeBSD ports tree once 6.2 is released. |
I am not planning on working on this right now (not much time to contribute at the moment unfortunately), so feel free to pick it up! Thanks! |
Since we've forked now, I think this is a great idea. The WAR target seem difficult for non-technical users to set up, especially getting into the Tomcat setup. I'm willing to look into building a Debian package for this, though I can't guarantee any timeline at this point. This is a feature I want for myself anyways. It will probably just wrap the WAR in an archive for now, but if we go back to a native webserver it would be easily extensible to that. |
@joshuaboniface Why not ask @fxthomas his initial work and finish it ? I think if you wait the future standalone documentation you will be able to have fully working scripts and service files so you wil only need to pack all those things and Tada !! I use standalone war + systemd services + bash scripts + ansible to deploy and it work like a charm for "production use" |
I never had time to go over the whole thing and package it correctly. That being said, I've been using the following service and startup script for a few months without issues (originally from the Subsonic 5.3 package found in the AUR, slightly altered over time). Note the
Startup script : #!/bin/sh
###################################################################################
# Shell script for starting Libresonic. See http://libresonic.org.
#
# Author: Sindre Mehus
###################################################################################
LIBRESONIC_HOME=/var/lib/libresonic
LIBRESONIC_HOST=127.0.0.1
LIBRESONIC_PORT=4040
LIBRESONIC_HTTPS_PORT=0
LIBRESONIC_CONTEXT_PATH=/libresonic
LIBRESONIC_MAX_MEMORY=400
LIBRESONIC_PIDFILE=
LIBRESONIC_DEFAULT_MUSIC_FOLDER=xxxx
LIBRESONIC_DEFAULT_PODCAST_FOLDER=xxxx
LIBRESONIC_DEFAULT_PLAYLIST_FOLDER=xxxx
quiet=0
usage() {
echo "Usage: Libresonic.sh [options]"
echo " --help This small usage guide."
echo " --home=DIR The directory where Libresonic will create files."
echo " Make sure it is writable. Default: /var/Libresonic"
echo " --host=HOST The host name or IP address on which to bind Libresonic."
echo " Only relevant if you have multiple network interfaces and want"
echo " to make Libresonic available on only one of them. The default value"
echo " will bind Libresonic to all available network interfaces. Default: 0.0.0.0"
echo " --port=PORT The port on which Libresonic will listen for"
echo " incoming HTTP traffic. Default: 4040"
echo " --https-port=PORT The port on which Libresonic will listen for"
echo " incoming HTTPS traffic. Default: 0 (disabled)"
echo " --context-path=PATH The context path, i.e., the last part of the Libresonic"
echo " URL. Typically '/' or '/Libresonic'. Default '/'"
echo " --max-memory=MB The memory limit (max Java heap size) in megabytes."
echo " Default: 100"
echo " --pidfile=PIDFILE Write PID to this file. Default not created."
echo " --quiet Don't print anything to standard out. Default false."
echo " --default-music-folder=DIR Configure Libresonic to use this folder for music. This option "
echo " only has effect the first time Libresonic is started. Default '/var/music'"
echo " --default-podcast-folder=DIR Configure Libresonic to use this folder for Podcasts. This option "
echo " only has effect the first time Libresonic is started. Default '/var/music/Podcast'"
echo " --default-playlist-folder=DIR Configure Libresonic to use this folder for playlists. This option "
echo " only has effect the first time Libresonic is started. Default '/var/playlists'"
exit 1
}
# Parse arguments.
while [ $# -ge 1 ]; do
case $1 in
--help)
usage
;;
--home=?*)
LIBRESONIC_HOME=${1#--home=}
;;
--host=?*)
LIBRESONIC_HOST=${1#--host=}
;;
--port=?*)
LIBRESONIC_PORT=${1#--port=}
;;
--https-port=?*)
LIBRESONIC_HTTPS_PORT=${1#--https-port=}
;;
--context-path=?*)
LIBRESONIC_CONTEXT_PATH=${1#--context-path=}
;;
--max-memory=?*)
LIBRESONIC_MAX_MEMORY=${1#--max-memory=}
;;
--pidfile=?*)
LIBRESONIC_PIDFILE=${1#--pidfile=}
;;
--quiet)
quiet=1
;;
--default-music-folder=?*)
LIBRESONIC_DEFAULT_MUSIC_FOLDER=${1#--default-music-folder=}
;;
--default-podcast-folder=?*)
LIBRESONIC_DEFAULT_PODCAST_FOLDER=${1#--default-podcast-folder=}
;;
--default-playlist-folder=?*)
LIBRESONIC_DEFAULT_PLAYLIST_FOLDER=${1#--default-playlist-folder=}
;;
*)
usage
;;
esac
shift
done
# Use JAVA_HOME if set, otherwise assume java is in the path.
JAVA=java
if [ -e "${JAVA_HOME}" ]
then
JAVA=${JAVA_HOME}/bin/java
fi
# Create Libresonic home directory.
mkdir -p ${LIBRESONIC_HOME}
LOG=${LIBRESONIC_HOME}/libresonic_sh.log
rm -f ${LOG}
cd $(dirname $0)
if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
cd $(dirname $(readlink $0))
fi
exec ${JAVA} -Xmx${LIBRESONIC_MAX_MEMORY}m \
-Dserver.address=${LIBRESONIC_HOST} \
-Dserver.contextPath=${LIBRESONIC_CONTEXT_PATH} \
-Dserver.port=${LIBRESONIC_PORT} \
-Dlibresonic.port=${LIBRESONIC_PORT} \
-Dlibresonic.home=${LIBRESONIC_HOME} \
-Dlibresonic.defaultMusicFolder=${LIBRESONIC_DEFAULT_MUSIC_FOLDER} \
-Dlibresonic.defaultPodcastFolder=${LIBRESONIC_DEFAULT_PODCAST_FOLDER} \
-Dlibresonic.defaultPlaylistFolder=${LIBRESONIC_DEFAULT_PLAYLIST_FOLDER} \
-Djava.awt.headless=true \
-jar libresonic.war
# Additional debug flags you might want to enable :
# -verbose:gc \
# -verbose:class \
# -verbose:jni \
# -Ddebug -verbose:gc \
# -Dcom.sun.management.jmxremote.port=51422 \
# -Dcom.sun.management.jmxremote.authenticate=false
# -Dcom.sun.management.jmxremote.ssl=false \
# -agentlib:jdwp=transport=dt_socket,server=y,address=51423,suspend=n |
@jooola I'm doing the same, Ansible to deploy into Tomcat, but I know that's a more advanced configuration that most casual users would want. I'm a big fan of omnibus packages for the casual user. @fxthomas Thanks for that, it's an excellent starting point. For some reason I thought we removed the built-in webserver during the initial Libresonic work, but I guess not! |
Closing this since no maintainers proposed there support.
Please open new issue for specific package creation |
Wednesday May 11, 2016 at 00:17 GMT
Originally opened as https://github.com/Libresonic/libresonic/issues/65
Historically only the WAR target has been built, because that is what I maintain for myself. Other targets(Windows EXE, OS X PKG, Debian/Ubuntu Deb, RedHat/Fedora RPM, Standalone JAR booter) would be good to have, but there is a lot of work that is needed before they can become official:
The text was updated successfully, but these errors were encountered: