zrhoffman commented on code in PR #7999:
URL: https://github.com/apache/trafficcontrol/pull/7999#discussion_r1580188597


##########
traffic_router/tomcat-rpm/tomcat.spec:
##########
@@ -40,9 +40,11 @@ Built:@BUILT@
 %build
 
 %install
-mkdir -p "${RPM_BUILD_ROOT}"/var/log/tomcat
 install -d -m 755 ${RPM_BUILD_ROOT}/%{tomcat_home}/
+rmdir logs
+mkdir -p "${RPM_BUILD_ROOT}"/var/log/tomcat
 cp -R * ${RPM_BUILD_ROOT}/%{tomcat_home}/
+ln -s /var/log/tomcat "${RPM_BUILD_ROOT}"%{tomcat_home}/logs

Review Comment:
   If adding `-f` ever prevents an error on this line, it means that there was 
already some file that existed at 
`${RPM_BUILD_ROOT}/opt/traffic_stats/var/log`. We'd rather know that such a 
file exists than cover up the error, right?



##########
traffic_stats/build/traffic_stats.spec:
##########
@@ -129,6 +131,8 @@ fi
 %dir /opt/traffic_stats/conf
 %dir /opt/traffic_stats/backup
 %dir /opt/traffic_stats/var
+# TODO: The /opt/traffic_stats/var/log symlink is deprecated and should be 
removed for ATC 9.0.0.
+/opt/traffic_stats/var/log

Review Comment:
   A symlink is not a directory. If `%dir` is added in front, it errors out 
with:
   
   ```shell
   Not a directory: 
/tmp/go/src/github.com/apache/trafficcontrol/rpmbuild/BUILDROOT/traffic_stats-8.1.0-12406.00a47306.el8.x86_64/opt/traffic_stats/var/log
   ```



##########
traffic_monitor/build/traffic_monitor.spec:
##########
@@ -49,6 +49,8 @@ mkdir -p "${RPM_BUILD_ROOT}"/opt/traffic_monitor/backup
 mkdir -p "${RPM_BUILD_ROOT}"/opt/traffic_monitor/static
 mkdir -p "${RPM_BUILD_ROOT}"/opt/traffic_monitor/var/run
 mkdir -p "${RPM_BUILD_ROOT}"/var/log/traffic_monitor
+# TODO: The /opt/traffic_monitor/var/log symlink is deprecated and should be 
removed for ATC 9.0.0.
+ln -s /var/log/traffic_monitor "${RPM_BUILD_ROOT}"/opt/traffic_monitor/var/log

Review Comment:
   If adding `-f` ever prevents an error on this line, it means that there was 
already some file that existed at 
`${RPM_BUILD_ROOT}/opt/traffic_monitor/var/log`. We'd rather know that such a 
file exists than cover up the error, right?



##########
traffic_monitor/build/traffic_monitor.spec:
##########
@@ -108,6 +110,8 @@ fi
 %dir /opt/traffic_monitor/backup
 %dir /opt/traffic_monitor/static
 %dir /opt/traffic_monitor/var
+# TODO: The /opt/traffic_monitor/var/log symlink is deprecated and should be 
removed for ATC 9.0.0.
+/opt/traffic_monitor/var/log

Review Comment:
   A symlink is not a directory. If `%dir` is added in front, it errors out 
with:
   
   ```shell
   Not a directory: 
/tmp/go/src/github.com/apache/trafficcontrol/rpmbuild/BUILDROOT/traffic_monitor-8.1.0-12406.00a47306.el8.x86_64/opt/traffic_monitor/var/log
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to