pfSense Support Subscription

Author Topic: submitting PRs for packages in the pfSense/FreeBSD-ports repo?  (Read 556 times)

0 Members and 1 Guest are viewing this topic.

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #15 on: October 04, 2017, 02:42:23 pm »
Well yes you can squash things locally... what you linked regarding GitHub squash feature however is unusable for anyone without merge (and apparently for people with merge privs as well due to the workflow).
Do NOT PM for help!

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21402
  • Karma: +1433/-26
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #16 on: October 04, 2017, 02:44:32 pm »
Yeah but the question is if you can squash to your own PR after creating the PR, before it gets merged. I'll have to try to test that out.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline bmeeks

  • Hero Member
  • *****
  • Posts: 3170
  • Karma: +820/-0
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #17 on: October 04, 2017, 04:46:21 pm »
Another helpful tip that benefits the pfSense guys during code review is to break your package changes into a series of commits instead of one giant commit.

While that is nice for review, it makes it more difficult for us to cherry-pick that change to other branches, such as copying the commit(s) from devel to RELENG_2_4_0, RELENG_2_3, and RELENG_2_3_4.

It's nice to have them all squashed into a single commit before it's merged, but we have some scripts that help us deal with that so it's not the end of the world.

Didn't realize it complicated the cherry picking process.  I'm not a GitHub guru, though.  Based on the conversations that followed in this thread, it looks like there are pros and cons each way (multiple commits versus single giant commit).

Bill

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #18 on: October 04, 2017, 04:53:49 pm »
Those giant commits definitely suck when searching for regressions. Plus mostly unusable with GitHub web interface, it just won't show anything lots of times, instead complaining about the query taking too much time etc.
Do NOT PM for help!

Offline marjohn56

  • Sr. Member
  • ****
  • Posts: 543
  • Karma: +52/-2
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #19 on: October 16, 2017, 04:14:41 pm »
Yeah but the question is if you can squash to your own PR after creating the PR, before it gets merged. I'll have to try to test that out.

Yes you can, that's what I do now after initially having a load of commits for typos and additions in my earlier PR's. Now I do a git rebase -i HEAD~x locally, where x is the number of commits to squash and then a git push origin whatever-im-doing --force

That syncs it all up nicely. I'm 99.9% certain the PR still points at the branch if I've issued a PR from, that's what the a quick Google of Git says too. My testers end up with one nice patch ID and you end up with a single commit.
pfSense 2.4.3 on Qotom Q355G4 or APU2C4 - Billion 8800NL (bridge) - ISP Zen U.K.
Please do not PM me for help. I have a life to live too.

Offline loonylion

  • Jr. Member
  • **
  • Posts: 33
  • Karma: +3/-0
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #20 on: December 13, 2017, 08:26:30 am »

...

 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).

...

Bill

It doesn't work because there's files in the repo with names reserved by Windows (specifically 'LPR' IIRC) I think its probably a holdover from the DOS days but maybe they're still used internally in Windows.

Offline marjohn56

  • Sr. Member
  • ****
  • Posts: 543
  • Karma: +52/-2
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #21 on: December 13, 2017, 08:31:45 am »
You can do all of the pfSense stuff itself in Windows Git Desktop, the FreeBSD ports fails due to the Japanese folder which windows does not like due to some of the folder names.

I use a VM FreeBSD with GUI for the FreeBSD ports. Doing the commits on that is a bit more long winded as it all has to be done from a shell.
pfSense 2.4.3 on Qotom Q355G4 or APU2C4 - Billion 8800NL (bridge) - ISP Zen U.K.
Please do not PM me for help. I have a life to live too.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21402
  • Karma: +1433/-26
    • View Profile
Re: submitting PRs for packages in the pfSense/FreeBSD-ports repo?
« Reply #22 on: December 13, 2017, 08:49:15 am »
Ideally anything dealing with FreeBSD-ports should happen on a FreeBSD system at some point (either directly or in a secondary capacity) because then you have access to tools like portlint which can check the port structure to ensure it's complete and correct before committing changes, for example it will flag problems with the formatting or content of the Makefile.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!