Your email updates, powered by FeedBlitz

 
Here is a sample subscription for you. Click here to start your FREE subscription

"Tim Abell's blog" - 5 new articles

  1. getting supybot to announce new bugzilla bugs
  2. bugzilla upgrades and user tokens
  3. life update - software learning
  4. backuppc and windows vista
  5. git-svn imports for open source projects
  6. More Recent Articles
  7. Search Tim Abell's blog

getting supybot to announce new bugzilla bugs

getting supybot to announce new bugzilla bugs - I've just put here the key non-obvious things that tripped me up when trying to set this up.

All done on Ubuntu 8.04.3 LTS

Install supybot and the supybot bugzilla plugin.

Create a system group (supybot) and user (bugbot) to run supybot as.

Set up your supybot configuration file as desired.

Getting supybot to start at startup:
http://www.schwer.us/journal/2005/04/17/supybot-init-script-for-debian/

Here's my modified init script

$ cat /etc/init.d/bugbot
#! /bin/sh
#
# supybot init script
# http://www.schwer.us/journal/2005/04/17/supybot-init-script-for-debian/
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/supybot
NAME=supybot
DESC=supybot

test -f $DAEMON || exit 0

set -e

case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet \
--chuid bugbot --exec $DAEMON -- --daemon /etc/supybot/bugbot.conf
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet \
--oknodo --exec /usr/bin/python
echo "$NAME."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac

exit 0


Set up bugzilla to send a copy of all bugmail to a local address (eg bugbot@localhost), and configure exim4 to accept local mail (as well as smart host delivery), using the mbox format.

sudo dpkg-reconfigure exim4-config

Start a conversation with bugbot, get it to identify you, then set the required configuration by sending it messages (you can also set these in the supybot .conf file for your bot):

  • config plugins.Bugzilla.mbox /var/mail/bugbot

  • config plugins.Bugzilla.bugzillas.your-bugzilla-name.watchedItems.all True
    which will turn on the announcements (i had to read the code to find that one!)


Note that supybot doesn't immediately write config changes to disc.


bugzilla upgrades and user tokens

It's bugzilla upgrade time for my private install, and I have for the second time run into a strange issue with the tokens system. Since this is the second time and I know how to fix it, here it is for the record.

I have upgrade from v3.0.4 to 3.4.3.

Once the site was up again, saving the site parameters (editparams.cgi) showed a big red warning:

It looks like you didn't come from the right page (you have no valid token for the edit_parameters action while processing the 'editparams.cgi' script). The reason could be one of:
  • You clicked the "Back" button of your web browser after having successfully submitted changes, which is generally not a good idea (but harmless).
  • You entered the URL in the address bar of your web browser directly, which should be safe.
  • You clicked on a URL which redirected you here without your consent, in which case this action is much more critical.
Are you sure you want to commit these changes anyway? This may result in unexpected and undesired results.

[Confirm Changes]

Or throw away these changes and go back to editparams.cgi.



Pushing the button doesn't work (same page shows again).

After much digging last time I discovered that the tokens it refers to are stored in table bugs.tokens, and that the size of the field is wrong in my installation after the upgrade (again).

mysql> use bugs;
mysql> describe tokens;
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| userid | mediumint(9) | YES | MUL | NULL | |
| issuedate | datetime | NO | | NULL | |
| token | varchar(5) | NO | PRI | NULL | |
| tokentype | varchar(8) | YES | | NULL | |
| eventdata | tinytext | YES | | NULL | |
+-----------+--------------+------+-----+---------+-------+
5 rows in set (0.02 sec)

According to the published schema, token should be varchar(16). http://www.ravenbrook.com/project/p4dti/tool/cgi/bugzilla-schema/index.cgi?action=single&version=3.4.2&view=View+schema#table-tokens

To fix the problem I modified the data type as follows:


mysql> alter table tokens modify column token varchar(16) not null;
Query OK, 20 rows affected (0.32 sec)
Records: 20 Duplicates: 0 Warnings: 0


And then I was able to change my parameters.

https://bugzilla.mozilla.org/show_bug.cgi?id=527780


life update - software learning

I'm currently reading Journey of the Software Professional: Sociology of Computer Programming. It's proved so far to be a unique insight into how developers go from seeing a problem to providing a solution, good or bad. It's quite hard going as there's a lot of detailed analysis into how we work, but it's certainly given me food for thought.

In another area of self improvement, I recently passed 70-536: TS: Microsoft .NET Framework - Application Development Foundation, and am currently reading up on the ASP.NET exam with a view to gaining the MCTS cert. Much as I had hoped I'd left exams behind years ago, it is proving to be a useful exercise in filling in the gaps in my knowledge. Today I finally got around to creating something with Web Parts, which I wouldn't otherwise have done, another plan filed away in my cognitive library (cf. Journey of the Software Professional).


backuppc and windows vista

Steps I took to get a backuppc server on an ubuntu 8.10 pc in order to be able to back up a windows vista business pc. I've only documented the non-obvious and undocumented items here.

  • Added a user called backup to the vista pc.
  • Added the backup user to the "administrators" group. I tried the "backup operators" group but it didn't give access to the user profiles. It looks like robocopy has some black magic that allows it to bypass ACLs when a member of backup operators.
  • Enabled admin shares (ie \\machine\C$) by adding DWORD registry key "LocalAccountTokenFilterPolicy" to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System and setting the value to 1. See How to access Administrative Shares on Vista (C$) by PaulSpoerry
  • Removed the "-N" from the SmbClientFullCmd etc options in backuppc's transfer (xfer) settings as it didn't seem to be using the provided password. Troubleshooting was aided by running "/usr/share/backuppc/bin/BackupPC_dump -v -f vistamachine" directly as user backuppc.
  • Hide the backup user from the welcome screen by adding DWORD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\backup with value 0 to the registry. "backup" is the name of the user to hide, 0 means hide, 1 means show.
enjoy.

See also:
Current status: This has only been partially successful so far. The backup runs but has lots of files missing due access denied errors on many of the important folders. It looks like I will have to manually give "backup operators" permissions to these folders. Sigh. Vista is proving to be less than easy for me to support.


git-svn imports for open source projects

I've just written a lengthy open letter to github in the hope that they will support continuous centralized imports from svn to git.

If they don't wish to rise to the challenge (and I wouldn't hold it against them), I am wondering if it would be viable to run a server on fasthosts or something funded by donations that would do nothing but continuously import from svn servers, and push the result to github.

That's all for now.


More Recent Articles



Click here to safely unsubscribe now from "Tim Abell's blog" or change your subscription or subscribe