After that, you suggested to run:
rpm -q --requires grep
info
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
rpmlib(PayloadIsLzma) <= 4.4.6-1
You can skip info, since this is a program to display manual pages. It provides no libraries. You can skip those rpmlib lines, too. The libc.so.6 package contains the standard C library, which is needed by all programs written in C. Include that. If in doubt, run rpm -ql $pkg | grep '\.so' to check whether a package provides shared libraries. If so, add that package. If not, you can skip it.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'