Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] svn commit: trunk/buildroot/package:  logrotate
@ 2008-10-06 20:41 wberrier at uclibc.org
  2008-10-07  5:48 ` Hamish Moffatt
  0 siblings, 1 reply; 2+ messages in thread
From: wberrier at uclibc.org @ 2008-10-06 20:41 UTC (permalink / raw)
  To: buildroot

Author: wberrier
Date: 2008-10-06 13:41:12 -0700 (Mon, 06 Oct 2008)
New Revision: 23610

Log:
logrotate:
-new package


Added:
   trunk/buildroot/package/logrotate/
   trunk/buildroot/package/logrotate/Config.in
   trunk/buildroot/package/logrotate/logrotate.conf
   trunk/buildroot/package/logrotate/logrotate.mk

Modified:
   trunk/buildroot/package/Config.in


Changeset:
Modified: trunk/buildroot/package/Config.in
===================================================================
--- trunk/buildroot/package/Config.in	2008-10-06 20:28:46 UTC (rev 23609)
+++ trunk/buildroot/package/Config.in	2008-10-06 20:41:12 UTC (rev 23610)
@@ -89,6 +89,7 @@
 source "package/liblockfile/Config.in"
 source "package/libsysfs/Config.in"
 source "package/lockfile-progs/Config.in"
+source "package/logrotate/Config.in"
 source "package/lsof/Config.in"
 source "package/ltp-testsuite/Config.in"
 source "package/ltrace/Config.in"

Added: trunk/buildroot/package/logrotate/Config.in
===================================================================
--- trunk/buildroot/package/logrotate/Config.in	                        (rev 0)
+++ trunk/buildroot/package/logrotate/Config.in	2008-10-06 20:41:12 UTC (rev 23610)
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LOGROTATE
+	bool "logrotate"
+	select BR2_PACKAGE_POPT
+	depends on BR2_USE_WCHAR
+	help
+	  A simple program to rotate logs.
+
+	  https://fedorahosted.org/logrotate/
+
+comment "logrotate     - disabled (requires wchar support)"
+	depends on !BR2_USE_WCHAR
+

Added: trunk/buildroot/package/logrotate/logrotate.conf
===================================================================
--- trunk/buildroot/package/logrotate/logrotate.conf	                        (rev 0)
+++ trunk/buildroot/package/logrotate/logrotate.conf	2008-10-06 20:41:12 UTC (rev 23610)
@@ -0,0 +1,14 @@
+compress
+
+include /etc/logrotate.d
+
+/var/log/messages /var/log/auth.log /var/log/user.log {
+	rotate 7
+	daily
+	delaycompress
+	missingok
+	sharedscripts
+	postrotate
+		/usr/bin/killall -HUP syslogd
+	endscript
+}

Added: trunk/buildroot/package/logrotate/logrotate.mk
===================================================================
--- trunk/buildroot/package/logrotate/logrotate.mk	                        (rev 0)
+++ trunk/buildroot/package/logrotate/logrotate.mk	2008-10-06 20:41:12 UTC (rev 23610)
@@ -0,0 +1,38 @@
+LOGROTATE_VERSION:=3.7.7
+LOGROTATE_SOURCE:=logrotate-$(LOGROTATE_VERSION).tar.gz
+LOGROTATE_SITE:=https://fedorahosted.org/releases/l/o/logrotate/
+LOGROTATE_DIR:=$(BUILD_DIR)/logrotate-$(LOGROTATE_VERSION)
+LOGROTATE_BINARY:=logrotate
+LOGROTATE_TARGET_BINARY:=usr/sbin/$(LOGROTATE_BINARY)
+
+$(DL_DIR)/$(LOGROTATE_SOURCE):
+	$(WGET) -P $(DL_DIR) $(LOGROTATE_SITE)/$(LOGROTATE_SOURCE)
+
+$(LOGROTATE_DIR)/.source: $(DL_DIR)/$(LOGROTATE_SOURCE)
+	$(ZCAT) $(DL_DIR)/$(LOGROTATE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+	toolchain/patch-kernel.sh $(LOGROTATE_DIR) package/logrotate/ *.patch	
+	touch $@
+
+$(LOGROTATE_DIR)/$(LOGROTATE_BINARY): $(LOGROTATE_DIR)/.source
+	$(MAKE) CC=$(TARGET_CC) -C $(LOGROTATE_DIR)
+
+$(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY): $(LOGROTATE_DIR)/$(LOGROTATE_BINARY)
+	$(MAKE) PREFIX=$(TARGET_DIR) -C $(LOGROTATE_DIR) install
+	$(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
+
+logrotate: uclibc busybox popt $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
+
+logrotate-source: $(DL_DIR)/$(LOGROTATE_SOURCE)
+
+logrotate-clean:
+	rm -f $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
+	-$(MAKE) -C $(LOGROTATE_DIR) clean
+
+logrotate-dirclean:
+	rm -Rf $(LOGROTATE_DIR)
+
+ifeq ($(strip $(BR2_PACKAGE_LOGROTATE)),y)
+TARGETS+=logrotate
+endif
+

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] svn commit: trunk/buildroot/package:  logrotate
  2008-10-06 20:41 [Buildroot] svn commit: trunk/buildroot/package: logrotate wberrier at uclibc.org
@ 2008-10-07  5:48 ` Hamish Moffatt
  0 siblings, 0 replies; 2+ messages in thread
From: Hamish Moffatt @ 2008-10-07  5:48 UTC (permalink / raw)
  To: buildroot

On Mon, Oct 06, 2008 at 01:41:12PM -0700, wberrier at uclibc.org wrote:
> Added: trunk/buildroot/package/logrotate/logrotate.conf
> ===================================================================
> --- trunk/buildroot/package/logrotate/logrotate.conf	                        (rev 0)
> +++ trunk/buildroot/package/logrotate/logrotate.conf	2008-10-06 20:41:12 UTC (rev 23610)
> @@ -0,0 +1,14 @@
> +compress
> +
> +include /etc/logrotate.d
> +
> +/var/log/messages /var/log/auth.log /var/log/user.log {
> +	rotate 7
> +	daily
> +	delaycompress
> +	missingok
> +	sharedscripts
> +	postrotate
> +		/usr/bin/killall -HUP syslogd
> +	endscript
> +}

I don't like including this configuration by default. I don't think it
can easily be overridden (it's copied in after the target_skeleton), and
most systems don't have /var/log/auth.log etc by default.

Same for packages that include init scripts by default :(

Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-07  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 20:41 [Buildroot] svn commit: trunk/buildroot/package: logrotate wberrier at uclibc.org
2008-10-07  5:48 ` Hamish Moffatt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox