public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] New global USE flag: logrotate
@ 2005-04-28  8:30 Henrik Brix Andersen
  2005-04-28  8:51 ` Robin H. Johnson
                   ` (4 more replies)
  0 siblings, 5 replies; 54+ messages in thread
From: Henrik Brix Andersen @ 2005-04-28  8:30 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

Hi,

I'd like to propose a new global USE flag named 'logrotate' to add
support for app-admin/logrotate (by installing logrotate config files
to /etc/logrotate.d/).

There are currently one local USE flag named logrotate in
net-proxy/squid, which of course isn't enough to justify having a global
USE flag - but it seems other packages, at least app-admin/syslog-ng,
currently unconditionally install a config file to /etc/logrotate.d/.

There are 4 open enhancement requests in Gentoo bugzilla about ebuilds
which could install such a config file, and I am sure many other ebuilds
could as well (anything that logs to a file).

If there are no objections to this I will make 'logrotate' a global USE
flag once I add a logrotate config file to sys-power/acpid.

Sincerely,
Brix
-- 
Henrik Brix Andersen <brix@gentoo.org>
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28  8:30 [gentoo-dev] New global USE flag: logrotate Henrik Brix Andersen
@ 2005-04-28  8:51 ` Robin H. Johnson
  2005-04-28 10:34   ` Henrik Brix Andersen
  2005-04-28 13:41 ` Cory Visi
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 54+ messages in thread
From: Robin H. Johnson @ 2005-04-28  8:51 UTC (permalink / raw
  To: Gentoo Developers

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

On Thu, Apr 28, 2005 at 10:30:03AM +0200, Henrik Brix Andersen wrote:
> I'd like to propose a new global USE flag named 'logrotate' to add
> support for app-admin/logrotate (by installing logrotate config files
> to /etc/logrotate.d/).
+1 here. Probably best to do it via an eclass since lots of packages
will be using it.

> There are currently one local USE flag named logrotate in
> net-proxy/squid, which of course isn't enough to justify having a global
> USE flag - but it seems other packages, at least app-admin/syslog-ng,
> currently unconditionally install a config file to /etc/logrotate.d/.
The following packages touch /etc/logrotate.d in some way.
dev-db/mysql
net-www/apache
mail-filter/dspam
mail-filter/qmail-scanner
sys-process/dcron
sys-cluster/heartbeat
net-proxy/squid
net-proxy/dansguardian
net-proxy/dansguardian-dgav
net-proxy/privoxy
net-dialup/vbox3
net-dialup/isdn4k-utils

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 241 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28  8:51 ` Robin H. Johnson
@ 2005-04-28 10:34   ` Henrik Brix Andersen
  2005-04-28 10:44     ` Robin H. Johnson
  2005-04-28 12:05     ` Ciaran McCreesh
  0 siblings, 2 replies; 54+ messages in thread
From: Henrik Brix Andersen @ 2005-04-28 10:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On Thu, 2005-04-28 at 01:51 -0700, Robin H. Johnson wrote:
> +1 here. Probably best to do it via an eclass since lots of packages
> will be using it.

It's as simple as:

	if use logrotate; then
		insinto /etc/logrotate.d
		newins ${FILESDIR}/${P}-logrotate ${PN}
	fi

Do we really need an eclass for that?
	
Sincerely,
Brix
-- 
Henrik Brix Andersen <brix@gentoo.org>
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 10:34   ` Henrik Brix Andersen
@ 2005-04-28 10:44     ` Robin H. Johnson
  2005-04-28 11:01       ` Thomas de Grenier de Latour
  2005-04-28 11:01       ` Henrik Brix Andersen
  2005-04-28 12:05     ` Ciaran McCreesh
  1 sibling, 2 replies; 54+ messages in thread
