SUNWconsolekit.spec revision 18671
10139N/A#
10139N/A# spec file for package SUNWconsolekit
10139N/A#
10139N/A# includes module(s): ConsoleKit
10139N/A#
11321N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
10139N/A# This file and all modifications and additions to the pristine
10139N/A# package are under the same license as the package itself.
10139N/A#
17185N/A%define owner halton
10139N/A#
10139N/A%include Solaris.inc
11321N/A
11321N/A# Option to decide whether or not build library pam_ck_connector,
11321N/A# which implements pam_sm_open_session(3PAM) and pam_sm_close_session(3PAM).
11321N/A# By default, we don't build it.
11321N/A#
11321N/A# Note: To enable this pam module, you have to manually add
11321N/A# an entry to /etc/pam.conf after installing SUNWconsolekit-pam,
11321N/A# like this.
11321N/A# "login session required pam_ck_connector.so debug"
11321N/A#
11321N/A%define build_pam_module 1
11321N/A
10139N/A%use ck = ConsoleKit.spec
10139N/A
10139N/AName: SUNWconsolekit
11321N/ASummary: Framework for tracking users, login sessions, and seats.
10139N/AVersion: %{ck.version}
18688N/ASUNW_Pkg: SUNWconsolekit
18688N/AIPS_package_name: library/xdg/consolekit
10139N/ASUNW_BaseDir: %{_basedir}
10139N/ASUNW_Copyright: %{name}.copyright
10139N/ABuildRoot: %{_tmppath}/%{name}-%{version}-build
10139N/ASource: %{name}-manpages-0.1.tar.gz
12738N/ASource1: consolekit.xml
10139N/A
10139N/A%include default-depend.inc
10139N/A
16401N/ARequires: SUNWglib2
10139N/ARequires: SUNWdbus-libs
10139N/ARequires: SUNWdbus-glib
13433N/ABuildRequires: SUNWglib2-devel
16075N/ABuildRequires: SUNWdbus-devel
16401N/ABuildRequires: SUNWdbus-glib-devel
10139N/ABuildRequires: SUNWxorg-headers
10139N/A
13433N/A%package root
10139N/ASummary: %{summary} - / filesystem
10139N/ASUNW_BaseDir: /
10139N/A%include default-depend.inc
16075N/A
11330N/A%package devel
11330N/ASummary: %{summary} - development files
11330N/ASUNW_BaseDir: %{_basedir}
11330N/A%include default-depend.inc
10139N/ARequires: %name
10139N/A
10139N/A%if %build_pam_module
10139N/A%package pam
10139N/ASummary: %{summary} - PAM module to register simple text logins.
10139N/AIPS_package_name: library/security/pam/module/pam-consolekit
10139N/ASUNW_BaseDir: %{_basedir}
10139N/A%include default-depend.inc
10139N/ARequires: %name
10139N/A%endif
10139N/A
16401N/A%prep
10139N/Arm -rf %name-%version
10139N/Amkdir %name-%version
16401N/A%ck.prep -d %name-%version
10139N/Acd %{_builddir}/%name-%version
10139N/Agzcat %SOURCE0 | tar xf -
10139N/A
10139N/A%build
10139N/A# FIXME: remove -D_POSIX_PTHREAD_SEMANTICS when not use CBE 1.6x
10139N/Aexport CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS"
10139N/Aexport RPM_OPT_FLAGS="$CFLAGS"
10139N/Aexport LDFLAGS="%_ldflags"
10139N/A
10139N/A%ck.build -d %name-%version
10139N/A
10139N/A%install
10139N/Arm -rf $RPM_BUILD_ROOT
10139N/A%ck.install -d %name-%version
11321N/A
11321N/A# Port the man8 file to SGML and add back the below "rm".
11321N/A#rm -rf $RPM_BUILD_ROOT%{_mandir}
11321N/Acd %{_builddir}/%name-%version/sun-manpages
11321N/Amake install DESTDIR=$RPM_BUILD_ROOT
11321N/A
11321N/A# These programs are intended to be used if you want ConsoleKit to be
11321N/A# like utmp/wtmp and log system start/restart/stop events. There are
11321N/A# no plans to support using ConsoleKit like utmp/wtmp, so do not
11321N/A# install these for now.
11321N/A#
11321N/Arm $RPM_BUILD_ROOT/%{_sbindir}/ck-log-system-start
11321N/Arm $RPM_BUILD_ROOT/%{_sbindir}/ck-log-system-restart
10139N/Arm $RPM_BUILD_ROOT/%{_sbindir}/ck-log-system-stop
10139N/A
10139N/Ainstall -d $RPM_BUILD_ROOT/lib/svc/manifest/system
10139N/Ainstall --mode=0444 %SOURCE1 $RPM_BUILD_ROOT/lib/svc/manifest/system
10139N/A
10139N/A%clean
10139N/Arm -rf $RPM_BUILD_ROOT
10139N/A
10537N/A%pre root
10139N/A#!/bin/sh
11321N/A#
11321N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
11458N/A# Use is subject to license terms.
11321N/A#
11458N/A
11321N/A# Presence of this temp file will tell postinstall script
10139N/A# that the consolekit service is already installed, in which case
11321N/A# the current service state will be preserved, be it enabled
18814N/A# or disabled.
11321N/Arm -f $PKG_INSTALL_ROOT/var/consolekit_installed.tmp > /dev/null 2>&1
18814N/A
11321N/Aif [ -f $PKG_INSTALL_ROOT/lib/svc/manifest/system/consolekit.xml ]; then
11321N/A touch $PKG_INSTALL_ROOT/var/consolekit_installed.tmp
10139N/Afi
11321N/A
11321N/Aexit 0
10139N/A
13948N/A%post root
13948N/A#!/bin/sh
11321N/A#
11458N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
11321N/A# Use is subject to license terms.
11458N/A#
11321N/A
18814N/A# Preinstall script will create this file if consolekit service was
11321N/A# already installed, in which case we preserve current service state,
18814N/A# be it enabled or disabled.
10139N/Aif [ -f $PKG_INSTALL_ROOT/var/consolekit_installed.tmp ]; then
11321N/A rm -f $PKG_INSTALL_ROOT/var/consolekit_installed.tmp
11321N/Aelse
11321N/A # enable consolekit:
10139N/A # - PKG_INSTALL_ROOT is / or empty when installing onto a live system
10139N/A # and we can invoke svcadm directly;
11321N/A # - otherwise it's upgrade, so we append to the upgrade script
11321N/A if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
11321N/A if [ `/sbin/zonename` = global ]; then
11321N/A /usr/sbin/svcadm enable -r svc:/system/consolekit:default
11321N/A fi
11321N/A else
11321N/A cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<-EOF
11321N/A if [ \`/sbin/zonename\` = global ]; then
11321N/A /usr/sbin/svcadm enable -r svc:/system/consolekit:default
11321N/A fi
11321N/AEOF
11321N/A fi
10139N/Afi
10139N/A
10139N/Aexit 0
10139N/A
10139N/A%files
10139N/A%doc -d ConsoleKit-%{ck.version} README AUTHORS
10139N/A%doc(bzip2) -d ConsoleKit-%{ck.version} COPYING NEWS
11321N/A%dir %attr (0755, root, other) %{_datadir}/doc
11321N/A%defattr (-, root, bin)
11321N/A%{_bindir}/*
11321N/A%{_sbindir}/*
10139N/A%{_libdir}/lib*.so*
10139N/A%{_libdir}/ConsoleKit
10139N/A%{_libexecdir}/ck-collect-session-info
10139N/A%{_libexecdir}/ck-get-x11-server-pid
10139N/A%{_libexecdir}/ck-get-x11-display-device
10139N/A%dir %attr (0755, root, sys) %{_datadir}
10139N/A%{_datadir}/dbus-1
10139N/A%dir %attr(0755, root, bin) %{_mandir}
10139N/A%dir %attr(0755, root, bin) %{_mandir}/man1
10139N/A%dir %attr(0755, root, bin) %{_mandir}/man1m
10139N/A%{_mandir}/man1/*
13842N/A%{_mandir}/man1m/*
10139N/A
10139N/A%files root
14246N/A%defattr (-, root, sys)
14246N/A%{_sysconfdir}/ConsoleKit
14246N/A%dir %attr (0755, root, bin) %{_sysconfdir}/dbus-1
14246N/A%dir %attr (0755, root, bin) %{_sysconfdir}/dbus-1/system.d
14246N/A%{_sysconfdir}/dbus-1/system.d/ConsoleKit.conf
14246N/A# SVC method file
14246N/A%dir %attr (0755, root, bin) /lib
14246N/A%dir %attr (0755, root, bin) /lib/svc
14246N/A%dir %attr (0755, root, sys) /lib/svc/manifest
14246N/A%dir %attr (0755, root, sys) /lib/svc/manifest/system
14246N/A%attr (0444, root, sys) /lib/svc/manifest/system/consolekit.xml
14246N/A%dir %attr (0755, root, sys) %dir %{_localstatedir}
14246N/A%dir %attr (0755, root, sys) %{_localstatedir}/log
14246N/A%dir %attr (0755, root, root) %{_localstatedir}/log/ConsoleKit
14246N/A
14246N/A%files devel
14246N/A%defattr (-, root, bin)
14404N/A%{_includedir}/*
14404N/A%dir %attr (0755, root, other) %{_libdir}/pkgconfig
10139N/A%{_libdir}/pkgconfig/*
10139N/A
10139N/A%if %build_pam_module
10139N/A%files pam
10139N/A%defattr (-, root, bin)
10139N/A%{_libdir}/security/pam*.so*
10139N/A%dir %attr (0755, root, sys) %{_datadir}
10139N/A%{_mandir}/man8/*
10139N/A%endif
10139N/A
10139N/A%changelog
10139N/A* Fri Apr 23 2010 - halton.huo@sun.com
10139N/A- Move manifest from /var/svc to /lib/svc
10139N/A* Fri Oct 23 2009 - brian.cameron@sun.com
10139N/A- Add BuildRequires: SUNWxorg-headers
10139N/A* Fri Oct 23 2009 - brian.cameron@sun.com
10139N/A- Add manpages.
10139N/A* Tue Aug 18 2009 - halton.huo@sun.com
10139N/A- Enable pam module.
10139N/A* Thu Jul 30 2009 - halton.huo@sun.com
10139N/A- Add %pre and %post for -root pkg.
10139N/A* Mon Jul 27 2009 - halton.huo@sun.com
10139N/A- Move from SFE and spilit base part to ConsoleKit.spec
10139N/A* Thu Jul 23 2009 - halton.huo@sun.com
10139N/A- Bump to 0.3.1
10139N/A- Remove upstreamed patch: emptystruct.diff, pam.diff, solaris-getpwnamr.diff
10139N/A and reorder rest
10139N/A- Add patch dev-console.diff to change owner of /dev/console for console login
10139N/A* Tue Jun 23 2009 - halton.huo@sun.com
10139N/A- Add copyright
10139N/A* Wed Apr 08 2009 - halton.huo@sun.com
10139N/A- Add patch8: solaris-getpwnamr.diff to fix bug #22361
10139N/A* Wed Apr 08 2009 - halton.huo@sun.com
10139N/A- Add patch5: add-sunray-type.diff to add Sunray for display-typs.conf.in
10139N/A- Add patch6: dynamic-tty.diff to add --tty for ck-dynaminc
10139N/A- Add patch7: solaris-vtdaemon.diff to check vtdaemon service code for Solaris
10139N/A* Thu Mar 26 2009 - halton.huo@sun.com
10139N/A- Add all files under etc/ConsoleKit/ to %files root
10139N/A* Sat Feb 07 2009 - brian.cameron@sun.com
10139N/A- Package should not install anything to /var/run.
10139N/A* Tue Dec 30 2008 - halton.huo@sun.com
10139N/A- Add patch ck-dynamic.diff to fix bug #19333
10139N/A* Tue Oct 21 2008 - halton.huo@sun.com
10139N/A- Add standard patch comment
10139N/A* Thu Aug 07 2008 - brian.cameron@sun.com
10139N/A- Bump to 0.3.0.
10139N/A* Tue Jun 24 2008 - simon.zheng@sun.com
10139N/A- Add patch 05-getcurrentsession.diff for freedesktop bug #15866.
10139N/A* Tue Mar 11 2008 - brian.cameron@sun.com
10139N/A- Minor cleanup
10139N/A* Tue Mar 04 2008 - simon.zheng@sun.com
10139N/A- Add patch 04-ck-history.diff to fix crash.
10139N/A* Sat Mar 01 2008 - simon.zheng@sun.com
10139N/A- Add patch 03-pam.diff to build pam module library
10139N/A pam-ck-connector that registers text login session into
10139N/A ConsoleKit. And this library is packed as a separate
10139N/A package called SFEconsolekit-pam.
10139N/A* Mon Feb 25 2008 - brian.cameron@sun.com
10139N/A- Bump release to 0.2.10. Worked with the maintainer to get seven
10139N/A recent patches upstream.
10139N/A* Mon Feb 25 2008 - simon.zheng@sun.com
10139N/A- Rework ConsoleKit-06-fixvt.diff for better macro definition.
10139N/A* Fri Feb 22 2008 - brian.cameron@sun.com
10139N/A- Add the patch ConsoleKit-05-devname.diff that Simon wrote, patch
10139N/A ConsoleKit-06-fixvt.diff so that patch 4 builds properly when you
10139N/A do not have VT installed, patch ConsoleKit-07-fixactiveconsole.diff
10139N/A so that Active device is set to "/dev/console" when not using VT,
10139N/A ConsoleKit-08-fixseat.diff to correct a crash due to a NULL string
10139N/A in a printf, and ConsoleKit-09-novt.diff to fix ConsoleKit so that
10139N/A it sets x11-display-device to "/dev/console" when not using
10139N/A VT.
10139N/A* Tue Feb 19 2008 - simon.zheng@sun.com
10139N/A- Add patch ConsoleKit-04-vt.diff. Use sysnchronous event notification
10139N/A in STREAMS to monitor VT activation.
10139N/A* Fri Feb 15 2008 - brian.cameron@sun.com
10139N/A- Rework ConsoleKit-03-paths.diff so it makes better use of #ifdefs.
10139N/A* Fri Feb 15 2008 - simon.zheng@sun.com
10139N/A- Bump to 0.2.9. Add ConsoleKit-03-noheaderpaths.diff because there's not
18814N/A header paths.h on Solaris.
18814N/A* Thu Feb 07 2008 - Brian.Cameron@sun.com
18814N/A- Add /var/log/ConsoleKit/history file to packaging.
18814N/A* Thu Jan 31 2008 - Brian.Cameron@sun.com
16075N/A- Bump to 0.2.7. Remove two upstream patches added on January 25,
16075N/A 2007.
14303N/A* Fri Jan 25 2008 - Brian.Cameron@sun.com
14303N/A- Bump to 0.2.6. Rework patches. Add patch ConsoleKit-02-RBAC.diff
14246N/A to make ConsoleKit use RBAC instead of PolicyKit on Solaris.
14246N/A Patch ConsoleKit-03-fixbugs.diff fixes some bugs I found.
13948N/A* Tue Sep 18 2007 - Brian.Cameron@sun.com
13948N/A- Bump to 0.2.3. Remove upstream ConsoleKit-01-head.diff
13948N/A patch and add ConsoleKit-02-fixsolaris.diff to fix some
13433N/A issues building ConsoleKit when VT is not present.
13438N/A* Mon Aug 16 2007 - Brian.Cameron@sun.com
13438N/A- Created.
13438N/A