From c76ceae4758207cd9ca9828d6a4d872079aff0dd Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 22 Apr 2019 15:13:40 +0200 Subject: [PATCH] Cleanup musl package scripts - Generate description files on the fly along with file listings - Only add dependency on fortify headers if hardening is enabled Signed-off-by: David Oberhollenzer --- pkg/musl/build | 11 ++++++++++- pkg/musl/libc-dev.desc | 1 - pkg/musl/libc.desc | 0 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 pkg/musl/libc-dev.desc delete mode 100644 pkg/musl/libc.desc diff --git a/pkg/musl/build b/pkg/musl/build index b2fe192..8b1d94b 100755 --- a/pkg/musl/build +++ b/pkg/musl/build @@ -56,7 +56,16 @@ deploy() { cat_file_merge "LDPATH" > "$PKGDEPLOYDIR/LDPATH" cp libssp_nonshared.a "$PKGDEPLOYDIR/lib" - cp $SCRIPTDIR/pkg/$PKGNAME/*.{desc,files} "$PKGDEPLOYDIR" + cp "$SCRIPTDIR/pkg/$PKGNAME/libc-dev.files" "$PKGDEPLOYDIR" + + if [ "x$TC_HARDENING" = "xyes" ]; then + echo "requires libc linux-dev fortify-headers" > \ + "$PKGDEPLOYDIR/libc-dev.desc" + else + echo "requires libc linux-dev" > "$PKGDEPLOYDIR/libc-dev.desc" + fi + + touch "$PKGDEPLOYDIR/libc.desc" cat > "$PKGDEPLOYDIR/libc.files" <<_EOF dir lib 0755 0 0 diff --git a/pkg/musl/libc-dev.desc b/pkg/musl/libc-dev.desc deleted file mode 100644 index 944ce3a..0000000 --- a/pkg/musl/libc-dev.desc +++ /dev/null @@ -1 +0,0 @@ -requires libc linux-dev fortify-headers diff --git a/pkg/musl/libc.desc b/pkg/musl/libc.desc deleted file mode 100644 index e69de29..0000000