This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# minifyrpms.py - Minify given rpm list | |
# | |
# Copyright (C) 2012 - 2014 Red Hat, Inc. | |
# Red Hat Author(s): Satoru SATOH <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# repodata.py - Parse repodata/*.xml.gz in yum repositories. | |
# | |
# Copyright (C) 2012 Satoru SATOH <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Simple wrapper script for rpmbuild to build *rpm w/ minimum side effects, | |
# e.g. creating ~/rpmbuild/{RPMS,SOURCES,BUILD,...}. | |
# | |
# Author: Satoru SATOH <satoru.satoh at gmail.com> | |
# License: MIT | |
set -e | |
rpmspec= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
概要 | |
----- | |
ソースをビルドしてリリース、実際に適用 (アップデート) するまでの全体の流れ: | |
#. 一応テスト | |
#. ビルド・リリース用の Source RPM 作成 | |
#. ビルド & リリース (社内 Yum リポジトリへ) | |
#. 適用 (社内 Yum リポジトリからとってきて普通に yum update -y するだけ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [3]: import collections | |
In [4]: import anyconfig | |
In [5]: ips = anyconfig.load("/tmp/fleure-tests-ouZIjr/packages.json")["data"] | |
In [6]: ips[0] | |
Out[6]: | |
{u'arch': u'x86_64', | |
u'buildhost': u'x86-007.build.bos.redhat.com', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: import anyconfig | |
... | |
In [3]: save = lambda obj, fname, **kwargs: anyconfig.dump(obj, os.path.join("/tmp", fname), **kwargs) | |
In [4]: ipdata = anyconfig.load("/tmp/fleure-tests-ouZIjr/packages.json") | |
... | |
In [6]: %lprun -T /tmp/ips.json.lprof -f save save(ipdata, "ips.json") | |
Timer unit: 1e-06 s | |
Total time: 0.151962 s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Copyright(C) 2016 Red Hat, Inc. | |
# Author: Satoru SATOH <[email protected]> | |
# License: MIT | |
# | |
# Example: | |
# [root@rhel-7-client-1 ~]# ./yum-repo-size-info-list.sh \ | |
# > -r rhel-7-server-rpms -r rhel-7-server-optional-rpms \ | |
# > -r rhel-7-server-rh-common-rpms -r rhel-7-server-extras-rpms \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssato@x1carbon% ipython | |
Python 2.7.11 (default, Mar 31 2016, 20:46:51) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 3.2.1 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# report.py | |
# DNF Plugin to report summary of RPMs to install, update and remove. | |
# | |
# It implicitly assume the come back of --enableplugin option to dnf although | |
# it was removed as 'it's questionalbe use': | |
# http://dnf.readthedocs.io/en/latest/cli_vs_yum.html#enableplugin-not-recognized | |
# | |
# Copyright (C) 2016 Satoru SATOH <[email protected]> | |
# | |
# This copyrighted material is made available to anyone wishing to use, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssato@x1carbon% sudo dnf install nano | |
Last metadata expiration check: 0:13:55 ago on Tue Jun 7 19:51:00 2016. | |
Dependencies resolved. | |
{ | |
"install": [ | |
{ | |
"arch": "x86_64", | |
"name": "nano", | |
"release": "3.fc23", | |
"naevr": "nano.x86_64 0:2.4.2-3.fc23", |