SUNWconsolekit.spec revision 19170
13629N/A#
13629N/A# spec file for package SUNWconsolekit
13629N/A#
13629N/A# includes module(s): ConsoleKit
13629N/A#
13629N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
13629N/A# This file and all modifications and additions to the pristine
13629N/A# package are under the same license as the package itself.
13629N/A#
13629N/A%define owner halton
13629N/A#
13629N/A%include Solaris.inc
15240N/A
13629N/A# Option to decide whether or not build library pam_ck_connector,
13629N/A# which implements pam_sm_open_session(3PAM) and pam_sm_close_session(3PAM).
13629N/A# By default, we don't build it.
13629N/A#
14461N/A# Note: To enable this pam module, you have to manually add
13629N/A# an entry to /etc/pam.conf after installing SUNWconsolekit-pam,
13629N/A# like this.
13629N/A# "login session required pam_ck_connector.so debug"
14461N/A#
15240N/A%define build_pam_module 1
15240N/A
15240N/A%use ck = ConsoleKit.spec
15240N/A
15242N/AName: SUNWconsolekit
15242N/ASummary: Framework for tracking users, login sessions, and seats.
15279N/AVersion: %{ck.version}
15279N/ASUNW_Pkg: SUNWconsolekit
15279N/AIPS_package_name: library/xdg/consolekit
15279N/AMeta(info.classification): %{classification_prefix}:Desktop (GNOME)/Sessions
14461N/ASUNW_BaseDir: %{_basedir}
13629N/ASUNW_Copyright: %{name}.copyright
13629N/ALicense: %{ck.license}
13629N/ABuildRoot: %{_tmppath}/%{name}-%{version}-build
13629N/ASource: %{name}-manpages-0.1.tar.gz
13629N/ASource1: consolekit.xml
13629N/A
13629N/A%include default-depend.inc
13629N/A%include gnome-consolidation.inc
13629N/A
13629N/ARequires: SUNWglib2
13629N/ARequires: SUNWdbus-libs
13629N/ARequires: SUNWdbus-glib
13629N/ABuildRequires: SUNWglib2-devel
13629N/ABuildRequires: SUNWdbus-devel
13629N/ABuildRequires: SUNWdbus-glib-devel
13629N/ABuildRequires: SUNWxorg-headers
13629N/A
13629N/A%package root
13629N/ASummary: %{summary} - / filesystem
13629N/ASUNW_BaseDir: /
13629N/A%include default-depend.inc
15242N/A%include gnome-consolidation.inc
15240N/A
15242N/A%package devel
15279N/ASummary: %{summary} - development files
15279N/ASUNW_BaseDir: %{_basedir}
13629N/A%include default-depend.inc
13629N/A%include gnome-consolidation.inc
13629N/ARequires: %name
13629N/A
13629N/A%if %build_pam_module
13629N/A%package pam
13629N/ASummary: %{summary} - PAM module to register simple text logins.
13629N/AIPS_package_name: library/security/pam/module/pam-consolekit
13629N/AMeta(info.classification): %{classification_prefix}:Desktop (GNOME)/Sessions
13629N/ASUNW_BaseDir: %{_basedir}
13629N/A%include default-depend.inc
13629N/A%include gnome-consolidation.inc
13629N/ARequires: %name
13629N/A%endif
13629N/A
13629N/A%prep
13629N/Arm -rf %name-%version
13629N/Amkdir %name-%version
13629N/A%ck.prep -d %name-%version
13629N/Acd %{_builddir}/%name-%version
13629N/Agzcat %SOURCE0 | tar xf -
14461N/A
13629N/A%build
13629N/A# FIXME: remove -D_POSIX_PTHREAD_SEMANTICS when not use CBE 1.6x
13629N/Aexport CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS"
13629N/Aexport RPM_OPT_FLAGS="$CFLAGS"
13629N/Aexport LDFLAGS="%_ldflags"
13629N/A
13629N/A%ck.build -d %name-%version
13629N/A
15240N/A%install
15240N/Arm -rf $RPM_BUILD_ROOT
15240N/A%ck.install -d %name-%version
13629N/A
13629N/A# Port the man8 file to SGML and add back the below "rm".
13629N/A#rm -rf $RPM_BUILD_ROOT%{_mandir}
13629N/Acd %{_builddir}/%name-%version/sun-manpages
13629N/Amake install DESTDIR=$RPM_BUILD_ROOT
13629N/A
13629N/A# These programs are intended to be used if you want ConsoleKit to be
13629N/A# like utmp/wtmp and log system start/restart/stop events. There are
13629N/A# no plans to support using ConsoleKit like utmp/wtmp, so do not
13629N/A# install these for now.
13629N/A#
13629N/Arm $RPM_BUILD_ROOT/%{_sbindir}/ck-log-system-start
13629N/Arm $RPM_BUILD_ROOT/%{_sbindir}/ck-log-system-restart
15279N/Arm $RPM_BUILD_ROOT/%{_sbindir}/ck-log-system-stop
15279N/A
15279N/Ainstall -d $RPM_BUILD_ROOT/lib/svc/manifest/system
15242N/Ainstall --mode=0444 %SOURCE1 $RPM_BUILD_ROOT/lib/svc/manifest/system
15242N/A
15242N/A%clean
15240N/Arm -rf $RPM_BUILD_ROOT
15240N/A
15240N/A%pre root
15240N/A#!/bin/sh
15240N/A#
14461N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
14461N/A# Use is subject to license terms.
14461N/A#
14185N/A
14185N/A# Presence of this temp file will tell postinstall script
14157N/A# that the consolekit service is already installed, in which case
14157N/A# the current service state will be preserved, be it enabled
13920N/A# or disabled.
13920N/Arm -f $PKG_INSTALL_ROOT/var/consolekit_installed.tmp > /dev/null 2>&1
13764N/A
13764N/Aif [ -f $PKG_INSTALL_ROOT/lib/svc/manifest/system/consolekit.xml ]; then
13629N/A touch $PKG_INSTALL_ROOT/var/consolekit_installed.tmp
13630N/Afi
13630N/A
13630N/Aexit 0
13629N/A
13629N/A%post root
#!/bin/sh
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Preinstall script will create this file if consolekit service was
# already installed, in which case we preserve current service state,
# be it enabled or disabled.
if [ -f $PKG_INSTALL_ROOT/var/consolekit_installed.tmp ]; then
rm -f $PKG_INSTALL_ROOT/var/consolekit_installed.tmp
else
# enable consolekit:
# - PKG_INSTALL_ROOT is / or empty when installing onto a live system
# and we can invoke svcadm directly;
# - otherwise it's upgrade, so we append to the upgrade script
if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
if [ `/sbin/zonename` = global ]; then
/usr/sbin/svcadm enable -r svc:/system/consolekit:default
fi
else
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.