Bug 458965 - ltsp-build-client, multi client archs, /var/cache/chroot conflicts
Summary: ltsp-build-client, multi client archs, /var/cache/chroot conflicts
Alias: None
Product: Fedora
Classification: Fedora
Component: ltsp
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Warren Togami
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-08-13 14:06 UTC by John Ellson
Modified: 2008-08-14 02:58 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-08-13 14:24:07 UTC
Type: ---

Attachments (Terms of Use)
patch to /etc/ltsp/kickstart/Fedora/*/ltsp-*.ks to avaoid /var/cache/chroot conflicts (4.29 KB, patch)
2008-08-13 15:41 UTC, John Ellson
no flags Details | Diff
patches to: /etc/ltsp/kickstart/Fedora/* for both issues (10.76 KB, patch)
2008-08-13 19:02 UTC, John Ellson
no flags Details | Diff
add support for --arch=i586 (967 bytes, patch)
2008-08-13 19:04 UTC, John Ellson
no flags Details | Diff
ltsp-trunk patch for the same, without i586 bits, with separate includes (4.32 KB, patch)
2008-08-13 20:31 UTC, John Ellson
no flags Details | Diff
new file: server/configs/kickstart/Fedora/common-i386.ks (65 bytes, text/plain)
2008-08-13 20:37 UTC, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/common-x86_64.ks (71 bytes, text/plain)
2008-08-13 20:38 UTC, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/common-i686.ks (65 bytes, text/plain)
2008-08-13 20:39 UTC, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/8/ltsp-x86_64.ks (702 bytes, text/plain)
2008-08-13 20:49 UTC, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/9/ltsp-x86_64.ks (591 bytes, text/plain)
2008-08-13 20:50 UTC, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/10/ltsp-x86_64.ks (827 bytes, text/plain)
2008-08-13 20:51 UTC, John Ellson
no flags Details

Description John Ellson 2008-08-13 14:06:33 UTC
Description of problem:
/usr/sbin/ltsp-build-client needs to keep separate yum /var/cache/chroot caches for each client architecture.   The rpms themselves don't clash, but the mirrorlists.txt and repomd.xml files do.

Version-Release number of selected component (if applicable):

How reproducible:
I think this is what I did

Steps to Reproduce:
2.ltsp-build-client --arch=x86_64
Actual results:
fails to rebuild the i386 architecture in step 3

Expected results:

Additional info:

Comment 1 Warren Togami 2008-08-13 14:24:07 UTC
This is a well known annoying problem.

The only workaround is to rename the repositories in the kickstart file.

repo --name=released-9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=i386
repo --name=updates-9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=i386
repo --name=temporary-9 --baseurl=http://togami.com/~k12linux-temporary/fedora/9/i386/

Perhaps 'released-9-i386'.

And we have to do it for all archs in a unique fashion.

Comment 2 John Ellson 2008-08-13 15:39:33 UTC
> Perhaps 'released-9-i386'.
> And we have to do it for all archs in a unique fashion.

That works.   Tested with i386 and x86_64.   Patch to */ltsp-*.ks attached.

