Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 2010 23:26:32 -0700
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        Anonymous <swell.k@gmail.com>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: bsdcpio(1): -L|-R options don't work?
Message-ID:  <AC6D94B5-2401-42ED-B96D-A18873671A46@FreeBSD.org>
In-Reply-To: <86fwz1bfmi.fsf@gmail.com>
References:  <86fwz1bfmi.fsf@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The -R here does look suspicious.  I'll look into that and the
test failure.

The -L handling here looks correct, though.  Remember
that -L means "follow symlinks", which means that foo/baz
should get created in the target as a directory and not as
a symlink, which is exactly what you've shown.

If you want blah/foo/baz to be a symlink, you want to omit
the -L option.

Tim

On Jul 30, 2010, at 12:20 AM, Anonymous wrote:

> Can anyone confirm?
>=20
>  $ mkdir foo
>  $ echo >foo/bar
>  $ ln -s /usr/include foo/baz
>  $ find foo -ls
>   57914        3 drwxr-xr-x    2 holo             holo                 =
   4 Jul 30 11:08 foo
>   57982        1 lrwxr-xr-x    1 holo             holo                 =
  12 Jul 30 11:08 foo/baz -> /usr/include
>   57977        2 -rw-r--r--    1 holo             holo                 =
   1 Jul 30 11:08 foo/bar
>  $ find foo | sudo cpio -pdm -L -R root:wheel blah
>  $ find blah -ls
>   58001        3 drwxr-xr-x    3 root             holo                 =
   3 Jul 30 11:09 blah
>   58002        3 drwxr-xr-x    3 holo             holo                 =
   4 Jul 30 11:08 blah/foo
>   58004        2 -rw-r--r--    1 holo             holo                 =
   1 Jul 30 11:08 blah/foo/bar
>   58003        3 drwxr-xr-x    2 root             wheel                =
   2 Jul 29 12:49 blah/foo/baz
>=20
> Some tests fail, too.
>=20
>  $ make test -C usr.bin/cpio
>  Exercising: bsdcpio 2.8.3 -- libarchive 2.7.901a
>  ...
>  13: test_option_t
>  main.c:863: Assertion failed
>     Condition: in !=3D NULL
>     Description: Couldn't open reference file =
/usr/src/usr.bin/cpio/test/test_option_tnv.stdout.uu
>  ...
>  18: test_owner_parse
>  test_owner_parse.c:124: Assertion failed: Ints not equal
>        1=3D1
>        owner_parse(":nonexistentgroup", &uid, &gid)=3D4910272
>  test_owner_parse.c:125: Assertion failed: Ints not equal
>        1=3D1
>        owner_parse(ROOT ":nonexistentgroup", &uid, &gid)=3D4910272
>  test_owner_parse.c:127: Assertion failed: Ints not equal
>        1=3D1
>        owner_parse("nonexistentuser:nonexistentgroup", &uid, =
&gid)=3D4910272
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to =
"freebsd-current-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC6D94B5-2401-42ED-B96D-A18873671A46>