Giter VIP home page Giter VIP logo

user-yum.sh's Introduction

user-yum.sh

A yum & rpm package installer for CentOS, RedHat RHE, Fedora and the likes, operating at user-privilege.

If you want to know how it works, have a look at How to install packages in Linux (CentOS) without root user with automatic dependency handling?. If you just want to install a few packages, you may want to use the above answer rather than user-yum.sh.

Usage

Installing a package

Downloading one or several package:

make +screen
make +zsh +tcl

Installing all downloaded packages:

make install

Help to setup

Printing the lines to add to your .rc:

make environment

This will output a block of text like the following (2018-09-29):

# Setting environment for /home/mc/y
ROOT_D="/home/mc/y"

PATH="$ROOT_D/usr/sbin:$ROOT_D/usr/bin:$ROOT_D/bin:$PATH"

L="/lib:/lib64:/usr/lib:/usr/lib64"
export LD_LIBRARY_PATH="$L:$ROOT_D/usr/lib:$ROOT_D/usr/lib64"

Tip: You can source it using process substitution if you like:

source <(cd user-yum.sh/ && make environment)

Remove the root install folder to remove all installed packages.

There is currently no way to remove a package from the directory after running make install so be careful: use backup or use several instances. If you've just happend to mistype make +the_wrong_name you can use make unload to clean the cache (/rpm) and the list of downloaded packages (/dwnldlist).

Helper script

If you don't want to cd into user-yum.sh to install packages, you can use the wrapper helper script em.sh (usEr-yuM), which will cd into the right directory before making your command. If you use it, the priviously mentionned commands become:

em.sh +screen
em.sh +zsh +tcl
em.sh install
source <(user-yum.sh/em.sh environment)

Configuration

Root directory

You should configure the ROOT_D value in the Makefile to your liking. The default is (as of 2018-09-29) (was?):

ROOT_D := $(shell echo $$HOME)/y

Install flag

You may want to remove the + prefixing the name of the packages to install. If so, change the INSTALL_FLAG_PREFIX, from

INSTALL_FLAG_PREFIX := +

to

INSTALL_FLAG_PREFIX :=

TODO

  • Simplify the implementation of the install process. There's no reason to keep any .cpio file since we can just pipe them (rpm2cpio x.rpm | cpio -id).

user-yum.sh's People

Contributors

mathieucaroff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

user-yum.sh's Issues

In the process of uncompress, folder cannot be found

I just found in the process of uncompress, the cpio files cannot be found.

bash: root/cpio/screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.cpio: No such file or directory

I think that's resulted by the set of ROOT_D in Makefile line 43:
ROOT_D := root

Use this could solve the problem for me:
ROOT_D := $(CURDIR)/root

The `cpio` directory is'nt necessary

Simplify the implementation of the install process. There's no reason to keep any .cpio file since we can just pipe them using rpm2cpio x.rpm | cpio -id.

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.