one time when file extensions matter

I needed Java JDK on a Debian system as a prerequisite for some other software and wanted to create a .deb for it.   In contrib there is a package to do this called make-jpkg.

So let’s install it and try to use it:

╭─jkl@dev ~ 
╰─$ fakeroot make-jpkg jdk-7u45-linux-x64.gz 
Creating temporary directory: /tmp/make-jpkg.pWb1sEAQde
Loading plugins: /usr/share/java-package/common.sh /usr/share/java-package/j2re.sh /usr/
share/java-package/j2sdk-doc.sh /usr/share/java-package/j2sdk.sh /usr/share/java-package
/j2se.sh /usr/share/java-package/oracle-j2re.sh /usr/share/java-package/oracle-j2sdk-doc
.sh /usr/share/java-package/oracle-j2sdk.sh

Detected Debian build architecture: amd64
Detected Debian GNU type: x86_64-linux-gnu

No matching plugin was found.
Removing temporary directory: done

Hm. Why is this failing? A quick read of the man page provided the answer:

Download a supported Java RE or SDK or API tar.gz or self-extracting archive from http://www.oracle.com/technetwork/java/javase/downloads and execute make-jpkg file with the downloaded file.

“Wait,” says I. “don’t I already have one of those?”

╭─jkl@dev ~ 
╰─$ file jdk-7u45-linux-x64.gz
jdk-7u45-linux-x64.gz: gzip compressed data, from Unix, last modified: Tue Oct 8 09:03:05 2013

I renamed the file to .tar.gz  and lo and behold:

╭─jkl@dev ~/tmp 
╰─$ fakeroot make-jpkg jdk-7u45-linux-x64.tar.gz 
Creating temporary directory: /tmp/make-jpkg.sKqSkUnRVf
Loading plugins: /usr/share/java-package/common.sh /usr/share/java-package/j2re.sh /usr/share/java-package/j2sdk-doc.sh /usr/share/java-package/j2sdk.sh /usr/share/java-package/j2se.sh /usr/share/java-package/oracle-j2re.sh /usr/share/java-package/oracle-j2sdk-doc.sh /usr/share/java-package/oracle-j2sdk.sh

Detected Debian build architecture: amd64
Detected Debian GNU type: x86_64-linux-gnu

Detected product:
 Java(TM) Development Kit (JDK)
 Standard Edition, Version 1.7.0+update45
 Oracle(TM), Inc.
Is this correct [Y/n]:

So the whole entire reason this is failing is because make-jpkg is expecting a file ending in .tar.gz. Oops!