Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-analyzer/nagios-plugins: ChangeLog nagios-plugins-1.4.10-r1.ebuild
Donnie Berkholz wrote: chown root:nagios ${D}/usr/nagios || die Failed Chown of ${D}usr/nagios chown -R root:nagios ${D}/usr/nagios/libexec || die Failed Chown of ${D}usr/nagios/libexec chmod -R o-rwx ${D}/usr/nagios/libexec || die Failed Chmod of ${D}usr/nagios/libexec chmod 04710 ${D}/usr/nagios/libexec/check_icmp || die Failed Chmod of ${D}usr/nagios/libexec/check_icmp This may not be worth changing, but if you're ever working on it, fperms/fowners could be nice to use instead of these. It lets you clean out all those references to $D. I'll take a look at it, thanks! :) wkr, Tobias -- Gentoo Linux - Die Metadistribution http://www.mitp.de/1769 signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-irc/mistbot: mistbot-0.9.ebuild metadata.xml Manifest ChangeLog
Dnia 29-10-2007, Pn o godzinie 23:03 -0700, Donnie Berkholz napisał(a): On 22:45 Mon 29 Oct , Dawid Weglinski (cla) wrote: Revision ChangesPath 1.1 net-irc/mistbot/mistbot-0.9.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/mistbot/mistbot-0.9.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/mistbot/mistbot-0.9.ebuild?rev=1.1content-type=text/plain src_compile() { ebegin Change build.conf to fit needs if ! use xml; then sed -e '/^MODS\ +=\ rss$/d' -i build.conf || die sed failed fi if ! use nls; then sed -e '/^NLS = nls$/d' -i build.conf || die sed failed fi if ! use debug; then sed -e '/^DEBUG = debug$/d' -i build.conf || die sed failed fi if ! use ssl; then sed -e '/^SSL = ssl$/d' -i build.conf || die sed failed fi sed -e 's/^#ONCE\ =\ yes$/ONCE\ =\ yes/' -i build.conf || die sed failed What's up with some of these escaping spaces, and others not? echo CXXFLAGS=${CXXFLAGS} build.conf echo CXX=$(tc-getCXX) build.conf echo PREFIX=/usr build.conf ebegin compiling source emake all-oneGo || die emake failed if use doc; then ebegin generate documentation make doc || die make doc failed fi } src_install() { make install DESTDIR=${D} || die make install failed Any particular reason 'emake' isn't used here or in the 'make doc' call? Thanks, Donnie Fixed, thanks Cheers -- ,-. | Dawid Węgliński | | [EMAIL PROTECTED] | | cla @ irc.freenode.net | | GPG: 295E72D9 | `-' signature.asc Description: To jest część listu podpisana cyfrowo
[gentoo-dev] Resolving HAL vs. pciutils/usbutils
Heya, So now this is not a flamewar. Jakub was originally going to complain at me for the upstream usbutils adding support for gzipped usb.ids files, but a group of us (myself, dsd, jakub, leio, steev) had a discussion about it, and came up with a solution that both ends the breakage for direct users (HAL and others), and provides forward momentum. So firstly, what's the real problem? The original complaint came up because HAL expected the uncompressed file to exist as pci.ids, and wasn't ready to look at pci.ids.gz. While this caused breakage, it was only a warning sign that there was a deeper problem. libpci exists so that every application that wants to read the pci.ids file does not need to know the format, and so that the pciutils maintainers can change the file format (paired with changing their parsing code), without causing breakage for any other packages. HAL is not the only user of pci.ids/usb.ids: http://www.google.com/codesearch?q=%22pci.ids%22 http://www.google.com/codesearch?q=%22usb.ids%22 Here's DSD's original thread on the HAL lists: http://lists.freedesktop.org/archives/hal/2007-June/008834.html And he also noted this, but I don't have a link for it. dsd_ upstream PCI are going to change the format too, they gave like a years notice Also: robbat2 dsd_, thanks. so really, once the libpci is installed as a shared lib, there's no reason that HAL shouldn't use it? dsd_ robbat2: indeed - and nobody actually raised that as an objection, parts of hal already statically link against libpci... So at the moment, HAL needs the changes, but the patches have been blocked because pciutils needs move to a shared library and not cause ABI breakages instead of the present static-lib-only situation. usbutils is in very similar (but not quite identical) position, they have not yet introduced any library, but will be doing so, to enable similar format changes. The solution that the group of us agreed on, was the following: For USE=zlib, pciutils and usbutils should use the .gz version, but ALSO maintain the uncompressed version until all applications have migrated to using the libraries to handle the pci.ids. This uses the upstream-preferred formats for download, and stores suitably so that both {pci,usb}utils work, and HAL works as well (without the note about installing pciutils with USE=-zlib). The only download until this transition is finished is using an extra 180Kb on disk for the compressed versions (120Kb for the pci.id.gz and 60Kb for usb.ids.gz). Attached is my patch that has pci.ids stored in both styles (also cleans up old .gz files if compression is not being used). I've got it ready to commit to the tree with pciutils-2.2.8, and similarly for usb.ids (pending an ongoing discussion with upstream usbutils about their server-side usb.ids). If there is no major dissent when I get up tomorrow, I'll commit this, as the end to the breakage. -- Robin Hugh Johnson Gentoo Linux Developer Infra Guy E-Mail : [EMAIL PROTECTED] GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85 diff -Nuar pciutils-2.2.7.orig/update-pciids.sh pciutils-2.2.7/update-pciids.sh --- pciutils-2.2.7.orig/update-pciids.sh2007-10-30 16:17:03.25363 -0800 +++ pciutils-2.2.7/update-pciids.sh 2007-10-30 16:39:46.810463056 -0800 @@ -72,4 +72,18 @@ rm -f ${DEST%.gz} ${DEST%.gz}.old fi +# if the gzip version exists, but we are not using compressed mode, +# erase the gzip version, as it is old and crufty +if [ -z $PCI_COMPRESSED_IDS ] [ -f $DEST.gz ]; then + rm -f ${DEST}.gz +fi + +# Lastly, because HAL still reads the plaintext version only and +# has not yet migrated to using a library we leave the plaintext +# version in addition to the gzip version. +# They need to migrate because the pci.ids format will be changing. +if [ ${DEST%.gz} != ${DEST} ] ; then + gzip -d ${DEST} ${DEST%.gz} +fi + ${quiet} || echo Done. pgpE6UaGODNcX.pgp Description: PGP signature
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-emulation/xen: ChangeLog xen-3.1.1.ebuild
On Monday 15 October 2007, Donnie Berkholz wrote: On 18:33 Mon 15 Oct , Micheal Marineau (marineam) wrote: 1.1 app-emulation/xen/xen-3.1.1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen/xen-3.1 .1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen/xen-3.1 .1.ebuild?rev=1.1content-type=text/plain src_compile() { local myopt use debug myopt=${myopt} debug=y use pae myopt=${myopt} pae=y if use custom-cflags; then filter-flags -fPIE -fstack-protector else unset CFLAGS fi # Send raw LDFLAGS so that --as-needed works emake LDFLAGS=$(raw-ldflags) -C xen ${myopt} || die compile failed } src_install() { local myopt use debug myopt=${myopt} debug=y use pae myopt=${myopt} pae=y The environment should be preserved across phases, so you shouldn't have to repeat this stuff. myopt is declared local -mike signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-emulation/xen: ChangeLog xen-3.1.1.ebuild
On Wednesday 31 October 2007, Donnie Berkholz wrote: On 00:31 Wed 31 Oct , Mike Frysinger wrote: On Monday 15 October 2007, Donnie Berkholz wrote: On 18:33 Mon 15 Oct , Micheal Marineau (marineam) wrote: 1.1 app-emulation/xen/xen-3.1.1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen/xen -3.1 .1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen/xen -3.1 .1.ebuild?rev=1.1content-type=text/plain src_compile() { local myopt use debug myopt=${myopt} debug=y use pae myopt=${myopt} pae=y if use custom-cflags; then filter-flags -fPIE -fstack-protector else unset CFLAGS fi # Send raw LDFLAGS so that --as-needed works emake LDFLAGS=$(raw-ldflags) -C xen ${myopt} || die compile failed } src_install() { local myopt use debug myopt=${myopt} debug=y use pae myopt=${myopt} pae=y The environment should be preserved across phases, so you shouldn't have to repeat this stuff. myopt is declared local Sure, but did you notice it's set to the exact thing in both phases? Seems a bit pointless. i'm not disagreeing on that point, just that myopt is not currently part of the environment so it wont be preserved ;) -mike signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-emulation/xen: ChangeLog xen-3.1.1.ebuild
On 00:31 Wed 31 Oct , Mike Frysinger wrote: On Monday 15 October 2007, Donnie Berkholz wrote: On 18:33 Mon 15 Oct , Micheal Marineau (marineam) wrote: 1.1 app-emulation/xen/xen-3.1.1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen/xen-3.1 .1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen/xen-3.1 .1.ebuild?rev=1.1content-type=text/plain src_compile() { local myopt use debug myopt=${myopt} debug=y use pae myopt=${myopt} pae=y if use custom-cflags; then filter-flags -fPIE -fstack-protector else unset CFLAGS fi # Send raw LDFLAGS so that --as-needed works emake LDFLAGS=$(raw-ldflags) -C xen ${myopt} || die compile failed } src_install() { local myopt use debug myopt=${myopt} debug=y use pae myopt=${myopt} pae=y The environment should be preserved across phases, so you shouldn't have to repeat this stuff. myopt is declared local Sure, but did you notice it's set to the exact thing in both phases? Seems a bit pointless. Thanks, Donnie -- [EMAIL PROTECTED] mailing list
[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-admin/webmin: ChangeLog webmin-1.370-r1.ebuild
On 10:36 Tue 30 Oct , Roy Marples (uberlord) wrote: 1.1 app-admin/webmin/webmin-1.370-r1.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/webmin/webmin-1.370-r1.ebuild?rev=1.1view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/webmin/webmin-1.370-r1.ebuild?rev=1.1content-type=text/plain (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - Please don't tell me the -or find flag isn't POSIX so we can't use it... cp -rp * ${D}/usr/libexec/webmin Lots of quote stuff here, repoman should be catching that. Thanks, Donnie -- [EMAIL PROTECTED] mailing list
[gentoo-portage-dev] src_test cleanup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The following patch was also on gentoo-dev before. It eliminates some dead code paths from default src_test and in the process eliminates references to FEATURES which is good for allowing ebuild.sh to be shared with other package managers. Marijn diff -uw /usr/lib64/portage/bin/ebuild.sh ~/ebuild.sh @@ -709,16 +666,10 @@ src_test() { if emake -j1 check -n /dev/null; then vecho Test phase [check]: ${CATEGORY}/${PF} - - if ! emake -j1 check; then - - hasq test $FEATURES die Make check failed. See above for details. - - hasq test $FEATURES || eerror Make check failed. See above for details. - - fi +emake -j1 check || die Make check failed. See above for details. elif emake -j1 test -n /dev/null; then vecho Test phase [test]: ${CATEGORY}/${PF} - - if ! emake -j1 test; then - - hasq test $FEATURES die Make test failed. See above for details. - - hasq test $FEATURES || eerror Make test failed. See above for details. - - fi +emake -j1 test || die Make test failed. See above for details. else vecho Test phase [none]: ${CATEGORY}/${PF} fi - -- Marijn Schouten (hkBst), Gentoo Lisp project http://www.gentoo.org/proj/en/lisp/, #gentoo-lisp on FreeNode -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHJ2usp/VmCx0OL2wRArFMAKC7kPj/i9pxUNOM3nsG99qzIFP9AQCfepvh HmpExOB6pc4ZZFlxOFC3G1I= =eboG -END PGP SIGNATURE- -- [EMAIL PROTECTED] mailing list
[gentoo-portage-dev] use* cleanup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The purpose of this patch is to expose a generic function, namely _use, which can be used to build your own use* variant if you need that. I reimplemented all other current use function using _use (and _if) to cut out duplicate and verbose code. Comments expected. I didn't test this code. Marijn diff -uw /usr/lib64/portage/bin/ebuild.sh ~/ebuild.sh @@ -150,40 +150,68 @@ return 0 } - -use() { - - useq ${1} +_if() { +$1 echo $2 || echo $3 } - -usev() { - - if useq ${1}; then - - echo ${1} - - return 0 - - fi +# Fully generic conditional use flag function. +# $1: calling function +# $2: use flag to check +# $3: string to echo on success +# $4: string to echo on failure +_use() { + if [[ $# = 1 ]]; then + echo !!! $1() called without a parameter. 2 + echo !!! $1 USEFLAG [flagname [value]] 2 return 1 - -} + fi - -useq() { - - local u=$1 + local flag=$2 + local string_success=$3 + local string_failure=$4 local found=0 - - # if we got something like '!flag', then invert the return value - - if [[ ${u:0:1} == ! ]] ; then - - u=${u:1} - - found=1 - - fi +# when $flag is '!blah', invert the return value and strip the '!' from flag + [[ ${flag} = !* ]] { found=1 ; flag=${flag:1} } # Make sure we have this USE flag in IUSE - - if ! hasq ${u} ${IUSE} ${E_IUSE} ! hasq ${u} ${PORTAGE_ARCHLIST} selinux; then - - eqawarn QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF} + if ! hasq ${flag} ${IUSE} ${E_IUSE} ! hasq ${u} ${PORTAGE_ARCHLIST} selinux; then + eqawarn QA Notice: USE Flag '${flag}' not in IUSE for ${CATEGORY}/${PF} fi - - if hasq ${u} ${USE} ; then - - return ${found} + if hasq ${flag} ${USE} ; then + echo ${string_success}; return ${found} else - - return $((!found)) + echo ${string_failure}; return $((!found)) fi } +use() { + _use ${FUNCNAME[0]} ${1} +} + +useq() { + _use ${FUNCNAME[0]} ${1} +} + +usev() { +_use ${FUNCNAME[0]} ${1} ${1} +} + +use_with() { + local SUFFIX=$(_if [ -z $3 ] =$3) + local WORD=$(_if [ -z $2 ] $1 $2) + + _use ${FUNCNAME[0]} $1 --with-${WORD}${SUFFIX} --without-${WORD} +} + +use_enable() { + local SUFFIX=$(_if [ -z $3 ] =$3) + local WORD=$(_if [ -z $2 ] $1 $2) + + _use ${FUNCNAME[0]} $1 --enable-${WORD}${SUFFIX} --disable-${WORD} +} + has_version() { if [ ${EBUILD_PHASE} == depend ]; then die portageq calls (has_version calls portageq) are not allowed in the global scope @@ -227,56 +255,6 @@ ${PORTAGE_BIN_PATH}/portageq 'best_version' ${ROOT} $1 } - -use_with() { - - if [ -z $1 ]; then - - echo !!! use_with() called without a parameter. 2 - - echo !!! use_with USEFLAG [flagname [value]] 2 - - return 1 - - fi - - - - local UW_SUFFIX= - - if [ ! -z ${3} ]; then - - UW_SUFFIX==${3} - - fi - - - - local UWORD=$2 - - if [ -z ${UWORD} ]; then - - UWORD=$1 - - fi - - - - if useq $1; then - - echo --with-${UWORD}${UW_SUFFIX} - - else - - echo --without-${UWORD} - - fi - - return 0 - -} - - - -use_enable() { - - if [ -z $1 ]; then - - echo !!! use_enable() called without a parameter. 2 - - echo !!! use_enable USEFLAG [flagname [value]] 2 - - return 1 - - fi - - - - local UE_SUFFIX= - - if [ ! -z ${3} ]; then - - UE_SUFFIX==${3} - - fi - - - - local UWORD=$2 - - if [ -z ${UWORD} ]; then - - UWORD=$1 - - fi - - - - if useq $1; then - - echo --enable-${UWORD}${UE_SUFFIX} - - else - - echo --disable-${UWORD} - - fi - - return 0 - -} - - - -- Marijn Schouten (hkBst), Gentoo Lisp project http://www.gentoo.org/proj/en/lisp/, #gentoo-lisp on FreeNode -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHJ3jUp/VmCx0OL2wRAnduAJ9BkYDzf7ROLUeVVOQ4m5oVZ3TNoQCeIlQ9 9XN6WDbj4CtojnRX9Zc9ny8= =4pj9 -END PGP SIGNATURE- -- [EMAIL PROTECTED] mailing list
Re: [gentoo-portage-dev] use* cleanup
On Tue, 30 Oct 2007 19:32:52 +0100 Marijn Schouten (hkBst) [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The purpose of this patch is to expose a generic function, namely _use, which can be used to build your own use* variant if you need that. I reimplemented all other current use function using _use (and _if) to cut out duplicate and verbose code. Comments expected. I didn't test this code. Please don't post patches inline, there are these things called attachments that work so much better for such things. Marius -- [EMAIL PROTECTED] mailing list
Re: [gentoo-portage-dev] use* cleanup
On Tuesday 30 October 2007, Marijn Schouten (hkBst) wrote: The purpose of this patch is to expose a generic function, namely _use, which can be used to build your own use* variant if you need that. I reimplemented all other current use function using _use (and _if) to cut out duplicate and verbose code. Comments expected. I didn't test this code. i guess i dont really see it ... there isnt that much duplicate code to begin with, and the end result is kind of hard to understand at first glance which is a bad thing ... -mike signature.asc Description: This is a digitally signed message part.