rhel_to_json
by Pierre-Yves Chibon
Hi all,
This morning I wrote a small script that converts yum's medata into a small json
blob that can be used to check if a package is present in RHEL before creating a
branch for it in EPEL, or to restrict building the package on EPEL for certain
arch.
What is does it basically:
- For a list of RHEL version
- For a list of directories specific to that RHEL version
- Find all the primary.sqlite database
- Decompress them if needed
- For all the packages listed in the database
- get the base package (using the srpm info)
- get the epoch, version, release (does nothing w/ it atm)
- get the arch - As more arch are found the list grows
- Store of the info in a json
- Dump the json into a text file
So using this, we are quickly able to check if a package is in RHELX, for
example:
>>> import json
>>> with open('pkg_el7.json') as stream:
... data = json.load(stream)
>>> 'python-zope-interface' in data
True
>>> data['python-zope-interface']
{u'release': u'4.el7', u'epoch': u'0', u'version': u'4.0.5', u'arch': [u'ppc64',
u'x86_64']}
The script is fairly quick to run:
time python rhel_to_json.py
...
2316 packages retrieved in el6
Output File: pkg_el6.json
...
2514 packages retrieved in el7
Output File: pkg_el7.json
...
1395 packages retrieved in el5
Output File: pkg_el5.json
real 0m47.411s
user 0m16.989s
sys 0m5.888s
And its output:
du -sh pkg_*
144K pkg_el5.json
240K pkg_el6.json
252K pkg_el7.json
Hope this helps,
Pierre
9 years, 3 months
[PATCH 0/2] Adjust mkbranch for automating git branch creation
by Pierre-Yves Chibon
Hi all,
Here is a proposed set of changes to the mkbranch script.
The first patch is just replacing all tabs in the file by spaces (simple
clean-up).
The second is the more important one. It drops the use/support of the
-s/--source argument.
This argument is currently used to specify from which point to branch when
creating a branch in the repo.
We argeed that instead of pointing to a specific branch (which would require
keeping a mapping somewhere of which branch should be branched from which other
branch), we would create the new branch by pointing them to the first commit in
the repository.
That's what this commit (hopefully) does :)
Thanks,
Pierre
Pierre-Yves Chibon (2):
Replace tab with spaces
Drop the -s/--source branch argument in mkbranch
roles/distgit/files/mkbranch | 102 +++++++++++++++++++------------------------
1 file changed, 44 insertions(+), 58 deletions(-)
--
1.9.3
9 years, 3 months
#6068: [EPEL5] Un-retire json-c and lcgdm-dav
by Fedora Release Engineering
#6068: [EPEL5] Un-retire json-c and lcgdm-dav
----------------------+------------------------
Reporter: aalvarez | Owner: rel-eng@…
Type: task | Status: new
Milestone: | Component: epel
Keywords: | Blocked By:
Blocking: |
----------------------+------------------------
Hello,
I would like to take over the epel5 branch of json-c, which have been
removed recently.
The package is active in the other branches (el6, rawhide, ...), so I
don't think a new review is required?
I have contacted the current admin for this package. He agrees on me
taking over, but couldn't add me himself.
Also, I would like to recover the epel5 branch of lcgdm-dav, which was
retires as a consequence of the retirement of json-c. This project is
active in all other branches as well.
Regards.
--
Ticket URL: <https://fedorahosted.org/rel-eng/ticket/6068>
Fedora Release Engineering <http://fedorahosted.org/rel-eng>
Release Engineering for the Fedora Project
9 years, 3 months