Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Build/Rpm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ sub parse {
} elsif ($keyword eq '#!createarchive') {
$createarchive = {};
$createarchive->{'dir'} = $arg if $arg =~ /^[^\.\/][^\/]*$/s;
$createarchive->{'dir'} = $arg if $arg == '.';
} elsif ($keyword eq '#!buildtarget') {
$arg = (split(' ', $arg, 2))[0];
if ($arg =~ s/(.*?)://) {
Expand Down
9 changes: 7 additions & 2 deletions build-recipe
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,12 @@ recipe_create_tar_from_dir() {
echo "Creating $t from directory $f"
if test "${t%.tar.*}" != "$f" ; then
rm -rf "${t%.tar.*}"
mv -f "$f" "${t%.tar.*}"
if test "$f" = "."; then
mkdir "${t%.tar.*}"
cp -a "$f" "${t%.tar.*}"
else
mv -f "$f" "${t%.tar.*}"
fi
fi
rm -f $BUILD_ROOT/.unpack.command
echo "#!/bin/sh -e" > $BUILD_ROOT/.unpack.command
Expand All @@ -355,7 +360,7 @@ recipe_create_tar_from_dir() {
chmod 0755 $BUILD_ROOT/.unpack.command
chroot $BUILD_ROOT su -c /.unpack.command - $BUILD_USER || cleanup_and_exit 1
rm -f $BUILD_ROOT/.unpack.command
if test "${t%.tar.*}" != "$f" ; then
if test "$f" != "." -a "${t%.tar.*}" != "$f" ; then
mv -f "${t%.tar.*}" "$f"
fi
}
Expand Down