Uploading to hackage fails: bad file names in tarball

Since some time, I have been unable to upload packages to Hackage, via either the 'cabal upload' command, or using the web form. The error message it gives is this: ==== ✂ ==== Hackage username: AriePeterson Hackage password: Uploading dist/np-linear-0.1.1.1.tar.gz... Error: dist/np-linear-0.1.1.1.tar.gz: 400 Bad Request Error: Invalid package Invalid windows file name in tar archive: "np-linear-0.1.1.1\\src\\Aux.hs". For portability, hackage requires that file names be valid on both Unix and Windows systems, and not refer outside of the tarball. ==== ✂ ==== The tarball is created by 'cabal sdist': cabal-install version 1.18.0.2 using version 1.18.1.1 of the Cabal library. I also installed the newest cabal-install, on another machine, but this did not help (same error). I also tried to create a tarball by hand, using 'tar --format=ustar', but this again resulted in the same error message. By the way, I'm on linux, not Windows, so it is not clear how the backslashes get in the file names. What could be going on?

I'm guessing this is because windows forbids you to name files 'aux.*' [1].
Erik
[1] http://en.wikipedia.org/wiki/Filename
On Mon, Jun 16, 2014 at 10:44 AM, Arie Peterson
Since some time, I have been unable to upload packages to Hackage, via either the 'cabal upload' command, or using the web form.
The error message it gives is this:
==== ✂ ==== Hackage username: AriePeterson Hackage password: Uploading dist/np-linear-0.1.1.1.tar.gz... Error: dist/np-linear-0.1.1.1.tar.gz: 400 Bad Request Error: Invalid package
Invalid windows file name in tar archive: "np-linear-0.1.1.1\\src\\Aux.hs". For portability, hackage requires that file names be valid on both Unix and Windows systems, and not refer outside of the tarball. ==== ✂ ====
The tarball is created by 'cabal sdist': cabal-install version 1.18.0.2 using version 1.18.1.1 of the Cabal library.
I also installed the newest cabal-install, on another machine, but this did not help (same error).
I also tried to create a tarball by hand, using 'tar --format=ustar', but this again resulted in the same error message.
By the way, I'm on linux, not Windows, so it is not clear how the backslashes get in the file names.
What could be going on?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi,
Aux is a bad file name on windows systems. It is reserved for OS stuff. If
you create a file called Aux.txt, it will be damn hard to find it again.
Anything that begins with Aux.<extension> should be avoided.
In order to allow you package to be installed on other platforms, hackage
checks that it does not include any Aux.<anything> file.
Just name the file Auxiliary.hs
Ivan
On 16 June 2014 10:44, Arie Peterson
Since some time, I have been unable to upload packages to Hackage, via either the 'cabal upload' command, or using the web form.
The error message it gives is this:
==== ✂ ==== Hackage username: AriePeterson Hackage password: Uploading dist/np-linear-0.1.1.1.tar.gz... Error: dist/np-linear-0.1.1.1.tar.gz: 400 Bad Request Error: Invalid package
Invalid windows file name in tar archive: "np-linear-0.1.1.1\\src\\Aux.hs". For portability, hackage requires that file names be valid on both Unix and Windows systems, and not refer outside of the tarball. ==== ✂ ====
The tarball is created by 'cabal sdist': cabal-install version 1.18.0.2 using version 1.18.1.1 of the Cabal library.
I also installed the newest cabal-install, on another machine, but this did not help (same error).
I also tried to create a tarball by hand, using 'tar --format=ustar', but this again resulted in the same error message.
By the way, I'm on linux, not Windows, so it is not clear how the backslashes get in the file names.
What could be going on?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks Eric and Ivan! Changing the name of the Aux module indeed fixed the problem. Maybe the error message could be a bit more specific. I guess I'm the first nor the last to name a module Aux... Regards, Arie
participants (3)
-
Arie Peterson
-
Erik Hesselink
-
Ivan Perez