linux-f10-nss_ldap: my first port - be gentle :)

Alexander Leidinger Alexander at Leidinger.net
Sat Jan 7 14:52:06 UTC 2012


On Sat, 07 Jan 2012 12:46:54 +1000 Da Rock
<freebsd-ports at herveybayaustralia.com.au> wrote:

> Ok, clean slate. Lets start afresh :)
> 
> First I need a way to test properly. Alex, you mention I need a ports 
> tree on the machine, and then you say to create a directory somewhere 
> and put Makefile in it and run make (as root). Does the directory
> need to be in the ports tree then?

The ports tree is needed to access bsd.*.mk and maybe some
dependencies. The directory where you test the makefile does not need
to be in the ports tree, but it can be in the ports tree.

> The rpm files extracted: is there anyway to distinguish which files
> are copied or is it simply put into LINUXBASE wholesale? I ask

It is copied completely. But you can delete whatever you want in
a post-extract target:
---snip---
post-extract:
	@${RM} ${WRKSRC}/subdir/file1 ${WRKSRC}/subdir/file2 
---snip---

> because the rpm in question contains pam libraries which are unneeded
> obviously as authentication is done by the "host"? system. I believe
> this could represent a bit of a security risk, but I suppose one
> could setup an option if wanted.
> And how does this affect PLIST?

You should add all the files which get installed into the plist.

> And by running make a port is normally built in the port's directory.
> In the case of a linux port it is only downloaded into the
> distfiles/. Is it extracted during make or make install though? I
> couldn't quite determine that categorically.

"make extract" will extract it. If you type make, "make extract" will
be executed automatically if needed.

> I've also changed the Makefile to use bsd.linux-rpm.mk instead of 
> bsd.port.mk.

That's wrong. bsd.port.mk is needed and includes bsd.linux-rpm.mk if
needed automatically.

> I have setup a pkg-descr file to be put in the directory.

> Hosting: I downloaded the rpm myself (including srpm), and I can host 
> them and maybe arrange for them to be hosted elsewhere as well. Can I 
> use MASTER_SITES to append/prepend? I also have to untangle the web
> of how to determine which file to download - argh hem! Sorry, fetch ;)

If they are not available from the default fedora 10 master site (and
most likely this will be the case), just MASTER_SITES to whatever site
contains the file. If it is only your site... maybe bad luck for your
bandwith. If they are available somewhere else, use a sensible default.

> if the linux-f10 base ports are obtained from the Fedora sites, then 
> what happens if f10 rpms are no longer available there?

They aren't anymore, we already have them on FreeBSD servers
("CRITICAL" is a shortcut for a set of the FreeBSD servers).

> And finally checksums: I create a checksum for the port, the linux
> sites have checksums, and I was advised in passing to check the
> checksums match. The checksums are going to differ aren't they? Linux
> and BSD checksums wouldn't be the same, surely?

The "make makesum" will generate the FreeBSD checksum, it is
ok/recommended to create the FreeBSD checksums this way. The advise you
got was to check if there is a checksum or cryptographic signature for
packages available, and to check them by hand (to verify that what you
got is really what it is supposed to be) before submitting a port.

If the checksums are generated the same way on FreeBSD as for the
upstream distfile, well, in this case the verification by hand is
simple, you just compare if the checksums are the same. If it is a
different checksum, you need to find a way to calculate the same
checksum on FreeBSD (bu you don't include it in the port), and then you
compare the checksums. That's all.

Bye,
Alexander.

-- 
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-ports mailing list