Re: Mock build problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
--- Paul Howarth <paul@xxxxxxxxxxxx> wrote:

> cranium2003 wrote:
> > hi,
> >     It seems i am following wrong tree to build
> repo.
> > i have attached my /home/source tree in text file
> can
> > u check it and then check fedora mock conf file??
> > Disabling local means what i need to do in mock
> conf
> > file??
> >     I hope u can understand attached tree file.
> 
> So far you have made a local mirror of
> fedora-core-development (i386). 
> You can use this for building packages targeted at
> FC6 (i386), You will 
> probably need a local mirror of Extras (development)
> too.
> 
> To build packages targeted at FC5, you will need
> local mirrors of FC5 
> core, FC5 updates and probably FC5 Extras too.
> 
> You will need to keep your mirrors up to date,
> particularly for development.
> 
> What is the platform you actually want to build for?
    can u help to modify fedora-mirror.py script
because last night i completed all downloading of
fedora-core development repo. but then it said no repo
found for extras. Now how to made attached
fedora-mirror script to continuosly go on downloading
from core to extras to updates automatically once i
start that script??
   Also i modified fedora-core-mock as its attached
here and under error log i got 
Executing /usr/sbin/mock-helper yum --installroot
/var/lib/mock/fedora-development-i386-core/root
groupinstall build
http://download.fedora.redhat.com/pub/fedora/linux/extras/5/i386/repodata/repomd.xml:
[Errno 4] IOError: <urlopen error (111, 'Connection
refused')>
Trying other mirror.
Cannot open/read repomd.xml file for repository:
extras
failure: repodata/repomd.xml from extras: [Errno 256]
No more mirrors to try.
Error: failure: repodata/repomd.xml from extras:
[Errno 256] No more mirrors to try.
Cleaning up...

    What i did made mock to have local core repo and
extras online repo but it failed.
    Can u give me fedora-5-i386-core.cfg that will use
local development core repo but all others from
internet??
    or how to modify mirror script??

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
#!/usr/bin/python

### License: GPL
### Author:  Rudolf Kastl

### default target: /srv/mirror
### how?: use config file and special mirror .repo files

### todo:

#### code:
### - ConfigParser
### - logging
### - legacy and updates-testing awareness
### - fix hierachy into the fedora mirror dir scheme
### - use separate configs for each release
### - progressbars
### - eta (complete, per repo, per file(?!))

#### support files/packaging/integration:
### - creation of specially crafted .repo files
### - cron integration
### - 0 conf apache serving as split package
### - mock config files as split package
### - yum localmirror config files as split package
### - discuss access rights on /srv/mirror

##################
### special cases:
### - the fedora core repos differ in logic -> core repos have updates, updates-testing, legacy -> to be investigated
### - development is another special case not having updates updates-testing and legacy
### - other repos (3rd party) never have updates and updates-testing
### - SRPMS are another special case -> same for each arch of the same release
#############################



import os

flavourlist=["core", "extras", "updates", "updates-testing", "legacy"]
#versionlist=["development", "5", "4", "3", "2" ,"1"]
versionlist=["development"]
archlist=["i386" ]
#targetlocation="/home/che/mirror"
subflavourlist=["binary"]

##### block for parsing commandline switches
from optparse import OptionParser

parser = OptionParser()
### var can be accessed with options.filename
parser.add_option("-d", "--dest", dest="destination", help="Sync Destination", metavar="dir", default="/home/source")
parser.add_option("-n", "--newonly", action="store_true", dest="newonly", help="Sync Destination", default=False)
parser.add_option("-t", "--testonly" , action="store_true", dest="testonly", help="No Sync Transaction", default=False)
parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="don't print status msgs to stdout")

(options, args) = parser.parse_args()
##### end bloc

targetlocation = options.destination

def syncMirror (version, flavour, arch, subflavour, targetlocation):
        print "syncing: Fedora " + version, flavour, arch, subflavour, "to", targetlocation

        ### handling the special cases
        if subflavour == "binary":
                subflavourid = ""
                subflavourpath = ""
        elif subflavour == "source":
                subflavourid = "-"+subflavour
                subflavourpath = "/SRPMS"
        else:
                subflavourid = "-"+subflavour
                subflavourpath = "-"+subflavour 
        
        ### devel is special
        if version == "development":
                repoid="mirror-"+flavour+"-"+version+subflavourid
        else:
                repoid="mirror-"+flavour+subflavourid
        
        if subflavour == "source":
                targetdir=targetlocation+"/fedora/"+version+"/"+flavour+subflavourpath
        else:
                targetdir=targetlocation+"/fedora/"+version+"/"+flavour+"/"+arch+subflavourpath
        
        ### handling the newonly option of reposync
        if options.newonly == True:
                newonly = " -n"
        else:
                newonly = ""
        
        ### building the command for syncing a single repo
        syncdistro="mirrorreleasever="+version+" mirrorbasearch="+arch+" /usr/bin/reposync"+newonly+" -r "+repoid+" -p "+targetdir

        ### for testing we just print instead of sync
        if options.testonly == True:
                print syncdistro
        else:
                ### create potentially missing paths
                try:
                        if os.path.isdir(targetdir) == False:
                                os.makedirs(targetdir)
                except:
                        print "Error: Cannot create targetdirectory:", targetdir

                os.system(syncdistro)

#### main loop
for version in versionlist:
        for flavour in flavourlist:
                for arch in archlist:
                        for subflavour in subflavourlist:
                                ### stuff that just doesent happen
                                if version == "development" and flavour == "updates":
                                        continue
                                if version == "development" and flavour == "legacy":
                                        continue
                                if version == "development" and flavour == "updates-testing":
                                        continue
                                else:
                                        syncMirror(version, flavour, arch, subflavour, targetlocation)

Attachment: fedora-5-i386-core.cfg
Description: 3045534007-fedora-5-i386-core.cfg

-- 
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux