Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: A suggestion to ports maintainers (PATCH INCLUDED)

From: Dan Weeks <danimal(at)danimal.org>
Date: Wed Apr 09 2003 - 10:21:55 EDT

>>>>> "LC" == "Leandro Costa" :
LC> I've been having a look at the ports tree, and i've found some files
LC> that contain non-POSIX compliant chown commands. If i were you, i would
LC> modify them.

Next time it might be nice if you include a patch to do what you suggest. It doesn't take that long and it makes your words much nicer.

LC> audio/soundtracker/patches/patch-app_Makefile_in LC> graphics/wmphoto/patches/patch-wmphoto_Makefile

these files don't need a patch for this, they are removing the chown operations from the source.

LC> misc/amanda/pkg/INSTALL

you missed misc/amanda/pkg/MESSAGE and misc/amanda/pkg/MESSAGE-client, by the way.

here is a patch that, from the original list and a quick search of the ports tree, corrects the chown usage. feedback is appreciated as are smackdowns.

-dan

------------%< snip %<----------------------%< snip %<------------

--- audio/rplay/pkg/INSTALL.orig	Wed Apr  9 09:49:47 2003
+++ audio/rplay/pkg/INSTALL	Wed Apr  9 09:50:05 2003

@@ -21,10 +21,10 @@ do_install()

 {
     install -d -o root -g wheel -m 755 $CONFIG_DIR
     echo localhost > $CONFIG_DIR/rplay.hosts
- chown root.wheel $CONFIG_DIR/rplay.hosts + chown root:wheel $CONFIG_DIR/rplay.hosts
     chmod 644 $CONFIG_DIR/rplay.hosts
     touch $CONFIG_DIR/rplay.{conf,helpers,servers}
- chown root.wheel $CONFIG_DIR/rplay.{conf,helpers,servers} + chown root:wheel $CONFIG_DIR/rplay.{conf,helpers,servers}
     chmod 644 $CONFIG_DIR/rplay.{conf,helpers,servers}
     echo
     echo "+---------------"
--- comms/hylafax/Makefile.orig	Wed Apr  9 09:50:32 2003
+++ comms/hylafax/Makefile	Wed Apr  9 09:51:02 2003

@@ -42,7 +42,7 @@ FAKE_FLAGS= ROOT=${WRKINST} ${DESTDIRNAM
SUID_EXES= ${PREFIX}/sbin/faxgetty ${PREFIX}/sbin/faxq \ ${PREFIX}/bin/faxrm ${PREFIX}/bin/faxalter post-install: - @chown uucp.dialer ${SUID_EXES} + @chown uucp:dialer ${SUID_EXES} @chmod a=rx,u+s ${SUID_EXES} ${INSTALL_DATA} ${FILESDIR}/hylafax.sh.sample ${PREFIX}/lib/fax --- devel/libgtop/pkg/INSTALL.orig Wed Apr 9 09:51:02 2003 +++ devel/libgtop/pkg/INSTALL Wed Apr 9 09:51:12 2003

@@ -7,7 +7,7 @@
 PREFIX=${PKG_PREFIX:-/usr/local}  
Do you need help?X

 do_post() {
- chown root.kmem ${PREFIX}/bin/libgtop_server + chown root:kmem ${PREFIX}/bin/libgtop_server

     chmod 2755 ${PREFIX}/bin/libgtop_server
     install-info --section="Programming \& development tools" \
 		 --entry="* libgtop: (libgtop).  libgtop programming manual" \
--- emulators/redhat/base/Makefile.orig	Wed Apr  9 09:51:12 2003
+++ emulators/redhat/base/Makefile	Wed Apr  9 09:51:58 2003

@@ -81,6 +81,6 @@ post-install:
@find ${PREFIX} -perm -4000 -exec chmod u-s {} \; # Fix ownerships - @find ${PREFIX} -user 5041 -exec chown -h root.wheel {} \; + @find ${PREFIX} -user 5041 -exec chown -h root:wheel {} \;
Do you need more help?X
.include --- games/angband/pkg/INSTALL.orig Wed Apr 9 09:51:58 2003 +++ games/angband/pkg/INSTALL Wed Apr 9 09:52:10 2003
@@ -19,7 +19,7 @@ do_install()
install -m 775 -d $SCORE_DIR/save install -m 775 -d $SCORE_DIR/data install -m 775 -d $SCORE_DIR/bone

- chown -R root.games $SCORE_DIR
+ chown -R root:games $SCORE_DIR
 }  

 # verify proper execution

--- games/connect4/pkg/INSTALL.orig	Wed Apr  9 09:52:10 2003
+++ games/connect4/pkg/INSTALL	Wed Apr  9 09:52:21 2003

@@ -15,7 +15,7 @@ SCORE_FILE=/var/games/connect4.scores
 do_install()
 {

     touch $SCORE_FILE
- chown root.games $SCORE_FILE
+ chown root:games $SCORE_FILE

     chmod 664 $SCORE_FILE
 }  

  • games/dopewars/pkg/INSTALL.orig Wed Apr 9 09:52:21 2003 +++ games/dopewars/pkg/INSTALL Wed Apr 9 09:52:30 2003
    @@ -10,7 +10,7 @@ SCORE_FILE=/var/games/dopewars.sco
    do_install_scorefile() { touch $SCORE_FILE - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE $PREFIX/bin/dopewars -C $SCORE_FILE rm -f $SCORE_FILE.bak
  • games/gtkballs/pkg/INSTALL.orig Wed Apr 9 09:52:30 2003 +++ games/gtkballs/pkg/INSTALL Wed Apr 9 09:52:45 2003
    @@ -28,7 +28,7 @@ do_notice()
    do_install() { touch $SCORE_FILE - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE }
  • games/icebreaker/pkg/INSTALL.orig Wed Apr 9 09:52:45 2003 +++ games/icebreaker/pkg/INSTALL Wed Apr 9 09:52:59 2003
    @@ -29,10 +29,10 @@ do_notice()
    do_install() { mkdir $SCORE_DIR - chown root.games $SCORE_DIR + chown root:games $SCORE_DIR touch $SCORE_FILE chmod 775 $SCORE_DIR - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE }
  • games/lbreakout2/pkg/INSTALL.orig Wed Apr 9 09:52:59 2003 +++ games/lbreakout2/pkg/INSTALL Wed Apr 9 09:53:10 2003
    @@ -29,7 +29,7 @@ do_notice()
    do_install() { cp $SAMPLE_FILE $SCORE_FILE - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE }
  • games/moria/pkg/INSTALL.orig Wed Apr 9 09:53:10 2003 +++ games/moria/pkg/INSTALL Wed Apr 9 09:53:17 2003
    @@ -17,7 +17,7 @@ do_install()
    { install -m 775 -d $SCORE_DIR touch $SCORE_FILE - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE }
  • games/xpat2/pkg/INSTALL.orig Wed Apr 9 09:53:17 2003 +++ games/xpat2/pkg/INSTALL Wed Apr 9 09:53:55 2003
    @@ -28,7 +28,7 @@ do_notice()
    do_install() { touch $SCORE_FILE - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE }
  • games/xsoldier/pkg/INSTALL.orig Wed Apr 9 09:53:55 2003 +++ games/xsoldier/pkg/INSTALL Wed Apr 9 09:54:09 2003
    @@ -28,7 +28,7 @@ do_notice()
    do_install() { touch $SCORE_FILE - chown root.games $SCORE_FILE + chown root:games $SCORE_FILE chmod 664 $SCORE_FILE }
  • games/zangband/pkg/INSTALL.orig Wed Apr 9 09:54:09 2003 +++ games/zangband/pkg/INSTALL Wed Apr 9 09:54:18 2003
    @@ -20,7 +20,7 @@ do_install()
    install -m 775 -d $SCORE_DIR/data install -m 775 -d $SCORE_DIR/bone cp $PREFIX/share/zangband/apex/* $SCORE_DIR/apex - chown -R root.games $SCORE_DIR + chown -R root:games $SCORE_DIR }

 # verify proper execution

--- graphics/libungif/Makefile.orig	Wed Apr  9 09:54:18 2003
+++ graphics/libungif/Makefile	Wed Apr  9 09:55:00 2003

@@ -38,7 +38,7 @@ post-install:
ln -sf $$f $$g; \ done && \ sed -e s#libungif#libgif#g libungif.la > libgif.la && \ - chown root.bin libgif.la && \ + chown root:bin libgif.la && \ chmod 755 libgif.la ${INSTALL_DATA_DIR} ${DOCSDIR} cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${DOCSDIR} --- japanese/Wnn/Makefile.orig Wed Apr 9 09:55:00 2003 +++ japanese/Wnn/Makefile Wed Apr 9 09:55:15 2003
@@ -151,12 +151,12 @@ post-install:
${INSTALL_DATA_DIR} ${PORT_JDOCDIR} @(cd ${JDOC_FROM}; tar cf - manual manual.en | \ (cd ${PORT_JDOCDIR}; tar xf -)) - @chown -R ${SHAREOWN}.${SHAREGRP} ${PORT_JDOCDIR} + @chown -R ${SHAREOWN}:${SHAREGRP} ${PORT_JDOCDIR} .if ${MULTI_PACKAGES:M-zh} ${INSTALL_DATA_DIR} ${PORT_CDOCDIR} @(cd ${CDOC_FROM}; tar cf - manual manual.en | \ (cd ${PORT_CDOCDIR}; tar xf -)) - @chown -R ${SHAREOWN}.${SHAREGRP} ${PORT_CDOCDIR} + @chown -R ${SHAREOWN}:${SHAREGRP} ${PORT_CDOCDIR} .endif ${INSTALL_DATA_DIR} ${PREFIX}/lib/wnn ${INSTALL_DATA} ${WRKDIST}/Wnn/jd/sysV/cvt_key* ${PREFIX}/lib/wnn --- japanese/kinput2/Makefile.orig Wed Apr 9 09:55:15 2003 +++ japanese/kinput2/Makefile Wed Apr 9 09:55:23 2003
@@ -49,6 +49,6 @@ post-install:
cp ${WRKSRC}/NEWS ${PORT_DOCDIR} @(cd ${WRKSRC}/doc; tar -cf - . | \
Can we help you?X
(cd ${PORT_DOCDIR}; tar -xf -)) - @chown -R ${SHAREOWN}.${SHAREGRP} ${PORT_DOCDIR} + @chown -R ${SHAREOWN}:${SHAREGRP} ${PORT_DOCDIR} .include --- mail/exmh2/Makefile.orig Wed Apr 9 09:55:23 2003 +++ mail/exmh2/Makefile Wed Apr 9 09:55:33 2003
@@ -35,7 +35,7 @@ do-install:
cp -r ${WRKSRC}/lib/. ${PREFIX}/share/exmh cd ${PREFIX}/share && echo 'auto_mkindex exmh'\ | ${LOCALBASE}/bin/tclsh8.3 - chown -R ${SHAREOWN}.${SHAREGRP} ${PREFIX}/share/exmh + chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/exmh find ${PREFIX}/share/exmh -type d | xargs chmod ${DIRMODE} find ${PREFIX}/share/exmh -type f | xargs chmod ${SHAREMODE} --- mail/majordomo/pkg/INSTALL.orig Wed Apr 9 09:55:33 2003 +++ mail/majordomo/pkg/INSTALL Wed Apr 9 09:56:19 2003
@@ -40,14 +40,14 @@ do_create_local_dirs()
mkdir /var/spool/majordomo/tmp chmod 750 /var/spool/majordomo/tmp

   fi
- chown -R majordom.majordom /var/spool/majordomo + chown -R majordom:majordom /var/spool/majordomo

   echo "ok"
 }  

 do_set_file_permissions()
 {
   echo -n "Changing ownership of majordomo files... "

-  chown -R majordom.majordom ${PREFIX}/lib/majordomo
+  chown -R majordom:majordom ${PREFIX}/lib/majordomo
   chmod -R 755 ${PREFIX}/lib/majordomo

   echo "ok"
   echo -n "Making wrapper suid & guid majordom... "
--- mail/mixmaster/pkg/INSTALL.orig	Wed Apr  9 09:55:42 2003
+++ mail/mixmaster/pkg/INSTALL	Wed Apr  9 09:56:32 2003

@@ -107,7 +107,7 @@ case $2 in
;; POST-INSTALL) : install config files, see below - chown mixmaster.mixmaster $MIXMASTER_BIN + chown mixmaster:mixmaster $MIXMASTER_BIN chmod 4550 $MIXMASTER_BIN do_install exit 0 --- misc/amanda/pkg/INSTALL.orig Wed Apr 9 09:56:32 2003 +++ misc/amanda/pkg/INSTALL Wed Apr 9 09:56:50 2003

@@ -51,7 +51,7 @@ do_configuration()

 do_var()
 {
     mkdir -p /var/amanda/gnutar-lists
-    chown -R operator.operator /var/amanda
+    chown -R operator:operator /var/amanda
 }  

 # create the needed /etc/amandates file if it does not exist
@@ -60,7 +60,7 @@ do_var()

 do_amandates()
 {

Can't find what you're looking for?X

     touch /etc/amandates
- chown operator.operator /etc/amandates + chown operator:operator /etc/amandates  }  

 case $2 in

--- misc/amanda/pkg/MESSAGE.orig	Wed Apr  9 09:56:50 2003
+++ misc/amanda/pkg/MESSAGE	Wed Apr  9 09:57:01 2003
Don't know where to look next?X

@@ -16,5 +16,5 @@
  • The permissions of /operator/.amandahosts must be restricted: **
  • chmod u=rw /operator/.amandahosts -** chown operator.operator /operator/.amandahosts +** chown operator:operator /operator/.amandahosts ** --- misc/amanda/pkg/MESSAGE-client.orig Wed Apr 9 09:57:01 2003 +++ misc/amanda/pkg/MESSAGE-client Wed Apr 9 09:57:11 2003
    @@ -16,5 +16,5 @@
  • The permissions of /operator/.amandahosts must be restricted: **
  • chmod u=rw /operator/.amandahosts -** chown operator.operator /operator/.amandahosts +** chown operator:operator /operator/.amandahosts ** --- misc/xgas/Makefile.orig Wed Apr 9 09:57:11 2003 +++ misc/xgas/Makefile Wed Apr 9 09:57:21 2003
    @@ -19,6 +19,6 @@ NO_REGRESS= Yes

 post-install:

 	@chmod 755 ${PREFIX}/bin/xgas
-	@chown bin.bin ${PREFIX}/bin/xgas
+	@chown bin:bin ${PREFIX}/bin/xgas
 
 .include 
--- net/samba/stable/Makefile.orig	Wed Apr  9 09:57:21 2003
+++ net/samba/stable/Makefile	Wed Apr  9 09:57:35 2003

@@ -77,7 +77,7 @@ post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/samba/textdocs ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/samba @cp -R ${WRKSRC}/../examples/* ${PREFIX}/share/examples/samba - @chown -R root.bin ${PREFIX}/share/examples/samba + @chown -R root:bin ${PREFIX}/share/examples/samba ${INSTALL_DATA} ${FILESDIR}/README.OpenBSD ${PREFIX}/share/doc/samba @for i in ${SAMBA_DOCS}; do \ ${INSTALL_DATA} $$i ${PREFIX}/share/doc/samba ; \
@@ -95,7 +95,7 @@ post-install:
${WRKSRC}/../examples/smb.conf.default > ${SAMPLE_CONFIG} ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh ${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/script/convert_smbpasswd ${PREFIX}/bin - @chown root.bin ${PREFIX}/bin/smbpasswd + @chown root:bin ${PREFIX}/bin/smbpasswd @chmod 111 ${PREFIX}/bin/smbpasswd .include --- news/cnews/Makefile.orig Wed Apr 9 09:57:35 2003 +++ news/cnews/Makefile Wed Apr 9 09:57:57 2003
@@ -38,8 +38,8 @@ do-install:
mkdir -p ${NEWSSPOOL} -ln -s ${NEWSSPOOL} /var/news mkdir -p ${NEWSBIN} ${NEWSLIB} - chown news.news ${NEWSSPOOL} ${NEWSLIB} - chown bin.bin ${NEWSBIN} + chown news:news ${NEWSSPOOL} ${NEWSLIB} + chown bin:bin ${NEWSBIN} cd ${WRKSRC}; \ echo ${MAKE} ${MAKE_FLAGS} -f ${MAKE_FILE} install | \ su -m bin
@@ -49,7 +49,7 @@ do-install:
cd ${WRKSRC}; \ echo ${MAKE} ${MAKE_FLAGS} -f ${MAKE_FILE} ui readpostcheck | \ su -m bin - chown news.news ${NEWSBIN}/input/newsspool + chown news:news ${NEWSBIN}/input/newsspool chmod 6755 ${NEWSBIN}/input/newsspool
Confused? Frustrated?X
install -c -o bin -g bin -m 444 ${WRKSRC}/man/*.1* ${MANDIR}/man1 install -c -o bin -g bin -m 444 ${WRKSRC}/man/*.5* ${MANDIR}/man5 --- textproc/html/Makefile.orig Wed Apr 9 09:57:57 2003 +++ textproc/html/Makefile Wed Apr 9 09:58:06 2003

@@ -25,6 +25,6 @@ pre-install:

 do-install:
 	@zcat ${FULLDISTDIR}/${DISTFILES} |(cd ${INSTDIR}; pax -r)
 	@chmod ${SHAREMODE} `find ${INSTDIR} -type f`
-	@/usr/sbin/chown -R ${SHAREOWN}.${SHAREGRP} ${INSTDIR}
+	@/usr/sbin/chown -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
 
 .include 
--- textproc/iso8879/Makefile.orig	Wed Apr  9 09:58:06 2003
+++ textproc/iso8879/Makefile	Wed Apr  9 09:58:16 2003

@@ -27,6 +27,6 @@ do-install:
${INSTALL_DATA} ${WRKDIR}/ISO* ${PREFIX}/share/sgml/iso8879 ${INSTALL_DATA} ${FILESDIR}/catalog ${PREFIX}/share/sgml/iso8879 @chmod ${SHAREMODE} ${PREFIX}/share/sgml/iso8879/* - @chown -R ${SHAREOWN}.${SHAREGRP} ${PREFIX}/share/sgml/iso8879 + @chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/sgml/iso8879

 .include <bsd.port.mk> Received on Wed Apr 9 10:23:55 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:44:13 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library