Merge lp:~kirkland/ubuntu-dev-tools/612267 into lp:~ubuntu-dev/ubuntu-dev-tools/trunk

Proposed by Dustin Kirkland  on 2010-08-10
Status: Merged
Merge reported by: Stefano Rivera
Merged at revision: not available
Proposed branch: lp:~kirkland/ubuntu-dev-tools/612267
Merge into: lp:~ubuntu-dev/ubuntu-dev-tools/trunk
Diff against target: 21 lines (+5/-1) (has conflicts)
1 file modified
debian/changelog (+5/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~kirkland/ubuntu-dev-tools/612267
Reviewer Review Type Date Requested Status
Kees Cook 2010-08-10 Approve on 2010-08-10
Review via email: mp+32216@code.launchpad.net

Description of the change

Please?

To post a comment you must log in.
Benjamin Drung (bdrung) wrote :

I don't think that ubuntu-dev-tools is the right package for the errno tool. errno is not related to _Ubuntu_ development. It's related to developing in general.

lp:~kirkland/ubuntu-dev-tools/612267 updated on 2010-08-10
698. By Dustin Kirkland  on 2010-08-10

enable errno to work, even if gcc is not installed

699. By Dustin Kirkland  on 2010-08-10

set $code (copy-n-paste fail)

Scott Moser (smoser) wrote :

Just because I felt like wasting time, I tried to improve some of 'errno' tool there, which I find quite useful.
The result is generally faster, with less forks, relying on matching of sed and awk or shell rather than a grep. The only thing non-standard is the use of 'I' in sed 's' for case insensitivity. I checked that that is supported by busybox's sed as well as gnu's.

if $(which gcc >/dev/null); then
        # Header finding trick from Kees Cook <email address hidden>
        headers=$(echo "#include <asm/errno.h>" | gcc -E - | awk -F\" '$2 ~ /\.h/ { print $2}' | sort -u)
else
        headers="/usr/include/asm-generic/errno*.h"
fi

for code in "${@}"; do
        if [ "$code" -le 0 -o "$code" -ge 0 ] 2>/dev/null; then
                # Input is a number, search for a particular matching code
                sed -n "s,^#define\s\+\([^\s]\+\s\+${code}\s.*\),\1,p" ${headers}
        else
                # Input is not a number, search for any matching strings
                sed -n "s,^#define\s\+\(.*${code}.*\),\1,Ip" ${headers}
        fi
done

Dustin Kirkland  (kirkland) wrote :

On Tue, Aug 10, 2010 at 12:02 PM, Benjamin Drung
<email address hidden> wrote:
> I don't think that ubuntu-dev-tools is the right package for the errno tool. errno is not related to _Ubuntu_ development. It's related to developing in general.

Where would you recommend it live?

I considered:
 * linux-tools (per mdz's suggestion), but this packaged wasn't
installed on any of my development machines, doesn't seem terribly
pervasive, and the only binary provided is "perf" (by
linux-tools-common)
 * devtools, but this package is to "to make the life of a Debian
Package maintainer easier"
 * coreutils, but these seem to be more about "making your system run"
than "doing hard core development"
 * ubuntu-dev-tools, also packaging specific, but friendly
maintainer(s), and I actually have commit access

:-Dustin

Iain Lane (laney) wrote :

Moreutils [0] could be a good place.

[0] http://joey.kitenet.net/code/moreutils/

Krzysztof Klimonda (kklimonda) wrote :

On Tue, 2010-08-10 at 18:01 +0000, Iain Lane wrote:
> Moreutils [0] could be a good place.
>
> [0] http://joey.kitenet.net/code/moreutils/
It may be the best option indeed. I have thought about putting this
script into linux-libc-bin so it can be installed alongside
linux-libc-dev (where errno.h files are located) but creating a new
package for small script doesn't seem right.

Dustin Kirkland  (kirkland) wrote :

On Tue, Aug 10, 2010 at 2:19 PM, Krzysztof Klimonda
<email address hidden> wrote:
> On Tue, 2010-08-10 at 18:01 +0000, Iain Lane wrote:
>> Moreutils [0] could be a good place.
>>
>> [0] http://joey.kitenet.net/code/moreutils/
> It may be the best option indeed. I have thought about putting this
> script into linux-libc-bin so it can be installed alongside
> linux-libc-dev (where errno.h files are located) but creating a new
> package for small script doesn't seem right.

By it's description, moreutils does perhaps seem reasonable.

But, alas, it's in Universe, and has no rdepends. Which basically
buries the errno tool.

Dustin

lp:~kirkland/ubuntu-dev-tools/612267 updated on 2010-08-10
700. By Dustin Kirkland  on 2010-08-10

added errno to the GPL-3 licensed scripts list

701. By Dustin Kirkland  on 2010-08-10

drop or later gplv3 on errno

702. By Dustin Kirkland  on 2010-08-10

add an errno utility, LP: #612267
add optimizations from Scott Moser

Dustin Kirkland  (kirkland) wrote :

On Tue, Aug 10, 2010 at 2:19 PM, Krzysztof Klimonda
<email address hidden> wrote:
> On Tue, 2010-08-10 at 18:01 +0000, Iain Lane wrote:
>> Moreutils [0] could be a good place.
>>
>> [0] http://joey.kitenet.net/code/moreutils/
> It may be the best option indeed. I have thought about putting this
> script into linux-libc-bin so it can be installed alongside
> linux-libc-dev (where errno.h files are located) but creating a new
> package for small script doesn't seem right.

By it's description, moreutils does perhaps seem reasonable.

But, alas, it's in Universe, and has no rdepends. Which basically
buries the errno tool.

Dustin

lp:~kirkland/ubuntu-dev-tools/612267 updated on 2010-08-10
703. By Dustin Kirkland  on 2010-08-10

update email address to ubuntu.com

Kees Cook (kees) wrote :

It's a tiny script that helps with development; if it should live somewhere else, it can do that in the future.

review: Approve
lp:~kirkland/ubuntu-dev-tools/612267 updated on 2010-08-10
704. By Dustin Kirkland  on 2010-08-10

releasing version 0.102

Colin Watson (cjwatson) wrote :

I don't think the position of moreutils in the archive is a good reason
to stick errno in ubuntu-dev-tools. moreutils is an increasingly useful
package, and if we submit things there when they're appropriate then it
will increasingly become the sort of package we want in main. Worrying
about whether the package is in main or universe first is backwards.

We discussed ubuntu-dev-tools in the derivatives round table at DebConf,
and agreed (or perhaps reinforced) that we should only put things
specific to Ubuntu development there.

Iain Lane (laney) wrote :

I'm concerned that this was merged when there was no consensus for it. After something is in, there's not much incentive to try and move it elsewhere. See how bad we've been at moving our other scripts out into more appropriate places.

Dustin, can you at least contact Joey and see if he'd have errno in moreutils?

btw, this is not to denigrate your efforts in writing the tool in any way — I'm sure everyone is grateful to you for doing so. :)

Stefano Rivera (stefanor) wrote :

It would of course be rather out of place in moreutils too (which is mostly shell-scripting and pipe-related).

Also, this can be done far less evilly in about the same amount python (although it could use some better argument parsing and help string generation):

#!/usr/bin/python

from errno import errorcode
from os import strerror
import sys
import re

if sys.argv[1].isdigit():
    found = (int(sys.argv[1]),)
else:
    r = re.compile(sys.argv[1])
    found = [i for i in errorcode.iterkeys()
               if r.search(errorcode[i] + ' ' + strerror(i))]

for i in found:
    print "%i: %s - %s" % (i, errorcode[i], strerror(i))

Dustin Kirkland  (kirkland) wrote :

On Tue, Aug 10, 2010 at 6:35 PM, Iain Lane <email address hidden> wrote:
> I'm concerned that this was merged when there was no consensus for it. After something is in, there's not much incentive to try and move it elsewhere. See how bad we've been at moving our other scripts out into more appropriate places.

Fair enough. I'm CC'ing ubuntu-devel@ now, as I think it's a
discussion that would benefit our development community, outside of a
merge proposal thread.

> Dustin, can you at least contact Joey and see if he'd have errno in moreutils?
>
> btw, this is not to denigrate your efforts in writing the tool in any way — I'm sure everyone is grateful to you for doing so. :)

Right, so I'm happy to send the tool to Joey -- I honestly don't care
where it lives. I just want it to be useful to as many developers, as
soon as possible. With the "as soon as possible" having a slightly
higher priority than "as many developers", in my mind. Whereas I can
get this into Ubuntu today and benefit a lot of users tomorrow, it
would probably take me several weeks (or months!) to get the same code
into Debian, and then Ubuntu.

I have a more general concern though...

It would be natural at this point to say at this point, "This sure
isn't worth the hassle...I'll just go back to /home/kirkland/bin,
thank you." But I'm an experienced Ubuntu coredev, upstream
developer, easy going person, and I think I have pretty thick skin.

We have some initiatives right now, trying to make it easier for
people to get new applications into Ubuntu, and the Ubuntu Software
Center. This is merely a 10-line, GPL'd shell script, and most
developers agree on its usefulness. But the experience of giving this
code away for the benefit of others is less than ideal. I'm happy to
persevere, push it to the right place, do the right thing. But will
the next aspiring developer who wants to share a small, useful hack
bother themselves with the process?

:-Dustin

James Westby (james-w) wrote :

On Wed, 11 Aug 2010 12:32:34 -0400, Dustin Kirkland <email address hidden> wrote:
> We have some initiatives right now, trying to make it easier for
> people to get new applications into Ubuntu, and the Ubuntu Software
> Center. This is merely a 10-line, GPL'd shell script, and most
> developers agree on its usefulness. But the experience of giving this
> code away for the benefit of others is less than ideal. I'm happy to
> persevere, push it to the right place, do the right thing. But will
> the next aspiring developer who wants to share a small, useful hack
> bother themselves with the process?

Maybe as an Ubuntu core-dev you want to upload a useful-hacks package
and accept all contributions in this vein in to that?

Thanks,

James

Luke Faraone (lfaraone) wrote :

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

On 08/11/2010 12:41 PM, James Westby wrote:
> On Wed, 11 Aug 2010 12:32:34 -0400, Dustin Kirkland <email address hidden> wrote:
>> We have some initiatives right now, trying to make it easier for
>> people to get new applications into Ubuntu, and the Ubuntu Software
>> Center. This is merely a 10-line, GPL'd shell script, and most
>> developers agree on its usefulness. But the experience of giving this
>> code away for the benefit of others is less than ideal. I'm happy to
>> persevere, push it to the right place, do the right thing. But will
>> the next aspiring developer who wants to share a small, useful hack
>> bother themselves with the process?
>
> Maybe as an Ubuntu core-dev you want to upload a useful-hacks package
> and accept all contributions in this vein in to that?

This sounds like a good upstream project which could be trivially be
packaged in Debian and Ubuntu. If somebody wants to organize it, I'll be
happy to get it uploaded to Unstable.

- --
Luke Faraone
http://luke.faraone.cc/

Debian Developer
Ubuntu Developer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkxi1D4ACgkQtrC51grHAgYg4wCfatdeKcIzzcFS05RMSdV7HNNc
NYMAmwaDjL8yYyGy4/phyWB3CRuwvNG+
=PMY8
-----END PGP SIGNATURE-----

Lucas Nussbaum (lucas) wrote :

On 11/08/10 at 12:41 -0400, James Westby wrote:
> On Wed, 11 Aug 2010 12:32:34 -0400, Dustin Kirkland <email address hidden> wrote:
> > We have some initiatives right now, trying to make it easier for
> > people to get new applications into Ubuntu, and the Ubuntu Software
> > Center. This is merely a 10-line, GPL'd shell script, and most
> > developers agree on its usefulness. But the experience of giving this
> > code away for the benefit of others is less than ideal. I'm happy to
> > persevere, push it to the right place, do the right thing. But will
> > the next aspiring developer who wants to share a small, useful hack
> > bother themselves with the process?
>
> Maybe as an Ubuntu core-dev you want to upload a useful-hacks package
> and accept all contributions in this vein in to that?

Isn't that what moreutils already is?

- Lucas

Dustin Kirkland  (kirkland) wrote :

On Thu, Aug 12, 2010 at 6:57 AM, Lucas Nussbaum
<email address hidden> wrote:
> On 11/08/10 at 12:41 -0400, James Westby wrote:
>> On Wed, 11 Aug 2010 12:32:34 -0400, Dustin Kirkland <email address hidden> wrote:
>> > We have some initiatives right now, trying to make it easier for
>> > people to get new applications into Ubuntu, and the Ubuntu Software
>> > Center.  This is merely a 10-line, GPL'd shell script, and most
>> > developers agree on its usefulness.  But the experience of giving this
>> > code away for the benefit of others is less than ideal.  I'm happy to
>> > persevere, push it to the right place, do the right thing.  But will
>> > the next aspiring developer who wants to share a small, useful hack
>> > bother themselves with the process?
>>
>> Maybe as an Ubuntu core-dev you want to upload a useful-hacks package
>> and accept all contributions in this vein in to that?
>
> Isn't that what moreutils already is?

Unclear.

I have emailed Joey and offered the script to his moreutils project.
Before proposing this script for ubuntu-dev-tools, I looked at the
moreutils webpage:
 * http://joey.kitenet.net/code/moreutils/

He has a list of 6 "rejected" tools, and a list of 6 tools still
"under consideration". Looking at the pattern, it appears to me that
Joey wants moreutils to focus on programs that work on STDIN and with
pipes. errno is neither of those.

For this reason, I agree with James' suggestion of a "useful-hacks"
package. I would really like to see us have a place for all things
useful that can get rejected from the usual suspects (coreutils,
moreutils, base-files, devscripts, etc. etc. etc.). Somewhere that
any MOTU can contribute any utility from their $HOME/bin or
$HOME/.bash_aliases which may be useful to others, but doesn't need to
be its own package/project.

Before this discussion, I *thought* that place was ubuntu-dev-tools,
but it's clear that some people don't want the package to be that.

So, yeah, I think "useful-hacks" would be a package I'd install on my
systems, and I'd enjoy collaborating with other MOTU on it. Not a
negatively connotated "dumping ground", but a feel-good "recycling
facility" :-) Or, have you ever been to a Sharper Image or Brookstone
store? They sells some innovative, smart gadgets, cutting edge stuff
that just doesn't make the cut for BestBuy, Fry's, or RadioShack. If
we don't already have a Sharper Image in the Ubuntu Mall, then I think
James is right -- some people would shop at one.

:-Dustin

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-08-10 18:53:43 +0000
3+++ debian/changelog 2010-08-10 18:56:14 +0000
4@@ -1,13 +1,17 @@
5-ubuntu-dev-tools (0.102) UNRELEASED; urgency=low
6+ubuntu-dev-tools (0.102) maverick; urgency=low
7
8 [ Dustin Kirkland ]
9 * errno, doc/errno.1, debian/control, debian/copyright, setup.py:
10 - add an errno utility, LP: #612267
11
12+<<<<<<< TREE
13 [ Kees Cook ]
14 * mk-sbuild: update examples to include "-A".
15
16 -- Kees Cook <kees@ubuntu.com> Tue, 10 Aug 2010 11:46:32 -0700
17+=======
18+ -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 10 Aug 2010 14:47:07 -0400
19+>>>>>>> MERGE-SOURCE
20
21 ubuntu-dev-tools (0.101) unstable; urgency=low
22