summarylogtreecommitdiffstats
path: root/0001-build-sh.patch
blob: 0c7745730c5b6a1eea451da91faeb7838f31b015 (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
diff --git a/apps/builtinconf.go b/apps/builtinconf.go
index 361f2f206..597ecc36f 100644
--- a/apps/builtinconf.go
+++ b/apps/builtinconf.go
@@ -21,9 +21,8 @@ var (
 		"linux": {
 			Logging: &cg.Logging{
 				Receivers: map[string]cg.LoggingReceiver{
-					"syslog": &cg.LoggingReceiverFiles{
-						ConfigComponent: cg.ConfigComponent{Type: "files"},
-						IncludePaths:    []string{"/var/log/messages", "/var/log/syslog"},
+					"syslog": &cg.LoggingReceiverSystemd{
+						ConfigComponent: cg.ConfigComponent{Type: "systemd_journald"},
 					},
 				},
 				Processors: map[string]cg.LoggingProcessor{},
diff --git a/build.sh b/build.sh
index 4a97050f7..041b3ac72 100755
--- a/build.sh
+++ b/build.sh
@@ -40,19 +40,15 @@ if [ -z "$DESTDIR" ]; then
 fi
 
 function build_opsagentengine() {
-  if [[ ! -f /work/google_cloud_ops_agent_engine ]]; then
-  go build -buildvcs=false -o "/work/google_cloud_ops_agent_engine" \
-    -ldflags "$LD_FLAGS" \
-    github.com/GoogleCloudPlatform/ops-agent/cmd/google_cloud_ops_agent_engine
+  if [[ ! -f "$DESTDIR$prefix/libexec/google_cloud_ops_agent_engine" ]]; then
+    mkdir -p "$DESTDIR$prefix/libexec"
+    go build -buildvcs=false -o "$DESTDIR$prefix/libexec/google_cloud_ops_agent_engine" \
+      -ldflags "$LD_FLAGS" \
+      github.com/GoogleCloudPlatform/ops-agent/cmd/google_cloud_ops_agent_engine
   fi
-  mkdir -p "$DESTDIR$prefix/libexec"
-  cp /work/google_cloud_ops_agent_engine "$DESTDIR$prefix/libexec/google_cloud_ops_agent_engine"
 }
 
 (build_opsagentengine)
 
-# Copy the cached compilations from docker to the destination
-cp -r /work/cache/* $DESTDIR
-
 # N.B. Don't include $DESTDIR itself in the tarball, since mktemp -d will create it mode 0700.
 (cd "$DESTDIR" && tar -czf /tmp/google-cloud-ops-agent.tgz *)
diff --git a/confgenerator/built-in-config-linux.yaml b/confgenerator/built-in-config-linux.yaml
index cd84fc39b..10eb9c2fe 100644
--- a/confgenerator/built-in-config-linux.yaml
+++ b/confgenerator/built-in-config-linux.yaml
@@ -1,10 +1,7 @@
 logging:
   receivers:
     syslog:
-      type: files
-      include_paths:
-      - /var/log/messages
-      - /var/log/syslog
+      type: systemd_journald
   service:
     pipelines:
       default_pipeline: