https://bugzilla.redhat.com/show_bug.cgi?id=2189083
--- Comment #9 from Herald yuhr123@gmail.com --- Through some attempts, I have found a method to package all dependencies into the .src.rpm. The workflow is as follows:
1. Still using this spec file:
https://download.copr.fedorainfracloud.org/results/herald/juicefs/fedora-raw...
2. Download the source code and create a source package that includes the vendor directory.
```sh spectool -g juicefs.spec ```
Above will download the source code named v1.1.0.tar.gz, we need to unzip it and then download the mods.
```sh tar xvf v1.1.0.tar.gz cd juicefs-1.1.0 go mod vendor ```
This will download all the dependent packages to the vendor directory of the source code, now recreate a tar.gz file which has vendor directory:
```sh tar zcvf v1.1.0.tar.gz juicefs-1.1.0 ```
3. Test to building in mock environment.
```sh fedpkg mockbuild ```
In this way, you will see that it can be successfully compiled without the need to download any dependencies during the process.
Can we use this approach?