English | Lietuviškai

Info


Communication


PEROPESIS FORUM

This forum is dedicated to discussing issues related to the use and development of the Peropesis Linux operating system.

Thoughts about importing a package manager

by sskras, Saturday, November 12, 2022, 10:47 (15 days ago)

Amount of included software seems to increase with every release.

This gave me an idea of using some existing package management infra to get the additional binaries installed.

Two such systems comes to mind:

* `pkgsrc` (source-based system) + `pkgin` (binary package manager)
* `nix`

Would the idea be appropriate for this distro?

Thoughts about importing a package manager

by g, Sunday, November 13, 2022, 10:31 (14 days ago) @ sskras

Compilation with 'Make' is currently under development. As you know, 'Make' is a build automation tool that automatically builds executable programs and libraries from source code by reading files called Makefiles which specify how to derive the target program (source). In some cases, the future release with 'Make' software already works perfectly, that is to say succeeded to compile some random software packages smoothly. So 'Make' will make it easy to install and update software by typing a few simple commands at the command line.


This level of software installation system (compiling whith 'make' from source) is liked for me personally. I don't have a strong opinion about an advanced, more user-friendly, but no longer user-controlled software installation system. I think it doesn't conflict with this project and in the future it would be possible to proceed with its implementation, if this would give someone a joy and benefit.


What's your opinion of this?

Thoughts about importing a package manager

by sskras, Sunday, November 13, 2022, 13:10 (14 days ago) @ g

Thanks for the response. Seems I get the situation now.


Quoting you (inline, the oldschool way):

This level of software installation system (compiling whith 'make' from source) is liked for me personally.


Nice. Another quote:

I don't have a strong opinion about an advanced, more user-friendly, but no longer user-controlled software installation system.


Understood. BTW, `pkgsrc` does essentially the same. It is a tree of Makefiles + URLs pointing to the sources + optionally patches specific for some platforms.


So whoever wants `sqlite3` with `nano` like here:
https://peropesis.org/forum/index.php?id=5

... or `vim` with `elinks` like here:
https://peropesis.org/forum/index.php?id=1

... one can `cd` straight into the appropriate dir, eg.:


$ cd pkgsrc/editors/nano


... and run `make install` or `bmake install` (the BSD make).


The dirs for the aforementioned software bundles can be identified using `find` or online, via pkgsrc.se. eg.:

https://pkgsrc.se/editors/nano
https://pkgsrc.se/databases/sqlite3
https://pkgsrc.se/editors/vim
https://pkgsrc.se/www/links


So I guess I will probably try to bootstrap this source-based system on Peropesis once I get it running in a VM:)

Thoughts about importing a package manager

by g, Sunday, November 13, 2022, 16:44 (13 days ago) @ sskras

I am not currently familiar with this software, I'll need more time to better understand how it works. At first glance, it looks useful and simplifies the process of installing new software.

Are you planning to integrate pkgsrc into peropesis in your own project or would you be expected to share the results if you succeed?

Does the peropesis not work in the VM, which? Please write more detail about this.

Thoughts about importing a package manager

by sskras, Sunday, November 13, 2022, 19:19 (13 days ago) @ g

Are you planning to integrate pkgsrc into peropesis in your own project or would you be expected to share the results if you succeed?


If I succeed, of course, I would like to share my results:)
 

Does the peropesis not work in the VM, which?


Haven't tried this yet. As I like everything CLI, I will probably start with a similar Bash script:
https://github.com/sskras/reactos/blob/main/build-vbox-OVA-from-ISO.sh
... so my steps can be easily replicated (just in case).

Thoughts about importing a package manager

by g, Monday, November 14, 2022, 12:18 (13 days ago) @ sskras

With the shell script you wrote, it looks like Peropesis 1.8 works. I've changed some VM options a little bit:


#!/bin/bash
#
# SPDX-FileCopyrightText: 2022 Saulius Krasuckas <saulius2@ar-fi.lt> | sskras
# SPDX-License-Identifier: BlueOak-1.0.0
# SPDX-FileContributor: Modified by Gediminas Mockus <info(at)peropesis.org>
#
ISO_URL="https://peropesis.org/peropesis/Peropesis-1.8-live.iso"
VM_NAME="SuperMachine"
OS_TYPE="Linux_64"
SATA_NAME="SATA"
ISO_FILE="Peropesis-*-live.iso"

