Development/Documentation > Development

submitting PRs for packages in the pfSense/FreeBSD-ports repo?

(1/5) > >>

luckman212:
I'm a relative beginner at git/GitHub and still learning new things every day. So forgive my ignorance on this!

I was trying to submit a small patch for the HAProxy package today and ran into some trouble. I worked around it but am not sure if I've done so correctly. My typical workflow when working on patches to the main pfsense/pfsense repo has been:

1) fork the main repo on GitHub
2) clone my fork of the repo
3) hack hack hack
4) commit + push

When I tried that on the pfsense/FreeBSD-ports repo, I ended up with a clone that was missing all of the files I needed. Specifically, all of the pfSense-pkg-xxxx directories which contained the files I was trying to update were just not there. What I ended up doing instead was cloning the original repo, hacking on that, and then pushing the commits, like this:


--- Code: ---git clone git@github.com:pfsense/FreeBSD-ports.git my-foobar-patch
cd my-foobar-patch
git remote set-url origin git@github.com:luckman212/FreeBSD-ports.git
git checkout -b my-foobar-patch

~ HACK HACK HACK ~

git ls-files --modified | xargs git add
git commit
git push origin my-foobar-patch
--- End code ---

That worked.  So, questions are:

1) why did that happen?
2) have I done this the "right" way?

Thanks all

heper:
I don't use git enough to remember how/why I get it to fuck up.

For small changes like this, I find it much easier to use the online editor on GitHub

luckman212:
Forgot to add -- I tried that first, and GitHub gave me an error. Wish I took a screenshot of that, but TL;DR it failed.  Even if you use the online editor, it requires you to have your own fork of the project so that doesn't really get to the root of the issue.  My best guess at this point is that maybe I had an old fork of FreeBSD-ports before the "default" branch was switched to 'devel'? I do see that the 'master' branch does not contain the pfSense-pkg-xxx dirs, only devel. So maybe my fork was old and when I cloned and rebased it just sync'd to master. Who knows, I have since deleted the fork and all the branches and started w/ a clean slate.

Still looking for an answer to question #2 -- is this the "right" way to hack on pfSense?

bmeeks:
FIrst question ... are you trying this using the Windows Git client or are you using a Linux workstation?  I ran into the exact same problem with the Windows Git client.  It just does not like the FreeBSD-ports repository for some reason (or at least it never worked for me).  I instead use a CLI based version of Git on a FreeBSD virtual machine and everything works fine.

You should submit pull requests against the DEVEL repository for FreeBSD-ports.  The pfSense guys will do the merging to the pfSense release branch.

Bill

luckman212:
Using macOS - git 2.14.2 from Homebrew

Navigation

[0] Message Index

[#] Next page

Go to full version