Skip to contentSkip to conversation

Fix (minor) bugs in dir creation and root login

PATCH In review Dario Faggioli 2 participants 5 messages Dec 12, 2013

lore
Share & tools
lore
#0 lore raw

cover Fix (minor) bugs in dir creation and root login

Hi,

The patches in this series fixes two minor but annoting issues already discussed either here on xen-devel or on IRC.

The first is about OSSTest not creating some directory automatically, the other about it removing the root password in the host rather than in the guest (while fixing up a Debian guest install).

Thanks and Regards,
Dario

---

Dario Faggioli (2):
Use `mkdir -p' in a few more places
ts-debian-fixup: avoid removing the host root password

 ts-debian-fixup |    1 -
 ts-kernel-build |    2 +-
 ts-xen-build    |    2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
#1 lore raw

PATCH 1/2 Use `mkdir -p' in a few more places

to avoid builds to fail because of missing dirs.

---
 ts-kernel-build |    2 +-
 ts-xen-build    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
ts-kernel-build +1 -1
index 478d912..8ccd89c 100755
@@ -39,7 +39,7 @@ my $archparms = {
 };
 
 sub checkout () {
-    target_cmd($ho, "rm -rf $builddir && mkdir $builddir", 600);
+    target_cmd($ho, "rm -rf $builddir && mkdir -p $builddir", 600);
 
     build_clone($ho, 'xen', $builddir, 'xen-unstable');
 
ts-xen-build +1 -1
index 74d17f0..77dbbf4 100755
@@ -39,7 +39,7 @@ sub checkout () {
     $kerns='' unless defined $kerns;
     $kerns =~ s/,/ /g;
 
-    target_cmd($ho, "rm -rf $builddir && mkdir $builddir", 60);
+    target_cmd($ho, "rm -rf $builddir && mkdir -p $builddir", 60);
 
     build_clone($ho, 'xen', $builddir, 'xen-unstable');
#2 lore raw

PATCH 2/2 ts-debian-fixup: avoid removing the host root password

In reply to Dario Faggioli

for the following reasons:
- it's the guest's root password that was being targeted, the fact that we're killing the host's one is a bug;
- it's not needed, as a few lines below we copy the rsa keys necessary to login without any password being prompet.

This has been tested by doing a full

$ ./sg-run-job test-amd64-amd64-xl

and, after that, restarting the guest and (successfully) ssh-ing there.

---
 ts-debian-fixup |    1 -
 1 file changed, 1 deletion(-)
ts-debian-fixup +0 -1
index f001418..66c65a5 100755
@@ -55,7 +55,6 @@ sub access () {
     target_cmd_root($ho, <<END);
         set -ex
         mount /dev/$gho->{Vg}/$gho->{Lv} /mnt
-        perl -i~ -pe "s/^root:[^:]+:/root::/" /etc/shadow
         mkdir -p /mnt/root/.ssh /mnt/etc/ssh
         cp -a /root/.ssh/* /mnt/root/.ssh/.
         cp -a /etc/ssh/ssh_host_*key* /mnt/etc/ssh/.
#3 lore raw
In reply to Dario Faggioli

Dario Faggioli writes ("[OSSTest PATCH 0/2] Fix (minor) bugs in dir creation and root login"):

Quoted 7 lines

The patches in this series fixes two minor but annoting issues already discussed either here on xen-devel or on IRC.

The first is about OSSTest not creating some directory automatically, the other about it removing the root password in the host rather than in the guest (while fixing up a Debian guest install).

Thanks, these two look good. Can you give me a git branch and I'll fetch it into my tree and push it into the mill at an appropriate point ? (ATM I'm waiting to see how the switch to wheezy goes...)

Ian.

#4 lore raw
Quoted 4 lines · Ian Jackson

Dario Faggioli writes ("[OSSTest PATCH 0/2] Fix (minor) bugs in dir creation and root login"):

Quoted 3 lines

The patches in this series fixes two minor but annoting issues already discussed either here on xen-devel or on IRC.

Quoted 9 lines
Quoted 4 lines

The first is about OSSTest not creating some directory automatically, the other about it removing the root password in the host rather than in the guest (while fixing up a Debian guest install).

Thanks, these two look good. Can you give me a git branch and I'll fetch it into my tree and push it into the mill at an appropriate point ? (ATM I'm waiting to see how the switch to wheezy goes...)

Right. Here it comes:

git://xenbits.xen.org/people/dariof/osstest.git misc-fixes

Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel