# Looking for documentation to build his own port



## cyrille (Apr 18, 2020)

Hello
I've developed  some python applications.
Under debian I know build .deb packages (debuild) to manage my own packages and, now, I'm looking for documentation to do the same but under freeBSD, like a how-to with a example...

Do you know if it exists ?

Thanks


----------



## obsigna (Apr 18, 2020)

FreeBSD Porter's Handbook
					

Essential reading if you plan on providing a port of a third party piece of software




					www.freebsd.org


----------



## shkhln (Apr 18, 2020)

gpb said:


> I submitted a port and in 3 months nothing has been done with it.



The approval process is completely random if that is any consolation.


----------



## obsigna (Apr 18, 2020)

shkhln said:


> The admission process is completely random if that is any consolation.


The OP didn't even say that he wants his port to be publicly available. In case not, he simply need to follow the directions in the Porter's Handbook and forget the submission part. I got three ports in the FreeBSD's public ports tree and the initial submission as well as updating went smooth, and were acted upon by somebody within a week or so.


----------



## shkhln (Apr 18, 2020)

Well, as a counterpoint, I submitted a port exactly 2 months ago with a committer already lined up. It's still not in the tree despite 0 people having any issues with the port itself. We'll get there in a week or two, though.


----------



## cyrille (Apr 18, 2020)

Thanx for the link, I'll read it asap
It's not to submitted packages (I'm not sure they interest many people)
it just to build my own packages and  manage it easier


----------



## Alexander88207 (Apr 18, 2020)

gpb said:


> Don't waste your time.  I submitted a port and in 3 months nothing has been done with it.



You must know its written in the documentations that it can take a few months 

_"After submitting the port, please be patient.  The time needed to include a new port in FreeBSD can vary from a few days to a few months."_


----------



## chrbr (Apr 20, 2020)

cyrille said:


> Thanx for the link, I'll read it asap
> It's not to submitted packages (I'm not sure they interest many people)
> it just to build my own packages and manage it easier


I have tried that some time ago with a software with no dependencies at all. If I am not wrong I have generated a port which I have added to the local copy of the repository by `svn add` or so. I do not remember the details. The svn update has not deleted that port.


----------



## zirias@ (Apr 20, 2020)

gpb said:


> Don't waste your time.  I submitted a port and in 3 months nothing has been done with it.


3 months are a long time, but it's not _entirely_ uncommon. If this is your first port submission, maybe there are some issues with it and nobody found the time yet to analyze in depth. Writing a port correctly and robust takes time and practice, despite all the good documentation available -- BTDT. But of course, it might as well just have gone unnoticed so far.

Please don't ever think you wasted your time here. The FreeBSD ports tree is really large, which is a huge benefit for all users, and this certainly wouldn't be possible with only committers doing all the work -- so keep it up 

Once you are already known to some committers (for submitting good patches regularly), it's more likely someone will review your submissions sooner. Still, I also have one new port sitting for a month now -- we will see -- but I'm also maintaining 6 ports that are already in the tree.

If you are sure your port is fine (it should at least pass `portlint` and a `poudriere testport` without any issues reported in the Q/A checks, perfect would be tests on all supported FreeBSD versions for all tier-1 architectures, but that's no requirement, I don't do that either ...) and it really took a long time without anything happening, you might want to kindly ask on the freebsd-ports mailing list for a review. A lot of committers read there and chances are good someone will have a look.


----------



## diizzy (Apr 22, 2020)

gpb
Processing time is usually faster than what you've experienced, do you have PR number?


----------



## obsigna (Apr 22, 2020)

Just the day before yesterday, I submitted an update to my sysutils/clone. See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245777

The update has been processed in apprx. 15 hrs from me submitting the PR to fernape@ commiting it to head and closing the PR as fixed. The update is already in the ports, and I consider less than 24 hrs an exceptional perfect response time.

In the past, when I submitted the initial ports, it took max. one week - if I remember correctly.


----------



## George (Apr 22, 2020)

> I submitted a port and in 3 months nothing has been done with it.



This happened to me too. I ended up closing the bugzilla (giving up). ;D

The main problem is the lack of feedback.
There is also no 'terms of use' (Under which condition must a Ports committer approve the port? What is a port allowed to do, and what not? What if the port has a security flaw? What if it contains pornography? )

Also don't forget to regularly bump the bugzilla thread every few weeks. The ports committers might have forgotten about it.


----------



## zirias@ (Apr 22, 2020)

Elazar said:


> This happened to me too. I ended up closing the bugzilla (giving up). ;D


