From Fedora Project Wiki

(Created page with "<pre> $ cat /etc/rpkg/fedpkg.conf [fedpkg] lookaside = http://pkgs.fedoraproject.org/repo/pkgs lookasidehash = md5 lookaside_cgi = https://pkgs.fedoraproject.org/repo/pkgs/upl...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Getting at files from koji's lookaside =
<pre>
<pre>
$ cat /etc/rpkg/fedpkg.conf
$ cat /etc/rpkg/fedpkg.conf
Line 11: Line 12:
kojiconfig = /etc/koji.conf
kojiconfig = /etc/koji.conf
build_client = koji
build_client = koji
</pre>
From /usr/lib/python2.7/site-packages/pyrpkg/__init__.py's sources() method:
            self.log.info("Downloading %s" % (file))
            url = '%s/%s/%s/%s/%s' % (self.lookaside, self.module_name,
                                      file.replace(' ', '%20'),
                                      csum, file.replace(' ', '%20'))
So e.g. the line from "sources":
    676dc96593362b7b0aa54fea0c8e744c  pygobject-3.3.4.tar.xz
Giving e.g. this link:
http://pkgs.fedoraproject.org/repo/pkgs/pygobject3/pygobject-3.3.4.tar.xz/676dc96593362b7b0aa54fea0c8e744c/pygobject-3.3.4.tar.xz
== Dave's autotest notes ==
* http://autotest.github.com/
* https://github.com/autotest/autotest-client-tests
** A hello-world style test:
*** https://github.com/autotest/autotest-client-tests/tree/master/sleeptest
** wrapping a non-trivial existing test suite:
*** https://github.com/autotest/autotest-client-tests/blob/master/connectathon/connectathon.py
* the API that these test use is:
** https://github.com/autotest/autotest/tree/master/client
* to get the client code for developing a test locally:
** lmr recommends git cloning (in rpm form: yum install autotest-framework , but, when I tried this it broke the git clone. pick one or the other)
<pre>
[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control
13:11:17 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 995, in __init__
    self._initialize_dir_properties()
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1049, in _initialize_dir_properties
    self._tmpdir = readwrite_dir(tests_out_dir, 'tmp')
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1023, in readwrite_dir
    return self._job_directory(os.path.join(*args), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable
[lmr@thinkpad-t420s autotest]$ sudo rm -rf /home/lmr/Code/autotest.git/autotest/client/tmp/
[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control
13:11:29 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 997, in __init__
    self._find_resultdir(*args, **dargs), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
</pre>
<pre>
sudo rm -rf client/tmp/
sudo rm -rf client/results
</pre>
<pre>
[david@surprise autotest]$ client/autotest client/tests/sleeptest/control
14:16:11 INFO | Writing results to /home/david/coding/autotest/client/results/default
14:16:11 INFO | Could not symlink init scripts (lack of permissions)
14:16:11 INFO | Not logging /proc/slabinfo (lack of permissions)
14:16:11 INFO | START ---- ---- timestamp=1358709371 localtime=Jan 20 14:16:11
14:16:11 INFO | START sleeptest sleeptest timestamp=1358709371 localtime=Jan 20 14:16:11
14:16:11 INFO | Not logging /proc/slabinfo (lack of permissions)
14:16:12 INFO | Not logging /proc/slabinfo (lack of permissions)
14:16:12 INFO | Not logging /var/log/messages (lack of permissions)
14:16:12 INFO | GOOD sleeptest sleeptest timestamp=1358709372 localtime=Jan 20 14:16:12 completed successfully
14:16:12 INFO | END GOOD sleeptest sleeptest timestamp=1358709372 localtime=Jan 20 14:16:12
14:16:12 INFO | END GOOD ---- ---- timestamp=1358709372 localtime=Jan 20 14:16:12
</pre>
<pre>
client/autotest client/tests/pygobject3/control --verbose
</pre>
</pre>

Latest revision as of 19:31, 20 January 2013

Getting at files from koji's lookaside

$ cat /etc/rpkg/fedpkg.conf
[fedpkg]
lookaside = http://pkgs.fedoraproject.org/repo/pkgs
lookasidehash = md5
lookaside_cgi = https://pkgs.fedoraproject.org/repo/pkgs/upload.cgi
gitbaseurl = ssh://%(user)s@pkgs.fedoraproject.org/%(module)s
anongiturl = git://pkgs.fedoraproject.org/%(module)s
tracbaseurl = https://%(user)s:%(password)s@fedorahosted.org/rel-eng/login/xmlrpc
branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$
kojiconfig = /etc/koji.conf
build_client = koji

From /usr/lib/python2.7/site-packages/pyrpkg/__init__.py's sources() method:

           self.log.info("Downloading %s" % (file))
           url = '%s/%s/%s/%s/%s' % (self.lookaside, self.module_name,
                                     file.replace(' ', '%20'),
                                     csum, file.replace(' ', '%20'))

So e.g. the line from "sources":

    676dc96593362b7b0aa54fea0c8e744c  pygobject-3.3.4.tar.xz

Giving e.g. this link: http://pkgs.fedoraproject.org/repo/pkgs/pygobject3/pygobject-3.3.4.tar.xz/676dc96593362b7b0aa54fea0c8e744c/pygobject-3.3.4.tar.xz

Dave's autotest notes

[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control 
13:11:17 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 995, in __init__
    self._initialize_dir_properties()
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1049, in _initialize_dir_properties
    self._tmpdir = readwrite_dir(tests_out_dir, 'tmp')
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 1023, in readwrite_dir
    return self._job_directory(os.path.join(*args), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/tmp/tmp exists but is not writable

[lmr@thinkpad-t420s autotest]$ sudo rm -rf /home/lmr/Code/autotest.git/autotest/client/tmp/
[lmr@thinkpad-t420s autotest]$ client/autotest client/tests/sleeptest/control 
13:11:29 CRITI| JOB ERROR (autotest bug?): Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
Traceback (most recent call last):
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 1327, in runjob
    myjob = job(control=control, drop_caches=drop_caches, options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/job.py", line 111, in __init__
    super(base_client_job, self).__init__(options=options)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 997, in __init__
    self._find_resultdir(*args, **dargs), True)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 64, in __init__
    self._ensure_valid(is_writable)
  File "/home/lmr/Code/autotest.git/autotest/client/shared/base_job.py", line 99, in _ensure_valid
    raise self.UnwritableDirectoryException(self.path)
UnwritableDirectoryException: Directory /home/lmr/Code/autotest.git/autotest/client/results/default exists but is not writable
sudo rm -rf client/tmp/
sudo rm -rf client/results
[david@surprise autotest]$ client/autotest client/tests/sleeptest/control 
14:16:11 INFO | Writing results to /home/david/coding/autotest/client/results/default
14:16:11 INFO | Could not symlink init scripts (lack of permissions)
14:16:11 INFO | Not logging /proc/slabinfo (lack of permissions)
14:16:11 INFO | START	----	----	timestamp=1358709371	localtime=Jan 20 14:16:11	
14:16:11 INFO | 	START	sleeptest	sleeptest	timestamp=1358709371	localtime=Jan 20 14:16:11	
14:16:11 INFO | Not logging /proc/slabinfo (lack of permissions)
14:16:12 INFO | Not logging /proc/slabinfo (lack of permissions)
14:16:12 INFO | Not logging /var/log/messages (lack of permissions)
14:16:12 INFO | 		GOOD	sleeptest	sleeptest	timestamp=1358709372	localtime=Jan 20 14:16:12	completed successfully
14:16:12 INFO | 	END GOOD	sleeptest	sleeptest	timestamp=1358709372	localtime=Jan 20 14:16:12	
14:16:12 INFO | END GOOD	----	----	timestamp=1358709372	localtime=Jan 20 14:16:12	
client/autotest client/tests/pygobject3/control --verbose