make-sqldeveloper-package failed to build: chmod: missing operand after `755'

Bug #985810 reported by Patrick Seafield
114
This bug affects 24 people
Affects Status Importance Assigned to Milestone
sqldeveloper-package (Debian)
Fix Released
Unknown
sqldeveloper-package (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu precise (development branch)
Release: 12.04
sqldeveloper-package:
  Installed: 0.2.3+nmu1
  Candidate: 0.2.3+nmu1
  Version table:
 *** 0.2.3+nmu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/multiverse amd64 Packages
        100 /var/lib/dpkg/status

I downloaded the "Other OS" .zip from Oracle and tried to build the .deb, but I encountered the following problems:

 * (suggestion) the package depended on debhelper, which had to be installed separately (probably should be a dependency!)

 * when trying to build the package, I received only the error "chmod: missing operand after `755'"

I determined the problem line was this:

 # Set executable bit
 ${FIND} "${OPTDIR}" ! \( -type d -o -name "*.jar" \) |${XARGS} ${XARGS_OPTS} ${FILE} ${FILE_OPTS} |${GREP} ${GREP_OPTS} "shell script text executable " |${CUT} ${CUT_OPTS_FUNC_CLEAN} |${XARGS} ${XARGS_OPTS} ${CHMOD} ${CHMOD_OPTS}

I figured nothing was getting passed to that last "xargs chmod 755", so either cut wasn't returning anything, or grep wasn't finding anything with that description.

With my version of file (file-5.09 magic file from /etc/magic:/usr/share/misc/magic) I tried it against a .sh file and got this:

"foo.sh: POSIX shell script, ASCII text executable", which is not 'shell script text executable'

When I edited make-sqldeveloper-package on this line to just check for 'shell script' (and aside from having to install debhelper), the program ran as expected!

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: sqldeveloper-package 0.2.3+nmu1 [modified: usr/bin/make-sqldeveloper-package]
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu3
Architecture: amd64
Date: Thu Apr 19 14:21:50 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111011)
PackageArchitecture: all
ProcEnviron:
 TERM=rxvt-unicode
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: sqldeveloper-package
UpgradeStatus: Upgraded to precise on 2012-04-09 (10 days ago)

Revision history for this message
Patrick Seafield (ppseafield) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sqldeveloper-package (Ubuntu):
status: New → Confirmed
Revision history for this message
Bradford Powell (bradford-powell) wrote :

I confirm what was written above in the initial description of this bug. The attached patch just chains two separate grep commands to search first for "shell script" and then for "text executable". By doing things this way, both the old-style and new-style results from the file command will be accepted.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to grep for result string from updated file/magic" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Nicolas Rémond (nicolas-remond) wrote :

Same bug for me, the fix worked.
Thanks

Revision history for this message
dsn0wman (josgray) wrote :

Brad... I am not really very smart about these sort of things, but I'd like to know how can I test the patch you uploaded?

Revision history for this message
Joe Terry (knowself) wrote :

Josgray,

Download the diff file and apply it to the file in question "make-sqldeveloper-package" which should be loctaed in /usr/bin ...

basically replacing line 378 ...

Then I had to also ...

sudo apt-get install debhelper

Because "debhelper" is another dependency of make-sqldeveloper-package.

Cheers!
knowself

Revision history for this message
Torsten Casselt (blu2lz) wrote :

Patched make-sqldeveloper-package and installed debhelper. Works. Thank you!

Revision history for this message
Bingo Tailspin (bingotailspin) wrote :

The patch works for me.

Revision history for this message
Kioan (kioan-) wrote :

Brad's patch works fine!

Revision history for this message
Natan Volkovich (natan-volkovich) wrote :

Seems to have done the trick, thanks guys.

Revision history for this message
Bruno Medeiros (brunojcm) wrote :

Good job, patch author!

Simple way to apply:

wget https://bugs.launchpad.net/ubuntu/+source/sqldeveloper-package/+bug/985810/+attachment/3101040/+files/sqldeveloper-magic.diff
sudo patch /usr/bin/make-sqldeveloper-package < ~/sqldeveloper-magic.diff
sudo apt-get install debhelper

Revision history for this message
Sebastian Geiger (lanoxx) wrote :

Could this patch be committed to 12.04 please. I think its an easy fix and would save people a lot of time.

Revision history for this message
Dmitriy Kodanev (dkodanev) wrote :

Please commit this patch to 12.04, because that is LTS release and many people should stay with it for years. I've just installed SQL Developer and have used patch with instructions done by Bruno Medeiros (thanks Bruno!!!) So much time has gone since this bug has been reported but nothing has been done till today! Could someone tell us why?

Revision history for this message
mikaelkael (perraud-mickael) wrote :

I confirm the bug with 12.10 and the patch is also good for 12.10. Thanks Brad!

Changed in sqldeveloper-package (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sqldeveloper-package - 0.2.4

---------------
sqldeveloper-package (0.2.4) unstable; urgency=high

  * Addressed bugs for inclusion in Wheezy's freeze:
    - Replaced dos2unix with tofrodos (LP: #560803,#626272) (Closes: #568982)
      (Reported by Seth Rosenblum)
    - Split grep for shell script (LP: #985810,#998610) (Closes: #692534)
      (Reported by Bruno Medeiros and patch by Brad Powell)
    - Download links updated (Closes: #618650)
      (Reported by Sergio Fernandez)
  * Fixed JDK dependencies for pre and post SQL Developer v2
  * Updated documentation regarding above changes
  * Updated OTN license information to current version
  * Tested against v2.x and v3.x release families of SQL Developer
  * Bumped version to reflect functionality

 -- Lazarus Long <email address hidden> Wed, 14 Nov 2012 11:05:12 +0000

Changed in sqldeveloper-package (Ubuntu):
status: Confirmed → Fix Released
Changed in sqldeveloper-package (Debian):
status: New → Fix Released
Revision history for this message
Robin Dåverstam (robin-daverstam) wrote :

Please add this to 12.04 !

Revision history for this message
Bruno Medeiros (brunojcm) wrote :

Fix released where? Precise doesn't have it at all, still on 0.2.3+nmu1. Could you promote it to 12.04?
Updated way to apply:

sudo apt-get install sqldeveloper-package
wget https://bugs.launchpad.net/ubuntu/+source/sqldeveloper-package/+bug/985810/+attachment/3101040/+files/sqldeveloper-magic.diff
sudo patch /usr/bin/make-sqldeveloper-package < ./sqldeveloper-magic.diff
sudo apt-get install debhelper

After that:
make-sqldeveloper-package sqldeveloper-x.y.w.z.k-no-jre.zip

diyan (di60smail)
Changed in sqldeveloper-package (Ubuntu):
assignee: nobody → diyan (di60smail)
assignee: diyan (di60smail) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.