From: Robin H. Johnson @ 2005-04-28 10:44 UTC (permalink / raw
  To: Gentoo Developers

[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

On Thu, Apr 28, 2005 at 12:34:50PM +0200, Henrik Brix Andersen wrote:
> On Thu, 2005-04-28 at 01:51 -0700, Robin H. Johnson wrote:
> > +1 here. Probably best to do it via an eclass since lots of packages
> > will be using it.
> It's as simple as:
> 
> 	if use logrotate; then
> 		insinto /etc/logrotate.d
> 		newins ${FILESDIR}/${P}-logrotate ${PN}
> 	fi
> Do we really need an eclass for that?
I meant an eclass to take care of all of it together.

(rough prototype here)
IUSE="$IUSE logrotate"
RDEPEND="$RDEPEND logrotate? ( app-admin/logrotate )"

dologrotated() {
	use logrotate && insinto /etc/logrotate.d && doins "$@"
}
newlogrotated() {
	use logrotate && insinto /etc/logrotate.d && newins "$1" "$2"
}

Then ebuilds can just do:
inherit logrotate
...
newlogrotated ${FILES}/${PN}-logrotate-basic ${PN}-logrotate
dologrotated ${FILES}/${PN}-logrotate-extra 
...

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 241 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 10:44     ` Robin H. Johnson
@ 2005-04-28 11:01       ` Thomas de Grenier de Latour
  2005-04-28 11:01       ` Henrik Brix Andersen
  1 sibling, 0 replies; 54+ messages in thread
From: Thomas de Grenier de Latour @ 2005-04-28 11:01 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

On Thu, 28 Apr 2005 03:44:44 -0700
"Robin H. Johnson" <robbat2@gentoo.org> wrote:

> I meant an eclass to take care of all of it together.

I had started writing one too some time ago, but i've actually
never applied it to any ebuild and then forgot about it. Anyway,
here it is, with some freshly added comments which explain what it
was supposed to do, but still not tested. It may be a bit
over-complicated for little added-value actually...

-- 
TGL.

[-- Attachment #2: logrotate.eclass --]
[-- Type: application/octet-stream, Size: 6297 bytes --]

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

ECLASS=logrotate
INHERITED="${INHERITED} ${ECLASS}"
IUSE="${IUSE} logrotate"
RDEPEND="${RDEPEND} logrotate? (app-admin/logrotate)"
#XXX DEPEND=sed?

# This eclass can:
# - create some /etc/logrotate.d files
# - install some /etc/logrotate.d files 
#   (freshly created or from your ${FILESDIR})
# - set a few user-defined preferences in this files

# Some typical usage patterns:
#
# 1) make it create a standard logrotate file:
# --------------------------------------------
# --- ebuild:
# inherit logrotate
# LOGROTATE_logs_path="/var/log/clam-update.log"
# LOGROTATE_missingok="1"
# ...
# src_install() {
#     install_logrotate_file
# ...
# --------------------------------------------
#
#
# 2) use an already created logrotate file:
# --------------------------------------------
# --- ${FILESDIR}/exim.logrotate:
# /var/log/exim/exim*.log {
#     <frequence>
#     rotate <rotations>
#     <compress>
#     missingok
#     notifempty
#     create 640 mail mail
#     sharedscripts
#     postrotate
#         /etc/init.d/exim restart > /dev/null
#     endscript
# }
# --------------------------------------------
# --- ebuild:
# inherit logrotate
# ...
# src_install() {
#     install_logrotate_file
# ...
# --------------------------------------------


# From the user point of view, some options can be controlled through the
# following environment variables:
# - LOGROTATE_FREQUENCE: daily, weekly, monthly, etc.
# - LOGROTATE_ROTATIONS: integer (number of rotations to keep)
# - LOGROTATE_COMPRESS: if non-null, will add "compress" to the rotations rules

# From the ebuild point of view, there are more config vars available:
# - LOGROTATE_frequence: defaults to $LOGROTATE_FREQUENCE or weekly if not set
# - LOGROTATE_rotations: defaults to $LOGROTATE_ROTATIONS or 6
# - LOGROTATE_compress: defaults to $LOGROTATE_COMPRESS or "true"
# - LOGROTATE_missingok: no default. Will add "missingok" if non-null
# - LOGROTATE_create_rights: no default. Will add "create ..." if non-null. It
#   should be something like "640 user group" if set.
# - LOGROTATE_logs_path: no default. It's the log files path. This one is
#   mandatory if you want the eclass to create the logrotate.d file.
# - LOGROTATE_FILE: defaults to "${FILESDIR}/${PN}.logrotate". If the file it
#   points to does not exist, then a standard file will be created.

# Other global variables:
# - MY_LOGROTATE_FILE is location of the writable copy of the logrotate file
# - LOGROTATE_CONFIG_VARS is a list of vars that may be used in logrotate file
LOGROTATE_CONFIG_VARS="\
	frequence
	rotations
	compress
	missingok
	create_rights
	logs_path"

# This function set default settings values in a logrotate.d file. It will
# replace "<config_var>" with "$LOGROTATE_config_var". Sure, do not apply this
# to your $LOGROTATE_FILE directly, but to a local writable copy (or do not use
# it at all btw, it should be automatic).
sed_logrotate_file() {
	local sed_cmd="sed -e '/^[ ^t]*$/d'"
	local var_name var_value
	# Build some sed expressions like this:
	#   -e 's:<frequence>:weekly:' -e ...
	for var_name in ${LOGROTATE_CONFIG_VARS} ; do
		eval var_value="\${LOGROTATE_${var_name}}"
		#XXX Any chance to get weird chars breaking things here?
		sed_cmd="${sed_cmd} -e 's:\\b<${var_name}>\\b:${var_value}:g'"
	done
	# Apply the sed command
	${sed_cmd} "${@}"
}

# This function creates a standard logrotate.d file
create_logrotate_file() {
	[ -z "${MY_LOGROTATE_FILE}" ] \
		&& eerror "MY_LOGROTATE_FILE: variable is not set"
		&& return 1
	[ -e "${MY_LOGROTATE_FILE}" ] \
		&& [ ! -f "${MY_LOGROTATE_FILE}" ] \
		&& eerror "${MY_LOGROTATE_FILE}: not a regular file"
		&& return 1
	touch "${MY_LOGROTATE_FILE}" \
		|| { eerror "${MY_LOGROTATE_FILE}: not a writable file"
		     return 1 ; }
	cat > ${MY_LOGROTATE_FILE} <<EOF
<logs_path> {
	<frequence>
	rotate <rotations>
	<compress>
	<missingok>
	create <create_rights>
}
EOF
	[ -z "${LOGROTATE_create_rights}" ] \
		&& sed -i '/create/d' "${MY_LOGROTATE_FILE}"
	return 0
}

# This is the only function that should be called from the ebuild. It will:
# - set config vars to their defaults or user-provided values
# - copy or create the logrotate.d file
# - apply sed tricks to set config vars values in it
# - install the file in /etc/logrotate.d
install_logrotate_file() {
	local INSDESTTREE_SAVE MY_LOGROTATE_FILENAME
	LOGROTATE_frequence=${LOGROTATE_FREQUENCE:-${LOGROTATE_frequence}}
	[ -z "${LOGROTATE_frequence}" ] \
		&& LOGROTATE_frequence=weekly
	LOGROTATE_rotations=${LOGROTATE_ROTATIONS:-${LOGROTATE_rotations}}
	[ -z "${LOGROTATE_rotations}" ] \
		&& LOGROTATE_rotations=6
	LOGROTATE_compress=${LOGROTATE_COMPRESS:-${LOGROTATE_compress}}
	[ -n "${LOGROTATE_compress}" ] \
		&& LOGROTATE_compress=compress
	[ -n "${LOGROTATE_missingok}" ] \
		&& LOGROTATE_missingok=missingok
	LOGROTATE_FILE="${LOGROTATE_FILE:-${FILESDIR}/${PN}.logrotate}"
	if [ -f "${LOGROTATE_FILE}" ] ; then
		MY_LOGROTATE_FILE="${WORKDIR}/${LOGROTATE_FILE##*/}"
		cp ${LOGROTATE_FILE} ${MY_LOGROTATE_FILE} \
			|| die "failed to copy the logrotate file"
	else
		MY_LOGROTATE_FILE="${WORKDIR}/${PN}.logrotate"	
		[ -z "${LOGROTATE_logs_path}" ] \
			&& eerror "LOGROTATE_logs_path: variable is not set"
			&& die "failed to create the logrotate file"
		create_logrotate_file || die "failed to create the logrotate file"
	fi
	sed_logrotate_file -i ${MY_LOGROTATE_FILE} \
		|| die "failed to sed the logrotate file"
	MY_LOGROTATE_FILENAME="${MY_LOGROTATE_FILE##*/}"
	MY_LOGROTATE_FILENAME="${MY_LOGROTATE_FILENAME%.*}"
	[ -n "${INSDESTTREE}" ] && INSDESTTREE_SAVE="${INSDESTTREE}"
	insinto /etc/logrotate.d
	newins ${MY_LOGROTATE_FILE} ${MY_LOGROTATE_FILENAME}
	[ -n "${INSDESTTREE_SAVE}" ] && insinto "${INSDESTTREE_SAVE}"
}


# FIXME/TODO/etc.:
# - "create"... should be "nocreate" if "missingok", or something like that?
# - "size=XXX" is a nice alternative for "frequence", maybe it should be
#   explicitly supported (LOGROTATE_FREQUENCE="size=5M" should work but sounds
#   hackish)
# - errr... is user config actualy useful? may be better to not set the vars
#   and leave it to the "inherit from /etc/logrotate.conf", no?
# - apply it to more ebuilds to validate it :)

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 10:44     ` Robin H. Johnson
  2005-04-28 11:01       ` Thomas de Grenier de Latour
@ 2005-04-28 11:01       ` Henrik Brix Andersen
  2005-04-28 14:00         ` Mike Frysinger
  1 sibling, 1 reply; 54+ messages in thread
From: Henrik Brix Andersen @ 2005-04-28 11:01 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

On Thu, 2005-04-28 at 03:44 -0700, Robin H. Johnson wrote:
> >I meant an eclass to take care of all of it together.

Ah, ok - sounds good to me. Perhaps we can stick into eutils.eclass?

> (rough prototype here)
> IUSE="$IUSE logrotate"
> RDEPEND="$RDEPEND logrotate? ( app-admin/logrotate )"
> 
> dologrotated() {
> 	use logrotate && insinto /etc/logrotate.d && doins "$@"
> }
> newlogrotated() {
> 	use logrotate && insinto /etc/logrotate.d && newins "$1" "$2"
> }

Looks sane to me...

./Brix
-- 
Henrik Brix Andersen <brix@gentoo.org>
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 10:34   ` Henrik Brix Andersen
  2005-04-28 10:44     ` Robin H. Johnson
@ 2005-04-28 12:05     ` Ciaran McCreesh
  2005-04-28 12:56       ` Georgi Georgiev
  1 sibling, 1 reply; 54+ messages in thread
From: Ciaran McCreesh @ 2005-04-28 12:05 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

On Thu, 28 Apr 2005 12:34:50 +0200 Henrik Brix Andersen
<brix@gentoo.org> wrote:
| Do we really need an eclass for that?

Take a look at bash-completion.eclass. I'm strongly in favour of
offloading that kind of thing into eclasses as far as possible, if
nothing else because it'll let us move logrotate's directory around. The
same path hardcoded all over the place is generally a bad thing.

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, shell tools)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 12:05     ` Ciaran McCreesh
@ 2005-04-28 12:56       ` Georgi Georgiev
  0 siblings, 0 replies; 54+ messages in thread
From: Georgi Georgiev @ 2005-04-28 12:56 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

maillog: 28/04/2005-13:05:10(+0100): Ciaran McCreesh types
> On Thu, 28 Apr 2005 12:34:50 +0200 Henrik Brix Andersen
> <brix@gentoo.org> wrote:
> | Do we really need an eclass for that?
> 
> Take a look at bash-completion.eclass. I'm strongly in favour of
> offloading that kind of thing into eclasses as far as possible, if
> nothing else because it'll let us move logrotate's directory around. The
> same path hardcoded all over the place is generally a bad thing.

I agree (about the hardcoded path).  ".maildir" is a good example of
such a path that is almost out of control...

-- 
*>   Georgi Georgiev   *> You do not have mail.                        *>
<*    chutz@gg3.net    <*                                              <*
*>  +81(90)2877-8845   *>                                              *>

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28  8:30 [gentoo-dev] New global USE flag: logrotate Henrik Brix Andersen
  2005-04-28  8:51 ` Robin H. Johnson
@ 2005-04-28 13:41 ` Cory Visi
  2005-04-28 13:44   ` Lance Albertson
                     ` (2 more replies)
  2005-04-28 19:48 ` Donnie Berkholz
                   ` (2 subsequent siblings)
  4 siblings, 3 replies; 54+ messages in thread
From: Cory Visi @ 2005-04-28 13:41 UTC (permalink / raw
  To: gentoo-dev

On Thu, Apr 28, 2005 at 10:30:03AM +0200, Henrik Brix Andersen wrote:
> Hi,
> 
> I'd like to propose a new global USE flag named 'logrotate' to add
> support for app-admin/logrotate (by installing logrotate config files
> to /etc/logrotate.d/).
> 
> There are currently one local USE flag named logrotate in
> net-proxy/squid, which of course isn't enough to justify having a global
> USE flag - but it seems other packages, at least app-admin/syslog-ng,
> currently unconditionally install a config file to /etc/logrotate.d/.
> 
> There are 4 open enhancement requests in Gentoo bugzilla about ebuilds
> which could install such a config file, and I am sure many other ebuilds
> could as well (anything that logs to a file).
> 
> If there are no objections to this I will make 'logrotate' a global USE
> flag once I add a logrotate config file to sys-power/acpid.

Why do we even need a USE flag for this? The logrotate config files are 
max, 4k. Just include the config file with your ebuild, which is what I 
have done up until now. A user can either run logrotate or not. This 
isn't about turning on a feature, it's about saving 4k. I don't think 
it's worth it; I feel like USE flags are getting completely out of 
control.

Please comment.

Thanks,
Cory
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 13:41 ` Cory Visi
@ 2005-04-28 13:44   ` Lance Albertson
  2005-04-28 13:47   ` Ciaran McCreesh
  2005-04-28 15:23   ` Chris Gianelloni
  2 siblings, 0 replies; 54+ messages in thread
From: Lance Albertson @ 2005-04-28 13:44 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

Cory Visi wrote:
> On Thu, Apr 28, 2005 at 10:30:03AM +0200, Henrik Brix Andersen wrote:
> 
>>Hi,
>>
>>I'd like to propose a new global USE flag named 'logrotate' to add
>>support for app-admin/logrotate (by installing logrotate config files
>>to /etc/logrotate.d/).
>>
>>There are currently one local USE flag named logrotate in
>>net-proxy/squid, which of course isn't enough to justify having a global
>>USE flag - but it seems other packages, at least app-admin/syslog-ng,
>>currently unconditionally install a config file to /etc/logrotate.d/.
>>
>>There are 4 open enhancement requests in Gentoo bugzilla about ebuilds
>>which could install such a config file, and I am sure many other ebuilds
>>could as well (anything that logs to a file).
>>
>>If there are no objections to this I will make 'logrotate' a global USE
>>flag once I add a logrotate config file to sys-power/acpid.
> 
> 
> Why do we even need a USE flag for this? The logrotate config files are 
> max, 4k. Just include the config file with your ebuild, which is what I 
> have done up until now. A user can either run logrotate or not. This 
> isn't about turning on a feature, it's about saving 4k. I don't think 
> it's worth it; I feel like USE flags are getting completely out of 
> control.

Not everyone uses logrotate (its optional in system now) so they may not want
those files. Thats how I view it at least.

-- 
Lance Albertson <ramereth@gentoo.org>
Gentoo Infrastructure | Operational Manager

---
Public GPG key:  <http://www.ramereth.net/lance.asc>
Key fingerprint: 0423 92F3 544A 1282 5AB1  4D07 416F A15D 27F4 B742

ramereth/irc.freenode.net

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 13:41 ` Cory Visi
  2005-04-28 13:44   ` Lance Albertson
@ 2005-04-28 13:47   ` Ciaran McCreesh
  2005-04-28 15:23   ` Chris Gianelloni
  2 siblings, 0 replies; 54+ messages in thread
From: Ciaran McCreesh @ 2005-04-28 13:47 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

On Thu, 28 Apr 2005 13:41:22 +0000 Cory Visi <merlin@gentoo.org> wrote:
| Why do we even need a USE flag for this? The logrotate config files
| are  max, 4k. Just include the config file with your ebuild, which is
| what I  have done up until now. A user can either run logrotate or
| not. This  isn't about turning on a feature, it's about saving 4k. I
| don't think  it's worth it; I feel like USE flags are getting
| completely out of  control.

The aim is to reduce the amount of crap in /etc as far as possible.

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, shell tools)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 11:01       ` Henrik Brix Andersen
@ 2005-04-28 14:00         ` Mike Frysinger
  2005-04-28 14:08           ` Thomas de Grenier de Latour
  0 siblings, 1 reply; 54+ messages in thread
From: Mike Frysinger @ 2005-04-28 14:00 UTC (permalink / raw
  To: gentoo-dev

On Thursday 28 April 2005 07:01 am, Henrik Brix Andersen wrote:
> On Thu, 2005-04-28 at 03:44 -0700, Robin H. Johnson wrote:
> > (rough prototype here)
> > IUSE="$IUSE logrotate"
> > RDEPEND="$RDEPEND logrotate? ( app-admin/logrotate )"
> >
> > dologrotated() {
> > 	use logrotate && insinto /etc/logrotate.d && doins "$@"
> > }
> > newlogrotated() {
> > 	use logrotate && insinto /etc/logrotate.d && newins "$1" "$2"
> > }
>
> Looks sane to me...

ive never looked at the format of a logrotate.d file ... would it be possible 
to easily script a 'make_logrotated' func where you pass it a few params and 
it'd create a file for you based off a common template ?
-mike
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 14:00         ` Mike Frysinger
@ 2005-04-28 14:08           ` Thomas de Grenier de Latour
  0 siblings, 0 replies; 54+ messages in thread
From: Thomas de Grenier de Latour @ 2005-04-28 14:08 UTC (permalink / raw
  To: gentoo-dev

On Thu, 28 Apr 2005 10:00:23 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> would it be possible to easily script a 'make_logrotated' func
> where you pass it a few params and it'd create a file for you
> based off a common template ?

There is one in the eclass i've previously sent (attachment to
my previous email).

-- 
TGL.
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 13:41 ` Cory Visi
  2005-04-28 13:44   ` Lance Albertson
  2005-04-28 13:47   ` Ciaran McCreesh
@ 2005-04-28 15:23   ` Chris Gianelloni
  2005-04-28 15:51     ` Thomas de Grenier de Latour
  2 siblings, 1 reply; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-28 15:23 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

On Thu, 2005-04-28 at 13:41 +0000, Cory Visi wrote:
> Why do we even need a USE flag for this? The logrotate config files are 
> max, 4k. Just include the config file with your ebuild, which is what I 
> have done up until now. A user can either run logrotate or not. This 
> isn't about turning on a feature, it's about saving 4k. I don't think 
> it's worth it; I feel like USE flags are getting completely out of 
> control.

Maybe for embedded or livecd?  Maybe for people that don't use
logrotate?

Personally, I don't see an issue with it either way.  While USE flags
are growing in number, we at least try to make sure they have a use
before adding them.

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 15:23   ` Chris Gianelloni
@ 2005-04-28 15:51     ` Thomas de Grenier de Latour
  0 siblings, 0 replies; 54+ messages in thread
From: Thomas de Grenier de Latour @ 2005-04-28 15:51 UTC (permalink / raw
  To: gentoo-dev

On Thu, 28 Apr 2005 11:23:09 -0400
Chris Gianelloni <wolf31o2@gentoo.org> wrote:

> Maybe for embedded or livecd?  Maybe for people that don't use
> logrotate?
> 

I would add a more general reason which is that this kind of
"something.d" config files are much more invasive than others, and
thus should always be optional.  Adding a config file in an 
/etc/something.d is just like merging some config changes in an
/etc/something.conf without waiting for the user to do his
"etc-update".  Take for instance someone who has a logrotate
cronjob for some of his log files, but not the apache ones because
for this ones he has very special needs and scripts: if his next
apache update blindly installs a logrotate.d file, he may not
appreciate it at all...

-- 
TGL.
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28  8:30 [gentoo-dev] New global USE flag: logrotate Henrik Brix Andersen
  2005-04-28  8:51 ` Robin H. Johnson
  2005-04-28 13:41 ` Cory Visi
@ 2005-04-28 19:48 ` Donnie Berkholz
  2005-04-28 20:16   ` Ciaran McCreesh
  2005-04-28 22:32 ` Tom Wesley
  2005-04-28 23:10 ` Spider
  4 siblings, 1 reply; 54+ messages in thread
From: Donnie Berkholz @ 2005-04-28 19:48 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Henrik Brix Andersen wrote:
> Hi,
> 
> I'd like to propose a new global USE flag named 'logrotate' to add
> support for app-admin/logrotate (by installing logrotate config files
> to /etc/logrotate.d/).
> 
> There are currently one local USE flag named logrotate in
> net-proxy/squid, which of course isn't enough to justify having a global
> USE flag - but it seems other packages, at least app-admin/syslog-ng,
> currently unconditionally install a config file to /etc/logrotate.d/.
> 
> There are 4 open enhancement requests in Gentoo bugzilla about ebuilds
> which could install such a config file, and I am sure many other ebuilds
> could as well (anything that logs to a file).
> 
> If there are no objections to this I will make 'logrotate' a global USE
> flag once I add a logrotate config file to sys-power/acpid.

How annoying is it for someone to remerge a package just to get a
logrotate file? I suggest that if you're going to install it at all, do
it unconditionally.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCcT4kXVaO67S1rtsRAo/HAKDJQWZtnd/pWgQLqBFLmBiU2QOv9gCgujMW
irWQDLH7J/RECXhVBkNExtE=
=0fG+
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 19:48 ` Donnie Berkholz
@ 2005-04-28 20:16   ` Ciaran McCreesh
  2005-04-28 20:21     ` Donnie Berkholz
  0 siblings, 1 reply; 54+ messages in thread
From: Ciaran McCreesh @ 2005-04-28 20:16 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

On Thu, 28 Apr 2005 12:48:52 -0700 Donnie Berkholz
<spyderous@gentoo.org> wrote:
| How annoying is it for someone to remerge a package just to get a
| logrotate file? I suggest that if you're going to install it at all,
| do it unconditionally.

What, and get another file in /etc that needs manual tidying up, merging
and inspecting?

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, shell tools)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 20:16   ` Ciaran McCreesh
@ 2005-04-28 20:21     ` Donnie Berkholz
  2005-04-28 22:18       ` Grant Goodyear
  0 siblings, 1 reply; 54+ messages in thread
From: Donnie Berkholz @ 2005-04-28 20:21 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ciaran McCreesh wrote:
> On Thu, 28 Apr 2005 12:48:52 -0700 Donnie Berkholz
> <spyderous@gentoo.org> wrote:
> | How annoying is it for someone to remerge a package just to get a
> | logrotate file? I suggest that if you're going to install it at all,
> | do it unconditionally.
> 
> What, and get another file in /etc that needs manual tidying up, merging
> and inspecting?

Yes. Or don't install it at all, and let people create their own. This
is a dumb USE flag.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCcUXeXVaO67S1rtsRAnCdAJ9CDn18Rq+R+ey9CYaDDfT+bD6GTQCg6gvb
Nu+1uTRaZSarCLvdiexe8wg=
=3Vtx
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 20:21     ` Donnie Berkholz
@ 2005-04-28 22:18       ` Grant Goodyear
  2005-04-28 22:28         ` Donnie Berkholz
  2005-04-29  9:32         ` Christian Birchinger
  0 siblings, 2 replies; 54+ messages in thread
From: Grant Goodyear @ 2005-04-28 22:18 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

Donnie Berkholz wrote: [Thu Apr 28 2005, 03:21:50PM CDT]
> Yes. Or don't install it at all, and let people create their own. This
> is a dumb USE flag.

I'd say that "dumb USE flag" is rather harsh.  It seems clear that (a)
many users would like a logrotate script installed for them, and since
it's not all that difficult we should probably oblige, and that (b) some
users won't want any logrotate scripts installed.  Most optional things
of this sort or handled by USE flags, although I'll grant that sometimes
we decide by fiat that things should be done a certain way because
making something optional is just too much work for too little gain.

As an aside, my preference would be to install them by default, but
allow a nologrotate equivalent to "nodoc", "noinfo", or "noman".  That
would require hacking portage, though, which seems silly for something
so trivial.  Does anybody remember why we chose "nodoc", "noinfo", and
"noman" instead of a generic INSTALL_MASK="/usr/share/doc
/usr/share/man ..." flag which could be more general?

-g2boojum-
-- 
Grant Goodyear	
Gentoo Developer
g2boojum@gentoo.org
http://www.gentoo.org/~g2boojum
GPG Fingerprint: D706 9802 1663 DEF5 81B0  9573 A6DC 7152 E0F6 5B76

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 22:18       ` Grant Goodyear
@ 2005-04-28 22:28         ` Donnie Berkholz
  2005-04-29  0:36           ` Jason Stubbs
  2005-04-29  9:32         ` Christian Birchinger
  1 sibling, 1 reply; 54+ messages in thread
From: Donnie Berkholz @ 2005-04-28 22:28 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Grant Goodyear wrote:
> Donnie Berkholz wrote: [Thu Apr 28 2005, 03:21:50PM CDT]
> 
>>Yes. Or don't install it at all, and let people create their own. This
>>is a dumb USE flag.
> 
> 
> I'd say that "dumb USE flag" is rather harsh.  It seems clear that (a)
> many users would like a logrotate script installed for them, and since
> it's not all that difficult we should probably oblige, and that (b) some
> users won't want any logrotate scripts installed.  Most optional things
> of this sort or handled by USE flags, although I'll grant that sometimes
> we decide by fiat that things should be done a certain way because
> making something optional is just too much work for too little gain.

My problem with it is that Joe User, who doesn't do ebuilds, will change
his USE flags and recompile an entire package just to get a little
logrotate file that has nothing to do with the source of the package
itself. This waste of time is pointless, which is why I call the USE
flag dumb.

I'd prefer to have some package that's just a collection of logrotate
files for a ton of packages, if there's some reason a ~400-byte file is
just killing your system. Or a separate package for each file. Doesn't
matter to me.

In fact, I've thought many times about supplying "pre-packages" that are
no more than a collection of all the config files for a given package.

> As an aside, my preference would be to install them by default, but
> allow a nologrotate equivalent to "nodoc", "noinfo", or "noman".  That
> would require hacking portage, though, which seems silly for something
> so trivial.  Does anybody remember why we chose "nodoc", "noinfo", and
> "noman" instead of a generic INSTALL_MASK="/usr/share/doc
> /usr/share/man ..." flag which could be more general?

There does appear to also be an INSTALL_MASK. I just grepped
/usr/lib/portage for it.

Thanks,
Donnie
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCcWOVXVaO67S1rtsRAufkAJ9VZ1FwPPh/4lmvb04vKQB9gXjTrQCeIgf9
PJ4MWe1ST2ZWGbNyQJ/zrJA=
=MgHv
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28  8:30 [gentoo-dev] New global USE flag: logrotate Henrik Brix Andersen
                   ` (2 preceding siblings ...)
  2005-04-28 19:48 ` Donnie Berkholz
@ 2005-04-28 22:32 ` Tom Wesley
  2005-04-28 23:10 ` Spider
  4 siblings, 0 replies; 54+ messages in thread
From: Tom Wesley @ 2005-04-28 22:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

On Thu, 2005-04-28 at 10:30 +0200, Henrik Brix Andersen wrote:
> Hi,
> 
> I'd like to propose a new global USE flag named 'logrotate' to add
> support for app-admin/logrotate (by installing logrotate config files
> to /etc/logrotate.d/).
> 
> There are currently one local USE flag named logrotate in
> net-proxy/squid, which of course isn't enough to justify having a global
> USE flag - but it seems other packages, at least app-admin/syslog-ng,
> currently unconditionally install a config file to /etc/logrotate.d/.
> 
> There are 4 open enhancement requests in Gentoo bugzilla about ebuilds
> which could install such a config file, and I am sure many other ebuilds
> could as well (anything that logs to a file).
> 
> If there are no objections to this I will make 'logrotate' a global USE
> flag once I add a logrotate config file to sys-power/acpid.
> 
> Sincerely,
> Brix

I would welcome such a flag.

-- 
Tom Wesley <tom@tomaw.org>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28  8:30 [gentoo-dev] New global USE flag: logrotate Henrik Brix Andersen
                   ` (3 preceding siblings ...)
  2005-04-28 22:32 ` Tom Wesley
@ 2005-04-28 23:10 ` Spider
  4 siblings, 0 replies; 54+ messages in thread
From: Spider @ 2005-04-28 23:10 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]

On Thu, 2005-04-28 at 10:30 +0200, Henrik Brix Andersen wrote:
> Hi,
> 
> I'd like to propose a new global USE flag named 'logrotate' to add
> support for app-admin/logrotate (by installing logrotate config files
> to /etc/logrotate.d/).
> 
> There are currently one local USE flag named logrotate in
> net-proxy/squid, which of course isn't enough to justify having a global
> USE flag - but it seems other packages, at least app-admin/syslog-ng,
> currently unconditionally install a config file to /etc/logrotate.d/.
> 
> There are 4 open enhancement requests in Gentoo bugzilla about ebuilds
> which could install such a config file, and I am sure many other ebuilds
> could as well (anything that logs to a file).
> 
> If there are no objections to this I will make 'logrotate' a global USE
> flag once I add a logrotate config file to sys-power/acpid.
> 
> Sincerely,
> Brix

-1 from me.. Make it default to on and install the files.  its minimal
overhead and can be toggled to be disabled with the "minimal" USE flag,
Just avoiding pollution...


//Spider
-- 
begin  .signature
Tortured users / Laughing in pain
See Microsoft KB Article Q265230 for more information.
end


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 22:28         ` Donnie Berkholz
@ 2005-04-29  0:36           ` Jason Stubbs
  2005-04-29  0:43             ` Donnie Berkholz
                               ` (2 more replies)
  0 siblings, 3 replies; 54+ messages in thread
From: Jason Stubbs @ 2005-04-29  0:36 UTC (permalink / raw
  To: gentoo-dev

On Friday 29 April 2005 07:28, Donnie Berkholz wrote:
> My problem with it is that Joe User, who doesn't do ebuilds, will change
> his USE flags and recompile an entire package just to get a little
> logrotate file that has nothing to do with the source of the package
> itself. This waste of time is pointless, which is why I call the USE
> flag dumb.
>
> I'd prefer to have some package that's just a collection of logrotate
> files for a ton of packages, if there's some reason a ~400-byte file is
> just killing your system. Or a separate package for each file. Doesn't
> matter to me.
>
> In fact, I've thought many times about supplying "pre-packages" that are
> no more than a collection of all the config files for a given package.

What about the unused `ebuild [ebuild] config`? Isn't that the perfect place 
for this sort of stuff? The only package that I know that uses this feature 
is mysql. There are way more possibilities.

> > As an aside, my preference would be to install them by default, but
> > allow a nologrotate equivalent to "nodoc", "noinfo", or "noman".  That
> > would require hacking portage, though, which seems silly for something
> > so trivial.  Does anybody remember why we chose "nodoc", "noinfo", and
> > "noman" instead of a generic INSTALL_MASK="/usr/share/doc
> > /usr/share/man ..." flag which could be more general?

> There does appear to also be an INSTALL_MASK. I just grepped
> /usr/lib/portage for it.

Iggy's (is that his real name?) request.

Regards,
Jason Stubbs
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29  0:36           ` Jason Stubbs
@ 2005-04-29  0:43             ` Donnie Berkholz
  2005-04-29 12:26             ` Chris Gianelloni
  2005-04-29 17:44             ` Robin H. Johnson
  2 siblings, 0 replies; 54+ messages in thread
From: Donnie Berkholz @ 2005-04-29  0:43 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jason Stubbs wrote:
> What about the unused `ebuild [ebuild] config`? Isn't that the perfect place 
> for this sort of stuff? The only package that I know that uses this feature 
> is mysql. There are way more possibilities.

Interesting idea.

> Iggy's (is that his real name?) request.

Yep, I know. And no, that's not his real name. Check the dev list, lazy. =P

Thanks,
Donnie
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCcYMsXVaO67S1rtsRAhqDAKD9iK115X9eKfVI3Sa+0IhjFmjJBwCdFFHN
YNuSMZDWEQkeyhCZLabyEto=
=JrGw
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-28 22:18       ` Grant Goodyear
  2005-04-28 22:28         ` Donnie Berkholz
@ 2005-04-29  9:32         ` Christian Birchinger
  1 sibling, 0 replies; 54+ messages in thread
From: Christian Birchinger @ 2005-04-29  9:32 UTC (permalink / raw
  To: gentoo-dev

On Thu, Apr 28, 2005 at 05:18:07PM -0500, Grant Goodyear wrote:
> As an aside, my preference would be to install them by default, but
> allow a nologrotate equivalent to "nodoc", "noinfo", or "noman".  That
> would require hacking portage, though, which seems silly for something
> so trivial.  Does anybody remember why we chose "nodoc", "noinfo", and
> "noman" instead of a generic INSTALL_MASK="/usr/share/doc
> /usr/share/man ..." flag which could be more general?

I would really really really like an install mask for various places
and also wondered about the noman noinfo solution after it got
implemented. There are many places where i hate files being
installed by portage (like the BIND dir with it's example and
localhost zones). 

Christian
-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29  0:36           ` Jason Stubbs
  2005-04-29  0:43             ` Donnie Berkholz
@ 2005-04-29 12:26             ` Chris Gianelloni
  2005-04-29 13:25               ` Dan Meltzer
  2005-04-29 17:44             ` Robin H. Johnson
  2 siblings, 1 reply; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-29 12:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

On Fri, 2005-04-29 at 09:36 +0900, Jason Stubbs wrote:
> > In fact, I've thought many times about supplying "pre-packages" that are
> > no more than a collection of all the config files for a given package.
> 
> What about the unused `ebuild [ebuild] config`? Isn't that the perfect place 
> for this sort of stuff? The only package that I know that uses this feature 
> is mysql. There are way more possibilities.

I use it fairly regularly.  I know that we use it on any game that
requires a CD key, and also for VMWare (I bet most people don't know
that!) to configure the modules.

I hadn't considered using it for actually configuring a package (duh!)
but that really is a very cool idea.  Imagine if we started doing this
for more packages.  It would remove one of the primary complaints people
have about Gentoo being "too hard" since they don't know "what to do
next" after they emerge a package.  If we got people used to "ebuild
[ebuild] config", then we could remove a good bit of the issue.

Just an idea, but one I'll probably be using more often now.

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 12:26             ` Chris Gianelloni
@ 2005-04-29 13:25               ` Dan Meltzer
  2005-04-29 13:55                 ` Jason Stubbs
  2005-04-29 15:32                 ` Chris Gianelloni
  0 siblings, 2 replies; 54+ messages in thread
From: Dan Meltzer @ 2005-04-29 13:25 UTC (permalink / raw
  To: gentoo-dev

The problem with ebuild config, at least until bug 11359 is handled,
is if the package is emerged early on in a list of packages, there is
a chance the person won't know to use ebuild config.... would it be
possible for portage to run an ebuild config for _all_ packages that
need it after _all_ packages that are being emerged are emerged? This
way the upgrade goes without interference, but the customization waits
until the person comes back, either that or an emerge config that
tracks all packages that need config that have yet to be configged,
currently, hoping a person thinks to ebuild packagename config is a
lot to ask, unless every package takes use of it...

On 4/29/05, Chris Gianelloni <wolf31o2@gentoo.org> wrote:
> On Fri, 2005-04-29 at 09:36 +0900, Jason Stubbs wrote:
> > > In fact, I've thought many times about supplying "pre-packages" that are
> > > no more than a collection of all the config files for a given package.
> >
> > What about the unused `ebuild [ebuild] config`? Isn't that the perfect place
> > for this sort of stuff? The only package that I know that uses this feature
> > is mysql. There are way more possibilities.
> 
> I use it fairly regularly.  I know that we use it on any game that
> requires a CD key, and also for VMWare (I bet most people don't know
> that!) to configure the modules.
> 
> I hadn't considered using it for actually configuring a package (duh!)
> but that really is a very cool idea.  Imagine if we started doing this
> for more packages.  It would remove one of the primary complaints people
> have about Gentoo being "too hard" since they don't know "what to do
> next" after they emerge a package.  If we got people used to "ebuild
> [ebuild] config", then we could remove a good bit of the issue.
> 
> Just an idea, but one I'll probably be using more often now.
> 
> --
> Chris Gianelloni
> Release Engineering - Strategic Lead/QA Manager
> Games - Developer
> Gentoo Linux
> 
> 
>

-- 
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 13:25               ` Dan Meltzer
@ 2005-04-29 13:55                 ` Jason Stubbs
  2005-04-29 15:52                   ` Chris Gianelloni
  2005-04-29 15:32                 ` Chris Gianelloni
  1 sibling, 1 reply; 54+ messages in thread
From: Jason Stubbs @ 2005-04-29 13:55 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]

On Friday 29 April 2005 22:25, Dan Meltzer wrote:
> The problem with ebuild config, at least until bug 11359 is handled,
> is if the package is emerged early on in a list of packages, there is
> a chance the person won't know to use ebuild config.... would it be
> possible for portage to run an ebuild config for _all_ packages that
> need it after _all_ packages that are being emerged are emerged? This
> way the upgrade goes without interference, but the customization waits
> until the person comes back, either that or an emerge config that
> tracks all packages that need config that have yet to be configged,
> currently, hoping a person thinks to ebuild packagename config is a
> lot to ask, unless every package takes use of it...

That's a long paragraph. ;)

I don't see the problem with users not seeing a "run config" message. On the 
contrary, I think it would be better if a message wasn't needed at all. 
Instead, if a user didn't know how to configure a package or didn't want to 
do it manually, they would just give it a go with the package that they're 
interested in.

The only thing I think is necessary to improve for this to work is the method 
in which a package's config method is invoked. Doing it via emerge would be 
much more intuitive. Something like "emerge --config dev-db/mysql"? Use 
standard atom matching within the installed package database and use the 
standard "please be specific" message when more than one package matches.

Regards,
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 13:25               ` Dan Meltzer
  2005-04-29 13:55                 ` Jason Stubbs
@ 2005-04-29 15:32                 ` Chris Gianelloni
  1 sibling, 0 replies; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-29 15:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]

On Fri, 2005-04-29 at 09:25 -0400, Dan Meltzer wrote:
> The problem with ebuild config, at least until bug 11359 is handled,
> is if the package is emerged early on in a list of packages, there is
> a chance the person won't know to use ebuild config.... would it be
> possible for portage to run an ebuild config for _all_ packages that
> need it after _all_ packages that are being emerged are emerged? This
> way the upgrade goes without interference, but the customization waits
> until the person comes back, either that or an emerge config that
> tracks all packages that need config that have yet to be configged,
> currently, hoping a person thinks to ebuild packagename config is a
> lot to ask, unless every package takes use of it...

My opinion:

I really don't care.

We aren't doing anything in the config sections that cannot be done
manually, we're just making it easier by scripting it into a single
place.  As more and more packages make use of the mechanism, people will
become used to using it.  If someone doesn't use it, they won't have a
broken package, just an unconfigured one, so there's no harm to any
users by them missing the config step.

That and we hope that at some point in the future, portage will have a
mechanism in place for logging all of the output for later.

I wouldn't mind seeing some way to run all the config steps after the
ebuilds, but in most cases you would only need to run the config step
once, not on every upgrade of the package.

> On 4/29/05, Chris Gianelloni <wolf31o2@gentoo.org> wrote:
> > On Fri, 2005-04-29 at 09:36 +0900, Jason Stubbs wrote:
> > > > In fact, I've thought many times about supplying "pre-packages" that are
> > > > no more than a collection of all the config files for a given package.
> > >
> > > What about the unused `ebuild [ebuild] config`? Isn't that the perfect place
> > > for this sort of stuff? The only package that I know that uses this feature
> > > is mysql. There are way more possibilities.
> > 
> > I use it fairly regularly.  I know that we use it on any game that
> > requires a CD key, and also for VMWare (I bet most people don't know
> > that!) to configure the modules.
> > 
> > I hadn't considered using it for actually configuring a package (duh!)
> > but that really is a very cool idea.  Imagine if we started doing this
> > for more packages.  It would remove one of the primary complaints people
> > have about Gentoo being "too hard" since they don't know "what to do
> > next" after they emerge a package.  If we got people used to "ebuild
> > [ebuild] config", then we could remove a good bit of the issue.
> > 
> > Just an idea, but one I'll probably be using more often now.
> > 
> > --
> > Chris Gianelloni
> > Release Engineering - Strategic Lead/QA Manager
> > Games - Developer
> > Gentoo Linux
> > 
> > 
> >
> 
-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 13:55                 ` Jason Stubbs
@ 2005-04-29 15:52                   ` Chris Gianelloni
  2005-04-29 16:17                     ` Jason Stubbs
  2005-04-29 17:25                     ` Jason Stubbs
  0 siblings, 2 replies; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-29 15:52 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

On Fri, 2005-04-29 at 22:55 +0900, Jason Stubbs wrote:
> The only thing I think is necessary to improve for this to work is the method 
> in which a package's config method is invoked. Doing it via emerge would be 
> much more intuitive. Something like "emerge --config dev-db/mysql"? Use 
> standard atom matching within the installed package database and use the 
> standard "please be specific" message when more than one package matches.

That would be very cool.  I expect it by COB today.

Thanks for volunteering,

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 15:52                   ` Chris Gianelloni
@ 2005-04-29 16:17                     ` Jason Stubbs
  2005-04-29 17:26                       ` Chris Gianelloni
  2005-04-29 17:25                     ` Jason Stubbs
  1 sibling, 1 reply; 54+ messages in thread
From: Jason Stubbs @ 2005-04-29 16:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

On Saturday 30 April 2005 00:52, Chris Gianelloni wrote:
> On Fri, 2005-04-29 at 22:55 +0900, Jason Stubbs wrote:
> > The only thing I think is necessary to improve for this to work is the
> > method in which a package's config method is invoked. Doing it via emerge
> > would be much more intuitive. Something like "emerge --config
> > dev-db/mysql"? Use standard atom matching within the installed package
> > database and use the standard "please be specific" message when more than
> > one package matches.
>
> That would be very cool.  I expect it by COB today.

# emerge config foo/bar

Currently, 'config' is a help option only.


Looks like somebody had a similar idea in the past but never got around to 
actually completing it... What time's close of business?

Regards,
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 15:52                   ` Chris Gianelloni
  2005-04-29 16:17                     ` Jason Stubbs
@ 2005-04-29 17:25                     ` Jason Stubbs
  2005-04-29 17:46                       ` Chris Gianelloni
  1 sibling, 1 reply; 54+ messages in thread
From: Jason Stubbs @ 2005-04-29 17:25 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

On Saturday 30 April 2005 00:52, Chris Gianelloni wrote:
> On Fri, 2005-04-29 at 22:55 +0900, Jason Stubbs wrote:
> > The only thing I think is necessary to improve for this to work is the
> > method in which a package's config method is invoked. Doing it via emerge
> > would be much more intuitive. Something like "emerge --config
> > dev-db/mysql"? Use standard atom matching within the installed package
> > database and use the standard "please be specific" message when more than
> > one package matches.
>
> That would be very cool.  I expect it by COB today.

How's this?

# emerge config
!!! config can only take a single package atom at this time

# emerge config db

The following packages available:
* sys-libs/db-4.2.52_p2
* sys-libs/db-1.85-r2

Please use a specific atom or the --ask option.

# emerge config db --ask

Please select a package to configure:
1) sys-libs/db-4.2.52_p2
2) sys-libs/db-1.85-r2
X) Cancel
Selection? [1/2/X] 1

Ready to configure sys-libs/db-4.2.52_p2? [Yes/No] y


Regards,
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 16:17                     ` Jason Stubbs
@ 2005-04-29 17:26                       ` Chris Gianelloni
  0 siblings, 0 replies; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-29 17:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

On Sat, 2005-04-30 at 01:17 +0900, Jason Stubbs wrote:
> On Saturday 30 April 2005 00:52, Chris Gianelloni wrote:
> > On Fri, 2005-04-29 at 22:55 +0900, Jason Stubbs wrote:
> > > The only thing I think is necessary to improve for this to work is the
> > > method in which a package's config method is invoked. Doing it via emerge
> > > would be much more intuitive. Something like "emerge --config
> > > dev-db/mysql"? Use standard atom matching within the installed package
> > > database and use the standard "please be specific" message when more than
> > > one package matches.
> >
> > That would be very cool.  I expect it by COB today.
> 
> # emerge config foo/bar
> 
> Currently, 'config' is a help option only.
> 
> 
> Looks like somebody had a similar idea in the past but never got around to 
> actually completing it... What time's close of business?

Well, we work on the Venetian calendar here, so a day is 2802 hours.  I
think you have plenty of time.  ;]

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29  0:36           ` Jason Stubbs
  2005-04-29  0:43             ` Donnie Berkholz
  2005-04-29 12:26             ` Chris Gianelloni
@ 2005-04-29 17:44             ` Robin H. Johnson
  2005-04-29 18:06               ` Jason Stubbs
                                 ` (2 more replies)
  2 siblings, 3 replies; 54+ messages in thread
From: Robin H. Johnson @ 2005-04-29 17:44 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

On Fri, Apr 29, 2005 at 09:36:54AM +0900, Jason Stubbs wrote:
> What about the unused `ebuild [ebuild] config`? Isn't that the perfect place 
> for this sort of stuff? The only package that I know that uses this feature 
> is mysql. There are way more possibilities.
No, ebuild config shouldn't be abused like this. Say I have an existing
install of mysql, and the package maintainer puts in an updated
logrotate.d file. Running 'ebuild mysql.ebuild config' is meant for NEW
installations only, and it doesn't enable me to take advantage of
CONFIG_PROTECT. I've seen a package where running the config phase when
the package is already set up blows away your existing config.  It gives
you a warning first, but how would I then get an updated logrotate.d
file?

I see only two viable options.
- Unconditional, use INSTALL_MASK, no RDEPEND on logrotate
- Conditional on USE=logrotate

The first one is what is generally used in the tree so far.

-- 
Robin Hugh Johnson
E-Mail     : robbat2@orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 241 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 17:25                     ` Jason Stubbs
@ 2005-04-29 17:46                       ` Chris Gianelloni
  2005-04-29 18:03                         ` Jason Stubbs
  0 siblings, 1 reply; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-29 17:46 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

On Sat, 2005-04-30 at 02:25 +0900, Jason Stubbs wrote:
> On Saturday 30 April 2005 00:52, Chris Gianelloni wrote:
> > On Fri, 2005-04-29 at 22:55 +0900, Jason Stubbs wrote:
> > > The only thing I think is necessary to improve for this to work is the
> > > method in which a package's config method is invoked. Doing it via emerge
> > > would be much more intuitive. Something like "emerge --config
> > > dev-db/mysql"? Use standard atom matching within the installed package
> > > database and use the standard "please be specific" message when more than
> > > one package matches.
> >
> > That would be very cool.  I expect it by COB today.
> 
> How's this?
> 
> # emerge config
> !!! config can only take a single package atom at this time
> 
> # emerge config db
> 
> The following packages available:
> * sys-libs/db-4.2.52_p2
> * sys-libs/db-1.85-r2
> 
> Please use a specific atom or the --ask option.
> 
> # emerge config db --ask
> 
> Please select a package to configure:
> 1) sys-libs/db-4.2.52_p2
> 2) sys-libs/db-1.85-r2
> X) Cancel
> Selection? [1/2/X] 1
> 
> Ready to configure sys-libs/db-4.2.52_p2? [Yes/No] y

I like it.

I'm assuming it won't ask the "ready to configure" if you gave it a
package that there was only one of, like say, games-fps/ut2004 or
app-emulation/vmware-workstation?

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 17:46                       ` Chris Gianelloni
@ 2005-04-29 18:03                         ` Jason Stubbs
  0 siblings, 0 replies; 54+ messages in thread
From: Jason Stubbs @ 2005-04-29 18:03 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

On Saturday 30 April 2005 02:46, Chris Gianelloni wrote:
> On Sat, 2005-04-30 at 02:25 +0900, Jason Stubbs wrote:
> > # emerge config db --ask
> >
> > Please select a package to configure:
> > 1) sys-libs/db-4.2.52_p2
> > 2) sys-libs/db-1.85-r2
> > X) Cancel
> > Selection? [1/2/X] 1
> >
> > Ready to configure sys-libs/db-4.2.52_p2? [Yes/No] y
>
> I like it.
>
> I'm assuming it won't ask the "ready to configure" if you gave it a
> package that there was only one of, like say, games-fps/ut2004 or
> app-emulation/vmware-workstation?

Only if --ask is specified.

Regards,
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 17:44             ` Robin H. Johnson
@ 2005-04-29 18:06               ` Jason Stubbs
  2005-04-29 18:59               ` Chris Gianelloni
  2005-04-29 19:17               ` Donnie Berkholz
  2 siblings, 0 replies; 54+ messages in thread
From: Jason Stubbs @ 2005-04-29 18:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]

On Saturday 30 April 2005 02:44, Robin H. Johnson wrote:
> On Fri, Apr 29, 2005 at 09:36:54AM +0900, Jason Stubbs wrote:
> > What about the unused `ebuild [ebuild] config`? Isn't that the perfect
> > place for this sort of stuff? The only package that I know that uses this
> > feature is mysql. There are way more possibilities.
>
> No, ebuild config shouldn't be abused like this. Say I have an existing
> install of mysql, and the package maintainer puts in an updated
> logrotate.d file. Running 'ebuild mysql.ebuild config' is meant for NEW
> installations only, and it doesn't enable me to take advantage of
> CONFIG_PROTECT. I've seen a package where running the config phase when
> the package is already set up blows away your existing config.  It gives
> you a warning first, but how would I then get an updated logrotate.d
> file?

I can't see how you can call it abuse. There's no requirement that the config 
phase be non-interactive. On the contrary, it *should* be interactive so that 
the user is notified about and has control over what can be done.

> I see only two viable options.
> - Unconditional, use INSTALL_MASK, no RDEPEND on logrotate
> - Conditional on USE=logrotate
>
> The first one is what is generally used in the tree so far.

I don't really mind what's done. I'm just suggesting that config can be used 
for a lot more than what it is at the moment, including being a third option 
in the above list. My preferred option would be INSTALL_MASK.

Regards,
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 17:44             ` Robin H. Johnson
  2005-04-29 18:06               ` Jason Stubbs
@ 2005-04-29 18:59               ` Chris Gianelloni
  2005-04-29 19:17               ` Donnie Berkholz
  2 siblings, 0 replies; 54+ messages in thread
From: Chris Gianelloni @ 2005-04-29 18:59 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

On Fri, 2005-04-29 at 10:44 -0700, Robin H. Johnson wrote:
> On Fri, Apr 29, 2005 at 09:36:54AM +0900, Jason Stubbs wrote:
> > What about the unused `ebuild [ebuild] config`? Isn't that the perfect place 
> > for this sort of stuff? The only package that I know that uses this feature 
> > is mysql. There are way more possibilities.
> No, ebuild config shouldn't be abused like this. Say I have an existing
> install of mysql, and the package maintainer puts in an updated
> logrotate.d file. Running 'ebuild mysql.ebuild config' is meant for NEW
> installations only, and it doesn't enable me to take advantage of
> CONFIG_PROTECT. I've seen a package where running the config phase when
> the package is already set up blows away your existing config.  It gives
> you a warning first, but how would I then get an updated logrotate.d
> file?

Ehh, actually this got kinda hijacked and we were kinda discussing
something else, as spyderous was talking about providing a package with
configuration files and other such files.  We diverged a bit saying how
config should be used more, but I know that at least *I* wasn't talking
about for things like logrotate files, but rather for actually
configuring a package.

> I see only two viable options.
> - Unconditional, use INSTALL_MASK, no RDEPEND on logrotate
> - Conditional on USE=logrotate
> 
> The first one is what is generally used in the tree so far.

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-04-29 17:44             ` Robin H. Johnson
  2005-04-29 18:06               ` Jason Stubbs
  2005-04-29 18:59               ` Chris Gianelloni
@ 2005-04-29 19:17               ` Donnie Berkholz
  2 siblings, 0 replies; 54+ messages in thread
From: Donnie Berkholz @ 2005-04-29 19:17 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robin H. Johnson wrote:
> On Fri, Apr 29, 2005 at 09:36:54AM +0900, Jason Stubbs wrote:
> 
>>What about the unused `ebuild [ebuild] config`? Isn't that the perfect place 
>>for this sort of stuff? The only package that I know that uses this feature 
>>is mysql. There are way more possibilities.
> 
> No, ebuild config shouldn't be abused like this. Say I have an existing
> install of mysql, and the package maintainer puts in an updated
> logrotate.d file. Running 'ebuild mysql.ebuild config' is meant for NEW
> installations only, and it doesn't enable me to take advantage of
> CONFIG_PROTECT. I've seen a package where running the config phase when
> the package is already set up blows away your existing config.  It gives
> you a warning first, but how would I then get an updated logrotate.d
> file?
> 
> I see only two viable options.
> - Unconditional, use INSTALL_MASK, no RDEPEND on logrotate
> - Conditional on USE=logrotate
> 
> The first one is what is generally used in the tree so far.

