Open ghost opened 11 years ago
It seems like most Linux flavors have their own way of packaging, and I haven't dived into how to support each and everyone. Feel free to supply a Maven script for assembling packages for your specific distro, like the one that assembles the current stand-alone zip:
https://github.com/hakko/subsonic/tree/master/subsonic-installer-standalone
hakko,
I am running Arch Linux here and I recently have been experiementing with creating a PKGBUILD (see https://wiki.archlinux.org/index.php/Pkgbuild). With a couple of changes to the subsonic.sh file you provide, I think I could have a working PKGBUILD and would be happy to post it in http://aur.archlinux.org. What do you think? Would you prefer to maintain it?
That's interesting, thanks for taking the time! What changes need to be done to the subsonic.sh script? How easy is it to automate the process (for example, to distribute a new version every time new code is committed here)? I don't feel like the best person to maintain it as I'm not running Arch Linux, so I really won't be able to answer any questions about it. If you want to post a build, I'd appreciate it. Is the work that you've done publicly available?
Currently the subsonic.sh file supplied in subsonic-installer-standalone.zip points to subsonic-main.war (line 122), which is the included war file in the zip. In order for the process to be automated, it should point to just subsonic.war. That way, it could pull the war file right from http://dilerium.se/musiccabinet/subsonic.war and you wouldn't have to change the way you update. IMO this is probably a good change anyway and might eliminate some confusion linux users might have.
You can find a copy of my PKGBUILD file here: https://www.dropbox.com/s/cyw8f05qlrfmyng/PKGBUILD Since Arch Linux now uses systemd, I've supplied a service file, which you can find here: https://www.dropbox.com/s/mamez3k340pa29q/musiccabinet.service
In Arch Linux, these PKGBUILD files are hosted at aur.archlinux.org which makes it easy to create packages that aren't officially supported by Arch. This removes the need to have separate repository like Ubuntu's PPAs. By uploading it to the AUR, it would be publicly accessibly by any Arch Linux user. I'd be happy to upload it and maintain the package if you can make that change to the subsonic.sh script.
Going forward, the only thing I would need to change for every update would be the md5sum for subsonic.war in the PKGBUILD.
Let me know what you think. I'm happy to clarify any point that is unclear.
I'm sorry that my responses lag so much.
Ideally, I'd like to use the name subsonic-main.war everywhere (that's the name used by the maven build tool), but for unknown reasons, Sindre has historically renamed it to subsonic.war and that's the named that's used in the Windows installer.
If the line source=(...) in the PKGBUILD didn't refer to subsonic.war at all, would that mean that the whole zip file would be downloaded and unzipped on an update? The .war file is 24 MB and the zip file is around 30 MB, so I guess that wouldn't make a very big difference? Maybe I should just stop supplying the subsonic.war file completely, it's not much point having it up on it's own.
Sorry again for not keeping up on this.
No worries, it's not really urgent, just thought I would help where I could.
On second thought, maybe what I could do is provide my own subsonic.sh file just the same as the musiccabinet.service file. It could then point to subsonic.war and it wouldn't change your build tool.
You are correct, every time the package is updated, the entire zip would be redownloaded. I didn't consider bandwidth issues so maybe a different solution would help here. I could just pull all of the files out of the zip and provide them alongside the service file and subsonic.sh. The only file that would be downloaded is the .war file. This might be the best solution; subsonic.sh would point to 'subsonic.war,' you could continue updating the way you have been (supplying a new .war file) and it would remove bandwidth concerns.
Another solution, which may help future compatibility with other linux distribution, is to host a linux.tar.gz file that has the corrected subsonic.sh file and all the other files in the zip without subsonic.war. Then download the .war file separately. Would this require extra steps for Maven? I'm still unclear how that works so let me know if this isn't an option.
I had a look around and I think it would make most sense to go back to using the file names "subsonic.war" and "subsonic-booter-jar-with-dependencies.jar" (however ugly that name is). Anything is possible using Maven, but the way it works is that it makes certain things easy and certain things hard, to force everyone to do things the same, easy way. The "convention over configuration" as they call it.
Yesterday I spent fifteen hours at work on a project with a tight deadline so I can't tell when I'll do the changes. Boring programming tasks are not top priority for spending spare time right now :) Maybe Sun afternoon if I find some time.
Cheers
Sounds like a good idea. Thanks for looking into this. I'll watch for you comment here.
I fully understand if you've forgotten about this after waiting a month, but I've finally escaped from my office and made the small changes needed to have the files in the stand-alone zip called subsonic.war and subsonic-booter-jar-with-dependencies.jar.
Basically, this: https://github.com/hakko/subsonic/commit/f08b3a04140ace9a77f10c5968025aa33295f044
I built an example outfile file and it's available here: http://dilerium.se/musiccabinet/example/subsonic-installer-standalone.zip. I'll start using this from now on.
Thanks for your patience.
It would be great to have packages for musiccabinet, like a ubuntu ppa.