Introduction
Hi, here's another post, if you want "similar" to the one I did previously for Archlinux, this time we are going to do something very similar, with the difference that although I do it under Chakra Linux, It is applicable to all distros that use pacman as package manager
Requirements
- Packages to compile, it is usually groups ending in devel (for Arch would be base-devel)
Building the repository structure
For this it is necessary to create (to be ordered) 2 folders within our repository, in my case I will create my repo x11tete11x in: /home/x11tete11x/.repo/x11tete11x and the folders it will contain will be: pkgbuilds y pkgs-x86_64
Adding our repository to Pacman
We edit the file /etc/pacman.conf and we add our repo with the following information:
[RepoName] SigLevel = Server =
Example of how I have my repo configured:
[x11tete11x] SigLevel = Optional TrustAll Server = file: ///home/x11tete11x/.repo/x11tete11x/pkgs-x86_64
Manual Method
Creating the DB for the repository
Here we use the instruction repo-add to generate the repository database
repo-add / path / to / repo / folderDepkgs / /path/to/repo/Depkgsfolder/*.pkg.tar.xz
Compiling packages
Here more than the steps, I am interested in giving more "guidelines" or advice, the steps are:
- Download or assemble the PKGBUILD of the desired package to the folder pkgbuilds, and enter the same
- Adapt the PKGBUILD to fit your distro's dependency names
- Run makepkg
- Copy the binary to the folder pkgs
- Regenerate the DB with repo-add
- Refresh the pacman repositories with pacman -Sy
Considerations when compiling
Before starting to compile to fools and crazy check that you have all the dependencies in your repositories official, because if we start duplicate packages in our repositories and system, we can generate inconsistency, for example.
Later I will accompany this post, with a video tutorial showing everything that is exposed here, in particular in Chakra is the package «toluapp" and in Arch is called "tolua ++»Therefore if we want to compile a package in Chakra (which for example we brought from Arch) which has as dependency tolua ++, NO we have to compile tolua ++ we simply modify the PKGBuild, so that dependence of the same happens to be toluapp.
That has to be the biggest consideration to contemplate, then, it is a matter of before any eventuality, googling a bit to modify the PKGBUILD so that it compiles (in the example that I show in the video, there are all these questions, even a compilation error , later fixed)
Automatic method
The "automatic" method consists of a simple script, which I did to automate the task of compiling and adding packages to the repository (it is not nearly as complete as the local-repo de Arch but it fulfills its mission) the code of the same is the following:
#! / bin / bash REPONAME = x11tete11x PATHPKG = / home / x11tete11x / .repo / x11tete11x / pkgs-x86_64 / makepkg && cp * .pkg.tar.xz $ {PATHPKG} && rm * .pkg.tar.xz && repo -add $ {PATHPKG} / $ {REPARE ME} .db.tar.gz $ {PATHPKG} *. pkg.tar.xz
as you will see it is extremely simple and to use it you have to do the following:
- They save that code with the name they want (in my case I called it chakra-repo)
- Set the variables REPLACE ME, with the name of your repository, it has to be the same as they put in the pacman.conf, and the variable PATHPKG with the directory where all the pkgs
- They give you execution permissions:
chmod + x scriptname
- They copy it to / usr / bin /
To use it, after they downloaded or armed their PKGBUILD, instead of running makepkg they execute the script (in my case chakra-repo) This automatically compiles the program, copies the binary to the binaries folder, and updates the DB using repo-add, so after running the script, just make a pacman -Sy to install the package in question.
Next, I leave you a video tutorial where you can see all this that I exposed, in action (PS: if you listen to AC / DC the machine compiles better xD hahaha)
Interesting 😀
Very interesting!
It looks interesting, I wonder why Arch and Ubuntu can have all the packages in the universe and the other distros can't.
Very good theme, besides that everything is detailed when making the configuration,
And the best detail, which in my opinion, was the best, was when you looked for the solution to the error that came out when completing, since one does not know what happens when encountering these types of errors and how to solve it, and here you demonstrate with the simple echo of looking for things comes out what to do.
Buenisimo
what a way to learn GNU / Linux on this page. thanks..
Very good entry, to see if someone is encouraged to put a similar one for the debianadictos.
About the music…. AC / CD is fine, but the same with Marilyn Manson is going a bit better…: - /
Can a cloud hosting be used as a server? specifically Dropbox
all yours: http://i.imgur.com/5DVzCXm.png
Yes indeed, when I was on Pardus and Pisi Linux, we had the community repo on Dropbox.
Perfect! 😀
Now that I'm UniDistro, let's see if I dare to try it on KaOS 🙂
Excellent contribution 😉
try without fear, that initially the local repo "manual", I did it under KaOS xD
A very useful work for neophytes like me, and for that I thank you very much for the interest you had to publish it.
Ok, I think I understand what you want to transmit, this "local repo" thing, saves time, if we consider installing archlinux or a derivative; since for example the archlinux.org server has recently been set to 56 kb / s for downloads. But if we have a local repo (local package server, I think?) The installation will be done without the dependency of being connected to the internet.