GithubHelp home page GithubHelp logo

rpm-gitoverlay's Introduction

rpm-gitoverlay

Manage an overlay repository of RPMs from upstream git.

Running unit tests

$ python3 -m unittest discover tests/

Installation

Fedora

$ sudo dnf copr enable rpmsoftwaremanagement/rpm-gitoverlay
$ sudo dnf install rpm-gitoverlay

Usage

  1. Create overlay.yml file (see reference below)
  2. Build: Every option is self-discoverable, just run rpm-gitoverlay --help

overlay.yml refenrece

Top-level parameters:

Parameter Required Type Comments
aliases no list List of aliases, same as url.<base>.insteadOf in git
chroot yes str Chroot name (will be used for building RPMs
components yes list List of component and settings to build in overlay

aliases structure:

Parameter Required Type Comments
name yes str Prefix
url yes str URL

components structure:

Parameter Required Type Comments
name yes str Name of component (e.g. libsolv)
git no dict Settings for upstream git repository
distgit no dict Settings for distro/RPM specific git repository

You must set one or both from git/distgit.

  • If you set only git: it will use <name>.spec from top directory of git repo and make archive from git repo
  • If you set only distgit: it will rebuild component from distgit
  • If you set both git and distgit: it will use <name>.spec from distgit and make archive from git repo

git structure:

Parameter Required Type Comments
src yes str URL to git repo (can use aliases set above)
freeze no str Commit to freeze repo on
branch no str Branch to freeze repo on
latest-tag no bool Find latest tag from used branch and use it
spec-path no str Path to spec file (relative from top-dir)
  1. freeze or branch can be used at the same time
  2. freeze or latest-tag can be used at the same time

In case latest-tag is True and there are no git tags in used branch - exception will be raised.

distgit structure:

Parameter Required Type Comments
patches no str What to do with patches: keep (default), drop
type no str What type of distgit it is?: auto (default), dist-git, git-lfs, git

Plus all parameters from git structure except latest-tag and spec-path.

overlay.yml example

---
aliases:
  - name: github
    url: https://github.com/
  - name: fedorapkgs
    url: git://pkgs.fedoraproject.org/rpms/

chroot: fedora-24-x86_64

components:
  - name: libsolv
    git:
      src: github:openSUSE/libsolv.git
    distgit:
      src: fedorapkgs:libsolv.git

  - name: libhif
    git:
      src: github:rpm-software-management/libhif.git

rpm-gitoverlay's People

Contributors

gotmax23 avatar ignatenkobrain avatar kontura avatar m-blaha avatar stcarolas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpm-gitoverlay's Issues

traceback when building SRPM with non-english locale

[temp@stepan dnf]$ rpm-gitoverlay --log=DEBUG build-package -n dnf rpm rpmbuild
2016-07-18 14:49:28,121:DEBUG: Version in upstream spec file: '2.0.0'
2016-07-18 14:49:28,122:DEBUG: Setting version from upstream spec file
2016-07-18 14:49:28,122:DEBUG: Preparing archive '/tmp/rgo7he6oq2u-build/dnf/dnf-2.0.0-0.168g003dced.tar.xz'
2016-07-18 14:49:29,654:DEBUG: Zapsáno: /tmp/rgo7he6oq2u-build/dnf/dnf-2.0.0-0.168g003dced.fc24.src.rpm

Traceback (most recent call last):
  File "/usr/bin/rpm-gitoverlay", line 9, in <module>
    load_entry_point('rpm-gitoverlay==0', 'console_scripts', 'rpm-gitoverlay')()
  File "/usr/lib/python3.5/site-packages/rgo/__main__.py", line 137, in main
    _srpm = component.make_srpm(tmp_c)
  File "/usr/lib/python3.5/site-packages/rgo/component.py", line 144, in make_srpm
    srpm = re.match(r"^Wrote: (.+\.(?:no)?src\.rpm)$", result.stdout).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

run builds in parallel

usually we can build multiple things at the same time, so it should reduce building time

always use built packages in chain

Currently if we are building package in chain with version lower than in Fedora (it shouldn't be often, but it happens) it is not getting pulled into buildroot, so we are actually building wrong packages.

use --always for git describe

it will return shortcommit as a fallback, so in that case just set version to 0 and release should be set to 0.NUMgCOMMIT" whereNUM` is a number of commits since the beginning.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.