LoginSignup
0
0

More than 5 years have passed since last update.

rpm -q でパッケージ情報抽出

Posted at

時々使うけども、毎回忘れてるので、ここにメモしておく。

背景

  • インストール済みパッケージから各種情報を取得したかった

rpm -q ...

rpm -q --scripts

$ rpm -q --scripts jenkins
preinstall scriptlet (using /bin/sh):
/usr/sbin/groupadd -r jenkins &>/dev/null || :
# SUSE version had -o here, but in Fedora -o isn't allowed without -u
/usr/sbin/useradd -g jenkins -s /bin/false -r -c "Jenkins Continuous Build server" \
        -d "/var/lib/jenkins" jenkins &>/dev/null || :
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add jenkins

# If we have an old hudson install, rename it to jenkins
if test -d /var/lib/hudson; then
    # leave a marker to indicate this came from Hudson.
    # could be useful down the road
    # This also ensures that the .??* wildcard matches something
    touch /var/lib/hudson/.moving-hudson
    mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins
    rmdir /var/lib/hudson
    find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true
fi
if test -d /var/run/hudson; then
    mv -f /var/run/hudson/* /var/run/jenkins
    rmdir /var/run/hudson
fi

# Ensure the right ownership on files
. /etc/sysconfig/jenkins
chown -R ${JENKINS_USER:-jenkins} /var/log/jenkins
chown -R ${JENKINS_USER:-jenkins} ${JENKINS_HOME:-/var/lib/jenkins}
preuninstall scriptlet (using /bin/sh):
if [ "$1" = 0 ] ; then
    # if this is uninstallation as opposed to upgrade, delete the service
    /sbin/service jenkins stop > /dev/null 2>&1
    /sbin/chkconfig --del jenkins
fi
exit 0
postuninstall scriptlet (using /bin/sh):
if [ "$1" -ge 1 ]; then
    /sbin/service jenkins condrestart > /dev/null 2>&1
fi
exit 0

rpm -q --changelog

$ rpm -q --changelog jenkins
* Sat Apr 19 2014 mbarr@mbarr.net
- Removed the jenkins.repo installation.  Per https://issues.jenkins-ci.org/browse/JENKINS-22690

* Wed Sep 28 2011 kk@kohsuke.org
- See [http://jenkins-ci.org/changelog] for complete details
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0