Explicit Directory Inclusion in .tar File Creation #597

Open
opened 2026-01-29 22:14:22 +00:00 by claunia · 3 comments
Owner

Originally created by @SuperJMN on GitHub (Oct 27, 2023).

Hello!

I'm using your library to create .tar files (as part of the creaton of a .deb package), and I've encountered an issue regarding its structure. Based on my experience and research, it appears to be important to include directories explicitly in the file list when creating a .tar file for a .deb package.

When manually unpacking the archive using tar, the program can create the necessary directories based on the structure of the file list. However, some systems or utilities, like dpkg on Debian-based systems, are stricter regarding the package structure and require directories to be explicitly listed in the file list.

The problem I faced was that the library I'm using does not support explicitly including directories in the file list, resulting in unexpected behavior when I attempted to use the generated .tar files with dpkg.

It would be greatly appreciated if your library could add support for explicitly including directories in the file list when creating .tar files. This would help ensure compatibility with tools and systems that require this structure.

If possible, you might consider an additional option in your library that allows users to specify whether they want to include directories explicitly in the file list when creating the .tar file.

Thank you for your attention to this issue and for considering this suggestion to enhance your library's functionality.

Originally created by @SuperJMN on GitHub (Oct 27, 2023). Hello! I'm using your library to create .tar files (as part of the creaton of a .deb package), and I've encountered an issue regarding its structure. Based on my experience and research, it appears to be important to include directories explicitly in the file list when creating a .tar file for a .deb package. When manually unpacking the archive using tar, the program can create the necessary directories based on the structure of the file list. However, **some systems or utilities, like dpkg on Debian-based systems, are stricter regarding the package structure and require directories to be explicitly listed in the file list.** The problem I faced was that the library I'm using does not support explicitly including directories in the file list, resulting in unexpected behavior when I attempted to use the generated .tar files with dpkg. It would be greatly appreciated if your library could add support for explicitly including directories in the file list when creating .tar files. This would help ensure compatibility with tools and systems that require this structure. If possible, you might consider an additional option in your library that allows users to specify whether they want to include directories explicitly in the file list when creating the .tar file. Thank you for your attention to this issue and for considering this suggestion to enhance your library's functionality.
claunia added the enhancementup for grabs labels 2026-01-29 22:14:22 +00:00
Author
Owner

@adamhathcock commented on GitHub (Oct 27, 2023):

A common ask. I avoided directories because I thought it was annoying!

@adamhathcock commented on GitHub (Oct 27, 2023): A common ask. I avoided directories because I thought it was annoying!
Author
Owner

@SuperJMN commented on GitHub (Oct 27, 2023):

Oh, I see. I understand your decision. It's useful for just a few user case. Unfortunately, it seems that it's mandatory for creating .deb files. My new project is exactly for that.

Is there any easy workaround to create the entries with the current code?
Thanks a lot.

@SuperJMN commented on GitHub (Oct 27, 2023): Oh, I see. I understand your decision. It's useful for just a few user case. Unfortunately, it seems that it's mandatory for creating .deb files. My [new project](https://github.com/SuperJMN/DotnetPackaging) is exactly for that. Is there any easy workaround to create the entries with the current code? Thanks a lot.
Author
Owner

@adamhathcock commented on GitHub (Oct 27, 2023):

The Tar implementation currently doesn't create directories so that would have to be added

@adamhathcock commented on GitHub (Oct 27, 2023): The Tar implementation currently doesn't create directories so that would have to be added
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#597