Re: Porting Practice

2020-07-05 Thread Brandon helsley
  
  
  
# svn diff sysutils/toybox  >  /home/vidar/portdiffs/sysutils_toybox-0.8.4.diff
  

  
Yes the whole message cleared it up. But right here now I see 
/home/vidar/portdiffs/sysutils_toybox-0.8.4.diff is where you keep the diff 
before submiting it.
  

  

  

  
  
  
  
  
>   
> On Jul 5, 2020 at 9:09 AM, Vidar Karlsenwrote:
>   
>   
>   >  On 5 Jul 2020, at 16:42, Brandon helsley
> wrote:  >   >>  For making changes to a port, I find ’svn diff’ to be the 
> easiest way by far. I tend to do this:  >>  1. svn up my work-in-progress 
> ports tree  >>  2. Make the changes and run tests (portlint, poudriere 
> testport etc)  >>  3. cd /ports; svn diff thecategory/theport  >  
> /portpatches/thecategory_theport_version.diff  (change the paths to the dirs 
> of your choice)  >>  4. Upload the .diff file to Bugzilla  >>   >>  Since I 
> use svn in step 1, svn takes care of tracking the changes so I don’t need to 
> keep .orig files and run diff by hand.  >>   >>  The diffing that Jonathan 
> mentioned is more applicable if you have to make changes to the upstream code 
> itself in order for it to work on FreeBSD. I personally do that in the port’s 
> ‘work’ dir and create the patches with ‘make makepatch’, and there I need to 
> create .orig files (cp  file.c   file.c.orig  before making changes).  >   >  
>  >  Could you please go into more detail about what you mean in step one and 
> three, I am getting really close to figuring out how this works. In step 
> three I don't understand "cd /ports" or 
> "portpatches/thecategory_theport_version.diff" Absolutely! In step 1 I use 
> svn to download the latest revision of the ports tree into a location I use 
> for this purpose. In many cases for me this has been /ports because I like to 
> keep /usr/ports “clean”/uncluttered by my own fiddling. I’m not sure if you 
> have been doing it this way. In case not, it’s as simple as doing: # mkdir 
> /ports # svn co  https://svn.freebsd.org/ports/head  /ports To update this 
> copy of the tree later on (next time), run ’svn up’ in the same dir. For a 
> real-ish example for step 3, let’s assume I’m upgrading sysutils/toybox. When 
> it’s ready to be submitted, I would do this: # cd /ports (or whichever dir 
> you choose to checkout the ports tree) # svn diff sysutils/toybox  >  
> /home/vidar/portdiffs/sysutils_toybox-0.8.4.diff  And then create a PR and 
> upload the diff file. You don’t have to specify the category/port for 'svn 
> diff', but it makes it go faster as it won’t have to scan for changes in any 
> other places than what you specify. Hope this cleared it up, Vidar Karlsen 
> ___ freebsd-ports@freebsd.org  
> mailing list  https://lists.freebsd.org/mailman/listinfo/freebsd-ports  To 
> unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"  
>   
 
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


RE: Porting Practice

2020-07-05 Thread Brandon helsley
For making changes to a port, I find ’svn diff’ to be the easiest way by far. I 
tend to do this:
1. svn up my work-in-progress ports tree
2. Make the changes and run tests (portlint, poudriere testport etc)
3. cd /ports; svn diff thecategory/theport > 
/portpatches/thecategory_theport_version.diff (change the paths to the dirs of 
your choice)
4. Upload the .diff file to Bugzilla

Since I use svn in step 1, svn takes care of tracking the changes so I don’t 
need to keep .orig files and run diff by hand.

The diffing that Jonathan mentioned is more applicable if you have to make 
changes to the upstream code itself in order for it to work on FreeBSD. I 
personally do that in the port’s ‘work’ dir and create the patches with ‘make 
makepatch’, and there I need to create .orig files (cp file.c file.c.orig 
before making changes).


Could you please go into more detail about what you mean in step one and three, 
I am getting really close to figuring out how this works. In step three I don't 
understand "cd /ports" or "portpatches/thecategory_theport_version.diff"

From: owner-freebsd-po...@freebsd.org [owner-freebsd-po...@freebsd.org] on 
behalf of Vidar Karlsen [vi...@karlsen.tech]
Sent: Sunday, July 5, 2020 2:18 AM
To: Brandon helsley
Cc: freebsd-ports
Subject: Re: Porting Practice

