On 19 January 2011 г. 19:39:47 Landry Breuil wrote:
> On Wed, Jan 19, 2011 at 03:53:00PM +0300, Vadim Zhukov wrote:
> > On 19 January 2011 ?. 11:18:12 Landry Breuil wrote:
> > > On Wed, Jan 19, 2011 at 06:04:17AM +0300, Vadim Zhukov wrote:
> > > > On 18 January 2011 ?. 22:09:53 Marco Peereboom wrote:
> > > > > anyone?
> > > >
> > > > Oops, there is packaging problem with .desktop file: pkg-subst replaces
> > > > TRUEPREFIX only in the beginning of line, so the file is actually
> > > > copied with ${TRUEPREFIX}/bin/xxxterm (and so) line itself. Updated
> > > > patch below.
> > >
> > > > - @${SUBST_CMD} -c ${WRKSRC}/xxxterm.desktop
> > > > ${PREFIX}/share/applications/xxxterm.desktop
> > > > - ${INSTALL_DATA} ${WRKSRC}/xxxterm.desktop
> > > > ${PREFIX}/share/applications/
> > > > - ${CHOWN} ${SHAREOWN}:${SHAREGRP}
> > > > $(PREFIX)/share/applications/xxxterm.desktop
> > > > + ${INSTALL_DATA} ${WRKSRC}/xxxterm.desktop
> > > > ${PREFIX}/share/applications/xxxterm.desktop
> > > > + ${SUBST_CMD} ${PREFIX}/share/applications/xxxterm.desktop
> > >
> > > It's more wrong. subst was done on the source file and was installed to
> > > prefix, then overwritten by the install_data just after.
> >
> > Yes.
> >
> > > you can also just use
> > > ${SUBST_CMD} -o ${SHAREOWN} -g ${SHAREGRP} -c ${WRKSRC}/xxxterm.desktop
> > > ${PREFIX}/share/applications/xxxterm.desktop
> > > instead of doing install+subst
> >
> > But then you have to do chown anyway, since SUBST_CMD does not support
> > "-m mode" switch. Is anyone supported in it, BTW?
>
> Why do you think you need -m mode here ? go read
> infrastructure/bin/pkg_subst, if the source file has the correct perms
> they will be carried on to the dest file. If it doesn't, well fix it
> upstream :)
Hm-m-m, and what if upstream (talking about common case, not xxxterm)
doesn't like those permissions? Say, they want a file to be 0644
initially? Or if they just don't want to re-roll source package while
next release is planned after a while?
From the other side, if we're talking about SUBST_CMD mimic install(1)
then why not implement -m too? This makes SUBST_CMD more predictable.
BTW, I looked over ports tree and found some inconsistency in Makefiles
doing chmod:
./books/JVMS/Makefile: ${CHMOD} -R ${DOCMODE} ${INSTALL_LOC}
./cad/fritzing/Makefile: chmod ${BINMODE} ${PREFIX}/bin/fritzing
./databases/pkglocatedb/Makefile: chmod ${BINMODE} ${PREFIX}/bin/pkglocate
./devel/gmake/Makefile: @chmod ${BINMODE} ${PREFIX}/bin/gmake
./devel/intellij/Makefile: @chmod ${BINMODE} ${PREFIX}/bin/idea
./devel/intellij/Makefile: @chmod ${SHAREMODE} \
./devel/netbeans/Makefile: @chmod ${BINMODE} ${PREFIX}/bin/netbeans
./games/xneko/Makefile: BINOWN=${BINOWN} BINMODE=${BINMODE}
./graphics/povray/Makefile: find ${PREFIX}/share/povray31 -type d | xargs
chmod ${DIRMODE}
./graphics/povray/Makefile: find ${PREFIX}/share/povray31 -type f | xargs
chmod ${SHAREMODE}
./net/cvsync/Makefile: INSTALL_MAN_OPTS="-o ${MANOWN} -g ${MANGRP} -m
${MANMODE}" \
./net/cvsync/Makefile: INSTALL_BIN_OPTS="-o ${BINOWN} -g ${BINGRP} -m
${BINMODE} ${INSTALL_STRIP}"
./net/samba/Makefile: xargs chmod ${SHAREMODE}
./net/samba/Makefile: xargs chmod ${DIRMODE}
./net/uucp/Makefile: @chmod ${BINMODE} ${PREFIX}/bin/cu
./mail/exmh2/Makefile: find ${PREFIX}/share/exmh -type d -print0 | xargs -0
chmod ${DIRMODE}
./mail/exmh2/Makefile: find ${PREFIX}/share/exmh -type f -print0 | xargs -0
chmod ${SHAREMODE}
./mail/mailscanner/files/Makefile: @-chmod -R ${BINMODE}
${PREFIX}/libexec/MailScanner 2>/dev/null
./mail/mailscanner/files/Makefile: @-chmod -R ${BINMODE}
${PREFIX}/share/MailScanner/reports
./mail/zarafa/zarafa/Makefile: chmod ${SHAREMODE}
${PREFIX}/share/examples/zarafa/zarafa.m4 \
./misc/mc/Makefile: xargs chmod ${SHAREMODE}
./misc/mc/Makefile: xargs chmod ${DIRMODE}
./print/cups/Makefile:FAKE_FLAGS= BINMODE=${BINMODE} \
./print/cups/Makefile: SHAREMODE=${SHAREMODE} \
./textproc/html/Makefile: @chmod ${SHAREMODE} `find ${INSTDIR} -type f`
./textproc/iso8879/Makefile: @chmod ${SHAREMODE}
${PREFIX}/share/sgml/iso8879/*
./textproc/linuxdoc/files/Makefile: -m ${SHAREMODE} ${FILES} ${INSTDIR}
./textproc/sp/Makefile: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
find: ./lost+found: Доступ запрещен
./www/wwwcount/Makefile: xargs chmod ${SHAREMODE}
./www/wwwcount/Makefile: xargs chmod ${BINMODE}
./www/xxxterm/Makefile: ${SUBST_CMD} -c -o ${SHAREOWN} -g ${SHAREGRP} -m
${SHAREMODE} \
Should this inconsistency be fixed? I assume, it should be "${CHMOD}"
everywhere, not "chmod", "@chmod" or "@${CHMOD}"?
--
Best wishes,
Vadim Zhukov
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?