Uploading to hackage fails: bad file names in tarball

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Uploading to hackage fails: bad file names in tarball

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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Erik Hesselink
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 <[hidden email]> wrote:

> 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
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Ivan Perez
In reply to this post by Arie Peterson
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 <[hidden email]> wrote:
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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Arie Peterson
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

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Niklas Larsson
In reply to this post by Arie Peterson
Hi!

For extremely ancient and cludgy reasons AUX isn't a valid filename on windows, it's a DOS device. The other similarly reserved name are CON, PRN and NUL.

Niklas

Från: [hidden email]
Skickat: ‎2014-‎06-‎16 10:45
Till: [hidden email]
Ämne: [Haskell-cafe] 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?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Magnus Therning
On Mon, Jun 16, 2014 at 11:45:05AM +0200, Niklas Larsson wrote:
> Hi!
>
> For extremely ancient and cludgy reasons AUX isn't a valid filename
> on windows, it's a DOS device. The other similarly reserved name are
> CON, PRN and NUL.

Shouldn't COMn be added to that list too? :)

/M

--
Magnus Therning                      OpenPGP: 0xAB4DFBA4
email: [hidden email]   jabber: [hidden email]
twitter: magthe               http://therning.org/magnus

In a hierarchy, every employee tends to rise to his level of incompetence.
     -- The Peter Principle

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

attachment0 (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Frerich Raabe
In reply to this post by Niklas Larsson
Hi,

There are a couple more special files, most (all?) of which are documented
at

   
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions

That page also says "Also avoid these names followed immediately by an
extension; for example, NUL.txt is not recommended." and I suspect that it
may be this recommendation based on which the error is raised. "NUL.txt" as
well as "Aux.hs" are valid file names though.

There is no file named 'AUX' though, and "Aux.hs" is a valid filename.

On 2014-06-16 11:45, Niklas Larsson wrote:

> Hi!
>
> For extremely ancient and cludgy reasons AUX isn't a valid filename on
> windows, it's a DOS device. The other similarly reserved name are CON,
> PRN and NUL.
>
> Niklas
>
> ----- Ursprungligt meddelande -----
> Från: "Arie Peterson" <[hidden email]>
> Skickat: ‎2014-‎06-‎16 10:45
> Till: "[hidden email]" <[hidden email]>
> Ämne: [Haskell-cafe] 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?
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe

--
Frerich Raabe - [hidden email]
www.froglogic.com - Multi-Platform GUI Testing
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Brandon Allbery
On Mon, Jun 16, 2014 at 7:15 AM, Frerich Raabe <[hidden email]> wrote:
There is no file named 'AUX' though, and "Aux.hs" is a valid filename.

You do know that Windows filenames are not case sensitive?

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Frerich Raabe
On 2014-06-16 15:29, Brandon Allbery wrote:
> On Mon, Jun 16, 2014 at 7:15 AM, Frerich Raabe <[hidden email]>
> wrote:
>
>> There is no file named 'AUX' though, and "Aux.hs" is a valid filename.
>
> You do know that Windows filenames are not case sensitive?

Sure, but I thought the extension distinguishes the file name. Note that
"Aux.hs" is what's given in the original error message.

However, according to Niklas Larsson, "The extension wasn't really part of
the filename in those days." so I guess I stand corrected.

--
Frerich Raabe - [hidden email]
www.froglogic.com - Multi-Platform GUI Testing
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Uploading to hackage fails: bad file names in tarball

Brandon Allbery

On Mon, Jun 16, 2014 at 9:54 AM, Frerich Raabe <[hidden email]> wrote:
However, according to Niklas Larsson, "The extension wasn't really part of the filename in those days." so I guess I stand corrected.

Yes. It's a rather ugly bit of hackishness that Microsoft actually tried to clean up in MS-DOS 2 (with AVAILDEV), but that broke too many programs so we're stuck with it now.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe