summaryrefslogtreecommitdiff
path: root/sysutils/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake
blob: 49463e099d08e411495ab93997cea5bad136c528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
$NetBSD: patch-core_cmake_BareosInstallConfigFiles.cmake,v 1.2 2021/02/01 09:08:43 kardel Exp $

	the original build source is lax on the permissions.
	adjust permissions to match pkgsrc expectations.

--- core/cmake/BareosInstallConfigFiles.cmake.orig	2021-01-22 12:52:32.430510739 +0000
+++ core/cmake/BareosInstallConfigFiles.cmake
@@ -61,13 +61,15 @@ macro(BareosInstallConfigFiles CONFDIR C
         file(RENAME "${configfile}" "${configfile}.new")
 
         message(STATUS "copy ${configfile}.new to ${DESTCONFDIR}/${resname}")
-        file(COPY "${configfile}.new" DESTINATION "${DESTCONFDIR}/${resname}")
+        file(COPY "${configfile}.new" DESTINATION "${DESTCONFDIR}/${resname}"
+	     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ)
         file(RENAME "${configfile}.new" "${configfile}")
       else()
         message(
           STATUS "${resname}/${fname} as ${resname}/${fname} (new installation)"
         )
-        file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}")
+        file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}"
+	     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ)
       endif()
     endforeach()
   endforeach()
@@ -111,6 +113,7 @@ macro(BareosInstallConfigFiles CONFDIR C
         )
         file(COPY "${BackendConfigSrcDir}/${configfile}.new"
              DESTINATION "${DESTCONFDIR}/${dir}"
+	     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
         )
         file(RENAME "${BackendConfigSrcDir}/${configfile}.new"
              "${BackendConfigSrcDir}/${configfile}"
@@ -119,6 +122,7 @@ macro(BareosInstallConfigFiles CONFDIR C
         message(STATUS "${configfile} as ${configfile}")
         file(COPY "${BackendConfigSrcDir}/${configfile}"
              DESTINATION "${DESTCONFDIR}/${dir}"
+	     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
         )
       endif()
     endforeach()
@@ -140,6 +144,7 @@ macro(BareosInstallConfigFiles CONFDIR C
 
       file(COPY "${BackendConfigSrcDir}/${configfile}"
            DESTINATION "${DESTCONFDIR}/${dir}"
+	   FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
       )
     endforeach()
 
@@ -175,11 +180,14 @@ macro(BareosInstallConfigFiles CONFDIR C
             file(RENAME "${configfile}" "${configfile}.new")
             file(COPY "${configfile}.new"
                  DESTINATION "${DESTCONFDIR}/${resname}"
+		 FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
             )
             file(RENAME "${configfile}.new" "${configfile}")
           else()
             message(STATUS "${resname}/${fname} as ${resname}/${fname}")
-            file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}")
+            file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}"
+		 FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
+	    )
           endif()
         else()
           message(STATUS "skipping .in file ${configfile}:${IS_INFILE}")