Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fsquillace/juju-old
The universal GNU/Linux package manager. DEPRECATED. Look https://github.com/fsquillace/junest instead.
https://github.com/fsquillace/juju-old
Last synced: 2 months ago
JSON representation
The universal GNU/Linux package manager. DEPRECATED. Look https://github.com/fsquillace/junest instead.
- Host: GitHub
- URL: https://github.com/fsquillace/juju-old
- Owner: fsquillace
- Created: 2013-06-02T23:16:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T19:09:20.000Z (about 10 years ago)
- Last Synced: 2024-05-02T01:27:59.651Z (9 months ago)
- Language: Shell
- Homepage:
- Size: 314 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JuJu
**JuJu**: the universal GNU/Linux package manager.## Description
**JuJu** is a package manager that can be used for every GNU/Linux distribution.JuJu is able to get the packages from the ArchLinux Official and AUR repositories and install them
inside your home directory (by default is ~/.juju/).You can choose to install the package using either the pre-compiled packages or from the source code. The available
pre-compiled packages are for i686 and x86\_64 architectures (in the future also armv{5,6,7} for your raspberry pi ;) ).
JuJu was designed to be a lightweight program in order to get compatibility with many systems.
The list of the main dependencies are: 'bash>=4.0', 'wget' and 'tar'. That's it!There are several reasons to use JuJu instead of a traditional package manager. I just want to mention few of them:
1. Consider to have a server in production which run an important service. Generally,
it is better to keep the system in order to be as simple as possible without installing further packages as root.
With JuJu you can install your packages inside your own home directory without affecting the performance or stability of your
system.
2. You do not need to get root permissions for installing a package.
3. You can create your own GNU/Linux distribution from scratch. You can follow the Linux from Scratch guide
(http://www.linuxfromscratch.org/lfs/) and install each packages mentioned into the guide using JuJu.
4. JuJu is a weak dependency package manager that allow the user to choose if the package dependencies need to be installed.
5. To get easily your vim plugins, python libraries and more for every host you are logged in.## Quickstart
After installing JuJu (See next section) install/remove a package like `tcpdump` is extremely easy.To install tcpdump:
$> juju -i tcpdump
To install tcpdump starting from the source code:
$> juju -i -s tcpdump
For listing the packages already installed:
$> juju -l
tcpdumpFor listing the content of the package installed:
$> juju -l tcpdump
/usr/bin/tcpdump
/usr/share/licenses/tcpdump/LICENSE
...For removing completely tcpdump from JuJu:
$> juju -r tcpdump
Find out more options by typing:
$> juju --help
Execute your commands in two ways, wrapping the command with jujuenv:
$> jujuenv tcpdump --help
Or setting the environment variables inside the shell by using 'source jujuenv' command:
$> source jujuenv
$> sudo tcpdump -i wlan0 'tcp and dst port 80'
$> man tcpdumpWowww!
The 'jujuenv' file is used to get updated most of the environment variables such as PATH, LD\_LIBRARY\_PATH,
MANPATH, etc. It also update the variables PYTHONPATH and VIMRUNTIME to get easily installed your favourite python libraries and
vim plugins.For the moment it is not implemented the functionality for searching packages. Anyway, you can search for
packages going directly to the ArchLinux website Official https://www.archlinux.org/packages/ and AUR
https://aur.archlinux.org/ repositories.## Installation
You can get JuJu from git or from the tarball.
If you want to get JuJu from git, clone JuJu in ~/.jujup directory:$> git clone git://github.com/fsquillace/juju ~/.jujup
Otherwise download the tarball:
$> wget https://github.com/fsquillace/juju/archive/main.tar.gz
$> tar xzvf main.tar.gz && mv juju-main/ ~/.jujupSet the PATH variable in your shell (or in ~/.bashrc file):
$> export PATH=$PATH:$HOME/.jujup/bin
## Advanced use
If you want to place the packages in a particular folder different from the default one (~/.juju),
type the following:$> JUJU_PACKAGE_HOME= juju -i
When JuJu installs a package it first creates a temporary directory in /tmp/juju.XXXXXX for buiding the package.
After installing the package the temporary directory is automatically removed. If you want to keep the temporary directory for debugging
purposes just type:$> JUJU_DEBUG=1 juju -i
### Diagnosis
When executing a command installed with JuJu, it could happen that some shared library are not detected
neither from the JuJu local reposistory nor from the root system (/lib and /usr/lib).
In this case to get the list of library dependencies for an executable you can type:$> jujuenv ldd $(jujuenv which )
In this way you can easily understand which library dependencies are missing and you can install them using JuJu.
### Sudo access
The sudo command doesn't allow to easily preserve the variables environment. For this reason every time the sudo command is used
it will be replaced with su command. Therefore, the following command:$> jujuenv sudo tcpdump -i wlan0
is the same as:
$> su -p -c "jujuenv tcpdump -i wlan0"
### JuJu dependencies
Apart the main dependencies (bash, tar and wget), Juju has few other dependencies that can be fixed
through the jujubox. jujubox is a minimal script that retrieves a tarball of a package set (awk, grep and xz)
that will be installed into the juju repo local from a remote repository.
Usually these dependencies are available in many \*nix systems. However, in case
your system does not have one of these dependencies you can get it by typing:$> jujubox
## Troubleshooting
Q: Why don't I see the command if I use sudo?
A: TODO ANSWER
Q: Why do I get the error: "FATAL: kernel too old"?
A: This is because the executable from the precompiled package cannot always run in particular if the kernel is old.
If the package is one the main of jujubox (such as bash, tar, wget, ...) you might need to compile the package it self
and update the PATH variable accordingly.Q: I have installed a python library (or vim plugin) but the system doesn't see it.
It says "no module named 'modulename'".A: This is because JuJu need to update the 'PYTHONPATH' or the vim runtimepath with the new
directories created after the installation of the package. To get it updated just re-source jujuenv:$> source ~/.jujup/lib/juju/jujuenv
Q: Why do I get an error "cp: cannot overwrite directory ${HOME}/.juju/root/usr/sbin
with non-directory" when I am installing 'filesystem' package?A: The 'filesystem' is a package that define the main directories of the Linux system.
It is always useful to install 'filesystem' before any other packages that place files
in the directories /lib, /lib64, /sbin, /bin.## License
Copyright (c) 2012-2013This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program. If not, see .## Author
Filippo Squillace## WWW
https://github.com/fsquillace/juju