Skip to content

smok-serwis/pojeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pojeb

Pojeb is an extremely simplistic package manager. It has grown out of frustration at existing Python build tools, which obviously cannot perform the simple task of placing a fucking file at a particular directory.

Forget automatically placing your /etc/init.d scripts, even if you are in total control of the environment!

You can do virtualenv, wheel-based binary installs, but you can't get your job done and go home. Fuck it all.

Pythonrants you right very much.

Install via the ninja one-liner:

wget --no-check-certificate -qO - https://github.com/smok-serwis/pojeb/raw/master/jebac-to | sudo bash

Requires Python 2.x, sudo, wget, bash, tar, gzip and root access. You don't have those? What are you running? Maybe not fuck you, but a shame on you certainly.

When do I use it?

When you exact total control over your environment, because your layers of abstraction consist of containers and VMs, and not fucking virtualenvs.

And you're not afraid of executing commands as root via shell, because you've automated the fuck out of it, and your cluster is predictable, and not fucking every VM has different distro of different version.

Fuck it, if your project requires sideloading 3 different versions of the same package, then you're doing it wrong. Heartfelt fuck you for you.

Directory structure

Name of the package is encoded in jebfile. If it's named fuck-you.jeb, then the name of the package is fuck-you.

  • /etc/pojeb/wyjeb.d/ - fucking scripts that remove your shit, eg.
    • /etc/pojeb/wyjeb.d/pojeb - script that removes pojeb
  • /bin/*jeb - commands go here. If you don't like it, move'em.

Installation

The one-liner ninja way

wget -O - https://github.com/smok-serwis/pojeb/raw/master/jebac-to | sudo bash

Calling the one-liner again will simply update your pojeb.

The absolutely worst way

Checkout the repo/unzip the zip with pojeb. Call ./install.sh as root. Done.

Usage

  • sudo dojeb your-package.jeb - install a package
  • sudo dojeb https://example.com/your-package.jeb - download a package and install it. Requires wget.
  • sudo wyjeb your-package - uninstall a package
  • przyjeb username@remotehost your-package.jeb - install a package on a remote machine. If pojeb is not there already, it will be transparently installed via the ninja one-liner. ssh is obviously required, and sudo must be callable on the target.
  • zajeb your-package - make a .jeb package file from a directory called your-package. This will result in a your-package.jeb file.

If you add any extra arguments after dojeb or przyjeb, they will be passed to setup script.

How do I make pojeb packages

Let's say your are making a package called fuck-you. You should make a directory called fuck-you.

Everything here will get zipped when you call zajeb. Files with special meaning are listed below.

dojeb

A script (with a shebang!) that installs your package. This is called as root, within the working directory of fuck-you. Pojeb will unzip the .jeb file somewhere, chdir there and call dojeb. You just install shit.

You should return exit code 0. Otherwise, installation will be considered failed.

This should check if you are updating your own package. A good way to check it is checking for existence of /etc/pojeb/wyjeb.d/fuck-you.

This also receives any extra arguments for dojeb or przyjeb.

This does not have to copy wyjeb. Pojeb will take care of that

wyjeb

After successful installation this is moved to /etc/pojeb/wyjeb.d, in this case as /etc/pojeb/wyjeb.d/fuck-you. This is a script that removes your package. It gets called when you do wyjeb fuck-you.

and now

And now get your ass to the directory containing directory fuck-you. From there, invoke zajeb fuck-you. Now fuck-you.jeb is your package.

This does not have to remove /etc/pojeb/wyjeb.d/fuck-you. Pojeb will take care of that

If you don't put this file, then your package will be un-uninstallable, and wyjeb command will cry if you try to remove it.

**Note: ** if package's wyjeb script returns a non-zero error code, uninstallation will be treated as successful nevertheless, and the command will return 0.

FAQ

Q: What should install/uninstall scripts be written in?

A: I don't care. They must have a shebang, pojeb will chmod +x them, and just run them. If it's available on your system, it's fair game.


Q: Why should I use pojeb?

A: Because it allows you to get your shit done and go home early, or do more interesting things instead of trying to put your files somewhere.

lol wut

If you made it this far, then you know everything about pojeb there is to know. If you feel you need to know something else, file a bug report. Use the Issues tab for it. Thank your for contributing.