Fedora - Use vendor instead of rpm dependencies
RPM Spec -------- Remove all Go dependecies Add Start and End marker comments for bundling information Add '-k' to goprep to preserve the vendor directory tools ----- Add script to update the RPM spec file to generate the indication lines based on vendor/modules.txt Packit ------ Run the new script as a post-upstream-clone hook Makefile -------- Run the new script on the generated spec file before generating the RPM mockbuild.sh ------------ Run the new script before creating the RPM
This commit is contained in:
parent
8fef39c4cf
commit
534625fa38
5 changed files with 20 additions and 29 deletions
13
tools/rpm_spec_add_provides_bundle.sh
Executable file
13
tools/rpm_spec_add_provides_bundle.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
SPEC_FILE=${1:-"osbuild-composer.spec"}
|
||||
|
||||
# Save the list of bundled packages into a file
|
||||
WORKDIR=$(mktemp -d)
|
||||
BUNDLES_FILE=${WORKDIR}/bundles.txt
|
||||
grep "^# " vendor/modules.txt | awk '{print "Provides: bundled(golang("$2")) = "$3}' | sort --ignore-case | uniq | sed -e 's/-/_/g' > "${BUNDLES_FILE}"
|
||||
|
||||
# Remove the current bundle lines
|
||||
sed -i '/^# BUNDLE_START/,/^# BUNDLE_END/{//p;d;}' "${SPEC_FILE}"
|
||||
# Add the new bundle lines
|
||||
sed -i "/^# BUNDLE_START/r ${BUNDLES_FILE}" "${SPEC_FILE}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue