Re: Any way to prevent do-extract chmod and chown?

2018-06-27 Thread Joseph Ward
Overriding the do-extract target is exactly what I was looking for. 
Something I didn't know I could do.  It worked perfectly, thanks! 
Unfortunately there are way too many files with various owners to try
and fix the permissions afterwards or in the pkg-plist.  (I did consider
creating a script to traverse everything, save the permissions, and
apply it after the fact, but I wanted something easier and more elegant,
and this is great!)

Thank you again!

-Joseph


On 06/27/2018 07:22 PM, Bob Eager wrote:
> On Wed, 27 Jun 2018 19:06:44 -0400
> Joseph Ward  wrote:
>
>> When I "make extract", the "do-extract" target is performing a chmod
>> and chown on everything, as seen from the following excerpt from the
>> bsd.port.mk file:
>  .
>  .
>  .
>
>> Short of commenting those lines out (which I really don't want to do
>> because I have 0 idea why it's there or what I'd break with other
>> ports) is there any way at all to maintain the ownership of the
>> files? 
> If the ownership is well defined and not complex, you could add a
> post-extract: target in your Makefile and fix up the ownerships then.
>
> Or, you could override the do-extract: target with your own, and
> extract the files as you want (probably replicating part of the real
> do-extract: target).
> ___
> 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: Any way to prevent do-extract chmod and chown?

2018-06-27 Thread Adam Weinberger
On Wed, Jun 27, 2018 at 5:09 PM Joseph Ward  wrote:
>
> Hi everyone,
>
> I'm creating some internal-only ports and I'm trying to maintain the
> permissions and owners of the files present in the distfile.tar.gz when
> they get packaged up for install.
>
> When I "make extract", the "do-extract" target is performing a chmod and
> chown on everything, as seen from the following excerpt from the
> bsd.port.mk file:
>
>
> .if !target(do-extract)
> do-extract: ${EXTRACT_WRKDIR}
> @for file in ${EXTRACT_ONLY}; do \
> if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD}
> ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
> then \
> exit 1; \
> fi; \
> done
> @if [ ${UID} = 0 ]; then \
> ${CHMOD} -R ug-s ${WRKDIR}; \
> ${CHOWN} -R 0:0 ${WRKDIR}; \
> fi
> .endif
>
>
> Short of commenting those lines out (which I really don't want to do
> because I have 0 idea why it's there or what I'd break with other ports)
> is there any way at all to maintain the ownership of the files?
>
>
> Thanks,
>
> Joseph Ward

Hi Joseph,

Your best bet is to use plist keywords. See
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-keywords.html
for details.

You can set owner/group on individual files in the pkg-plist:
  @(ownername,groupname,444) path/to/file
Or you can set it on a block of files:
  @group groupname
  @owner ownername
  path/to/file1
  path/to/file2

# 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: Any way to prevent do-extract chmod and chown?

2018-06-27 Thread Bob Eager
On Wed, 27 Jun 2018 19:06:44 -0400
Joseph Ward  wrote:

> When I "make extract", the "do-extract" target is performing a chmod
> and chown on everything, as seen from the following excerpt from the
> bsd.port.mk file:

 .
 .
 .

> Short of commenting those lines out (which I really don't want to do
> because I have 0 idea why it's there or what I'd break with other
> ports) is there any way at all to maintain the ownership of the
> files? 

If the ownership is well defined and not complex, you could add a
post-extract: target in your Makefile and fix up the ownerships then.

Or, you could override the do-extract: target with your own, and
extract the files as you want (probably replicating part of the real
do-extract: target).
___
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"


Any way to prevent do-extract chmod and chown?

2018-06-27 Thread Joseph Ward
Hi everyone,

I'm creating some internal-only ports and I'm trying to maintain the
permissions and owners of the files present in the distfile.tar.gz when
they get packaged up for install.

When I "make extract", the "do-extract" target is performing a chmod and
chown on everything, as seen from the following excerpt from the
bsd.port.mk file:


.if !target(do-extract)
do-extract: ${EXTRACT_WRKDIR}
    @for file in ${EXTRACT_ONLY}; do \
    if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD}
