[SOLVED] Customized ZIPed MOD fails to install ("appears to be empty")

Started by Shuffle777, November 05, 2009, 05:35:26 PM

Previous topic - Next topic

Shuffle777

Quote from: abstractInstalling a downloaded ZIPed MOD works. Trying to rebuild that ZIP will have the installing fail.

Hi!

I have a problem with MODs. I want to mention I do NOT believe this to be a bug, it would much more likely be my ignorance.

My problem is simple: I download a MOD, install it, no problem there. Works just fine.
But now I want to tweak it (in that case change some default values, as the MOD provides no UI settings for them) and install that "tweaked MOD". So I unpack it on my computer, change what has to be changed, ZIP it back, and upload it to the server for install (of course I uninstalled the original MOD first), but then I get that error message :
Quote from: An Error Has Occurred!Package upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."

Although this appears to be a known issue, I can't find any help related. What is wrong? How do I fix it?

Note that the tweaked MOD WILL install properly if, as told, I extract all files in a subdir of Packages/ (so I guess I did not mess anything up) but I prefer having it in an archive (much more convenient). It tried several times, with several MODs (just to be sure). I even tried to make .tar.gz archives (in case my Linux box would make "strange" ZIPs), and pack the ZIP from the server directly. Nothing would have SMF accept it  >:( So this is obviously reproducible. For me, at least.
Also note that the tweaked MOD will NOT install if I manually copy the ZIP in the Packages/ dir and try to install it.

Just a few more details, although they might not help: ( :( ) the server runs SMF 2.0 RC1.2 over Apache 2.2.8 and PHP 5.2.4

PS: I'm not sure this topic belongs here, so please excuse me if it does not.
PS2: English is not my native language, so please also excuse any mistake ;-)

edit: Topic marked [SOLVED]

N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Shuffle777

They do.
As I said, I can have it working by extracting the files in a subdir of Packages. But I also said I would _really_ like to have it in an archive. Because it's much cleaner (I think), and also because if I want to send it to another server, I'll archive it anyway, so why bother "zip-send-unzip" when you can zip only once then just "send" every time you need?
And anyway, ZIPs are just supposed to work, so why wouldn't the ones I make? :( Would there be some kind of additional "signature" in the ones we can download from the MODS pages?

N3RVE

While this is beyond general support that should be provided, I'll still try to help.
What operating system are you running and what application are you using to build the archive? As often as not, people have found the built in win32 zip manager to work fine, personally I use 7zip and it works fine as well.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Shuffle777

Thanks for the "beyond general" support. :)

I am running Kubuntu "Jaunty" 9.04, building archives with Zip 2.32, unpacking originals and mine with UnZip 5.52

Server is running Ubuntu Server "Hardy" 8.04, can unpack fine using UnZip 5.52

Needless to say I'm not trying Windows' default ZIP manager ;) But I may check out 7zip using Wine some day. Unless you have a better idea?

Also, as you ask me what software I use, a question comes to my mind: does SMF come with its own "unzip" (deflate) implementation, or does it use one available on the host? If it's bundled, that would most likely explain my problem...


N3RVE

No, it deflates it using the zip libraries installed on the server, run phpinfo() for more information on the libraries. Perhaps, kubuntu is not generating the builds properly, or your copy of SMF cannot deflate zip archives generated with your software. If you don't mind, attach the package you're using so I can test it.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Shuffle777

I do not mind, here it is. (Just checked it again, in case it suddently works, but no :( )

(BTW, thanks to the MOD author(s) ;) )

Arantor

The principle reason seems to be that you're including a folder inside the zip, within which are all the files.

You need to make the package-info.xml be in the very top level of the archive.

Shuffle777

I tried what you said, with no luck. Then I also moved "users_online_today.xml" to the root, with no more luck. Then moving "readme.txt"... And finally all the files (leaving just "xslt" as a subdir, not moving its files). Nothing better.
Sorry.

Arantor


Shuffle777


Arantor

The last one, with all the main files in the top level, with xslt as a folder (with its regular contents)


Arantor

It's your ZIP generation system. For some reason it's making zip files that Windows Explorer can open but that SMF can't.

Might want to make it .tar.gz instead in that case.

Shuffle777

I already tried. Did not work. (I swear!)
Just tried again. Guess what? Works fine... I think I had not all the files at the top level, as you hinted me, when I first tried.

Many thanks to both of you for your time! :D

edit: I'm talking about the .tar.gz, of course... The .zip still doesn't work. Odd.

N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Arantor

Yeah, there's something funny about your app that generates .zip files - I unpacked the zip and repacked it with 7-Zip which worked fine.

Good to know it's all sorted now though :)

Shuffle777

Well... I wouldn't say "funny", unless there is also a counterpart "funny" option which allows me to create compatible ZIPs ;)

Arantor

Funny as in odd, put it that way. What people don't always realise about zip files is that there are two principle routes the zip file can encode data, some packages use the older deflate method, others use the gz_deflate method. The latter compresses better and is the only one most PHP hosts can open properly.

Shuffle777

I don't know which version of the algorithm Zip 2.32 uses, and its man page says nothing about it.

But I know for sure that is does not depend on a system library, which means it does not necessarily implement the exact same algorithm PHP uses. So you explanation is likely.

From what I gathered on the Web and the return of my phpinfo(), it seems that PHP also uses an internal implementation.

(That means 2 programs not using a shared lib... that's lousy :( Although the explanation is simply that they are both cross-platform so they just can't rely on a shared lib.)

Advertisement: