SHA256
1
0
forked from pool/kanidm

Accepting request 837240 from network

Correct license line base on legal team input

OBS-URL: https://build.opensuse.org/request/show/837240
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kanidm?expand=0&rev=1
This commit is contained in:
Dominique Leuenberger 2020-10-07 12:16:33 +00:00 committed by Git OBS Bridge
commit 1bae16bc73
11 changed files with 297 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

25
_service Normal file
View File

@ -0,0 +1,25 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">https://github.com/kanidm/kanidm.git</param>
<param name="versionformat">@PARENT_TAG@~git@TAG_OFFSET@.%h</param>
<param name="scm">git</param>
<!-- <param name="revision">master</param> -->
<param name="revision">v1.1.0-alpha</param>
<param name="match-tag">v*</param>
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)-alpha</param>
<param name="versionrewrite-replacement">\1~alpha</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">wbrown@suse.de</param>
</service>
<service mode="disabled" name="tar" />
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="cargo_vendor" mode="disabled">
<param name="srcdir">kanidm</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>

10
cargo_config Normal file
View File

@ -0,0 +1,10 @@
[source.crates-io]
replace-with = "vendored-sources"
[source."https://github.com/csnewman/libnss-rs.git"]
git = "https://github.com/csnewman/libnss-rs.git"
rev = "eab2d93d2438652773699b0807d558ce75b1e748"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

18
kanidm-unixd.service Normal file
View File

@ -0,0 +1,18 @@
# You should not need to edit this file. Instead, use a drop-in file as described in:
# /usr/lib/systemd/system/kanidm_unixd.service.d/custom.conf
[Unit]
Description=Kanidm Local Client Resolver
After=chronyd.service ntpd.service network-online.target
[Service]
DynamicUser=yes
UMask=0027
CacheDirectory=kanidm-unixd
RuntimeDirectory=kanidm-unixd
Type=simple
ExecStart=/usr/sbin/kanidm_unixd
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2bd98d65a783ec72f25578e98dec4d43c14514fb7e6bec4229130e9bcbd48957
size 30054264

9
kanidm.changes Normal file
View File

@ -0,0 +1,9 @@
-------------------------------------------------------------------
Wed Sep 23 01:17:22 UTC 2020 - William Brown <william.brown@suse.com>
- Correct missing license details
-------------------------------------------------------------------
Mon Aug 3 00:38:29 UTC 2020 - William Brown <william.brown@suse.com>
- Initial Commit

181
kanidm.spec Normal file
View File

