I’m looking to help upgrade the rclone and restic packages in clear, but I’m not able to get them to build using autospec due to failed go dependencies. eg.
Whenever a “Cannot resolve dependency name…” error is raised by autospec, it means that a build dependency has been autodetected that does not exist in the Clear Linux OS repo. Sometimes this occurs due to (a) a misdetected dependency, and other times, it is (b) a hint that a package is missing and should be added to the repo before continuing the build.
In this specific situation, scenario (b) applies. The new packages are detected because autospec recently gained more robust dependency detection for Golang packages, and the Clear Linux OS team has not yet added all Golang dependency (or godep) packages to satisfy those requirements.
So, until we actually add all of these packages, we will have to force autospec to build the package. My recommendation is to follow these steps:
Ban unresolvable package names
Add all the listed package names that autospec cannot resolve to the buildreq_ban file. Easiest is to copy/paste the results/root.log file into buildreq_ban, and filter out all of its content except for the package names in question. Eventually, the team will add these packages, but it will not happen in the near future.
Change build pattern
Force autospec to use make by running: echo make > build_pattern
Use fallback build step
Replace the contents of make_args with: || go build -mod vendor
Skip install phase
Add an install_macro file containing: true
I tried to use autospec for some packages that only has make and no make install. And I ended up writing patches for the Makefile, but never realized that I can modify install_macro with true. It would be really helpful if practical examples like this are added to autospec documentation.