Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jun 2008 23:24:40 +0200 (CEST)
From:      Tobias Rehbein <tobias.rehbein@web.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/124594: [patch] www/nanoblogger regression: wrong file modes
Message-ID:  <200806142124.m5ELOeYg047436@sushi.pseudo.local>
Resent-Message-ID: <200806142130.m5ELU78m054288@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         124594
>Category:       ports
>Synopsis:       [patch] www/nanoblogger regression: wrong file modes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 14 21:30:06 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Tobias Rehbein
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD sushi.pseudo.local 7.0-STABLE FreeBSD 7.0-STABLE #8: Wed Jun 11 22:18:31 CEST 2008 tobi@sushi.pseudo.local:/usr/obj/usr/src/sys/SUSHI i386


	
>Description:
	My last submission regarding this port introduced a regression which went unnoticed. I introduced the usage of the COPYTREE_SHARE macro. This macro sets file modes which are not suitable for the default data directory which is used as the sekeleton for new blogs. The problem is that the files must be writable.

This means new users will not be able to create new working blogs. This went unnoticed as I tested in an existing blog. I just noticed this issue as I am currently working on the porting of nanoblogger 3.4 and test a broader variety of test cases.

>How-To-Repeat:
	Install www/nanoblogger and create a new blog. Writing entries for this blog will not be possible.
>Fix:
	Switch to the old behaviour for the default data directory. See attached patch.

Anyway it's not good to have writable files in /usr/share/nanoblogger. I will file a bug report upstream to change the file modes accordingly after copying the files into the actual blog directory.

--- patch.txt begins here ---
diff -ruN www/nanoblogger.orig/Makefile www/nanoblogger/Makefile
--- www/nanoblogger.orig/Makefile	2008-06-14 01:33:10.000000000 +0200
+++ www/nanoblogger/Makefile	2008-06-14 23:06:51.000000000 +0200
@@ -30,11 +30,13 @@
 	${INSTALL_SCRIPT} ${WRKSRC}/nb ${PREFIX}/bin
 	${INSTALL_DATA} ${WRKSRC}/nb.conf ${PREFIX}/etc/nb.conf.sample
 	${MKDIR} ${DATADIR}
-.for data in default lang lib moods plugins
+.for data in lang lib moods plugins
 	${MKDIR} ${DATADIR}/${data} && \
 		( cd ${WRKSRC}/${data} && \
 			${COPYTREE_SHARE} \* ${DATADIR}/${data} "! -name *.orig ! -name *.bak" )
 .endfor
+	${MKDIR} ${DATADIR}/default && \
+		${CP} -R ${WRKSRC}/default ${DATADIR}/
 	${CP} ${WRKSRC}/welcome-to-nb.txt ${DATADIR}
 
 post-install:
--- patch.txt ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806142124.m5ELOeYg047436>