function print () {
echo
echo $*
echo
}

function colorize () {
cat - | grep --color -e "^" "$@"
}

print - Retrieving:
wget -nv --show-progress -c --content-disposition ${ISO_URL}
ls -l "${ISO_FILE}"

print - Creating VM:
VBoxManage list vms
VBoxManage createvm --name ${VM_NAME} --ostype ${OS_TYPE} --register | colorize -e ${VM_NAME}

print - Listing VMs:
VBoxManage list vms | colorize -e ${VM_NAME}

print - VM current settings:
VBoxManage showvminfo ${VM_NAME}

print - Set some VM options:
VBoxManage modifyvm ${VM_NAME} --cpus 2 --memory 512 --vram 12

print - Changed VM settings:
VBoxManage showvminfo ${VM_NAME} | grep "Memory size" | colorize -e '[0-9MB]$' -e ''

print - Configuring a Virtual Network Adapter
VBoxManage modifyvm ${VM_NAME} --nic1 bridged --bridgeadapter1 eth0

print - Adding SATA:
VBoxManage storagectl ${VM_NAME} --name ${SATA_NAME} --add sata --portcount 2 --bootable on
VBoxManage showvminfo ${VM_NAME} | grep -i storage | colorize -e ${SATA_NAME}

print - Attaching ISO:
VBoxManage storageattach ${VM_NAME} --storagectl ${SATA_NAME} --port 0 --device 0 --type dvddrive --medium ${ISO_FILE}
VBoxManage showvminfo --details ${VM_NAME} | grep "^${SATA_NAME}" | colorize -e ${SATA_NAME} -e "${ISO_FILE}"

print - VM net config:
VBoxManage showvminfo ${VM_NAME} | awk '/^NIC/ && !/^NIC .* disabled/' | colorize -e "^NIC \+[0-9]\+" -e "MAC: [^,]\+" -e "Type: [^,]\+"

print - Starting VM:
VBoxManage startvm ${VM_NAME} | colorize -e ${VM_NAME}

print "Press <Enter> to finish"
read

print - Powering VM off:
VBoxManage controlvm ${VM_NAME} poweroff
until $(VBoxManage showvminfo ${VM_NAME} | grep -q powered.off); do echo -n "."; sleep 1; done; sleep 2

print - Destroying VM:
VBoxManage unregistervm ${VM_NAME} --delete

print - Listing VMs:
VBoxManage list vms

exit
#
#The end
#


Could I add this script to the user manual, creating a new chapter named: "Peropesis live booting by using managing VirtuaBox from CLI"?

Thoughts about importing a package manager

by sskras, Monday, November 14, 2022, 13:45 (13 days ago) @ g

Sure, but I would like to assign a license to it before this.


This brings me to the next question: Licensing the Peropesis data and local code.


Documentation is a data, and in the open source world it's usual to use some type of Creative Commons license for it. Eg. "CC0 v1.0 Universal"


Then shell scripts are more like code. And I tend to use permissive licenses for my shell scripts. Top ones are MIT, BSD and Apache 2.0 licenses.


But my issue is that two of them doesn't deal with patents + the 3rd one deals in a quite complex way (from the point of view of non-law person). So it's hard for me to choose between them.


Recently I found another license which is basically the same, while being crafted by a professional lawyer from the Intellectual Property area Kyle E. Mitchell, and which is a lot more readable by a non-lawyer:
https://writing.kemitchell.com/2019/03/09/Deprecation-Notice.html


So I want to publish this shell code under Blue Oak Model license. So it gets the appropriate (small) header, so the person who distributes/modifies it further would know what is the deal.


In other words: this is to avoid legal ambiguity in the future.
https://softwareengineering.stackexchange.com/questions/148146/open-source-code-with-no...


I think one line should be enough, likes this:
https://github.com/ioistired/dirserver/blob/42b69e37acf16a2fb9a01824841f4b171dcb1128/ut...


Would you be willing to add such header to your version of the script?
If not, what are your thoughts about the whole license thing?

Thoughts about importing a package manager

by g, Tuesday, November 15, 2022, 09:05 (12 days ago) @ sskras

I agree with all your requests and have already added this line (# SPDX-License-Identifier: BlueOak-1.0.0) to the script, that was published in the forum. If any additional information (author, version, etc.) is required, please write a full version, I'll adjust it.

Thoughts about importing a package manager

by sskras, Tuesday, November 15, 2022, 09:49 (12 days ago) @ g

Thanks. And I extended it to the two lines at the moment:
https://github.com/sskras/reactos/blob/main/build-vbox-OVA-from-ISO.sh#L3-L4


The 3rd line now would probably be nice too:


# SPDX-FileContributor: Modified by Gediminas Mockus | g


... or something like that (if you don't mind the occupied space in the script header).


Now if I backport some of your changes back to my repo, I am surely going to add this line to the file too.

Thoughts about importing a package manager

by g, Tuesday, November 15, 2022, 10:35 (12 days ago) @ sskras

I changed License header. Thank you for a useful script.

Thoughts about importing a package manager

by sskras, Monday, November 21, 2022, 15:45 (6 days ago) @ g

Thanks. For the reference, I got the idea of using SPDX file tags here:

https://spdx.github.io/spdx-spec/file-tags/#h2-format

Thoughts about importing a package manager

by g, Tuesday, November 22, 2022, 17:35 (4 days ago) @ sskras

Link does not work.

Thoughts about importing a package manager

by sskras, Tuesday, November 22, 2022, 20:04 (4 days ago) @ g

Thoughts about importing a package manager

by g, Wednesday, November 23, 2022, 08:19 (4 days ago) @ sskras

Well, as I understand in this article, you have described the license header very similar.

Final points about using SPDX header

by sskras, Wednesday, November 23, 2022, 13:30 (4 days ago) @ g

Yes, and that's just to point out (for anyone possibly interested) that I reused some modern form (instead of using the oldschool headers or inventing my own one).

Just to be clear about where did the headers format come from.
Or maybe to get some additional fields into the script in the future (if any).


PS. I noticed that I can change $Subject during a reply, so now I wrote something else instead of the default "Thoughts about importing a package manager" value. Let's see what comes up out of that. :)

Thoughts about importing a package manager

by longradix, Tuesday, November 15, 2022, 15:42 (12 days ago) @ g

I like the idea of having a command-line package manager. My preference would be to first have a series of well-tested releases with a solid variety of packages that people will actually want to use and then do a release with for example pkgsrc included.

Thoughts about importing a package manager

by g, Thursday, November 17, 2022, 10:35 (10 days ago) @ longradix
edited by g, Thursday, November 17, 2022, 10:55

1. Well, it is probably inevitable that more basic software packages should be added to this distribution in the future in order to make it more universal. The question that remains to be answered is what packages should be included (apart those, that already exist) in this distribution in the next releases. Keeping in mind of course that the system must remain command-line type.


P.S. For the purpose of more universal use, it is already planed that all the software specified in this list should be included in full.


2. System testing, as far as I understand, depends on the circle of interested people, or do you have in mind some other testing method?


3. As I understand sskras wants to explore this system independently and make adjustments (package-management system in this case) to it for fun. I think this is a good idea, because it would be possible to use his discoveries later. Of course, if only the developer would be willing to consult.

Thoughts about importing a package manager

by longradix, Thursday, November 17, 2022, 17:59 (9 days ago) @ g

Agreed with your points. With testing I mean more organically: people providing feedback and patches based on real-world use with actual applications built with Peropesis.

Thoughts about importing a package manager

by g, Saturday, November 19, 2022, 10:34 (8 days ago) @ longradix

Regarding the testing, I agree, which is why I take your comments very seriously (due to the need to install a text editor, SQLite and a larger screen). Once these tools will be installed, it will be easier to write programs and when the programs will be written and it's time to compile them it will be clear whether the compilers work well or not.


Copyright © 2021 - 2022 Peropesis. See license terms.
E-mail: info(at)peropesis.org