> On 5 Jul 2020, at 02:46, Brandon helsley  wrote:

[…]

> The documentation for (diff -u) says "To create a suitable diff for a single 
> patch, copy the file that needs patching to something.orig, save the changes 
> to something and then create the patch:"
> % diff -u something.orig something > something.diff
>
> Im not sure really the meaning of this documentation. What file needs 
> patching, which file to copy, where to save changes to exactly, and how and 
> why the svn method is different. Which method should I choose? I know it says 
> that unified diff and svn are preffered but since I am new maybe the (diff 
> -u) command would be easier to begin with? Please help and include anything 
> that's relevant even if i didn't mention it. I'm really excited to get 
> started and will absorb like a sponge any know how that's offered!!!

For making changes to a port, I find ’svn diff’ to be the easiest way by far. I 
tend to do this:
1. svn up my work-in-progress ports tree
2. Make the changes and run tests (portlint, poudriere testport etc)
3. cd /ports; svn diff thecategory/theport > 
/portpatches/thecategory_theport_version.diff (change the paths to the dirs of 
your choice)
4. Upload the .diff file to Bugzilla

Since I use svn in step 1, svn takes care of tracking the changes so I don’t 
need to keep .orig files and run diff by hand.

The diffing that Jonathan mentioned is more applicable if you have to make 
changes to the upstream code itself in order for it to work on FreeBSD. I 
personally do that in the port’s ‘work’ dir and create the patches with ‘make 
makepatch’, and there I need to create .orig files (cp file.c file.c.orig 
before making changes).


Hope this helps,
Vidar Karlsen
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


RE: Porting Practice

2020-07-05 Thread Brandon helsley
In general:
 1. extract the original sources elsewhere
 2. hack it to compile
 3. compare the hacks against the original sources again to generate diffs.
 4. put the diffs into the files/ directory of the port
 5. Tweak the Makefile for all targets (fetch, extract, build, stage, etc)


Im not sure what "original sources" means or "hack it to compile". Really would 
you please go into more detail about the first three steps and explain the 
targets in step five? I understood your first message well and can get the 
nvidia-settings.patch placed in /tmp/ but before that step when I am supposed 
to... get the port working in my working directory I get stuck.

From: Jonathan Chen [j...@chen.org.nz]
Sent: Saturday, July 4, 2020 7:07 PM
To: Brandon helsley
Cc: freebsd-ports
Subject: Re: Porting Practice

On Sun, 5 Jul 2020 at 12:47, Brandon helsley
 wrote:
>
> I have gotten a couple of emails from portscout about ports that need updated 
> and maintained. Before I go about updating and maintaining these ports I 
> wanted to do some practice on a couple that I use like x11/nvidia-settings. I 
> have recieved alot of help on the forums and from the documentation, but i'm 
> still at a loss as to how the diff process works.
[...]

This is my personal workflow:
 1. Take a simple copy of the port into my working directory
 2. Get the port working in my working directory.
 3. cd my-working-directory
 4. diff -ruN /usr/ports/x11/nvidia-settings . > /tmp/nvidia-settings.patch
 5. submit patch onto bugs.freebsd.org

Hope that helps.
--
Jonathan Chen 
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Porting Practice

2020-07-04 Thread Brandon helsley
 

 
 
 
 
This is my personal workflow:
 
  1. Take a simple copy of the port into my working directory
 
  2. Get the port working in my working directory.
 
  3. cd my-working-directory
 
  4. diff -ruN /usr/ports/x11/nvidia-settings .  >  /tmp/nvidia-settings.patch
 
  5. submit patch onto bugs.freebsd.org
 

 
Hope that helps.
 
 

 

 
Yes it does, I understand how it works now, I just needed an example, and I can 
compare this with other methods to figure it out. How do you get the port 
working in your directory? Is it poudriere testport? Thanks a ton.
 

 

 

 
 
 
 
 
>  
> On Jul 4, 2020 at 7:08 PM, Jonathan Chenwrote:
>  
>  
>  On Sun, 5 Jul 2020 at 12:47, Brandon helsley
> wrote:  >   >  I have gotten a couple of emails from portscout about ports 
> that need updated and maintained. Before I go about updating and maintaining 
> these ports I wanted to do some practice on a couple that I use like 
> x11/nvidia-settings. I have recieved alot of help on the forums and from the 
> documentation, but i'm still at a loss as to how the diff process works. 
> [...] This is my personal workflow: 1. Take a simple copy of the port into my 
> working directory 2. Get the port working in my working directory. 3. cd 
> my-working-directory 4. diff -ruN /usr/ports/x11/nvidia-settings .  >  
> /tmp/nvidia-settings.patch  5. submit patch onto  bugs.freebsd.org  Hope that 
> helps. -- Jonathan Chen  chen.org.nz>
>  
 
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Porting Practice

