Roger Leigh <rleigh@whinlatter.ukfsn.org> (05/08/2007): > The same considerations may also apply to the FreeBSD ports. It might > just build, but it might need some tweaking. Hi again. As discussed on IRC, the #error thing is quite strange. Either use #warning (used in my patch) or use some autotools magic to disable this file when not building on/for Linux. Another file contains a Linux-only syscall: setfsuid(). I might be mistaken, but every page I came across mentions it is Linux-only, and I didn't find any Unix-wide replacement. I guess I'll be corrected by another list subscriber if I'm wrong. Instead of putting #ifdef/#endif everywhere in this file, I defined a no-op when not on Linux. I guess that putting an autotools check for this function could be a good idea. At last, some files are not available after the install step, I commented them out in the install file. I believe you could handle them by dh_installing them conditionally from your debian/rules, depending on DEB_HOST_ARCH_OS being or not ``linux'', if it turns out that GNU/Hurd is lacking the same files. I attached both the patch and the build log once it is applied. I didn't do any runtime check, but I'll be pleased to do so if you describe what you want me to try. Cheers, -- Cyril Brulebois
diff -urN pam-0.99.7.1~/Linux-PAM/modules/pam_limits/pam_limits.c pam-0.99.7.1/Linux-PAM/modules/pam_limits/pam_limits.c
--- pam-0.99.7.1~/Linux-PAM/modules/pam_limits/pam_limits.c 2007-08-06 08:58:06.000000000 +0000
+++ pam-0.99.7.1/Linux-PAM/modules/pam_limits/pam_limits.c 2007-08-06 09:02:19.000000000 +0000
@@ -14,7 +14,7 @@
*/
#if !defined(linux) && !defined(__linux)
-#error THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!!
+#warning THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!!
#endif
#include "config.h"
diff -urN pam-0.99.7.1~/Linux-PAM/modules/pam_xauth/pam_xauth.c pam-0.99.7.1/Linux-PAM/modules/pam_xauth/pam_xauth.c
--- pam-0.99.7.1~/Linux-PAM/modules/pam_xauth/pam_xauth.c 2007-08-06 08:58:06.000000000 +0000
+++ pam-0.99.7.1/Linux-PAM/modules/pam_xauth/pam_xauth.c 2007-08-06 09:32:16.000000000 +0000
@@ -35,7 +35,12 @@
#include "config.h"
#include <sys/types.h>
-#include <sys/fsuid.h>
+#ifdef __linux__
+# include <sys/fsuid.h>
+#else
+# /* no-op */
+# define setfsuid(X) do {} while (0)
+#endif
#include <sys/wait.h>
#include <errno.h>
#include <fnmatch.h>
diff -urN pam-0.99.7.1~/debian/libpam-modules.install pam-0.99.7.1/debian/libpam-modules.install
--- pam-0.99.7.1~/debian/libpam-modules.install 2007-08-06 08:58:07.000000000 +0000
+++ pam-0.99.7.1/debian/libpam-modules.install 2007-08-06 09:27:47.000000000 +0000
@@ -1,8 +1,8 @@
debian/install/etc/security/access.conf etc/security
debian/install/etc/security/group.conf etc/security
debian/install/etc/security/limits.conf etc/security
-debian/install/etc/security/namespace.conf etc/security
-debian/install/etc/security/namespace.init etc/security
+#debian/install/etc/security/namespace.conf etc/security
+#debian/install/etc/security/namespace.init etc/security
debian/install/etc/security/pam_env.conf etc/security
debian/install/etc/security/time.conf etc/security
debian/install/lib/security/*.so lib/security
@@ -12,7 +12,7 @@
debian/install/usr/share/man/man5/access.conf.5 usr/share/man/man5
debian/install/usr/share/man/man5/group.conf.5 usr/share/man/man5
debian/install/usr/share/man/man5/limits.conf.5 usr/share/man/man5
-debian/install/usr/share/man/man5/namespace.conf.5 usr/share/man/man5
+#debian/install/usr/share/man/man5/namespace.conf.5 usr/share/man/man5
debian/install/usr/share/man/man5/pam_env.conf.5 usr/share/man/man5
debian/install/usr/share/man/man5/time.conf.5 usr/share/man/man5
debian/install/usr/share/man/man8/pam_access.8 usr/share/man/man8
@@ -26,7 +26,7 @@
debian/install/usr/share/man/man8/pam_ftp.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_group.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_issue.8 usr/share/man/man8
-debian/install/usr/share/man/man8/pam_keyinit.8 usr/share/man/man8
+#debian/install/usr/share/man/man8/pam_keyinit.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_lastlog.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_limits.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_listfile.8 usr/share/man/man8
@@ -35,13 +35,13 @@
debian/install/usr/share/man/man8/pam_mail.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_mkhomedir.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_motd.8 usr/share/man/man8
-debian/install/usr/share/man/man8/pam_namespace.8 usr/share/man/man8
+#debian/install/usr/share/man/man8/pam_namespace.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_nologin.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_permit.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_rhosts.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_rootok.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_securetty.8 usr/share/man/man8
-debian/install/usr/share/man/man8/pam_selinux.8 usr/share/man/man8
+#debian/install/usr/share/man/man8/pam_selinux.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_shells.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_succeed_if.8 usr/share/man/man8
debian/install/usr/share/man/man8/pam_tally.8 usr/share/man/man8
Attachment:
pam_0.99.7.1-1_kfreebsd-i386.build.bz2
Description: Binary data
Attachment:
pgpRzL4cAJSmE.pgp
Description: PGP signature