GithubHelp home page GithubHelp logo

srpm-tools's Introduction

==============
 SRPM TOOLSET
==============

Set of tools to obtain all sources to build SRPM (source RPM -> *.src.rpm
file), which then can be built into binary RPM.

This is useful for continuous integration/development purposes -> when you
e.g. want to (a) generate SRPM for each "git push" into repository, and
(b) then try to build RPMs.

Install from this Copr repo (till we have official Fedora package):

  https://copr.fedorainfracloud.org/coprs/praiskup/srpm-tools/

Or by 'autoreconf -vfi && ./configure && make && sudo make install'.

Motivation:

  SRPM is generated from SPEC [1] file && set of sources (those sources
  are also pointed to by SPEC file).  Such sources are usually "released
  tarballs".  For continuous integration purposes, such upstream released
  tarball either do not exist _yet_ (so those need to be generated from
  git) or at least the tarball is not stored within git repository
  (together with SPEC file) so it needs to be downloaded.  That's where
  this project should help.


srpm-get-sources
----------------

  Download or generate sources from spec file.  This script must be run
  from directory where '.srpmconfig' file and spec file exist.

  If the source file doesn't exist yet, the tool tries to 'wget' it, or
  generate it via git-archive.


srpm-generator
--------------

  Generate source RPM based on spec file and .srpmconfig file.


.srpmconfig semantics (YAML)
----------------------------

    # Find 'NAME.spec' in this directory, and parse it's contents.
    specfile: NAME.spec

    # Handle Source0 tag explicitly.
    source0:
        # Generate tarball via 'git archive' command (whole git project).
        method: git_archive

        # Members within generated tarball will start with 'NAME-VERSION/'
        # path.  This is is optional (the prefix is usually detected from
        # tarball name, e.g. "tar-1.19" for "tar-1.19.tar.gz").
        archive_prefix: NAME-VERSION

        # Additional data for git_archive method, optional.
        git_archive:
            repo:
                # Instead of using the actual git repository, clone this one.
                address: https://git-clone-url.com/project
                # Clone the project into this subdirectory.
                subdir: project

FAQ
---
(Q) Why the .srpmconfig is needed?  Why we don't define those data
    within SPEC file directly?
(A) SPEC files are usually used by "downstreams" (e.g. by
    Fedora/RHEL/SUSE/Mageia/..) to build binary RPMs.  Downstream
    packagers however want to build RPMs from _released_ tarballs -- not from
    generated ones.  Having .srpmconfig file minimizes differences between
    downstream SPEC files and the one used for CI purposes.


REQUIREMENTS
------------

- rpmdevtools
- git
- perl-YAML
- rpm-build

[1] https://en.wikipedia.org/wiki/RPM_Package_Manager#SPEC_file

srpm-tools's People

Contributors

praiskup avatar

Stargazers

Wen Yang avatar Navid Shaikh avatar Rodrigo de Araujo Fonseca avatar Miroslav Suchý avatar Vitaly Rybnikov avatar

Watchers

James Cloos avatar  avatar Rodrigo de Araujo Fonseca avatar  avatar

srpm-tools's Issues

README corrections

The installation commands in the README didn't quite work. I needed:

     autoreconf -fi
     ./configure
     make
     sudo make install

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.