net-mgmt/docsis Update from 0.9.6 to 0.9.8

2018-08-14 Thread Philippe Maechler


Hello FreeBSD Port Team


The docsis Port moved from   sf.net to github. 

Meanwhile they released the version 0.9.8 in october 2015

 

Can someone from the port-team update this port to reflect the changes?

 

The current version of the port 0.9.6 is marked as IGNORE. I'm not sure if
this is still correct. I installed the port on an AMD64 machine and
everything works fine so far. The cablemodems and the emta part are quit
happy with the config file generated

 

Best regards

 

Philippe

 

___
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 you maintain which are out of date

2018-08-14 Thread portscout
Dear port maintainer,

The portscout new distfile checker has detected that one or more of your
ports appears to be out of date. Please take the opportunity to check
each of the ports listed below, and if possible and appropriate,
submit/commit an update. If any ports have already been updated, you can
safely ignore the entry.

You will not be e-mailed again for any of the port/version combinations
below.

Full details can be found at the following URL:
http://portscout.freebsd.org/po...@freebsd.org.html


Port| Current version | New version
+-+
multimedia/audacious-gtk3   | 3.9 | 
audacious-3.10-gtk3
+-+
multimedia/audacious-plugins-gtk3   | 3.9 | 
audacious-plugins-3.10-gtk3
+-+


If any of the above results are invalid, please check the following page
for details on how to improve portscout's detection and selection of
distfiles on a per-port basis:

http://portscout.freebsd.org/info/portscout-portconfig.txt

Thanks.
___
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: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread Helen Koike


On 08/13/2018 09:50 PM, blubee blubeeme wrote:
> 
> 
> On Tue, Aug 14, 2018, 08:26 Helen Koike  > wrote:
> 
> 
> 
> On 08/13/2018 08:00 PM, blubee blubeeme wrote:
> >
> >
> > On Tue, Aug 14, 2018, 06:30 Helen Koike  
> >  >> wrote:
> >
> >     Hello,
> >
> >     I am new to the community, I am maintaining two packages and I
> would
> >     like to check with you if there is a better workflow to do this.
> >
> >     The upstream project of the port I am maintaining is held in
> github, and
> >     I also have patches in the /usr/ports/sysutils/myport/file/
> folder.
> >
> >     So I keep a fork of the upstream project with a branch
> containing a
> >     commit with the patches from the /usr/ports/sysutils/myport/file/.
> >
> >     Every time I need to update the port to a newer version, I do
> a git pull
> >     in this branch, then I run a script [1] to re-generate the
> patches in
> >     the /usr/ports/sysutils/myport/file/
> >
> >     This script basically generates a file.orig of all modified
> files in
> >     git, then copy the modified file to WORK_DIR, then run make
> makepatch.
> >
> >
> >     for file in ${CHANGES}; do
> >             mv ${WORK_DIR}/${file} ${WORK_DIR}/${file}.orig
> >             cp ${PROJECT_PATH}/${file} ${WORK_DIR}/${file}
> >     done
> >     make makepatch
> >
> >
> >     I would like to know if there is a better way to do this (some
> tool that
> >     I am not aware of?).
> >
> >     [1]
> >   
>  
> https://github.com/helen-fornazier/bsd-update-patches/blob/master/freebsd-gce-update.sh
> >
> >     Thanks
> >     Helen
> >
> >     ___
> >     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
> 
> >      >"
> >
> > Submit your patches upstream, once they get accepted your work on
> > FreeBSD is greatly simplified. 
> >
> > Best, 
> > Owen
> >
> 
> I am doing that, but there are some changes that I couldn't include in
> upstream yet.
> 
> Helen
> 
> Can you give an example of types of changes can't be upstream yet and
> their reasoning why not? 
> 
> Best, 
> Owen
> 

Sure, e.g. "service -e" vs "service --status-all", there is also sed vs
gsed (but it just came to mind that I could add this replacement inside
the Makefile)

[1]
https://github.com/freebsd/freebsd-ports/blob/master/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control#L54

Please, let me know if there is a better way to solve this, meanwhile I
am keeping this patch in the port and I always need to rebase my changes.