Seems like your third viable option is allowing CONFIG_PROTECT to work
in the config step.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCcohMXVaO67S1rtsRAl0bAJ9LyXaXqg6Ii11wCjVAIshXibfneACgw4oN
MiWRaEkmajAwl2Adg9KtGTA=
=bSFX
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list


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

* [gentoo-dev] New global USE flag: logrotate
@ 2005-08-02  9:22 Tom Martin
  2005-08-02 10:44 ` Anthony Gorecki
                   ` (3 more replies)
  0 siblings, 4 replies; 54+ messages in thread
From: Tom Martin @ 2005-08-02  9:22 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

Hi list,

Bug 97447 wants a logrotate USE flag, which is used by about five
packages locally. Unless there are any objections, I'll globalify it
later today.

Tom

-- 
Tom Martin, http://dev.gentoo.org/~slarti
AMD64, net-mail, shell-tools, vim, recruiters
Gentoo Linux

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02  9:22 Tom Martin
@ 2005-08-02 10:44 ` Anthony Gorecki
  2005-08-02 12:17 ` Chris Gianelloni
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 54+ messages in thread
From: Anthony Gorecki @ 2005-08-02 10:44 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

On Tuesday, August 02, 2005 2:22 am, Tom Martin wrote:
> Bug 97447 wants a logrotate USE flag, which is used by about five
> packages locally. Unless there are any objections, I'll globalify it
> later today.

I'd welcome this, almost as much as a global do_not_install_cron_tasks flag.


-- 
Anthony Gorecki
Ectro-Linux Foundation

