You are not logged in.
I was recently looking at the documentation for Arch packages and thought "Holy crap, that looks like a pain!". Especially for something really small, like a brainf*** interpreter. So what did I do? I took it upon myself to create my own packaging utility and file format, of course!
µpkg is written entirely in bash and is fairly small, about 115 lines total (although expect that number to increase as I implement more functionality).
Also, a note on versioning. I'm not going to use the decimal/point system, but a revision-based one. So much cleaner, not to mention easier to type.
Format
Packages are [optionally compressed] tarballs that contain a number of scripts and some files (duh). They're laid out like so:
* pre-install: Executed before installing.
* post-install: Executed after installing.
* pre-uninstall: Executed before uninstalling.
* post-uninstall: Executed after uninstalling.
* files/: A directory containing files, located such that they will be in the corresponding places in the root filesystem once installed.
Sample Packages
* sudo 1.7.1 x64
* bfutils x64 — Brainf***-related utilities.
To install, simply run "upkg install <package>" as root.
Downloads
* µpkg 1 — First release.
* µpkg 2 — Adds removal functionality. Improvements to internal library.
* µpkg 3 — Library fixed due to bugs.
* µpkg 4 — Now runs appropriate scripts when uninstalling.
Decompress the tarball and run the included installation script.
Obligatory Disclaimer
I cannot be held responsible if µpkg s**ts all over your system.
To Do
* Add package removal capabilities. [DONE]
* Maybe add package management (possibly as separate utility).
Last edited by Peasantoid (2009-05-03 03:24:06)
Offline
I congratulate you on tackling the tall task of a package manager.
furthermore, no offense intended, what i don't see is the need for it.
but it's cool that you share your efforts with us
cheerio
Barde
Offline
I congratulate you on tackling the tall task of a package manager.
furthermore, no offense intended, what i don't see is the need for it.
Okay, two things:
1) µpkg is not a package manager. Package managers (at least every one I've heard of) download packages from repositories, figure out dependencies, and other stuff. All this thing does is install [and later, remove] them. The user has to manually download the package. Also, I hate having dependencies rammed down my throat.
2) Need? Who said there has to be a need in order to make something? Did Linus Torvalds "need" Linux? Hell no! I'm a hacker; I do things for fun.
but it's cool that you share your efforts with us
Thanks.
Last edited by Peasantoid (2009-05-02 23:51:42)
Offline
I was recently looking at the documentation for Arch packages and thought "Holy crap, that looks like a pain!".
In what way?
Anyway, although I don't see much use for this myself, I agree with you that sometimes it's fun to code just for the sake of coding and see where it takes you.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Peasantoid wrote:I was recently looking at the documentation for Arch packages and thought "Holy crap, that looks like a pain!".
In what way?
* PKGBUILDs. This seems like a redundant step. Why do it when you can just copy a few files into a directory and `tar cvf` it all into a completely valid package? Why distribute a file that tells the user how to make a package themselves, rather than just give them the package itself?
* Platform specificity. µpkg doesn't have any ties with Arch (pacman, makepkg, and so on), so it's more or less cross-platform — it'll work with any distro, the BSDs, and even OS X. (But not Windows, obviously.)
Other than those two points, Arch packages are better for large projects that have dependencies. µpkg would seem to be better for distributing small, standalone pieces of software.
Offline
Because pacman does so much more than just blidnly install/remove packages? I agree with what Xyne said.
Last edited by Zariel (2009-05-03 00:59:37)
Offline
Like I said, it seems like overkill to create an Arch package with all the metadata, dependencies, and so on if you're just distributing something small. Anyway, I never claimed µpkg would be useful.
Also: µpkg does not "blindly" install packages. It takes great pains not to clobber anything.
Last edited by Peasantoid (2009-05-03 01:44:50)
Offline
Sorry but I completely disagree. A proper PKGBUILD will only contain relevant data. If a package has no dependencies or optional dependencies, then those arrays are not included in the PKGBUILD. A PKGBUILD for a minimal package is itself minimal. If it does have dependencies, I don't see why you would not want to install them. What's the point of installing something that won't work? If a standard package has been built against deps that you don't need (as was vim in my case... I don't use ruby), you can just remove it.
It just makes more sense to me to not install a bunch of small packages on your system without tracking them centrally.
Again, I'm not trying to discourage you from continuing with this, I just disagree with your reasoning.
Last edited by Xyne (2009-05-03 02:39:16)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Well, I didn't look over the packaging documentation in detail (just saw a lot of instructions), so yeah, I probably missed something there.
But anyway. Even if µpkg isn't particularly useful, it was (and still is) fun to write.
Speaking of which... I've released revision 2, which includes removal functionality. If you installed the previous one, just run this one's installation script as normal to upgrade it.
Also: Had to re-upload the sudo package in order to correct a naming error with /etc/sudoers.
Last edited by Peasantoid (2009-05-03 02:01:22)
Offline
Interesting idea! Like others have said I don't really have a use for this myself but that is irrelevant. If you are having fun and find the utility useful others might too. If not, it's all good coding experience. Keep working on it.
Like I said, it seems like overkill to create an Arch package with all the metadata, dependencies, and so on if you're just distributing something small.
Personally I like Arch's PKGBUILDS. Arch is the first distro where I made up or edited the existing packages. It's just so easy. I never looked into making my own packages when running Gentoo though I don't know why. Arch's PKGBUILDS just sort of sneak up on you. At first you just use pacman, then you find something in AUR and you install ABS, then you are rebuilding packages in the repos to customize them for yourself and before you know it you are making your own package builds.
Platform specificity. µpkg doesn't have any ties with Arch (pacman, makepkg, and so on), so it's more or less cross-platform — it'll work with any distro, the BSDs, and even OS X. (But not Windows, obviously.)
This would be an interesting nut to crack. Things like autopackage have been less than successful as far as I know. If someone came up with a cross platform package format that was accepted by the OSS comunity and actually used that would be cool.
Last edited by mikesd (2009-05-03 02:04:31)
Offline
Hmm, I've never heard of autopackage. Could you explain?
Offline
...All this thing does is install [and later, remove] them. The user has to manually download the package. Also, I hate having dependencies rammed down my throat.
so...this is identical to 'pacman -U'?
I really do not see the point of developing a second package manager for arch...
[home page] -- [code / configs]
"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol
Offline
Peasantoid wrote:...All this thing does is install [and later, remove] them. The user has to manually download the package. Also, I hate having dependencies rammed down my throat.
so...this is identical to 'pacman -U'?
I really do not see the point of developing a second package manager for arch...
http://en.wikipedia.org/wiki/Package_management_system
µpkg is NOT a package manager. It doesn't manage packages.
No, it is not identical to `pacman -U`. Please read more carefully...?
Edit: Added quote to eliminate ambiguity.
Last edited by Peasantoid (2009-05-03 02:21:38)
Offline
Releasing revision 3. Apparently, the -a and -e flags have different meanings in [ ... ].
The whole thing sorta flaked out...
Last edited by Peasantoid (2009-05-03 02:45:18)
Offline
Releasing revision 4. I forgot to make the uninstallation thing run its scripts.
Also adding a new package called "bfutils". It's a bunch of brainf*** utilities.
Offline
How would I pronounce µpkg?
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
On a tangent, I wonder what the forum policy is concerning brainfuck. It's the proper name of the language so I wonder if you really need to self-censor. How many internet/Arch users would really be bothered by it?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Seems a lot like this project is heading towards:
http://www.slackware.com/config/packages.php
Last edited by Anonymo (2009-05-03 14:22:22)
Offline
On a tangent, I wonder what the forum policy is concerning brainfuck. It's the proper name of the language so I wonder if you really need to self-censor. How many internet/Arch users would really be bothered by it?
Well, I don't know, but I'd rather play it safe than get banned.
How would I pronounce µpkg?
µ is the lowercase form of the Greek letter Mu. In English, it's often used to mean "micro", so I guess you'd say "micropackage". (?)
Seems a lot like this project is heading towards:
Perhaps. However, once I get all [or most] of the bugs in µpkg worked out, I plan to build a full-blown package manager called µman on top of it.
Last edited by Peasantoid (2009-05-03 15:47:32)
Offline
µpkg is NOT a package manager. It doesn't manage packages.
huh? It installs and removes 'packages'. Sounds like a package manager to me!
No, it is not identical to `pacman -U`. Please read more carefully...?
Didn't you say you didn't even look at the documentation/man-pages for pacman?
this thread is kind of funny.
that aside, coding for no reason is fun. I have reinvented many a wheel in my time.
*wistful*
have fun with your project.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Peasantoid wrote:µpkg is NOT a package manager. It doesn't manage packages.
huh? It installs and removes 'packages'. Sounds like a package manager to me!
http://en.wikipedia.org/Package_management_system
A package management system is a collection of tools to automate the process of installing, upgrading, configuring, and removing software packages from a computer.
[...]
Packages are distributions of software and metadata such as the software's full name, description of its purpose, version number, vendor, checksum, and a list of dependencies necessary for the software to run properly. Upon installation, metadata is stored in a local package database.
...not a package manager.
Didn't you say you didn't even look at the documentation/man-pages for pacman?
No, I said I didn't look over them in detail. There are a lot of instructions to follow when creating an Arch package. Not so for these.
Last edited by Peasantoid (2009-05-03 17:54:52)
Offline
How would I pronounce µpkg?
Τhe word "μ" in Greek is pronounced "mi" (mee, like in "bee") if it's ... alone.
Offline
I guess it's micro pkg
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
I've decided to make µpkg more package-manager—esque. Changes will include metadata, saving a [sort of] database of installed packages, dependencies, conflicts, versioning, and so on.
Next release will contain these features.
Offline