And as a general case, I sometimes implement a fix only for FreeBSD e.g.
[2], then I think in the better way to include in the upstream code e.g.
[3] while keeping portability with Linux, and sometimes it takes a while
for the patch to be merged in upstream, so meanwhile I need to rebase
the patch in every update of the ports.

[2]
https://github.com/freebsd/freebsd-ports/blob/master/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding__utils.py

[3] https://github.com/GoogleCloudPlatform/compute-image-packages/pull/622

Thanks
Helen
___
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: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread Helen Koike



On 08/14/2018 12:05 AM, Adam Weinberger wrote:
> On Mon, Aug 13, 2018 at 4:28 PM Helen Koike  wrote:
>>
>> Hello,
>>
>> I am new to the community, I am maintaining two packages and I would
>> like to check with you if there is a better workflow to do this.
>>
>> The upstream project of the port I am maintaining is held in github, and
>> I also have patches in the /usr/ports/sysutils/myport/file/ folder.
>>
>> So I keep a fork of the upstream project with a branch containing a
>> commit with the patches from the /usr/ports/sysutils/myport/file/.
>>
>> Every time I need to update the port to a newer version, I do a git pull
>> in this branch, then I run a script [1] to re-generate the patches in
>> the /usr/ports/sysutils/myport/file/
>>
>> This script basically generates a file.orig of all modified files in
>> git, then copy the modified file to WORK_DIR, then run make makepatch.
>>
>>
>> for file in ${CHANGES}; do
>> mv ${WORK_DIR}/${file} ${WORK_DIR}/${file}.orig
>> cp ${PROJECT_PATH}/${file} ${WORK_DIR}/${file}
>> done
>> make makepatch
>>
>>
>> I would like to know if there is a better way to do this (some tool that
>> I am not aware of?).
> 
> IIUC, the process you're describing seems to be rebasing your changes
> and then generating diffs. You might have an easier time if you just
> do that: rebase, and then generate a diff (see the last point here)>
> Your script automates some of the routine Makefile changes, and while
> there are some tools in ports-mgmt/ that can automate that, we don't
> generally recommend them.
> 
> It's common for Makefiles to have a maintainer-update: target that
> keeps the repetitive update tasks in the Makefile (which also helps
> the next person to maintain the port).

I didn't know about this target, I'll take a look. Thanks.

> 
> Also, where many files are modified on a continually-changing basis,
> it's acceptable (though less systemically desirable) to put all your
> patches into one file. The benefit is that you can generate that one
> file with a single git diff, and it makes PR submission far, far
> simpler.

