# How to make/maintain a port



## Ancient (Mar 21, 2019)

I've learning that some of the soft here is discontinued. I want to know how to maintain, making it. And what is "porting"? It is something alike about to bring a program here, or I am wrong? Of course I'm reading the handbook. In fact, I found that there is a "porter handbook". I'm reading the chapter 2, but it says few things. Which is the chapter or handbook that describes the process? Perhaps I could bring some things...


----------



## Ancient (Mar 21, 2019)

Do you think it will be less dangerous if I develop one in a jail? Or it will be more difficult/complex?


----------



## hukadan (Mar 21, 2019)

Ancient said:


> And what is "porting"?


There is an entire handbook dedicated to porting : https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/.


----------



## SirDice (Mar 21, 2019)

Ancient said:


> And what is "porting"?








						Porting - Wikipedia
					






					en.wikipedia.org
				






Ancient said:


> Which is the chapter or handbook that describes the process?


What process? You build the port, test it and submit the patch with a PR. Creating the port is described in the Porter's handbook.



Ancient said:


> Do you think it will be less dangerous if I develop one in a jail?


I typically use a throw-away VM for test purposes.


----------



## Ancient (Mar 21, 2019)

SirDice But you develop it inside one, or just test it?


----------



## SirDice (Mar 22, 2019)

Both.


----------



## ProphetOfDoom (Mar 22, 2019)

I found the documentation on porting _extremely _intimidating.
I've noticed with the FreeBSD documentation in general that some chapters are aimed at newbies (like the part that explains the difference between a compiler and an interpreter for Heaven's sake) and some parts are highly technical and complex (like the porter's handbook).
And it all seems to be mixed in together.


----------



## ralphbsz (Mar 23, 2019)

Feel free to improve the documentation.


----------



## drhowarddrfine (Mar 23, 2019)

AlexanderProphet said:


> some parts are highly technical and complex (like the porter's handbook).


Such things are that way out of necessity, not convenience.


----------



## trev (Mar 23, 2019)

AlexanderProphet said:


> I found the documentation on porting _extremely _intimidating.
> [...] and some parts are highly technical and complex (like the porter's handbook).



Indeed. I had occasion to check out the Porters' Handbook a couple of nights ago. The most obvious issue (to me) was that it had been written by someone/s intimately familiar with the process and as a result left some things to the imagination of those not intimately familiar with the process.

An example - the full one page section: 

*"3.3. Creating the Checksum File*

Just type `make makesum`.  The ports framework will automatically generate distinfo.  Do not
 try to generate the file  manually."

I eventually figured out by trial and error that you first needed to setup all the files in a "dummy" /usr/ports/[category]/directory for that command to work. Something which is obvious to someone intimately familiar with the process, but not to someone for whom this is a first attempt.

So I disagree with: "Such things are that way out of necessity, not convenience". Obtuseness is definitely not out of necessity.

Finally - yes, I will submit a patch or indeed patches once I have successfully completed the entire process which has been shelved for the moment while I deal with other kernel module patches.


----------



## ProphetOfDoom (Mar 23, 2019)

I'm glad it's not just me. I didn't even get as far as trying to make my own port. (I'm writing a malloc profiler). I just read a few pages about porting and then... Well I don't drink alcohol but if I did then I would have needed a stiff drink.
Has anyone written a tutorial?


----------



## ProphetOfDoom (Mar 24, 2019)

Pyret that is so true. Didn't Einstein say something like "If you can't explain it to a six year old, you don't understand it yourself."
I'm not attacking the volunteers who write all the this stuff - I think it's normal for technical documentation to be inscrutable. But "normal" isn't the same as "good" and communicating ideas is so important - just as important as having the ideas in the first place.


----------



## drhowarddrfine (Mar 24, 2019)

pyret What I'm saying is that when one communicates highly technical elements, one must speak in terms that are sometimes highly technical and not meant for students or beginners. These terms are often not difficult for the professional to understand and they must be written in a way for them to properly get the job done without the nuances a student may need. The Handbook may be at different levels of writing--on a technical level--that one may find difficult to understand but you might ask, "What's the problem?".


----------



## mod3777 (Mar 24, 2019)

AlexanderProphet said:


> I found the documentation on porting _extremely _intimidating.
> I've noticed with the FreeBSD documentation in general that some chapters are aimed at newbies (like the part that explains the difference between a compiler and an interpreter for Heaven's sake) and some parts are highly technical and complex (like the porter's handbook).
> And it all seems to be mixed in together.



I can agree!


----------



## chrbr (Mar 25, 2019)

I think that the documentation is very good. For the first step consider to port something which has almost no dependencies. I have done my first steps with setserial just to see how things work. I am very sure that this is doable for anybody and good as an exercise. My main issues are lack of experience with things as github and similar. But this is a different story and more severe ;-).


----------



## ProphetOfDoom (Mar 25, 2019)

So if the documentation on packaging _has_ to be highly technical, that raises a question: what should I read _first_? If I wanted to study calculus I'd read algebra. What do I need to read to learn FreeBSD packaging?


----------



## ProphetOfDoom (Mar 25, 2019)

I meant porting not packaging.


----------



## SirDice (Mar 26, 2019)

I suggest you start by updating an existing and unmaintained port. That way you already have a base to work with and you can get familiar with the process.


----------



## BeastieLabs (Oct 26, 2019)

I have been looking for a tutorial, video, youtube, blog etc and etc and etc with the steps of how to create a port or how it is updated and I have not found it anywhere .. I want to learn and it is true that the technical language It is necessary sometimes because it is as it should be said so that things work well but I admit that I also do not understand the official manual for ports .. it would be good if someone with experience can make a guide or something easy to understand for those of us who are newbbies and we want to contribute with the ports. A link takes me to another link just to find out how it was to find outdated packages and I'm still confused .. Maybe there are no more maintainers because those who want to try do not find a less difficult way to learn how to do it, sure that when we have a base of the process we could do the rest by ourselves


----------

