Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#6981 - Syntax error in the install script of firestarter 1.0.3-5

Attached to Project: Arch Linux
Opened by Darwin Bautista (djclue917) - Monday, 23 April 2007, 06:07 GMT
Last edited by Jan de Groot (JGC) - Thursday, 26 April 2007, 21:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version 0.8 Voodoo
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

(2/2) upgrading firestarter [#######################################################] 100%
/var/lib/pacman/local/firestarter-1.0.3-5/install: line 24: syntax error near unexpected token `done'
/var/lib/pacman/local/firestarter-1.0.3-5/install: line 24: ` done'


----------------

There's an extra 'done' in line 24 of the install script.
This task depends upon

Closed by  Jan de Groot (JGC)
Thursday, 26 April 2007, 21:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in -7. The daemon restart thing is not included, users can change firewall rules from outside of firestarter, restarting the daemon could undo those and cause weird unexpected behaviour.
Comment by Darwin Bautista (djclue917) - Monday, 23 April 2007, 06:57 GMT
Also, all the leading '/' are missing!

e.g.:
GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
...
schema=usr/share/gconf/schemas/firestarter.schemas

Futhermore... it seems that -5 doesn't migrate the Firestarter config from /opt/gnome/etc/firestarter to /etc/firestarter.

Attached is the modified PKGBUILD that fixes all known problems with -5. Also, I've added the code in the install script for migrating the config without breaking Firestarter. I've already tested the new package (-6) in my machine--tests: fresh install and upgrade from -5.
Comment by Roman Kyrylych (Romashka) - Tuesday, 24 April 2007, 10:31 GMT
re-opened on this request by djclue917:
There's a bug in your config migration code:
1. It will fail to modify paths in the files in /etc/firestarter/{in,out}bound/
Sol'n: Use "for file in `find /etc/firestarter -type f`" instead of "for file in /etc/firestarter/*" because the latter will only list the contents of /etc/firestarter/, not including the contents of its subdirs.
2. The code is placed in the pre_upgrade() function which implies that /etc/firestarter doesn't exist yet upon the execution of the code. Which means that "mv opt/gnome/etc/firestarter/* etc/firestarter/" will fail.
Also, what if the user had previously installed firestarter-1.0.3-5 because of the bugs, and then decided to install the updated package (1.0.3-6)? The code should be put in post_install()
3. Firestarter should be stopped before the config migration and then started again after the config migration. Just a precautionary measure to prevent possible problems...
Comment by Fredrik (vEX) - Thursday, 26 April 2007, 20:26 GMT
I just upgraded firestarter to 1.0.3-6 (from 1.0.3-4) and sure enough it failed to move the configuration as noted above:

mv: target `etc/firestarter/' is not a directory
rmdir: opt/gnome/etc/firestarter: Directory not empty
unregistering gnome schemas ...
upgrading firestarter... done.

$ ls /etc/firestarter/
non-routables

$ ls /opt/gnome/etc/firestarter/
configuration events-filter-ports firewall outbound user-post
events-filter-hosts firestarter.sh inbound sysctl-tuning user-pre

Loading...