Unzip fails to manage symlinked files

Bug #1230233 reported by Federico Fuga
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unzip (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

As shown in this thread: http://git.661346.n2.nabble.com/quot-git-archive-quot-seems-to-be-broken-wrt-zip-files-td6780039.html
unzip fails to manage zip archive containing symlinks. The following patch solves this issue (tested on the same environment where the bug triggers)

Os: XUbunutu 13.10

Index: unzip-6.0/process.c
===================================================================
--- unzip-6.0.orig/process.c 2013-09-25 13:33:27.000000000 +0200
+++ unzip-6.0/process.c 2013-09-25 13:36:55.120183367 +0200
@@ -1758,6 +1758,12 @@
         = (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11);
 #endif

+#ifdef SYMLINKS
+ /* Initialize the symlink flag, may be set by the platform-specific
+ mapattr function. */
+ G.pInfo->symlink = 0;
+#endif
+
     return PK_COOL;

 } /* end function process_cdir_file_hdr() */

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: unzip 6.0-8ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-30.44-generic 3.8.13.6
Uname: Linux 3.8.13.6 x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
Date: Wed Sep 25 13:46:39 2013
InstallationDate: Installed on 2013-02-05 (231 days ago)
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
MarkForUpload: True
SourcePackage: unzip
UpgradeStatus: Upgraded to raring on 2013-04-30 (147 days ago)

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

The attachment "Fixes symlink handling" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Dominik Viererbe (dviererbe) wrote :

Thank you for reporting this bug to Ubuntu.

Ubuntu 13.10 (saucy) reached end-of-life on July 17, 2014.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in.

Revision history for this message
Dominik Viererbe (dviererbe) wrote :

I could not replicate the described bug on Ubuntu 22.04 LTS (Jammy Jellyfish).

Anyone who is interested in replicating this bug, thanks to the internet archive the thread is still accessible https://web.archive.org/web/20181012223053/http://git.661346.n2.nabble.com/quot-git-archive-quot-seems-to-be-broken-wrt-zip-files-td6780039.html

So I wouldn't ever have noticed on my own, but now that I've tried
github for the kernel, somebody else reported that the downloaded zip
file (seriously? the kernel as a zip file?) is corrupt.

And it doesn't really seem to be a github issue. I can re-create it
with a simple

   git archive --format=zip HEAD -o ../kernel.zip

on my kernel repository: the end result does not unzip correctly:

   mkdir temp-directory
   cd temp-directory
   unzip kernel.zip
   ...
     inflating: virt/kvm/iommu.c
     inflating: virt/kvm/irq_comm.c
     inflating: virt/kvm/kvm_main.c
   finishing deferred symbolic links:
     arch/microblaze/boot/dts/system.dts -> ../../platform/generic/system.dts
     drivers/scsi/aic94xx/aic94xx_reg.h -> /*^J * Aic94xx SAS/SATA
driver hardware registers definitions.[ rest of the file ]
   symlink error: File name too long

iow, for some reason that "drivers/scsi/aic94xx/aic94xx_reg.h" file
seems to have been encoded as a symlink.

Anybody seen this?

                          Linus

Changed in unzip (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unzip (Ubuntu) because there has been no activity for 60 days.]

Changed in unzip (Ubuntu):
status: Incomplete → Expired
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.