Bug 149547 - [PATCH] net/igmpproxy: prevent deletion of configfile on deinstall
Summary: [PATCH] net/igmpproxy: prevent deletion of configfile on deinstall
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 10:02 UTC by Florian Smeets
Modified: 2010-10-31 14:50 UTC (History)
1 user (show)

See Also:


Attachments
igmpproxy-0.1,1.patch (845 bytes, patch)
2010-08-12 10:02 UTC, Florian Smeets
no flags Details | Diff
igmpproxy.diff (926 bytes, patch)
2010-08-12 15:59 UTC, Florian Smeets
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Smeets 2010-08-12 10:02:56 UTC
on deinstall this port unconditionally deletes the configfile, fix this by adding some pkg-plist magic

Added file(s):
- pkg-plist

Port maintainer (melifaro@ipfw.ru) is cc'd.

Generated with FreeBSD Port Tools 0.99

Fix: do not delete igmpproxy.conf if it is different then igmpproxy.conf.sample
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-08-12 11:02:01 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2010-08-12 11:02:03 UTC
Maintainer of net/igmpproxy,

Please note that PR ports/149547 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149547

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2010-08-12 11:02:05 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2010-08-12 12:25:05 UTC
Maintainer of net/igmpproxy,

Please note that PR ports/149547 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149547

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 5 swell.k 2010-08-12 13:11:03 UTC
Florian Smeets <flo@kasimir.com> writes:

> @@ -0,0 +1,3 @@
> +sbin/igmpproxy
> +@unexec if cmp -s %D/etc/igmpproxy.conf.sample %D/etc/igmpproxy.conf; then rm -f %D/etc/igmpproxy.conf; fi
> +etc/igmpproxy.conf.sample

I think you're missing @exec to complement @unexec. Add the line below
to the end of plist.

  @exec if [ ! -f %D/etc/igmpproxy.conf ]; then cp -p %D/%F %B/igmpproxy.conf; fi
Comment 6 Florian Smeets 2010-08-12 13:29:21 UTC
On 12.08.10 14:11, Anonymous wrote:
> Florian Smeets<flo@kasimir.com>  writes:
>
>> @@ -0,0 +1,3 @@
>> +sbin/igmpproxy
>> +@unexec if cmp -s %D/etc/igmpproxy.conf.sample %D/etc/igmpproxy.conf; then rm -f %D/etc/igmpproxy.conf; fi
>> +etc/igmpproxy.conf.sample
>

Hi,

> I think you're missing @exec to complement @unexec. Add the line below
> to the end of plist.
>
>    @exec if [ ! -f %D/etc/igmpproxy.conf ]; then cp -p %D/%F %B/igmpproxy.conf; fi

i was thinking about the @exec too, but i don't think you need an @exec 
for every @unexec, and everything works as expected without the @exec.

The port automatically installs igmpproxy.conf and 
igmpproxy.conf.sample, so IMHO we only need the @unexec in the plist.

Cheers,
Florian
Comment 7 swell.k 2010-08-12 13:45:18 UTC
Florian Smeets <flo@kasimir.com> writes:

>> I think you're missing @exec to complement @unexec. Add the line below
>> to the end of plist.
>>
>>    @exec if [ ! -f %D/etc/igmpproxy.conf ]; then cp -p %D/%F %B/igmpproxy.conf; fi
>
> i was thinking about the @exec too, but i don't think you need an
> @exec for every @unexec, and everything works as expected without the
> @exec.

The @exec line is needed when installing from package, not port.
Comment 8 Florian Smeets 2010-08-12 15:59:46 UTC
On 12.08.10 14:45, Anonymous wrote:
> Florian Smeets<flo@kasimir.com>  writes:
>
>>> I think you're missing @exec to complement @unexec. Add the line below
>>> to the end of plist.
>>>
>>>     @exec if [ ! -f %D/etc/igmpproxy.conf ]; then cp -p %D/%F %B/igmpproxy.conf; fi
>>
>> i was thinking about the @exec too, but i don't think you need an
>> @exec for every @unexec, and everything works as expected without the
>> @exec.
>
> The @exec line is needed when installing from package, not port.

Oh, i did not know that. Thanks for bringing it to my attention!

I've attached the new complete patch.

Cheers,
Florian
Comment 9 Martin Wilke freebsd_committer freebsd_triage 2010-09-11 13:15:21 UTC
Responsible Changed
From-To: miwi->freebsd-ports-bugs

back to pool.
Comment 10 Rene Ladan freebsd_committer freebsd_triage 2010-10-29 14:01:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Grab, related to ports/150146
Comment 11 dfilter service freebsd_committer freebsd_triage 2010-10-31 14:47:35 UTC
rene        2010-10-31 14:47:29 UTC

  FreeBSD ports repository

  Modified files:
    net/igmpproxy        Makefile 
    net/igmpproxy/files  igmpproxy.in 
  Added files:
    net/igmpproxy        pkg-plist 
  Log:
  - Do not delete the configuration file on deinstall if it was modified [1]
  - For the rc script: [2]
    - use /usr/sbin/daemon to start the rc script because igmpproxy does not
      daemonize itself
    - add shutdown keyword
    - cleanups
  - Bump PORTREVISION [2]
  PR:             ports/149547 [1], ports/150146 [2]
  Submitted by:   Florian Smeets [flo kasimir.com] [1] [2]
  Approved by:    maintainer timeout (11 weeks [1], 8 weeks [2])
  
  Revision  Changes    Path
  1.5       +1 -4      ports/net/igmpproxy/Makefile
  1.3       +12 -3     ports/net/igmpproxy/files/igmpproxy.in
  1.1       +4 -0      ports/net/igmpproxy/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 12 Rene Ladan freebsd_committer freebsd_triage 2010-10-31 14:48:37 UTC
State Changed
From-To: feedback->closed

Commited, thanks