/etc/init.d/iscsitarget broken with migration to /bin/dash

Bug #160106 reported by Alvin Cura
8
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Fix Released
Low
Alvin Cura
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Fix Released
Low
Alvin Cura

Bug Description

Binary package hint: iscsitarget

Errors are as follows:

root@xen1:/usr/src# apt-get install iscsitarget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  iscsitarget
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.6kB of archives.
After unpacking 213kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com gutsy/universe iscsitarget 0.4.15-2 [58.6kB]
Fetched 58.6kB in 1s (48.7kB/s)
Selecting previously deselected package iscsitarget.
(Reading database ... 100337 files and directories currently installed.)
Unpacking iscsitarget (from .../iscsitarget_0.4.15-2_amd64.deb) ...
Setting up iscsitarget (0.4.15-2) ...
Starting iSCSI enterprise target service: [: 142: ==: unexpected operator
failed.

-----

Workaround/Cause is pretty straightforward.

/bin/sh is a link to /bin/dash now, instead of /bin/sh. rpmstrap had a similar problem (reference bug 64032 for rpmstrap).

Workaround is simple, set to #!/bin/bash

-----

Can a MOTU check this out?

Thanks!
- alvinc

Related branches

Alvin Cura (alvinc)
Changed in gutsy-backports:
assignee: nobody → alvinc
Changed in iscsitarget:
assignee: nobody → alvinc
Revision history for this message
Alvin Cura (alvinc) wrote :

Fix attached

Revision history for this message
Emmet Hikory (persia) wrote :

Thanks for finding this issue. In general, it is preferred to modify the scripts to be compatible with dash, rather than force bash. Also, the attached patch appears to include an additional backup file created during patch creation. Please consider altering the init script to work with dash, and preparing a new debdiff. Also, fixes are first preferred for the current development release (today "hardy"), and must follow the ubuntu versioning and maintainer guidelines when presented as a debdiff. I have unsubscribed ubuntu-universe-sponsors pending the preparation of a new candidate revision. Please resubscribe when one becomes available.

Changed in iscsitarget:
importance: Undecided → Low
status: New → In Progress
Revision history for this message
John Dong (jdong) wrote :

Let's first work on fixing this in Hardy, and once the bashism fix is identified, pursue it as a SRU rather than a backport. Sound good?

Changed in gutsy-backports:
status: New → Invalid
Revision history for this message
Alvin Cura (alvinc) wrote :

Fixes are attached.

Fixes for Bug #160104 are included in the diff.

Hopefully I've become proficient enough at pbuilder and debuild that the data is in the proper format now. :)

Cheers,
- alvinc

Revision history for this message
Alvin Cura (alvinc) wrote :

Confirmed that this issue still occurs in Hardy at version 0.4.15-5.

Changed in iscsitarget:
status: In Progress → Confirmed
Revision history for this message
Alvin Cura (alvinc) wrote :

Attached is the diff with fixes for Hardy (on version 0.4.15-5, sync'd from Debian)

Revision history for this message
Emmet Hikory (persia) wrote :

Does it still break when compiled against linux 2.6.24 ? This version has been uploaded to hardy source, but is not yet widely distributed, I'd suggest waiting until hardy gets the new linux and testing again, rather than uploading to hardy (as I believe the number of arguments changed back in 2.6.23).

Revision history for this message
Alvin Cura (alvinc) wrote :

Hi Emmet!

Bug #160104 is the kernel module bug. This one is the bug that the initscript in Debian is written for /bin/bash, whereas the diff which I added includes a script which is Bourne Shell virgin, and runs under /bin/dash.

Revision history for this message
Alvin Cura (alvinc) wrote :

I think marking status as "Confirmed" may have been a mistake on my part? Have these diffs been reviewed?

Cheers,
- alvinc

Changed in iscsitarget:
status: Confirmed → In Progress
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

This bug was nominated for Gutsy but does currently not qualify for a 7.10 stable release update (SRU) and the nomination is therefore declined. According the the SRU policy, the fix should already be deployed and tested in the current development version before an update to the stable releases will be considered. With 7.10 now released, that policy applies to this bug. See: https://wiki.ubuntu.com/StableReleaseUpdates .

The bug is not being closed as work will continue on fixing it for the next release, Hardy Heron (8.04). To help improve the state of this bug see: https://wiki.ubuntu.com/Bugs/HowToTriage and https://wiki.ubuntu.com/DebuggingProcedures .

Revision history for this message
Alvin Cura (alvinc) wrote : Re: [Bug 160106] Re: /etc/init.d/iscsitarget broken with migration to /bin/dash

Thank you Henrik!

I will read the SRU process.

- alvinc

Revision history for this message
Emmet Hikory (persia) wrote :

Approved hardy & gutsy tasks. Please don't decline Gutsy tasks without first verifying the report. It confuses submitters, patchers, and developers. It is always safe to leave an untended nomination, but a rejection indicates that it is not appropriate for that release, which may not be correct (and in this case, is not).

Revision history for this message
Emmet Hikory (persia) wrote :

Thanks for the patch. To reduce the number of uploads to -updates, I suggest fixing gutsy in combination with bug #160104 (as you've done), so don't expect to see a patch for gutsy in this bug directly.

For hardy, I've unsubscribed ubuntu-univese-sponsors pending a few changes, as follows:

1) Please submit a debdiff rather than the diff.gz for the new candidate version
2) Please use a version number of 0.4.15-5ubuntu1 so that the Debian update to -6 will not collide.
3) I'd much rather see an update to initd.debian that worked with both envionments, rather than a separate initd.ubuntu and the Makefile change.
4) I'm curious why the init changes include dropping the force-reload argument (but that may be better addressed in concert with #3)
5) For your changelog, you might just want something like "remove bashisms from init file", as the changes are also valid for Debian

    Pleaes resubscribe ubuntu-universe-sponsors after attaching a debdiff of a candidate revision for hardy addressing the points above.

Revision history for this message
Chuck Short (zulcss) wrote :

Whats the status of this bug for hardy?

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

This bug was fixed in the package iscsitarget - 0.4.15-5ubuntu2

---------------
iscsitarget (0.4.15-5ubuntu2) hardy; urgency=low

  * Correct bashisms in init script (LP: #160106)
  * Set maintainer to MOTU

 -- John Dong <email address hidden> Thu, 31 Jan 2008 09:28:53 -0500

Changed in iscsitarget:
status: In Progress → Fix Released
Revision history for this message
John Dong (jdong) wrote :

I just fixed it on Hardy. For Gutsy, I've prepared a SRU debdiff for both this and #160104.

I can't guarantee whether or not it is a complete fix as I don't use iscsitarget but I pieced it together based on all the various incorrect-form patches above.

If someone would like to take this debdiff through SRU (https://wiki.ubuntu.com/StableReleaseUpdates), feel free to take over!

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Gutsy Gibbon 7.10 has reached its end of life -
http://www.ubuntu.com/news/ubuntu-7.10-eol . As a result, we are closing the
Gutsy task.

Changed in iscsitarget (Ubuntu Gutsy):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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