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 2022/12/14 16:53:25 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new issue, #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

ocket8888 opened a new issue, #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251

   ## This Bug Report affects these Traffic Control components:
   - CDN in a Box
   
   ## Current behavior:
   `make` checks for a build architecture suffix based on the evaluation of the RPM macro `%_arch`, presumably in an effort to support Apple's new CPU architecture (?). This means that on systems without `rpm` installed, it winds up looking for an output file at `../../dist/{{component}}-{{version}}-{{number of commits}}.{{commit hash}}.{{Enterprise Linux Release Version}}..rpm`, because the architecture is left as an empty string.
   
   ## Expected behavior:
   `make` should make everything necessary to build CDN-in-a-Box
   
   ## Steps to reproduce:
   1. `make`
   


-- 
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-unsubscribe@trafficcontrol.apache.org.apache.org

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


[GitHub] [trafficcontrol] zrhoffman commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1369955960

   @fabikd: On #7251's branch, are you able to build CDN in a Box without making any modifications to its files?


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] ocket8888 commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370149865

   Do you have `community/rpm-tools` installed? It would presumably work fine if I installed whatever package provides `rpm` for my system, but that did not used to be a requirement - and I feel that it shouldn't be. The issue stems from the fact that `rpm --eval %_arch` returns nothing on `stdout` on my system because it does not succeed.


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] ocket8888 commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370173240

   Yeah, `rpm` is one of the required dependencies listed for building RPMs without Docker, but building the RPMs without Docker is not a required dependency for CiaB. Which is to say, yes, I do feel strongly about that.
   
   It's crazy to me that we'd need a container just to figure out what architecture we're on but if that's really the easiest way that's fine with me. You'll need the `rockylinux:8` image for a default CiaB anyway.


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] ocket8888 closed issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
ocket8888 closed issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems
URL: https://github.com/apache/trafficcontrol/issues/7251


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] zrhoffman commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1368035928

   What did you do? What did you expect to happen? What happened instead?


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] ocket8888 commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370137185

   > What did you do?
   
   `make`
   
   > What did you expect to happen?
   
   RPMs to be built successfully and placed where they need to be for the CiaB build process
   
   > What happened instead?
   
   after `pkg` is done building the RPMs, `make` exits with a failure and error message indicating that it's not looking for the right file e.g. `cp: cannot stat '../../dist/traffic_ops-7.1.0-12307.02d4a142.el8..rpm': No such file or directory`
   
   


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] ocket8888 commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370151415

   I didn't do `--debug`, but the issue doesn't seem unclear enough to warrant it IMO:
   ```
   Results in 'dist':
   total 31880
   -rw-r--r-- 1 ocket8888 ocket8888    92212 Jan  3 12:17 build-traffic_ops.log
   -rw-r--r-- 1 ocket8888 ocket8888 16815360 Jan  3 12:17 traffic_ops-7.1.0-12307.02d4a142.el8.src.rpm
   -rw-r--r-- 1 ocket8888 ocket8888 15731400 Jan  3 12:17 traffic_ops-7.1.0-12307.02d4a142.el8.x86_64.rpm
   cp -f "../../dist/traffic_ops-7.1.0-12307.02d4a142.el8..rpm" "traffic_ops/traffic_ops.rpm"
   cp: cannot stat '../../dist/traffic_ops-7.1.0-12307.02d4a142.el8..rpm': No such file or directory
   make: *** [Makefile:153: traffic_ops/traffic_ops.rpm] Error 1
   ```


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] fabikd commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
fabikd commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370034295

   I just pulled master and tried it again; and it fails unless I make the changes that I've noted in the readme.


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] zrhoffman commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370160325

   > Do you have `community/rpm-tools` installed?
   
   Oh, I see. Yes, I have `community/rpm-tools` installed because I almost always run `make native` instead of `make`.
   
   > It would presumably work fine if I installed whatever package provides `rpm` for my system, but that did not used to be a requirement - and I feel that it shouldn't be. The issue stems from the fact that `rpm --eval %_arch` returns nothing on `stdout` on my system because it does not succeed.
   
   `rpm --eval %_arch` is a reliable way to get the Rocky Linux/CentOS-expected architecture for any supported architecture. `arm64` is particularly problematic because the RPM arch is supposed to be `aarch64` (and some ARM64 platforms do return `aarch64` for `uname -m`, but `uname -m` returns `arm64` on macOS.
   
   I don't think having the `rpm` command unreasonable for CDN in a Box, since `rpm` is once of the required dependencies [listed](https://traffic-control-cdn.readthedocs.io/en/latest/development/building.html#install-the-dependencies) for building the RPMs without Docker.
   
   But if you feel strongly about not wanting to install `rpm-tools`, that part of the Makefile could be something like
   
   ```shell
   docker run --rm rockylinux:8 rpm --eval %_arch
   ```
   


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] ocket8888 commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370155060

   I think you meant to put [your comment](https://github.com/apache/trafficcontrol/issues/7238#issuecomment-1370147059) here. The short answer is "no". By popular demand, here's enough of the output from `make --debug` to see the issue:
   ```
   Updating makefiles....
   Updating goal targets....
    File 'traffic_ops/traffic_ops.rpm' does not exist.
      File '../../dist/traffic_ops-7.1.0-12307.02d4a142.el8..rpm' does not exist.
     Must remake target '../../dist/traffic_ops-7.1.0-12307.02d4a142.el8..rpm'.
   "./../../pkg" -v -8 traffic_ops_build
   Building traffic_ops_build.
   Pulling traffic_ops_build ... done
   Creating build_traffic_ops_build_run ... done
   ```
   As an inconvenient side-effect, `make` always attempts to call `pkg` to build the RPM because it's not actually making the file that `make` expects.


-- 
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-unsubscribe@trafficcontrol.apache.org

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


[GitHub] [trafficcontrol] zrhoffman commented on issue #7251: CDN-in-a-Box Makefile no longer builds RPMs on non-RHEL systems

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #7251:
URL: https://github.com/apache/trafficcontrol/issues/7251#issuecomment-1370145132

   `make traffic_ops/traffic_ops.rpm` succeeds for me on Arch. Since it's not looking for the right file, what is the output at the end of
   
   ```
   make --debug traffic_ops/traffic_ops.rpm
   ```
   
   ? Example:
   
   ```make
   Updating goal targets....
     Successfully remade target file '../../dist/traffic_ops-7.1.0-12300.c4444af6.el8.x86_64.rpm'.
    Prerequisite '../../dist/traffic_ops-7.1.0-12300.c4444af6.el8.x86_64.rpm' is newer than target 'traffic_ops/traffic_ops.rpm'.
   Must remake target 'traffic_ops/traffic_ops.rpm'.
   cp -f "../../dist/traffic_ops-7.1.0-12300.c4444af6.el8.x86_64.rpm" "traffic_ops/traffic_ops.rpm"
   Successfully remade target file 'traffic_ops/traffic_ops.rpm'.
   ```


-- 
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-unsubscribe@trafficcontrol.apache.org

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