Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 60ea263be467f3806a0608f1f76bc5a2916374ed
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Mar 18 13:22:06 2014 +0100
move selinux into separate package
---------------------------------------------------------------
copr.spec | 90 ---------------
LICENSE => selinux/LICENSE | 0
copr.spec => selinux/copr-selinux.spec | 120 +++-----------------
.../man}/copr-selinux-enable.8.asciidoc | 0
.../man}/copr-selinux-relabel.8.asciidoc | 0
5 files changed, 14 insertions(+), 196 deletions(-)
diff --git a/copr.spec b/copr.spec
index c88085f..b139d34 100644
--- a/copr.spec
+++ b/copr.spec
@@ -1,11 +1,7 @@
-%global with_server 1
%if 0%{?rhel} < 7 && 0%{?rhel} > 0
%global _pkgdocdir %{_docdir}/%{name}-%{version}
%global __python2 %{__python}
-%global with_server 0
%endif
-%global moduletype apps
-%global modulename copr
Name: copr
Version: 1.28
@@ -40,11 +36,6 @@ BuildRequires: python-argparse
BuildRequires: epydoc
BuildRequires: graphviz
BuildRequires: make
-%if %{with_server}
-#for selinux
-BuildRequires: checkpolicy, selinux-policy-devel
-BuildRequires: policycoreutils >= %{POLICYCOREUTILSVER}
-%endif
%description
COPR is lightweight build system. It allows you to create new project in WebUI,
@@ -67,7 +58,6 @@ and submit new builds and COPR will create yum repository from latests
builds.
This package contains command line interface.
-%if %{with_server}
%package doc
Summary: Code documentation for COPR
@@ -78,19 +68,6 @@ and submit new builds and COPR will create yum repository from latests
builds.
This package include documentation for COPR code. Mostly useful for developers
only.
-%package selinux
-Summary: SELinux module for COPR
-Requires(post): policycoreutils, libselinux-utils
-Requires(post): policycoreutils-python
-Requires(post): selinux-policy-targeted
-Requires(postun): policycoreutils
-
-%description selinux
-COPR is lightweight build system. It allows you to create new project in WebUI,
-and submit new builds and COPR will create yum repository from latests builds.
-
-This package include SELinux targeted module for COPR
-%endif
%prep
%setup -q
@@ -101,27 +78,12 @@ mv copr_cli/README.rst ./
# convert manages
a2x -d manpage -f manpage man/copr-cli.1.asciidoc
-a2x -d manpage -f manpage man/copr-selinux-enable.8.asciidoc
-a2x -d manpage -f manpage man/copr-selinux-relabel.8.asciidoc
# build documentation
pushd documentation
make %{?_smp_mflags} python
popd
-%if %{with_server}
-#selinux
-pushd selinux
-perl -i -pe 'BEGIN { $VER = join ".", grep /^\d+$/, split /\./,
"%{version}.%{release}"; } s!\@\@VERSION\@\@!$VER!g;' %{modulename}.te
-for selinuxvariant in targeted; do
- make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
- bzip2 -9 %{modulename}.pp
- mv %{modulename}.pp.bz2 %{modulename}.pp.bz2.${selinuxvariant}
- make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
-done
-popd
-%endif
-
%install
#copr-cli
@@ -129,52 +91,10 @@ popd
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 man/copr-cli.1 %{buildroot}/%{_mandir}/man1/
-%if %{with_server}
#doc
cp -a documentation/python-doc %{buildroot}%{_pkgdocdir}/
-#selinux
-for selinuxvariant in targeted; do
- install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
- install -p -m 644 selinux/%{modulename}.pp.bz2.${selinuxvariant} \
- %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp.bz2
-done
-# Install SELinux interfaces
-install -d %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
-install -p -m 644 selinux/%{modulename}.if \
- %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}/%{modulename}.if
-# Install copr-selinux-enable which will be called in %posttrans
-install -d %{buildroot}%{_sbindir}
-install -p -m 755 selinux/%{name}-selinux-enable
%{buildroot}%{_sbindir}/%{name}-selinux-enable
-install -p -m 755 selinux/%{name}-selinux-relabel
%{buildroot}%{_sbindir}/%{name}-selinux-relabel
-
-install -d %{buildroot}%{_mandir}/man8
-install -p -m 644 man/%{name}-selinux-enable.8 %{buildroot}/%{_mandir}/man8/
-install -p -m 644 man/%{name}-selinux-relabel.8 %{buildroot}/%{_mandir}/man8/
-%endif
-%if %{with_server}
-%post selinux
-if /usr/sbin/selinuxenabled ; then
- %{_sbindir}/%{name}-selinux-enable
-fi
-
-%posttrans selinux
-if /usr/sbin/selinuxenabled ; then
- %{_sbindir}/%{name}-selinux-relabel
-fi
-
-%postun
-# Clean up after package removal
-if [ $1 -eq 0 ]; then
- for selinuxvariant in targeted; do
- /usr/sbin/semodule -s ${selinuxvariant} -l > /dev/null 2>&1 \
- && /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} || :
- done
-fi
-%{sbinpath}/restorecon -rvvi %{_sharedstatedir}/copr
-
-%endif # with_server
%files cli
%doc LICENSE README.rst
@@ -182,19 +102,9 @@ fi
%{python_sitelib}/*
%{_mandir}/man1/copr-cli.1*
-%if %{with_server}
%files doc
%doc %{_pkgdocdir}/python-doc
-%files selinux
-%{_datadir}/selinux/*/%{modulename}.pp.bz2
-# empty, do not distribute it for now
-%exclude %{_datadir}/selinux/devel/include/%{moduletype}/%{modulename}.if
-%{_sbindir}/%{name}-selinux-enable
-%{_sbindir}/%{name}-selinux-relabel
-%{_mandir}/man8/%{name}-selinux-enable.8*
-%{_mandir}/man8/%{name}-selinux-relabel.8*
-%endif # with_server
%changelog
* Thu Feb 27 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.28-1
diff --git a/LICENSE b/selinux/LICENSE
similarity index 100%
copy from LICENSE
copy to selinux/LICENSE
diff --git a/copr.spec b/selinux/copr-selinux.spec
similarity index 88%
copy from copr.spec
copy to selinux/copr-selinux.spec
index c88085f..d90eb82 100644
--- a/copr.spec
+++ b/selinux/copr-selinux.spec
@@ -1,23 +1,21 @@
-%global with_server 1
%if 0%{?rhel} < 7 && 0%{?rhel} > 0
%global _pkgdocdir %{_docdir}/%{name}-%{version}
%global __python2 %{__python}
-%global with_server 0
%endif
%global moduletype apps
%global modulename copr
-Name: copr
+Name: copr-selinux
Version: 1.28
Release: 1%{?dist}
-Summary: Cool Other Package Repo
+Summary: SELinux module for COPR
Group: Applications/Productivity
License: GPLv2+
URL:
https://fedorahosted.org/copr/
# Source is created by
# git clone
https://git.fedorahosted.org/git/copr.git
-# cd copr
+# cd copr/selinux
# tito build --tgz
# content is same as
https://git.fedorahosted.org/cgit/copr.git/snapshot/%{name}-%{version}-1....
# but checksum does not match due different metadata
@@ -26,92 +24,29 @@ Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: asciidoc
BuildRequires: libxslt
-BuildRequires: util-linux
-BuildRequires: python-setuptools
-BuildRequires: python-requests
-BuildRequires: python2-devel
-%if %{with_server}
-BuildRequires: systemd
-%endif
-%if 0%{?rhel} < 7 && 0%{?rhel} > 0
-BuildRequires: python-argparse
-%endif
-#for doc package
-BuildRequires: epydoc
-BuildRequires: graphviz
-BuildRequires: make
-%if %{with_server}
-#for selinux
BuildRequires: checkpolicy, selinux-policy-devel
BuildRequires: policycoreutils >= %{POLICYCOREUTILSVER}
-%endif
-
-%description
-COPR is lightweight build system. It allows you to create new project in WebUI,
-and submit new builds and COPR will create yum repository from latest builds.
-
-%package cli
-Summary: Command line interface for COPR
-Requires: python-requests
-Requires: python-setuptools
-%if 0%{?rhel} < 6 && 0%{?rhel} > 0
-Group: Applications/Productivity
-%endif
-%if 0%{?rhel} < 7 && 0%{?rhel} > 0
-Requires: python-argparse
-%endif
-
-%description cli
-COPR is lightweight build system. It allows you to create new project in WebUI,
-and submit new builds and COPR will create yum repository from latests builds.
-
-This package contains command line interface.
-
-%if %{with_server}
-%package doc
-Summary: Code documentation for COPR
-
-%description doc
-COPR is lightweight build system. It allows you to create new project in WebUI,
-and submit new builds and COPR will create yum repository from latests builds.
-
-This package include documentation for COPR code. Mostly useful for developers
-only.
-
-%package selinux
-Summary: SELinux module for COPR
Requires(post): policycoreutils, libselinux-utils
Requires(post): policycoreutils-python
Requires(post): selinux-policy-targeted
Requires(postun): policycoreutils
-%description selinux
+
+%description
COPR is lightweight build system. It allows you to create new project in WebUI,
-and submit new builds and COPR will create yum repository from latests builds.
+and submit new builds and COPR will create yum repository from latest builds.
This package include SELinux targeted module for COPR
-%endif
%prep
%setup -q
%build
-mv copr_cli/README.rst ./
-
# convert manages
-a2x -d manpage -f manpage man/copr-cli.1.asciidoc
a2x -d manpage -f manpage man/copr-selinux-enable.8.asciidoc
a2x -d manpage -f manpage man/copr-selinux-relabel.8.asciidoc
-# build documentation
-pushd documentation
-make %{?_smp_mflags} python
-popd
-
-%if %{with_server}
-#selinux
-pushd selinux
perl -i -pe 'BEGIN { $VER = join ".", grep /^\d+$/, split /\./,
"%{version}.%{release}"; } s!\@\@VERSION\@\@!$VER!g;' %{modulename}.te
for selinuxvariant in targeted; do
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
@@ -119,47 +54,32 @@ for selinuxvariant in targeted; do
mv %{modulename}.pp.bz2 %{modulename}.pp.bz2.${selinuxvariant}
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
done
-popd
-%endif
%install
-
-#copr-cli
-%{__python2} coprcli-setup.py install --root %{buildroot}
-install -d %{buildroot}%{_mandir}/man1
-install -p -m 644 man/copr-cli.1 %{buildroot}/%{_mandir}/man1/
-
-%if %{with_server}
-#doc
-cp -a documentation/python-doc %{buildroot}%{_pkgdocdir}/
-
-#selinux
for selinuxvariant in targeted; do
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
- install -p -m 644 selinux/%{modulename}.pp.bz2.${selinuxvariant} \
+ install -p -m 644 %{modulename}.pp.bz2.${selinuxvariant} \
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp.bz2
done
# Install SELinux interfaces
install -d %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
-install -p -m 644 selinux/%{modulename}.if \
+install -p -m 644 %{modulename}.if \
%{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}/%{modulename}.if
# Install copr-selinux-enable which will be called in %posttrans
install -d %{buildroot}%{_sbindir}
-install -p -m 755 selinux/%{name}-selinux-enable
%{buildroot}%{_sbindir}/%{name}-selinux-enable
-install -p -m 755 selinux/%{name}-selinux-relabel
%{buildroot}%{_sbindir}/%{name}-selinux-relabel
+install -p -m 755 %{name}-selinux-enable %{buildroot}%{_sbindir}/%{name}-selinux-enable
+install -p -m 755 %{name}-selinux-relabel
%{buildroot}%{_sbindir}/%{name}-selinux-relabel
install -d %{buildroot}%{_mandir}/man8
install -p -m 644 man/%{name}-selinux-enable.8 %{buildroot}/%{_mandir}/man8/
install -p -m 644 man/%{name}-selinux-relabel.8 %{buildroot}/%{_mandir}/man8/
-%endif
-%if %{with_server}
-%post selinux
+%post
if /usr/sbin/selinuxenabled ; then
%{_sbindir}/%{name}-selinux-enable
fi
-%posttrans selinux
+%posttrans
if /usr/sbin/selinuxenabled ; then
%{_sbindir}/%{name}-selinux-relabel
fi
@@ -174,19 +94,8 @@ if [ $1 -eq 0 ]; then
fi
%{sbinpath}/restorecon -rvvi %{_sharedstatedir}/copr
-%endif # with_server
-
-%files cli
-%doc LICENSE README.rst
-%{_bindir}/copr-cli
-%{python_sitelib}/*
-%{_mandir}/man1/copr-cli.1*
-
-%if %{with_server}
-%files doc
-%doc %{_pkgdocdir}/python-doc
-
-%files selinux
+%files
+%doc LICENSE
%{_datadir}/selinux/*/%{modulename}.pp.bz2
# empty, do not distribute it for now
%exclude %{_datadir}/selinux/devel/include/%{moduletype}/%{modulename}.if
@@ -194,7 +103,6 @@ fi
%{_sbindir}/%{name}-selinux-relabel
%{_mandir}/man8/%{name}-selinux-enable.8*
%{_mandir}/man8/%{name}-selinux-relabel.8*
-%endif # with_server
%changelog
* Thu Feb 27 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.28-1
diff --git a/man/copr-selinux-enable.8.asciidoc
b/selinux/man/copr-selinux-enable.8.asciidoc
similarity index 100%
copy from man/copr-selinux-enable.8.asciidoc
copy to selinux/man/copr-selinux-enable.8.asciidoc
diff --git a/man/copr-selinux-relabel.8.asciidoc
b/selinux/man/copr-selinux-relabel.8.asciidoc
similarity index 100%
copy from man/copr-selinux-relabel.8.asciidoc
copy to selinux/man/copr-selinux-relabel.8.asciidoc