From: Jan Kupec Date: Wed, 24 Sep 2008 16:10:37 +0000 (+0000) Subject: - logrotate for history X-Git-Tag: BASE-SuSE-Code-11-Branch~363 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibzypp.git;a=commitdiff_plain;h=0b8ae8470ce3680a28bd1a603b62231f172c163b - logrotate for history --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 88b8b2a..3710e97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,6 +146,9 @@ INSTALL( FILES ${CMAKE_SOURCE_DIR}/zypp.conf DESTINATION ${SYSCONFDIR}/zypp ) MESSAGE(STATUS "systemCheck will be installed in ${SYSCONFDIR}/zypp") INSTALL( FILES ${CMAKE_SOURCE_DIR}/systemCheck DESTINATION ${SYSCONFDIR}/zypp ) +# logrotate config file +INSTALL( FILES ${CMAKE_SOURCE_DIR}/zypp-history.lr DESTINATION ${SYSCONFDIR}/logrotate.d ) + #################################################################### # SUBDIRECTORIES # #################################################################### diff --git a/libzypp.spec.cmake b/libzypp.spec.cmake index 7089461..a0c99e3 100644 --- a/libzypp.spec.cmake +++ b/libzypp.spec.cmake @@ -72,6 +72,7 @@ Requires: libzypp == @VERSION@ Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel Requires: cmake libsatsolver-devel +Recommends: logrotate Summary: Package, Patch, Pattern, and Product Management - developers files Group: System/Packages Provides: yast2-packagemanager-devel @@ -234,5 +235,10 @@ rm -rf "$RPM_BUILD_ROOT" %{prefix}/include/zypp/* %{prefix}/share/cmake/Modules/* %{_libdir}/pkgconfig/libzypp.pc +%dir %{_var}/log/zypp +# declare ownership of the log file but prevent +# it from being erased by rpm -e +%ghost %config(noreplace) %{_var}/log/zypp/history +%{_sysconfdir}/logrotate.d/zypp-history.lr %changelog diff --git a/zypp-history.lr b/zypp-history.lr new file mode 100644 index 0000000..86002d8 --- /dev/null +++ b/zypp-history.lr @@ -0,0 +1,11 @@ +/var/log/zypp/history { + compress + dateext + notifempty + missingok + nocreate + + maxage 1827 + rotate 99 + size 10M +}