Skip to content

Commit

Permalink
Example package now satisfy lintian
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Sep 27, 2024
1 parent d3ffb4e commit c775c0c
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 85 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
.vagrant
Test/debian/files
Test/debian/debhelper-build-stamp
Test/debian/ldd2debs.debhelper.log
Test/debian/ldd2debs.substvars
Test/debian/.debhelper/
Test/debian/ldd2debs/
Test/debian/files
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

To add badges for GitHub Actions, you can use the following markdown:

```markdown
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/VitexSoftware/BuildImages/docker-image.yml?branch=main)
```


Source of Docker images used for Debian/Ubuntu package building

Expand Down
17 changes: 17 additions & 0 deletions Test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@ ldd2debs

Find packaging dependencies for binaries

This script provides information about package dependencies for a given binary.

Usage:
./ldd2debs [OPTION] BINARY

Options:
--help, -h Display help information and usage examples.
--version, -v Display the version of the script.

Example:
./ldd2debs /bin/bash

The script uses `ldd` to list the shared library dependencies of the given binary,
then uses `apt-file search` to find the packages that provide those libraries,
and finally outputs a sorted list of unique package names.


(also Test/Example for https://github.com/VitexSoftware/BuildImages/)
7 changes: 2 additions & 5 deletions Test/debian/README.Debian
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
vitexsoftware-build-images for Debian
ldd2debs for Debian

Please edit this to provide information specific to
this vitexsoftware-build-images Debian package.

(Automatically generated by debmake Version 4.3.2)
Just Install & use

-- Vítězslav Dvořák <[email protected]> Mon, 22 Nov 2021 22:07:33 +0100
5 changes: 3 additions & 2 deletions Test/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ldd2debs (0.1) UNRELEASED; urgency=low

* Initial release. Closes: #nnnn
<nnnn is the bug number of your ITP>
* Just Example
* Specify versions for essential package dependencies


-- Vítězslav Dvořák <[email protected]> Mon, 22 Nov 2021 22:07:33 +0100
1 change: 0 additions & 1 deletion Test/debian/compat

This file was deleted.

10 changes: 4 additions & 6 deletions Test/debian/control
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
Source: ldd2debs
Section: development
Section: devel
Priority: optional
Maintainer: Vítězslav Dvořák <[email protected]>
Build-Depends: debhelper, dpkg-dev, sed
Build-Depends: debhelper, dpkg-dev (>= 1.20.9), sed (>= 4.7), debhelper-compat (= 12)
Standards-Version: 4.5.0
Homepage: https://github.com/VitexSoftware/BuildImages
Vcs-Git: https://github.com/VitexSoftware/BuildImages.git
Vcs-Browser: https://github.com/VitexSoftware/BuildImages

Package: ldd2debs
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends},
${shlibs:Depends},
apt-file, sed, awk, coreutils, libc-bin
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils (>= 8.30), libc-bin (>= 2.28), sed (>= 4.7)
Description: pull current VitexSoftware's build images
This Debian binary package was used to test of
deb packaging docker images for several distros
35 changes: 23 additions & 12 deletions Test/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: vitexsoftware-build-images
Upstream-Contact: <preferred name and address to reach the upstream project>
Source: <url://example.com>
#
# Please double check copyright with the licensecheck(1) command.
Upstream-Name: ldd2debs
Upstream-Contact: Vítězslav Dvořák <[email protected]>
Source: https://github.com/VitexSoftware/BuildImages/tree/main/Test

Files: Jenkinsfile
Copyright: __NO_COPYRIGHT_NOR_LICENSE__
License: __NO_COPYRIGHT_NOR_LICENSE__

#----------------------------------------------------------------------------
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
# license/copyright files.
Files: *
Copyright: 2023 Vítězslav Dvořák <[email protected]>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions Test/debian/files
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ldd2debs_0.1_amd64.buildinfo development optional
ldd2debs_0.1_amd64.deb development optional
ldd2debs_0.1_all.deb devel optional
ldd2debs_0.1_amd64.buildinfo devel optional
83 changes: 30 additions & 53 deletions Test/debian/ldd2debs.1
Original file line number Diff line number Diff line change
@@ -1,62 +1,39 @@
.\" Hey, EMACS: -*- nroff -*-
.\" (C) Copyright 2021 Vítězslav Dvořák <[email protected]>,
.\"
.\" See http://www.debian.org/doc/manuals/maint-guide/dother.en.html#manpage1
.\"
.\" 1. Use this as the template for the manpage for <commandname> after
.\" renaming this file to <commandname>.1 (if it is for section 1).
.\"
.\" 2. List the path to this file in debian/<packagename>.manpages to
.\" install this manpage to the target binary package.
.\"
.\" First parameter, LDD2DEBS, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH LDD2DEBS SECTION "22 Nov 2021"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.TH LDD2DEBS 1 "October 2023" "v0.1" "ldd2debs manual"

.SH NAME
ldd2debs \- so libs to deb files
ldd2debs \- show packages with dependencies for a given binary

.SH SYNOPSIS
.B ldd2debs
.RI [ options ] " files" ...
.br
.B bar
.RI [ options ] " files" ...
[\fIoptions\fR] \fIbinary\fR

.SH DESCRIPTION
This manual page documents briefly the
.B ldd2debs
command.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
\fBldd2debs\fP is a program that search for packages which contains .so files linked to given binary
is a script that shows the packages with dependencies for a given binary.

.SH OPTIONS
These programs follow the usual GNU command line syntax, with long
options starting with two dashes (`-').
A summary of options is included below.
For a complete description, see the Info files.
.TP
.B \-h, \-\-help
Show summary of options.
.B \-\-help, \-h
Show help message and usage example.
.TP
.B \-v, \-\-version
Show version of program.
.B \-\-version, \-v
Show the version of the script.

.SH EXAMPLES
To show the packages with dependencies for /bin/bash:
.PP
.B ldd2debs /bin/bash

.SH AUTHOR
Vítězslav Dvořák <[email protected]>

.SH LICENSE
This script is licensed under the MIT License.

.SH SEE ALSO
.BR bar (1),
.BR baz (1).
.br
The programs are documented fully by
.IR "The Rise and Fall of a Fooish Bar" ,
available via the Info system.
.BR ldd (1),
.BR apt-file (1),
.BR awk (1),
.BR sed (1),
.BR sort (1),
.BR uniq (1)
3 changes: 1 addition & 2 deletions Test/ldd2debs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh


case $1 in
"--help" | "-h")
echo "show packages with dependencies for given binary. Example:"
Expand All @@ -9,7 +8,7 @@
;;
"--version" | "-v" )
echo "ldd2debs v0.1"
break
exit 0
;;
*)
ldd $1 | awk '/=>/{print $(NF-1)}' | while read n; do apt-file search $n; done | awk '{print $1}' | sed 's/://' | sort | uniq
Expand Down

0 comments on commit c775c0c

Please sign in to comment.