[parted-devel] automating the release process

Jim Meyering jim at meyering.net
Wed Jul 15 08:56:57 UTC 2009


Joel Granados wrote:
> You can see the updated version on
> http://jgranado.fedorapeople.org/packages/parted/do_major_release
> On Tue, Jul 14, 2009 at 08:36:09PM +0200, Joel Granados wrote:
>> Hello list.
>>
>> Been working on a script that will automate part of the release process.
>> The local part.  After talking to Jim it seemed logical to generalize
>> what I had been using to make my life easier.
>>
>> The script is attached.  As always, any suggestions are greatly
>> appreciated.
>>
>> FYI.  The script runs as follows:
>>
>> ./script --version 1.9.0 --key-id YOUR_KEY_ID
>>
>> Regards.
>>
>> PS: I'm thinking of calling it parted-release or something similar.

Hi Joel,

parted-release is a good name.
Better than do_major_release, because we prefer "-" to "_"
and because you might want to make it work also for non-major releases.

The rest of the feedback is regarding this,
  http://jgranado.fedorapeople.org/packages/parted/do_major_release
(a copy included below, for reference)

I have a strong preference for not using all-caps variable names.
Mostly for readability, but also for name-space-related issues.
All-caps are typically reserved for applications, while lower-case
ones are not, so in using lower-case names we're less likely to
impinge on any application name-space.

The first test here is unnecessary,

  if [ "x$KEY_STRING" = "x" -o "x$KEY_ID" = "x"] ; then
      KEY_STRING="-s"
      KEY_ID="FIXME: YOUR_KEY"
  fi

since those two variables are always set together.
Just testing the key ID is sufficient.

Besides, don't you just want to give a diagnostic
and exit nonzero when $KEY_ID is not specified or empty?

----------------------------------
By using the full absolute name,

  STAGE_DIR=$(pwd)

and with unquoted uses below, e.g., the derived PARTED_DIR,

    PARTED_DIR="$STAGE_DIR/parted"
    req_ac=$( (cat $PARTED_DIR/bootstrap.conf \

you have made the script slightly vulnerable.
If it is run from a poorly-named directory (a name containing
spaces or shell meta-characters), it will fail, at least,
and may even do something nasty.

It's best to avoid absolute names, when possible.

----------------------------------
You can probably remove the _do_mail_template function as well as
the those manual version checks, (the do_check_*_ver functions).
The latter are already performed by running ./bootstrap.
And when you run e.g., "make major" an announcement email template is
written to /tmp/announce-parted.  (see the "announcement" target in maint.mk)

------------------------------------
For your _do_success file, please just cat a separate file, README-release
which would contain the same information.  Then, it's slightly easier to
merge changes between it and other files like the one in coreutils.

Thanks for working on this!
Jim

Here's a copy of
  http://jgranado.fedorapeople.org/packages/parted/do_major_release
--------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: parted-release
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20090715/4ff232e7/attachment.asc>


More information about the parted-devel mailing list