diff options
-rw-r--r-- | sysutils/accountsservice/Makefile | 8 | ||||
-rw-r--r-- | sysutils/accountsservice/distinfo | 4 | ||||
-rw-r--r-- | sysutils/accountsservice/files/patch-src_daemon.c | 71 | ||||
-rw-r--r-- | sysutils/accountsservice/files/patch-src_user.c | 56 | ||||
-rw-r--r-- | sysutils/accountsservice/files/patch-src_util.c | 11 | ||||
-rw-r--r-- | sysutils/accountsservice/pkg-plist | 39 |
6 files changed, 185 insertions, 4 deletions
diff --git a/sysutils/accountsservice/Makefile b/sysutils/accountsservice/Makefile index b5165822f..cacce1b87 100644 --- a/sysutils/accountsservice/Makefile +++ b/sysutils/accountsservice/Makefile @@ -6,9 +6,9 @@ # 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}/ MAINTAINER= kwm@FreeBSD.org COMMENT= D-Bus interface for user account query and manipulation @@ -26,4 +26,8 @@ USE_LDCONFIG= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" +post-patch: + @${REINPLACE_CMD} -e 's|/etc/gdm/custon.conf|${LOCALBASE}/etc/gdm/custom.conf|g' \ + ${WRKSRC}/src/daemon.c + .include <bsd.port.mk> diff --git a/sysutils/accountsservice/distinfo b/sysutils/accountsservice/distinfo index ce6f42749..9f593f0a0 100644 --- a/sysutils/accountsservice/distinfo +++ b/sysutils/accountsservice/distinfo @@ -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 diff --git a/sysutils/accountsservice/files/patch-src_daemon.c b/sysutils/accountsservice/files/patch-src_daemon.c new file mode 100644 index 000000000..984682068 --- /dev/null +++ b/sysutils/accountsservice/files/patch-src_daemon.c @@ -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) diff --git a/sysutils/accountsservice/files/patch-src_user.c b/sysutils/accountsservice/files/patch-src_user.c new file mode 100644 index 000000000..ed57c8c17 --- /dev/null +++ b/sysutils/accountsservice/files/patch-src_user.c @@ -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 <sys/wait.h> + #include <unistd.h> + #include <grp.h> ++#ifdef __FreeBSD__ ++#include <pwd.h> ++#else + #include <shadow.h> ++#endif + + #include <glib.h> + #include <glib/gi18n.h> +@@ -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; diff --git a/sysutils/accountsservice/files/patch-src_util.c b/sysutils/accountsservice/files/patch-src_util.c new file mode 100644 index 000000000..1281ab4e5 --- /dev/null +++ b/sysutils/accountsservice/files/patch-src_util.c @@ -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 <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> +-#include <wait.h> ++#include <sys/wait.h> + #include <grp.h> + + #include <syslog.h> diff --git a/sysutils/accountsservice/pkg-plist b/sysutils/accountsservice/pkg-plist index 3613bb832..9805dbcbf 100644 --- a/sysutils/accountsservice/pkg-plist +++ b/sysutils/accountsservice/pkg-plist @@ -13,7 +13,46 @@ share/dbus-1/interfaces/org.freedesktop.Accounts.User.xml share/dbus-1/interfaces/org.freedesktop.Accounts.xml share/dbus-1/system-services/org.freedesktop.Accounts.service share/gir-1.0/AccountsService-1.0.gir +share/locale/ar/LC_MESSAGES/accounts-service.mo +share/locale/bg_BG/LC_MESSAGES/accounts-service.mo +share/locale/bn_IN/LC_MESSAGES/accounts-service.mo +share/locale/ca/LC_MESSAGES/accounts-service.mo +share/locale/ca@valencia/LC_MESSAGES/accounts-service.mo +share/locale/cs/LC_MESSAGES/accounts-service.mo +share/locale/de/LC_MESSAGES/accounts-service.mo +share/locale/el/LC_MESSAGES/accounts-service.mo +share/locale/fa_IR/LC_MESSAGES/accounts-service.mo +share/locale/fr/LC_MESSAGES/accounts-service.mo +share/locale/ga/LC_MESSAGES/accounts-service.mo +share/locale/hi/LC_MESSAGES/accounts-service.mo +share/locale/hu/LC_MESSAGES/accounts-service.mo +share/locale/id/LC_MESSAGES/accounts-service.mo +share/locale/it/LC_MESSAGES/accounts-service.mo +share/locale/kk/LC_MESSAGES/accounts-service.mo +share/locale/ko/LC_MESSAGES/accounts-service.mo +share/locale/pa/LC_MESSAGES/accounts-service.mo share/locale/pl/LC_MESSAGES/accounts-service.mo +share/locale/ru/LC_MESSAGES/accounts-service.mo +share/locale/sk/LC_MESSAGES/accounts-service.mo +share/locale/sl/LC_MESSAGES/accounts-service.mo +share/locale/sr/LC_MESSAGES/accounts-service.mo +share/locale/sr@latin/LC_MESSAGES/accounts-service.mo +share/locale/sv/LC_MESSAGES/accounts-service.mo +share/locale/tr/LC_MESSAGES/accounts-service.mo +share/locale/uk/LC_MESSAGES/accounts-service.mo +share/locale/wa/LC_MESSAGES/accounts-service.mo +share/locale/zh_CN/LC_MESSAGES/accounts-service.mo +share/locale/zh_TW/LC_MESSAGES/accounts-service.mo share/polkit-1/actions/org.freedesktop.accounts.policy @dirrm include/accountsservice-1.0/act @dirrm include/accountsservice-1.0 +@dirrmtry share/locale/sr@latin/LC_MESSAGES +@dirrmtry share/locale/sr@latin +@dirrmtry share/locale/kk/LC_MESSAGES +@dirrmtry share/locale/kk +@dirrmtry share/locale/ca@valencia/LC_MESSAGES +@dirrmtry share/locale/ca@valencia +@dirrmtry share/locale/bn_IN/LC_MESSAGES +@dirrmtry share/locale/bn_IN +@dirrmtry share/locale/bg_BG/LC_MESSAGES +@dirrmtry share/locale/bg_BG |