### Install Docker and Configure User Permissions Source: https://manpages.debian.org/testing/devscripts/deb2docker.1.en.html Required setup to ensure the Docker daemon is installed and the current user has the necessary permissions to execute Docker commands. ```bash sudo apt install docker.io sudo usermod -aG docker $USER ``` -------------------------------- ### Create and Launch a Container with deb2docker Source: https://manpages.debian.org/testing/devscripts/deb2docker.1.en.html Example of building a container with a specific package and executing the generated start script. ```bash deb2docker -o /tmp/xeyes x11-apps /tmp/xeyes/start xeyes ``` -------------------------------- ### Download and Compare Package Versions with debdiff Source: https://manpages.debian.org/testing/devscripts/dget.1.en.html This example shows how to download the source package of the current version from an apt repository and a new version from mentors.debian.net, then compare them using debdiff. Ensure debdiff is installed. ```bash dget https://mentors.debian.net/debian/pool/main/m/mypackage/mypackage_1.2-3.dsc apt-get source mypackage=1.2-2 de bdiff --from mypackage_1.2-2.dsc --to mypackage_1.2-3.dsc ``` -------------------------------- ### Pypi template example Source: https://manpages.debian.org/testing/devscripts/uscan-templates.5.en.html Example configuration for a Pypi project. ```text Version: 5 Template: Pypi Dist: bitbox02 ``` -------------------------------- ### GitHub template example Source: https://manpages.debian.org/testing/devscripts/uscan-templates.5.en.html Example configuration for a GitHub repository. ```text Version: 5 Template: GitHub Owner: guimard Project: llng-docker ``` -------------------------------- ### GitLab template example Source: https://manpages.debian.org/testing/devscripts/uscan-templates.5.en.html Example configuration for a GitLab repository. ```text Version: 5 Template: GitLab Dist: https://salsa.debian.org/debian/devscripts ``` -------------------------------- ### Configuration File Example Source: https://manpages.debian.org/testing/devscripts/salsa.1 Example of how to configure salsa for a different GitLab instance. ```APIDOC # Configuration file example Example to use salsa with (group "lemonldap-ng"): ``` SALSA_TOKEN=`cat ~/.ow2-gitlab-token` SALSA_API_URL=https://gitlab.ow2.org/api/v4 SALSA_GIT_SERVER_URL=git@gitlab.ow2.org: SALSA_GROUP_ID=34 ``` Then to use it, add something like this in your ".bashrc" file: ``` alias llng_admin='salsa --conffile ~/.salsa-ow2.conf' ``` ``` -------------------------------- ### Add User to Group Examples Source: https://manpages.debian.org/testing/devscripts/salsa.1 Provides examples for adding a user to a group using either the group name or group ID. ```bash salsa --group js-group add_user guest foouser ``` ```bash salsa --group-id 1234 add_user guest foouser ``` ```bash salsa --group-id 1234 add_user maintainer 1245 ``` -------------------------------- ### Search Users Examples Source: https://manpages.debian.org/testing/devscripts/salsa.1 Shows how to search for users by providing a string to match against user names or IDs. ```bash salsa search_users yadd ``` -------------------------------- ### Create and Launch Container Source: https://manpages.debian.org/testing/devscripts/deb2apptainer.1.de.html Example of creating a container for x11-apps and launching the xeyes application. ```bash deb2apptainer -o /tmp/xeyes x11-apps ``` ```bash /tmp/xeyes/start xeyes ``` -------------------------------- ### Example URL with @ANY_VERSION@ Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5.en.html Specifies a URL pattern for uscan to download from, where @ANY_VERSION@ is a placeholder for the version. ```plaintext http://www.example.org/@ANY_VERSION@/ ``` -------------------------------- ### Metacpan template example Source: https://manpages.debian.org/testing/devscripts/uscan-templates.5.en.html Example configuration for a Metacpan distribution. ```text Version: 5 Template: Metacpan Dist: MetaCPAN-Client ``` -------------------------------- ### Manual Tagging Example Source: https://manpages.debian.org/testing/devscripts/svnpath.1 This example shows the manual process of tagging a repository, which svnpath aims to simplify. It requires manually looking up the repository URL and constructing the tag URL. ```bash svn cp svn+ssh://my.server.example/svn/project/trunk svn+ssh://my.server.example/svn/project/tags/1.0 ``` -------------------------------- ### SourceForge Audacity Watch File Example Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5.en.html An example of a uscan watch file for the Audacity project using the SourceForge redirector. ```bash version=4 https://sf.net/audacity/ audacity-minsrc-@ANY_VERSION@@ARCHIVE_EXT@ ``` -------------------------------- ### List Users in Group Examples Source: https://manpages.debian.org/testing/devscripts/salsa.1 Provides examples for listing users within a group, using either the group name or group ID. ```bash salsa --group js-team list_users ``` ```bash salsa --group-id 1234 list_users ``` -------------------------------- ### Configure uscan templates Source: https://manpages.debian.org/testing/devscripts/uscan-templates.5.en.html Basic examples of using templates in a debian/watch file. ```text Version: 5 Template: GitHub Dist: https://github.com/guimard/llng-docker ``` ```text Version: 5 Template: GitHub Owner: guimard Project: llng-docker ``` ```text Version: 5 Template: GitHub Owner: guimard Project: llng-docker Version-Mangle: auto ``` -------------------------------- ### Download all installed packages Source: https://manpages.debian.org/testing/devscripts/debsnap.1.en.html Iterates through all installed packages and downloads their binary versions for the current host architecture and 'all' architecture. ```bash aptitude search '~i' -F '%p %V' | while read pkg ver; do debsnap -a $(dpkg-architecture -qDEB_HOST_ARCH) -a all $pkg $ver; done ``` -------------------------------- ### Create a Container with a Pre-installation Script Source: https://manpages.debian.org/testing/devscripts/deb2docker.1.en.html Use a pre-script to modify the sources.list file before installing packages within the container. ```bash echo “sed -i `s/main/main contrib non-free/g' /etc/apt/sources.list” > pre.sh deb2docker -p pre.sh x11-apps ``` -------------------------------- ### Example debian/watch file (Version 5) Source: https://manpages.debian.org/testing/devscripts/debian-watch.5.en.html A basic example of a debian/watch file using version 5 format. It includes directives to untrack a package temporarily and specifies the source URL and a pattern for matching tarballs. ```debian-watch Version: 5 Untrackable: temporarily I don't want to update this Source: https://keeped-site-to-be-used-later/ Matching-Pattern: .*@ANY_VERSION@@ARCHIVE_EXT@ ``` -------------------------------- ### Download specific package build logs Source: https://manpages.debian.org/testing/devscripts/getbuildlog.1.en.html Examples of using getbuildlog to filter by package, version, and architecture patterns. ```bash getbuildlog hello 2\.2-1 amd64 ``` ```bash getbuildlog glibc "" mips.* ``` ```bash getbuildlog wesnoth .*bpo.* ``` -------------------------------- ### Search Groups Examples Source: https://manpages.debian.org/testing/devscripts/salsa.1 Demonstrates searching for groups by providing a string, which can be a partial name, a path, or a group ID. ```bash salsa search_groups perl-team ``` ```bash salsa search_groups perl-team/modules ``` ```bash salsa search_groups 2666 ``` -------------------------------- ### Request Group Access Examples Source: https://manpages.debian.org/testing/devscripts/salsa.1 Shows how to request access to a group using the 'join' command, with options for specifying the group. ```bash salsa join js-team ``` ```bash salsa join --group js-team ``` ```bash salsa join --group-id 1234 ``` -------------------------------- ### Container with Pre-installation Script Source: https://manpages.debian.org/testing/devscripts/deb2apptainer.1.de.html Use a pre-script to modify the container's apt sources before installing packages. ```bash echo “sed -i `s/main/main contrib non-free/g' /etc/apt/sources.list” > pre.sh ``` ```bash deb2apptainer -p pre.sh x11-apps ``` -------------------------------- ### Checksum calculation example Source: https://manpages.debian.org/testing/devscripts/debian-watch.5.en.html Visual representation of how component versions are summed to create a checksum-prefixed version string. ```text Main: 2.0.6 Comp1: 1 . 2 . 4 Comp2: 2 . 0 . 1 Comp3: 10 . 0 ================================ Result : 1+2+10 . 2+0+0 . 4+1 Checksum: 13 . 2 . 5 ================================ Final Version: 2.0.6+~cs13.2.5 ``` -------------------------------- ### Run Basic debbisect Test Source: https://manpages.debian.org/testing/devscripts/debbisect.1.en.html Example of running a simple test command with debbisect and comparing logs. ```bash $ ./debbisect "last week" today "mmdebstrap --customize-hook='chroot \"$1\" do_something' unstable - $DEBIAN_BISECT_MIRROR >/dev/null" $ diff -u debbisect.log.good debbisect.log.bad ``` -------------------------------- ### Run debrepro with custom pre-build commands Source: https://manpages.debian.org/testing/devscripts/debrepro.1 Examples of using the --before-second-build option to modify the source tree before the second build occurs. ```bash $ debrepro --before-second-build "git checkout branch-with-changes" $ debrepro --before-second-build "patch -p1 < /path/to/patch" ``` -------------------------------- ### Download build logs for backported versions Source: https://manpages.debian.org/testing/devscripts/getbuildlog.1 This example demonstrates downloading all build logs for backported versions of a package. The version pattern '.*bpo.*' is used to match versions containing 'bpo'. ```bash getbuildlog wesnoth .*bpo.* ``` -------------------------------- ### DEBI(1) - Install Debian Package Source: https://manpages.debian.org/testing/devscripts/debi.1 The debi command installs the current version of a generated Debian package. It can automatically find the .changes file and install all associated .deb packages. ```APIDOC ## debi - Install Debian Package ### Description Installs the current version of a generated Debian package. It can automatically locate the .changes file and install all associated .deb archives. ### Method Command-line utility ### Endpoint N/A (Local command) ### Parameters #### Path Parameters - **changes file** (string) - Optional - If specified, the filename must end with .changes. This file lists the .deb archives to be installed. - **package** (string) - Optional - If specified, only debs with names in this list will be installed. #### Query Parameters None #### Request Body None ### Request Example ```bash debi package_name.changes package_name_amd64.deb ``` ### Response #### Success Response (Installation) - **Installation Status** (string) - Indicates success or failure of the dpkg -i command. #### Response Example ``` (Output from dpkg -i) ``` ## Directory name checking ### Description This feature checks the directory name to prevent accidental installation from stray files. It climbs the directory tree to find debian/changelog and verifies the parent directory name against a pattern. ### Configuration Variables - **DEVSCRIPTS_CHECK_DIRNAME_LEVEL** (integer) - Controls the level of directory name checking (0: never, 1: default, 2: always). - **DEVSCRIPTS_CHECK_DIRNAME_REGEX** (string) - A Perl regex to match against the directory name. 'PACKAGE' is replaced by the source package name. ### Command-line Options - **--check-dirname-level** _N_ - Overrides DEVSCRIPTS_CHECK_DIRNAME_LEVEL. - **--check-dirname-regex** _regex_ - Overrides DEVSCRIPTS_CHECK_DIRNAME_REGEX. ## OPTIONS ### General Options - **-a** _debian-architecture_, **-t** _GNU-system-type_ Affects the search for the .changes file, mimicking dpkg-buildpackage behavior. - **--debs-dir** _directory_ Specifies a directory to look for .changes and .deb files instead of the default location. - **-m**, **--multi** Searches for a multiarch .changes file, as created by dpkg-cross. - **-u**, **--upgrade** Only upgrades packages already installed on the system. - **--with-depends** Attempts to satisfy package dependencies during installation. - **--tool** _tool_ Specifies the tool to use for installing package dependencies (default: apt-get). - **--no-conf**, **--noconf** Disables reading of configuration files. Must be the first option. - **--help**, **--version** Displays help message and version information, respectively. ``` -------------------------------- ### Get Salsa Path Source: https://manpages.debian.org/testing/devscripts/salsa.1.en.html Get the salsa path from a local Git repository. ```APIDOC ## GET /api/path ### Description Retrieves the salsa path associated with a local Git repository. This can be used to determine the correct project path for salsa commands. ### Method GET ### Endpoint `/api/path` ### Parameters #### Query Parameters - **directory** (string) - Optional - The path to the local Git repository. If not provided, the current directory is used. ### Request Example ```json { "example": "salsa path ./my-repo" } ``` ### Response #### Success Response (200) - **salsa_path** (string) - The determined salsa path for the repository. #### Response Example ```json { "example": "/path/to/salsa/repo" } ``` ``` -------------------------------- ### dversionmangle rule example Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5.en.html Example of the dversionmangle rule to normalize upstream versions by removing the +dfsg suffix. ```shell opts="dversionmangle=s/\+dfsg\d*$//" ``` -------------------------------- ### Query installed packages for debootsnap Source: https://manpages.debian.org/testing/devscripts/debootsnap.1.en.html Generate a list of installed packages and their versions in a format suitable for debootsnap. ```shell $ dpkg-query --showformat '${binary:Package}=${Version}\n' --show ``` -------------------------------- ### Download all versions and architectures Source: https://manpages.debian.org/testing/devscripts/debsnap.1.en.html Retrieves every version of a binary package for all architectures. ```bash debsnap --binary xterm ``` -------------------------------- ### Display help information Source: https://manpages.debian.org/testing/devscripts/debrebuild.1 Shows the command-line help and usage options. ```bash debrebuild <--help|-h> ``` -------------------------------- ### Build Docker image with x11-apps and launch Source: https://manpages.debian.org/testing/devscripts/deb2docker.1 Creates a Docker container with the 'x11-apps' package in a specified directory and provides a command to launch it. A desktop launcher is also generated. ```bash deb2docker -o /tmp/xeyes x11-apps ``` ```bash /tmp/xeyes/start xeyes ``` -------------------------------- ### Update User Role Examples Source: https://manpages.debian.org/testing/devscripts/salsa.1 Provides examples for updating a user's role within a group, using either group name or ID. ```bash salsa --group-id 1234 update_user guest foouser ``` ```bash salsa --group js-team update_user maintainer 1245 ``` -------------------------------- ### Install Docker and add user to docker group Source: https://manpages.debian.org/testing/devscripts/deb2docker.1 Commands to install Docker and add the current user to the 'docker' group, which is necessary for running Docker commands without sudo. ```bash sudo apt install docker.io ``` ```bash sudo usermod -aG docker $USER ``` -------------------------------- ### Run Lintian with Options Source: https://manpages.debian.org/testing/devscripts/debuild.1.en.html An example of using debuild with lintian to check resulting packages, passing options to lintian. Debuild options come first, followed by dpkg-buildpackage options, and then checker options. ```shell debuild --lintian-opts -i ``` -------------------------------- ### Basic HTTP Watch File Example Source: https://manpages.debian.org/testing/devscripts/debian-watch.5 A basic debian/watch file configuration for an HTTP site, specifying the version, source URL, and a pattern to match archive files. ```ini Version: 5 Source: http://example.com/~user/release/@PACKAGE@.html Matching-Pattern: files/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ ``` -------------------------------- ### cvs-debi Command Usage Source: https://manpages.debian.org/testing/devscripts/cvs-debi.1 The cvs-debi command is used to install Debian packages after they have been built using cvs-buildpackage or cvs-debuild. It locates the generated .changes file and installs the associated .deb archives. ```APIDOC ## cvs-debi ### Description Installs CVS-buildpackage/CVS-debuild generated packages. ### Method Command-line utility ### Endpoint N/A (Local command) ### Parameters #### Command-line Arguments - **_options_** (options) - Optional - Various options to control the behavior of cvs-debi and cvs-buildpackage. - **_package_ ...** (string) - Optional - A list of specific package names to install. If provided, only these packages will be installed. #### Options - **-a _debian-architecture_**, **-t _GNU-system-type_** Affects the search for the .changes file. Mimics dpkg-buildpackage behavior. - **-M _module_** The name of the CVS module. - **-P _package_** The name of the package. - **-V _version_** The version number of the package. - **-T _tag_** The CVS tag to use for exporting sources. - **-R _root directory_** Root of the original sources archive. - **-W _work directory_** The full path name for the cvs-buildpackage working directory. - **-x _prefix_** This option provides the CVS default module prefix. - **--help** Show help message. - **--version** Show version information. ### Request Example ```bash cvs-debi -P mypackage cvs-debi -M mymodule -P mypackage -V 1.0 ``` ### Response #### Success Response Installs the specified .deb packages. Output will be from `dpkg -i` or `debpkg -i`. #### Response Example ``` Selecting previously unselected package mypackage. (Reading database ... 123456 files and directories currently installed.) Preparing to unpack .../mypackage_1.0-1_amd64.deb ... Unpacking mypackage (1.0-1) ... dpkg: dependency problems prevent configuration of mypackage (1.0-1): mypackage depends on some-dependency; however: Package some-dependency is not installed. dpkg: error processing package mypackage (--install): dependency problems - leaving unconfigured Errors were encountered while processing: mypackage ``` ### Error Handling - Errors related to package installation (e.g., dependency issues) will be reported. - Requires root privileges or the ability for `debpkg` to run as root. ``` -------------------------------- ### Get salsa path Source: https://manpages.debian.org/testing/devscripts/salsa.1.de.html Retrieve the salsa path from a local git repository. ```bash salsa path salsa path ./directory ``` -------------------------------- ### Pipeline Schedule Cron Format Source: https://manpages.debian.org/testing/devscripts/salsa.1.de.html Example of a cron schedule string for pipeline automation. ```text 0 1 * * *. ``` -------------------------------- ### SourceForge Watch File with Options Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5 Configure uscan options for SourceForge projects, including version and filename mangling. This example uses '%' as a separator and customizes the download URL pattern for audacity. ```bash version=4 opts="uversionmangle=s/-pre/~pre/, \ filenamemangle=s%(?:.*)audacity-minsrc-(.+)\.tar\.xz/download%\ audacity-$1.tar.xz%" http://sourceforge.net/projects/audacity/files/audacity/@ANY_VERSION@/ (?:.*)audacity-minsrc-@ANY_VERSION@@ARCHIVE_EXT@/download ``` -------------------------------- ### Checksum Calculation Example Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5.en.html Illustrates the calculation of a checksum version for grouped npm packages. ```text Main: 2.0.6 Comp1: 1 . 2 . 4 Comp2: 2 . 0 . 1 Comp3: 10 . 0 ================================ Result : 1+2+10 . 2+0+0 . 4+1 Checksum: 13 . 2 . 5 ================================ Final Version: 2.0.6+~cs13.2.5 ``` -------------------------------- ### Checksum Version Calculation Example Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5 Illustrates the calculation of a checksum version for grouped packages. ```plaintext Main: 2.0.6 Comp1: 1 . 2 . 4 Comp2: 2 . 0 . 1 Comp3: 10 . 0 ================================ Result : 1+2+10 . 2+0+0 . 4+1 Checksum: 13 . 2 . 5 ================================ Final Version: 2.0.6+~cs13.2.5 ``` -------------------------------- ### Create chroot from buildinfo file Source: https://manpages.debian.org/testing/devscripts/debootsnap.1.en.html Use a .buildinfo file to specify the exact package versions for the chroot. ```shell $ debootsnap --buildinfo=./package.buildinfo > ./chroot.tar ``` -------------------------------- ### GET /wnpp-check Source: https://manpages.debian.org/testing/devscripts/wnpp-check.1.en.html Checks if the provided package names are currently listed in the WNPP database. ```APIDOC ## GET /wnpp-check ### Description Downloads the lists of packages currently listed as ITPed or RFPed from the WNPP website and checks if the specified packages appear in those lists. ### Method GET ### Parameters #### Query Parameters - **package** (string) - Required - The name of the source package to check. Multiple packages can be provided. - **--exact, -e** (flag) - Optional - Require an exact package name match instead of the default substring match. ### Exit Status - **0**: None of the packages supplied has an open ITP or RFP. - **1**: Either an error occurred or at least one package supplied has an open ITP or RFP. ``` -------------------------------- ### Create a Container with Multiple Packages Source: https://manpages.debian.org/testing/devscripts/deb2docker.1.en.html Build a Docker container containing both x11-apps and meshlab. ```bash deb2docker x11-apps meshlab ``` -------------------------------- ### PyPI Specific Project URL Format Source: https://manpages.debian.org/testing/devscripts/debian-watch-4.5.en.html A specific example for cfn-sphere on PyPI using the redirector. ```bash version=4 https://pypi.python.org/packages/source/c/cfn-sphere/ \ cfn-sphere-@ANY_VERSION@@ARCHIVE_EXT@ ``` -------------------------------- ### Create New Project Source: https://manpages.debian.org/testing/devscripts/salsa.1.de.html Create a new public empty project. Projects are created in a group directory if specified, otherwise in the user directory. ```bash salsa --user yadd create_project test ``` ```bash salsa --group js-team --kgb --irc-channel=devscripts create_project test ``` -------------------------------- ### HTTP Header Examples Source: https://manpages.debian.org/testing/devscripts/uscan.1.en.html Illustrates correct and incorrect usage of the --http-header option with different URL formats. Ensure the baseUrl precisely matches the target URL's base. ```text | --http-header value | Good for | |------------------------------------+-----------------------------| | https://example.org.com@Hdr=Value | https://example.org.com/... | | https://e.com:1879@Hdr=Value | https://e.com:1879/... | | https://e.com:1879/dir@Hdr=Value | https://e.com:1879/dir/... | ``` -------------------------------- ### Query packages by maintainer shortcut Source: https://manpages.debian.org/testing/devscripts/ltnu.1.en.html Example usage of the ltnu command using a predefined maintainer shortcut. ```bash $ ltnu pkg-zsh source | ver | uploaded -------------------------+--------------+------------------------ zgen | 0~20150919-3 | 2016-08-24 04:55:31+00 zplug | 2.4.1-1 | 2017-01-13 09:51:26+00 zsh-syntax-highlighting | 0.6.0-1 | 2017-08-30 09:06:26+00 zsh | 5.4.2-2 | 2017-11-02 20:56:55+00 (4 rows) ``` -------------------------------- ### Rebuild a package Source: https://manpages.debian.org/testing/devscripts/debrebuild.1 Example command to rebuild a package using mmdebstrap and specifying a build result directory. ```bash $ debrebuild --buildresult=./artifacts --builder=mmdebstrap hello_2.10-2_amd64.buildinfo ```