Page 1 of 1

A package/software manager for Visopsys

Posted: Thu Dec 29, 2016 1:00 pm
by dalmegnu
I have created this post to talk about the package/software manager for Visopsys. Maybe you need/want to read first http://visopsys.org/forums/viewtopic.ph ... 0&start=10.

I will show my original idea for the package manager, and then we can discuss about that idea (and change it, of course). My idea is to make the following components, to get finally a “software manager” and all we need:

- 'Visospys Package Manager' (vpm for friends): The package manager is use just to install and uninstall packages. (I think it's a bit similar to 'dpkg' on Debian). We must have a “installed packages database” (a simple txt file can be use).
Example of hypothetical use:
(Install my_package): vpm my_package.zip
(Uninstall my_package): vpm -r my_package

- Another software to download the packages from the server or repo (I haven't got a name for this yet :D): This should get the packages and it dependencies or whatever them need and execute/call “vpm” to install the packages into the system.

- The “software manager”: This should be the graphical interface, and simple to use. In this you will get information about the different software available and you will be able to install and uninstall software. To do this, the software manager will call vpm and the other -unnamed- software. Maybe in the future we can add things like “user ratings”.

Also we will need:

- A software/package repository: Maybe a simple FTP/HTTP server at visopsys.org (like archive.visopsys.org or software.visopsys.org) or maybe a Git repo at Github in which all the users can make 'Pull requests' to add new software to the repo (Of course it will be controled by Andy, I think). I think all the people have to be able to create their own repo, so it's necesary to make an “standard” for this.

- Packages: I think that our packages should be just ZIP files, that contains the binaries of the software, configuration, images, doc, etc. Also the packages should contain a config file for vpm.

P.D.: I have written a bit of the code of vpm, but just to treat the arguments.

Re: A package/software manager for Visopsys

Posted: Thu Dec 29, 2016 11:53 pm
by andymc
Here are a couple of thoughts of mine.

I do like the idea of using simple zip files with 'manifests' inside. That way you can open and manipulate them with standard tools. The only downside I can think of, is that it would be trickier to get the file browser window to do the right thing when you click on them (opening the software manager, instead of the archive manager). The kernel's loader would need a way to recognize the packages, instead of treating them as normal zip files. I try to stay away from using file extensions for this -- there's generally some way to determine the file type by examining a portion of its contents. However, unzipping a file to see whether it's got some special manifest or whatever inside, is not so practical. The alternative could be to put a .vpm-specific file header, and the data that follows it could be compressed -- even a full archive file, so that if you strip off the header, you've got a .tar.gz or .zip file.

I also like the idea of having command-line installation capability (your vpm idea) but I'm not so crazy about using a GUI front-end (the software manager) to drive a command-line back end. That's a bit old-school for my tastes! Maybe the main bulk of the code could be in a .so library? Then both the vpm and software manager could just be different interfaces to the same code.

I can absolutely host the master software repository at visopsys.org. The server has unlimited bandwidth -- I pay quite a lot for that, so let's use it! Access via HTTP seems perfectly reasonable.

Re: A package/software manager for Visopsys

Posted: Fri Dec 30, 2016 11:58 am
by dalmegnu
Maybe we can put a '.vpm' extension on the zips (like package.vpm or package.zip.vpm).

I really like the idea of the library. Using this idea the source code of vpm is almost finished, I just need to add the functions contained in the library (To install and remove packages).

We have to talk about the repository's paths of course, but I think that first we need the package system ready. Now the most important thing is the package configuration files, and how are we going to to organize the files on the zip. I think that we have to include:
1) A configuration file that contains the information for install the software, like version (or versions) of Visopsys that are supported, dependencies (if are needed), files to be copied, and things like that.
2) A folder that contains the software binaries, configs, ...; In this folder (We should think for a name like "data", "software", "visopsys",...) we should have a file tree like the system tree. For example, if the file "binary" is going to be copied to /programs/binary it should be at $UNCOMPRESSED_ZIP/software/programs/binary. And so with all the other files.
3) A folder or file(s) that contains the software license, and other information useful for the Software Manager and the user, like official webpage, email and things like that. (This is just a suggestion)

Re: A package/software manager for Visopsys

Posted: Tue Jan 10, 2017 2:49 pm
by dalmegnu
I can start immediately if you (Andy) want

Re: A package/software manager for Visopsys

Posted: Tue Jan 10, 2017 5:58 pm
by andymc
I say sure, why not give it a bash?!

A couple of things:

In the current state, the kernel loader won't be fooled by a different file extension. It will know that something is a zip file and proceed accordingly. So I think changing the header somehow might be in order. Maybe even just changing the signature bytes inside the archive header? I guess this issue is less important than some other details.

Note that the .zip file format isn't yet supported by the compression library. It knows Gzip and Tar files, currently. I do plan to extend the capabilities one of these days.

The compression library (libcompress.so) can be a good model for the software installer code. You see that the 'zip' and 'unzip' command line utilities use it, as does the graphical archive manager.