dragora-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dragora-users] Recipes for popt and logrotate


From: Alan Beadle
Subject: Re: [Dragora-users] Recipes for popt and logrotate
Date: Thu, 4 May 2017 14:52:10 -0400

Ok, the recipe for popt remains unchanged, but I have changed the
recipe for logrotate slightly. It makes use of a patch (which is also
pasted below) to turn on log compression by default and remove an
irrelevant (to us) reference to RPM. I believe that otherwise the
default options will work for us.


# Build recipe for logrotate.
#
# Copyright (C) 2017 Alan Beadle, address@hidden
#
# This recipe is free software: you have unlimited permission
# to copy, distribute and modify it.

program=logrotate
version=3.12.2
release=1

tarname=${program}-${version}.tar.xz

# Remote source(s)
fetch=https://github.com/logrotate/logrotate/releases/download/${version}/${tarname}

description="
Utility to rotate system logs automatically.

The logrotate utility is designed to simplify the administration of log files on
a system which generates a lot of log files. Logrotate allows for the automatic
rotation compression, removal and mailing of log files. Logrotate can be set to
handle a log file daily, weekly, monthly or when the log file gets to a certain
size.
"

homepage=https://github.com/logrotate/logrotate
license="GPL, any version"

# Source documentation
docs="ChangeLog.md COPYING INSTALL README.md"
docsdir="${docdir}/${program}-${version}"

build()
{
    set -e

    unpack "${tardir}/$tarname"

    cd "$srcdir"

    ./configure --prefix=/usr \
                --sbindir=/usr/bin \
                --mandir=$mandir \
                --with-compress-command="/usr/bin/lzip -9"\
                --with-uncompress-command="/usr/bin/lzip -d" \
                --with-default-mail-command=/usr/bin/mail \
                --with-acl

    make
    make DESTDIR="$destdir" install

    mkdir -p "${destdir}/etc/logrotate.d"
    chmod 755 "${destdir}/etc/logrotate.d"

    mkdir -p "${destdir}/etc/cron.daily"
    chmod 755 "${destdir}/etc/cron.daily"

    patch -p1 < ${worktree}/patches/logrotate/logrotate-default.patch

    cp -p "examples/logrotate-default" "${destdir}/etc/logrotate.conf"
    chmod 644 "${destdir}/etc/logrotate.conf"

    cp -p examples/logrotate.cron "${destdir}/etc/cron.daily/logrotate"
    chmod 755 "${destdir}/etc/cron.daily/logrotate"

    # Compress man pages
    lzip -9 "${destdir}/${mandir}"/man?/*

    # Copy documentation
    mkdir -p "${destdir}${docsdir}"

    for file in $docs
    do
        cp -p $file "${destdir}${docsdir}"
    done

}



--- a/examples/logrotate-default    2017-05-04 14:28:48.393620994 -0400
+++ b/examples/logrotate-default    2017-05-04 14:48:58.138616506 -0400
@@ -12,9 +12,9 @@ create
 dateext

 # uncomment this if you want your log files compressed
-#compress
+compress

-# RPM packages drop log rotation information into this directory
+# Directory for application-specific configuration files
 include /etc/logrotate.d

 # no packages own wtmp and btmp -- we'll rotate them here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]