Is there a way to easily transform a git patch to the FreeBSD
file/*.patch format? Because I use make makepatch, and it will generate
several patches anyway.
Once I used "diff -Nur", but it doesn't seem to be the same exact format
as the one generated by make makepatch.

> 
> Do any of those help?
> 
> # Adam
> 
> 

Thanks
Helen
___
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: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread Mathieu Arnold
On Tue, Aug 14, 2018 at 11:20:59AM -0300, Helen Koike wrote:
> 
> 
> On 08/14/2018 12:05 AM, Adam Weinberger wrote:
> > On Mon, Aug 13, 2018 at 4:28 PM Helen Koike  
> > wrote:
> >>
> >> Hello,
> >>
> >> I am new to the community, I am maintaining two packages and I would
> >> like to check with you if there is a better workflow to do this.
> >>
> >> The upstream project of the port I am maintaining is held in github, and
> >> I also have patches in the /usr/ports/sysutils/myport/file/ folder.
> >>
> >> So I keep a fork of the upstream project with a branch containing a
> >> commit with the patches from the /usr/ports/sysutils/myport/file/.
> >>
> >> Every time I need to update the port to a newer version, I do a git pull
> >> in this branch, then I run a script [1] to re-generate the patches in
> >> the /usr/ports/sysutils/myport/file/
> >>
> >> This script basically generates a file.orig of all modified files in
> >> git, then copy the modified file to WORK_DIR, then run make makepatch.
> >>
> >>
> >> for file in ${CHANGES}; do
> >> mv ${WORK_DIR}/${file} ${WORK_DIR}/${file}.orig
> >> cp ${PROJECT_PATH}/${file} ${WORK_DIR}/${file}
> >> done
> >> make makepatch
> >>
> >>
> >> I would like to know if there is a better way to do this (some tool that
> >> I am not aware of?).
> > 
> > IIUC, the process you're describing seems to be rebasing your changes
> > and then generating diffs. You might have an easier time if you just
> > do that: rebase, and then generate a diff (see the last point here)>
> > Your script automates some of the routine Makefile changes, and while
> > there are some tools in ports-mgmt/ that can automate that, we don't
> > generally recommend them.
> > 
> > It's common for Makefiles to have a maintainer-update: target that
> > keeps the repetitive update tasks in the Makefile (which also helps
> > the next person to maintain the port).
> 
> I didn't know about this target, I'll take a look. Thanks.
> 
> > 
> > Also, where many files are modified on a continually-changing basis,
> > it's acceptable (though less systemically desirable) to put all your
> > patches into one file. The benefit is that you can generate that one
> > file with a single git diff, and it makes PR submission far, far
> > simpler.
> 
> Is there a way to easily transform a git patch to the FreeBSD
> file/*.patch format? Because I use make makepatch, and it will generate
> several patches anyway.
> Once I used "diff -Nur", but it doesn't seem to be the same exact format
> as the one generated by make makepatch.

make makepatch generates cleaned-up patches.  So there is no single
command to generate them.

There may be other ways to do what you do.

You said you maintain your local "patch" on github, so instead of adding
the commits to PATCHDIR, you could use PATCH_SITES and PATCHFILES, to
see an example, you could have a look at audio/rubberband

You could also point the port to your fork with the local commits and
use that, it would alleviate the need of patches.

-- 
Mathieu Arnold


signature.asc
Description: PGP signature


Re: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread blubee blubeeme
On Tue, Aug 14, 2018 at 8:56 PM Helen Koike 
wrote:

>
>
> On 08/13/2018 09:50 PM, blubee blubeeme wrote:
> >
> >
> > On Tue, Aug 14, 2018, 08:26 Helen Koike  > > wrote:
> >
> >
> >
> > On 08/13/2018 08:00 PM, blubee blubeeme wrote:
> > >
> > >
> > > On Tue, Aug 14, 2018, 06:30 Helen Koike  > 
> > >  > >> wrote:
> > >
> > > Hello,
> > >
> > > I am new to the community, I am maintaining two packages and I
> > would
> > > like to check with you if there is a better workflow to do
> this.
> > >
> > > The upstream project of the port I am maintaining is held in
> > github, and
> > > I also have patches in the /usr/ports/sysutils/myport/file/
> > folder.
> > >
> > > So I keep a fork of the upstream project with a branch
> > containing a
> > > commit with the patches from the
> /usr/ports/sysutils/myport/file/.
> > >
> > > Every time I need to update the port to a newer version, I do
> > a git pull
> > > in this branch, then I run a script [1] to re-generate the
> > patches in
> > > the /usr/ports/sysutils/myport/file/
>
This one is fairly straight forward, you can simply replace that string
with a regex command;
This is an example of running a replace command for strings after the patch
phase of the build;

post-patch:
@${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README



> > >
> > > This script basically generates a file.orig of all modified
> > files in
> > > git, then copy the modified file to WORK_DIR, then run make
> > makepatch.
> > >
> > >
> > > for file in ${CHANGES}; do
> > > mv ${WORK_DIR}/${file} ${WORK_DIR}/${file}.orig
> > > cp ${PROJECT_PATH}/${file} ${WORK_DIR}/${file}
> > > done
> > > make makepatch
>
Depending on how drastic the changes are, you can use the above command to
simply replace strings;
There's also binary alias, that allows to replace sed with gsed:
https://www.freebsd.org/doc/en/books/porters-handbook/binary-alias.html

Speaking of which, FreeBSD has access to all the GNU tools such as;
gmake [gnu make]
gsed[gnu sed]

if it's only a few commands you can use binary alias.

If the project needs GNU tools, then FreeBSD also provides a way to
automatically
run the required scripts

check section 6.5.3 configure Scripts:
https://www.freebsd.org/doc/en/books/porters-handbook/building.html

> > >
> > >
> > > I would like to know if there is a better way to do this (some
> > tool that
> > > I am not aware of?).
> > >
> > > [1]
> > >
> >
> https://github.com/helen-fornazier/bsd-update-patches/blob/master/freebsd-gce-update.sh
> > >
> > > Thanks
> > > Helen
> > >
> > > ___
> > > 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
> > 
> > >  > >"
> > >
> > > Submit your patches upstream, once they get accepted your work on
> > > FreeBSD is greatly simplified.
> > >
> > > Best,
> > > Owen
> > >
> >
> > I am doing that, but there are some changes that I couldn't include
> in
> > upstream yet.
> >
> > Helen
> >
> > Can you give an example of types of changes can't be upstream yet and
> > their reasoning why not?
> >
> > Best,
> > Owen
> >
>
> Sure, e.g. "service -e" vs "service --status-all", there is also sed vs
> gsed (but it just came to mind that I could add this replacement inside
> the Makefile)
>
> [1]
>
> https://github.com/freebsd/freebsd-ports/blob/master/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control#L54
>
> Please, let me know if there is a better way to solve this, meanwhile I
> am keeping this patch in the port and I always need to rebase my changes.
>
> And as a general case, I sometimes implement a fix only for FreeBSD e.g.
> [2], then I think in the better way to include in the upstream code e.g.

This is subjective; If you can use native FreeBSD facilities and get that
upstreamed great,
if it works and you don't have to maintain a bunch of patches, is it
reasonable to use your
time maintain diffs on something that's not broken?

[3] while keeping portability with Linux, and sometimes it takes a while
> for the patch to be merged in upstream

Re: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread blubee blubeeme
On Tue, Aug 14, 2018 at 10:23 PM Helen Koike 
wrote:

>
>
> On 08/14/2018 12:05 AM, Adam Weinberger wrote:
> > On Mon, Aug 13, 2018 at 4:28 PM Helen Koike 
> wrote:
> >>
> >> Hello,
> >>
> >> I am new to the community, I am maintaining two packages and I would
> >> like to check with you if there is a better workflow to do this.
> >>
> >> The upstream project of the port I am maintaining is held in github, and
> >> I also have patches in the /usr/ports/sysutils/myport/file/ folder.
> >>
> >> So I keep a fork of the upstream project with a branch containing a
> >> commit with the patches from the /usr/ports/sysutils/myport/file/.
> >>
> >> Every time I need to update the port to a newer version, I do a git pull
> >> in this branch, then I run a script [1] to re-generate the patches in
> >> the /usr/ports/sysutils/myport/file/
> >>
> >> This script basically generates a file.orig of all modified files in
> >> git, then copy the modified file to WORK_DIR, then run make makepatch.
> >>
> >>
> >> for file in ${CHANGES}; do
> >> mv ${WORK_DIR}/${file} ${WORK_DIR}/${file}.orig
> >> cp ${PROJECT_PATH}/${file} ${WORK_DIR}/${file}
> >> done
> >> make makepatch
> >>
> >>
> >> I would like to know if there is a better way to do this (some tool that
> >> I am not aware of?).
> >
> > IIUC, the process you're describing seems to be rebasing your changes
> > and then generating diffs. You might have an easier time if you just
> > do that: rebase, and then generate a diff (see the last point here)>
> > Your script automates some of the routine Makefile changes, and while
> > there are some tools in ports-mgmt/ that can automate that, we don't
> > generally recommend them.
> >
> > It's common for Makefiles to have a maintainer-update: target that
> > keeps the repetitive update tasks in the Makefile (which also helps
> > the next person to maintain the port).
>
> I didn't know about this target, I'll take a look. Thanks.
>
> >
> > Also, where many files are modified on a continually-changing basis,
> > it's acceptable (though less systemically desirable) to put all your
> > patches into one file. The benefit is that you can generate that one
> > file with a single git diff, and it makes PR submission far, far
> > simpler.
>
> Is there a way to easily transform a git patch to the FreeBSD
> file/*.patch format? Because I use make makepatch, and it will generate
> several patches anyway.
> Once I used "diff -Nur", but it doesn't seem to be the same exact format
> as the one generated by make makepatch.
>

FreeBSD patching explained a bit here:
https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html

I am not too sure on the particulars of git diffs but FreeBSD uses a
unified diff;
The part that will cause your makefile to fail is if the filepath at the
top of each patch file
is incorrect.

section 4.4.2. Manual Patch Generation in the above link gives a good
overview of how to manually generate patch files.

I am pretty sure there has to be tools that can automate transforming
whatever style patch git uses to a unified patch file.

>
> >
> > Do any of those help?
> >
> > # Adam
> >
> >
>
> Thanks
> Helen
> ___
> 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"
>
Best,
Owen
___
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: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread Mathieu Arnold
On Tue, Aug 14, 2018 at 10:41:43PM +0800, blubee blubeeme wrote:
> This one is fairly straight forward, you can simply replace that string
> with a regex command;
> This is an example of running a replace command for strings after the patch
> phase of the build;
> 
> post-patch:
>   @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README

Patching files in post-patch using sed SHOULD only be used to replace
dynamic content, never static content.

-- 
Mathieu Arnold


signature.asc
Description: PGP signature


Re: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread blubee blubeeme
On Tue, Aug 14, 2018 at 11:33 PM Mathieu Arnold  wrote:

> On Tue, Aug 14, 2018 at 10:41:43PM +0800, blubee blubeeme wrote:
> > This one is fairly straight forward, you can simply replace that string
> > with a regex command;
> > This is an example of running a replace command for strings after the
> patch
> > phase of the build;
> >
> > post-patch:
> >   @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README
>
> Patching files in post-patch using sed SHOULD only be used to replace
> dynamic content, never static content.
>
This is missing the point of the email since you can call that command in
any stage of the port build process.

Maybe we could append this info to the porters handbook.

>
> --
> Mathieu Arnold
>
___
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: workflow question: how do you maintain the port in sync with upstream?

2018-08-14 Thread Bob Eager
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Tue, 14 Aug 2018 17:33:38 +0200
Mathieu Arnold  wrote:

> On Tue, Aug 14, 2018 at 10:41:43PM +0800, blubee blubeeme wrote:
> > This one is fairly straight forward, you can simply replace that
> > string with a regex command;
> > This is an example of running a replace command for strings after
> > the patch phase of the build;
> > 
> > post-patch:
> > @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g'
> > ${WRKSRC}/README  
> 
> Patching files in post-patch using sed SHOULD only be used to replace
> dynamic content, never static content.

Indeed. One of the most annoying things is that it breaks 'make
makepatch'.
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEEVgdI2KeVldPAhUYaKBdf2az8e6gFAltzD60ACgkQKBdf2az8
e6h2QQgApKsemAO02PhYYAhAYhSTEZeBB99wNtrfhlFv341kyzlfgRmtj+Boum4P
a6dxBKUllppOcw4515fa/I6Q36LE4OCTkH3c2gUSATZArummj1cdBRCrqfgxYMww
dc6OntuSnXZ1r6zaBNKVi0wmnFh2Q1oOagx5IrtJ/ysDXgt1oNhNrtWfYjOQyGuL
AajyTzb+NAa0Y+FVIptLYUmcezrHCUuZQUqaLAKlg72C/OvnQYxyP+kzHkztgiH/
zVkgW+jZeLP+vmSjqmtFIHZC6VzC0Sg53dZJlLfIbG4qmyyOgET1mDP9c5WfR3vq
0E6sQxsLrTs8RzLnx61TYD1fP0eSPQ==
=yKsq
-END PGP SIGNATURE-
___
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"


getting PKGNAME from CONFLICTS

2018-08-14 Thread Dan Langille
I am in the process of adding FreshPorts support for CONFLICTS[1].

I reference www/p5-CGI only because it had a recent commit and it contains a 
CONFLICTS directive.

At https://dev.freshports.org/www/p5-CGI/ you can see:

CONFLICTS: p5-CGI.pm-[1-3]*

My goal is to allow a link to the search page or to the page for that port.

The CONFLICTS field is a 'A list of package name patterns'[2]

I interpret this to mean the values returned by make -V PKGNAME and the 
documentation[3] indicates this is correct.

Thus, the CONFLICTS matches https://dev.freshports.org/www/p5-CGI.pm [4]

To extract the PKGNAME values from the CONFLICTS I will need to remove 
everything after the trailing dash.

Can someone do me up a regex for that please? regex is a weak point for me. Or 
point me into the Mk infrastructure to locate an existing solution.

Thank you.

refs:

[1] - https://github.com/FreshPorts/freshports/issues/84
[2] - https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?view=markup#l436
[3] - https://www.freebsd.org/doc/en/books/porters-handbook/conflicts.html
[4] - 
https://dev.freshports.org/search.php?stype=package&method=prefix&query=p5-CGI.pm&num=10&orderby=category&orderbyupdown=asc&search=Search&format=html&branch=head



--
Dan Langille - BSDCan / PGCon
d...@langille.org



signature.asc
Description: Message signed with OpenPGP


Re: getting PKGNAME from CONFLICTS

2018-08-14 Thread Mark Millard via freebsd-ports


Dan Langille dan at langille.org wrote on
Tue Aug 14 17:54:01 UTC 2018 :

> . . .
> At https://dev.freshports.org/www/p5-CGI/ you can see:
> 
> CONFLICTS: p5-CGI.pm-[1-3]*
> . . .
> To extract the PKGNAME values from the CONFLICTS I will need to remove 
> everything after the trailing dash.
> . . .

p5-
vs.
p5-CGI.pm-
vs.
p5-CGI.pm-[1-

It looks to me like "trailing dash" probably has a
complicated definition where some "-"(s) may exist
that are to be ignored after the one of interest.
In the example I'm guessing that the middle
"-" is intended (so "p5-CGI.pm-").


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
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: getting PKGNAME from CONFLICTS

2018-08-14 Thread Adam Weinberger
On Tue, Aug 14, 2018 at 11:54 AM Dan Langille  wrote:
>
> I am in the process of adding FreshPorts support for CONFLICTS[1].
>
> I reference www/p5-CGI only because it had a recent commit and it contains a 
> CONFLICTS directive.
>
> At https://dev.freshports.org/www/p5-CGI/ you can see:
>
> CONFLICTS: p5-CGI.pm-[1-3]*
>
> My goal is to allow a link to the search page or to the page for that port.
>
> The CONFLICTS field is a 'A list of package name patterns'[2]
>
> I interpret this to mean the values returned by make -V PKGNAME and the 
> documentation[3] indicates this is correct.
>
> Thus, the CONFLICTS matches https://dev.freshports.org/www/p5-CGI.pm [4]
>
> To extract the PKGNAME values from the CONFLICTS I will need to remove 
> everything after the trailing dash.
>
> Can someone do me up a regex for that please? regex is a weak point for me. 
> Or point me into the Mk infrastructure to locate an existing solution.

Hi Dan,

I suspect that the best you can get is to make some assumptions about
what versions look like. This will catch most, but not all:

/^(.*?)-[-_\.,0-9ab]+$/
That should put PKGNAME in $1.

# Adam

-- 
Adam Weinberger
ad...@adamw.org
https://www.adamw.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: getting PKGNAME from CONFLICTS

2018-08-14 Thread Adam Weinberger
On Tue, Aug 14, 2018 at 1:13 PM Adam Weinberger  wrote:
>
> On Tue, Aug 14, 2018 at 11:54 AM Dan Langille  wrote:
> >
> > I am in the process of adding FreshPorts support for CONFLICTS[1].
> >
> > I reference www/p5-CGI only because it had a recent commit and it contains 
> > a CONFLICTS directive.
> >
> > At https://dev.freshports.org/www/p5-CGI/ you can see:
> >
> > CONFLICTS: p5-CGI.pm-[1-3]*
> >
> > My goal is to allow a link to the search page or to the page for that port.
> >
> > The CONFLICTS field is a 'A list of package name patterns'[2]
> >
> > I interpret this to mean the values returned by make -V PKGNAME and the 
> > documentation[3] indicates this is correct.
> >
> > Thus, the CONFLICTS matches https://dev.freshports.org/www/p5-CGI.pm [4]
> >
> > To extract the PKGNAME values from the CONFLICTS I will need to remove 
> > everything after the trailing dash.
> >
> > Can someone do me up a regex for that please? regex is a weak point for me. 
> > Or point me into the Mk infrastructure to locate an existing solution.
>
> Hi Dan,
>
> I suspect that the best you can get is to make some assumptions about
> what versions look like. This will catch most, but not all:
>
> /^(.*?)-[-_\.,0-9ab]+$/

On second thought, 'p' should be in there too. [-_\.,0-9abp].

# Adam


-- 
Adam Weinberger
ad...@adamw.org
https://www.adamw.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: getting PKGNAME from CONFLICTS

2018-08-14 Thread Dan Langille

> On Aug 14, 2018, at 3:15 PM, Adam Weinberger  wrote:
> 
> On Tue, Aug 14, 2018 at 1:13 PM Adam Weinberger  wrote:
>> 
>> On Tue, Aug 14, 2018 at 11:54 AM Dan Langille  wrote:
>>> 
>>> I am in the process of adding FreshPorts support for CONFLICTS[1].
>>> 
>>> I reference www/p5-CGI only because it had a recent commit and it contains 
>>> a CONFLICTS directive.
>>> 
>>> At https://dev.freshports.org/www/p5-CGI/ you can see:
>>> 
>>>CONFLICTS: p5-CGI.pm-[1-3]*
>>> 
>>> My goal is to allow a link to the search page or to the page for that port.
>>> 
>>> The CONFLICTS field is a 'A list of package name patterns'[2]
>>> 
>>> I interpret this to mean the values returned by make -V PKGNAME and the 
>>> documentation[3] indicates this is correct.
>>> 
>>> Thus, the CONFLICTS matches https://dev.freshports.org/www/p5-CGI.pm [4]
>>> 
>>> To extract the PKGNAME values from the CONFLICTS I will need to remove 
>>> everything after the trailing dash.
>>> 
>>> Can someone do me up a regex for that please? regex is a weak point for me. 
>>> Or point me into the Mk infrastructure to locate an existing solution.
>> 
>> Hi Dan,
>> 
>> I suspect that the best you can get is to make some assumptions about
>> what versions look like. This will catch most, but not all:
>> 
>> /^(.*?)-[-_\.,0-9ab]+$/
> 
> On second thought, 'p' should be in there too. [-_\.,0-9abp].

I think we are trying to match the regex instead of noticing a regex and 
removing it.

Am I doing it wrong?

 $ cat ~/tmp/pkg-name.php
 p5-CGI.pm-[
[1] => p5-CGI.pm
)

It's close, but not quite.

Thank you.

--
Dan Langille - BSDCan / PGCon
d...@langille.org



signature.asc
Description: Message signed with OpenPGP


Re: getting PKGNAME from CONFLICTS

2018-08-14 Thread Dan Langille
> On Aug 14, 2018, at 2:55 PM, Mark Millard via freebsd-ports 
>  wrote:
> 
> 
> Dan Langille dan at langille.org wrote on
> Tue Aug 14 17:54:01 UTC 2018 :
> 
>> . . .
>> At https://dev.freshports.org/www/p5-CGI/ you can see:
>> 
>>   CONFLICTS: p5-CGI.pm-[1-3]*
>> . . .
>> To extract the PKGNAME values from the CONFLICTS I will need to remove 
>> everything after the trailing dash.
>> . . .
> 
> p5-
> vs.
> p5-CGI.pm-
> vs.
> p5-CGI.pm-[1-
> 
> It looks to me like "trailing dash" probably has a
> complicated definition where some "-"(s) may exist
> that are to be ignored after the one of interest.
> In the example I'm guessing that the middle
> "-" is intended (so "p5-CGI.pm-").

Agreed.  The hard part is identifying the regex and deleting it from 
consideration.

-- 
Dan Langille - BSDCan / PGCon
d...@langille.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"