-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1016 from bcressey/policycoreutils
add policycoreutils and related tools
- Loading branch information
Showing
26 changed files
with
462 additions
and
55 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From e76e1ea775d7a1897775767fc17626389372f6e9 Mon Sep 17 00:00:00 2001 | ||
From: Ben Cressey <[email protected]> | ||
Date: Wed, 29 Jul 2020 19:46:30 +0000 | ||
Subject: [PATCH] simplify shared object build | ||
|
||
Signed-off-by: Ben Cressey <[email protected]> | ||
--- | ||
Makefile-libbz2_so | 8 ++------ | ||
1 file changed, 2 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so | ||
index fb0f230..5e26467 100644 | ||
--- a/Makefile-libbz2_so | ||
+++ b/Makefile-libbz2_so | ||
@@ -22,9 +22,6 @@ | ||
|
||
|
||
SHELL=/bin/sh | ||
-CC=gcc | ||
-BIGFILES=-D_FILE_OFFSET_BITS=64 | ||
-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) | ||
|
||
OBJS= blocksort.o \ | ||
huffman.o \ | ||
@@ -35,13 +32,12 @@ OBJS= blocksort.o \ | ||
bzlib.o | ||
|
||
all: $(OBJS) | ||
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS) | ||
- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 | ||
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS) | ||
rm -f libbz2.so.1.0 | ||
ln -s libbz2.so.1.0.8 libbz2.so.1.0 | ||
|
||
clean: | ||
- rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared | ||
+ rm -f $(OBJS) libbz2.so.1.0.8 libbz2.so.1.0 | ||
|
||
blocksort.o: blocksort.c | ||
$(CC) $(CFLAGS) -c blocksort.c | ||
-- | ||
2.21.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "libbzip2" | ||
version = "0.1.0" | ||
edition = "2018" | ||
publish = false | ||
build = "build.rs" | ||
|
||
[lib] | ||
path = "pkg.rs" | ||
|
||
[[package.metadata.build-package.external-files]] | ||
url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz" | ||
sha512 = "083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3" | ||
|
||
[build-dependencies] | ||
glibc = { path = "../glibc" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use std::process::{exit, Command}; | ||
|
||
fn main() -> Result<(), std::io::Error> { | ||
let ret = Command::new("buildsys").arg("build-package").status()?; | ||
if !ret.success() { | ||
exit(1); | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prefix=__PREFIX__ | ||
exec_prefix=__EXEC_PREFIX__ | ||
libdir=__LIBDIR__ | ||
includedir=__INCLUDEDIR__ | ||
|
||
Name: bzip2 | ||
Description: __DESCRIPTION__ | ||
Version: __VERSION__ | ||
Libs: -L${libdir} -lbz2 | ||
Cflags: -I${includedir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Name: %{_cross_os}libbzip2 | ||
Version: 1.0.8 | ||
Release: 1%{?dist} | ||
Summary: Library for bzip2 compression | ||
License: bzip2-1.0.6 | ||
URL: http://www.bzip.org | ||
Source0: https://sourceware.org/pub/bzip2/bzip2-%{version}.tar.gz | ||
Source1: bzip2.pc.in | ||
Patch1: 0001-simplify-shared-object-build.patch | ||
BuildRequires: %{_cross_os}glibc-devel | ||
|
||
%description | ||
%{summary}. | ||
|
||
%package devel | ||
Summary: Files for development using the library for bzip2 compression | ||
Requires: %{name} | ||
|
||
%description devel | ||
%{summary}. | ||
|
||
%prep | ||
%autosetup -n bzip2-%{version} -p1 | ||
sed \ | ||
-e "s,__PREFIX__,%{_cross_prefix},g" \ | ||
-e "s,__EXEC_PREFIX__,%{_cross_exec_prefix},g" \ | ||
-e "s,__LIBDIR__,%{_cross_libdir},g" \ | ||
-e "s,__INCLUDEDIR__,%{_cross_includedir},g" \ | ||
-e "s,__VERSION__,%{version},g" \ | ||
-e "s,__DESCRIPTION__,%{description},g" \ | ||
%{S:1} > bzip2.pc | ||
|
||
%global set_env \ | ||
%set_cross_build_flags \\\ | ||
export CC="%{_cross_target}-gcc" \\\ | ||
export CFLAGS="${CFLAGS} -fpic -fPIC" \\\ | ||
%{nil} | ||
|
||
%build | ||
%set_env | ||
%make_build -f Makefile-libbz2_so all | ||
|
||
%install | ||
install -d %{buildroot}{%{_cross_libdir},%{_cross_includedir},%{_cross_pkgconfigdir}} | ||
install -m 755 libbz2.so.%{version} %{buildroot}%{_cross_libdir} | ||
ln -s libbz2.so.%{version} %{buildroot}%{_cross_libdir}/libbz2.so.1 | ||
ln -s libbz2.so.1 %{buildroot}%{_cross_libdir}/libbz2.so | ||
install -m 644 bzlib.h %{buildroot}%{_cross_includedir} | ||
install -m 644 bzip2.pc %{buildroot}%{_cross_pkgconfigdir} | ||
|
||
%files | ||
%license LICENSE | ||
%{_cross_attribution_file} | ||
%{_cross_libdir}/*.so.* | ||
|
||
%files devel | ||
%{_cross_libdir}/*.so | ||
%{_cross_includedir}/*.h | ||
%{_cross_pkgconfigdir}/*.pc | ||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// not used |
32 changes: 0 additions & 32 deletions
32
packages/libselinux/0001-adjust-default-selinux-directory.patch
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "libsemanage" | ||
version = "0.1.0" | ||
edition = "2018" | ||
publish = false | ||
build = "build.rs" | ||
|
||
[lib] | ||
path = "pkg.rs" | ||
|
||
[[package.metadata.build-package.external-files]] | ||
url = "https://github.com/SELinuxProject/selinux/releases/download/20191204/libsemanage-3.0.tar.gz" | ||
sha512 = "f960e1bd6815d3c9f000efa7ae717bc7937e742af5a7fea4aa865cf1aee49486e34897d83dbdb9cf77975a09a5ad77e5512d47690a74512a468a89432b72a42c" | ||
|
||
[build-dependencies] | ||
glibc = { path = "../glibc" } | ||
libaudit = { path = "../libaudit" } | ||
libbzip2 = { path = "../libbzip2" } | ||
libselinux = { path = "../libselinux" } | ||
libsepol = { path = "../libsepol" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use std::process::{exit, Command}; | ||
|
||
fn main() -> Result<(), std::io::Error> { | ||
let ret = Command::new("buildsys").arg("build-package").status()?; | ||
if !ret.success() { | ||
exit(1); | ||
} | ||
Ok(()) | ||
} |
Oops, something went wrong.