${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
    then \
    exit 1; \
    fi; \
    done
    @if [ ${UID} = 0 ]; then \
    ${CHMOD} -R ug-s ${WRKDIR}; \
    ${CHOWN} -R 0:0 ${WRKDIR}; \
    fi
.endif


Short of commenting those lines out (which I really don't want to do
because I have 0 idea why it's there or what I'd break with other ports)
is there any way at all to maintain the ownership of the files? 


Thanks,

Joseph Ward

___
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: Should a package restart on upgrade itself

2018-06-27 Thread Josh Paetzel



On Wed, Jun 27, 2018, at 8:56 AM, Mathieu Arnold wrote:
> On Wed, Jun 27, 2018 at 08:10:00AM -0500, Matthew D. Fuller wrote:
> > On Wed, Jun 27, 2018 at 11:58:17AM +0200 I heard the voice of
> > Mathieu Arnold, and lo! it spake thus:
> > > 
> > > Please point out to ports doing this so that they can be fixed.
> > 
> > On the "irritates me from time to time" list,
> > 
> > https://svnweb.freebsd.org/ports/head/mail/spamassassin/pkg-plist?revision=425590&view=markup#l1
> 
> Found a bunch of those, fixed them in r473439.
> 
> -- 
> Mathieu Arnold
> Email had 1 attachment:
> + signature.asc
>   1k (application/pgp-signature)

So the consensus is to change open-vm-tools so it doesn't autorestart?

-- 

Thanks,

Josh Paetzel
___
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: Should a package restart on upgrade itself

2018-06-27 Thread Mathieu Arnold
On Wed, Jun 27, 2018 at 08:10:00AM -0500, Matthew D. Fuller wrote:
> On Wed, Jun 27, 2018 at 11:58:17AM +0200 I heard the voice of
> Mathieu Arnold, and lo! it spake thus:
> > 
> > Please point out to ports doing this so that they can be fixed.
> 
> On the "irritates me from time to time" list,
> 
> https://svnweb.freebsd.org/ports/head/mail/spamassassin/pkg-plist?revision=425590&view=markup#l1

Found a bunch of those, fixed them in r473439.

-- 
Mathieu Arnold


signature.asc
Description: PGP signature


Re: Should a package restart on upgrade itself

2018-06-27 Thread Matthew D. Fuller
On Wed, Jun 27, 2018 at 11:58:17AM +0200 I heard the voice of
Mathieu Arnold, and lo! it spake thus:
> 
> Please point out to ports doing this so that they can be fixed.

On the "irritates me from time to time" list,

https://svnweb.freebsd.org/ports/head/mail/spamassassin/pkg-plist?revision=425590&view=markup#l1


-- 
Matthew Fuller (MF4839)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.
___
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: head/audio/jack-keyboard

2018-06-27 Thread Kurt Jaeger
Hi!

> In any case, for any future update you need to do, please provide a
> patch, either in a PR or in the email. Preferably in a PR.

I approved that update, as I assumed that it's just a version
bump and new distinfo values, FYI.

-- 
p...@opsec.eu+49 171 31013722 years to go !
___
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: Should a package restart on upgrade itself

2018-06-27 Thread Miroslav Lachman

Mathieu Arnold wrote on 2018/06/27 11:58:

On Tue, Jun 26, 2018 at 01:27:49PM +0200, Miroslav Lachman wrote:

Miroslav Lachman wrote on 2017/06/27 19:32:

[...]

Again and again and again...

Can we have some written (or do we have?) policy to not stop/start/restart
services from some @preunexec / @postexec targets?
I really don't like that some packages are still shutting down or trying to
restart in the middle of the pkg upgrade process.


There is a policy, it MUST NOT be done.


Do you have a link to docs where it is stated? I really would like to 
bookmark it so next time this discussion appear I will just post the 
link to docs ;)



Services are stopped and started with the rc file they install, and pkg
does it when its configuration variable HANDLE_RC_SCRIPTS is set to
true.

Please point out to ports doing this so that they can be fixed.



I know about the open-vm-tools. I will let you know if I will find another.

Kind regards
Miroslav Lachman
___
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-06-27 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
+-+
emulators/mame  | 0.198   | mame0199
+-+
emulators/mess  | 0.198   | mame0199
+-+
science/gwyddion| 2.45| 2.51
+-+


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: head/audio/jack-keyboard

2018-06-27 Thread Mathieu Arnold
On Wed, Jun 27, 2018 at 12:26:00PM +0200, Hans Petter Selasky wrote:
> On 06/27/18 11:53, Mathieu Arnold wrote:
> > Hi,
> > 
> > On Tue, Jun 26, 2018 at 10:01:35AM +0200, Hans Petter Selasky wrote:
> > > Can someone bump DISTVERSION or approve me to do it in
> > > head/audio/jack-keyboard/Makefile to 2.7.2 ?
> > 
> > Could you please submit a PR with a patch, or point us to one?
> 
> This issue has been resolved.

In any case, for any future update you need to do, please provide a
patch, either in a PR or in the email. Preferably in a PR.

-- 
Mathieu Arnold


signature.asc
Description: PGP signature


Re: head/audio/jack-keyboard

2018-06-27 Thread Hans Petter Selasky

On 06/27/18 11:53, Mathieu Arnold wrote:

Hi,

On Tue, Jun 26, 2018 at 10:01:35AM +0200, Hans Petter Selasky wrote:

Can someone bump DISTVERSION or approve me to do it in
head/audio/jack-keyboard/Makefile to 2.7.2 ?


Could you please submit a PR with a patch, or point us to one?


This issue has been resolved.

Thank you!

--HPS

___
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: Should a package restart on upgrade itself

2018-06-27 Thread Mathieu Arnold
On Tue, Jun 26, 2018 at 01:27:49PM +0200, Miroslav Lachman wrote:
> Miroslav Lachman wrote on 2017/06/27 19:32:
> > Matthias Fechner wrote on 2017/06/27 18:29:
> > > Dear all,
> > > 
> > > it is always a pain if pkg upgrade a lot of packages to restart all
> > > services to make sure update/security fixes are applied to all running
> > > services.
> > > 
> > > Is there an option in pkg that it restart services automatically or is
> > > it OK if I would add a post-install script to the packages (I maintain)
> > > that will include a "service foo restart"?
> > > 
> > > What is best practice here?
> > 
> > Please don't do this.
> > Some ports did this in the past and this was really a pain during larger
> > upgrades. It sometimes leave services stopped (hi MySQL).
> > 
> > The same bad practice is disabling / enabling Apache modules on upgrade.
> > 
> > pkg upgrade should just do it's work - upgrade packages on disk. But
> > manipulating config files and restart of services is up to me - the
> > Administrator (or my tools).
> > 
> > It would be nice to have some kind of "hooks" in pkg, which can be used
> > to notify deployment tools that some services should be (re)started, or
> > do restart in some simpler environment if user allows this (setup hooks
> > for service restart).
> > But is must not be done automatically for individual ports / packages
> > even if maintainer thinks it is Good Idea (tm)
> 
> Again and again and again...
> 
> Can we have some written (or do we have?) policy to not stop/start/restart
> services from some @preunexec / @postexec targets?
> I really don't like that some packages are still shutting down or trying to
> restart in the middle of the pkg upgrade process.

There is a policy, it MUST NOT be done.

Services are stopped and started with the rc file they install, and pkg
does it when its configuration variable HANDLE_RC_SCRIPTS is set to
true.

Please point out to ports doing this so that they can be fixed.

-- 
Mathieu Arnold


signature.asc
Description: PGP signature


Re: head/audio/jack-keyboard

2018-06-27 Thread Mathieu Arnold
Hi,

On Tue, Jun 26, 2018 at 10:01:35AM +0200, Hans Petter Selasky wrote:
> Can someone bump DISTVERSION or approve me to do it in
> head/audio/jack-keyboard/Makefile to 2.7.2 ?

Could you please submit a PR with a patch, or point us to one?

Regards,

-- 
Mathieu Arnold


signature.asc
Description: PGP signature