---
test-data/phony-guests/Makefile.am | 3 +--
test-data/phony-guests/make-archlinux-img.sh | 4 ++--
test-data/phony-guests/make-coreos-img.sh | 10 ++++----
test-data/phony-guests/make-debian-img.sh | 10 ++++----
test-data/phony-guests/make-fedora-img.pl | 34 ++++++++++++++--------------
test-data/phony-guests/make-ubuntu-img.sh | 14 ++++++------
test-data/phony-guests/make-windows-img.sh | 4 ++--
7 files changed, 39 insertions(+), 40 deletions(-)
diff --git a/test-data/phony-guests/Makefile.am b/test-data/phony-guests/Makefile.am
index 98922c7..f05aeb9 100644
--- a/test-data/phony-guests/Makefile.am
+++ b/test-data/phony-guests/Makefile.am
@@ -63,8 +63,7 @@ check_DATA = $(disk_images) guests-all-good.xml
CLEANFILES = \
$(check_DATA) \
guests-all-good.xml \
- stamp-fedora-md.img \
- *.tmp.*
+ stamp-fedora-md.img
# Make several different blank images. These are not guests, but we
# include them in the libvirt fake XML to make sure that virt-df and
diff --git a/test-data/phony-guests/make-archlinux-img.sh
b/test-data/phony-guests/make-archlinux-img.sh
index 5c848d2..066df09 100755
--- a/test-data/phony-guests/make-archlinux-img.sh
+++ b/test-data/phony-guests/make-archlinux-img.sh
@@ -23,7 +23,7 @@ set -e
# Create a disk image.
guestfish <<EOF
-sparse archlinux.img.tmp.$$ 512M
+sparse archlinux.img-t 512M
run
# Format the disk.
@@ -55,4 +55,4 @@ mkdir /boot/grub
touch /boot/grub/grub.conf
EOF
-mv archlinux.img.tmp.$$ archlinux.img
+mv archlinux.img-t archlinux.img
diff --git a/test-data/phony-guests/make-coreos-img.sh
b/test-data/phony-guests/make-coreos-img.sh
index b8e0816..1de2f25 100755
--- a/test-data/phony-guests/make-coreos-img.sh
+++ b/test-data/phony-guests/make-coreos-img.sh
@@ -22,7 +22,7 @@ export LANG=C
set -e
# lsb-release file.
-cat > release.tmp.$$ <<'EOF'
+cat > archlinux.release <<'EOF'
DISTRIB_ID=CoreOS
DISTRIB_RELEASE=647.0.0
DISTRIB_CODENAME="Red Dog"
@@ -31,7 +31,7 @@ EOF
# Create a disk image.
guestfish <<EOF
-sparse coreos.img.tmp.$$ 512M
+sparse coreos.img-t 512M
run
part-init /dev/sda gpt
@@ -73,11 +73,11 @@ mkdir /root
mkdir /home
write /etc/coreos/update.conf "GROUP=stable"
-upload release.tmp.$$ /usr/share/coreos/lsb-release
+upload archlinux.release /usr/share/coreos/lsb-release
ln-s ../usr/share/coreos/lsb-release /etc/lsb-release
write /etc/hostname "coreos.invalid"
EOF
-rm release.tmp.$$
-mv coreos.img.tmp.$$ coreos.img
+rm archlinux.release
+mv coreos.img-t coreos.img
diff --git a/test-data/phony-guests/make-debian-img.sh
b/test-data/phony-guests/make-debian-img.sh
index b52758f..637bd4b 100755
--- a/test-data/phony-guests/make-debian-img.sh
+++ b/test-data/phony-guests/make-debian-img.sh
@@ -22,7 +22,7 @@ export LANG=C
set -e
# fstab file.
-cat > fstab.tmp.$$ <<EOF
+cat > debian.fstab <<EOF
LABEL=BOOT /boot ext2 default 0 0
/dev/debian/root / ext2 default 0 0
/dev/debian/usr /usr ext2 default 1 2
@@ -32,7 +32,7 @@ EOF
# Create a disk image.
guestfish <<EOF
-sparse debian.img.tmp.$$ 512M
+sparse debian.img-t 512M
run
# Format the disk.
@@ -78,7 +78,7 @@ mkdir-p /var/lib/dpkg
mkdir /var/lib/urandom
mkdir /var/log
-upload fstab.tmp.$$ /etc/fstab
+upload debian.fstab /etc/fstab
write /etc/debian_version "5.0.1"
write /etc/hostname "debian.invalid"
@@ -92,5 +92,5 @@ mkdir /boot/grub
touch /boot/grub/grub.conf
EOF
-rm fstab.tmp.$$
-mv debian.img.tmp.$$ debian.img
+rm debian.fstab
+mv debian.img-t debian.img
diff --git a/test-data/phony-guests/make-fedora-img.pl
b/test-data/phony-guests/make-fedora-img.pl
index 520a02d..41521e7 100755
--- a/test-data/phony-guests/make-fedora-img.pl
+++ b/test-data/phony-guests/make-fedora-img.pl
@@ -49,9 +49,9 @@ foreach ('LAYOUT', 'SRCDIR') {
}
if ($ENV{LAYOUT} eq 'partitions') {
- push (@images, "fedora.img.tmp.$$");
+ push (@images, "fedora.img-t");
- open (my $fstab, '>', "fstab.tmp.$$") or die;
+ open (my $fstab, '>', "fedora.fstab") or die;
print $fstab <<EOF;
LABEL=BOOT /boot ext2 default 0 0
LABEL=ROOT / ext2 default 0 0
@@ -60,9 +60,9 @@ EOF
$bootdev = '/dev/sda1';
- $g->disk_create ("fedora.img.tmp.$$", "raw", $IMAGE_SIZE);
+ $g->disk_create ("fedora.img-t", "raw", $IMAGE_SIZE);
- $g->add_drive ("fedora.img.tmp.$$");
+ $g->add_drive ("fedora.img-t");
$g->launch ();
$g->part_init ('/dev/sda', 'mbr');
@@ -74,9 +74,9 @@ EOF
}
elsif ($ENV{LAYOUT} eq 'partitions-md') {
- push (@images, "fedora-md1.img.tmp.$$", "fedora-md2.img.tmp.$$");
+ push (@images, "fedora-md1.img-t", "fedora-md2.img-t");
- open (my $fstab, '>', "fstab.tmp.$$") or die;
+ open (my $fstab, '>', "fedora.fstab") or die;
print $fstab <<EOF;
/dev/md0 /boot ext2 default 0 0
LABEL=ROOT / ext2 default 0 0
@@ -103,7 +103,7 @@ EOF
$g->md_create ('boot', ['/dev/sda1', '/dev/sdb1']);
$g->md_create ('root', ['/dev/sda2', '/dev/sdb2']);
- open (my $mdadm, '>', "mdadm.tmp.$$") or die;
+ open (my $mdadm, '>', "fedora.mdadm") or die;
print $mdadm <<EOF;
MAILADDR root
AUTO +imsm +1.x -all
@@ -123,9 +123,9 @@ EOF
}
elsif ($ENV{LAYOUT} eq 'btrfs') {
- push (@images, "fedora-btrfs.img.tmp.$$");
+ push (@images, "fedora-btrfs.img-t");
- open (my $fstab, '>', "fstab.tmp.$$") or die;
+ open (my $fstab, '>', "fedora.fstab") or die;
print $fstab <<EOF;
LABEL=BOOT /boot ext2 default 0 0
LABEL=ROOT / btrfs subvol=root 0 0
@@ -135,9 +135,9 @@ EOF
$bootdev = '/dev/sda1';
- $g->disk_create ("fedora-btrfs.img.tmp.$$", "raw",
$IMAGE_SIZE);
+ $g->disk_create ("fedora-btrfs.img-t", "raw", $IMAGE_SIZE);
- $g->add_drive ("fedora-btrfs.img.tmp.$$");
+ $g->add_drive ("fedora-btrfs.img-t");
$g->launch ();
$g->part_init ('/dev/sda', 'mbr');
@@ -206,15 +206,15 @@ $g->chmod (0, '/etc/shadow');
$g->lsetxattr ('security.selinux',
"system_u:object_r:shadow_t:s0\0", 30,
'/etc/shadow');
-$g->upload ("fstab.tmp.$$", '/etc/fstab');
+$g->upload ("fedora.fstab", '/etc/fstab');
$g->write ('/etc/motd', "Welcome to Fedora release 14 (Phony)\n");
$g->write ('/etc/redhat-release', 'Fedora release 14 (Phony)');
$g->write ('/etc/fedora-release', 'Fedora release 14 (Phony)');
$g->write ('/etc/sysconfig/network', 'HOSTNAME=fedora.invalid');
-if (-f "mdadm.tmp.$$") {
- $g->upload ("mdadm.tmp.$$", '/etc/mdadm.conf');
- unlink ("mdadm.tmp.$$") or die;
+if (-f "fedora.mdadm") {
+ $g->upload ("fedora.mdadm", '/etc/mdadm.conf');
+ unlink ("fedora.mdadm") or die;
}
$g->upload ($ENV{SRCDIR}.'/fedora-name.db', '/var/lib/rpm/Name');
@@ -252,8 +252,8 @@ $g->mknod (0777, 10, 10, '/bin/test7');
$g->shutdown ();
$g->close ();
-unlink ("fstab.tmp.$$") or die;
+unlink ("fedora.fstab") or die;
foreach my $img (@images) {
- $img =~ /^(.*)\.tmp\.\d+$/ or die;
+ $img =~ /^(.*)-t$/ or die;
rename ($img, $1) or die;
}
diff --git a/test-data/phony-guests/make-ubuntu-img.sh
b/test-data/phony-guests/make-ubuntu-img.sh
index d546aee..a3aa610 100755
--- a/test-data/phony-guests/make-ubuntu-img.sh
+++ b/test-data/phony-guests/make-ubuntu-img.sh
@@ -22,7 +22,7 @@ export LANG=C
set -e
# fstab file.
-cat > fstab.tmp.$$ <<EOF
+cat > ubuntu.fstab <<EOF
LABEL=BOOT /boot ext2 default 0 0
/dev/sda2 / ext2 default 1 2
@@ -31,7 +31,7 @@ LABEL=BOOT /boot ext2 default 0 0
EOF
# lsb-release file.
-cat > release.tmp.$$ <<'EOF'
+cat > ubuntu.release <<'EOF'
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
@@ -40,7 +40,7 @@ EOF
# Create a disk image.
guestfish <<EOF
-sparse ubuntu.img.tmp.$$ 512M
+sparse ubuntu.img-t 512M
run
# Format the disk.
@@ -68,9 +68,9 @@ mkdir /usr
mkdir-p /var/lib/dpkg
mkdir /var/lib/urandom
-upload fstab.tmp.$$ /etc/fstab
+upload ubuntu.fstab /etc/fstab
write /etc/debian_version "5.0.1"
-upload release.tmp.$$ /etc/lsb-release
+upload ubuntu.release /etc/lsb-release
write /etc/hostname "ubuntu.invalid"
upload $SRCDIR/debian-packages /var/lib/dpkg/status
@@ -81,5 +81,5 @@ mkdir /boot/grub
touch /boot/grub/grub.conf
EOF
-rm fstab.tmp.$$ release.tmp.$$
-mv ubuntu.img.tmp.$$ ubuntu.img
+rm ubuntu.fstab ubuntu.release
+mv ubuntu.img-t ubuntu.img
diff --git a/test-data/phony-guests/make-windows-img.sh
b/test-data/phony-guests/make-windows-img.sh
index 0c2fe69..4075238 100755
--- a/test-data/phony-guests/make-windows-img.sh
+++ b/test-data/phony-guests/make-windows-img.sh
@@ -37,7 +37,7 @@ fi
# Create a disk image.
guestfish <<EOF
-sparse windows.img.tmp.$$ 512M
+sparse windows.img-t 512M
run
# Format the disk.
@@ -69,4 +69,4 @@ touch /autoexec.bat
EOF
-mv windows.img.tmp.$$ windows.img
+mv windows.img-t windows.img
--
2.5.0