From 260be29c40678d43498f1fbf25737bece2ed486e Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 5 Mar 2021 23:35:27 +0000 Subject: system/lddsafe: Added (safe replacement for ldd) Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- system/lddsafe/README | 6 ++++ system/lddsafe/lddsafe.1 | 66 +++++++++++++++++++++++++++++++++++++++ system/lddsafe/lddsafe.SlackBuild | 38 ++++++++++++++++++++++ system/lddsafe/lddsafe.info | 12 +++++++ system/lddsafe/lddsafe.rst | 52 ++++++++++++++++++++++++++++++ system/lddsafe/slack-desc | 19 +++++++++++ 6 files changed, 193 insertions(+) create mode 100644 system/lddsafe/README create mode 100644 system/lddsafe/lddsafe.1 create mode 100644 system/lddsafe/lddsafe.SlackBuild create mode 100644 system/lddsafe/lddsafe.info create mode 100644 system/lddsafe/lddsafe.rst create mode 100644 system/lddsafe/slack-desc diff --git a/system/lddsafe/README b/system/lddsafe/README new file mode 100644 index 0000000000..d1f180e6be --- /dev/null +++ b/system/lddsafe/README @@ -0,0 +1,6 @@ +lddsafe (safe replacement for ldd) + +lddsafe prints shared library dependencies for executables and shared +libraries. However, it uses objdump instead of loading the program, +hence avoiding the security problems of ldd. lddsafe also includes +nonrecursive mode (-n option), which lists direct dependencies only. diff --git a/system/lddsafe/lddsafe.1 b/system/lddsafe/lddsafe.1 new file mode 100644 index 0000000000..9b4ae84fbd --- /dev/null +++ b/system/lddsafe/lddsafe.1 @@ -0,0 +1,66 @@ +.\" Man page generated from reStructuredText. +. +.TH LDDSAFE 1 "2021-02-28" "20110819_02842ba" "SlackBuilds.org" +.SH NAME +lddsafe \- safely print shared library dependencies (similar to ldd) +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.\" RST source for lddsafe(1) man page. Convert with: +. +.\" rst2man.py lddsafe.rst > lddsafe.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.SH SYNOPSIS +.sp +lddsafe [\fI\-n\fP] \fBFILE\fP ... +.SH DESCRIPTION +.sp +lddsafe is a shell script written for Linux distributions (tested +under Slackware Linux) that prints shared library dependencies for +executable files and shared libraries, similar to ldd. However, +it uses objdump instead of loading the program, hence avoiding the +security problems of ldd. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-n +Nonrecursive mode. List direct dependencies only. +.UNINDENT +.SH AUTHORS +.sp +lddsafe was written by Ricardo Garcia Gonzalez and Ivan Mironov, and +released as public domain code. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +The lddsafe homepage: \fI\%https://github.com/rg3/lddsafe/\fP +.\" Generated by docutils manpage writer. +. diff --git a/system/lddsafe/lddsafe.SlackBuild b/system/lddsafe/lddsafe.SlackBuild new file mode 100644 index 0000000000..abd02d1575 --- /dev/null +++ b/system/lddsafe/lddsafe.SlackBuild @@ -0,0 +1,38 @@ +#!/bin/sh + +# Slackware build script for lddsafe + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20210228 bkw: I've been using this for years, never got around +# to making a SBo build for it until now. Since it's only one +# self-contained shell script and one README, no point dealing with a +# tarball at all, just link to the 'raw' files on github. + +PRGNAM=lddsafe +VERSION=${VERSION:-20110819_02842ba} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $OUTPUT \ + $PKG/usr/bin $PKG/usr/doc/$PRGNAM-$VERSION $PKG/usr/man/man1 $PKG/install +install -m0755 -oroot -groot $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz +install -m0644 -oroot -groot $CWD/README.textile $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/lddsafe/lddsafe.info b/system/lddsafe/lddsafe.info new file mode 100644 index 0000000000..e782e2e71a --- /dev/null +++ b/system/lddsafe/lddsafe.info @@ -0,0 +1,12 @@ +PRGNAM="lddsafe" +VERSION="20110819_02842ba" +HOMEPAGE="https://github.com/rg3/lddsafe/" +DOWNLOAD="https://raw.githubusercontent.com/rg3/lddsafe/02842bab5b8d1341fb34c632603dbe1c20e7ab51/lddsafe \ + https://raw.githubusercontent.com/rg3/lddsafe/02842bab5b8d1341fb34c632603dbe1c20e7ab51/README.textile" +MD5SUM="7c9f3a4035a4b438e2ec44c4d27b158f \ + 6e4fa6979ae375cc60f9c444846bcb8d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/system/lddsafe/lddsafe.rst b/system/lddsafe/lddsafe.rst new file mode 100644 index 0000000000..37c15b22b8 --- /dev/null +++ b/system/lddsafe/lddsafe.rst @@ -0,0 +1,52 @@ +.. RST source for lddsafe(1) man page. Convert with: +.. rst2man.py lddsafe.rst > lddsafe.1 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 20110819_02842ba +.. |date| date:: + +======= +lddsafe +======= + +--------------------------------------------------------- +safely print shared library dependencies (similar to ldd) +--------------------------------------------------------- + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +lddsafe [*-n*] **FILE** ... + +DESCRIPTION +=========== + +lddsafe is a shell script written for Linux distributions (tested +under Slackware Linux) that prints shared library dependencies for +executable files and shared libraries, similar to ldd. However, +it uses objdump instead of loading the program, hence avoiding the +security problems of ldd. + +OPTIONS +======= + +-n Nonrecursive mode. List direct dependencies only. + +AUTHORS +======= + +lddsafe was written by Ricardo Garcia Gonzalez and Ivan Mironov, and +released as public domain code. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +The lddsafe homepage: https://github.com/rg3/lddsafe/ diff --git a/system/lddsafe/slack-desc b/system/lddsafe/slack-desc new file mode 100644 index 0000000000..ddc5f764c2 --- /dev/null +++ b/system/lddsafe/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +lddsafe: lddsafe (safe replacement for ldd) +lddsafe: +lddsafe: lddsafe prints shared library dependencies for executables and shared +lddsafe: libraries. However, it uses objdump instead of loading the program, +lddsafe: hence avoiding the security problems of ldd. lddsafe also includes +lddsafe: nonrecursive mode (-n option), which lists direct dependencies only. +lddsafe: +lddsafe: +lddsafe: +lddsafe: +lddsafe: -- cgit v1.2.3