View previous topic :: View next topic |
Author |
Message |
Slippery Jim Apprentice
Joined: 08 Jan 2005 Posts: 264
|
Posted: Mon Dec 17, 2012 6:58 pm Post subject: Writeable tarfs? |
|
|
I'm looking for something that will let me mount a tarball, and then read and write it like a filesystem; something like tarfs, but writeable.
Is there an ebuild of something like that? |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Mon Dec 17, 2012 11:16 pm Post subject: |
|
|
All compressed filesystems I know of won't allow writing... except BTRFS. On the other hand you can use lesspipe (I think it's enabled by default in Gentoo) to list the contents of a tarball archive, compressed or not. I sometimes find myself browsing archive contents using mc (midnight commander). Quite handy. But I don't know if it addresses your needs. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Mon Dec 17, 2012 11:22 pm Post subject: |
|
|
I'm afraid this doesn't exist, due to the way tar works.
If you're looking for a filesystem in a single file, you might want to use a loopback file, maybe in combination with SquashFS for compression. _________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
Slippery Jim Apprentice
Joined: 08 Jan 2005 Posts: 264
|
Posted: Tue Dec 18, 2012 12:25 am Post subject: |
|
|
VinzC wrote: | All compressed filesystems I know of won't allow writing... except BTRFS. |
It doesn't have to be compressed. Actually, all it needs to do is let a non-privileged user set ownership and mode information on its files, the same way you can set them in tar with the --owner=, --group=, and mode= options, when you add a file to the archive.
This all started because I'm having problems emerging binary packages (using the -B flag), as a normal user with FEATURES="fakeroot" turned on. I'm beginning to think fakeroot is really broken, and the obvious transparent workaround is to have some kind of filesystem front end on tar, mounted and populated by ebuild in the intstall phase, and then unmounted into a tarball in the package phase. |
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Tue Dec 18, 2012 11:46 am Post subject: |
|
|
I never tried it myself, but I read about AVFS. |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Tue Dec 18, 2012 2:05 pm Post subject: |
|
|
VinzC wrote: | All compressed filesystems I know of won't allow writing... except BTRFS. |
Slippery Jim wrote: | It doesn't have to be compressed. Actually, all it needs to do is let a non-privileged user set ownership and mode information on its files, the same way you can set them in tar with the --owner=, --group=, and mode= options, when you add a file to the archive.
This all started because I'm having problems emerging binary packages (using the -B flag), as a normal user with FEATURES="fakeroot" turned on. I'm beginning to think fakeroot is really broken, and the obvious transparent workaround is to have some kind of filesystem front end on tar, mounted and populated by ebuild in the intstall phase, and then unmounted into a tarball in the package phase. |
I'm not quite used to the fakeroot feature but I'd then highly recommend you filed a bug against that very problem on Gentoo Bugzilla if you haven't yet. Other than that, a loop disk image (as suggested above) will do, just like a RAMdisk. You can create one of these with qemu_img, cpio, dd, whatever... _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
Slippery Jim Apprentice
Joined: 08 Jan 2005 Posts: 264
|
Posted: Tue Dec 18, 2012 4:23 pm Post subject: |
|
|
Yeah, I opened bug#447638 yesterday.
We can't use just any filesystem though, because you need to be able to chown files to arbitrary users, including root (obviously, without actually doing it).
According to its man page, the fakeroot utility does this by overriding some file ops in glibc using the LD_PRELOAD feature, or something like that.
Whatever we end up using, it has to store ownership and mode metadata on top of the regular metadata, so that when tar adds the file to the archive, it get's the correct ownership settings, instead of the settings of the user running emerge. |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Sat Dec 22, 2012 9:42 am Post subject: |
|
|
VinzC wrote: | except BTRFS. |
LOLOLOLOLOLOL!!! |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Sat Dec 22, 2012 11:08 am Post subject: |
|
|
VinzC wrote: | except BTRFS. |
________________________0 wrote: |
LOLOLOLOLOLOL!!! | _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Sat Dec 22, 2012 4:56 pm Post subject: |
|
|
VinzC wrote: | VinzC wrote: | except BTRFS. |
________________________0 wrote: |
LOLOLOLOLOLOL!!! | |
oops I read it wrong. I understood as a subtle stab at btrfs buggy state. 'they all ALLOW except btrfs' (implying btrfs corrupts your files, which happens all the time here).
my bad. |
|
Back to top |
|
|
|