LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File schroot.spec of Package schroot (Project home:nereusuj:schroot)

#
# spec file for package schroot
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Frank Lichtenheld <frank@lichtenheld.de>
# Copyright (c) 2013 Tejas Guruswamy <tejas.guruswamy@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           schroot
Version:        1.6.5
Release:        0
Summary:        Execute commands in a chroot environment
License:        GPL-3.0+
Group:          Development/Tools/Other
Url:            https://alioth.debian.org/projects/buildd-tools/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Requires(pre):  xz
Requires(post): permissions

BuildRequires:  boost-devel
BuildRequires:  btrfsprogs
BuildRequires:  e2fsprogs-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  libcppunit-devel
BuildRequires:  libuuid-devel
BuildRequires:  lockdev-devel
BuildRequires:  lvm2
BuildRequires:  pam-devel
BuildRequires:  pkg-config

Recommends:     btrfsprogs
Recommends:     lvm2

Source0:        http://ftp.de.debian.org/debian/pool/main/s/schroot/%{name}_%{version}.orig.tar.xz
Source1:        schroot.permissions
Source2:        schroot.permissions.paranoid
Source99:       schroot.rpmlintrc

Patch1:         schroot-susecompat.patch
Patch2:         schroot-pkgconfig-version.patch

%description
schroot allows users to execute commands or interactive shells in
different chroots. Any number of named chroots may be created, and
access permissions given to each, including root access for normal
users, on a per-user or per-group basis. Additionally, schroot can
switch to a different user in the chroot, using PAM for
authentication and authorisation. All operations are logged for
security.

Several different types of chroot are supported, including normal
directories in the filesystem, and also block devices. Sessions,
persistent chroots created on the fly from files (tar with optional
compression and zip) and LVM snapshots are also supported.

schroot supports kernel personalities, allowing the programs run
inside the chroot to have a different personality. For example,
running 32-bit chroots on 64-bit systems, or even running binaries
from alternative operating systems such as SVR4 or Xenix.

schroot also integrates with sbuild, to allow building packages
with all supported chroot types, including session-managed chroot
types such as LVM snapshots.

%package -n libsbuild-devel
Summary:        Development files for the Debian source builder
Group:          Development/Tools/Other
Requires:       boost-devel
Requires:       libuuid-devel
Requires:       lockdev-devel
Requires:       pam-devel
Requires:       pkg-config

%description -n libsbuild-devel
sbuild provides facilities to manage and access chroots, as part of
schroot.

schroot allows users to execute commands or interactive shells in
different chroots. Any number of named chroots may be created, and
access permissions given to each, including root access for normal
users, on a per-user or per-group basis. Additionally, schroot can
switch to a different user in the chroot, using PAM for
authentication and authorisation. All operations are logged for
security.

This package contains the header files and static library needed to
develop applications which make use of sbuild. Once the API and ABI
are stable, a shared library will replace the static library.

%prep
%setup -q
%patch1
%patch2

%build
CFLAGS="%{optflags} -fPIE"; export CFLAGS
CXXFLAGS="%{optflags} -fPIE"; export CXXFLAGS
LDFLAGS="-pie"; export LDFLAGS
%configure --enable-uuid --enable-lvm-snapshot
make %{?_smp_mflags}

%install
%make_install

install -D -m 644 %{SOURCE1} "%{buildroot}%{_sysconfdir}/permissions.d/%{name}"
install -D -m 644 %{SOURCE2} "%{buildroot}%{_sysconfdir}/permissions.d/%{name}.paranoid"
rm %{buildroot}%{_bindir}/schroot-sbuild

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
%if 0%{?set_permissions:1}
%set_permissions %{_bindir}/schroot
%else
%run_permissions
%endif

%verifyscript
%verify_permissions -e %{_bindir}/schroot

%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog HACKING NEWS README THANKS TODO
%config %{_sysconfdir}/bash_completion.d/schroot
%config %{_sysconfdir}/pam.d/schroot
%config %{_sysconfdir}/permissions.d/schroot
%config %{_sysconfdir}/permissions.d/schroot.paranoid
%config(noreplace) %{_sysconfdir}/schroot
%verify(not mode) %attr(4755,root,root) %{_bindir}/schroot
#%#exclude %#{_bindir}/schroot-sbuild
%exclude %{_sysconfdir}/schroot/setup.d/15binfmt
%{_libexecdir}/schroot
%{_localstatedir}/lib/schroot
%{_datadir}/schroot
%{_mandir}/man1/schroot.1.gz
%{_mandir}/man5/schroot-script-config.5.gz
%{_mandir}/man5/schroot-setup.5.gz
%{_mandir}/man5/schroot.conf.5.gz
%{_mandir}/man7/schroot-faq.7.gz

%files -n libsbuild-devel
%defattr(-,root,root)
%{_includedir}/sbuild
%{_libdir}/libsbuild.a
%{_libdir}/pkgconfig/sbuild.pc
%exclude %{_libdir}/libsbuild.la

%changelog