rpm -V에 의해 탐지 된 파일 변경에 대한 차이점 비교하여 diff

설치가 변경되었으며 정확히 무엇이 변경되었는지 확인하고 싶습니다.

나는 뛸 수 있습니다

rpm -V MY_PACKAGES

수정 된 파일 목록을 제공합니다. 이제 원본 rpm (사용 가능한)과 비교하여 diff (모든 파일에 텍스트 내용이 있다고 가정)를 볼 수있는 편리한 방법을 찾고 있습니다.

~ 20 개의 패키지와 ~ 200 개의 변경된 파일을 처리한다는 점을 고려하면 가장 쉬운 방법은 무엇입니까? “rpm diff”와 같은 것이 있습니까 ???



답변

#
# Install yumdownloader
#
yum install yum-utils

#
# search modified files (in this case: from pam_ldap)
#
rpm -V pam_ldap
S.5....T.  c /etc/pam_ldap.conf

#
# make tmp-dir and download rpm
#
mkdir Temp
cd Temp
yumdownloader pam_ldap

#
# extract rpm to current folder
#
rpm2cpio pam_ldap-185-11.el6.x86_64.rpm  | cpio -idmv

#
# check diff
#
diff etc/pam_ldap.conf /etc/pam_ldap.conf


rpm -V explained:

    c %config configuration file.
    d %doc documentation file.
    g %ghost file (i.e. the file contents are not
    included in the package payload).
    l %license license file.
    r %readme readme file.

    S file Size differs
    M Mode differs (includes permissions and file type)
    5 MD5 sum differs
    D Device major/minor number mismatch
    L readLink(2) path mismatch
    U User ownership differs
    G Group ownership differs
    T mTime differs