# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= polkit VERSION= 124 KEYWORDS= sysutils VARIANTS= standard SDESC[standard]= Framework for access control to system components HOMEPAGE= https://www.freedesktop.org/wiki/Software/polkit/ CONTACT= Michael_Reim[kraileth@elderlinux.org] DOWNLOAD_GROUPS= main SITES[main]= https://gitlab.freedesktop.org/polkit/polkit/-/archive/124/ DISTFILE[1]= polkit-124.tar.gz:main DF_INDEX= 1 SPKGS[standard]= complete primary nls OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= docbook-xsl:primary:standard dbus:dev:standard duktape:dev:standard openpam:dev:standard BUILDRUN_DEPENDS= dbus:primary:standard openpam:primary:standard duktape:primary:standard USERS= polkitd GROUPS= polkitd USERGROUP_SPKG= primary USES= meson pkgconfig shebangfix expat solaris-funcs cpe GNOME_COMPONENTS= glib introspection libxslt intltool LICENSE= LGPL21+:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= LGPL21+:stock LICENSE_AWK= TERMS:"^$$" LICENSE_SOURCE= TERMS:{{WRKSRC}}/src/polkit/polkit.h LICENSE_SCHEME= solo CPE_VENDOR= polkit_project FPC_EQUIVALENT= sysutils/polkit MESON_ARGS= -Dauthfw=pam -Dpam_prefix={{LOCALBASE}}/etc/pam.d -Dos_type=netbsd -Dintrospection=true -Dtests=false -Dman=true -Dgtk_doc=false -Dpolkitd_user=polkitd -Dsession_tracking=ConsoleKit SHEBANG_FILES= {{WRKSRC}}/src/polkitbackend/toarray.pl SOL_FUNCTIONS= getline:src/polkitagent/polkitagenthelperprivate.c CFLAGS= -Wno-deprecated-declarations VAR_OPSYS[sunos]= LDFLAGS=-lintl post-install: ${MKDIR} ${STAGEDIR}/var/lib/polkit-1 ${MV} ${STAGEDIR}${PREFIX}/share/dbus-1/system.d/org.freedesktop.PolicyKit1.conf \ ${STAGEDIR}${PREFIX}/share/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample .for i in 10-vendor.d 20-org.d 30-site.d 50-local.d 90-mandatory.d ${MKDIR} ${STAGEDIR}${PREFIX}/share/polkit-1/localauthority/${i} ${MKDIR} ${STAGEDIR}/var/lib/polkit-1/localauthority/${i} .endfor # Disable system-d for now ${RM} -r ${STAGEDIR}${PREFIX}/share/dbus-1/system.d pre-configure: ${REINPLACE_CMD} -e 's|__DBPATH__|${PREFIX}/share/xsl/docbook/manpages|' \ ${WRKSRC}/docs/man/meson.build ${REINPLACE_CMD} -e 's|/usr/bin/|${PREFIX}/bin/|g' \ ${WRKSRC}/docs/man/pkexec.xml \ ${WRKSRC}/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \ ${WRKSRC}/docs/man/polkit.xml post-patch-sunos: ${REINPLACE_CMD} -e '/as-needed/ s/^.*$$/NOOP=1/' ${WRKSRC}/configure [FILE:300:descriptions/desc.primary] Polkit is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes. It is a framework for centralizing the decision making process with respect to granting access to privileged operations for unprivileged applications. [FILE:96:distinfo] 72457d96a0538fd03a3ca96a6bf9b7faf82184d4d67c793eb759168e4fd49e20 757829 polkit-124.tar.gz [FILE:2088:manifests/plist.primary] bin/ pkaction pkcheck @(root,,4755) bin/pkexec pkttyagent etc/pam.d/polkit-1 include/polkit-1/polkit/ polkit.h polkitactiondescription.h polkitauthority.h polkitauthorityfeatures.h polkitauthorizationresult.h polkitcheckauthorizationflags.h polkitdetails.h polkitenumtypes.h polkiterror.h polkitidentity.h polkitimplicitauthorization.h polkitpermission.h polkitprivate.h polkitsubject.h polkitsystembusname.h polkittemporaryauthorization.h polkittypes.h polkitunixgroup.h polkitunixnetgroup.h polkitunixprocess.h polkitunixsession.h polkitunixuser.h include/polkit-1/polkitagent/ polkitagent.h polkitagentenumtypes.h polkitagentlistener.h polkitagentsession.h polkitagenttextlistener.h polkitagenttypes.h lib/ libpolkit-agent-1.so libpolkit-agent-1.so.0 libpolkit-agent-1.so.0.0.0 libpolkit-gobject-1.so libpolkit-gobject-1.so.0 libpolkit-gobject-1.so.0.0.0 lib/girepository-1.0/ Polkit-1.0.typelib PolkitAgent-1.0.typelib lib/pkgconfig/ polkit-agent-1.pc polkit-gobject-1.pc @(root,,4755) lib/polkit-1/polkit-agent-helper-1 lib/polkit-1/polkitd share/dbus-1/system-services/org.freedesktop.PolicyKit1.service share/gettext/its/ polkit.its polkit.loc share/gir-1.0/ Polkit-1.0.gir PolkitAgent-1.0.gir share/man/man1/ pkaction.1.gz pkcheck.1.gz pkexec.1.gz pkttyagent.1.gz share/man/man8/ polkit.8.gz polkitd.8.gz share/polkit-1/policyconfig-1.dtd share/polkit-1/actions/org.freedesktop.policykit.policy share/polkit-1/rules.d/50-default.rules @dir /var/lib/polkit-1/localauthority/10-vendor.d @dir /var/lib/polkit-1/localauthority/20-org.d @dir /var/lib/polkit-1/localauthority/30-site.d @dir /var/lib/polkit-1/localauthority/50-local.d @dir /var/lib/polkit-1/localauthority/90-mandatory.d @dir etc/polkit-1/rules.d @dir share/polkit-1/localauthority/10-vendor.d @dir share/polkit-1/localauthority/20-org.d @dir share/polkit-1/localauthority/30-site.d @dir share/polkit-1/localauthority/50-local.d @dir share/polkit-1/localauthority/90-mandatory.d @postexec chown polkitd %D/share/polkit-1/rules.d && chmod 700 %D/share/polkit-1/rules.d [FILE:849:manifests/plist.nls] share/locale/cs/LC_MESSAGES/polkit-1.mo share/locale/da/LC_MESSAGES/polkit-1.mo share/locale/de/LC_MESSAGES/polkit-1.mo share/locale/hr/LC_MESSAGES/polkit-1.mo share/locale/hu/LC_MESSAGES/polkit-1.mo share/locale/id/LC_MESSAGES/polkit-1.mo share/locale/it/LC_MESSAGES/polkit-1.mo share/locale/ka/LC_MESSAGES/polkit-1.mo share/locale/nl/LC_MESSAGES/polkit-1.mo share/locale/nn/LC_MESSAGES/polkit-1.mo share/locale/pl/LC_MESSAGES/polkit-1.mo share/locale/pt/LC_MESSAGES/polkit-1.mo share/locale/pt_BR/LC_MESSAGES/polkit-1.mo share/locale/ro/LC_MESSAGES/polkit-1.mo share/locale/ru/LC_MESSAGES/polkit-1.mo share/locale/sk/LC_MESSAGES/polkit-1.mo share/locale/sv/LC_MESSAGES/polkit-1.mo share/locale/tr/LC_MESSAGES/polkit-1.mo share/locale/uk/LC_MESSAGES/polkit-1.mo share/locale/zh_CN/LC_MESSAGES/polkit-1.mo share/locale/zh_TW/LC_MESSAGES/polkit-1.mo [FILE:441:patches/patch-docs_man_meson.build] --- docs/man/meson.build.orig 2024-01-17 15:43:53 UTC +++ docs/man/meson.build @@ -5,8 +5,10 @@ xsltproc_cmd = [ xsltproc, '--output', '@OUTPUT@', '--nonet', + '--path', + '__DBPATH__', '--stringparam', 'man.base.url.for.relative.links', pk_api_docpath + '/', - 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl', + 'http://cdn.docbook.org/release/xsl/current/manpages/docbook.xsl', '@INPUT@', ] [FILE:692:patches/patch-src_polkit_polkitunixprocess.c] Fix SunOS includes. Fix pid_t type. --- src/polkit/polkitunixprocess.c.orig 2024-01-17 15:43:53 UTC +++ src/polkit/polkitunixprocess.c @@ -24,6 +24,11 @@ #endif #include +#ifdef HAVE_SOLARIS +#include +#include +#include +#endif #ifdef HAVE_FREEBSD #include #include @@ -179,7 +184,7 @@ enum static void subject_iface_init (PolkitSubjectIface *subject_iface); -static guint64 get_start_time_for_pid (gint pid, +static guint64 get_start_time_for_pid (pid_t pid, GError **error); #if defined(HAVE_FREEBSD) || defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) [FILE:330:patches/patch-src_polkitbackend_polkitbackendauthority.c] --- src/polkitbackend/polkitbackendauthority.c.orig 2024-01-17 15:43:53 UTC +++ src/polkitbackend/polkitbackendauthority.c @@ -25,6 +25,9 @@ #include #include #include +#ifdef HAVE_SOLARIS +#include +#endif #include #include [FILE:817:patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c] * for *BSD netgroup functions --- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2024-01-17 15:43:53 UTC +++ src/polkitbackend/polkitbackendinteractiveauthority.c @@ -26,8 +26,13 @@ #ifdef HAVE_NETGROUP_H #include #else +#if defined(__NetBSD__) +#include +#define BSD_NETGROUP +#else #include #endif +#endif #include #include #include @@ -2257,7 +2262,7 @@ get_users_in_net_group (PolkitIdentity #ifdef HAVE_SETNETGRENT name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group)); -# ifdef HAVE_SETNETGRENT_RETURN +# if defined(HAVE_SETNETGRENT_RETURN) && !defined(__NetBSD__) if (setnetgrent (name) == 0) { g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno)); [FILE:1137:patches/patch-src_polkitbackend_polkitbackendjsauthority.cpp] --- src/polkitbackend/polkitbackendjsauthority.cpp.orig 2024-01-17 15:43:53 UTC +++ src/polkitbackend/polkitbackendjsauthority.cpp @@ -40,6 +40,46 @@ #error "This code is not safe in SpiderMonkey exact stack rooting configurations" #endif +#ifdef __sun__ +int +getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) +{ + const struct group *grp; + int i, maxgroups, ngroups, ret; + + ret = 0; + ngroups = 0; + maxgroups = *grpcnt; + groups ? groups[ngroups++] = agroup : ngroups++; + if (maxgroups > 1) + groups ? groups[ngroups++] = agroup : ngroups++; + setgrent(); + while ((grp = getgrent()) != NULL) { + if (groups) { + for (i = 0; i < ngroups; i++) { + if (grp->gr_gid == groups[i]) + goto skip; + } + } + for (i = 0; grp->gr_mem[i]; i++) { + if (!strcmp(grp->gr_mem[i], uname)) { + if (ngroups >= maxgroups) { + ret = -1; + break; + } + groups ? groups[ngroups++] = grp->gr_gid : ngroups++; + break; + } + } +skip: + ; + } + endgrent(); + *grpcnt = ngroups; + return (ret); +} +#endif + /** * SECTION:polkitbackendjsauthority * @title: PolkitBackendJsAuthority [FILE:897:patches/patch-src_programs_pkexec.c] Avoid conflict with SunOS function. Provide solaris header for LOG_AUTHPRIV --- src/programs/pkexec.c.orig 2024-01-17 15:43:53 UTC +++ src/programs/pkexec.c @@ -45,6 +45,9 @@ #include #include +#ifdef HAVE_SOLARIS +#include +#endif #include #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE @@ -246,7 +249,7 @@ set_close_on_exec (gint fd, } static gboolean -fdwalk (FdCallback callback, +gfdwalk (FdCallback callback, gpointer user_data) { gint fd; @@ -950,7 +953,7 @@ main (int argc, char *argv[]) } /* set close_on_exec on all file descriptors except stdin, stdout, stderr */ - if (!fdwalk (set_close_on_exec, GINT_TO_POINTER (3))) + if (!gfdwalk (set_close_on_exec, GINT_TO_POINTER (3))) { g_printerr ("Error setting close-on-exec for file desriptors\n"); goto out;