1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-14 16:26:13 +01:00
github.com_openSUSE_osc/tests/fixtures
2024-05-30 14:53:58 +02:00
..
packages Fix creating a Package object by providing multiple files on the command line 2023-01-20 16:52:11 +01:00
archive.ar Forbid extracting files with absolute path from 'ar' archives (boo#1122683) 2024-05-30 14:53:58 +02:00
archive.cpio Forbid extracting files with absolute path from 'cpio' archives (boo#1122683) 2024-05-30 14:53:58 +02:00
README Forbid extracting files with absolute path from 'cpio' archives (boo#1122683) 2024-05-30 14:53:58 +02:00

Generate data for creating test archives
----------------------------------------

echo 'foobar' > /tmp/foo

# root perms required for the next command
echo 'numbers' > /123

echo 'qwerty' > very-long-long-long-long-name

echo 'asdfgh' > very-long-long-long-long-name2

echo 'newline' > 'very-long-name
-with-newline'

echo 'newline' > 'a
b'

mkdir 'dir'
echo 'file-in-a-dir' > dir/file


Create archive.ar
-----------------

ar qP archive.ar /tmp/foo /123 very-long-long-long-long-name very-long-long-long-long-name2 'very-long-name
-with-newline' 'a
b' dir/file


Create archive.cpio
-------------------

printf "/tmp/foo\0/123\0very-long-long-long-long-name\0very-long-long-long-long-name2\0very-long-name
-with-newline\0a\nb\0dir/file\0" | cpio -ocv0 --owner=root:root > archive.cpio