94 lines
2.5 KiB
RPMSpec
94 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package uid_wrapper
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
############################# NOTE ##################################
|
|
#
|
|
# This is a special library. You are not able to link this library.
|
|
# Do NOT create library package or a devel package!
|
|
#
|
|
############################# NOTE ##################################
|
|
|
|
Name: uid_wrapper
|
|
Version: 1.2.0
|
|
Release: 0
|
|
|
|
Summary: A wrapper for privilege seperation
|
|
License: GPL-3.0+
|
|
Group: Development/Libraries/C and C++
|
|
Url: http://cwrap.org/
|
|
|
|
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
|
|
Source1: %{name}-rpmlintrc
|
|
|
|
BuildRequires: cmake
|
|
BuildRequires: libcmocka-devel
|
|
BuildRequires: pkg-config
|
|
|
|
Requires: cmake
|
|
Requires: pkg-config
|
|
|
|
%description
|
|
Some projects like a file server need privilege separation to be able to switch
|
|
to the connnection user and do file operations. uid_wrapper convincingly lies
|
|
to the application letting it believe it is operating as root and even
|
|
switching betwen uids and gids as needed.
|
|
|
|
To use it set the following environment variables:
|
|
|
|
LD_PRELOAD=libuid_wrapper.so
|
|
UID_WRAPPER=1
|
|
|
|
This package doesn't have a devel package cause this project is for
|
|
development/testing.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
# CMAKE_SKIP_RPATH:BOOL=OFF is need to run the tests!
|
|
%cmake \
|
|
-DUNIT_TESTING=ON
|
|
|
|
make %{?_smp_mflags} VERBOSE=1
|
|
|
|
%install
|
|
%cmake_install
|
|
|
|
%check
|
|
pushd build
|
|
make %{?_smp_mflags} test || cat $(find Testing -name "*.log")
|
|
popd
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS README ChangeLog COPYING
|
|
%{_libdir}/libuid_wrapper.so*
|
|
%dir %{_libdir}/cmake
|
|
%dir %{_libdir}/cmake/uid_wrapper
|
|
%{_libdir}/cmake/uid_wrapper/uid_wrapper-config-version.cmake
|
|
%{_libdir}/cmake/uid_wrapper/uid_wrapper-config.cmake
|
|
%dir %{_libdir}/pkgconfig
|
|
%{_libdir}/pkgconfig/uid_wrapper.pc
|
|
%{_mandir}/man1/uid_wrapper.1*
|
|
|
|
%changelog
|