Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#3823 closed defect (fixed)

Untar_ family doesn't handle nested directories

Reported by: Jonathan Brandmeyer Owned by: Sebastian Huber <sebastian.huber@…>
Priority: low Milestone: 5.1
Component: rtems Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

At least, not in some circumstances.

For example, foo/bar.txt untar's just fine, but foo/bar/baz.txt does not. If sub-directory foo/ exists first, then foo/bar/baz.txt does unpack correctly.

We only use the Untar_*() family during our initial programming workflow, so hacking around this problem wasn't too laborious for us.

Change History (7)

comment:1 Changed on 11/20/19 at 22:24:42 by Chris Johns

What happens if you add --format=ustar to your tar command ?

comment:2 Changed on 11/21/19 at 08:08:50 by Sebastian Huber <sebastian.huber@…>

In [changeset:"11455b2e6d7799297332a31a09496177ab792b27/rtems" 11455b2e/rtems]:

imfs: Fix IMFS_make_linearfile()

Fix prototype.

Fix node size. Linfiles are dynamically turned into memfiles.

Update #3823.

comment:3 Changed on 11/25/19 at 10:45:48 by Sebastian Huber <sebastian.huber@…>

In [changeset:"b6f66d9345a6deea43310e31b519dd35bdbb5908/rtems" b6f66d9/rtems]:

untar: Unify untar support

Update #3823.

comment:4 Changed on 11/25/19 at 10:45:52 by Sebastian Huber <sebastian.huber@…>

Owner: set to Sebastian Huber <sebastian.huber@…>
Resolution: fixed
Status: newclosed

In [changeset:"2de05dd58844b4ebcf9b73262e627f202bedec2d/rtems" 2de05dd/rtems]:

untar: Make path also for symbolic links

Close #3823.

comment:5 Changed on 11/25/19 at 18:45:57 by Jonathan Brandmeyer

Thanks for the fixes; I'll retest in our workflow shortly. Our team is in a "frozen for release" state at the moment, so we're somewhat behind RTEMS master right now.

Using the ustar format had no effect.

comment:6 Changed on 11/26/19 at 06:33:58 by Sebastian Huber

Resolution: fixed
Status: closedreopened

I added a test case and noticed, that the path creation is still broken.

comment:7 Changed on 11/26/19 at 07:35:06 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: reopenedclosed

In [changeset:"4551f5f0dbb4971633c8aeae3d29a7437da5316d/rtems" 4551f5f/rtems]:

untar: Properly make parent path

Close #3823.

Note: See TracTickets for help on using tickets.