Giter Club home page Giter Club logo

buildrpms's Introduction

buildrpms

Script for building RPM packages from archives

Detailed description

buildrpms takes a list of paths to tar archives (including simple file names, absolute, relative paths and homedir expansion by a leading tilde "~") with each list item (i.e., archive path) as a single argument. Provided paths may point to files or directories; if a directory is addressed, the whole directory tree below this directory is searched for valid archive files.

If an archive path contains no slashes (/), it is used as a simple archive file name; still the wildcard rules denoted below apply. This name is used to search for valid archive files in a list of directories comprising "." (aka "$PWD") and "~/Downloads"; for each of these directories the whole directory tree below is searched. The only exceptions are: If the option "-i|--in-place" is used or if a simple name contains no digit somewhere after the last dash-hyphen (-) or if a simple name contains no digit right after the second last dash-hyphen (-), directories named "SOURCES" beneath "." are not searched.

Without the option "-i|--in-place", buildrpms avoids re-building archives for which an (S)RPM in the directories ./RPMS or ./SRPMS exists by analysing spec file content, the archive's top level directory and the archive name (in this order of precedence).

The archive paths may either contain shell type wildcard characters (? * [ ]), or be truncated (i.e., provide only a path without unquoted wildcard characters, including or comprising the beginning of a archive file name or a complete such name). File paths ending in a slash are the only exception: They may contain wildcard characters, even though the whole directory tree below the provided path is searched for valid archive files.

Control characters, which include all horizontal and vertical white spaces except for the simple space character, are not allowed in the provided archive paths.

Mind to protect wildcards, the tilde and other special characters from being expanded by a shell, if buildrpms is intended to interpret them.

Also mind, that buildrpms lastly calls rpmbuild, which expects the real archive file names to conform to "<name>-<version>.tar.gz" (i.e., the ones on mass-storage), unless buildrpms' option "-i|--in-place" is specified.

buildrpms currently recognises the mutually exclusive options "-?|--help", "-i|--in-place", "-n|--no-move" and "-d|--debug". By default buildrpms extracts the spec file of each archive found, processes it and moves each valid archive to the ./SOURCES directory; "-n|--no-move" links each valid archive in ./SOURCES instead of moving. "-i|--in-place" omits extracting and processing of spec files and directly uses the archives at their original location. If no archive path list is provided, buildrpms will use an internal list of archive paths.

Buildrpms outputs (to StdOUT) a the list of archive paths, with which ultimately rpmbuild is called after a multitude of checks. All user oriented messages are directed to StdERR, except for the aforementioned archive paths and the help output. The option "-d|--debug" provides some additional output to StdERR when processing the argument list.

Exit codes:
   0  Everything worked fine: all applicable checks, all applicable preparatory steps, and the rpmbuild run(s)
   1  A check failed
   2  Help called
   3  Called incorrectly (e.g., with wrong parameters)
   4  Aborted upon user request
   5  Error while interacting with the OS (reading / writing from the filesystem, calling programs, etc.)
   6  Error while executing one of the preparatory steps
   7  Error internal to this script

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.