Comment 3 John Ellson 2008-08-13 15:41:38 UTC
Created attachment 314217 [details]
patch to /etc/ltsp/kickstart/Fedora/*/ltsp-*.ks  to avaoid /var/cache/chroot conflicts

Comment 4 Warren Togami 2008-08-13 17:08:46 UTC
Can't use that patch yet.  We need common.ks to be reorganized so the arch-specific stuff lives in the arch specific ks files.  You can have multiple %package sections between the kickstart files, this is one hint of how to split it up.

Comment 5 John Ellson 2008-08-13 17:42:54 UTC
OK, I was thinking about the other problem, but this seemed to be a separable issue. 

Since the arch-specific ks files are arch-specific, can't the custom packages be added in there, rather than another include file?  e.g.

   9/ltsp-i386.ks -------------------------
        # Kickstart Definition for Client Chroot for i686 and generic i386
        %include ../common.ks

   9/ltsp-i586.ks -------------------------
        # Kickstart Definition for Client Chroot for i586
        %include ../common.ks

        # Kickstart Definition for Client Chroot for x86_64
        %include ../common.ks

then remove kernel and glibc from common.ks (and whatever else... openssl???)

If this sounds ok in principle, I'll prepare another patch for you.

Comment 6 John Ellson 2008-08-13 19:02:42 UTC
Created attachment 314234 [details]
patches to: /etc/ltsp/kickstart/Fedora/*  for both issues

I've tested these, including --arch=i586 getting kernel.i586 in its chroot.
(see next patch also)

Comment 7 John Ellson 2008-08-13 19:04:42 UTC
Created attachment 314235 [details]
add support for --arch=i586

Adds support for --arch=i586 as a special case, instead of degrading the normal i686 case.

Comment 8 Warren Togami 2008-08-13 19:34:15 UTC
> Adds support for --arch=i586 as a special case, instead of degrading the normal
> i686 case.

This actually doesn't help at all.  Keeping the least common denominator i586 is the best we can do for this.  Also arch output is never i586.

Regarding the other patches, please try this.

Rather than %end after the include, have %package and %end in both files independently.  I subsequently learned that you can have multiple %package sections.

Also did you checkout ltsp-trunk?  Make sure you're starting out from the freshest version.

Comment 9 John Ellson 2008-08-13 20:31:34 UTC
Created attachment 314253 [details]
ltsp-trunk patch  for the same, without i586 bits, with separate includes

Comment 10 John Ellson 2008-08-13 20:37:06 UTC
Created attachment 314256 [details]
new file: server/configs/kickstart/Fedora/common-i386.ks

Comment 11 John Ellson 2008-08-13 20:38:58 UTC
Created attachment 314258 [details]
new file: server/configs/kickstart/Fedora/common-x86_64.ks

Comment 12 John Ellson 2008-08-13 20:39:39 UTC
Created attachment 314260 [details]
new file: server/configs/kickstart/Fedora/common-i686.ks

Comment 13 John Ellson 2008-08-13 20:49:38 UTC
Created attachment 314261 [details]
new file: server/configs/kickstart/Fedora/8/ltsp-x86_64.ks

Comment 14 John Ellson 2008-08-13 20:50:19 UTC
Created attachment 314262 [details]
new file: server/configs/kickstart/Fedora/9/ltsp-x86_64.ks

Comment 15 John Ellson 2008-08-13 20:51:01 UTC
Created attachment 314263 [details]
new file: server/configs/kickstart/Fedora/10/ltsp-x86_64.ks

Comment 16 Warren Togami 2008-08-13 22:42:46 UTC
It is a bit time consuming to manually apply multiple patches.  Could you please upload your own bzr tree at a URL somewhere?  I could easily grab it then, and your name would show up on the checkin history, which is a good thing.

Comment 17 John Ellson 2008-08-13 23:40:41 UTC
I hope I did this right.  Its my first use of bzr.   I've commited my changes
in my local tree.


Comment 18 Warren Togami 2008-08-14 01:45:12 UTC
Very close to proper.  Please do the following.

1) Rename your local directory to ltsp-ellson or any other name to denote that it is your personal tree.
2) When you commit, begin the description with "Fedora: " before describing the commit.  This is because this commit is specific to Fedora.  Only checkins that are more general can commit without a prefix.

Please upload this new tree.  I can pull from it and push it with your name to the real ltsp-trunk.

Comment 19 John Ellson 2008-08-14 02:18:17 UTC

Comment 20 Warren Togami 2008-08-14 02:33:59 UTC
Named correctly, but I don't see your checkin now.
bzr commit
bzr push

Comment 21 John Ellson 2008-08-14 02:38:17 UTC
Oops, I was hoping you weren't too quick.  I just uncommitted and recommitted to fix up my email address in the log.  Please try again.

Next, I was trying to extend this to a ppc chroot, but discovered that
this isn't going to work on a i386 server because ltsp-build-client
tries to do a "setarch ppc".  I suppose this is so that %post scripts work
in the ppc rpms?

Is there some other plan for getting chroots populated on incompatible architectures?

Comment 22 Warren Togami 2008-08-14 02:58:13 UTC
You pretty much need a ppc host in order to create a ppc chroot.  But once the chroot is created we could tarball it and offer it for people to download.  Then we find out if our magic in the default dhcpd.conf for ppc actually does anything.

BTW, have you been following our project homepage and k12linux-devel-list?  That is a lot more appropriate place to discuss this development than Bugzilla.

Welcome onboard. =)

Note You need to log in before you can comment on or make changes to this bug.