Why? 


Elazar said:


> Under which condition must a Ports committer approve the port?


Trivially, always, as someone must commit it.


Elazar said:


> What is a port allowed to do, and what not?


The Porter's Handbook should answer that.


Elazar said:


> Also don't forget to regularly bump the bugzilla thread every few weeks.


I wouldn't recommend doing that (unless, of course, you have relevant updates/improvements). As written earlier, if you are sure there's nothing "wrong" with your port and suspect it was just overlooked by everyone -- kindly ask on freebsd-ports@ mailing list. I had to do this once so far, and response was very prompt. Maybe, even if you suspect there *could* be something wrong with the port, this mailing list might be a good place to ask for a review from someone experienced.

People, please, don't "give up". Maintaining ports is a valuable part of FreeBSD, and even if the current process isn't perfect, I think it's pretty open and welcoming (at least compared to participating in certain Linux distributions ...). Just don't forget that submitting a new port is never a "fire and forget" kind of thing, you are expected to maintain it


----------



## shkhln (Apr 22, 2020)

diizzy said:


> gpb
> Processing time is usually faster than what you've experienced, do you have PR number?



PR 244003

(I especially like the "NetRexx is the first language to run on the JVM" claim. Typical.)


----------



## zirias@ (Apr 22, 2020)

shkhln I don't think port _updates_ should ever be submitted in "shar" format, but maybe I'm wrong here? I personally wouldn't use shar at all, wondering whether anyone would still prefer it over a simple "svn diff" from the root of the ports tree ...


----------



## shkhln (Apr 22, 2020)

It's not my port. I wouldn't touch shar, of course.


----------



## zirias@ (Apr 22, 2020)

Maybe it should be removed from the Porter's Handbook. Or I'm entirely mistaken and some committers still prefer it over a diff for new ports. Or, maybe, it should just be kept because someone might want to create a new port in a tree that isn't controlled by svn. Anyways, a new port or port update just sitting there in bugzilla isn't good of course, as it can easily discourage a new volunteer. But then, if this happened to me, I would mail freebsd-ports@.


----------



## 20-100-2fe (Apr 24, 2020)

I've submitted 2 ports using shar and I've not died of a subsequent heart attack. 
In order to use svn diff, you must have checked out the ports tree before.
If you've used portsnap, you've got an error message.


----------



## Alain De Vos (Apr 24, 2020)

A very wild thought, would it be a good idea to have next to the ports tree a ports_experimental tree where people can dump anything ?
So at least it becomes available with use at own risk.
And you could in ports have a subtree broken, alfa,beta,gamma


----------



## zirias@ (Apr 24, 2020)

Arch has AUR and last time I had a look there, the quality I found was abysmal. So I wouldn't support that idea. After all, ports can easily be built "out of tree", so you have the option of sharing your "experimental" ports on your own, e.g. on github.


----------



## shkhln (Apr 24, 2020)

20-100-2fe said:


> I've submitted 2 ports using shar and I've not died of a subsequent heart attack.



Unified diffs will get you a nice patch view in Bugzilla as well as ability to compare uploaded patches against each other.



20-100-2fe said:


> In order to use svn diff, you must have checked out the ports tree before.
> If you've used portsnap, you've got an error message.



It's really not a big deal in comparison to Synth or Poudriere setup.


----------



## 20-100-2fe (Apr 24, 2020)

You're right and I wasn't advocating for shar. It's just that, IMO, port submission is certainly the last thing that would need to be improved, makefile wizardry and dependencies mess would deserve some rework first. And then the build workflow. I have an itch to try and adapt a Linux package management system (e.g. XBPS) to FreeBSD's ports.


----------



## shkhln (Apr 24, 2020)

20-100-2fe said:


> It's just that, IMO, port submission is certainly the last thing that would need to be improved



There really should be some kind of time limit at least, something discouraging reviewing new submissions out of order.



20-100-2fe said:


> makefile wizardry and dependencies mess would deserve some rework first. And then the build workflow. I have an itch to try and adapt a Linux package management system (e.g. XBPS) to FreeBSD's ports.



As much as I would like to see some improvement here, nothing of this will fly past portmgr@.


----------



## 20-100-2fe (Apr 24, 2020)

There seems to be absolutely no motivation for such improvements in the FreeBSD community, mainly because of jails. As long as jails allow to hide dust under the carpet, nobody cares. This is a common and inevitable human behavior, unfortunately not limited to IT. Anticipation is just a literature style, not a human quality.


----------

