? sysutils/accountsservice/diff ? sysutils/accountsservice/work Index: sysutils/accountsservice/Makefile =================================================================== RCS file: /space/cvs/marcuscom-cvs/ports/sysutils/accountsservice/Makefile,v retrieving revision 1.1 diff -a -u -r1.1 Makefile --- sysutils/accountsservice/Makefile 11 Mar 2011 12:04:34 -0000 1.1 +++ sysutils/accountsservice/Makefile 27 Mar 2011 18:47:12 -0000 @@ -6,9 +6,10 @@ # PORTNAME= accountsservice -PORTVERSION= 0.6.5 +PORTVERSION= 0.6.7 CATEGORIES= sysutils devel -MASTER_SITES= LOCAL/kwm +MASTER_SITES= http://www.freedesktop.org/software/${PORTNAME}/ +# mezz says: http://www.freedesktop.org/software/accountsservice/ MAINTAINER= kwm@FreeBSD.org COMMENT= D-Bus interface for user account query and manipulation @@ -26,4 +27,9 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" +# mezz says: +post-patch: + @${REINPLACE_CMD} -e 's|/etc/gdm/custon.conf|${LOCALBASE}/etc/gdm/custom.conf|g' \ + ${WRKSRC}/src/daemon.c + .include Index: sysutils/accountsservice/distinfo =================================================================== RCS file: /space/cvs/marcuscom-cvs/ports/sysutils/accountsservice/distinfo,v retrieving revision 1.1 diff -a -u -r1.1 distinfo --- sysutils/accountsservice/distinfo 11 Mar 2011 12:04:34 -0000 1.1 +++ sysutils/accountsservice/distinfo 27 Mar 2011 18:47:12 -0000 @@ -1,2 +1,2 @@ -SHA256 (accountsservice-0.6.5.tar.bz2) = 12a85e50f791fcc22a1dba777ceaafc42da2a0eaebee58b66f5a8e2e4e152214 -SIZE (accountsservice-0.6.5.tar.bz2) = 304839 +SHA256 (accountsservice-0.6.7.tar.bz2) = 06d1d4d9875edcaec365545adb0ade792a56b8541ff968a36f47e5403cf3596d +SIZE (accountsservice-0.6.7.tar.bz2) = 339271 Index: sysutils/accountsservice/files/patch-src_daemon.c =================================================================== RCS file: sysutils/accountsservice/files/patch-src_daemon.c diff -N sysutils/accountsservice/files/patch-src_daemon.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/accountsservice/files/patch-src_daemon.c 27 Mar 2011 18:47:12 -0000 @@ -0,0 +1,71 @@ +--- src/daemon.c.orig 2011-03-27 20:15:46.000000000 +0200 ++++ src/daemon.c 2011-03-27 20:25:07.000000000 +0200 +@@ -50,6 +50,9 @@ + #define PATH_SHADOW "/etc/shadow" + #define PATH_LOGIN_DEFS "/etc/login.defs" + ++#ifdef __FreeBSD__ ++#define FALLBACK_MINIMAL_UID 1000 ++#endif + #ifndef FALLBACK_MINIMAL_UID + #define FALLBACK_MINIMAL_UID 500 + #endif +@@ -482,16 +485,24 @@ reload_passwd (Daemon *daemon) + old_users = NULL; + new_users = NULL; + ++#ifdef __FreeBSD__ ++ setpwent(); ++#else + errno = 0; + fp = fopen (PATH_PASSWD, "r"); + if (fp == NULL) { + g_warning ("Unable to open %s: %s", PATH_PASSWD, g_strerror (errno)); + goto out; + } ++#endif + g_hash_table_foreach (daemon->priv->users, listify_hash_values_hfunc, &old_users); + g_slist_foreach (old_users, (GFunc) g_object_ref, NULL); + ++#ifdef __FreeBSD__ ++ for (pwent = getpwent (); pwent != NULL; pwent = getpwent ()) { ++#else + for (pwent = fgetpwent (fp); pwent != NULL; pwent = fgetpwent (fp)) { ++#endif + /* Skip users below MINIMAL_UID... */ + if (user_is_excluded (daemon, pwent->pw_name, pwent->pw_uid)) { + g_debug ("skipping user: %s", pwent->pw_name); +@@ -544,7 +555,11 @@ reload_passwd (Daemon *daemon) + out: + /* Cleanup */ + ++#ifdef __FreeBSD__ ++ endpwent (); ++#else + fclose (fp); ++#endif + + g_slist_foreach (new_users, (GFunc) g_object_thaw_notify, NULL); + g_slist_foreach (new_users, (GFunc) g_object_unref, NULL); +@@ -664,6 +679,13 @@ on_passwd_monitor_changed (GFileMonitor + reload_users (daemon); + } + ++#ifdef __FreeBSD__ ++static uid_t ++get_minimal_uid (void) ++{ ++ return FALLBACK_MINIMAL_UID; ++} ++#else + static uid_t + get_minimal_uid (void) + { +@@ -716,6 +738,7 @@ out: + g_free (contents); + return uid; + } ++#endif + + static void + daemon_init (Daemon *daemon) Index: sysutils/accountsservice/files/patch-src_user.c =================================================================== RCS file: sysutils/accountsservice/files/patch-src_user.c diff -N sysutils/accountsservice/files/patch-src_user.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/accountsservice/files/patch-src_user.c 27 Mar 2011 18:47:12 -0000 @@ -0,0 +1,56 @@ +--- src/user.c.orig 2011-03-27 20:27:40.000000000 +0200 ++++ src/user.c 2011-03-27 20:34:18.000000000 +0200 +@@ -29,7 +29,11 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + + #include + #include +@@ -447,7 +451,11 @@ void + user_local_update_from_pwent (User *user, + struct passwd *pwent) + { ++#ifdef __FreeBSD__ ++ struct passwd *spent; ++#else + struct spwd *spent; ++#endif + gchar *real_name; + gboolean changed; + const gchar *passwd; +@@ -538,9 +546,15 @@ user_local_update_from_pwent (User + } + + passwd = pwent->pw_passwd; ++#ifdef __FreeBSD__ ++ spent = getpwnam (pwent->pw_name); ++ if (spent) ++ passwd = spent->pw_passwd; ++#else + spent = getspnam (pwent->pw_name); + if (spent) + passwd = spent->sp_pwdp; ++#endif + + if (passwd && passwd[0] == '!') { + locked = TRUE; +@@ -562,11 +576,13 @@ user_local_update_from_pwent (User + mode = PASSWORD_MODE_REGULAR; + } + ++#ifndef __FreeBSD__ + if (spent) { + if (spent->sp_lstchg == 0) { + mode = PASSWORD_MODE_SET_AT_LOGIN; + } + } ++#endif + + if (user->password_mode != mode) { + user->password_mode = mode; Index: sysutils/accountsservice/files/patch-src_util.c =================================================================== RCS file: sysutils/accountsservice/files/patch-src_util.c diff -N sysutils/accountsservice/files/patch-src_util.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/accountsservice/files/patch-src_util.c 27 Mar 2011 18:47:12 -0000 @@ -0,0 +1,11 @@ +--- src/util.c.orig 2011-03-27 20:32:32.000000000 +0200 ++++ src/util.c 2011-03-27 20:32:54.000000000 +0200 +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include