openSUSE / brp-check-suse

Build root policy check scripts
GNU General Public License v2.0
5 stars 21 forks source link

Handle whitespace in symlinks correctly #12

Closed StefanBruens closed 6 years ago

StefanBruens commented 6 years ago

Fix: boo#1103927

StefanBruens commented 6 years ago

Tested with

INFO: relinking /prefix/space dir/bar/b -> ../foo/f (was /prefix/space dir/foo/f)
INFO: relinking /prefix/space dir/b b -> a a (was /prefix/space dir/a a)
INFO: relinking /prefix/space dir/b -> a (was /prefix/space dir/a)
INFO: relinking /prefix/doublespace  dir/l2 -> s2 (was /prefix/doublespace  dir/s2)
INFO: relinking /prefix/triplespace   dir/l3 -> s3 (was /prefix/triplespace   dir/s3)
  1697600      0 drwxr-xr-x   1  sbruens  users          12 Aug  7 15:41 /tmp/brp_test/
  1697657      0 drwxr-xr-x   1  sbruens  users          84 Aug  7 15:45 /tmp/brp_test/prefix
  1697658      0 drwxr-xr-x   1  sbruens  users          28 Aug  7 16:13 /tmp/brp_test/prefix/space\ dir
  1697659      0 drwxr-xr-x   1  sbruens  users           2 Aug  6 17:58 /tmp/brp_test/prefix/space\ dir/foo
  1697664      0 -rw-r--r--   1  sbruens  users           0 Aug  6 17:58 /tmp/brp_test/prefix/space\ dir/foo/f
  1697660      0 drwxr-xr-x   1  sbruens  users           2 Aug  7 16:08 /tmp/brp_test/prefix/space\ dir/bar
  1698782      4 lrwxrwxrwx   1  sbruens  users           8 Aug  7 16:08 /tmp/brp_test/prefix/space\ dir/bar/b -> ../foo/f
  1697661      0 -rw-r--r--   1  sbruens  users           0 Aug  6 17:58 /tmp/brp_test/prefix/space\ dir/a
  1698783      4 lrwxrwxrwx   1  sbruens  users           1 Aug  7 16:08 /tmp/brp_test/prefix/space\ dir/b -> a
  1698837      0 -rw-r--r--   1  sbruens  users           0 Aug  7 16:13 /tmp/brp_test/prefix/space\ dir/a\ a
  1698840      4 lrwxrwxrwx   1  sbruens  users           3 Aug  7 16:13 /tmp/brp_test/prefix/space\ dir/b\ b -> a\ a
  1698469      0 drwxr-xr-x   1  sbruens  users           8 Aug  7 16:08 /tmp/brp_test/prefix/doublespace\ \ dir
  1698470      0 -rw-r--r--   1  sbruens  users           0 Aug  7 15:43 /tmp/brp_test/prefix/doublespace\ \ dir/s2
  1698784      4 lrwxrwxrwx   1  sbruens  users           2 Aug  7 16:08 /tmp/brp_test/prefix/doublespace\ \ dir/l2 -> s2
  1698487      0 drwxr-xr-x   1  sbruens  users           8 Aug  7 16:08 /tmp/brp_test/prefix/triplespace\ \ \ dir
  1698499      0 -rw-r--r--   1  sbruens  users           0 Aug  7 15:47 /tmp/brp_test/prefix/triplespace\ \ \ dir/s3
  1698785      4 lrwxrwxrwx   1  sbruens  users           2 Aug  7 16:08 /tmp/brp_test/prefix/triplespace\ \ \ dir/l3 -> s3