RIP Subsonic, Hello Libresonic

Some while ago I posted a blog detailing how to install Subsonic on a Raspberry Pi 1. If you google for “subsonic raspberry pi” my blog shows up as a top search result (normally 3rd place, but even second is possible). In addition, each day I get more than one access from somewhere in the world to that blog. There is definitely interest in running Subsonic on a RP.

Subsonic now closed source

Since the last time some things have changed. I updated to a RP2 and Subsonic was updated up to 5.3. I won`t update to version 6 and beyond. The developer of Subsonic changed the license of 6.x and made it closed source. Not a big problem for you as an end user. You can still download and install Subsonic 6 as a binary without problems. The license change however makes it unclear what the future of Subsonic will be. Is it going to be premium only, forcing you to buy a license? Currently the premium features are of no interest to me. Although not having Ads in the UI would be nice. Either way, I do not want to change software (got used to it), and staying in 5.3 for the rest of my life isn`t an option too (yes, I DO update).

Moving to Libresonic

Good news: one person is offering his own fork of Subsonic since a while: Eugene E. Kashpureff Jr. Started originally to take away the license check feature of Subsonic, he started a new project based on Subsonic 5.3: Libresonic. Available on Github, the source code is freely available and continues to offer the functionality of Subsonic. Community already started to give feedback on this new software. The name is no surprise, considering LibreOffice, Libreelec and now Libresonic.

Installation

No surprises here. It`s the same procedure as with 5.x. Ensure you have the pre-requisites installed like maven, Java, Debian tools.

git clone https://github.com/Libresonic/libresonic.git
cd libresonic/
mvn package
mvn -P full -pl libresonic-booter -am install
mvn -P full -pl libresonic-installer-debian/ -am install
sudo dpkg -i ./libresonic-installer-debian/target/libresonic-*.deb

Configuration

The name of the project changed to Libresonic, and so did the location of the configuration files and executables. The conf file is now located at: /etc/default/libresonic. The name of the parameters changed too, while the values are the same. So copy over the values of the old Subsonic conf file.

LIBRESONIC_ARGS="--max-memory=150 --port=8080 --context-path=/libresonic"
LIBRESONIC_USER=libresonic

To start Libresonic, it`s now /etc/init.d/libresonic and the program files are at /var/libresonic. After you have done this, you can access Libresonic again via web interface.

Uninstall Subsonic

I upgraded to EugeneKay fork some time ago when it was still Subsonic without license check. Therefore, I installed it using dpkg. The package is still installed and it won`t work nicely together with Libresonic because of sharing the same configuration (port, etc.). To uninstall your officially downloaded Subsonic DEB file, just follow the same steps.

dpkg –l subsonic

To uninstall that package:

sudo dpkg –r subsonic

This removes the package, but leaves the config files (can be seen when running dpkg –l subsonic again):

To remove also the config files:

sudo dpkg –P subsonic

The directory /var/subsonic containing some files wasn`t removed, you`ll have to do this manually.

Download Oracle Java via wget

If you want or have to download Java from Oracle’s web site, you might know that you have to accept the “Oracle Binary Code License Agreement for Java SE” to activate the download link. If you have to download the binary from a computer without a browser, you get some problems: how to click on something that needs to accessed by a browser? What happens when you click on the link (technically) is that a cookie is being set. The download site checks for that cookie and when it is set, allows you to download the binary.

With knowing that, you can use wget to download Java without having to actually click on the checkbox. Just send the cookie with wget. The command for downloading Java SE 8 u51 with wget is:

Command: wget –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz

Of course, you still have to accept Oracles license agreement.

SMP 3 – Configuring Strong Encryption for JVM Security

SMP 3 is a Java application running inside Virgo. To not have to worry about Java versions and installation, the installer even installs SAP JVM together with the server. So you have a SMP 3 installation and a Java installation at hand. This means that you get automatically Java security features … and some legacy problems that come from the dark ages of Internet. One is that you have to enable Strong encryption for SMP3’s Java. This is needed at least when you are going to use SAML2 with ADFS as authentication provider. SAML 2 allows the IdP to encrypt the SAML response to make sure only the SP can decrypt it. The encryption algorithm used there is using Strong encryption methods. These are not available by default to Java. They need to be activated manually.

Procedure

The procedure for how to do this can be found at SAP Help. To enable Strong encryption, a policy file must be downloaded from Oracle and placed into a Java folder.

  1. Download policy file.

    URL: http://help.sap.com/disclaimer?site=http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

  2. Click on accept to enable the download link.

  3. Click on the link: UnlimitedJCEPolicyJDK7.zip. This will download a ZIP file. The content of the ZIP file are 2 JAR files. These 2 files must be copied to the SMP 3 Java JVM.

  4. Stop SMP 3 server.
  5. Copy the 2 JAR files to:

    Folder: <SMP3 installation dir>/sapjvm_7/jre/lib/security

  6. The installation path is outlined in the Readme that is part of the downloaded policy file:

    3) Install the unlimited strength policy JAR files.

     

    In case you later decide to revert to the original “strong” but

    limited policy versions, first make a copy of the original JCE

    policy files (US_export_policy.jar and local_policy.jar). Then

    replace the strong policy files with the unlimited strength

    versions extracted in the previous step.

     

    The standard place for JCE jurisdiction policy JAR files is:

     

    <java-home>/lib/security [Unix]

    <java-home>\lib\security [Windows]

  7. Restart SMP 3

    Command: go.bat

     

Result

After installing the pocliy file, Java JVM has strong encryption enabled.

Test

If you want to test if it worked: there is a code snippet available on SO.

Just run it as a Java program.

  • Compile: /sap/MobilePlatform3/sapjvm_7/bin/javac TestUCE.java
  • Run: /sap/MobilePlatform3/sapjvm_7/bin/java TestUCE
  • Result:

     

NWDS update site setup

NWDS 7.3/7.4 uses the update site concept of Eclipse. This makes it easier to update NWDS as an updated component only needs to be updated at the central update site. No need to distribute a whole NWDS installation package to the developers. The NWDS update site even includes a zip archive of the latest NWDS. That means that the developer does not have to download a NWDS version from SAP Market Place or nwds.sap.com.

  • Official documentation at SAP Help: link
  • Information on SCN: link

There is no separate NWDS 7.4 for NetWeaver Java 7.4. You use the 7.31 version when developing applicaitons for NW 7.4 (SAP Note). To set up an update site, first download the SCA

This SCA contains the archives, but not the tool needed to create the update site. You can download the tool from here: link. This tool is available for Windows.

The tools helps you in extracting the content of the SCA and to configure the update site URL. Afterwards, create an alias in the NW Java HTTP provider and copy the files to the directory specified by the alias.

Example

Set the alias to updatesite_731SP13. This alias points to the directory /home/cesadm/updatesite/731SP13

On the server, the folder contente looks like this:

The total size of the update size here is 2.5 GB. To access the update site via HTTP, inform the complete path to index.html:

http://host.fqdn:port/updatesite_731SP13/index.html

In NWDS, the update site is configured under the available software sites.

Thats it. Now NWDS can be updated from the update site.