Hi,
Thanks for reporting this bug !
I retested your actions and successfully reproduced the problem.
This is an older patch before my role here, why index.mini-httpd.html
is in the second slot in that array eludes me totally. (probably
historic reasons ?)
> https://sources.debian.org/patches/mini-httpd/1.30-3/0003-fix-change-index-document-root/
> 
> The real problem is that
> https://salsa.debian.org/debian/mini-httpd/-/blob/master/debian/mini-httpd.postinst
> creates the file /var/www/html/index.mini-httpd.html at all, and that
> https://sources.debian.org/patches/mini-httpd/1.30-3/0003-fix-change-index-document-root/
> modifies the binary to deliver this file.
> 
Agreed, thanks for your detective work !
> A more sane way would be to follow the example of Apache, delivering
> a 
> default
> /var/www/html/index.html when the package is installed, update it
> only 
> if it is
> unmodified, and do not recreate it when the package is updated. That 
> way, the entire patch
> https://sources.debian.org/patches/mini-httpd/1.30-3/0003-fix-change-index-document-root/
> can be omitted and mini-httpd works as intended.

This is the solution I was considering as well; We're already shipping
the frugal default index.html which postinst is manually copying into /
var/www/html. Copying files like that in postinst is frowned upon,
anyway; package files, if possible, should be handled properly from the
beginning. I was thinking of removing 0003-fix-change-index-document-
root.patch all together; move the default index.html in the package
filesystem into /var/www/html/index.html and not recreating it if it's
dirty.

I find that an elegant solution to this problem. The only think we'd
break is any external scripts which would depend on index.mini-
httpd.html existing. I know of no such scripts, but other people's
packages might/might not complain. Maybe worth investigating.
This is a pretty important bug as it affects the version in stable,
too, not only sid/testing (1.30-3), so thanks for reporting, again !

If everything works as expected, I plan on releasing another update
1.30-6 the next week; I want to lump this bugfix together with some
general cleanup of the existing patches.

If you have any other questions/suggestions please reply to the bug.

Thanks !

Alexandru Mihail
mini-httpd maintainer


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to