-
Notifications
You must be signed in to change notification settings - Fork 1
Makefile
Is TRACE_DIR :=$(shell pwd) correct? This might mean to define a
variable TRACE_DIR as the current directory that the spec file is in
during rpmbuild, at this point of the current spec file & rpmbuild
command the directory being accessed is /home/madas.
- First, ensure you are in home directory and remove the entire rpmbuild directory recursively, taking care not to remove anything valuable unrelated to TRACE: cd && rm -r rpmbuild
Using script commands (from home directory):
rpmdev-setuptree
wget https://github.com/art-daq/trace/repository/svn/raw/trunk/rpm/TRACE.spec -O ~/rpmbuild/SPECS/TRACE.spec
svn export https://cdcvs.fnal.gov/subversion/trace-svn/trunk trace-v3 | tail
rm -r trace-v3/rpm && rm trace-v3/script/trace_rpms_from_repo.sh
tar -cf rpmbuild/SOURCES/trace-v3.tar trace-v3
rm -r trace-v3
using an earlier execution of:
$ rpmbuild -bc ~/rpmbuild/SPECS/TRACE.spec
The output shows that the program changes directory into /rpmbuild/BUILD/, attempts to remove any pre-existing file named trace-v3, then extracts the tar file created earlier by the script. After which the program changes directory into the extracted trace-v3 that was placed in/rpmbuild/BUILD/ by the tar extraction and gives permission/reorganizes files and directories recursively via:
/usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
A brief explanation of the permissions being granted from this chmod command: a+rX —this gives all users read and execute permissions, u+w —this gives current user write permissions, g-w —this takes away group owner’s write permission, o-w —this takes away “all other users’” write permissions.
* Since we are starting with a blank rpmbuild tree, use these useful commands from the output just described:
cd ~/rpmbuild/BUILD/ && tar -xf ~/rpmbuild/SOURCES/trace-v3.tar && cd trace-v3
chmod -Rf a+rX,u+w,g-w,o-w .
Makefile (add this line to spec file):
$ make OUT=$PWD all