[-- Attachment #2: Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02  9:22 Tom Martin
  2005-08-02 10:44 ` Anthony Gorecki
@ 2005-08-02 12:17 ` Chris Gianelloni
  2005-08-02 17:04   ` Tom Martin
  2005-08-02 12:34 ` tomk
  2005-08-02 16:48 ` Donnie Berkholz
  3 siblings, 1 reply; 54+ messages in thread
From: Chris Gianelloni @ 2005-08-02 12:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

On Tue, 2005-08-02 at 10:22 +0100, Tom Martin wrote:
> Hi list,
> 
> Bug 97447 wants a logrotate USE flag, which is used by about five
> packages locally. Unless there are any objections, I'll globalify it
> later today.

If you make the flag global, can you make sure that all of the packages
that use this flag exhibit the same behavior when using it.  If they all
do their own thing, then I would suggest leaving it local.

Global USE flags are not so much a case of x number of packages use it,
but x number of package use it to mean the same thing.

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02  9:22 Tom Martin
  2005-08-02 10:44 ` Anthony Gorecki
  2005-08-02 12:17 ` Chris Gianelloni
@ 2005-08-02 12:34 ` tomk
  2005-08-02 16:48 ` Donnie Berkholz
  3 siblings, 0 replies; 54+ messages in thread
From: tomk @ 2005-08-02 12:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

On Tue, Aug 02, 2005 at 10:22:01AM +0100, Tom Martin wrote:
> Hi list,
> 
> Bug 97447 wants a logrotate USE flag, which is used by about five
> packages locally. Unless there are any objections, I'll globalify it
> later today.
> 

You may want to read over this thread from April when the logrotate USE flag
was last discussed. There were some interesting things brought up.

http://thread.gmane.org/gmane.linux.gentoo.devel/27451

Tom

-- 
Tom Knight
tomk@gentoo.org
GPG Public Key: http://dev.gentoo.org/~tomk/tomk.asc

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02  9:22 Tom Martin
                   ` (2 preceding siblings ...)
  2005-08-02 12:34 ` tomk
@ 2005-08-02 16:48 ` Donnie Berkholz
  2005-08-02 17:01   ` Alec Warner
                     ` (2 more replies)
  3 siblings, 3 replies; 54+ messages in thread
From: Donnie Berkholz @ 2005-08-02 16:48 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Martin wrote:
| Hi list,
|
| Bug 97447 wants a logrotate USE flag, which is used by about five
| packages locally. Unless there are any objections, I'll globalify it
| later today.

I think this flag is a bad idea. Why should I have to recompile a
package to get some files that go in /etc? Either install them
unconditionally or don't install them at all.

Thanks,
Donnie
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC76PZXVaO67S1rtsRAnseAKD0sSr+V/DT2J4BBgWIBqzfkTBSFwCff1ok
TjOSbr2zjsxYNqCuTraJ6WI=
=HAZ0
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 16:48 ` Donnie Berkholz
@ 2005-08-02 17:01   ` Alec Warner
  2005-08-02 17:33   ` Ciaran McCreesh
  2005-08-02 17:58   ` Alin Nastac
  2 siblings, 0 replies; 54+ messages in thread
From: Alec Warner @ 2005-08-02 17:01 UTC (permalink / raw
  To: gentoo-dev

Donnie Berkholz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tom Martin wrote:
> | Hi list,
> |
> | Bug 97447 wants a logrotate USE flag, which is used by about five
> | packages locally. Unless there are any objections, I'll globalify it
> | later today.
>
> I think this flag is a bad idea. Why should I have to recompile a
> package to get some files that go in /etc? Either install them
> unconditionally or don't install them at all.
>
> Thanks,
> Donnie

It seems like we have had this conversation before ;)
Install it unconditionally and if the user doesn't want it they can use 
INSTALL_MASK to remove it from ${D} before it's merged to the livefs.

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFC76PZXVaO67S1rtsRAnseAKD0sSr+V/DT2J4BBgWIBqzfkTBSFwCff1ok
> TjOSbr2zjsxYNqCuTraJ6WI=
> =HAZ0
> -----END PGP SIGNATURE-----


-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 12:17 ` Chris Gianelloni
@ 2005-08-02 17:04   ` Tom Martin
  2005-08-02 17:24     ` Chris Gianelloni
  0 siblings, 1 reply; 54+ messages in thread
From: Tom Martin @ 2005-08-02 17:04 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

On Tue, Aug 02, 2005 at 08:17:08AM -0400, Chris Gianelloni <wolf31o2@gentoo.org> wrote:
> If you make the flag global, can you make sure that all of the packages
> that use this flag exhibit the same behavior when using it.  If they all
> do their own thing, then I would suggest leaving it local.
> 
> Global USE flags are not so much a case of x number of packages use it,
> but x number of package use it to mean the same thing.

I didn't realise that the flag was being used in more than one way --
how else is it being used?

Tom

-- 
Tom Martin, http://dev.gentoo.org/~slarti
AMD64, net-mail, shell-tools, vim, recruiters
Gentoo Linux

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 17:04   ` Tom Martin
@ 2005-08-02 17:24     ` Chris Gianelloni
  0 siblings, 0 replies; 54+ messages in thread
From: Chris Gianelloni @ 2005-08-02 17:24 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

On Tue, 2005-08-02 at 18:04 +0100, Tom Martin wrote:
> On Tue, Aug 02, 2005 at 08:17:08AM -0400, Chris Gianelloni <wolf31o2@gentoo.org> wrote:
> > If you make the flag global, can you make sure that all of the packages
> > that use this flag exhibit the same behavior when using it.  If they all
> > do their own thing, then I would suggest leaving it local.
> > 
> > Global USE flags are not so much a case of x number of packages use it,
> > but x number of package use it to mean the same thing.
> 
> I didn't realise that the flag was being used in more than one way --
> how else is it being used?

I never said that it was... I just said to make sure to check... ;]

Of course, I agree with everyone else that this shouldn't be a USE flag,
at all.  My personal opinion is that we install the logrotate.d files no
matter what, and users can INSTALL_MASK it if they don't want it.  After
all, is the file installed by default upstream?  If so, then why are we
hiding it behind a USE flag in the first place?

-- 
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 16:48 ` Donnie Berkholz
  2005-08-02 17:01   ` Alec Warner
@ 2005-08-02 17:33   ` Ciaran McCreesh
  2005-08-02 17:48     ` Alec Joseph Warner
  2005-08-02 17:52     ` Donnie Berkholz
  2005-08-02 17:58   ` Alin Nastac
  2 siblings, 2 replies; 54+ messages in thread
From: Ciaran McCreesh @ 2005-08-02 17:33 UTC (permalink / raw
  To: gentoo-dev

On Tue, 02 Aug 2005 09:48:25 -0700 Donnie Berkholz
<spyderous@gentoo.org> wrote:
| Tom Martin wrote:
| | Hi list,
| |
| | Bug 97447 wants a logrotate USE flag, which is used by about five
| | packages locally. Unless there are any objections, I'll globalify it
| | later today.
| 
| I think this flag is a bad idea. Why should I have to recompile a
| package to get some files that go in /etc? Either install them
| unconditionally or don't install them at all.

Files in /etc are expensive in terms of sysadmin time. The only things
in /etc should be things that are both necessary and likely to be
modified by a sysadmin.

-- 
Ciaran McCreesh
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 17:33   ` Ciaran McCreesh
@ 2005-08-02 17:48     ` Alec Joseph Warner
  2005-08-02 17:59       ` Ciaran McCreesh
  2005-08-02 17:52     ` Donnie Berkholz
  1 sibling, 1 reply; 54+ messages in thread
From: Alec Joseph Warner @ 2005-08-02 17:48 UTC (permalink / raw
  To: gentoo-dev

Ciaran McCreesh wrote:
> On Tue, 02 Aug 2005 09:48:25 -0700 Donnie Berkholz
> <spyderous@gentoo.org> wrote:
> | Tom Martin wrote:
> | | Hi list,
> | |
> | | Bug 97447 wants a logrotate USE flag, which is used by about five
> | | packages locally. Unless there are any objections, I'll globalify it
> | | later today.
> | 
> | I think this flag is a bad idea. Why should I have to recompile a
> | package to get some files that go in /etc? Either install them
> | unconditionally or don't install them at all.
> 
> Files in /etc are expensive in terms of sysadmin time. The only things
> in /etc should be things that are both necessary and likely to be
> modified by a sysadmin.
> 
And who makes that call, shouldn't the sysadmin decide what is necessary 
in /etc and what is not?  Why shouldn't portage just install stuff in 
/etc and let the sysadmin figure out what needs to be there via 
INSTALL_MASK?
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 17:33   ` Ciaran McCreesh
  2005-08-02 17:48     ` Alec Joseph Warner
@ 2005-08-02 17:52     ` Donnie Berkholz
  2005-08-02 18:12       ` Ciaran McCreesh
  1 sibling, 1 reply; 54+ messages in thread
From: Donnie Berkholz @ 2005-08-02 17:52 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ciaran McCreesh wrote:
| Files in /etc are expensive in terms of sysadmin time. The only things
| in /etc should be things that are both necessary and likely to be
| modified by a sysadmin.

So we should stop installing example files, too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC77LsXVaO67S1rtsRAlqrAKCx6E1l7wz6n5/oAKiSjFcC/OA2mwCfUmeU
uH7cD5Cn6ZJvVrdjNlPBu6s=
=UQ5A
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 16:48 ` Donnie Berkholz
  2005-08-02 17:01   ` Alec Warner
  2005-08-02 17:33   ` Ciaran McCreesh
@ 2005-08-02 17:58   ` Alin Nastac
  2005-08-03 23:50     ` Tom Martin
  2 siblings, 1 reply; 54+ messages in thread
From: Alin Nastac @ 2005-08-02 17:58 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

Donnie Berkholz wrote:

> Tom Martin wrote:
> | Hi list,
> |
> | Bug 97447 wants a logrotate USE flag, which is used by about five
> | packages locally. Unless there are any objections, I'll globalify it
> | later today.
>
> I think this flag is a bad idea. Why should I have to recompile a
> package to get some files that go in /etc? Either install them
> unconditionally or don't install them at all.
>
>
This useflag is useful in net-proxy/squid at least.
It also controls whether a cron script that use native squid log
rotation is installed or not. You cannot select your preferred rotation
mechanism (logrotate or cron job) through other way than useflags.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 17:48     ` Alec Joseph Warner
@ 2005-08-02 17:59       ` Ciaran McCreesh
  0 siblings, 0 replies; 54+ messages in thread
From: Ciaran McCreesh @ 2005-08-02 17:59 UTC (permalink / raw
  To: gentoo-dev

On Tue, 02 Aug 2005 13:48:17 -0400 Alec Joseph Warner
<warnera6@egr.msu.edu> wrote:
| > Files in /etc are expensive in terms of sysadmin time. The only
| > things in /etc should be things that are both necessary and likely
| > to be modified by a sysadmin.
| > 
| And who makes that call, shouldn't the sysadmin decide what is
| necessary  in /etc and what is not? 

Sure. The sysadmin makes the call via USE.

| Why shouldn't portage just install stuff in  /etc and let the sysadmin
| figure out what needs to be there via  INSTALL_MASK?

We already have a perfectly good mechanism for handling optional
components of packages. INSTALL_MASK isn't something that should be
encouraged -- it's not a 'safe' setting.

-- 
Ciaran McCreesh
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 17:52     ` Donnie Berkholz
@ 2005-08-02 18:12       ` Ciaran McCreesh
  0 siblings, 0 replies; 54+ messages in thread
From: Ciaran McCreesh @ 2005-08-02 18:12 UTC (permalink / raw
  To: gentoo-dev

On Tue, 02 Aug 2005 10:52:44 -0700 Donnie Berkholz
<spyderous@gentoo.org> wrote:
| Ciaran McCreesh wrote:
| | Files in /etc are expensive in terms of sysadmin time. The only
| | things in /etc should be things that are both necessary and likely
| | to be modified by a sysadmin.
| 
| So we should stop installing example files, too?

Into /etc? Yes. Stick them in /usr/share/doc. If a package needs a file
in /etc, try to install a file which is generally suitable for most
people with the correct name.

It's Gentoo policy (yup, this is one of the few things we have 'real'
policy about) that packages should, where possible, work 'out of the
box'. We get this by installing a best attempt at a configuration file
into the correct location. Cluttering up a CONFIG_PROTECTed area with
bogus .example files merely makes more work for the end user.

-- 
Ciaran McCreesh
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] New global USE flag: logrotate
  2005-08-02 17:58   ` Alin Nastac
@ 2005-08-03 23:50     ` Tom Martin
  0 siblings, 0 replies; 54+ messages in thread
From: Tom Martin @ 2005-08-03 23:50 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

On Tue, Aug 02, 2005 at 08:58:14PM +0300, Alin Nastac <mrness@gentoo.org> wrote:
> It also controls whether a cron script that use native squid log
> rotation is installed or not. You cannot select your preferred rotation
> mechanism (logrotate or cron job) through other way than useflags.

If it's being used like that there, I think I'll just stick to creating
another local flag. It's a pretty reasonable compromise, considering
some of the criticisms in this thread and the other.

Tom

-- 
Tom Martin, http://dev.gentoo.org/~slarti
AMD64, net-mail, shell-tools, vim, recruiters
Gentoo Linux

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2005-08-03 22:53 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-28  8:30 [gentoo-dev] New global USE flag: logrotate Henrik Brix Andersen
2005-04-28  8:51 ` Robin H. Johnson
2005-04-28 10:34   ` Henrik Brix Andersen
2005-04-28 10:44     ` Robin H. Johnson
2005-04-28 11:01       ` Thomas de Grenier de Latour
2005-04-28 11:01       ` Henrik Brix Andersen
2005-04-28 14:00         ` Mike Frysinger
2005-04-28 14:08           ` Thomas de Grenier de Latour
2005-04-28 12:05     ` Ciaran McCreesh
2005-04-28 12:56       ` Georgi Georgiev
2005-04-28 13:41 ` Cory Visi
2005-04-28 13:44   ` Lance Albertson
2005-04-28 13:47   ` Ciaran McCreesh
2005-04-28 15:23   ` Chris Gianelloni
2005-04-28 15:51     ` Thomas de Grenier de Latour
2005-04-28 19:48 ` Donnie Berkholz
2005-04-28 20:16   ` Ciaran McCreesh
2005-04-28 20:21     ` Donnie Berkholz
2005-04-28 22:18       ` Grant Goodyear
2005-04-28 22:28         ` Donnie Berkholz
2005-04-29  0:36           ` Jason Stubbs
2005-04-29  0:43             ` Donnie Berkholz
2005-04-29 12:26             ` Chris Gianelloni
2005-04-29 13:25               ` Dan Meltzer
2005-04-29 13:55                 ` Jason Stubbs
2005-04-29 15:52                   ` Chris Gianelloni
2005-04-29 16:17                     ` Jason Stubbs
2005-04-29 17:26                       ` Chris Gianelloni
2005-04-29 17:25                     ` Jason Stubbs
2005-04-29 17:46                       ` Chris Gianelloni
2005-04-29 18:03                         ` Jason Stubbs
2005-04-29 15:32                 ` Chris Gianelloni
2005-04-29 17:44             ` Robin H. Johnson
2005-04-29 18:06               ` Jason Stubbs
2005-04-29 18:59               ` Chris Gianelloni
2005-04-29 19:17               ` Donnie Berkholz
2005-04-29  9:32         ` Christian Birchinger
2005-04-28 22:32 ` Tom Wesley
2005-04-28 23:10 ` Spider
  -- strict thread matches above, loose matches on Subject: below --
2005-08-02  9:22 Tom Martin
2005-08-02 10:44 ` Anthony Gorecki
2005-08-02 12:17 ` Chris Gianelloni
2005-08-02 17:04   ` Tom Martin
2005-08-02 17:24     ` Chris Gianelloni
2005-08-02 12:34 ` tomk
2005-08-02 16:48 ` Donnie Berkholz
2005-08-02 17:01   ` Alec Warner
2005-08-02 17:33   ` Ciaran McCreesh
2005-08-02 17:48     ` Alec Joseph Warner
2005-08-02 17:59       ` Ciaran McCreesh
2005-08-02 17:52     ` Donnie Berkholz
2005-08-02 18:12       ` Ciaran McCreesh
2005-08-02 17:58   ` Alin Nastac
2005-08-03 23:50     ` Tom Martin

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