Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Oneliner to extract CentOS Stream package source in dist-git repo

-While investigating the sources of RHEL and Fedora packages, firstly I switch to corresponding branch, then do either rhpkg prep or fedpkg prep to extract source.

Recently, I am interested in CentOS Stream 9, and wish to investigate the source. However, I am too lazy to find the fedpkg or rhpkg equivalent for CentOS Stream, and found the following command useful:

/bin/spectool -g $(basename $PWD).spec; /bin/rpmbuild --nodeps --define "_sourcedir $PWD" --define "_builddir $PWD" --define "_buildrootdir $PWD" -bp $(basename $PWD).spec

Leave a comment