[Question]Making your very own "ports" system

Greetings.
I was a BSD user a long time ago, and I just came back to the squad this week. I knew BSD variants are easy to hack and this is what make them awesome! But I have a problem in the process of hacking.
I just changed the system name variable in `newvers.sh` file and it's not FreeBSD anymore. And when I try to make a port, it says there's a variable which doesn't match. I think the ports system checks output of `uname` and this is why it doesn't work.
What should I do now, to customize ports system?
 
Instead of making your own port system, back up one step: Why are you changing the system name? What is that supposed to accomplish? It seems from your description that right now it only has a negative side-effect (namely preventing you from using ports), and I don't see a positive benefit from it.
 
Instead of making your own port system, back up one step: Why are you changing the system name? What is that supposed to accomplish? It seems from your description that right now it only has a negative side-effect (namely preventing you from using ports), and I don't see a positive benefit from it.

It's just experimenting with the operating system and nothing more. I'm currently doing it again, and I will tell you what the error exactly says.
 
You should (of course) find out where it (the ports system) breaks, and fix it so it works again. /usr/ports/Mk would be a place to start.

Well, I did make a release and this is the result of "uname -v" :
Bash:
uname -v
# TestOS 1.0-RELEASE GENERIC

This is fine, but when I go to a port and start making it ("make clean install") it says something like somewhere in /usr/ports/Mk/bsd.port.mk , the variables OSVERSION (which I should change I think) and UNAME_r are not matching what they should actually be.
 
The OP does not talk about the motivation and intentions behind his desire, which could be commercial or just evil. No word has been said on licenses.

Our support should not include the help for damaging, deceiving or fraud.
 
To me that looks like OP is trying to make a vanity fork of the OS. Not evil, just an extremely stupid idea. A good way to damage your reputation as well.
 
The OP does not talk about the motivation and intentions behind his desire, which could be commercial or just evil. No word has been said on licenses.

Our support should not include the help for damaging, deceiving or fraud.

It's not fraud or damaging. It's just something in case of curiosity. Just experimenting with operating systems and how they work.
 
Yeah! Mad or bad? That is the question.
Actually, there are many other options. I am going with "well intended, not knowledgeable, and silly".

Completely changing the name of the OS wil have very nasty side effects, in unexpected places. For example: there is lots of software that checks the name of the OS and adjusts behavior accordingly. One common place this happens is selecting where files are stored, like in Linux package configuration files are in /etc/ and binaries installed in /usr/bin, on FreeBSD this is /usr/local/etc and /usr/local/bin, and in AIX it's /etc/ and either /opt or /usr/lpp, and so on. All these tests will break on "TestOS". But if the OP is just on a voyage of discovery, and doesn't have an expectation that this will function correctly, it can be interesting to see what breaks: learn by destroying (and putting it back together).

But a warning: The copyright on *BSD requires that the system identify itself. Read the FreeBSD copyright notice sometime, and try to not violate it.
 
This is fine, but when I go to a port and start making it ("make clean install") it says something like somewhere in /usr/ports/Mk/bsd.port.mk , the variables OSVERSION (which I should change I think) and UNAME_r are not matching what they should actually be.
Then you have to identify how bsd.ports.mk creates or sets the value of OSVERSION and UNAME_r, and anything else that breaks. When you have, you need to change those places so the ports build system works with the values your OS generates.
 
Back
Top