Create databases/nss-pgsql package The NetBSD Project
Status: Closed Time to complete: 96 hrs Mentors: Aleksej Saushev Tags: sso, postgresql, pkgsrc, code

We don't have packaged PostgreSQL NSS module to keep users database in DBMS. It would be nice to have it to support single sign-on (SSO) services built around PostgreSQL DBMS.

Create a pkgsrc package for NSS module from http://pgfoundry.org/projects/sysauth/ (pkgsrc is NetBSD-originated portable framework for building software packages.)

Provide instructions how to test its functionality (smoke test).

 

It is possible that you run into blocking problem. Problem report that includes description of problem, step-by-step instructions to reproduce it, and explanation why it is considered blocking is accepted as successful task completion.

 

References

1. The pkgsrc Guide: http://www.netbsd.org/docs/pkgsrc/

2. pkgsrc targets for impatient: http://wiki.netbsd.org/pkgsrc/targets

3. Similar packages: databases/nss_ldap.

Uploaded Work
File name/URL File size Date submitted
nss-pgsql.tar.gz 5.0 KB December 15 2012 20:44 UTC
nss-pgsql.tar.gz 5.0 KB December 16 2012 04:08 UTC
nss-pgsql3.tar.gz 4.9 KB December 17 2012 01:31 UTC
nss-pgsql4.tar.gz 4.9 KB December 17 2012 22:18 UTC
nss-pgsql5.tar.gz 4.9 KB December 18 2012 00:18 UTC
Comments
Matthew on December 15 2012 17:59 UTC Task Claimed

I would like to work on this task.

Aleksej Saushev on December 15 2012 18:40 UTC Task Assigned

This task has been assigned to Matthew. You have 96 hours to complete this task, good luck!

Matthew on December 15 2012 20:44 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 15 2012 22:59 UTC Review

First of all, you should not set PKGREVISION for new packages.


Second, /usr/pkg is _not_ where pkgsrc installs packages. It may be deployed to install under /usr/local or any other directory.


Next, you shouldn't create symlinks from there. There's buildlink in order to do that. If it doesn't work, then you must be doing something wrong, most probably (and you do in fact).


Next, why do you request Fortran? Does the package contain any Fortran code?

Aleksej Saushev on December 15 2012 22:59 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Matthew on December 16 2012 04:08 UTC Thanks

I need to work on polishing up my work before I send it for review.


I was working off of nss-ldap which uses symlinks. I think my alternative works fine - maybe I could update nss-ldap for pkgsrc.


I forgot to fix the USE_LANGUAGES but now I see only c files used. The make comment said that I needed fortran and c++ but maybe only because of gmake.

Matthew on December 16 2012 04:08 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 16 2012 20:51 UTC Review

Hi!


This is better. There're some suggestions still.


1. Don't add "c" to USE_LANGUAGES, it is there already.


2. Please, group settings by stages. That is, don't mix CONFIGURE_ARGS with INSTALLATION_DIRS. Take a look at sample Makefile in "doc". CONF_FILES belong to installation, if that matters. If possible, avoid mixing variable settings and definition of additional targets. Try looking at other packages, if you want to know how it is done usually.


3. Remove unused CONFIGURE_ARGS, we have a lot of cruft in pkgsrc already, don't add more.


4. Add empty line to comments in patches, they should look like this:


# $NetBSD$


<empty line>


Commentary.


<empty line>


--- filename ...


+++ filename ...


...


5. You add netbsd.c to the module. From what I can see netbsd.c contains functions about LDAP. Are they really needed? Is this file needed at all?


6. Same about netbsd.h


 

Aleksej Saushev on December 16 2012 20:52 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Matthew on December 17 2012 01:36 UTC Fixes

I think I've corrected all the review problems.


For #5 and #6, it is required to run because certain functions are not provided by NetBSD's NSS. Without the files, the build will fail. However, I've removed any references to "ldap."


I definitely still have a lot to learn but I think I'm starting to get a hang of the PKGSRC style, and hopefully I'll be able to know the correct way to make packages.

Matthew on December 17 2012 01:37 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 17 2012 19:23 UTC Review

Hi!


First, you write:


CONFIGURE_ARGS+=    "--with-docdir=${DESTDIR}${PREFIX}/share/doc"


Quotation marks go out of style definitly. First, they are useless and don't fix what you intend. Consider DESTDIR containing quotation marks and spaces, e.g. <<something like" this>>. This breaks what you want to mitigate. This issue is really too complex, thus you shouldn't use quotation marks. Simply like that.


Second, usage of DESTDIR doesn't seem to be correct. Try dropping the whole DESTDIR reference here. By convention this variable should be set _only_ at installation stage.

Aleksej Saushev on December 17 2012 19:23 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Matthew on December 17 2012 22:18 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 17 2012 23:28 UTC Review

=> Checking file-check results for nss-pgsql-1.5.0b
ERROR: ************************************************************
ERROR: The following files are in /usr/pkg but not in the PLIST:
ERROR:         /tmp/local/nss-pgsql/work/.destdir/usr/pkg/share/doc/caution.png
ERROR:         /tmp/local/nss-pgsql/work/.destdir/usr/pkg/share/doc/nss-pgsql.html


?

Aleksej Saushev on December 17 2012 23:28 UTC Task Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Aleksej Saushev on December 17 2012 23:29 UTC Suggestion

I suggest that you set PKG_DEVELOPER in your mk.conf like


PKG_DEVELOPER=yes


 

Matthew on December 18 2012 00:18 UTC Ready for review

The work on this task is ready to be reviewed.

Aleksej Saushev on December 18 2012 07:49 UTC Final notes

Hi!


Your "pre-build" should be "post-extract" rather. Otherwise fine.


Thank you!

Aleksej Saushev on December 18 2012 07:49 UTC Task Closed

Congratulations, this task has been completed successfully.