Skip to content

Instantly share code, notes, and snippets.

@takumaw
Last active April 3, 2025 06:24
Show Gist options
  • Select an option

  • Save takumaw/fe9be7ab16a3efad7a7af8e772b8ea89 to your computer and use it in GitHub Desktop.

Select an option

Save takumaw/fe9be7ab16a3efad7a7af8e772b8ea89 to your computer and use it in GitHub Desktop.
Extract RPM
function extractsrcrpm() {
rpm -ivh ${1}
rpmbuild -bp --nodeps ~/rpmbuild/SPECS/*.spec
mv ~/rpmbuild ${1}build
}
function extractbinrpm() {
mkdir -p ${1%.*}
pushd ${1%.*}
rpm2cpio ${1} | cpio -idmv
popd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment