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