Yes, you read it correctly. It can be done and I've done it for the past years. So, here's some heads up and tips on doing it. Also, if you are an employee of BMC and are working with Patrol, feel free to contact me to get the actual spec file. Your current way of delivering the Patrol Agent is hopelessly backwards and outdated and is a good reason for NOT using Patrol for monitoring.
A) Do a 'find / >list.of.files' before installing, then install Patrol, then do 'updatedb; find / >new.list.of.files' and compare the two for an indication of what to package.
A) Difficult question, depends on what you are using and for what OS you are packaging for, but I, having removed a lot of unnecessary stuff, ended up with a RPM that's about 150 MB and that installs in seconds. If you are too lazy to find out what to package, here's a list of stuff that I use for Red Hat Enterprise Linux 7.1: http://hacka.net/files/patrol-packagelist.txt
1) You have to set 'AutoReqProv: no' or you'll pull in loads of dependencies that you do not want.
2) Create symlinks for Patrol to start up.
3) You need to solve a gcc prelink issue like below in %post:
# This means that you should not package these files. This is to solve a prelink issue with the versions that BMC delivers that prevents packaging.
ln -s /usr/lib64/libstdc++.so.6 /usr/lib/bmc/gcc-3.4.4/rhel-6-amd64-64/libstdc++.so.6
ln -s /lib64/libgcc_s.so.1 /usr/lib/bmc/gcc-3.4.4/rhel-6-amd64-64/libgcc_s.so.1
4) Possibly, in RHEL7 you may have to do the following in %post for the Agent to start up.
ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2
5) You need to not package /patrol/Patrol3/Linux-2-6-x86-64/best1/9.5.00/3rd_party_files/gzip and instead in %post do:
ln -n /usr/bin/gzip /patrol/Patrol3/Linux-2-6-x86-64/best1/9.5.00/3rd_party_files/gzip
..or the RPM build will bail out with a cpio error regarding md5 sum mismatch.
6) Don't forget to specify permissions for dcm and bgs stuff.
7) You need to package all the symlinks as well (or go through the pain of creating and deleting them in %post %postun. If you keep everything in a version handling system. SVN may require you to use the "--no-ignore" option when doing svn add.