View | Details | Raw Unified | Return to bug 269497 | Differences between
and this patch

Collapse All | Expand All

(-)b/UPDATING (+10 lines)
Lines 5-10 they are unavoidable. Link Here
5
You should get into the habit of checking this file for changes each time
5
You should get into the habit of checking this file for changes each time
6
you update your ports collection, before attempting any port upgrades.
6
you update your ports collection, before attempting any port upgrades.
7
7
8
20230313:
9
  Affects: users of sysutils/nut*
10
  AUTHOR: cy@FreeBSD.org
11
  
12
  The nut file ownership fixups due to the UID/GID change from uucp/uucp
13
  to nut/nut may not be desireable for all users. Some users with custom
14
  file ownership may wish ownership to remain untouched. This revision
15
  to the nut family of ports/packages allows users to optionally disable
16
  automatic fixup of nut file ownership.
17
8
20230213:
18
20230213:
9
  AFFECTS: users of security/logcheck
19
  AFFECTS: users of security/logcheck
10
  AUTHOR: yasu@FreeBSD.org
20
  AUTHOR: yasu@FreeBSD.org
(-)b/sysutils/nut-devel/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
PORTNAME=	nut
1
PORTNAME=	nut
2
PORTVERSION=	${NUT_COMMIT_DATE}
2
PORTVERSION=	${NUT_COMMIT_DATE}
3
PORTREVISION=	4
3
PORTREVISION=	6
4
CATEGORIES=	sysutils
4
CATEGORIES=	sysutils
5
PKGNAMESUFFIX=	-devel
5
PKGNAMESUFFIX=	-devel
6
# MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
6
# MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
(-)b/sysutils/nut-devel/files/nut.in (-4 / +7 lines)
Lines 31-47 pidfile="%%STATEDIR%%/upsd.pid" Link Here
31
start_precmd="nut_prestart"
31
start_precmd="nut_prestart"
32
stop_postcmd="nut_poststop"
32
stop_postcmd="nut_poststop"
33
33
34
nut_file_fixup=${nut_file_fixup:-"YES"}
35
34
nut_prestart() {
36
nut_prestart() {
35
	#
37
	#
36
	# As of PR/268960 UID/GID uucp is no longer used by nut.
38
	# As of PR/268960 UID/GID uucp is no longer used by nut.
37
	# Instead UID/GID nut is used. Make sure preexisting nut files
39
	# Instead UID/GID nut is used. Make sure preexisting nut files
38
	# and directories are owned by nut instead of uucp.
40
	# and directories are owned by nut instead of uucp.
39
	#
41
	#
40
	if [ -f ${nut_prefix}/etc/nut/upsd.users ]; then
42
	if [ "${nut_file_fixup}" == "YES" ]
41
		chgrp %%NUT_GROUP%% ${nut_prefix}/etc/nut/upsd.users
43
		find ${nut_prefix}/etc/nut -user uucp -exec chown nut {} \;
44
		find ${nut_prefix}/etc/nut -group uucp -exec chgrp nut {} \;
45
		find %%STATEDIR%% -user uucp -exec chown nut {} \;
46
		find %%STATEDIR%% -group uucp -exec chgrp nut {} \;
42
	fi
47
	fi
43
	find %%STATEDIR%% -user uucp -exec chown nut {} \;
44
	find %%STATEDIR%% -group uucp -exec chgrp nut {} \;
45
48
46
	${nut_prefix}/sbin/upsdrvctl start
49
	${nut_prefix}/sbin/upsdrvctl start
47
}
50
}
(-)b/sysutils/nut/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
PORTNAME=	nut
1
PORTNAME=	nut
2
PORTVERSION=	2.8.0
2
PORTVERSION=	2.8.0
3
PORTREVISION=	19
3
PORTREVISION=	21
4
CATEGORIES=	sysutils
4
CATEGORIES=	sysutils
5
MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
5
MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
6
6
(-)b/sysutils/nut/files/nut.in (-5 / +7 lines)
Lines 31-47 pidfile="%%STATEDIR%%/upsd.pid" Link Here
31
start_precmd="nut_prestart"
31
start_precmd="nut_prestart"
32
stop_postcmd="nut_poststop"
32
stop_postcmd="nut_poststop"
33
33
34
nut_file_fixup=${nut_file_fixup:-"YES"}
35
34
nut_prestart() {
36
nut_prestart() {
35
	#
37
	#
36
	# As of PR/268960 UID/GID uucp is no longer used by nut.
38
	# As of PR/268960 UID/GID uucp is no longer used by nut.
37
	# Instead UID/GID nut is used. Make sure preexisting nut files
39
	# Instead UID/GID nut is used. Make sure preexisting nut files
38
	# and directories are owned by nut instead of uucp.
40
	# and directories are owned by nut instead of uucp.
39
	#
41
	#
40
	if [ -f ${nut_prefix}/etc/nut/upsd.users ]; then
42
	if [ "${nut_file_fixup}" == "YES" ]
41
		chgrp %%NUT_GROUP%% ${nut_prefix}/etc/nut/upsd.users
43
		find ${nut_prefix}/etc/nut -user uucp -exec chown nut {} \;
44
		find ${nut_prefix}/etc/nut -group uucp -exec chgrp nut {} \;
45
		find %%STATEDIR%% -user uucp -exec chown nut {} \;
46
		find %%STATEDIR%% -group uucp -exec chgrp nut {} \;
42
	fi
47
	fi
43
	find %%STATEDIR%% -user uucp -exec chown nut {} \;
44
	find %%STATEDIR%% -group uucp -exec chgrp nut {} \;
45
48
46
	${nut_prefix}/sbin/upsdrvctl start
49
	${nut_prefix}/sbin/upsdrvctl start
47
}
50
}
48
- 

Return to bug 269497