Re: [27772] trunk/dports/sysutils/logrotate/Portfile
Le 14 août 07 à 06:57, source_changes@macosforge.org a écrit :
Revision 27772 Author markd@macports.org Date 2007-08-13 21:57:36 -0700 (Mon, 13 Aug 2007) Log MessageMake port conform to mtree standards properly.Modified Paths trunk/dports/sysutils/logrotate/Portfile Diff <snip> + xinstall -d ${destroot}${prefix}/share/man/man8 + xinstall -m 755 ${worksrcpath}/logrotate.8 ${destroot}${prefix}/ share/man/man8 <snip> _______________________________________________ macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
By the way, manpage permissions should be 444, and as share/man/man8 is already in mtree, it is useless to install it beforehand. -- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
N_Ox <n.oxyde@gmail.com> writes:
+ xinstall -d ${destroot}${prefix}/share/man/man8 + xinstall -m 755 ${worksrcpath}/logrotate.8 ${destroot}${prefix}/ share/man/man8 <snip> _______________________________________________ macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
By the way, manpage permissions should be 444, and as share/man/man8 is already in mtree, it is useless to install it beforehand.
Ah thanks Anthony. I corrected that. I think that was the first port I ever did. But about creating directories, I'm confused about that. Question 1: I thought I had to create directories manually when copying my own destroot or pre- or post- destroot phases. If not, can it simply be omitted for the file specified in the MacPorts guide under "MacPorts File Hierarchy". That is the mtree, correct? I think I create directories in destroot for a lot of ports, and I thought others did too so I'm confused. Question 2: Are there other file permission standards to which we should be adhering? Can we state a standard for manpages, docs, executables, etc., when we install them manually? I can document this type of thing for posterity in the new guide. Mark
Le 14 août 07 à 18:13, markd@macports.org a écrit :
N_Ox <n.oxyde@gmail.com> writes:
+ xinstall -d ${destroot}${prefix}/share/man/man8 + xinstall -m 755 ${worksrcpath}/logrotate.8 ${destroot}${prefix}/ share/man/man8 <snip> _______________________________________________ macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
By the way, manpage permissions should be 444, and as share/man/man8 is already in mtree, it is useless to install it beforehand.
Ah thanks Anthony. I corrected that. I think that was the first port I ever did.
But about creating directories, I'm confused about that.
Question 1: I thought I had to create directories manually when copying my own destroot or pre- or post- destroot phases. If not, can it simply be omitted for the file specified in the MacPorts guide under "MacPorts File Hierarchy". That is the mtree, correct?
I think I create directories in destroot for a lot of ports, and I thought others did too so I'm confused.
Don't worry, I've just discovered that by mistake, I haven't created an mtree directory and xinstall didn't complain. I think they are created before the destroot stage and that these that remain empty after are deleted in destroot_finish.
Question 2: Are there other file permission standards to which we should be adhering? Can we state a standard for manpages, docs, executables, etc., when we install them manually?
I think there are only manpages. And other common things, like 0755 for executable and folders. This kind of thing.
I can document this type of thing for posterity in the new guide.
Mark
-- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
N_Ox <n.oxyde@gmail.com> writes:
Question 1: I thought I had to create directories manually when copying my own destroot or pre- or post- destroot phases. If not, can it simply be omitted for the file specified in the MacPorts guide under "MacPorts File Hierarchy". That is the mtree, correct?
I think I create directories in destroot for a lot of ports, and I thought others did too so I'm confused.
Don't worry, I've just discovered that by mistake, I haven't created an mtree directory and xinstall didn't complain. I think they are created before the destroot stage and that these that remain empty after are deleted in destroot_finish.
Okay, so the rule must be that you don't need to create directories manaually to put files in top-level mtree directories for destroot or post-destroot phases, otherwise yes. Mark
On Aug 14, 2007, at 7:15 PM, markd@macports.org wrote:
N_Ox <n.oxyde@gmail.com> writes:
Question 1: I thought I had to create directories manually when copying my own destroot or pre- or post- destroot phases. If not, can it simply be omitted for the file specified in the MacPorts guide under "MacPorts File Hierarchy". That is the mtree, correct?
I think I create directories in destroot for a lot of ports, and I thought others did too so I'm confused.
Don't worry, I've just discovered that by mistake, I haven't created an mtree directory and xinstall didn't complain. I think they are created before the destroot stage and that these that remain empty after are deleted in destroot_finish.
Okay, so the rule must be that you don't need to create directories manaually to put files in top-level mtree directories for destroot or post-destroot phases, otherwise yes.
Mark
There's the ${prefix}/etc/macports/prefix.mtree file and whatever is listed there is created by MacPorts itself during the pre-destroot stage as the installation bed for a destrooting port (destroot_start proc in base/src/port1.0/portdestroot.tcl [1]). Once the destroot stage is done, whatever directory in the destroot that's void of any files (that is, the destrooting port didn't place anything in them) gets pruned during the post-destroot closing stage. Therefore, anything else that's not in the default mtree needs to be created manually and anything you intend to keep for installation even if empty has to be safeguarded through a destroot.keepdirs clause. HTH! Ping me if not ;-) -jmpp [1]: $[juan @macbookpro: macports1.0](858/0,1) -> sudo find /opt/local - name macosx.mtree /opt/local/share/macports/resources/port1.0/install/macosx.mtree $[juan @macbookpro: macports1.0](859/0,1) -> sudo find /opt/local - name prefix.mtree /opt/local/etc/macports/prefix.mtree /opt/local/share/macports/resources/port1.0/install/prefix.mtree I wonder if we still use the mtree file installed in ${prefix}/etc/ macports/ for something? Anyone care to destroot a port after moving it aside and report any findings? (comparing to destrooting after moving the one in /opt/local/share/macports/resources/port1.0/ install/ aside would be ideal).
Juan Manuel Palacios <jmpp@macports.org> writes:
Question 1: I thought I had to create directories manually when copying my own destroot or pre- or post- destroot phases. If not, can it simply be omitted for the file specified in the MacPorts guide under "MacPorts File Hierarchy". That is the mtree, correct?
I think I create directories in destroot for a lot of ports, and I thought others did too so I'm confused.
Don't worry, I've just discovered that by mistake, I haven't created an mtree directory and xinstall didn't complain. I think they are created before the destroot stage and that these that remain empty after are deleted in destroot_finish.
Okay, so the rule must be that you don't need to create directories manaually to put files in top-level mtree directories for destroot or post-destroot phases, otherwise yes.
Mark
There's the ${prefix}/etc/macports/prefix.mtree file and whatever is listed there is created by MacPorts itself during the pre-destroot stage as the installation bed for a destrooting port (destroot_start proc in base/src/port1.0/portdestroot.tcl [1]). Once the destroot stage is done, whatever directory in the destroot that's void of any files (that is, the destrooting port didn't place anything in them) gets pruned during the post-destroot closing stage. Therefore, anything else that's not in the default mtree needs to be created manually and anything you intend to keep for installation even if empty has to be safeguarded through a destroot.keepdirs clause.
HTH! Ping me if not ;-)
Nice. I got it. More fodder for the new guide. Mark
Juan Manuel Palacios <jmpp@macports.org> writes:
$[juan @macbookpro: macports1.0](858/0,1) -> sudo find /opt/local - name macosx.mtree /opt/local/share/macports/resources/port1.0/install/macosx.mtree
$[juan @macbookpro: macports1.0](859/0,1) -> sudo find /opt/local - name prefix.mtree /opt/local/etc/macports/prefix.mtree /opt/local/share/macports/resources/port1.0/install/prefix.mtree
I wonder if we still use the mtree file installed in ${prefix}/etc/ macports/ for something? Anyone care to destroot a port after moving it aside and report any findings? (comparing to destrooting after moving the one in /opt/local/share/macports/resources/port1.0/ install/ aside would be ideal).
I don't recall anyone ever answering this, though I could be wrong. I am cleaning out my doc related email stuff and tried it. Here are the results: Move ${prefix}/etc/macports/prefix.mtree -> Result: ports destroot fine and still pass mtree checks Move ${prefix}/share/macports/resources/port1.0/install/prefix.mtree -> Result: ports fail to destroot with this message: "mtree: /opt/local/share/macports/resources/port1.0/install/prefix.mtree: No such file or directory" So I suppose we should remove ${prefix}/etc/macports/prefix.mtree since it is redundant and not needed anymore? Mark
Hi Mark! On Nov 12, 2007, at 12:58 PM, markd@macports.org wrote:
Juan Manuel Palacios <jmpp@macports.org> writes:
$[juan @macbookpro: macports1.0](858/0,1) -> sudo find /opt/local - name macosx.mtree /opt/local/share/macports/resources/port1.0/install/macosx.mtree
$[juan @macbookpro: macports1.0](859/0,1) -> sudo find /opt/local - name prefix.mtree /opt/local/etc/macports/prefix.mtree /opt/local/share/macports/resources/port1.0/install/prefix.mtree
I wonder if we still use the mtree file installed in ${prefix}/etc/ macports/ for something? Anyone care to destroot a port after moving it aside and report any findings? (comparing to destrooting after moving the one in /opt/local/share/macports/resources/port1.0/ install/ aside would be ideal).
I don't recall anyone ever answering this, though I could be wrong. I am cleaning out my doc related email stuff and tried it. Here are the results:
Move ${prefix}/etc/macports/prefix.mtree -> Result: ports destroot fine and still pass mtree checks
Move ${prefix}/share/macports/resources/port1.0/install/ prefix.mtree -> Result: ports fail to destroot with this message:
"mtree: /opt/local/share/macports/resources/port1.0/install/ prefix.mtree: No such file or directory"
So I suppose we should remove ${prefix}/etc/macports/prefix.mtree since it is redundant and not needed anymore?
Mark
I removed the installation of prefix.mtree from ${prefix}/etc/ macports a while ago, but thanks for the confirmation anyhow! Regards,.... -jmpp
participants (3)
-
Juan Manuel Palacios
-
markd@macports.org
-
N_Ox