@ -0,0 +1,181 @@
#
# spec file for package kanidm
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
# Solid source of inspiration.
# https://build.opensuse.org/package/view_file/home:luke_nukem:rust_apps/nushell/nushell.spec?expand=1
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2
Name: kanidm
Version: v1.1.0alpha~git0.c8ac497
Release: 0
Summary: Kanidm identity project
License: MPL-2.0 AND Apache-2.0 AND MIT AND ISC AND OpenSSL AND APSL-2.0
Url: https://github.com/Firstyear/kanidm
Source: kanidm-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
Source10: kanidmd.service
Source11: kanidm-unixd.service
Source12: server.toml
ExcludeArch: %ix86
BuildRequires: cargo
BuildRequires: rust >= 1.39.0
BuildRequires: rust-std-static
BuildRequires: lld
# BuildRequires: pkgconfig(openssl)
# BuildRequires: sqlite-devel
BuildRequires: pam-devel
Requires: %{name}-clients
Requires: %{name}-server
Requires: %{name}-unixd-clients
# Are openssl and sqlite implied as requires from this?
%description
An identity management platform written in rust that supports RADIUS, SSH Key management
and more.
%package clients
Summary: Client tools for interacting with Kanidm
License: MPL-2.0
%description clients
Client utilities for interactive with kanidm
%package server
Summary: Kanidm server and related tools
License: MPL-2.0
Requires: %{name}-clients
# Requires: libsqlite3-0
%description server
Server for kanidm
%package unixd-clients
Summary: Client nsswitch/pam/ssh integration for consuming kanidm
License: MPL-2.0
Requires: %{name}-clients
Requires: pam
# Requires: libsqlite3-0
%description unixd-clients
A localhost resolver and libraries that allow a system to resolve posix
identities to a kanidm instance.
%define configdir %{_sysconfdir}/%{name}
%prep
%setup -q
%setup -qa1
mkdir .cargo
cp %{SOURCE2} .cargo/config
# Remove exec bits to prevent an issue in fedora shebang checking
find vendor -type f -name \*.rs -exec chmod -x '{}' \;
%build
export RUSTFLAGS="%{rustflags}"
# Allow building on older compliers with deps that have newer features.
# export RUSTC_BOOTSTRAP=1
cargo build --offline --release
%install
install -D -d -m 0755 %{buildroot}%{configdir}
install -D -d -m 0755 %{buildroot}%{_unitdir}
install -D -d -m 0755 %{buildroot}%{_sbindir}
install -D -d -m 0755 %{buildroot}%{_bindir}
install -D -d -m 0755 %{buildroot}%{_libdir}
install -D -d -m 0755 %{buildroot}/%_lib/security
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm %{buildroot}%{_bindir}/kanidm
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_badlist_preprocess %{buildroot}%{_bindir}/kanidm_badlist_preprocess
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_cache_clear %{buildroot}%{_sbindir}/kanidm_cache_clear
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_cache_invalidate %{buildroot}%{_sbindir}/kanidm_cache_invalidate
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_ssh_authorizedkeys %{buildroot}%{_sbindir}/kanidm_ssh_authorizedkeys
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_ssh_authorizedkeys_direct %{buildroot}%{_sbindir}/kanidm_ssh_authorizedkeys_direct
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_unixd %{buildroot}%{_sbindir}/kanidm_unixd
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidm_unixd_status %{buildroot}%{_bindir}/kanidm_unixd_status
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/kanidmd %{buildroot}%{_sbindir}/kanidmd
install -m 0644 %{_builddir}/%{name}-%{version}/target/release/libnss_kanidm.so %{buildroot}%{_libdir}/libnss_kanidm.so.2
install -m 0644 %{_builddir}/%{name}-%{version}/target/release/libpam_kanidm.so %{buildroot}/%_lib/security/pam_kanidm.so
install -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/kanidmd.service
install -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/kanidm-unixd.service
install -m 0640 %{SOURCE12} %{buildroot}%{configdir}/server.toml
# Example of how to install examples later.
# install -D -m 0755 examples %{buildroot}%{_datadir}/kandim/examples
%pre server
%service_add_pre kanidmd.service
%post server
%service_add_post kanidmd.service
%preun server
%service_del_preun kanidmd.service
%postun server
%service_del_postun kanidmd.service
%pre unixd-clients
%service_add_pre kanidm-unixd.service
%post unixd-clients
%service_add_post kanidm-unixd.service
%preun unixd-clients
%service_del_preun kanidm-unixd.service
%postun unixd-clients
%service_del_postun kanidm-unixd.service
%files
%defattr(-,root,root)
# %{_datadir}/kandim/examples
%exclude /usr/.crates.toml
%files clients
%defattr(-,root,root)
%dir %{configdir}
%{_bindir}/kanidm
%files server
%{_bindir}/kanidm_badlist_preprocess
%{_sbindir}/kanidmd
%{_unitdir}/kanidmd.service
%dir %{configdir}
%config(noreplace) %{configdir}/server.toml
%files unixd-clients
%{_libdir}/libnss_kanidm.so.2
/%_lib/security/pam_kanidm.so
%{_sbindir}/kanidm_cache_clear
%{_sbindir}/kanidm_cache_invalidate
%{_sbindir}/kanidm_ssh_authorizedkeys
%{_sbindir}/kanidm_ssh_authorizedkeys_direct
%{_sbindir}/kanidm_unixd
%{_bindir}/kanidm_unixd_status
%{_unitdir}/kanidm-unixd.service
%changelog

17
kanidmd.service Normal file
View File

@ -0,0 +1,17 @@
# You should not need to edit this file. Instead, use a drop-in file as described in:
# /usr/lib/systemd/system/kanidmd.service.d/custom.conf
[Unit]
Description=Kanidm Identity Server
After=chronyd.service ntpd.service network-online.target
Before=radiusd.service
[Service]
Type=simple
DynamicUser=yes
UMask=0027
StateDirectory=kanidmd
ExecStart=/usr/sbin/kanidmd server -c /etc/kanidm/server.toml
[Install]
WantedBy=multi-user.target

7
server.toml Normal file
View File

@ -0,0 +1,7 @@
bindaddress = "127.0.0.1:8443"
# ldapbindaddress = "127.0.0.1:3636"
db_path = "/var/lib/kanidmd/kanidm.db"
# tls_ca = "/var/lib/kanidmd/ca.pem"
# tls_cert = "/var/lib/kanidmd/cert.pem"
# tls_key = "/var/lib/kanidmd/key.pem"
# log_level = "

3
vendor.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:34211423de725bcd3329b84e02642dbf9bc229c15ca971b614c9c057a21a8816
size 26096900