You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/01/22 23:25:21 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new pull request #5464: Add license to RPMs

zrhoffman opened a new pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464


   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   
   - [x] This PR fixes #5462 by adding a license to each of our RPMs.<!-- You can check for an issue here: https://github.com/apache/trafficcontrol/issues -->
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   -  Fake Origin testing tool
   -  Grove
   -  Traffic Monitor
   -  Traffic Ops
   -  Traffic Ops ORT
   -  Traffic Portal
   -  Traffic Router
   -  Traffic Server
   -  Traffic Stats
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   - Build RPMs
     * Build the ATC RPMs:
     ```shell
     ./pkg -v && echo 'ATC RPMs built successfully';
     ```
     * Build the Transitive Source Build ATS RPM:
     ```shell
     ./pkg -v -o && echo 'Traffic Server TSB RPM built successfully';
     ```
     * Build the fakeOrigin RPM:
     ```shell
     docker-compose -f test/fakeOrigin/docker-compose.build_rpm.yml up --build
     ```
   - Make sure the binary RPMs have license files:
     ```shell
     set -o pipefail;
     cd dist;
     for rpm in *.x86_64.rpm; do
       if [[ "$rpm" == trafficserver-debuginfo-* ]]; then
         continue;
       fi;
       if ! rpm -ql "$rpm" | grep '/usr/share/licenses/.*/LICENSE'; then
         echo "No LICENSE file was found for ${rpm}"
         break;
       fi;
     done;
     ```
   - Extract the source RPMs using bsdtar (included in [libarchive](https://formulae.brew.sh/formula/libarchive)) and verify that they contain LICENSE files:
     ```shell
     for rpm in *.src.rpm; do
       mkdir "${rpm%.rpm}";
         (cd "${rpm%.rpm}";
         bsdtar xf "../${rpm}";
         tar xf *.tgz;
         if ! ls */LICENSE; then
           echo "No LICENSE file was found for ${rpm}"
           break;
         fi;)
     done;
     ```
   
   In the future, we may want to consider adding a check to ensure the RPMs include license files in `/usr/share/licenses`.
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [x] This PR includes instructions for testing
   - [x] Only RPM spec files changed, no documentation necessary
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   


----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#discussion_r563776733



##########
File path: test/fakeOrigin/build/build_rpm.sh
##########
@@ -70,7 +71,7 @@ cp $BUILDDIR/RPMS/x86_64/*.rpm ./dist/
 # Cross compile because we can
 GOBINEXT=""
 for GOOS in darwin linux windows; do
-  for GOARCH in 386 amd64; do
+  for GOARCH in amd64; do

Review comment:
       Re-added 386 GO_ARCH but skipping darwin/386 in 8551cbbf7c




----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] ocket8888 merged pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464


   


----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] zrhoffman commented on pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#issuecomment-766925025


   @alficles any thoughts on this PR?


----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#discussion_r563041405



##########
File path: test/fakeOrigin/build/build_rpm.sh
##########
@@ -70,7 +71,7 @@ cp $BUILDDIR/RPMS/x86_64/*.rpm ./dist/
 # Cross compile because we can
 GOBINEXT=""
 for GOOS in darwin linux windows; do
-  for GOARCH in 386 amd64; do
+  for GOARCH in amd64; do

Review comment:
       There was a build error when trying to build the darwin/386 GOOS/GOARCH pair because Go does not support that pair (766e5aa1b0). I removed it so that fakeOrigin's build_rpm.sh would exit successfully.
   
   Do we care about 32-bit support? If so, we could just skip over the darwin/386 pair.




----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#discussion_r563044323



##########
File path: test/fakeOrigin/build/build_rpm.sh
##########
@@ -70,7 +71,7 @@ cp $BUILDDIR/RPMS/x86_64/*.rpm ./dist/
 # Cross compile because we can
 GOBINEXT=""
 for GOOS in darwin linux windows; do
-  for GOARCH in 386 amd64; do
+  for GOARCH in amd64; do

Review comment:
       I think that would be better. I don't think there's anyone trying to do anything with this on 32-bit machines, but then again I'd reasonably expect to be able to run a lightweight fake origin on my raspi from high school, so who knows. If it's easy to not drop support for something valid, I say we do it.




----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] zrhoffman commented on pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#issuecomment-766925025


   @alficles any thoughts on this PR?


----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#discussion_r563025707



##########
File path: test/fakeOrigin/build/build_rpm.sh
##########
@@ -70,7 +71,7 @@ cp $BUILDDIR/RPMS/x86_64/*.rpm ./dist/
 # Cross compile because we can
 GOBINEXT=""
 for GOOS in darwin linux windows; do
-  for GOARCH in 386 amd64; do
+  for GOARCH in amd64; do

Review comment:
       is this removing architecture support?




----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464#discussion_r563776733



##########
File path: test/fakeOrigin/build/build_rpm.sh
##########
@@ -70,7 +71,7 @@ cp $BUILDDIR/RPMS/x86_64/*.rpm ./dist/
 # Cross compile because we can
 GOBINEXT=""
 for GOOS in darwin linux windows; do
-  for GOARCH in 386 amd64; do
+  for GOARCH in amd64; do

Review comment:
       Re-added 386 GO_ARCH but skipping darwin/386 in 8551cbbf7c




----------------------------------------------------------------
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.

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



[GitHub] [trafficcontrol] ocket8888 merged pull request #5464: Add license to RPMs

Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #5464:
URL: https://github.com/apache/trafficcontrol/pull/5464


   


----------------------------------------------------------------
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.

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