Page MenuHomeFreeBSD

mail/dcc-dccd: Permission incorrectly changed after update to 1.3.159
ClosedPublic

Authored by ultima on Jun 25 2017, 2:11 AM.
Tags
None
Referenced Files
F81652094: D11347.diff
Fri, Apr 19, 12:03 PM
Unknown Object (File)
Mar 7 2024, 11:49 PM
Unknown Object (File)
Dec 27 2023, 11:40 PM
Unknown Object (File)
Dec 27 2023, 11:39 PM
Unknown Object (File)
Dec 27 2023, 11:39 PM
Unknown Object (File)
Dec 27 2023, 11:39 PM
Unknown Object (File)
Dec 25 2023, 5:24 AM
Unknown Object (File)
Dec 21 2023, 11:46 PM

Details

Summary
  • Fix permissions from regression on r443717

PR\: 220201
Sumitted by\: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
Reviewed by\: lifanov (mentor), matthew (mentor)
Approved by\: lifanov (mentor), matthew (mentor)
Differential Revision\: https://reviews.freebsd.org/DXXXXX

Test Plan

portlint:
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
WARN: Makefile: using hyphen in PORTNAME. consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX.
0 fatal errors and 3 warnings found.

poudriere:
103i386
103amd64
110i386
110amd64
12i386
12amd64

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mail/dcc-dccd/files/pkg-install.in
25 ↗(On Diff #30048)

This is the port doing questionable things. It modifies a bunch of files on install, presumably with different results on each different system. This immediately breaks the pkg checksum data, and while it looks like the usual .sample file thing, it isn't.

Instead of using '.sample' here, I'd use a different extension for the unedited copy
of the file. So you'ld end up with:

`map`
`map.nopasswd`
`map.nopasswd.sample`  <--- this is the only one of these in the pkg-plist

and the equivalents for the other two files. Yes, this seems a bit OTT, but we have
a port doing something quite similar but not really the same as the ports sample
config file mechanism, and we shouldn't try and mash the two into one mechanism.

The whole POST-INSTALL target could be rolled into the RC script.

Not listing ownership in pkg-plist, knowingly failing checksums on deinstall, etc.
makes keeping this step as part of the port build dubious.

The whole POST-INSTALL target could be rolled into the RC script.

Not listing ownership in pkg-plist, knowingly failing checksums on deinstall, etc.
makes keeping this step as part of the port build dubious.

The only issue I see with moving to an RC script is how the port would
knows when to install after an upgrade. Using the pkg-install method
it does this after each install. I'm not sure if it needs to be done for each
upgrade or if for each restart would be acceptable. Added to query.

Well, my idea was to check for presence.

start_precmd()
{
  if [ -f ${dccd_home}/<my_file> -a -f ${dccd_home}/<other_file> .... ]
  then
    :
  else
    <do stuff>
  fi
  <the rest of start_precmd>
}

Updated with fixes for checksum data

Well, my idea was to check for presence.

start_precmd()
{
  if [ -f ${dccd_home}/<my_file> -a -f ${dccd_home}/<other_file> .... ]
  then
    :
  else
    <do stuff>
  fi
  <the rest of start_precmd>
}

The developer of dcc-dccd responded discouraging the rc.d suggestion[1]
and explained what each of those files do. Most of the files are uniquely
generated with each release. Adding it as an rc.d script would be troublesome
because a version check of those files would be needed during each startup to
verify the files. In order to do this, it would be possible to add the versioning
at the end as the extension, but I agree with the dev, I think this is best left
to the install script.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220201

OK, thanks for looking into it. This looks good now that the .sample stuff is resolved.

This revision is now accepted and ready to land.Jul 3 2017, 4:56 PM
This revision was automatically updated to reflect the committed changes.