2020-07-04 Thread Brandon helsley
I have gotten a couple of emails from portscout about ports that need updated 
and maintained. Before I go about updating and maintaining these ports I wanted 
to do some practice on a couple that I use like x11/nvidia-settings. I have 
recieved alot of help on the forums and from the documentation, but i'm still 
at a loss as to how the diff process works. Also, i've gotten stuck at a few 
spots along the way. I use svn to checkout a copy of the nvidia-settings port 
which has no maintainer. The copy goes into my root directory either in a work 
directory or not. After I make the changes to the files and issue the command...

MAKE CONFIG:root@machine17:/usr/ports/x11/nvidia-settings # make config
===> No options to configure

make patch and make configure both work.

PORTLINT:root@machine17:/usr/ports/x11/nvidia-settings # portlint
WARN: Makefile: Consider adding support for a NLS knob to conditionally disable 
gettext support.
0 fatal errors and 1 warning found.

So once I get past this point and have succesfully tested the port with 
portlint and poudriere testport, I'm confused as to how I am supposed to build 
the package, and create a suitable diff to patch the port either with svn or 
diff -u.

The documentation for (diff -u) says "To create a suitable diff for a single 
patch, copy the file that needs patching to something.orig, save the changes to 
something and then create the patch:"
% diff -u something.orig something > something.diff

Im not sure really the meaning of this documentation. What file needs patching, 
which file to copy, where to save changes to exactly, and how and why the svn 
method is different. Which method should I choose? I know it says that unified 
diff and svn are preffered but since I am new maybe the (diff -u) command would 
be easier to begin with? Please help and include anything that's relevant even 
if i didn't mention it. I'm really excited to get started and will absorb like 
a sponge any know how that's offered!!!

One last thing. I have not attempted a poudriere testport today but for the 
last ten or so times I have tried, my computer shuts down after a few minutes 
of testing. Is this a overheating or is it some kind of another problem?
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Port maintenance

2020-06-29 Thread Brandon helsley
  

  
  
  
Okay, I use the nvidia 390 driver and nvidia-xsettings, but they both have no 
maintainer. I read all the material about what the responsibilitys are for a 
maintainer and I think I can do a couple. I got a message from portscout about 
a couple of ports that needed updated. I didn't sign up for any yet but could 
start there. How do I set my email address to maintainer? I will begin soon 
after I reread the documentation for contributing to ports and maybe ask a few 
more questions as they arise.
  

  

  

  
  
  
  
  
>   
> On Jun 28, 2020 at 4:23yPM, Michael Gmelinwrote:
>   
>   
>   >  On 29. Jun 2020, at 00:18, Brandon helsley  
>   wrote:  >   >    >   >   >   >   >  I'm 
> getting started reading the porters handbook. I was wondering if I can adopt 
> a port to practice maintaining one without the experience to keep it properly 
> updated at first. I'm a little intimidated by contributing and not sure how 
> best to learn the porters handbook. I guess read it multiple times?  >   >  
> Just pick a port that’s unmaintained and that you’re actually using yourself 
> (ideally on a daily basis). When you do changes, make sure: - it builds 
> cleanly in poudriere. - it passes portlint. - you follow the porter’s 
> handbook as good as you can, but without freaking out about it. In case 
> you’re uncertain, ask questions on this mailing list. Open PRs in bugzilla or 
> (in the beginning) reviews in phabricator. Committers will help you. Either 
> it will work, or you will learn. No one will judge you, so no worries. 
> Cheers, Michael  >   >   >   >   >   >   >   >  
> ___  >  freebsd-ports@freebsd.org 
>  mailing list  >   https://lists.freebsd.org/mailman/listinfo/freebsd-ports   
> >  To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"  
>   
 
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Port maintenance

2020-06-28 Thread Brandon helsley
 

 
 
 
I'm getting started reading the porters handbook. I was wondering if I can 
adopt a port to practice maintaining one without the experience to keep it 
properly updated at first. I'm a little intimidated by contributing and not 
sure how best to learn the porters handbook. I guess read it multiple times?
 

 

 

 
 
 
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"