Giter Site home page Giter Site logo

rpm-download's Introduction

rpm-download

Shell script for downloading rpm-package(s) from modern RPM repositories

Under the hood this script uses Docker to obtain minimal file-system of needed system release. And then it download package(s) to the storage sub-directory and saves the list of download URL(s) in storage/urls.txt file. The created Docker images will be named with rd- prefix, you can remove them manually later.

The rpm-download.sh takes at least three pairs of arguments, as shown in example below:

./rpm-download.sh -d alt -r p8 -p mc
  • -d (distribution, mandatory) - alt for ALTLinux, fedora for Fedora, mageia for Mageia, openmandriva for OpenMandriva, opensuse for OpenSuSe, rosa for ROSA, rockylinux for Rocky Linux, almalinux for AlmaLinux, redos for RedOS;
  • -r (release, mandatory) - supported versions are the following: ALTLinux from p8 to sisyphus, Fedora from 22 to rawhide, Mageia from 7 to cauldron, OpenMandriva - 4.2 and cooker, OpenSuSe from leap to tumbleweed, Rosa - only 2021.1, Rocky Linux from 8.4, AlmaLinux from 8.4, RedOS - only latest, MSVSphere from 8 to latest;
  • -p (with quotes for multiple packages, mandatory) - represent package(s) name(s) - in the above example it is single mc package. For two packages use "mc htop" (for example);
  • -s (get source code of package(s), optional);
  • -a (enable Autoimports for ALTLinux, optional);
  • -t extra repository in three possible formats - <URL of .repo-file> or "<URL> <LABEL>" (Fedora, OpenSuSe, Mageia, Rocky Linux, AlmaLinux, RedOS), full rpm sources.list line (ALTLinux) (optional).

Note: if you have configured proxy in your network, then you can supply its address as the argument to the application - http_proxy=http://192.168.12.34:8000 ./rpm-download.sh -d alt -r p8 -p mc .

How to start using this script:

  1. Install Docker and dependencies to the host system

    sudo apt-get update
    sudo apt-get install docker.io git
    
  2. Add current user to the docker group

    sudo usermod -a -G docker $USER
    

    then reboot machine.

  3. Clone this repository

    cd ~/Downloads
    git clone https://github.com/N0rbert/rpm-download.git
    
  4. Fetch some random rpm-package

    cd rpm-download
    chmod +x rpm-download.sh
    ./rpm-download.sh -d alt -r p9 -p fslint
    
  5. Carefully inspect the contents of storage folder, then try to install main rpm-package to the target system, then fix its dependencies one-by-one.

    Please also note that this storage folder will be cleared on next run of the script!

Warning: author of this script can't provide any warranty about successful installation of downloaded rpm-packages on the target system. Be careful!

rpm-download's People

Contributors

n0rbert avatar

Watchers

 avatar

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.