% !TEX root = BuildWithGBP.nw% ===> this file was generated automatically by noweave --- better not edit it
\part{How a shell script helps to build a \texttt{Debian} package} 

\chapter{First steps in the program script} \label{chap:FirstSteps} 

Now we start with the program script\index{Program script}. This helps to build a \texttt{Debian} package and supports the upload of the same. Thereby the program flow\index{Program flow} gives a purposeful sequence of the necessary steps. The program script builds thus no \texttt{Debian} packages, but supports as an assistant the Maintainer. This is also explicitly pointed out in the initial dialog. (Chapter \ref{sec:Intro}, page \pageref{sec:Intro}) 

The prerequisite is that all required packages are installed and the system is set up accordingly (chapter \ref{chap:SystemSetup}, page \pageref{chap:SystemSetup}). 

The program script has a modular structure, so that one can "get out" at many points and "get in" again later. So you don't always have to carry out the building process "`in one go"' until completion. 

The program flow visible to the user starts in any case with a start dialog\index{Start dialog} (chapter \ref{sec:Intro}, page \pageref{sec:Intro}). 

Building a new \texttt{Debian} package first requires creating a new project (chapter \ref{chap:CreateNewProject}, page \pageref{chap:CreateNewProject}). 

All the following points are at least essentially taken care of by the program script. 

\begin{description} \item[Configuration file] The program requires a \index{Configuration file} configuration file (chapter \ref{sec:ConfigFileCreate}, page \pageref{sec:ConfigFileCreate}), which is initially created by the program script. This can be changed at any time. \item[System setup] To build a \texttt{Debian} package, the following preparatory tasks, among others, must be performed: 

\begin{description} \item[Providing the required directories] Creating the directories is described in chapter \ref{subsec:AnlegenVerzeichnisse}, page \pageref{subsec:AnlegenVerzeichnisse}. \item[Setting up a Git repository] Setting up the local Git repository (chapter \ref{sec:LokalesGitRepoAnlegen}, page \pageref{sec:LokalesGitRepoAnlegen}) must be done before running \textit{gbp import-orig} (chapter \ref{subsec:GbpImportOrig}, page \pageref{subsec:GbpImportOrig}) \end{description} 

\item[Providing the source code] This is described in chapter \ref{sec:DownloadTools}, page \pageref{sec:DownloadTools}. \item[Providing the required files in the \textit{debian/} directory] Creating the files in the \textit{debian/} directory is done as part of building the \texttt{Debian} revision (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}). \item[Build] This is described in Chapter \ref{chap:Bauen}, page \pageref{chap:Bauen} \item[Test -- as much as possible] This is described in Chapter \ref{chap:Ueberpruefungen}, page \pageref{chap:Ueberpruefungen}. \item[Upload] This is described in chapter \ref{chap:UploadPackage}, page \pageref{chap:UploadPackage}. \end{description} 

It's a long way to uploading. But as we all know, even the longest way begins with the first step. It should still be noted that the program script is operated keyboard-driven (with the TAB key). Control with the mouse can lead to unexpected effects. 

\section{The beginning is at the end} \label{sec:Hauptprogramm} 

The program script contains many functions. 

The main program\index{Main program} simply calls the \textit{BuildApp} function. It is at the end of the program script. 

\nwfilename{Part3.nw}\nwbegincode{1}\sublabel{NW4L0rMe-2dfaZH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2dfaZH-1}}}\moddef{MainProgram~{\nwtagstyle{}\subpageref{NW4L0rMe-2dfaZH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2uaRFM-1}}\nwenddeflinemarkup
############## 
# Here it starts
BuildApp 

############## 
# This is the end, my friend \nwused{\\
{NW4L0rMe-2uaRFM-1}}\nwendcode{}\nwbegindocs{2}\nwdocspar 

\section{And this is what the user sees first.} \label{sec:Intro} 

The \textit{BuildApp} function essentially controls the program flow\index{Program flow} by calling other functions. 

The first thing it does is present the program to the user. 

\nwenddocs{}\nwbegincode{3}\sublabel{NW4L0rMe-1tFcJG-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1tFcJG-1}}}\moddef{BuildApp~{\nwtagstyle{}\subpageref{NW4L0rMe-1tFcJG-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-a0WIu-1}}\nwenddeflinemarkup 
function BuildApp\{
    # Called by main program 

        ##############  

    # Intro 

        ##############  

    intro="Assistent to build simple Debian packages\\n
    using git-buildpackage\\n 
    Authors: Mechtilde Stehmann\\n 
             Michael Stehmann\\n 
    Version: 0.8.4\\n 
    License: GPL v3+\\n 
    This program does not build Debian packages itself. 
    It is only an assistent for the package maintainer." 

    whiptail --title "Introduction" --msgbox "$intro" 20 60 

\LA{}BuildApp3~{\nwtagstyle{}\subpageref{NW4L0rMe-4KRvn1-1}}\RA{} \nwused{\\
{NW4L0rMe-a0WIu-1}}\nwendcode{}\nwbegindocs{4}\nwdocspar 

The following welcome dialog appears for this purpose.. 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/Intro.png} \caption{Start screen} \end{figure} 

Then this function queries the name of the corresponding project\index{Project} with the \textit{AskOrigName} function (chapter \ref{sec:ProjektnamenAbfragen}, page \pageref{sec:ProjektnamenAbfragen}). 

\nwenddocs{}\nwbegincode{5}\sublabel{NW4L0rMe-4KRvn1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4KRvn1-1}}}\moddef{BuildApp3~{\nwtagstyle{}\subpageref{NW4L0rMe-4KRvn1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1tFcJG-1}}\nwenddeflinemarkup 
    # Definitions of Project 
    AskOrigName 
    CreateDirsAndLogFile 

    # Flag for additional gbp buildpackage options 
    OptFlag=0 

        ##############  

    # End of intro 

\LA{}BuildApp7~{\nwtagstyle{}\subpageref{NW4L0rMe-3pVebz-1}}\RA{} \nwused{\\
{NW4L0rMe-1tFcJG-1}}\nwendcode{}\nwbegindocs{6}\nwdocspar 

Finally, this function \textit{BuildApp} checks the existence of the necessary local infrastructure (configuration file (chapter \ref{sec:ConfigFileCreate}, page \pageref{sec:ConfigFileCreate}), directories (chapter \ref{subsec:AnlegenVerzeichnisse}, page \pageref{subsec:AnlegenVerzeichnisse}), Git repository (chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch})) and takes care of their creation if necessary. 

\section{Request project name} \label{sec:ProjektnamenAbfragen} 

The project name\index{Project name} of an existing project is now queried or specified for a new project. The insertion of the project name can also be done by \textit{Copy \& Paste}. This possibility is a special feature of \textit{whiptail}. 

\nwenddocs{}\nwbegincode{7}\sublabel{NW4L0rMe-4d0TUI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4d0TUI-1}}}\moddef{AskOrigName~{\nwtagstyle{}\subpageref{NW4L0rMe-4d0TUI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3CAFBW-1}}
\nwenddeflinemarkup 
function AskOrigName \{ 
    # Called by BuildApp ConfigFileLEC and itself 

    # Name of the project (without this name the app cannot work) 
    OrigName=$(whiptail --title "This name is required!" \\ 
    --inputbox "Name of the project:" \\ 
    --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3)
\LA{}AskOrigName1~{\nwtagstyle{}\subpageref{NW4L0rMe-2dk0pw-1}}\RA{} \nwused{\\{NW4L0rMe-3CAFBW-1}}\nwendcode{}\nwbegindocs{8}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ProjectName.png} \caption{Specification of the project name.} \end{figure} 

A \textit{whiptail -{}-inputbox} requires redirections of the output using file identifiers (\emph{3>\&2 2>\&1 1>\&3}). 

\nwenddocs{}\nwbegincode{9}\sublabel{NW4L0rMe-2dk0pw-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2dk0pw-1}}}\moddef{AskOrigName1~{\nwtagstyle{}\subpageref{NW4L0rMe-2dk0pw-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4d0TUI-1}}\nwenddeflinemarkup 
    if [ $? -ne 0 ] 
    then whiptail --title "Bye" --msgbox "Bye" 15 60 
        exit 
    fi 

\LA{}AskOrigName2~{\nwtagstyle{}\subpageref{NW4L0rMe-a0WIu-1}}\RA{} \nwused{\\{NW4L0rMe-4d0TUI-1}}\nwendcode{}\nwbegindocs{10}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/bye.png} \caption{Bye} \end{figure} 

Only the first three file identifiers (starting with 0) have a standardised meaning: \begin{itemize} \item{0 - stdin - standard input} \item{1 - stdout - standard output} \item{2 - stderr - standard error display} \end{itemize} 

If the project already exists, it continues with the display of the configuration file (chapter \ref{sec:ConfigFileLaden}, page \pageref{sec:ConfigFileLaden}), the selection of a Git branch (chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}) and then the task selection (chapter \ref{sec:Aufgabenauswahl}, page \pageref{sec:Aufgabenauswahl}). 

If \textbf{no} project name is entered, a note is displayed. The entry of a project name is mandatory. With \textit{Exit} the programme is terminated. 

\nwenddocs{}\nwbegincode{11}\sublabel{NW4L0rMe-a0WIu-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-a0WIu-1}}}\moddef{AskOrigName2~{\nwtagstyle{}\subpageref{NW4L0rMe-a0WIu-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2dk0pw-1}}\nwenddeflinemarkup 
    if [ -z "$\{OrigName\}" ] 
    then whiptail --title "No project name" \\ 
         --msgbox "You have to identify a project name\\n \\ 
         even it is a new project!" 15 60 
         AskOrigName
    fi 
    ConfigFileLEC
 \} 

\LA{}BuildApp~{\nwtagstyle{}\subpageref{NW4L0rMe-1tFcJG-1}}\RA{} \nwused{\\
{NW4L0rMe-2dk0pw-1}}\nwendcode{}\nwbegindocs{12}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/NoProjectName.png} \caption{No project name specified.} \end{figure} 

After confirming \textit{OK}, the input dialogue is displayed again. 

\section{Next steps} 

The next steps now depend on whether a configuration file\index{Configuration file} already exists for the project, as described in chapter \ref{subsubsec:KonfigProjekt}, page \pageref{subsubsec:KonfigProjekt}. 

In this case it is ``loaded'' (chapter \ref{sec:ConfigFileLaden}, page \pageref{sec:ConfigFileLaden}). 

Otherwise, the configuration file is created again. 

\chapter{Create a new project} \label{chap:CreateNewProject} 

To create a new project first the configuration file and the necessary infrastructure are created. 

\section{Create configuration file} \label{sec:ConfigFileCreate} 

The configuration file is stored in the user's \index{home directory} home directory in the \textit{.debian\_project/} directory as the \textit{<project name>} file.  

\nwenddocs{}\nwbegincode{13}\sublabel{NW4L0rMe-QjVKo-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-QjVKo-1}}}\moddef{ConfigFileLEC~{\nwtagstyle{}\subpageref{NW4L0rMe-QjVKo-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1vvaZu-1}}\nwenddeflinemarkup 
function ConfigFileLEC \{ 
    # Called by AskOrigName CreateNewBranch TaskSelect OwnServer 

    ## Load, edit or create config file - using AskConfig 

    # Path to config files directory 
    ConfigPath=~/.debian_project/ 
    changeflag=0 

\LA    {}ConfigFileLEC1~{\nwtagstyle{}\subpageref{NW4L0rMe-3B7jzR-1}}\RA{} \nwused{\\{NW4L0rMe-1vvaZu-1}}\nwendcode{}\nwbegindocs{14}\nwdocspar 

The function \textit{ConfigFileLEC} checks first whether a configuration file with the project name exists. If the result of the check is negative, the message occurs that no configuration file with this name could be found. 

\nwenddocs{}\nwbegincode{15}\sublabel{NW4L0rMe-1rerev-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1rerev-1}}}\moddef{ConfigFileLEC4~{\nwtagstyle{}\subpageref{NW4L0rMe-1rerev-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3wF9a9-1}}\nwenddeflinemarkup 
    else 
        if whiptail --title "Config file not found" \\
        --yesno "There is no config file for $\{OrigName\}\\n \\
        which you can edit.\\n \\ 
        Do you want to create a new project?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            changeflag=1 \LA
{}ConfigFileLEC5~{\nwtagstyle{}\subpageref{NW4L0rMe-2eTs21-1}}\RA{} \nwused{\\{NW4L0rMe-3wF9a9-1}}\nwendcode{}\nwbegindocs{16}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/NoConfigFileFound.png} \caption{No configuration file found.} \end{figure} 

A \textit{whiptail --yesno} returns 0 or true if the question is affirmative, and 1 or false if it is negative. 

If this question is answered in the affirmative, the directory \textit{.debian\_project} is also created as a precautionary measure as \textit{ConfigPath}, if it does not already exist. Then the function \textit{AskConfig} is called, which creates the configuration file. 

\nwenddocs{}\nwbegincode{17}\sublabel{NW4L0rMe-2eTs21-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2eTs21-1}}}\moddef{ConfigFileLEC5~{\nwtagstyle{}\subpageref{NW4L0rMe-2eTs21-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1rerev-1}}\nwenddeflinemarkup 
            mkdir --parents $\{ConfigPath\} 
            AskConfig 
        else 
            AskOrigName 
        fi 
    fi 

\LA{}ConfigFileLEC6~{\nwtagstyle{}\subpageref{NW4L0rMe-Zbyyj-1}}\RA{} \nwused{\\{NW4L0rMe-1rerev-1}}\nwendcode{}\nwbegindocs{18}\nwdocspar 

The query whether to create a new project allows the user to correct typos when entering the project name, if he/she negates them. 

The following sections discuss the variables included in the configuration file. First follow the variables that are required for all packages. Then follow the variables. which are only required for one group of packages at a time (for \texttt{Java} packages see chapter \ref{subsubsec:ParameterJava}, page \pageref{subsubsec:ParameterJava}, for \textit{webext} packages see chapter \ref{subsubsec:ParameterWebext}, page \pageref{subsubsec:ParameterWebext}). 

\subsection{Query common variables for configuration file} \label{subsec:AskConfig} 

The function \textit{AskConfig} assigns values to the variables to be contained in the configuration file in its first part. This is done by querying the individual variables. Saving the configuration file is then described in chapter \ref{subsec:SaveConfig}, page \pageref{subsec:SaveConfig}. 

It is checked whether a value has been assigned to the respective variable. 

This is done first for the name of the source package, which is assigned as the value of the \textit{SourceName} veriable. 

The name of the source package is the name that the upstream project has given to its software. 

\nwenddocs{}\nwbegincode{19}\sublabel{NW4L0rMe-3aFUbk-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3aFUbk-1}}}\moddef{AskConfig~{\nwtagstyle{}\subpageref{NW4L0rMe-3aFUbk-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1gTQn9-1}}\nwenddeflinemarkup 
function AskConfig \{ 
    # Called by ConfigFileLEC 

    if [ -z "$\{SourceName\}" ] 
    then 
        SourceName=$(whiptail --title "Source Package Name" \\ 
        --inputbox "Name of the source package:" \\ 
        --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

        if [ $? -ne 0 ] # Cancel-Button was pressed 
        then 
            exit 
        else
            changeflag=1 
        fi
    fi
 

\LA{}AskConfig1~{\nwtagstyle{}\subpageref{NW4L0rMe-3WXxaw-1}}\RA{} \nwused{\\{NW4L0rMe-1gTQn9-1}}\nwendcode{}\nwbegindocs{20}\nwdocspar \begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SourceName.png} \caption{Name of the source package} \end{figure} 

If the variable contains a value, it is asked whether this is the correct value. This serves on the one hand the control of the previous input and on the other hand this opens the possibility of editing (chapter \ref{sec:ConfigFileLaden}, page \pageref{sec:ConfigFileLaden}) the configuration file by means of the function \textit{AskConfig}. 

\nwenddocs{}\nwbegincode{21}\sublabel{NW4L0rMe-3WXxaw-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3WXxaw-1}}}\moddef{AskConfig1~{\nwtagstyle{}\subpageref{NW4L0rMe-3WXxaw-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3aFUbk-1}}\nwenddeflinemarkup
    if ! whiptail --title "Source Package Name" \\
    --yesno "The name of the source package is $\{SourceName\}" \\ 
    --yes-button "Yes" --no-button "No" 15 60

\LA{}AskConfig2~{\nwtagstyle{}\subpageref{NW4L0rMe-1SoT3u-1}}\RA{} \nwused{\\
{NW4L0rMe-3aFUbk-1}}\nwendcode{}\nwbegindocs{22}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SourcePackageName.png} \caption{Specify the name of the source package} \end{figure} 

\nwenddocs{}\nwbegincode{23}\sublabel{NW4L0rMe-1SoT3u-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1SoT3u-1}}}\moddef{AskConfig2~{\nwtagstyle{}\subpageref{NW4L0rMe-1SoT3u-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3WXxaw-1}}\nwenddeflinemarkup 
    then 
        SourceName=$(whiptail --title "Name of the source package" \\ 
        --inputbox "Real name of the source package:" \\ 
        --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

        if [ $\{#SourceName\} -eq 0 -o $? -ne 0 ] 
        then 
            exit 
        else 
            changeflag=1 
        fi 
    fi 

\LA{}AskConfig3~{\nwtagstyle{}\subpageref{NW4L0rMe-3QImjW-1}}\RA{} \nwused{\\{NW4L0rMe-3WXxaw-1}}\nwendcode{}\nwbegindocs{24}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/RealSourceName.png} \caption{Specify the correct name of the source package} \end{figure} 

Now the name of the package to be built is determined. For this first the value of the variable \textit{SourceName} is assigned to the variable \textit{PackName} as default value. Also for this a confirmation is queried and a correction possibility is opened. 

\nwenddocs{}\nwbegincode{25}\sublabel{NW4L0rMe-3QImjW-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3QImjW-1}}}\moddef{AskConfig3~{\nwtagstyle{}\subpageref{NW4L0rMe-3QImjW-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1SoT3u-1}}\nwenddeflinemarkup 
    if [ -z "$\{PackName\}" ] 
    then 
        PackName=$\{SourceName\} tadd=", too?" 
    else 
        tadd="?" 
    fi
 

    if ! whiptail --title "PackName" \\ 
    --yesno "The name of the package is $\{PackName\}$\{tadd\}" \\ 
    --yes-button "Yes" --no-button "No" 15 60
 \LA{}AskConfig3-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3AWmCJ-1}}\RA{} \nwused{\\
{NW4L0rMe-1SoT3u-1}}\nwendcode{}\nwbegindocs{26}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/PackageName.png} \caption{Correct name of the package specified.} \end{figure} 

\nwenddocs{}\nwbegincode{27}\sublabel{NW4L0rMe-3AWmCJ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3AWmCJ-1}}}\moddef{AskConfig3-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3AWmCJ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3QImjW-1}}\nwenddeflinemarkup 
    then 
        PackName=$(whiptail --title "Name of the Debian Package" \\ 
        --inputbox "Real name of the package,\\nwhich should be built:" \\ 
        --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

        if [ $\{#PackName\} -eq 0 -o $? -ne 0 ] 
        then 
            exit 
        else 
            changeflag=1 
        fi
    fi 

\LA{}AskConfig4~{\nwtagstyle{}\subpageref{NW4L0rMe-9LajO-1}}\RA{} \nwused{\\{NW4L0rMe-3QImjW-1}}\nwendcode{}\nwbegindocs{28}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/RealPackageName.png} \caption{Correct name of the package specified.} \end{figure} 

Now the name of the group is requested under which the Git repository on \textit{salsa.debian.org} should be created. 

\nwenddocs{}\nwbegincode{29}\sublabel{NW4L0rMe-9LajO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-9LajO-1}}}\moddef{AskConfig4~{\nwtagstyle{}\subpageref{NW4L0rMe-9LajO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3AWmCJ-1}}\nwenddeflinemarkup 
    if [ -z "$\{SalsaName\}" ] 
    then 
        SalsaName=$(whiptail --title "Group at Salsa" \\ 
        --inputbox "Group on salsa.debian.org:" \\ 
        --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3)
        if [ $? -ne 0 ] 
        # Cancel-Button was pressed 
        then
            exit
        else 
            SalsaName=$\{SalsaName\}"/"$\{SourceName\}".git" 
        fi 
    fi 

\LA{}AskConfig5~{\nwtagstyle{}\subpageref{NW4L0rMe-4dWUCc-1}}\RA{} \nwused{\\{NW4L0rMe-3AWmCJ-1}}\nwendcode{}\nwbegindocs{30}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SalsaGroup.png} \caption{Name of the group specified on \textit{salsa.debian.org}.} \end{figure} 

There are different packaging teams (for example for \texttt{Java} or \texttt{Python} packages)\footnote{ \url{https://wiki.debian.org/Teams\#Packaging_teams}}. 

For the \texttt{python} team, the \textit{packages} directory must also be specified, i.e. \textit{python-team/packages}. 

These have their own groups on \textit{salsa.debian.org}. If a package is to be maintained independently of a packaging team, enter \textit{Debian} as the group. 

\nwenddocs{}\nwbegincode{31}\sublabel{NW4L0rMe-4dWUCc-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4dWUCc-1}}}\moddef{AskConfig5~{\nwtagstyle{}\subpageref{NW4L0rMe-4dWUCc-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-9LajO-1}}\nwenddeflinemarkup 
    if ! whiptail --title "Salsa Name" \\
    --yesno "Group and project name of the repo on salsa.debian.org is $SalsaName" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
\LA{}AskConfig5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3AWq4p-1}}\RA{} \nwused{\\
{NW4L0rMe-9LajO-1}}\nwendcode{}\nwbegindocs{32}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SalsaGroupRepo.png} \caption{Name of the group specified on \textit{salsa.debian.org}.} \end{figure} 

\nwenddocs{}\nwbegincode{33}\sublabel{NW4L0rMe-3AWq4p-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3AWq4p-1}}}\moddef{AskConfig5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3AWq4p-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4dWUCc-1}}\nwenddeflinemarkup 
    then 
        SalsaName=$(whiptail --title "Salsa Group and Project Name" \\ 
        --inputbox "Real group and project name of the repo on salsa.debian.org:" \\ 
        --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

\LA{}AskConfig5-2~{\nwtagstyle{}\subpageref{NW4L0rMe-dH415-1}}\RA{} \nwused{\\{NW4L0rMe-4dWUCc-1}}\nwendcode{}\nwbegindocs{34}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SalsaGroupRepoReal.png} \caption{Name of the group specified on \textit{salsa.debian.org}.} \end{figure} 

\nwenddocs{}\nwbegincode{35}\sublabel{NW4L0rMe-dH415-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-dH415-1}}}\moddef{AskConfig5-2~{\nwtagstyle{}\subpageref{NW4L0rMe-dH415-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3AWq4p-1}}\nwenddeflinemarkup 
        if [ $\{#SalsaName\} -eq 0 -o $? -ne 0 ] 
        then 
            exit 
        else 
            changeflag=1 
        fi 
    fi 

\LA{}AskConfig6~{\nwtagstyle{}\subpageref{NW4L0rMe-26Gi8s-1}}\RA{} \nwused{\\{NW4L0rMe-3AWq4p-1}}\nwendcode{}\nwbegindocs{36}\nwdocspar 

With \url{https://salsa.debian.org/explore/groups} all public groups can be displayed. 

It is now checked whether a file \textit{DefaultValues} exists in the directory \textit{\textasciitilde/.debian\_project}. In this file, variables are assigned values that apply to many projects (chapter \ref{subsubsec:DefaultValues}, page \pageref{subsubsec:DefaultValues}). The \textit{DefaultValues} script is then executed. 

\nwenddocs{}\nwbegincode{37}\sublabel{NW4L0rMe-26Gi8s-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-26Gi8s-1}}}\moddef{AskConfig6~{\nwtagstyle{}\subpageref{NW4L0rMe-26Gi8s-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-dH415-1}}\nwenddeflinemarkup 
    if [ -f $\{ConfigPath\}/DefaultValues ] 
    then 
        . $\{ConfigPath\}/DefaultValues 
    fi 

\LA{}AskConfig7~{\nwtagstyle{}\subpageref{NW4L0rMe-2U714I-1}}\RA{} \nwused{\\{NW4L0rMe-dH415-1}}\nwendcode{}\nwbegindocs{38}\nwdocspar 

The variable \textit{DefaultProjectPath} is assigned as value the path which leads to the directory containing the individual project directories as subdirectories. 

\nwenddocs{}\nwbegincode{39}\sublabel{NW4L0rMe-2U714I-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2U714I-1}}}\moddef{AskConfig7~{\nwtagstyle{}\subpageref{NW4L0rMe-2U714I-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-26Gi8s-1}}\nwenddeflinemarkup 
    if [ -n "$\{DefaultProjectPath\}" ] 
    then 
        ProjectPath=$\{DefaultProjectPath\} 
    fi 

    if [ -z "$\{ProjectPath\}" ] 
    then 
        ProjectPath=$(whiptail --title "Path to Project Directory" \\ 
        --inputbox "Path to the project directory on your local machine\\n \\
        (without '/$\{OrigName\}':)" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
        if [ -z "$\{ProjectPath\}" ] 
        then 
            echo -e "Path to the project directory on your local machine\\n \\ 
            (without '/$\{OrigName\}':)" 
            read ProjectPath 
        fi 
        changeflag=1 
    fi 

    if ! whiptail --title "ProjectPath" \\ 
    --yesno "Path to the project directory on your local machine \\ 
    is $\{ProjectPath\}/$\{OrigName\}" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
    then 
        ProjectPath=$(whiptail --title "Path to Project Directory" \\ 
        --inputbox "Real path to the project directory on your local machine\\n \\ 
        (without '/$\{OrigName\}':" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
        if [ -z "$\{ProjectPath\}" ] 
        then 
            echo -e "Path to the project directory on your local machine\\n \\ 
            (without '/$\{OrigName\}':)" 
            read ProjectPath 
        fi 
        if [ -z "$\{ProjectPath\}" ] 
        then 
            exit 
        else 
            changeflag=1 
        fi 
    fi
 

\LA{}AskConfig10~{\nwtagstyle{}\subpageref{NW4L0rMe-1G9JzK-1}}\RA{} \nwused{\\{NW4L0rMe-26Gi8s-1}}\nwendcode{}\nwbegindocs{40}\nwdocspar 

\subsection{Query special variables for the configuration file} 

Now the variables are determined that are only needed for special types of packages. Starting with the variables for \texttt{Java} packages (chapter \ref{subsubsec:ParameterJava}, page \pageref{subsubsec:ParameterJava} 

In addition, the path to a required plugin is entered in the configuration file, if necessary. 

\subsubsection{Identifying the plugin paths} \label{subsubsec:DetectPlugins} 

Certain types of packages are built using plugins to the (main) script. These are packages built with \textit{maven}, \texttt{Mozilla} extensions, and \texttt{Python} programs. 

The \textit{DetectPlugins} function detects the paths to the plugin script files. It can also be used for other plugins. 

When calling \textit{DetectPlugins}, two options must be passed. The first option (\textit{\$1}) is passed to \textit{PluginName} and the second (\textit{\$2}) to \textit{PluginFile}. 

\nwenddocs{}\nwbegincode{41}\sublabel{NW4L0rMe-4V5mzF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4V5mzF-1}}}\moddef{DetectPlugins~{\nwtagstyle{}\subpageref{NW4L0rMe-4V5mzF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-z7rFD-1}}\nwenddeflinemarkup 
function DetectPlugins \{ 
    # Called by AskConfig 

    # This function needs two options: the name of the plugin 
    # and the name of the plugin script file 
    PluginName=$1 
    PluginFile=$2 

    # Determine path to the (needed) plugin script 
    PluginPathL=$(locate $\{PluginFile\}) 
    PluginPathA=($\{PluginPathL\}) 

    # If there is only one result 
    if [ $\{#PluginPathA[@]\} -eq 1 ] 
    then 
        PluginPath=$\{PluginPathA[0]\} 
    # If there are some results 
    elif [ $\{#PluginPathA[@]\} -gt 1 ] 
    then 
        i=0; slct='' 
        for element in $\{PluginPathA[*]\} 
        do 
           slct=$slct' '$i' '$\{element\}' off ' 
           i=$(expr $i + 1) 
        done 

        PluginNr=$(whiptail --title "$\{PluginName\} plugin found" \\ 
        --radiolist "Select:" 15 60 5 $slct \\ 
        --cancel-button "Cancel" 3>&2 2>&1 1>&3) 

\LA{}DetectPlugins3~{\nwtagstyle{}\subpageref{NW4L0rMe-1gTQn9-1}}\RA{} \nwused{\\{NW4L0rMe-7ORWt-1}}\nwendcode{}\nwbegindocs{42}\nwdocspar 

% ToDo Exit ausarbeiten
\nwenddocs{}\nwbegincode{43}\sublabel{NW4L0rMe-1gTQn9-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1gTQn9-1}}}\moddef{DetectPlugins3~{\nwtagstyle{}\subpageref{NW4L0rMe-1gTQn9-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4V5mzF-1}}\nwenddeflinemarkup 
        if [ $? -eq 1 ] 
        then 
            return 24 
        fi 

        PluginPath=$\{PluginPathA[$\{PluginNr\}]\} 
    # If there is no result 
    else 
        PluginFlag=0 
        whiptail --title "File not found" \\ 
        --msgbox "'$\{PluginFile\}' was not located!" \\ 
        15 60 
        return 24 
    fi
 \} 

\LA{}AskConfig~{\nwtagstyle{}\subpageref{NW4L0rMe-3aFUbk-1}}\RA{} \nwused{\\{NW4L0rMe-4V5mzF-1}}\nwendcode{}\nwbegindocs{44}\nwdocspar 

\subsubsection{Variable query for \texttt{Java} packages} \label{subsubsec:ParameterJava} 

Certain types of packages require special handling. This is done, among other things, by separate scripts. This handling is controlled by "`flags"'. This also avoids unnecessary loading of the plugin scripts. 

\nwenddocs{}\nwbegincode{45}\sublabel{NW4L0rMe-1G9JzK-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1G9JzK-1}}}\moddef{AskConfig10~{\nwtagstyle{}\subpageref{NW4L0rMe-1G9JzK-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2U714I-1}}\nwenddeflinemarkup 
    # Java Flag 
    # This is needed to trigger special entries 
    # in debian/control and debian/rules 
    if [ -z "$\{JavaFlag\}" ] 
    then 
        if whiptail --title "Java" --defaultno \\ 
        --yesno "Do you want to build a Java package?" \\ 
        --yes-button "Yes" --no-button "No" --defaultno 15 60 
\LA{}AskConfig10-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1tT2l2-1}}\RA{} \nwused{\\{NW4L0rMe-2U714I-1}}\nwendcode{}\nwbegindocs{46}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/BuildJavaPackage.png} \caption{Should a \texttt{Java} package be built?} \end{figure} 

\nwenddocs{}\nwbegincode{47}\sublabel{NW4L0rMe-1tT2l2-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1tT2l2-1}}}\moddef{AskConfig10-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1tT2l2-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1G9JzK-1}}\nwenddeflinemarkup 
        then 
            JavaFlag=1 
        else 
            JavaFlag=0 
        fi 

        if [ $\{JavaFlag\} -eq 1 ] &&[ -z $\{JavaPluginPath\} ] 
        then 
            DetectPlugins 'Java' build-gbp-java-plugin.sh 
            if [ $? -eq 0 ] 
            then 
                JavaPluginPath=$\{PluginPath\} 
            else 
                # If 'DetectPlugins' returns 24 
                JavaFlag=0 
            fi 
        fi 
        changeflag=1 
    fi 

\LA{}AskConfig11~{\nwtagstyle{}\subpageref{NW4L0rMe-3FuQhS-1}}\RA{} \nwused{\\{NW4L0rMe-1G9JzK-1}}\nwendcode{}\nwbegindocs{48}\nwdocspar 

It is also queried whether the Maven plugin (chapter \ref{chap:MavenPlugin}, page \pageref{chap:MavenPlugin}) should be used. This is then localized in the system and the path to the script is stored in the configuration file. 

\nwenddocs{}\nwbegincode{49}\sublabel{NW4L0rMe-3FuQhS-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3FuQhS-1}}}\moddef{AskConfig11~{\nwtagstyle{}\subpageref{NW4L0rMe-3FuQhS-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1tT2l2-1}}\nwenddeflinemarkup 
    # Maven Plugin 
    if [ $\{JavaFlag\} -eq 1 ] 
    then 
        if [ -z "$\{MavenPluginFlag\}" ] 
        then 
            if whiptail --title "Maven" --defaultno \\ 
            --yesno "Should the (Java) package be built with maven?" \\ 
            --yes-button "Yes" --no-button "No" --defaultno 15 60 
            then 
                MavenPluginFlag=1 
            else 
                MavenPluginFlag=0 
            fi 
            changeflag=1 
        fi 

\LA{}AskConfig12~{\nwtagstyle{}\subpageref{NW4L0rMe-18lkbe-1}}\RA{} \nwused{\\{NW4L0rMe-1tT2l2-1}}\nwendcode{}\nwbegindocs{50}\nwdocspar 

The following code now determines the path to the Maven plugin. 

\nwenddocs{}\nwbegincode{51}\sublabel{NW4L0rMe-18lkbe-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-18lkbe-1}}}\moddef{AskConfig12~{\nwtagstyle{}\subpageref{NW4L0rMe-18lkbe-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3FuQhS-1}}\nwenddeflinemarkup 
        if [ $\{MavenPluginFlag\} -eq 1 ] &&[ -z $\{MavenPluginPath\} ] 
        then 
            DetectPlugins 'Maven' build-gbp-maven-plugin.sh 
            if [ $? -eq 0 ] 
            then 
                MavenPluginPath=$\{PluginPath\} 
            else 
                # If 'DetectPlugins' returns 24 
                MavenPluginFlag=0 
            fi 
        fi 
        changeflag=1 
    fi 

\LA{}AskConfig15~{\nwtagstyle{}\subpageref{NW4L0rMe-2ZcCJq-1}}\RA{} \nwused{\\{NW4L0rMe-3FuQhS-1}}\nwendcode{}\nwbegindocs{52}\nwdocspar 

When calling \textit{DetectPlugins}, two options must be passed. Here \textit{'Maven'} is passed as \textit{\$1} to the variable \textit{PluginName} and \textit{build-gbp-maven-plugin.sh} is passed as \textit{\$2} to the variable \textit{PluginFile} (see chapter \ref{subsubsec:DetectPlugins}, page \pageref{subsubsec:DetectPlugins}). 

\subsubsection{Variable query for \texttt{Mozilla} extensions} \label{subsubsec:ParameterWebext} 

%Todo. Beschreibung fehlt noch
\nwenddocs{}\nwbegincode{53}\sublabel{NW4L0rMe-2ZcCJq-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2ZcCJq-1}}}\moddef{AskConfig15~{\nwtagstyle{}\subpageref{NW4L0rMe-2ZcCJq-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-18lkbe-1}}\nwenddeflinemarkup
    # Webext Flag 
    # This is needed to trigger special entries 
    # in debian/control and debian/rules 
    if [ -z "$\{WebextFlag\}" ] 
    then 
        if whiptail --title "Mozilla AddOns" --defaultno \\ 
        --yesno "Do you want to build a Mozilla AddOn package?" \\ 
        --yes-button "Yes" --no-button "No" --defaultno 15 60 
\LA{}AskConfig15-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1tT6TE-1}}\RA{} \nwused{\\{NW4L0rMe-18lkbe-1}}\nwendcode{}\nwbegindocs{54}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/BuildMozillaAddOn.png} \caption{Should an extension for Mozilla be packaged?} \end{figure} 

\nwenddocs{}\nwbegincode{55}\sublabel{NW4L0rMe-1tT6TE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1tT6TE-1}}}\moddef{AskConfig15-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1tT6TE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2ZcCJq-1}}\nwenddeflinemarkup 
        then 
            WebextFlag=1 
        else 
            WebextFlag=0 
        fi 

        if [ $\{WebextFlag\} -eq 1 ] &&[ -z $\{WebextPluginPath\} ] 
        then 
            DetectPlugins 'Webext' build-gbp-webext-plugin.sh 
            if [ $? -eq 0 ] 
            then 
                WebextPluginPath=$\{PluginPath\} 
            else 
                # If 'DetectPlugins' returns 24
                WebextFlag=0 
            fi 
        fi 
        changeflag=1 
    fi 

\LA{}AskConfig18~{\nwtagstyle{}\subpageref{NW4L0rMe-1ehcju-1}}\RA{} \nwused{\\{NW4L0rMe-2ZcCJq-1}}\nwendcode{}\nwbegindocs{56}\nwdocspar 

\subsubsection{Variable query for \texttt{Python3} packages} \label{subsubsec:ParameterPython} 

A corresponding plugin can also be used for packaging \texttt{Python packages}. For this, the required information is first requested and entered into the configuration file.. 

\nwenddocs{}\nwbegincode{57}\sublabel{NW4L0rMe-1ehcju-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1ehcju-1}}}\moddef{AskConfig18~{\nwtagstyle{}\subpageref{NW4L0rMe-1ehcju-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1tT6TE-1}}\nwenddeflinemarkup 
    # Python Flag 
    # This is needed to trigger special entries 
    # in debian/control and debian/rules 
    if [ -z "$\{PythonFlag\}" ] 
    then 
        if whiptail --title "Python3 programs" --defaultno \\ 
        --yesno "Do you want to build a Python3 package?" \\ 
        --yes-button "Yes" --no-button "No" --defaultno 15 60 
\LA{}AskConfig18-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1tT0jc-1}}\RA{} \nwused{\\{NW4L0rMe-1tT6TE-1}}\nwendcode{}\nwbegindocs{58}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/BuildPythonPackage.png} \caption{Should a \texttt{Python}3 pact be built?} \end{figure} 

\nwenddocs{}\nwbegincode{59}\sublabel{NW4L0rMe-1tT0jc-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1tT0jc-1}}}\moddef{AskConfig18-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1tT0jc-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1ehcju-1}}\nwenddeflinemarkup 
        then 
            PythonFlag=1 
        else 
            PythonFlag=0 
        fi 
\LA{}AskConfig19~{\nwtagstyle{}\subpageref{NW4L0rMe-3DDExq-1}}\RA{} \nwused{\\{NW4L0rMe-1ehcju-1}}\nwendcode{}\nwbegindocs{60}\nwdocspar 

In the following it is queried whether the path to the plugin is already known. If not, the \textit{DetectPlugins} function is used to search for it. (Chapter \ref{subsubsec:DetectPlugins}, page \pageref{subsubsec:DetectPlugins}) 

\nwenddocs{}\nwbegincode{61}\sublabel{NW4L0rMe-3DDExq-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3DDExq-1}}}\moddef{AskConfig19~{\nwtagstyle{}\subpageref{NW4L0rMe-3DDExq-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1tT0jc-1}}\nwenddeflinemarkup 
        if [ $\{PythonFlag\} -eq 1 ] &&[ -z $\{PythonPluginPath\} ] 
        then 
            DetectPlugins 'Python3' build-gbp-python-plugin.sh 
            if [ $? -eq 0 ] 
            then 
                PythonPluginPath=$\{PluginPath\} 
            else 
                # If 'DetectPlugins' returns 24 
                PluginFlag=0 
            fi 
        fi 
        changeflag=1 
    fi 

\LA{}AskConfig20~{\nwtagstyle{}\subpageref{NW4L0rMe-1FcBaw-1}}\RA{} \nwused{\\{NW4L0rMe-1tT0jc-1}}\nwendcode{}\nwbegindocs{62}\nwdocspar 

\subsection{Saving the configuration} \label{subsec:SaveConfig} 

The (re-)creation of the configuration file is done in the following part of the \textit{AskConfig} function. 

First it is checked whether a configuration file already exists for the project. If it exists, it will be deleted. 

The configuration file is a shell script. It therefore starts with a corresponding \textit{Shebang}. 

\nwenddocs{}\nwbegincode{63}\sublabel{NW4L0rMe-1FcBaw-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1FcBaw-1}}}\moddef{AskConfig20~{\nwtagstyle{}\subpageref{NW4L0rMe-1FcBaw-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3DDExq-1}}\nwenddeflinemarkup 
    if [ $changeflag -eq 1 ] 
    then 
        if [ -f $\{ConfigPath\}$\{OrigName\} ] 
        then 
            rm $\{ConfigPath\}$\{OrigName\} 
        fi 
        touch $\{ConfigPath\}$\{OrigName\} 

        # Shebang of the config file 
        SB='#!/usr/bin/bash' 

        # The config file is a shell script 
        echo $\{SB\} >> $\{ConfigPath\}$\{OrigName\} 
        echo '# ConfigFile for '$\{OrigName\} >> $\{ConfigPath\}$\{OrigName\} 
        echo '## General parameters' >> $\{ConfigPath\}$\{OrigName\} 
        echo 'SourceName='$\{SourceName\} >> $\{ConfigPath\}$\{OrigName\} 
        echo 'PackName='$\{PackName\} >> $\{ConfigPath\}$\{OrigName\} 
        echo 'ProjectPath='$\{ProjectPath\} >> $\{ConfigPath\}$\{OrigName\} 
        echo 'SalsaName='$\{SalsaName\} >> $\{ConfigPath\}$\{OrigName\}
\LA{}AskConfig22~{\nwtagstyle{}\subpageref{NW4L0rMe-19N0jW-1}}\RA{} \nwused{\\{NW4L0rMe-3DDExq-1}}\nwendcode{}\nwbegindocs{64}\nwdocspar 

The following entries in the configuration file are only created if corresponding flags are set. This applies to \texttt{java} packages. An additional entry is made if they are built with \textit{maven}. This also applies to extensions for \texttt{Firefox} and \texttt{Thunderbird} and programs in the \texttt{Python} programming language. 

\nwenddocs{}\nwbegincode{65}\sublabel{NW4L0rMe-19N0jW-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-19N0jW-1}}}\moddef{AskConfig22~{\nwtagstyle{}\subpageref{NW4L0rMe-19N0jW-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1FcBaw-1}}\nwenddeflinemarkup 
        echo '## Parameters for Java packages'>> $\{ConfigPath\}$\{OrigName\} 
        echo 'JavaFlag='$\{JavaFlag\} >> $\{ConfigPath\}$\{OrigName\} 
        if [ $\{JavaFlag\} -eq 1 ] 
        then 
            echo 'MavenPluginFlag='$\{MavenPluginFlag\} >> $\{ConfigPath\}$\{OrigName\} 
            if [ $\{MavenPluginFlag\} -eq 1 ] 
            then 
                echo 'MavenPluginPath='$\{MavenPluginPath\} >> $\{ConfigPath\}$\{OrigName\} 
            fi 
        fi 

        echo '## Parameters for Webext packages'>> $\{ConfigPath\}$\{OrigName\} 
        echo 'WebextFlag='$\{WebextFlag\} >> $\{ConfigPath\}$\{OrigName\} 
        if [ $\{WebextFlag\} -eq 1 ] 
        then 
            echo 'WebextPluginPath='$\{WebextPluginPath\} >> $\{ConfigPath\}$\{OrigName\} 
        fi 

        echo '## Parameters for Python3 packages'>> $\{ConfigPath\}$\{OrigName\} 
        echo 'PythonFlag='$\{PythonFlag\} >> $\{ConfigPath\}$\{OrigName\} 
        if [ $\{PythonFlag\} -eq 1 ] 
        then 
            echo 'PythonPluginPath='$\{PythonPluginPath\} >> $\{ConfigPath\}$\{OrigName\} 
        fi 
        changeflag=0 
    fi
 \} 

\LA{}ReplaceTilde~{\nwtagstyle{}\subpageref{NW4L0rMe-1vvaZu-1}}\RA{} \nwused{\\{NW4L0rMe-1FcBaw-1}}\nwendcode{}\nwbegindocs{66}\nwdocspar 

Since the tilde (\textasciitilde) in the path is not automatically replaced by \textit{/home/<username>} when the script steps, this must be done by a \textit{ReplaceTilde} function in the program script. Furthermore, any slash (/) at the end of the path is removed. 

\nwenddocs{}\nwbegincode{67}\sublabel{NW4L0rMe-Zbyyj-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-Zbyyj-1}}}\moddef{ConfigFileLEC6~{\nwtagstyle{}\subpageref{NW4L0rMe-Zbyyj-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2eTs21-1}}\nwenddeflinemarkup 
    # Replace tilde if necessary 
    SuspectPath=$\{ProjectPath\} 
    ReplaceTilde 
    ProjectPath=$\{CleanPath\} 

\LA{}ConfigFileLEC7~{\nwtagstyle{}\subpageref{NW4L0rMe-4I6Gb7-1}}\RA{} \nwused{\\{NW4L0rMe-2eTs21-1}}\nwendcode{}\nwbegindocs{68}\nwdocspar 

\nwenddocs{}\nwbegincode{69}\sublabel{NW4L0rMe-1vvaZu-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1vvaZu-1}}}\moddef{ReplaceTilde~{\nwtagstyle{}\subpageref{NW4L0rMe-1vvaZu-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-19N0jW-1}}\nwenddeflinemarkup 
function ReplaceTilde \{ 
    # Called by ConfigFileLEC GbpConfIntegration 
    RecentUser=$(whoami) 
    tp=$(echo $\{SuspectPath\} | grep --count '^~') 
    if [ $tp -ge 1 ] 
    then 
        CleanPath=$(echo $\{SuspectPath\} | \\ 
        sed --expression="s/^~/\\/home\\/$\{RecentUser\}/g") 
    else 
        CleanPath=$\{SuspectPath\} 
    fi
 

    # Replace / at the end 
    CleanPath=$(echo $\{CleanPath\} | sed --expression="s/\\/$//")
 \} 

\LA{}ConfigFileLEC~{\nwtagstyle{}\subpageref{NW4L0rMe-QjVKo-1}}\RA{} \nwused{\\
{NW4L0rMe-19N0jW-1}}\nwendcode{}\nwbegindocs{70}\nwdocspar 

\subsection{Example of a configuration file} 

\begin{verbatim} #!/usr/bin/bash 
# ConfigFile for <OrigName> 
## General parameters 
SourceName=<SourceName> 
PackName=<PackName> 
ProjectPath=/home/mechtilde/Projekte/Git/01_Salsa 
SalsaName=<Name of the team>/<SourceName>.git 
## Parameters for Java packages 
JavaFlag=0 
## Parameters for Webext packages 
WebextFlag=0 
## Parameters for Python3 packages 
PythonFlag=0 
RecentBranch=debian/sid 
## Maintainer and Uploaders 
Maintainer=<Name and E-Mail-Address of the Maintainer> 
Uploaders=<Name and E-Mail-Address of the Uploaders> 
## Download from upstream 
DownloadURL=<Upstream URL for download> 
RecentUpstreamSuffix=.xpi 
# debian/sid_Dist=sid 

\end{verbatim} 

\section{Creating the infrastructure} 

The infrastructure of each project includes directories, a log file and a Git repository. If these are not already present, the necessary directories\index{Directory} and the log file\index{Logfile} are created. 

The infrastructure also includes a \textit{chroot} directory \textit{base.cow} or a \textit{build chroot} directory. These are created only if they do not already exist for the distribution for which the package is to be built. (Chapter \ref{sec:ChangeRoot}, page \pageref{sec:ChangeRoot}) 

\subsection{Definition of paths} \label{subsec:PathDefinition} 

At the end of the \textit{ConfigFileLEC} function two more composite paths are defined. 

\nwenddocs{}\nwbegincode{71}\sublabel{NW4L0rMe-4I6Gb7-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4I6Gb7-1}}}\moddef{ConfigFileLEC7~{\nwtagstyle{}\subpageref{NW4L0rMe-4I6Gb7-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-Zbyyj-1}}\nwenddeflinemarkup 
    PrjPath=$\{ProjectPath\}/$\{OrigName\} 
    GitPath=$\{PrjPath\}/$\{SourceName\} 

\} 

\LA{}CreateDirsAndLogfile~{\nwtagstyle{}\subpageref{NW4L0rMe-C6pCp-1}}\RA{} \nwused{\\{NW4L0rMe-Zbyyj-1}}\nwendcode{}\nwbegindocs{72}\nwdocspar 

\subsection{Creating the necessary directories} \label{subsec:AnlegenVerzeichnisse} 

First, the previously defined paths (chapter \ref{subsec:PathDefinition}, page \pageref{subsec:PathDefinition}) are created. 

\nwenddocs{}\nwbegincode{73}\sublabel{NW4L0rMe-C6pCp-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-C6pCp-1}}}\moddef{CreateDirsAndLogfile~{\nwtagstyle{}\subpageref{NW4L0rMe-C6pCp-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4I6Gb7-1}}\nwenddeflinemarkup 
function CreateDirsAndLogFile \{ 
    # Called by BuildApp 

    # Create directories if necessary 
    mkdir --parents $\{PrjPath\} # redundantly? 
    mkdir --parents $\{GitPath\} 

\LA{}CreateLogFile~{\nwtagstyle{}\subpageref{NW4L0rMe-BUXUI-1}}\RA{} \nwused{\\{NW4L0rMe-4I6Gb7-1}}\nwendcode{}\nwbegindocs{74}\nwdocspar 

\subsection{Create log file} 

The date and time are initially entered in the log file each time the program is started. 

\nwenddocs{}\nwbegincode{75}\sublabel{NW4L0rMe-BUXUI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-BUXUI-1}}}\moddef{CreateLogFile~{\nwtagstyle{}\subpageref{NW4L0rMe-BUXUI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-C6pCp-1}}\nwenddeflinemarkup 
    # Create Log-File 
    cd $\{PrjPath\} 
    log=$\{PrjPath\}/$\{OrigName\}.log.txt 
    touch $\{log\} 
    echo -e "\\n\\n===\\n=== $(date) ===\\n===\\n">>$\{log
\} \} 

\LA{}InsertDebName~{\nwtagstyle{}\subpageref{NW4L0rMe-3nmG5W-1}}\RA{} \nwused{\\{NW4L0rMe-C6pCp-1}}\nwendcode{}\nwbegindocs{76}\nwdocspar 

\section{\texttt{Git} Repositories} \label{sec:GitRepos} 

For working with \textit{git-buildpackage} a local \texttt{Git} repository with working directory is essential. 

The program script assumes that both a local repository (chapter \ref{sec:GitRepoLocal}, page \pageref{sec:GitRepoLocal}) and a repository on \textit{salsa.debian.org} (chapter \ref{sec:SalsaRepo}, page \pageref{sec:SalsaRepo}) should be created. In addition, the program script also takes into account a \texttt{Git} repository on its own \texttt{Git} server (chapter \ref{subsec:EigenerGitServer}, page \pageref{subsec:EigenerGitServer}).. 

Rebuilding a \texttt{Git} repository is the first step in building a new \texttt{Debian} package. After that, the source code for the (new) version is downloaded (chapter \ref{sec:DownloadTools}, page \pageref{sec:DownloadTools}), a revision is built (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}) and finally uploaded.(chapter \ref{chap:UploadPackage}, page \pageref{chap:UploadPackage}). Therefore, the user is asked if he wants to build a new package. 

\subsection{Does a \texttt{Git} repository already exist?} 

As a precaution, it is checked whether a local \texttt{Git} repository already exists for the project to be created. It is considered if a \texttt{Git} repository exists in a parent directory. 

If a local \texttt{Git} repository exists, the process continues with the selection of a Git branch (see chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}). 

\nwenddocs{}\nwbegincode{77}\sublabel{NW4L0rMe-3pVebz-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3pVebz-1}}}\moddef{BuildApp7~{\nwtagstyle{}\subpageref{NW4L0rMe-3pVebz-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4KRvn1-1}}\nwenddeflinemarkup 
    ## Checks whether there is a git repo 
    cd $\{GitPath\} 
    git status 1>/dev/null 2>&1& 

    # '==' does the same as '-eq' 
    if [ $? == 0 ] 
    then 
        if [ -d .git ] 
        then 
            SelectBranch 
        else 
\LA{}BuildApp8~{\nwtagstyle{}\subpageref{NW4L0rMe-2IHETL-1}}\RA{} \nwused{\\{NW4L0rMe-4KRvn1-1}}\nwendcode{}\nwbegindocs{78}\nwdocspar 

If a Git repository exists in a parent directory, a notice will be provided. 

\nwenddocs{}\nwbegincode{79}\sublabel{NW4L0rMe-2IHETL-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2IHETL-1}}}\moddef{BuildApp8~{\nwtagstyle{}\subpageref{NW4L0rMe-2IHETL-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3pVebz-1}}\nwenddeflinemarkup 
            SupOrdMsg="Is there a git repository in a superordinate directory?" 
            echo $\{SupOrdMsg\} >> $\{log\} 
            whiptail --title="Attention!" --msgbox "$\{SupOrdMsg\}" 15 60
            StartTasks 
        fi 
    else 
        StartTasks 
    fi 

\LA{}BuildApp10~{\nwtagstyle{}\subpageref{NW4L0rMe-2uaRFM-1}}\RA{} \nwused{\\{NW4L0rMe-3pVebz-1}}\nwendcode{}\nwbegindocs{80}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/SuperordinateDir.png} \caption{Is there a parent Git repository?} \end{figure} 

If no \texttt{Git} repository exists in the corresponding directory, the \textit{StartTasks} function is called. 

\subsection{Selection dialog} 

If no Git repository exists yet, the script provides three possibilities to create such a repository. These are the new creation with \textit{git init} and the cloning of an existing (Git) repository from \textit{salsa.debian.org} (chapter \ref{sec:SalsaDebianOrg}, page \pageref{sec:SalsaDebianOrg}). The latter requires above all that a branch \textit{prostine-tar} exists there. 

Otherwise, the repository can be created by \textit{gbp import-dsc} (chapter \ref{sec:ImportPackage}, page \pageref{sec:ImportPackage}). 

\nwenddocs{}\nwbegincode{81}\sublabel{NW4L0rMe-4MGn06-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4MGn06-1}}}\moddef{StartTasks~{\nwtagstyle{}\subpageref{NW4L0rMe-4MGn06-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
function StartTasks \{ 
    # Called by BuildApp 

    Task=$(whiptail --title "Tasks for building a new package:" \\ 
    --radiolist "What do you like to do to build a new package? " 17 60 9 \\ 
      "0" "Create a git repo and download upstream code" on \\ 
      "11" "Clone an existing repo from Salsa" off \\ 
      "12" "Importing already existing Debian™ packages" off \\ 
    --cancel-button "Exit" 3>&2 2>&1 1>&3) 

\LA{}StartTasks1~{\nwtagstyle{}\subpageref{NW4L0rMe-2u5wZs-1}}\RA{} \nwnotused{StartTasks}\nwendcode{}\nwbegindocs{82}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/TaskNewPackage.png} \caption{Create a new package} \end{figure} 

\nwenddocs{}\nwbegincode{83}\sublabel{NW4L0rMe-2u5wZs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2u5wZs-1}}}\moddef{StartTasks1~{\nwtagstyle{}\subpageref{NW4L0rMe-2u5wZs-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4MGn06-1}}\nwenddeflinemarkup 

    if [ -z "$\{Task\}" ] 
    then
        exit 
    fi 
    TaskSelect
 \} 

\LA{}DebDiff~{\nwtagstyle{}\subpageref{NW4L0rMe-1P2CeH-1}}\RA{} \nwused{\\{NW4L0rMe-4MGn06-1}}\nwendcode{}\nwbegindocs{84}\nwdocspar 

The items of the menu deal with different ways to set up a new project. It is mainly about obtaining the source code of the upstream project. 

The call of the corresponding functions is done by the function \textit{TaskSelect}. 

\nwenddocs{}\nwbegincode{85}\sublabel{NW4L0rMe-jY8Bs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-jY8Bs-1}}}\moddef{TaskSelect~{\nwtagstyle{}\subpageref{NW4L0rMe-jY8Bs-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
function TaskSelect \{ 
    # Called by StartTasks CommonTasks 

    ## The lines below serve also the sequence control. A called function 
    ## changes finally the variable 'Task', so one of the following 
    ## if-clauses matches. That is why the following lines can not be 
    ## replaced by a case statement. 

    ## Start tasks 

    # Building a new package from archive 
    if [ $Task -eq 0 ] 
    then 
        BuildNewPackage 
    fi 

    # Clone an existing repo from Salsa 
    if [ $Task -eq 11 ] 
    then 
        CloneFromSalsa 
    fi 

    # Importing already existing Debian™ package 
    if [ $Task -eq 12 ] 
    then 
        ImportDebianPackage 
    fi 

\LA{}TaskSelect3~{\nwtagstyle{}\subpageref{NW4L0rMe-2RUsag-1}}\RA{} \nwnotused{TaskSelect}\nwendcode{}\nwbegindocs{86}\nwdocspar 

When \textit{Build a new package from archive}, the local \texttt{Git} repository is created first (chapter \ref{sec:LokalesGitRepoAnlegen}, page \pageref{sec:LokalesGitRepoAnlegen}). Then a new version is downloaded (chapter \ref{sec:BauenNeueVersion}, page \pageref{sec:BauenNeueVersion}). 

When \textit{Clone an existing repo from Salsa}, an existing repository is downloaded from \textit{salsa.debian.org} (chapter \ref{sec:SalsaDebianOrg}, page \pageref{sec:SalsaDebianOrg}). 

At \textit{Importing already existing Debian™ package} a \textit{*.dsc}file is downloaded and a \texttt{Git} repository is created by the \textit{gbp import-dsc} program (chapter \ref{sec:ImportPackage}, page \pageref{sec:ImportPackage}).. 

\section{Creating a new local Git repository} \label{sec:LokalesGitRepoAnlegen} 

One way to build a Git repository is to create a new one using \textit{git init}. This is done in the \textit{BuildNewPackage} function. Before this a corresponding entry is made in the log file. 

\nwenddocs{}\nwbegincode{87}\sublabel{NW4L0rMe-1uGjo9-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1uGjo9-1}}}\moddef{BuildNewPackage~{\nwtagstyle{}\subpageref{NW4L0rMe-1uGjo9-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4L4WbO-1}}\nwenddeflinemarkup 
function BuildNewPackage \{ 
    # Called by TaskSelect 
    cd $\{GitPath\} 
    if [ -d .git ] 
    then 
        echo "There seems already to be a git repository in $\{GitPath\}." >> $\{log\} 
        if ! whiptail --title "Warning" \\ 
        --yesno "There seems already to be a git repository in $\{GitPath\}.\\n \\ 
        However continue?" --yes-button "Yes" --no-button "No" 15 60 
        then 
            echo "Exit" >> $\{log\} 
            exit 
        fi 

    else 
        echo "In $\{GitPath\} a new git repository will be created." >> $\{log\} 
        git init
\LA{}BuildNewPackage2~{\nwtagstyle{}\subpageref{NW4L0rMe-2eDXeg-1}}\RA{} \nwused{\\{NW4L0rMe-4L4WbO-1}}\nwendcode{}\nwbegindocs{88}\nwdocspar 

\subsection{Add name and email address to Git repository} \label{subsec:DebNameAndEmail} 

\nwenddocs{}\nwbegincode{89}\sublabel{NW4L0rMe-1rOXHa-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1rOXHa-1}}}\moddef{BuildNewPackage3~{\nwtagstyle{}\subpageref{NW4L0rMe-1rOXHa-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2eDXeg-1}}\nwenddeflinemarkup 
        if whiptail --title "Name and email" \\ 
        --yesno "Do you like to add your name and email address \\n \\ 
        to the local git config file?" --yes-button "Yes" \\ 
        --no-button "No" 15 60
        then
            AddNameAndEmail 
        fi
\LA{}BuildNewPackage5~{\nwtagstyle{}\subpageref{NW4L0rMe-d2RIE-1}}\RA{} \nwused{\\{NW4L0rMe-2eDXeg-1}}\nwendcode{}\nwbegindocs{90}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/NameAndEmail.png} \caption{Name and email.} \end{figure} 

\nwenddocs{}\nwbegincode{91}\sublabel{NW4L0rMe-1HD2qU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1HD2qU-1}}}\moddef{AddNameAndEmail~{\nwtagstyle{}\subpageref{NW4L0rMe-1HD2qU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2rrHFd-1}}\nwenddeflinemarkup 
function AddNameAndEmail \{ 
    # Called by BuildNewPackage CloneFromSalsa 
    # ImportDebianPackage and itself 

    DEBValues 
    GCName=$\{DEBFULLNAME\} 
    GCEmail=$\{DEBEMAIL\} 

\LA{}AddNameAndEmail1~{\nwtagstyle{}\subpageref{NW4L0rMe-3OnqXO-1}}\RA{} \nwused{\\{NW4L0rMe-2rrHFd-1}}\nwendcode{}\nwbegindocs{92}\nwdocspar 

So that the packager does not always have to write his full name and e-mail address, the script looks for this data first in the configuration file and then in the \textit{\textasciitilde/.bashrc}. If necessary, what is found or asked for is entered into the configuration file. 

\nwenddocs{}\nwbegincode{93}\sublabel{NW4L0rMe-1U7K3A-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1U7K3A-1}}}\moddef{Bashrc~{\nwtagstyle{}\subpageref{NW4L0rMe-1U7K3A-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
DEBEMAIL="your.email.address@example.org" 
DEBFULLNAME="Firstname Lastname" 
export DEBEMAIL DEBFULLNAME 
\nwnotused{Bashrc}\nwendcode{}\nwbegindocs{94}\nwdocspar 

\nwenddocs{}\nwbegincode{95}\sublabel{NW4L0rMe-1BrXdv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1BrXdv-1}}}\moddef{DEBValues~{\nwtagstyle{}\subpageref{NW4L0rMe-1BrXdv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-5jHyT-1}}\nwenddeflinemarkup 
function DEBValues \{ 
    # Called by DebianControlTemplate PatchHeader AddNameAndEmail 
    MaintainerF=0 

    # if Maintainer is stored in config file 
    if [ $\{Maintainer\} ] 
    then 
        Maintainer=$(echo $\{Maintainer\} | sed --expression='s/_/ /g') 
        Maintainer=$(echo $\{Maintainer\} | sed --expression='s/@lt@/</g') 
        Maintainer=$(echo $\{Maintainer\} | sed --expression='s/@gt@/>/g') 
        DEBFULLNAME=$(echo $\{Maintainer\} | sed --expression='s/<.*//') 
        DEBEMAIL=$(echo $\{Maintainer\} | sed --expression='s/^.*<//' | sed 's/>//')
        MaintainerF=1
    fi 

    # if Uploaders is stored in config file 
    if [ $\{Uploaders\} ] 
    then 
        Uploaders=$(echo $\{Uploaders\} | sed --expression='s/_/ /g') 
        Uploaders=$(echo $\{Uploaders\} | sed --expression='s/@lt@/</g') 
        Uploaders=$(echo $\{Uploaders\} | sed --expression='s/@gt@/>/g') 
        DEBFULLNAME=$(echo $\{Uploaders\} | sed --expression='s/<.*//') 
        DEBEMAIL=$(echo $\{Uploaders\} | sed --expression='s/^.*<//' | sed 's/>//')
    fi 

    # Looking for a team as maintainer 
    if [ $\{MaintainerF\} -eq 0 ] 
    then 
        TeamMaintainer 
    fi 

\LA{}DEBValues3~{\nwtagstyle{}\subpageref{NW4L0rMe-14bQN1-1}}\RA{} \nwused{\\{NW4L0rMe-5jHyT-1}}\nwendcode{}\nwbegindocs{96}\nwdocspar 

There are packages that are managed by a team. Usually, many similar packages are maintained by such a team. In these cases the \texttt{Debian} project member acts as \textit{uploader} and the team as \textit{maintainer}. This is entered accordingly in the \textit{debian/control} file. 

\nwenddocs{}\nwbegincode{97}\sublabel{NW4L0rMe-5jHyT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-5jHyT-1}}}\moddef{TeamMaintainer~{\nwtagstyle{}\subpageref{NW4L0rMe-5jHyT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2CHiV-1}}\nwenddeflinemarkup 
function TeamMaintainer \{ 
    # Called by DEBValues 

    # Makes sure that variable exists 
    if [ -z '$\{JavaFlag\}' ] 
    then 
        JavaFlag = 0 
    fi 

    if [ $\{JavaFlag\} -eq 1 ] 
    then 
        Maintainer="Debian Java Maintainers \\ 
        <pkg-java-maintainers@lists.alioth.debian.org>" 
        MaintainerF=1 
    fi 

    if [ -z '$\{WebextFlag\}' ] 
    then 
        WebextFlag = 0 
    fi 

    if [ $\{WebextFlag\} -eq 1 ] 
    then 
        Maintainer="Debian Mozilla Extension Maintainers \\ 
        <pkg-mozext-maintainers@alioth-lists.debian.org>" 
        MaintainerF=1 
    fi 

    if [ -z '$\{PythonFlag\}' ] 
    then 
        PythonFlag = 0 
    fi 

    if [ $\{PythonFlag\} -eq 1 ] 
    then 
        Maintainer="Debian Python Team <team+python@tracker.debian.org>" 
        MaintainerF=1 
    fi
 \} 

\LA{}DEBValues~{\nwtagstyle{}\subpageref{NW4L0rMe-1BrXdv-1}}\RA{} \nwused{\\{NW4L0rMe-2CHiV-1}}\nwendcode{}\nwbegindocs{98}\nwdocspar 

\nwenddocs{}\nwbegincode{99}\sublabel{NW4L0rMe-14bQN1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-14bQN1-1}}}\moddef{DEBValues3~{\nwtagstyle{}\subpageref{NW4L0rMe-14bQN1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1BrXdv-1}}\nwenddeflinemarkup 
    # Extracts DEBFULLNAME and DEBEMAIL from ~/.bashrc (if exist) 
    if [ $\{MaintainerF\} -eq 0 ] 
    then 
        if grep --quiet 'DEBFULLNAME' ~/.bashrc 
        then 
            dfnb=$(grep DEBFULLNAME ~/.bashrc) 
            dfnb=$(echo $\{dfnb\} | sed --expression='s/export .*//') 
            dfnb=$(echo $\{dfnb\} | sed --expression='s/DEBFULLNAME=//') 
            dfnb=$(echo $\{dfnb\} | sed --expression='s/"//g') 
            dfnb=$(echo $\{dfnb\} | sed --expression="s/'//g") 
            DEBFULLNAME=$\{dfnb\} 
        fi 
        if grep --quiet 'DEBEMAIL' ~/.bashrc 
        then 
            demb=$(grep 'DEBEMAIL' ~/.bashrc) 
            demb=$(echo $\{demb\} | sed --expression='s/export .*//') 
            demb=$(echo $\{demb\} | sed --expression='s/DEBEMAIL=//') 
            demb=$(echo $\{demb\} | sed --expression='s/"//g') 
            demb=$(echo $\{demb\} | sed --expression="s/'//g") 
            DEBEMAIL=$\{demb\}
        fi 
        Maintainer=$\{DEBFULLNAME\}" <"$\{DEBEMAIL\}">" 
        MaintainerF=1 
    fi 

    # Insert name and email address  
    if [ $\{MaintainerF\} -eq 0 ] 
    then 
        DEBFULLNAME=$(whiptail --title "Name of the maintainer" \\ 
        --inputbox "Please insert full name of the maintainer" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
        DEBEMAIL=$(whiptail --title "Email of the maintainer" \\ 
        --inputbox "Please insert email address of the maintainer" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
        Maintainer=$\{DEBFULLNAME\}" <"$\{DEBEMAIL\}">" 
        changeflag=1
        MaintainerF=1 
    fi 

    if ! whiptail --title "Maintainer" \\ 
    --yesno "The full name and email address of the maintainer(s):\\n \\ 
    $\{Maintainer\}" --yes-button "Yes" --no-button "No" 15 60
\LA{}DEBValues5~{\nwtagstyle{}\subpageref{NW4L0rMe-2IOK6F-1}}\RA{} \nwused{\\
{NW4L0rMe-1BrXdv-1}}\nwendcode{}\nwbegindocs{100}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/Maintainer.png} \caption{\texttt{Debian}-Maintainer OK?} \end{figure} 

\nwenddocs{}\nwbegincode{101}\sublabel{NW4L0rMe-2IOK6F-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2IOK6F-1}}}\moddef{DEBValues5~{\nwtagstyle{}\subpageref{NW4L0rMe-2IOK6F-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-14bQN1-1}}\nwenddeflinemarkup 
    then 
        DEBFULLNAME=$(whiptail --title "Name of the maintainer" \\ 
        --inputbox "Please insert full name of the maintainer" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
\LA{}DEBValues5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-nA1m5-1}}\RA{} \nwused{\\
{NW4L0rMe-14bQN1-1}}\nwendcode{}\nwbegindocs{102}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/NameMaintainer.png} \caption{Name of the \texttt{Debian}-Maintainer} \end{figure} 

\nwenddocs{}\nwbegincode{103}\sublabel{NW4L0rMe-nA1m5-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-nA1m5-1}}}\moddef{DEBValues5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-nA1m5-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2IOK6F-1}}\nwenddeflinemarkup 
        DEBEMAIL=$(whiptail --title "Email of the maintainer"\\ 
        --inputbox "Please insert email address of the maintainer" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
\LA{}DEBValues5-2~{\nwtagstyle{}\subpageref{NW4L0rMe-3174zR-1}}\RA{} \nwused{\\{NW4L0rMe-2IOK6F-1}}\nwendcode{}\nwbegindocs{104}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/EmailMaintainer.png} \caption{Email of the \texttt{Debian}-Maintainer} \end{figure} 

\nwenddocs{}\nwbegincode{105}\sublabel{NW4L0rMe-3174zR-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3174zR-1}}}\moddef{DEBValues5-2~{\nwtagstyle{}\subpageref{NW4L0rMe-3174zR-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-nA1m5-1}}\nwenddeflinemarkup 
        Maintainer=$\{DEBFULLNAME\}" <"$\{DEBEMAIL\}">" 
        changeflag=1 
        MaintainerF=1 
    fi 
\LA{}DEBValues6~{\nwtagstyle{}\subpageref{NW4L0rMe-4RnnEZ-1}}\RA{} \nwused{\\{NW4L0rMe-nA1m5-1}}\nwendcode{}\nwbegindocs{106}\nwdocspar 

\nwenddocs{}\nwbegincode{107}\sublabel{NW4L0rMe-4RnnEZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4RnnEZ-1}}}\moddef{DEBValues6~{\nwtagstyle{}\subpageref{NW4L0rMe-4RnnEZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3174zR-1}}\nwenddeflinemarkup 

    # Insert maintainer data into config file if necessary 
    if [ $changeflag -eq 1 ] 
    then 
        # Because Maintainer contains blanks 
        MaintainerCF=$(echo $\{Maintainer\} | sed --expression='s/ /_/g') 
        # Remove < and > 
        MaintainerCF=$(echo $\{MaintainerCF\} | sed --expression='s/</@lt@/g') 
        MaintainerCF=$(echo $\{MaintainerCF\} | sed --expression='s/>/@gt@/g') 
        echo '## Maintainer and Uploaders' >> $\{ConfigPath\}$\{OrigName\} 
        echo 'Maintainer='$\{MaintainerCF\} >> $\{ConfigPath\}$\{OrigName\} 
        changeflag=0 
    fi 

\LA{}DEBValues7~{\nwtagstyle{}\subpageref{NW4L0rMe-8yqxv-1}}\RA{} \nwused{\\{NW4L0rMe-3174zR-1}}\nwendcode{}\nwbegindocs{108}\nwdocspar 

\nwenddocs{}\nwbegincode{109}\sublabel{NW4L0rMe-8yqxv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-8yqxv-1}}}\moddef{DEBValues7~{\nwtagstyle{}\subpageref{NW4L0rMe-8yqxv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4RnnEZ-1}}\nwenddeflinemarkup 
    # Insert uploaders data into config file 
    if necessary if [ $\{JavaFlag\} -eq 1 ] 
    then 
        if [ -z "$\{Uploaders\}" ] 
        then 
            if grep --quiet 'DEBFULLNAME' ~/.bashrc 
            then
                dfnb=$(grep DEBFULLNAME ~/.bashrc) 
                dfnb=$(echo $\{dfnb\} | sed --expression='s/export .*//') 
                dfnb=$(echo $\{dfnb\} | sed --expression='s/DEBFULLNAME=//') 
                dfnb=$(echo $\{dfnb\} | sed --expression='s/"//g') 
                dfnb=$(echo $\{dfnb\} | sed --expression="s/'//g") 
                DEBFULLNAME=$\{dfnb\} 
           else 
                DEBEMAIL=$(whiptail --title "Email of the uploader" \\ 
                --inputbox "Please insert email address of the uploader" \\ 
                --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&
            fi
\LA{}DEBValues8~{\nwtagstyle{}\subpageref{NW4L0rMe-38lJb9-1}}\RA{} \nwused{\\{NW4L0rMe-4RnnEZ-1}}\nwendcode{}\nwbegindocs{110}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/EmailUploader.png} \caption{Email of the \texttt{Debian}-Uploaders} \end{figure} 

\nwenddocs{}\nwbegincode{111}\sublabel{NW4L0rMe-38lJb9-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-38lJb9-1}}}\moddef{DEBValues8~{\nwtagstyle{}\subpageref{NW4L0rMe-38lJb9-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-8yqxv-1}}\nwenddeflinemarkup 
            if grep --quiet 'DEBEMAIL' ~/.bashrc 
            then 
                demb=$(grep 'DEBEMAIL' ~/.bashrc) 
                demb=$(echo $\{demb\} | sed --expression='s/export .*//') 
                demb=$(echo $\{demb\} | sed --expression='s/DEBEMAIL=//') 
                demb=$(echo $\{demb\} | sed --expression='s/"//g') 
                demb=$(echo $\{demb\} | sed --expression="s/'//g") 
                DEBEMAIL=$\{demb\} 
            else 
                DEBEMAIL=$(whiptail --title "Email of the uploader" \\ 
                --inputbox "Please insert email address of the uploader" \\ 
                --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
            fi 
\LA{}DEBValues9~{\nwtagstyle{}\subpageref{NW4L0rMe-1jKrXH-1}}\RA{} \nwused{\\{NW4L0rMe-8yqxv-1}}\nwendcode{}\nwbegindocs{112}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/EmailUploader.png} \caption{Email of the \texttt{Debian}-Uploaders} \end{figure} 

\nwenddocs{}\nwbegincode{113}\sublabel{NW4L0rMe-1jKrXH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1jKrXH-1}}}\moddef{DEBValues9~{\nwtagstyle{}\subpageref{NW4L0rMe-1jKrXH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-38lJb9-1}}\nwenddeflinemarkup 
            Uploaders=$\{DEBFULLNAME\}" <"$\{DEBEMAIL\}">" 
            # Because Uploaders contains blanks 
            UploadersCF=$(echo $\{Uploaders\} | sed --expression='s/ /_/g') 
            # Remove < and > 
            UploadersCF=$(echo $\{UploadersCF\} | sed --expression='s/</@lt@/g')
            UploadersCF=$(echo $\{UploadersCF\} | sed --expression='s/>/@gt@/g') 
            echo 'Uploaders='$\{UploadersCF\} >> $\{ConfigPath\}$\{OrigName\} 
            changeflag=0 
        fi 
    fi
 \} 

\LA{}DebianControlTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-4LaGcs-1}}\RA{} \nwused{\\{NW4L0rMe-38lJb9-1}}\nwendcode{}\nwbegindocs{114}\nwdocspar 

\nwenddocs{}\nwbegincode{115}\sublabel{NW4L0rMe-3OnqXO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3OnqXO-1}}}\moddef{AddNameAndEmail1~{\nwtagstyle{}\subpageref{NW4L0rMe-3OnqXO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1HD2qU-1}}\nwenddeflinemarkup 
    if [ -z "$\{GCName\}" ] 
    then 
        InsertDebName 
    fi 
    # if [ -n "$\{GCName\}" ] 
    # then 
        git config user.name $\{GCName\} 
    # fi 
    if [ -z "$\{GCEmail\}" ] 
    then 
        InsertDebEmail 
    fi 
    # if [ -n "$\{GCEmail\}" ] 
    # then 
       git config user.email $\{GCEmail\} 
    # fi 

    configStr=$(git config --list | grep 'user') 

    if ! whiptail --title "Result" \\ 
    --yesno "$\{configStr\}\\nAllright?" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
    then
        AddNameAndEmail
    fi
 \} 

\LA{}AddHomeServer~{\nwtagstyle{}\subpageref{NW4L0rMe-4L4WbO-1}}\RA{} 

\nwused{\\{NW4L0rMe-1HD2qU-1}}\nwendcode{}\nwbegindocs{116}\nwdocspar 

\nwenddocs{}\nwbegincode{117}\sublabel{NW4L0rMe-3nmG5W-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3nmG5W-1}}}\moddef{InsertDebName~{\nwtagstyle{}\subpageref{NW4L0rMe-3nmG5W-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-BUXUI-1}}\nwenddeflinemarkup 
function InsertDebName \{ 

    # Called by AddNameAndEmail and itself 
    DEBFULLNAME=$(whiptail --title "Name of the maintainer" \\ 
    --inputbox "Please insert full name of the maintainer" \\ 
    --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

    if [ $? -ne 0 ] 
    then 
        exit 
    fi 

    # Test Name 
    if [ -z "$\{DEBFULLNAME\}" ] 
    then 
        whiptail --title "Your Name" \\
        --msgbox "Your name is neccessary." 15 60 
        InsertDebName 
    fi
 
\} 
\LA{}InsertDebEmail~{\nwtagstyle{}\subpageref{NW4L0rMe-2rrHFd-1}}\RA{} 

\nwused{\\{NW4L0rMe-BUXUI-1}}\nwendcode{}\nwbegindocs{118}\nwdocspar 

\nwenddocs{}\nwbegincode{119}\sublabel{NW4L0rMe-2rrHFd-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2rrHFd-1}}}\moddef{InsertDebEmail~{\nwtagstyle{}\subpageref{NW4L0rMe-2rrHFd-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3nmG5W-1}}\nwenddeflinemarkup 
function InsertDebEmail \{ 

    # Called by AddNameAndEmail and itself 
    DEBEMAIL=$(whiptail --title "Email of the maintainer" \\ 
    --inputbox "Please insert email address of the maintainer" \\ 
    --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

    if [ $? -ne 0 ] 
    then 
        exit 
    fi 

    # Regex string 
    EmailR="\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]\{2,6\}\\b"
    # Test email address 
    if ! echo $\{DEBEMAIL\} | grep -E $\{EmailR\} > /dev/null 
    then 
        whiptail --title "Bad!" --msgbox "That's no email address." 15 60 
        InsertDebEmail 
    fi 
\}
\LA{}AddNameAndEmail~{\nwtagstyle{}\subpageref{NW4L0rMe-1HD2qU-1}}\RA{} 

\nwused{\\{NW4L0rMe-3nmG5W-1}}\nwendcode{}\nwbegindocs{120}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/UserResult.png} \caption{\texttt{Debian} maintainer data} \end{figure} 

\subsection{Repository at \textit{salsa.debian.org}} \label{subsec:SalsaRepoAnlegen} 

The program script adds the Salsa repository as a ``Remote repository''. 

\nwenddocs{}\nwbegincode{121}\sublabel{NW4L0rMe-2eDXeg-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2eDXeg-1}}}\moddef{BuildNewPackage2~{\nwtagstyle{}\subpageref{NW4L0rMe-2eDXeg-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1uGjo9-1}}\nwenddeflinemarkup 
        git remote add salsa git@salsa.debian.org:$\{SalsaName\} 

\LA{}BuildNewPackage3~{\nwtagstyle{}\subpageref{NW4L0rMe-1rOXHa-1}}\RA{} \nwused{\\{NW4L0rMe-1uGjo9-1}}\nwendcode{}\nwbegindocs{122}\nwdocspar 

\subsubsection{Manually} 

The corresponding repository on \textit{salsa.debian.org} is then created manually (chapter \ref{subsec:ManuelleAnlage}, page \pageref{subsec:ManuelleAnlage}) (see chapter \ref{sec:CreateJavaTeam}, page \pageref{sec:CreateJavaTeam}). 

The program script also reminds the user of this. 

\nwenddocs{}\nwbegincode{123}\sublabel{NW4L0rMe-3BQbsE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3BQbsE-1}}}\moddef{BuildNewPackage6~{\nwtagstyle{}\subpageref{NW4L0rMe-3BQbsE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-d2RIE-1}}\nwenddeflinemarkup 

    whiptail --title "If not happened yet:" \\ 
    --msgbox "Please create a git repo $\{SalsaName\} \\n \\ 
    on salsa.debian.org!" 15 60 
    Task=2 # Go to BuildNewVersion
 \} 

\LA{}IdentifyBranches~{\nwtagstyle{}\subpageref{NW4L0rMe-1NlbiI-1}}\RA{} \nwused{\\{NW4L0rMe-d2RIE-1}}\nwendcode{}\nwbegindocs{124}\nwdocspar 

\subsubsection{Within the Java team} 

Within the Java team, a new repository should be created using the \textit{setup script} provided by the team (chapter \ref{subsec:JavaTeam}, page \pageref{subsec:JavaTeam}). To facilitate this, the build script will automatically trigger this. 

%ToDo: Zugriff auf setup-javateam-salsa-repository.sh beschreiben
\begin{itemize} \item{script copies setup script from \textit{.debian\_project}} 
\item{script tells how to generate token} 
\item{script queries token (command line)} 
\item{script writes in setup the token} 
\item{script calls setup script, with source name}
 \end{itemize} 

\subsection{Display remote server} \label{subsec:RemoteserverAnzeigen} 

The remote servers entered in the Git repository are displayed. A custom server is displayed only if it has been entered previously. 

\nwenddocs{}\nwbegincode{125}\sublabel{NW4L0rMe-d2RIE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-d2RIE-1}}}\moddef{BuildNewPackage5~{\nwtagstyle{}\subpageref{NW4L0rMe-d2RIE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1rOXHa-1}}\nwenddeflinemarkup 
        AddHomeServer 
    fi 
\LA{}BuildNewPackage6~{\nwtagstyle{}\subpageref{NW4L0rMe-3BQbsE-1}}\RA{} \nwused{\\{NW4L0rMe-1rOXHa-1}}\nwendcode{}\nwbegindocs{126}\nwdocspar 

% ToDo: Fetch AddGitServer etc from Part5
\nwenddocs{}\nwbegincode{127}\sublabel{NW4L0rMe-4L4WbO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4L4WbO-1}}}\moddef{AddHomeServer~{\nwtagstyle{}\subpageref{NW4L0rMe-4L4WbO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3OnqXO-1}}\nwenddeflinemarkup 
function AddHomeServer \{ 
    # Called by BuildNewPackage AddGitServer ImportDebianPackage 
    if [ -n "$ServerName" ] 
    then 
        git remote add home $(whoami)@$\{ServerName\}:/srv/git/$\{SourceName\}.git 

        whiptail --title "Remoteserver" \\ 
        --msgbox "New server added:\\n$(git remote --verbose)" 15 60 
        echo -e "New server added:\\n $(git remote --verbose)" >> $\{log\} 
    fi
 \} 

\LA{}BuildNewPackage~{\nwtagstyle{}\subpageref{NW4L0rMe-1uGjo9-1}}\RA{} \nwused{\\{NW4L0rMe-3OnqXO-1}}\nwendcode{}\nwbegindocs{128}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/RemoteServer.png} \caption{Add remote server} \end{figure} 

Then a new version is downloaded (chapter \ref{sec:BauenNeueVersion}, page \pageref{sec:BauenNeueVersion}). 

\section{Clonen from \textit{salsa.debian.org}} \label{sec:SalsaDebianOrg} 

In this case, some of the steps mentioned in the other chapters are omitted. The cloning is done with the command \textit{gbp clone}. After that, the remote repository is renamed from \textit{origin} to \textit{salsa} on successful cloning. This allows for more meaningful naming of the repositories. 

Otherwise, an error message is displayed and the program ends. 

\nwenddocs{}\nwbegincode{129}\sublabel{NW4L0rMe-NVYSY-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-NVYSY-1}}}\moddef{CloneFromSalsa~{\nwtagstyle{}\subpageref{NW4L0rMe-NVYSY-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-OrTYh-1}}\nwenddeflinemarkup 
function CloneFromSalsa \{ 
    # Called by TaskSelect 
    echo "Clone an existing repo from salsa.debian.org" >> $\{log\} 
    cd $\{PrjPath\} 
    gbp clone git@salsa.debian.org:$\{SalsaName\} --aliases $\{SourceName\} 
    if [ $? -eq 0 ] 
    then 
        cd $\{GitPath\} 
        git remote rename origin salsa 
        echo "$\{SalsaName\} was cloned" >> $\{log\} 
    else 
        echo "$\{SalsaName\} could not be cloned" 
        exit 
    fi 

\LA{}CloneFromSalsa2~{\nwtagstyle{}\subpageref{NW4L0rMe-MXeZO-1}}\RA{} \nwused{\\{NW4L0rMe-OrTYh-1}}\nwendcode{}\nwbegindocs{130}\nwdocspar 

If the download is successful, the \textit{DebianBranchName} function displays the downloaded branches and the active branch is displayed as a sound. 

\nwenddocs{}\nwbegincode{131}\sublabel{NW4L0rMe-MXeZO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-MXeZO-1}}}\moddef{CloneFromSalsa2~{\nwtagstyle{}\subpageref{NW4L0rMe-MXeZO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-NVYSY-1}}\nwenddeflinemarkup 
    # Identify branches and choose one 
    DebianBranchName 

\LA{}CloneFromSalsa3~{\nwtagstyle{}\subpageref{NW4L0rMe-4E76Lq-1}}\RA{} \nwused{\\{NW4L0rMe-NVYSY-1}}\nwendcode{}\nwbegindocs{132}\nwdocspar 

\subsection{Determination of the \texttt{Git} branches} \label{subsec:DebianBranchName} 

The \textit{DebianBranchName} function is used to determine the \texttt{Git} branches of the cloned Salsa repository. 

To do this, first execute the \textit{IdentifyBranches} function (chapter \ref{subsec:IdentifyBranches}, page \pageref{subsec:IdentifyBranches}). 

\nwenddocs{}\nwbegincode{133}\sublabel{NW4L0rMe-4RhSCg-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4RhSCg-1}}}\moddef{DebianBranchName~{\nwtagstyle{}\subpageref{NW4L0rMe-4RhSCg-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2ZbxsM-1}}\nwenddeflinemarkup 
function DebianBranchName \{ 
    # Called by CloneFromSalsa
 

    ## Identify and show branches 
    IdentifyBranches 
    ba=($bl) 

    whiptail --title "Branches in repo $\{OrigName\}:" --msgbox "$\{bl\}" 15 60 

\LA{}DebianBranchName2~{\nwtagstyle{}\subpageref{NW4L0rMe-Tj9lI-1}}\RA{} \nwused{\\{NW4L0rMe-2ZbxsM-1}}\nwendcode{}\nwbegindocs{134}\nwdocspar 

%\begin{figure}[h] 
%\centering 
%\includegraphics[width=25em,height=30ex]{Pictures/BranchesList.png}
%\caption{Name und E-Mail.}
%\end{figure}
Then the active \texttt{Git} branch is determined. 

\nwenddocs{}\nwbegincode{135}\sublabel{NW4L0rMe-Tj9lI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-Tj9lI-1}}}\moddef{DebianBranchName2~{\nwtagstyle{}\subpageref{NW4L0rMe-Tj9lI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4RhSCg-1}}\nwenddeflinemarkup 
    for element in $\{ba[*]\} 
    do 
        # Find the default branch 
        if echo $\{element\} | grep --quiet '^x_' 
        then 
            DefaultBranch=$(echo $\{element\} | sed --expression='s/^x_//') 
            whiptail --title "Recent branch found" --msgbox "Found: $\{DefaultBranch\}" 15 60 
        fi 
\LA{}DebianBranchName3~{\nwtagstyle{}\subpageref{NW4L0rMe-4NZOaG-1}}\RA{} \nwused{\\{NW4L0rMe-4RhSCg-1}}\nwendcode{}\nwbegindocs{136}\nwdocspar 

%\begin{figure}[h] 
%\centering 
%\includegraphics[width=25em,height=30ex]{Pictures/BranchesList.png}
%\caption{Name und E-Mail.}
%\end{figure}
\nwenddocs{}\nwbegincode{137}\sublabel{NW4L0rMe-4NZOaG-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4NZOaG-1}}}\moddef{DebianBranchName3~{\nwtagstyle{}\subpageref{NW4L0rMe-4NZOaG-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-Tj9lI-1}}\nwenddeflinemarkup 
        # Ignore HEAD 
        if echo $\{element\} | grep --quiet 'HEAD' 
        then 
            continue 
        fi 
        # Checkout all branches 
        if echo $\{element\} | grep --quiet '^remotes/salsa/' 
        then 
            NewBranchName=$(echo $\{element\} | \\ 
            sed --expression='s/^remotes\\/salsa\\///') 
            git checkout $\{NewBranchName\} 
            whiptail --title "Checkout branch" \\ 
            --msgbox "Checkout of $\{NewBranchName\}" 15 60 
        fi 
    done 
    # Finally checkout the default branch (again) 
    git checkout $\{DefaultBranch\} 
    whiptail --title "Checkout branch" \\ 
    --msgbox "Checkout of $\{DefaultBranch\}" 15 60 

    # Insert default branch into the config file and write into logfile 
    echo 'DefaultBranch='$\{DefaultBranch\} >> $\{ConfigPath\}$\{OrigName\} 
    echo "Branches: "$\{bl\} >> $\{log\} 
    echo "DefaultBranch: "$\{DefaultBranch\} >> $\{log\}
    RecentBranch=$\{DefaultBranch\} 
    whiptail --title "Please check! (1)" \\ 
    --msgbox "The branch is $\{RecentBranch\}" 15 60 
    echo 'RecentBranch='$\{RecentBranch\} >> $\{ConfigPath\}$\{OrigName\} 
    echo "RecentBranch: "$\{RecentBranch\} >> $\{log\} 
    Distro4Branch
 \} 

\LA{}FailureNotice~{\nwtagstyle{}\subpageref{NW4L0rMe-7xnC6-1}}\RA{} \nwused{\\{NW4L0rMe-Tj9lI-1}}\nwendcode{}\nwbegindocs{138}\nwdocspar 

Finally, by calling the \textit{Distro4Branch} function, a distribution is assigned to the \texttt{Git} branch (chapter \ref{subsec:Distro4Branch}, page \pageref{subsec:Distro4Branch}) 

\subsection{\texttt{Git} branches detect} \label{subsec:IdentifyBranches} 

This function determines all existing branches. This is done with the command \textit{git branch -{}-all}. When marking the active branch, asterisks (*) and spaces are replaced by small X (x) and Ubterstrich(\_). 

This function is called at various points in the step of the program script. 

\nwenddocs{}\nwbegincode{139}\sublabel{NW4L0rMe-1NlbiI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1NlbiI-1}}}\moddef{IdentifyBranches~{\nwtagstyle{}\subpageref{NW4L0rMe-1NlbiI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3BQbsE-1}}\nwenddeflinemarkup 
function IdentifyBranches \{ 
    # Called by DebianBranchName AskDist DebianBranches 
    cd $\{GitPath\} 
    # sed is used to kill the asterisk 
    bl=$(git branch --all | sed --expression='s/* /x_/')
 \} 

\LA{}CreateSchroot~{\nwtagstyle{}\subpageref{NW4L0rMe-3vEcmx-1}}\RA{} \nwused{\\{NW4L0rMe-3BQbsE-1}}\nwendcode{}\nwbegindocs{140}\nwdocspar 

\subsection{Assign Git Branch Distribution} \label{subsec:Distro4Branch} 

At various points in the program flow it is necessary to assign a Debian release to a Git branch. 

\nwenddocs{}\nwbegincode{141}\sublabel{NW4L0rMe-3efUH3-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3efUH3-1}}}\moddef{Distro4Branch~{\nwtagstyle{}\subpageref{NW4L0rMe-3efUH3-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4UgTuZ-1}}\nwenddeflinemarkup 
function Distro4Branch \{ 
    # Called by DebianBranchName CreateNewBranch AskDist BuildNewRevision 

    # Set Debian distribution for branch 
    if [ $\{RecentBranch\} != "debian/sid" -o -z "$\{RecentBranchD\}" ] 
    then 
        CowL=$(ls /var/cache/pbuilder/ | grep .cow | grep '-'| \\ 
        sed 's/base-//' | sed 's/.cow//') i
        CowA=($CowL) 

        i=1; cowE="0 sid on " 
        for element in $\{CowA[*]\} 
        do 
            cowE=$cowE' '$i' '$\{element\}' off ' 
            i=$(expr $i + 1)  
        done 

    RecentBranchDNr=$(whiptail --title "Debian release" \\ 
    --radiolist "Select pbuilder cow:" \\ 
    --cancel-button "Other" 15 60 8 \\ $cowE 3>&2 2>&1 1>&3)
\LA{}Distro4Branch2~{\nwtagstyle{}\subpageref{NW4L0rMe-2ZbxsM-1}}\RA{} \nwused{\\{NW4L0rMe-4UgTuZ-1}}\nwendcode{}\nwbegindocs{142}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/DebianRelease.png} \caption{Choosing the Debian Release.} \end{figure} 

\nwenddocs{}\nwbegincode{143}\sublabel{NW4L0rMe-2ZbxsM-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2ZbxsM-1}}}\moddef{Distro4Branch2~{\nwtagstyle{}\subpageref{NW4L0rMe-2ZbxsM-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3efUH3-1}}\nwenddeflinemarkup 
        if [ $? -eq 1 ] 
        then 
            CreateNewCow
        fi 

        if [ $\{RecentBranchDNr\} -eq 0 ] 
        then 
            bDist="sid" else RecentBranchDNr=$(expr $\{RecentBranchDNr\} - 1) 
            bDist=$\{CowA[$\{RecentBranchDNr\}]\} 
        fi 

        echo "# "$\{RecentBranch\}"_Dist="$\{bDist\} >> $\{ConfigPath\}$\{OrigName\} 
        RecentBranchD=$\{bDist\} 
        echo "Notice from Distro4Branch: The distribution is " \\ 
        $\{RecentBranchD\} >> $\{log\} 
    fi
 \} 

\LA{}DebianBranchName~{\nwtagstyle{}\subpageref{NW4L0rMe-4RhSCg-1}}\RA{} \nwused{\\{NW4L0rMe-3efUH3-1}}\nwendcode{}\nwbegindocs{144}\nwdocspar 

\subsection{Add name and email address} 

\nwenddocs{}\nwbegincode{145}\sublabel{NW4L0rMe-4E76Lq-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4E76Lq-1}}}\moddef{CloneFromSalsa3~{\nwtagstyle{}\subpageref{NW4L0rMe-4E76Lq-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-MXeZO-1}}\nwenddeflinemarkup 
    if whiptail --title "Name and email" \\ 
    --yesno "Do you like to add your name and email address \\n \\ 
    to the local git config file?" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
\LA{}CloneFromSalsa5~{\nwtagstyle{}\subpageref{NW4L0rMe-2wv13q-1}}\RA{} \nwused{\\{NW4L0rMe-MXeZO-1}}\nwendcode{}\nwbegindocs{146}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/NameAndEmail.png} \caption{Name and email.} \end{figure} 

\nwenddocs{}\nwbegincode{147}\sublabel{NW4L0rMe-2wv13q-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2wv13q-1}}}\moddef{CloneFromSalsa5~{\nwtagstyle{}\subpageref{NW4L0rMe-2wv13q-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4E76Lq-1}}\nwenddeflinemarkup 
    then  

        AddNameAndEmail 
    fi 

\LA{}CloneFromSalsa7~{\nwtagstyle{}\subpageref{NW4L0rMe-41L9Uw-1}}\RA{} \nwused{\\{NW4L0rMe-4E76Lq-1}}\nwendcode{}\nwbegindocs{148}\nwdocspar 

\nwenddocs{}\nwbegincode{149}\sublabel{NW4L0rMe-41L9Uw-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-41L9Uw-1}}}\moddef{CloneFromSalsa7~{\nwtagstyle{}\subpageref{NW4L0rMe-41L9Uw-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2wv13q-1}}\nwenddeflinemarkup 
    AddHomeServer 
    PQImport 1 
    CommonTasks
 \} 

\LA{}CutSuffix~{\nwtagstyle{}\subpageref{NW4L0rMe-8Lh7T-1}}\RA{} \nwused{\\{NW4L0rMe-2wv13q-1}}\nwendcode{}\nwbegindocs{150}\nwdocspar 

\section{Import of a \texttt{Debian} package} \label{sec:ImportPackage} 

Not all packages of the \texttt{Debian} project are located on \textit{salsa.debian.org}, a \texttt{Gitlab} instance. Of these, not all packages are built with \textit{git-buildpackage} either. Sometimes the \textit{pristine-tar} branch is missing. In this case, cloning does not make sense. 

These packages can also be built using this program script. In the file \textit{/etc/apt/sources.list} or in a file in the directory \textit{/etc/apt/sources.list.d} the entry. 

\begin{verbatim} deb-src http://deb.debian.org/debian/ sid main \end{verbatim} 

activated must be present. This means that after activation, \textit{sudo apt update} must also be executed. 

For rare special cases, adapt this line accordingly. This enables the download of source packages. 

\nwenddocs{}\nwbegincode{151}\sublabel{NW4L0rMe-PF5jU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-PF5jU-1}}}\moddef{ImportDebianPackage~{\nwtagstyle{}\subpageref{NW4L0rMe-PF5jU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3k7enB-1}}\nwenddeflinemarkup 
function ImportDebianPackage \{ 
    # Called by TaskSelect 

    echo "Import an existing package without pristine-tar" >> $\{log\} 
    cd $\{PrjPath\} 
    echo "Download $\{SourceName\} with apt source" >> $\{log\} 
    apt source --download-only $\{SourceName\} >> $\{log\} 

\LA{}ImportDebianPackage1~{\nwtagstyle{}\subpageref{NW4L0rMe-4UH0W4-1}}\RA{} \nwused{\\{NW4L0rMe-3k7enB-1}}\nwendcode{}\nwbegindocs{152}\nwdocspar 

With \textit{apt source -{}-download-only} only the source package is downloaded. 

Creating the \texttt{Git} directory is done with \textit{gbp import-dsc} and the downloaded \textit{*.dsc} file. 

\nwenddocs{}\nwbegincode{153}\sublabel{NW4L0rMe-4UH0W4-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4UH0W4-1}}}\moddef{ImportDebianPackage1~{\nwtagstyle{}\subpageref{NW4L0rMe-4UH0W4-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-PF5jU-1}}\nwenddeflinemarkup 
    cd $\{GitPath\} 
    git init 
    git remote add salsa git@salsa.debian.org:$\{SalsaName\} 
    GpgKeyAvailable 

\LA{}ImportDebianPackage2~{\nwtagstyle{}\subpageref{NW4L0rMe-2FBYmS-1}}\RA{} \nwused{\\{NW4L0rMe-PF5jU-1}}\nwendcode{}\nwbegindocs{154}\nwdocspar 

Since the \textit{gbp import-dsc} function performs a signing, the \textit{GpgKeyAvailable} function (chapter \ref{sec:KeyAvailable}, page \pageref{sec:KeyAvailable}) first queries whether the \texttt{GnuPG} key is available. 

\nwenddocs{}\nwbegincode{155}\sublabel{NW4L0rMe-2FBYmS-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2FBYmS-1}}}\moddef{ImportDebianPackage2~{\nwtagstyle{}\subpageref{NW4L0rMe-2FBYmS-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4UH0W4-1}}\nwenddeflinemarkup 
    echo "gbp import-dsc" >> $\{log\} 
    gbp import-dsc --verbose ../$\{SourceName\}*.dsc . >> $\{log\} 

\LA{}ImportDebianPackage3~{\nwtagstyle{}\subpageref{NW4L0rMe-2d1rhs-1}}\RA{} \nwused{\\
{NW4L0rMe-4UH0W4-1}}\nwendcode{}\nwbegindocs{156}\nwdocspar 

This is followed by displaying the existing \texttt{Git} branches and determining the active branch by calling the \textit{DebianBranchName} function (chapter \ref{subsec:DebianBranchName}, page \pageref{subsec:DebianBranchName}). 

\nwenddocs{}\nwbegincode{157}\sublabel{NW4L0rMe-2d1rhs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2d1rhs-1}}}\moddef{ImportDebianPackage3~{\nwtagstyle{}\subpageref{NW4L0rMe-2d1rhs-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2FBYmS-1}}\nwenddeflinemarkup 
    # Identify branches and choose one DebianBranchName
 

    if whiptail --title "Name and email" \\ 
    --yesno "Do you like to add your name and email address \\n \\ 
    to the local git config file?" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
    then 
        AddNameAndEmail 
    fi 

\LA{}ImportDebianPackage4~{\nwtagstyle{}\subpageref{NW4L0rMe-17dpue-1}}\RA{} \nwused{\\
{NW4L0rMe-2FBYmS-1}}\nwendcode{}\nwbegindocs{158}\nwdocspar 

\nwenddocs{}\nwbegincode{159}\sublabel{NW4L0rMe-17dpue-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-17dpue-1}}}\moddef{ImportDebianPackage4~{\nwtagstyle{}\subpageref{NW4L0rMe-17dpue-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2d1rhs-1}}\nwenddeflinemarkup 
    AddHomeServer 
    PQImport 
    CommonTasks 

\} 

\LA{}CommonTasks~{\nwtagstyle{}\subpageref{NW4L0rMe-3CAFBW-1}}\RA{} \nwused{\\{NW4L0rMe-2d1rhs-1}}\nwendcode{}\nwbegindocs{160}\nwdocspar 

\section{\texttt{GnuPG} Key available?} \label{sec:KeyAvailable} 

The \textit{GpgKeyAvailable} function prompts the user to check if the \texttt{GnuPG} key is available for signing. 

It is called at various points in the program script. If the question about the availability of the \texttt{GnuPG} key is answered in the negative, the program script terminates. 

\nwenddocs{}\nwbegincode{161}\sublabel{NW4L0rMe-7ORWt-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-7ORWt-1}}}\moddef{GpgKeyAvailable~{\nwtagstyle{}\subpageref{NW4L0rMe-7ORWt-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1pFM12-1}}\nwenddeflinemarkup 
function GpgKeyAvailable \{ 
    # Called by BuildWithUscan Import2Git CreateSignature ImportDebianPackage 
    # PrepareUploading
 

    if ! whiptail --title "GPG-Key available?" \\ 
    --yesno "GPG-Key must be available for signing." \\ 
    --yes-button "Yes, is available" --no-button "Exit" 15 60 
    then 
        exit 
    fi
    GettingFingerprint
 \} 

\LA{}DetectPlugins~{\nwtagstyle{}\subpageref{NW4L0rMe-4V5mzF-1}}\RA{} \nwused{\\{NW4L0rMe-1pFM12-1}}\nwendcode{}\nwbegindocs{162}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/GPGKeyAvailable.png} \caption{GPG-Key available} \end{figure} 

\section{Starting the packaging process} 

The \textit{BuildApp} function calls the task selection for each step of packaging at the end. 

\nwenddocs{}\nwbegincode{163}\sublabel{NW4L0rMe-2uaRFM-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2uaRFM-1}}}\moddef{BuildApp10~{\nwtagstyle{}\subpageref{NW4L0rMe-2uaRFM-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2IHETL-1}}\nwenddeflinemarkup 
    # Start of Packaging 
    CommonTasks
 \} 

\LA{}MainProgram~{\nwtagstyle{}\subpageref{NW4L0rMe-2dfaZH-1}}\RA{} \nwused{\\{NW4L0rMe-2IHETL-1}}\nwendcode{}\nwbegindocs{164}\nwdocspar 

\chapter{Work in an created projectt} \label{chap:ExistingProject} 

\section{Load and edit configuration file} \label{sec:ConfigFileLaden} 

If a project name is entered, the program script tries to load the configuration file\index{Configuration file} of this project and display it with \textit{less}. 

The function \textit{ConfigFileLEC} shows the loaded configuration file and then asks if it is correct. Then it can be decided if this file should be edited. 

\nwenddocs{}\nwbegincode{165}\sublabel{NW4L0rMe-3B7jzR-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3B7jzR-1}}}\moddef{ConfigFileLEC1~{\nwtagstyle{}\subpageref{NW4L0rMe-3B7jzR-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-QjVKo-1}}\nwenddeflinemarkup 
    if [ -f $\{ConfigPath\}$\{OrigName\} ] 
    then 
        . $\{ConfigPath\}$\{OrigName\} # executes config script 
        # whiptail --title "Config file found" \\ 
        # --msgbox "$\{ConfigPath\}$\{OrigName\} was loaded." 15 60 
        less --LINE-NUMBERS $\{ConfigPath\}$\{OrigName\} 
        if ! whiptail --title "Check config file" \\ 
        --yesno "Is the config file OK?" \\ 
        --yes-button "Yes" --no-button "No" 15 60
\LA{}ConfigFileLEC2~{\nwtagstyle{}\subpageref{NW4L0rMe-cjZPR-1}}\RA{} \nwused{\\{NW4L0rMe-QjVKo-1}}\nwendcode{}\nwbegindocs{166}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/Checkconfigfile.png} \caption{Query - configuration file} \end{figure} 

If the question whether the configuration file is correct is answered in the negative, it can be edited. This can be done with the editor \textit{nano} or by answering questions. 

Otherwise, continue with chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}. However, if only one or no branch exists, continue with chapter \ref{subsec:OneBranch}, page \pageref{subsec:OneBranch}. 

\nwenddocs{}\nwbegincode{167}\sublabel{NW4L0rMe-cjZPR-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-cjZPR-1}}}\moddef{ConfigFileLEC2~{\nwtagstyle{}\subpageref{NW4L0rMe-cjZPR-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3B7jzR-1}}\nwenddeflinemarkup 
        then 
            Edit=$(whiptail --title "Edit Config File" \\ 
            --radiolist "How do you like to edit the config file?" \\ 
            15 60 2 "0" "Using Nano" on \\
            "1" "Answering questions" off \\ 
            --cancel-button "Exit" 3>&2 2>&1 1>&3)
\LA{}ConfigFileLEC3~{\nwtagstyle{}\subpageref{NW4L0rMe-3wF9a9-1}}\RA{} \nwused{\\{NW4L0rMe-3B7jzR-1}}\nwendcode{}\nwbegindocs{168}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/Editconfigfile.png} \caption{Query - edit configuration file.} \end{figure} 

If no edit method is specified, the program exits. 

\nwenddocs{}\nwbegincode{169}\sublabel{NW4L0rMe-3wF9a9-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3wF9a9-1}}}\moddef{ConfigFileLEC3~{\nwtagstyle{}\subpageref{NW4L0rMe-3wF9a9-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-cjZPR-1}}\nwenddeflinemarkup 

            if [ -z "$\{Edit\}" ] 
            then 
                whiptail --title "Bye" --msgbox "Bye" 15 60 
                exit 
            fi 
            if [ $\{Edit\} -eq 0 ] 
            then 
                nano --linenumbers --mouse \\ 
                --softwrap $\{ConfigPath\}$\{OrigName\} 
                . $\{ConfigPath\}$\{OrigName\} 
            else
                AskConfig 
            fi 
        fi 
\LA{}ConfigFileLEC4~{\nwtagstyle{}\subpageref{NW4L0rMe-1rerev-1}}\RA{} \nwused{\\{NW4L0rMe-cjZPR-1}}\nwendcode{}\nwbegindocs{170}\nwdocspar 

If the configuration file is to be edited with the editor \textit{nano}, this is called and opens. After the termination of the same (with \textit{STRG-X}) the program script runs further (chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}). 

If the adjustment is to be done by means of queries, the function \textit{AskConfig} (see chapter \ref{subsec:AskConfig}, page \pageref{subsec:AskConfig}) is called, After that the file is rewritten. 

\section{Modify lines in the configuration file} 

The script also contains a function that allows to change individual values in the configuration file. For this purpose, two parameters are passed to the function, namely firstly the identifier of the variable and secondly the new value of the same. 

This function is used by the \textit{BuildNewVersion} (chapter \ref{subsec:DownloadSourceCode}, page \pageref{subsec:DownloadSourceCode}), \textit{PQMigration} (chapter \ref{sec:WorkingwithGbpPq}, page \pageref{sec:WorkingwithGbpPq}), \textit{ChangeEntry} (chapter \ref{subsec:ChangeEntry}, page \pageref{subsec:ChangeEntry}) and \textit{OwnServer} (chapter \ref{sec:NameEigenerGitServer}, page \pageref{sec:NameEigenerGitServer}) functions. 

\nwenddocs{}\nwbegincode{171}\sublabel{NW4L0rMe-z7rFD-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-z7rFD-1}}}\moddef{ReplaceConfigLines~{\nwtagstyle{}\subpageref{NW4L0rMe-z7rFD-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3wEjds-1}}\nwenddeflinemarkup 
function ReplaceConfigLines \{ 
    # Called by BuildNewVersion PQMigration ChangeEntry OwnServer CurSuffix 

    # This function needs two parameters: 
    # First the name of the variable 
    # and second it's new value 
    ConfProp=$1 
    ConfVal=$2 

\LA{}ReplaceConfigLines1~{\nwtagstyle{}\subpageref{NW4L0rMe-1pFM12-1}}\RA{} \nwused{\\{NW4L0rMe-3wEjds-1}}\nwendcode{}\nwbegindocs{172}\nwdocspar 

The function checks if the line to be changed exists in the configuration file. If not, it is created with the \textit{InsertConfigLines} function. 

Before replacing with \textit{sed}, mask (also with \textit{sed}) any slashes that may be present in the variable \textit{ConfVal}. 

\nwenddocs{}\nwbegincode{173}\sublabel{NW4L0rMe-1pFM12-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1pFM12-1}}}\moddef{ReplaceConfigLines1~{\nwtagstyle{}\subpageref{NW4L0rMe-1pFM12-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-z7rFD-1}}\nwenddeflinemarkup 
    cprop=$(grep --count $\{ConfProp\} $\{ConfigPath\}$\{OrigName\}) 
    if [ $\{cprop\} -ge 1 ] 
    then 
        # Masquerade slasches 
        ConfVal=$(echo $\{ConfVal\} | sed 's/\\//\\\\\\//g') 

        sed --in-place --expression="s/$\{ConfProp\}=.*/$\{ConfProp\}=$\{ConfVal\}/g" \\
        $\{ConfigPath\}$\{OrigName\} 
    else 
        # InsertConfigLine needs two parameters: 
        # name of the variable and new value 
        InsertConfigLine $\{ConfProp\} $\{ConfVal\}
    fi
 \} 

\LA{}GpgKeyAvailable~{\nwtagstyle{}\subpageref{NW4L0rMe-7ORWt-1}}\RA{} \nwused{\\{NW4L0rMe-z7rFD-1}}\nwendcode{}\nwbegindocs{174}\nwdocspar 

\section{Insert line into configuration file} \label{sec:InsertConfigLine} 

The \textit{InsertConfigLine} function inserts a line into the configuration file. It must be passed the same parameters as the \textit{ReplaceConfigLines} function. 

\nwenddocs{}\nwbegincode{175}\sublabel{NW4L0rMe-3wEjds-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3wEjds-1}}}\moddef{InsertConfigLine~{\nwtagstyle{}\subpageref{NW4L0rMe-3wEjds-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
function InsertConfigLine \{ 
    # Called by ReplaceConfigLines 

    # This function needs two parameters: 
    # First the name of the variable 
    # and second it's value 

    ConfProp=$1 
    ConfVal=$2 

    echo $\{ConfProp\}"="$\{ConfVal\} >> $\{ConfigPath\}$\{OrigName\} 

\} 

\LA{}ReplaceConfigLines~{\nwtagstyle{}\subpageref{NW4L0rMe-z7rFD-1}}\RA{} \nwnotused{InsertConfigLine}\nwendcode{}\nwbegindocs{176}\nwdocspar 

\section{Selecting a Git branch} \label{sec:AuswahlGitBranch} 

To allow switching the \texttt{Git} branch, a check is made to see if there are any unversioned changes in the current branch. This check is done with the \textit{CheckGitStatus} function (chapter \ref{subsec:CheckGitStatus}, page \pageref{subsec:CheckGitStatus}). 

If no change of the \texttt{Git} branch is required, changes in the \textit{debian/} directory do not necessarily need to be versioned. 

Changes already made to the upstream code must be restored using \textit{git restore}. 

If several branches exist, one branch can be selected. If only one branch exists, it will be named. Otherwise the function \textit{StartTasks} is called (chapter \ref{sec:GitRepos}, page \pageref{sec:GitRepos}). 

This function can be called from the task selection (chapter \ref{sec:Aufgabenauswahl}, page \pageref{sec:Aufgabenauswahl}). 

The \textit{SelectBranch} function is also called when building a new revision, if applicable (chapter \ref{subsec:IdentifyDist}, page \pageref{subsec:IdentifyDist}). 

\nwenddocs{}\nwbegincode{177}\sublabel{NW4L0rMe-nazv4-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-nazv4-1}}}\moddef{SelectBranch~{\nwtagstyle{}\subpageref{NW4L0rMe-nazv4-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-aD8Kl-1}}\nwenddeflinemarkup 
function SelectBranch \{ 
    # Called by BuildApp TaskSelect BuildNewRevision 

    CheckGitStatus 
    DebianBranches 
\LA{}SelectBranch1~{\nwtagstyle{}\subpageref{NW4L0rMe-3HFFnr-1}}\RA{} \nwused{\\{NW4L0rMe-aD8Kl-1}}\nwendcode{}\nwbegindocs{178}\nwdocspar 

After the \textit{CheckGitStatus} function, described in the following section, the \textit{DebianBranches} function is called to determine the local \texttt{Debian} branches in the \texttt{Git} repository (chapter \ref{subsec:DebianBranches}, page \pageref{subsec:DebianBranches}). 

\subsection{Check with \textit{git status}.} \label{subsec:CheckGitStatus} 

The \textit{CheckGitStatus} function, which is also called elsewhere in the program script, checks whether there are new or changed files in the current \texttt{Git} branch. If this is the case, some \texttt{Git} operations cannot be performed. 

If there are no problems, we continue with the display of the existing \texttt{Git} branches (chapter \ref{subsec:DialogDebianBranches}, page \pageref{subsec:DialogDebianBranches}). 

If this is detected by \textit{git status}, the \textit{FailureNotice} function is called and a possibility for error recovery in another terminal is opened (chapter~\ref{subsec:FailureNotice}, page~\pageref{subsec:FailureNotice}). 

\nwenddocs{}\nwbegincode{179}\sublabel{NW4L0rMe-1vqolW-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1vqolW-1}}}\moddef{CheckGitStatus~{\nwtagstyle{}\subpageref{NW4L0rMe-1vqolW-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-jJHLT-1}}\nwenddeflinemarkup 
function CheckGitStatus \{ 
    # Called by Import2Git BuildWithUscan PQImport 
    # PatchesTreatment SelectBranch and itself 

    # Checks git status 
    echo "Notice from CheckGitStatus:" >> $\{log\} 
    echo $(git status) >> $\{log\} 

    if [ ! -z "$(git status --short)" ] 
    then 
        git status 
        FailureNotice "'git status' shows problems\\n\\ 
        Please clean up 'git status'" 
        if whiptail --title "Check another time?" \\ 
        --yesno "Do you want to check the git status another time?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            CheckGitStatus 
        fi 
    fi
 \} 

\LA{}CheckTags~{\nwtagstyle{}\subpageref{NW4L0rMe-1GBX6B-1}}\RA{} \nwused{\\{NW4L0rMe-jJHLT-1}}\nwendcode{}\nwbegindocs{180}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/CheckGitAnotherTime.png} \caption{Query - Further check?} \end{figure} 

\subsection{Error message and troubleshooting} \label{subsec:FailureNotice} 

If the \textit{FailureNotice} function is called, a message is displayed on the terminal and the possibility is opened to correct errors in another terminal. 

This function can be given a special text as a parameter when it is called. If this is not done, a standard text is output. 

\nwenddocs{}\nwbegincode{181}\sublabel{NW4L0rMe-7xnC6-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-7xnC6-1}}}\moddef{FailureNotice~{\nwtagstyle{}\subpageref{NW4L0rMe-7xnC6-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4NZOaG-1}}\nwenddeflinemarkup 
function FailureNotice \{ 
    # Called by PQImport CheckGitStatus RebasePQBranch PQMigration 
    # You can call this function with a text as parameter (optional) 

    if [ ! "$1" ] 
    then 
        echo "Failure" echo "Something went wrong!" 
    else 
        for i in $* 
        do 
            String=$\{String\}" "$i 
        done 

        echo -e $\{String\} 
    fi 
    echo
    echo "Break for fixing it in another terminal" 
    echo "After fixing press RETURN to go on!" 
    read a
 \} 

\LA{}PQImport~{\nwtagstyle{}\subpageref{NW4L0rMe-kZHCE-1}}\RA{} \nwused{\\{NW4L0rMe-4NZOaG-1}}\nwendcode{}\nwbegindocs{182}\nwdocspar 

\subsection{Selection of the \texttt{Debian} branches} \label{subsec:DebianBranches} 

The \textit{DebianBranches} function determines which relevant branches exist in the Git repository. 

To do this, the \textit{IdentifyBranches} function is called first (chapter \ref{subsec:IdentifyBranches}, page \pageref{subsec:IdentifyBranches}). 

\nwenddocs{}\nwbegincode{183}\sublabel{NW4L0rMe-4UIoSF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4UIoSF-1}}}\moddef{DebianBranches~{\nwtagstyle{}\subpageref{NW4L0rMe-4UIoSF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1IRwiW-1}}\nwenddeflinemarkup 
function DebianBranches \{ 
    # Called by CreateNewBranch SelectBranch 
    # selects the Debian branches 
    IdentifyBranches 

\LA{}DebianBranches1~{\nwtagstyle{}\subpageref{NW4L0rMe-1YaJyO-1}}\RA{} \nwused{\\{NW4L0rMe-1IRwiW-1}}\nwendcode{}\nwbegindocs{184}\nwdocspar 

In the following, the selection is limited to the local Debian branches. 

\nwenddocs{}\nwbegincode{185}\sublabel{NW4L0rMe-1YaJyO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1YaJyO-1}}}\moddef{DebianBranches1~{\nwtagstyle{}\subpageref{NW4L0rMe-1YaJyO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4UIoSF-1}}\nwenddeflinemarkup 
    ## Trim branchlist 
    bl=$(echo $bl | sed 's/pristine-tar/ /') 
    bl=$(echo $bl | sed 's/upstream/ /') 
    bl=$(echo $bl | sed 's/HEAD/ /') 
    # bl=$(echo $bl | sed 's/remotes\\/origin\\/.*/ /g') 
    # bl=$(echo $bl | sed 's/remotes\\/salsa\\/.*/ /g') 
    # bl=$(echo $bl | sed 's/remotes\\/home\\/.*/ /g') 
    bl=$(echo $bl | sed 's/remotes\\/.*/ /g')
 \} 

\LA{}CreateNewBranch~{\nwtagstyle{}\subpageref{nw@notdef}}\RA{} \nwused{\\{NW4L0rMe-4UIoSF-1}}\nwendcode{}\nwbegindocs{186}\nwdocspar 

\subsection{Dialog to select a branch} \label{subsec:DialogDebianBranches} 

This dialog is only displayed if there are multiple \texttt{Debian} branches. The current branch is preselected. 

If only one or no branch exists, we continue in chapter \ref{subsec:OneBranch} (page \pageref{subsec:OneBranch}). 

\nwenddocs{}\nwbegincode{187}\sublabel{NW4L0rMe-3HFFnr-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3HFFnr-1}}}\moddef{SelectBranch1~{\nwtagstyle{}\subpageref{NW4L0rMe-3HFFnr-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-nazv4-1}}\nwenddeflinemarkup 
    ## Create a radiolist with the branch names 
    ba=($bl) i=1; slct='' 
    for element in $\{ba[*]\} 
    do 
        echo $\{element\} | grep 'x_' > /dev/null 
        if [ $? -eq 0 ] 
        then 
            if [ "$\{element\}" = "x_" ] 
            then 
                continue 
            else 
                ostr="on" 
            fi 
       else 
            ostr="off" 
       fi 
       slct=$\{slct\}' '"$i"' '"$\{element\}"' '$\{ostr\}' ' 
       i=$(expr $i + 1) 
    done
 

    if [ $\{#ba[@]\} -gt 1 ] 
    then 
        ## select branch 
        branch=$(whiptail --title "Branch" --radiolist "Select:" \\ 
        15 60 8 $\{slct\} --cancel-button "Cancel" 3>&2 2>&1 1>&3)
        if [ ! -z "$\{branch\}" ] 
        then 
            branch=$(expr $\{branch\} - 1) 
            bName=$\{ba[$branch]\} 
            bName=$(echo $\{bName\} | sed --expression='s/^x_//') 
            ## checkout branch 
            git checkout $\{bName\} 
            ## Change config file - 
            ## make selected branch to recent one 
            ChangeEntry 
\LA{}SelectBranch3~{\nwtagstyle{}\subpageref{NW4L0rMe-3gn9Vf-1}}\RA{} \nwused{\\{NW4L0rMe-nazv4-1}}\nwendcode{}\nwbegindocs{188}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SelectBranch.png} \caption{Selection of the Debian branch.} \end{figure} 

Instead of \textit{debian-stable} the name chosen for this Git branch is displayed. 

If this is not the case, the program can be exited by clicking on the \textit{Cancel} button and in the next step with \textit{Exit}. 

Now the configuration file is displayed again with \textit{less}. 

\subsection{Change entry} \label{subsec:ChangeEntry} 

\nwenddocs{}\nwbegincode{189}\sublabel{NW4L0rMe-1IRwiW-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1IRwiW-1}}}\moddef{ChangeEntry~{\nwtagstyle{}\subpageref{NW4L0rMe-1IRwiW-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
function ChangeEntry \{ 
    # Called by CreateNewBranch SelectBranch 

    RecentBranchEntry=$(grep --count 'RecentBranch=' $\{ConfigPath\}$\{OrigName\}) 

    ## Change RecentBranch entry in config file 
    if [ $\{RecentBranchEntry\} -eq 0 ] 
    then 
        echo "RecentBranch="$\{bName\} >> $\{ConfigPath\}$\{OrigName\} 
    else 
        # ReplaceConfigLines needs two parameters: 
        # name of the variable and new value 
        ReplaceConfigLines 'RecentBranch' $\{bName\} 
        # bName1=$(echo $\{bName\} | sed --expression='s/\\//\\\\\\//g') 
        # sed --in-place --expression=\\ # "s/RecentBranch=.*/RecentBranch=$\{bName1\}/g" \\ 
        # $\{ConfigPath\}$\{OrigName\} 
    fi 
    less --LINE-NUMBERS $\{ConfigPath\}$\{OrigName\} 

    ## Set variable 
    RecentBranch=$\{bName\} 
    echo "Notice from ChangeEntry: The branch is "$\{RecentBranch\} >> $\{log\} 

\} 

\LA{}DebianBranches~{\nwtagstyle{}\subpageref{NW4L0rMe-4UIoSF-1}}\RA{} \nwnotused{ChangeEntry}\nwendcode{}\nwbegindocs{190}\nwdocspar 

\nwenddocs{}\nwbegincode{191}\sublabel{NW4L0rMe-3gn9Vf-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3gn9Vf-1}}}\moddef{SelectBranch3~{\nwtagstyle{}\subpageref{NW4L0rMe-3gn9Vf-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3HFFnr-1}}\nwenddeflinemarkup 
            whiptail --title "This branch was selected" \\ 
            --msgbox "$\{bName\} was selected" 15 60 
            echo "$\{bName\} was selected" >> $\{log\} 
            ParseConfig 
        fi 
\LA{}SelectBranch4~{\nwtagstyle{}\subpageref{NW4L0rMe-2FwhnT-1}}\RA{} \nwused{\\{NW4L0rMe-3HFFnr-1}}\nwendcode{}\nwbegindocs{192}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/SelectedBranch.png} \caption{Selected Debian branch.} \end{figure} 

In the user interface it continues with the task selection (chapter \ref{sec:Aufgabenauswahl}, page \pageref{sec:Aufgabenauswahl}). 

\subsection{Read configuration} 

This function maps the \texttt{Debian} distribution for which the package is built to the selected Git branch. (Chapter \ref{sec:DetermineDistribution}, page \pageref{sec:DetermineDistribution}) 

\nwenddocs{}\nwbegincode{193}\sublabel{NW4L0rMe-aD8Kl-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-aD8Kl-1}}}\moddef{ParseConfig~{\nwtagstyle{}\subpageref{NW4L0rMe-aD8Kl-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
function ParseConfig \{ 
    # Called by SelectBranch TaskSelect  

    # Parse config file for Debian distribution of branch 
    vc=$(grep --count $\{bName\}_Dist $\{ConfigPath\}$\{OrigName\}) 
    if [ $vc -ge 1 ] 
    then 
        Search4Dist 
    else 
        va="sid" 
    fi 
    RecentBranchD=$\{va\} 
    echo "Notice from ParseConfig: The distribution is "$\{RecentBranchD\} >> $\{log\} 

\} 

\LA{}SelectBranch~{\nwtagstyle{}\subpageref{NW4L0rMe-nazv4-1}}\RA{} \nwnotused{ParseConfig}\nwendcode{}\nwbegindocs{194}\nwdocspar 

\subsection{No or only one branch exists} \label{subsec:OneBranch} 

\nwenddocs{}\nwbegincode{195}\sublabel{NW4L0rMe-2FwhnT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2FwhnT-1}}}\moddef{SelectBranch4~{\nwtagstyle{}\subpageref{NW4L0rMe-2FwhnT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3gn9Vf-1}}\nwenddeflinemarkup 
    elif [ $\{#ba[@]\} -eq 1 ] 
    then 
         whiptail --title "Only one branch" \\ 
         --msgbox "There is only one Debian branch: $\{ba[0]\}" 15 60 
\LA{}SelectBranch6~{\nwtagstyle{}\subpageref{NW4L0rMe-1zea7-1}}\RA{} \nwused{\\{NW4L0rMe-3gn9Vf-1}}\nwendcode{}\nwbegindocs{196}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/OnlyOneBranch.png} \caption{There is only one Git branch} \end{figure} 

If there is a Git branch, the task selection continues (chapter \ref{sec:Aufgabenauswahl}, page \pageref{sec:Aufgabenauswahl}). Otherwise there is a hint. 

\nwenddocs{}\nwbegincode{197}\sublabel{NW4L0rMe-1zea7-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1zea7-1}}}\moddef{SelectBranch6~{\nwtagstyle{}\subpageref{NW4L0rMe-1zea7-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2FwhnT-1}}\nwenddeflinemarkup 
    else 
        whiptail --title "There is no branch" \\ 
        --msgbox "There is no branch created.\\nPlease build a new version." 15 60
    fi
 \} 

\LA{}AddGitServer~{\nwtagstyle{}\subpageref{nw@notdef}}\RA{} \nwused{\\{NW4L0rMe-2FwhnT-1}}\nwendcode{}\nwbegindocs{198}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/NoBranchCreated.png} \caption{No branch created} \end{figure} 

\section{Task selection} \label{sec:Aufgabenauswahl} 

After the configuration file is loaded and checked or created, a task selection menu appears. 

Since the program is modular, the tasks can also be selected individually. The building process can be interrupted and resumed later. 

\nwenddocs{}\nwbegincode{199}\sublabel{NW4L0rMe-3CAFBW-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3CAFBW-1}}}\moddef{CommonTasks~{\nwtagstyle{}\subpageref{NW4L0rMe-3CAFBW-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-17dpue-1}}\nwenddeflinemarkup 
function CommonTasks \{ 
    # Called by BuildApp TaskSelect 

    Task=$(whiptail --title "Tasks:" \\ 
    --radiolist "What do you like to do? " 17 60 9 \\
      "2" "Build a new version of a package" off \\ 
      "3" "Build a new debian revision" on \\
      "4" "Rebuilding a revision" off \\ 
      "5" "Running lintian and uscan" off \\ 
      "6" "Uploading only (build again if necessary)" off \\ 
      "7" "Create new branch" off \\ 
      "8" "Select branch" off \\ 
      "9" "Set name or IP of own git server" off \\ 
      10" "Create a debdiff" off \\ 
    --cancel-button "Exit" 3>&2 2>&1 1>&3) 

    if [ -z "$\{Task\}" ] 
    then
        exit 
    fi 
    TaskSelect
 \} 

\LA{}AskOrigName~{\nwtagstyle{}\subpageref{NW4L0rMe-4d0TUI-1}}\RA{} \nwused{\\{NW4L0rMe-17dpue-1}}\nwendcode{}\nwbegindocs{200}\nwdocspar 

\begin{figure}[!h] \centering \includegraphics[width=25em,height=30ex]{Pictures/Aufgabenauswahl.png} \caption{Task selection.} \end{figure} 

The choices are first building a new version (chapter \ref{chap:BuildNewVersion}, page \pageref{chap:BuildNewVersion}) and a new revision. As \textit{default} it continues with building a new \texttt{Debian} revision (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}). 

If a new version is to be built, it asks whether changes should be downloaded from \textit{salsa} first (chapter \ref{sec:PullFromSalsa}, page \pageref{sec:PullFromSalsa}). After that, the program script checks if there are already patches. In such a case, these patches can be imported into a separate Git branch as \textit{patch-queue} (see chapter \ref{sec:ImportPatchQueue}, page \pageref{sec:ImportPatchQueue}). 

After building, the packages can be checked with (chapter \ref{chap:Ueberpruefungen}, page \pageref{chap:Ueberpruefungen}). 

The next menu item concerns uploading (chapter \ref{chap:Uploading}, page \pageref{chap:Uploading}). 

Two further tasks concern the case of working with multiple Git branches, for example also for backports (chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}). Finally, you can also include your own Git server in the workflow (chapter \ref{sec:NameEigenerGitServer}, page \pageref{sec:NameEigenerGitServer}). 

The following lines of the script are also used for flow control. A called function changes the variable 'Task' at its end so that one of the following if-clauses applies. For this reason, the following lines cannot be replaced by a case statement. 

The chain of If statements gives the possibility to process one condition after the other, because the called function returns to the end of the If statement from which it was called. A case statement ends with the call of the function to be processed. 

The call of the corresponding functions is done in the mentioned way again by the function \textit{TaskSelect}. 

The following call invokes the build of a new version (chapter \ref{sec:PullFromSalsa}, page \pageref{sec:PullFromSalsa}). there, it first checks if any changes or additions already exist in the project repository on \textit{salsa.debian.org}. 

\nwenddocs{}\nwbegincode{201}\sublabel{NW4L0rMe-2RUsag-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2RUsag-1}}}\moddef{TaskSelect3~{\nwtagstyle{}\subpageref{NW4L0rMe-2RUsag-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-jY8Bs-1}}\nwenddeflinemarkup 
    ## Common tasks 
    rcts=0 # ReCall TaskSelect flag 

    # Building a new version 
    if [ $Task -eq 2 ] 
    then 
        PullFromSalsa # and then downlod new version 
    fi
 

\LA{}TaskSelect4~{\nwtagstyle{}\subpageref{NW4L0rMe-11Dd8c-1}}\RA{} \nwused{\\{NW4L0rMe-jY8Bs-1}}\nwendcode{}\nwbegindocs{202}\nwdocspar 

Or it continues with building a new \texttt{Debian} revision (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}). This corresponds to the preset value. 

\nwenddocs{}\nwbegincode{203}\sublabel{NW4L0rMe-11Dd8c-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-11Dd8c-1}}}\moddef{TaskSelect4~{\nwtagstyle{}\subpageref{NW4L0rMe-11Dd8c-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2RUsag-1}}\nwenddeflinemarkup 
    # Building a new revision 
    if [ $Task -eq 3 ] 
    then 
        BuildNewRevision 
    fi
 

{}<u1>{203}<u2>{NW4L0rMe-11Dd8c-1}<u3>{{<u4>{}<u6>{NW4L0rMe-11Dd8c-1}}}<u8>{TaskSelect4~{<u5>{}<u7>{NW4L0rMe-11Dd8c-1}}}<u9><u10><u11>{\\{NW4L0rMe-2RUsag-1}}<u12> 
    # Building a revision 
    if [ $Task -eq 3 ] 
    then 
        BuildNewRevision 
    fi
 

\LA{}TaskSelect5~{\nwtagstyle{}\subpageref{NW4L0rMe-3Z2bSU-1}}\RA{} \nwused{\\{NW4L0rMe-2RUsag-1}}\nwendcode{}\nwbegindocs{204}\nwdocspar 

After building a new revision, test it. (Chapter \ref{chap:Ueberpruefungen}, page \pageref{chap:Ueberpruefungen}) further. This is done using \textit{lintian} (chapter \ref{subsec:RunningLintian}, page \pageref{subsec:RunningLintian}) and \textit{uscan} (chapter \ref{sec:uscan}, page \pageref{sec:uscan}). 

\nwenddocs{}\nwbegincode{205}\sublabel{NW4L0rMe-3Z2bSU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3Z2bSU-1}}}\moddef{TaskSelect5~{\nwtagstyle{}\subpageref{NW4L0rMe-3Z2bSU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-11Dd8c-1}}\nwenddeflinemarkup 
    # Running lintian and uscan 
    if [ $Task -eq 5 ] 
    then 
        RunningTests 
    fi
\LA{}TaskSelect6~{\nwtagstyle{}\subpageref{NW4L0rMe-1Pd8KA-1}}\RA{} \nwused{\\{NW4L0rMe-11Dd8c-1}}\nwendcode{}\nwbegindocs{206}\nwdocspar 

The next step calls the \textit{PrepareUploading} function (chapter \ref{chap:Uploading}, page \pageref{chap:Uploading}). In it, it is first checked whether the file \textit{debian/changelog} is already prepared for a release \index{Publishing}. If not, this is still done. 

\nwenddocs{}\nwbegincode{207}\sublabel{NW4L0rMe-1Pd8KA-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1Pd8KA-1}}}\moddef{TaskSelect6~{\nwtagstyle{}\subpageref{NW4L0rMe-1Pd8KA-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3Z2bSU-1}}\nwenddeflinemarkup 
    # Uploading the package 
    if [ $Task -eq 6 ] 
    then 
        PrepareUploading 
    fi
 

\LA{}TaskSelect7~{\nwtagstyle{}\subpageref{NW4L0rMe-3N7Rzm-1}}\RA{} \nwused{\\{NW4L0rMe-3Z2bSU-1}}\nwendcode{}\nwbegindocs{208}\nwdocspar 

The following section is necessary to build for a different distribution. This refers to Debian backports, Debian Proposed updates for stable and possibly for oldstable. If necessary, this is also needed to provide a package for an Ubuntu branch. (See also chapter \ref{chap:BuildBeyondSid}, page \pageref{chap:BuildBeyondSid}). 

\nwenddocs{}\nwbegincode{209}\sublabel{NW4L0rMe-3N7Rzm-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3N7Rzm-1}}}\moddef{TaskSelect7~{\nwtagstyle{}\subpageref{NW4L0rMe-3N7Rzm-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1Pd8KA-1}}\nwenddeflinemarkup 
    # Create new branch 
    # (e.g. for backports or proposed-updates) 
    if [ $Task -eq 7 ] 
    then 
        CreateNewBranch 
        rcts=1 
    fi
 

    # Select branch 
    if [ $Task -eq 7 ] 
    then 
        SelectBranch 
        rcts=1 
    fi
 

    # Set name or IP of own git server 
    if [ $Task -eq 9 ] 
    then 
        OwnServer 
        rcts=1 
    fi
 

    # Create a debdiff 
    if [ $Task -eq 10 ] 
    then 
        DebDiff 0 
        rcts=1 
    fi
 

\LA{}TaskSelect9~{\nwtagstyle{}\subpageref{nw@notdef}}\RA{} \nwused{\\{NW4L0rMe-1Pd8KA-1}}\nwendcode{}\nwbegindocs{210}\nwdocspar \chapter{Building a new version} \label{chap:BuildNewVersion} 

This chapter describes the steps leading to the creation of the \texttt{Debian} source code package (\textit{*.orig.tar.(g|x)z}) (Chapter \ref{chap:DebianPackage}, page \pageref{chap:DebianPackage}). To do this, also start the program script (chapter \ref{sec:Intro}, page \pageref{sec:Intro}). 

The program script makes it possible to obtain the upstream source code in various ways. Two possibilities have already been described, namely cloning \textit{salsa.debian.org} (Chapter \ref{sec:SalsaDebianOrg}, page \pageref{sec:SalsaDebianOrg}) and importing a \texttt{Debian} source code package (Chapter \ref{sec:ImportPackage}, page \pageref{sec:ImportPackage}). 

[fuzzy]{How a shell script helps to build a \textit{Debian} package} 

\section{Download changes from \textit{Salsa}.} \label{sec:PullFromSalsa} 

It can happen, especially with team-supported packages, that other team members provide changes in the Git repository on \textit{salsa.debian.org}. For further work on this repository it is now mandatory to commit these changes to the local repository as well. 

This can be done with \begin{verbatim} 
gbp pull --all salsa
 \end{verbatim} 

If this causes problems, you can also update the individual branches with \begin{verbatim} 
git checkout <BranchName> 
git pull salsa <BranchName>.
 \end{verbatim} 

 

\nwenddocs{}\nwbegincode{211}\sublabel{NW4L0rMe-1w2rfN-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1w2rfN-1}}}\moddef{PullFromSalsa~{\nwtagstyle{}\subpageref{NW4L0rMe-1w2rfN-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4QLWi1-1}}\nwenddeflinemarkup 
function PullFromSalsa \{ 
    # Called by TaskSelect 

    cd $\{GitPath\} 
    if git remote --verbose | grep --quiet 'salsa' 
    then 
        if whiptail --title "Pull from Salsa?" \\ 
        --yesno "Do you like to pull possible changes from salsa?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            echo "RecentBranch: "$(git branch) >> $\{log\} git pull --all 
        fi 
\LA{}PullFromSalsa1~{\nwtagstyle{}\subpageref{NW4L0rMe-OrTYh-1}}\RA{} \nwused{\\{NW4L0rMe-4QLWi1-1}}\nwendcode{}\nwbegindocs{212}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/PullFromSalsa.png} \caption{Download from salsa.debian.org} \end{figure} 

In addition, the password for the SSH key is requested, which can be used to access \textit{salsa.debian.org}. 

\nwenddocs{}\nwbegincode{213}\sublabel{NW4L0rMe-OrTYh-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-OrTYh-1}}}\moddef{PullFromSalsa1~{\nwtagstyle{}\subpageref{NW4L0rMe-OrTYh-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1w2rfN-1}}\nwenddeflinemarkup 
    fi 

    ClassicalOrUscan
 \} 

\LA{}CloneFromSalsa~{\nwtagstyle{}\subpageref{NW4L0rMe-NVYSY-1}}\RA{} \nwused{\\{NW4L0rMe-1w2rfN-1}}\nwendcode{}\nwbegindocs{214}\nwdocspar 

The \textit{PullFromSalsa} function calls the \textit{ClassicalOrUscan} function (chapter \ref{sec:DownloadTools}, page \pageref{sec:DownloadTools}) at the end, which first calls the \textit{PQImport} function to import an existing \textit{patch queue}. 

\section{Import an existing \textit{patch queue}} \label{sec:ImportPatchQueue} 

Before downloading the new upstream version, it checks if there is already a \textit{patch queue} for the previously packed version. By "`\textit{patch queue}"' is meant the patches listed in the \textit{debian/patches/series} file in the order there. 

In this case, the possibility is opened to import them via \textit{gbp pq import} into a separate \textit{patch-queue-branch}, if this does not already exist. This allows the patches to be added back into it later -- after the new version has been imported. 

When imported into the patch queue branch, the patches are applied to the upstream source code. 

This requires that there are no unversioned files in the current \texttt{Git} branch and that all patches listed in the \textit{debian/patches/series} file can be applied. Otherwise, \textit{gbp pq import} will fail. Then no \textit{patch-queue branch} is created. Making the patches manually applicable can be time-consuming. 

However, the above conditions should usually be met before importing a new version. 

\nwenddocs{}\nwbegincode{215}\sublabel{NW4L0rMe-kZHCE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-kZHCE-1}}}\moddef{PQImport~{\nwtagstyle{}\subpageref{NW4L0rMe-kZHCE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-7xnC6-1}}\nwenddeflinemarkup 
function PQImport \{ 
    # Called by ClassicalOrUscan PQMigration CloneFromSalsa and itself 
    returnflag=$1 
    if [ ! $\{returnflag\} ] 
    then 
        returnflag=1 
    fi 
    cd $\{GitPath\} 
    if echo $(git branch) | grep --quiet 'patch-queue/'$\{RecentBranch\} 
    # patch-queue branch already exists 
    then 
        return 
    fi
 

    if [ -f debian/patches/series ] 
    # debian/patches/series exists 
    then 
        if whiptail --title "There are patches" \\ 
        --yesno "Do you like to import the current patches\\n\\ 
        onto the patch-queue branch? (recommended)" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
\LA{}PQImport1~{\nwtagstyle{}\subpageref{NW4L0rMe-2TdfSP-1}}\RA{} \nwused{\\{NW4L0rMe-7xnC6-1}}\nwendcode{}\nwbegindocs{216}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/ThereArePatches.png} \caption{There are patches} \end{figure} 

If this question is answered in the negative, the download of the source code continues (chapter \ref{sec:DownloadTools}, page \pageref{sec:DownloadTools}). 

Otherwise, in preparation for importing into a \textit{patch queue} branch, the next step is to check the Git status as described in chapter \ref{subsec:CheckGitStatus} (page \pageref{subsec:CheckGitStatus}). 

\nwenddocs{}\nwbegincode{217}\sublabel{NW4L0rMe-2TdfSP-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2TdfSP-1}}}\moddef{PQImport1~{\nwtagstyle{}\subpageref{NW4L0rMe-2TdfSP-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-kZHCE-1}}\nwenddeflinemarkup 
        then 
            CheckGitStatus
\LA{}PQImport1-1~{\nwtagstyle{}\subpageref{NW4L0rMe-25wVEn-1}}\RA{} \nwused{\\{NW4L0rMe-kZHCE-1}}\nwendcode{}\nwbegindocs{218}\nwdocspar 

\subsection{First attempt to import} 

If no patch queue branch exists, which should be the normal case, one is created. Then the import into this patch queue branch takes place. After the import has been completed, the original branch (usually \textit{debian/sid}) is (re)switched to (chapter \ref{subsec:pqImportSuccessful}, page \pageref{subsec:pqImportSuccessful}).. 

All patches listed in the \textit{debian/patches/series} file must be applicable. 

\nwenddocs{}\nwbegincode{219}\sublabel{NW4L0rMe-25wVEn-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-25wVEn-1}}}\moddef{PQImport1-1~{\nwtagstyle{}\subpageref{NW4L0rMe-25wVEn-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2TdfSP-1}}\nwenddeflinemarkup 
            echo "Notice from gbp pq import: " >> $\{log\} 
            gbp pq --verbose import >> $\{log\} 2>&1
&            if [ $? -eq 1 ] 
            then 
                Notice="All patches listed in debian/patches/series\\n\\ 
                have to be appliable"'!'"\\n\\ 
                For Details, look into the log file of the project.\\n" 
                FailureNotice $\{Notice\} 
\LA{}PQImport2~{\nwtagstyle{}\subpageref{NW4L0rMe-A0ddl-1}}\RA{} \nwused{\\{NW4L0rMe-2TdfSP-1}}\nwendcode{}\nwbegindocs{220}\nwdocspar 

If the import fails, a troubleshooting option is opened (chapter \ref{subsec:FailureNotice}, page \pageref{subsec:FailureNotice}). After that, a new attempt can be made. The successful import is reported by the program script (chapter \ref{subsec:pqImportSuccessful}, page \pageref{subsec:pqImportSuccessful}). 

\subsection{Another import attempt} \label{subsec:ImportAgain} 

After the error has been corrected, a new import attempt can be made. If the error correction attempt is deemed unsuccessful, the import can be canceled. 

\nwenddocs{}\nwbegincode{221}\sublabel{NW4L0rMe-A0ddl-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-A0ddl-1}}}\moddef{PQImport2~{\nwtagstyle{}\subpageref{NW4L0rMe-A0ddl-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-25wVEn-1}}\nwenddeflinemarkup 
                if whiptail --title "Fixed?" --yesno "Retry?" \\ 
                --yes-button "Yes" --no-button "No import" 15 60 
\LA{}PQImport3~{\nwtagstyle{}\subpageref{NW4L0rMe-4eBX6z-1}}\RA{} \nwused{\\{NW4L0rMe-25wVEn-1}}\nwendcode{}\nwbegindocs{222}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/FixedRetry.png} \caption{Fixed? Retry?} \end{figure} 

\nwenddocs{}\nwbegincode{223}\sublabel{NW4L0rMe-4eBX6z-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4eBX6z-1}}}\moddef{PQImport3~{\nwtagstyle{}\subpageref{NW4L0rMe-4eBX6z-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-A0ddl-1}}\nwenddeflinemarkup 
                then 
                    PQImport $\{returnflag\} 
                else 
                    whiptail --title "No import onto a patch-queue branch" \\ 
                    --msgbox "Let's go on without the import\\n\\ 
                    of the current patches onto a patch-queue branch" \\ 
                    15 60 
                fi 
\LA{}PQImport4~{\nwtagstyle{}\subpageref{NW4L0rMe-1RlvBt-1}}\RA{} \nwused{\\{NW4L0rMe-A0ddl-1}}\nwendcode{}\nwbegindocs{224}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/NoPQImport.png} \caption{No import into patch queue} \end{figure} 

\subsection{Import successful into PQ branch} \label{subsec:pqImportSuccessful} 

The successful import into the PQ-Branch is indicated with a dialog. 

\nwenddocs{}\nwbegincode{225}\sublabel{NW4L0rMe-1RlvBt-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1RlvBt-1}}}\moddef{PQImport4~{\nwtagstyle{}\subpageref{NW4L0rMe-1RlvBt-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4eBX6z-1}}\nwenddeflinemarkup 
            else 
                whiptail --title "Done" \\ 
                --msgbox "Imported the current patches onto the patch-queue branch" \\ 
                15 60 
\LA{}PQImport5~{\nwtagstyle{}\subpageref{NW4L0rMe-3PGErV-1}}\RA{} \nwused{\\{NW4L0rMe-4eBX6z-1}}\nwendcode{}\nwbegindocs{226}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/PQImport.png} \caption{PQ-Import successful} \end{figure} 

Then the program script returns to the original Git branch (Debian branch). 

\nwenddocs{}\nwbegincode{227}\sublabel{NW4L0rMe-3PGErV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3PGErV-1}}}\moddef{PQImport5~{\nwtagstyle{}\subpageref{NW4L0rMe-3PGErV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1RlvBt-1}}\nwenddeflinemarkup
                if [ $\{returnflag\} -eq 1 ] 
                then 
                    # Back to the previous branch 
                    git checkout $\{RecentBranch\} 
                fi 
            fi 
        fi 
    fi
 \} 

\LA{}ClassicalOrUscan~{\nwtagstyle{}\subpageref{NW4L0rMe-42gj5Q-1}}\RA{} \nwused{\\{NW4L0rMe-1RlvBt-1}}\nwendcode{}\nwbegindocs{228}\nwdocspar 

\section{Tools for downloading the upstream sources.} \label{sec:DownloadTools} 

To build a \texttt{Debian} package, the source code of the upstream project is needed first. This can be obtained in several ways. 

Downloading the source code with \textit{wget} is the classic method (chapter \ref{sec:BauenNeueVersion}, page \pageref{sec:BauenNeueVersion}). This way should be chosen when building a new package for the first time. 

It happens that upstream does not provide a source code archive. Instead, source code can be found at \textit{Github} or similar hosts. This places special demands on the maintainer of a \texttt{Debian} package. 

Alone to build \textit{reproducible}, a tar archive of the upstream source code must be provided. This must be possible without network access to External Resources. 

This method must also be chosen if a specific state of the upstream code from a Git repository (e.g. Github or similar) is to be used. 

However, if a file \textit{debian/watch} and other files already exist in the directory \textit{debian/}, \textit{uscan} (chapter \ref{sec:ImportWithUscan}, page \pageref{sec:ImportWithUscan}) can also be used for this. A download with \textit{uscan} is recommended if the file \textit{debian/watch} contains an entry \textit{uversionmangle=}. 

If \textit{uscan} cannot identify the new version, the new version must be deployed manually or via \textit{wget}. 

These possibilities are offered alternatively by the program script. 

There is also the possibility to use \textit{get-orig-source} in \textit{debian/rules}. 

\nwenddocs{}\nwbegincode{229}\sublabel{NW4L0rMe-42gj5Q-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-42gj5Q-1}}}\moddef{ClassicalOrUscan~{\nwtagstyle{}\subpageref{NW4L0rMe-42gj5Q-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3PGErV-1}}\nwenddeflinemarkup 
    # Called by PullFromSalsa 

# Before importing a new version, check whether there is a patch-queue, # which can be exported onto a patch-queue branch first PQImport 1 

\LA{}ClassicalOrUscan1~{\nwtagstyle{}\subpageref{NW4L0rMe-3kcUaX-1}}\RA{} \nwused{\\{NW4L0rMe-3PGErV-1}}\nwendcode{}\nwbegindocs{230}\nwdocspar 

The \textit{PQimport} function is described in chapter \ref{sec:ImportPatchQueue} (page \pageref{sec:ImportPatchQueue}). 

If a \textit{debian/watch} file already exists, the user is asked if he wants to download the new version in the "`classical'" way or with \textit{uscan}.. 

\nwenddocs{}\nwbegincode{231}\sublabel{NW4L0rMe-3kcUaX-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3kcUaX-1}}}\moddef{ClassicalOrUscan1~{\nwtagstyle{}\subpageref{NW4L0rMe-3kcUaX-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-42gj5Q-1}}\nwenddeflinemarkup 
    if [ ! -f $\{GitPath\}/debian/watch ] 
    then 
        BuildNewVersion 
        return 
\LA{}ClassicalOrUscan1-1~{\nwtagstyle{}\subpageref{NW4L0rMe-2qrPTU-1}}\RA{} \nwused{\\{NW4L0rMe-42gj5Q-1}}\nwendcode{}\nwbegindocs{232}\nwdocspar 

It is checked whether in the file \textit{debian/watch} \textit{addons.thunderbird.net} or \textit{addons.mozilla.org} are listed as source. Because from there no download with uscan is possible. 

\nwenddocs{}\nwbegincode{233}\sublabel{NW4L0rMe-2qrPTU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2qrPTU-1}}}\moddef{ClassicalOrUscan1-1~{\nwtagstyle{}\subpageref{NW4L0rMe-2qrPTU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3kcUaX-1}}\nwenddeflinemarkup 

    else 
        # Download from Mozilla repos is not possible with uscan 
        if grep --quiet "addons.thunderbird.net" $\{GitPath\}/debian/watch 
        then 
            whiptail --title "Thunderbird Repository" \\ 
            --msgbox "From addons.thunderbird.net \\nyou can't dowload with uscan" \\ 
            15 60 
            BuildNewVersion 
            return 
        fi
 

\LA{}ClassicalOrUscan2~{\nwtagstyle{}\subpageref{NW4L0rMe-1EV733-1}}\RA{} \nwused{\\{NW4L0rMe-3kcUaX-1}}\nwendcode{}\nwbegindocs{234}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/ThunderbirdRepo.png} \caption{No download via uscan from thunderbird.net} \end{figure} 

\nwenddocs{}\nwbegincode{235}\sublabel{NW4L0rMe-1EV733-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1EV733-1}}}\moddef{ClassicalOrUscan2~{\nwtagstyle{}\subpageref{NW4L0rMe-1EV733-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2qrPTU-1}}\nwenddeflinemarkup 
        if grep --quiet "addons.mozilla.org" $\{GitPath\}/debian/watch 
        then 
            whiptail --title "Mozilla Repository" \\ 
            --msgbox "From addons.mozilla.org \\nyou can't dowload with uscan" \\ 
            15 60 
            BuildNewVersion 
            return 
        fi
 

\LA{}ClassicalOrUscan3~{\nwtagstyle{}\subpageref{NW4L0rMe-3L4asj-1}}\RA{} \nwused{\\{NW4L0rMe-2qrPTU-1}}\nwendcode{}\nwbegindocs{236}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/MozillaRepo.png} \caption{No download via uscan from mozilla.org} \end{figure} 

\nwenddocs{}\nwbegincode{237}\sublabel{NW4L0rMe-3L4asj-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3L4asj-1}}}\moddef{ClassicalOrUscan3~{\nwtagstyle{}\subpageref{NW4L0rMe-3L4asj-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1EV733-1}}\nwenddeflinemarkup 
        NVTask=$(whiptail --title "Classical download or uscan" \\ 
        --radiolist "How do you want to download the new version? " 17 60 9 \\
         "0" "using the classical way" on \\ 
         "1" "using uscan" off --cancel-button "Exit" 3>&2 2>&1 1>&3) 

\LA{}ClassicalOrUscan5~{\nwtagstyle{}\subpageref{NW4L0rMe-4QLWi1-1}}\RA{} \nwused{\\{NW4L0rMe-1EV733-1}}\nwendcode{}\nwbegindocs{238}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/ClassicalOrUscan.png} \caption{Download - classical or with uscan} \end{figure} 

\nwenddocs{}\nwbegincode{239}\sublabel{NW4L0rMe-4QLWi1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4QLWi1-1}}}\moddef{ClassicalOrUscan5~{\nwtagstyle{}\subpageref{NW4L0rMe-4QLWi1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3L4asj-1}}\nwenddeflinemarkup 
        if [ -z "$\{NVTask\}" ] 
        then 
            exit 
        case "$NVTask" in 
            0) BuildNewVersion;; 
            1) BuildWithUscan;; 
        esac 
    fi
 \} 

\LA{}PullFromSalsa~{\nwtagstyle{}\subpageref{NW4L0rMe-1w2rfN-1}}\RA{} \nwused{\\{NW4L0rMe-3L4asj-1}}\nwendcode{}\nwbegindocs{240}\nwdocspar 

If the \textit{debian/watch} file does not exist, the user must download the new version in the classical way. 

If downloading with \textit{uscan} is selected instead of the classical way, it continues with chapter \ref{sec:ImportWithUscan} (page \pageref{sec:ImportWithUscan}). 

\section{Download the classic way} \label{sec:BauenNeueVersion} 

As a rule, the source code of a software is provided as an archive. Various formats are available for this purpose. The use of these is described below. 

\subsection{Archive formats} \label{subsec:ArchiveFormat} 

For use with \textit{git-buildpackage}, an orig-tar archive is mandatory as source. This may only have the formats \textit{*.tar.gz} or \textit{*.tar.xz}. The orig tar archive is also uploaded to the \texttt{Debian} archive. 

For use on Linux, a \textit{*.tar.gz} is usually provided. Sometimes this is also a \textit{*.tar.xz}. 

For software that spans multiple operating systems, the source code is often provided as a zip archive. A zip archive is therefore repacked into an \textit{.tar.xz}. For this there is the tool \textit{mk-origtargz} (chapter \ref{subsec:mkorigtargz}, page \pageref{subsec:mkorigtargz}). 

In addition, in the file \textit{debian/gbp.conf} belonging to the project can be specified which archive format should be used. If \textit{compression = xz} is specified here as compression, a \textit{*.tar.gz} must also be converted to a \textit{*.tar.xz}. This is then documented in the \textit{debian/README.source} file (chapter \ref{subsec:ReadmeSource}, page \pageref{subsec:ReadmeSource}).. 

Use \textit{mk-origtargz} to rename the original authors' tarball, optionally change the compression, and remove unwanted files. 

\subsection{Downloading the source code} \label{subsec:DownloadSourceCode} 

So first the source code is downloaded. 

\nwenddocs{}\nwbegincode{241}\sublabel{NW4L0rMe-3kBVPO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3kBVPO-1}}}\moddef{BuildNewVersion~{\nwtagstyle{}\subpageref{NW4L0rMe-3kBVPO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-fSXSs-1}}\nwenddeflinemarkup 
function BuildNewVersion \{ 
    # Called by ClassicalOrUscan
 

    echo "Building a new version" >> $\{log\} 

    UpstreamSourceName=$(whiptail --title "Name of the source" \\ 
    --inputbox "Please insert the file name of the upstream source version\\n \\ 
    to be downloaded or copied (including version and suffix):\\n" \\ 
    --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3) 

\LA{}BuildNewVersion3~{\nwtagstyle{}\subpageref{NW4L0rMe-48DroU-1}}\RA{} \nwused{\\{NW4L0rMe-fSXSs-1}}\nwendcode{}\nwbegindocs{242}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/EditSource.png} \caption{Name of the upstream URL} \end{figure} 

Now the name of the source code package is entered here. 

\nwenddocs{}\nwbegincode{243}\sublabel{NW4L0rMe-48DroU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-48DroU-1}}}\moddef{BuildNewVersion3~{\nwtagstyle{}\subpageref{NW4L0rMe-48DroU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3kBVPO-1}}\nwenddeflinemarkup 
    if [ -z "$\{UpstreamSourceName\}" ] 
    then 
        exit 
    fi
 

\LA{}BuildNewVersion4~{\nwtagstyle{}\subpageref{NW4L0rMe-1Wi6nm-1}}\RA{} \nwused{\\{NW4L0rMe-3kBVPO-1}}\nwendcode{}\nwbegindocs{244}\nwdocspar 

The program takes care of downloading the upstream version. If this has already been downloaded, the program can also continue to work with it. 

\nwenddocs{}\nwbegincode{245}\sublabel{NW4L0rMe-1Wi6nm-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1Wi6nm-1}}}\moddef{BuildNewVersion4~{\nwtagstyle{}\subpageref{NW4L0rMe-1Wi6nm-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-48DroU-1}}\nwenddeflinemarkup 
    cd $\{PrjPath\} 
    if whiptail --title "Should the source be downloaded?" \\ 
    --yesno "Should $UpstreamSourceName\\n \\ 
    be downloaded from the upstream page?" \\ 
    --defaultno --yes-button "Yes" --no-button "No" 15 60 
\LA{}BuildNewVersion4-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3CrH1m-1}}\RA{} \nwused{\\{NW4L0rMe-48DroU-1}}\nwendcode{}\nwbegindocs{246}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DownloadOrCopy.png} \caption{Download (or copy)?} \end{figure} 

If the question is answered in the negative, the next step is copying (chapter \ref{subsubsec:CopyingSource}, page \pageref{subsubsec:CopyingSource}). 

\subsubsection{Download} \label{subsubsec:DownloadSource} 

\nwenddocs{}\nwbegincode{247}\sublabel{NW4L0rMe-3CrH1m-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3CrH1m-1}}}\moddef{BuildNewVersion4-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3CrH1m-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1Wi6nm-1}}\nwenddeflinemarkup 
    then 
        if [ -z "$\{DownloadUrl\}" ] 
        then 
            DownloadUrl=$(whiptail --title "Insert URL for download" \\ 
            --inputbox "Please insert the complete\\n \\ 
            URL to download $\{UpstreamSourceName\}\\n(with 'https://'\\n \\ 
            or so and the name of the archive):" \\ 
            --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3)
        fi 

\LA{}BuildNewVersion4-2~{\nwtagstyle{}\subpageref{NW4L0rMe-b3ut0-1}}\RA{} \nwused{\\{NW4L0rMe-1Wi6nm-1}}\nwendcode{}\nwbegindocs{248}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/InsertForDownload.png} \caption{Enter link for download} \end{figure} 

\nwenddocs{}\nwbegincode{249}\sublabel{NW4L0rMe-b3ut0-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-b3ut0-1}}}\moddef{BuildNewVersion4-2~{\nwtagstyle{}\subpageref{NW4L0rMe-b3ut0-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3CrH1m-1}}\nwenddeflinemarkup 
        if [ -z "$\{DownloadUrl\}" ] 
        then 
            exit 
        else 
            changeflag=1 
        fi
 

\LA{}BuildNewVersion5~{\nwtagstyle{}\subpageref{NW4L0rMe-32wvzC-1}}\RA{} \nwused{\\{NW4L0rMe-3CrH1m-1}}\nwendcode{}\nwbegindocs{250}\nwdocspar 

As a precaution, you will be asked if the URL to download the source code is correct. 

\nwenddocs{}\nwbegincode{251}\sublabel{NW4L0rMe-32wvzC-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-32wvzC-1}}}\moddef{BuildNewVersion5~{\nwtagstyle{}\subpageref{NW4L0rMe-32wvzC-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-b3ut0-1}}\nwenddeflinemarkup 
        if ! whiptail --title "DownloadUrl" \\ 
        --yesno "The complete URL to download $\{UpstreamSourceName\} is\\n \\ 
        $\{DownloadUrl\}" --yes-button "Yes" --no-button "No" 15 60 
\LA{}BuildNewVersion5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3CrE1y-1}}\RA{} \nwused{\\{NW4L0rMe-b3ut0-1}}\nwendcode{}\nwbegindocs{252}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DownloadURLCorrect.png} \caption{Download-URL right?} \end{figure} 

\nwenddocs{}\nwbegincode{253}\sublabel{NW4L0rMe-3CrE1y-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3CrE1y-1}}}\moddef{BuildNewVersion5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3CrE1y-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-32wvzC-1}}\nwenddeflinemarkup 
        then 
            DownloadUrl=$(whiptail --title "Complete URL" \\ 
            --inputbox "Real complete URL to download $\{UpstreamSourceName\}\\n \\ 
            (with 'https://' or so and the name of the archive):" \\ 
            --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3)
        fi 

\LA{}BuildNewVersion5-2~{\nwtagstyle{}\subpageref{NW4L0rMe-b3rtC-1}}\RA{} \nwused{\\{NW4L0rMe-32wvzC-1}}\nwendcode{}\nwbegindocs{254}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/CorrectDownloadURL.png} \caption{Correct download URL} \end{figure} 

\nwenddocs{}\nwbegincode{255}\sublabel{NW4L0rMe-b3rtC-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-b3rtC-1}}}\moddef{BuildNewVersion5-2~{\nwtagstyle{}\subpageref{NW4L0rMe-b3rtC-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3CrE1y-1}}\nwenddeflinemarkup 
        if [ -z "$\{DownloadUrl\}" ] 
        then 
            exit 
        else 
            changeflag=1 
        fi 
\LA{}BuildNewVersion6~{\nwtagstyle{}\subpageref{NW4L0rMe-lahD4-1}}\RA{} \nwused{\\{NW4L0rMe-3CrE1y-1}}\nwendcode{}\nwbegindocs{256}\nwdocspar 

The new URL for downloading the source code is entered in the configuration file. After that the download is done by \textit{wget}. 

Then the possibility is opened to download and check also the signature file (chapter \ref{subsec:CheckSignature}, page \pageref{subsec:CheckSignature}). 

\nwenddocs{}\nwbegincode{257}\sublabel{NW4L0rMe-lahD4-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-lahD4-1}}}\moddef{BuildNewVersion6~{\nwtagstyle{}\subpageref{NW4L0rMe-lahD4-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-b3rtC-1}}\nwenddeflinemarkup 
        # Write download URL into config file 
        if [ $changeflag -eq 1 ] 
        then 
            ReplaceConfigLines 'DownloadUrl' $\{DownloadUrl\} 
            changeflag=0 
        fi 

        # getting sources using wget 
        wget --verbose $DownloadUrl &&
        echo -e "The sources were pulled from\\n$\{DownloadUrl\}\\n \\ 
        by wget." >> $\{log\} 

        if whiptail --title ".asc file?" \\ 
        --yesno "Do you want to download an .asc file, too?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            DownloadAscFile 
        fi 
\LA{}BuildNewVersion6-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3CrLzO-1}}\RA{} \nwused{\\{NW4L0rMe-b3rtC-1}}\nwendcode{}\nwbegindocs{258}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DownloadAscFile.png} \caption{Download *.asc file} \end{figure} 

\subsubsection{Copy the source archive} \label{subsubsec:CopyingSource} 

\nwenddocs{}\nwbegincode{259}\sublabel{NW4L0rMe-3CrLzO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3CrLzO-1}}}\moddef{BuildNewVersion6-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3CrLzO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-lahD4-1}}\nwenddeflinemarkup 
    else 
        whiptail --title "Please copy the source code now" \\ 
        --msgbox "Please copy $\{UpstreamSourceName\} to $\{PrjPath\}!" 15 60 
\LA{}BuildNewVersion6-2~{\nwtagstyle{}\subpageref{NW4L0rMe-b3zqc-1}}\RA{} \nwused{\\{NW4L0rMe-lahD4-1}}\nwendcode{}\nwbegindocs{260}\nwdocspar \begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/CopyToPrjPath.png} \caption{Path to copy} \end{figure} 

\nwenddocs{}\nwbegincode{261}\sublabel{NW4L0rMe-b3zqc-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-b3zqc-1}}}\moddef{BuildNewVersion6-2~{\nwtagstyle{}\subpageref{NW4L0rMe-b3zqc-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3CrLzO-1}}\nwenddeflinemarkup 
    if ! whiptail --title "Copy finished?" \\ 
    --yesno "Was $\{UpstreamSourceName\} copied to $\{PrjPath\}?" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
\LA{}BuildNewVersion6-3~{\nwtagstyle{}\subpageref{NW4L0rMe-3uZa1K-1}}\RA{} \nwused{\\{NW4L0rMe-3CrLzO-1}}\nwendcode{}\nwbegindocs{262}\nwdocspar 

%\begin{figure}[h]
%\centering
%\includegraphics[width=25em,height=30ex]{Pictures/AskCopyToPrjPath.png}
%\caption{Pfad zum Kopieren}
%\end{figure}
\nwenddocs{}\nwbegincode{263}\sublabel{NW4L0rMe-3uZa1K-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3uZa1K-1}}}\moddef{BuildNewVersion6-3~{\nwtagstyle{}\subpageref{NW4L0rMe-3uZa1K-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-b3zqc-1}}\nwenddeflinemarkup 
        then 
            echo "Exit" >> $\{log\} whiptail --title "Bye" --msgbox "Bye" 15 60 
            exit 
        fi 
\LA{}BuildNewVersion6-4~{\nwtagstyle{}\subpageref{NW4L0rMe-1tOTes-1}}\RA{} \nwused{\\{NW4L0rMe-b3zqc-1}}\nwendcode{}\nwbegindocs{264}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/bye.png} \caption{Quit program} \end{figure} 

\nwenddocs{}\nwbegincode{265}\sublabel{NW4L0rMe-1tOTes-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1tOTes-1}}}\moddef{BuildNewVersion6-4~{\nwtagstyle{}\subpageref{NW4L0rMe-1tOTes-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3uZa1K-1}}\nwenddeflinemarkup 
    fi
 

    # Identify the type of the upstream archive by suffix 
    CutSuffix 

\LA{}BuildNewVersion7~{\nwtagstyle{}\subpageref{NW4L0rMe-42pULG-1}}\RA{} \nwused{\\{NW4L0rMe-3uZa1K-1}}\nwendcode{}\nwbegindocs{266}\nwdocspar 

Now the compression and the version number is determined. This is called also altogether \textit{Suffix}. If everything is in order here it continues in the chapter \ref{subsec:ExcludeFiles} (page \pageref{subsec:ExcludeFiles}). 

\subsection{Identify suffix} 

Which compression \textit{mk-origtargz} automatically chooses depends on the file type of the upstream archive. The file name extension is compared with a list of reasonable file types. 

\nwenddocs{}\nwbegincode{267}\sublabel{NW4L0rMe-8Lh7T-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-8Lh7T-1}}}\moddef{CutSuffix~{\nwtagstyle{}\subpageref{NW4L0rMe-8Lh7T-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-41L9Uw-1}}\nwenddeflinemarkup 
function CutSuffix \{ 
    # Called by BuildNewVersion 

    # List of reasonable suffixes 
    typea=('.tar.gz' '.tar.xz' '.tgz' '.zip' '.oxt' '.xpi' '.jar') 

\LA{}CutSuffix1~{\nwtagstyle{}\subpageref{NW4L0rMe-2KAwru-1}}\RA{} \nwused{\\{NW4L0rMe-41L9Uw-1}}\nwendcode{}\nwbegindocs{268}\nwdocspar 

The file types \textit{.oxt}, \textit{.xpi} and \textit{.jar} all describe \textit{.zip} archives. For the \textit{.xpi} file type, the \textit{mozilla-devscripts} package is required. 

\nwenddocs{}\nwbegincode{269}\sublabel{NW4L0rMe-2KAwru-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2KAwru-1}}}\moddef{CutSuffix1~{\nwtagstyle{}\subpageref{NW4L0rMe-2KAwru-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-8Lh7T-1}}\nwenddeflinemarkup 
    KnownTyp=0 
    for element in $\{typea[*]\} 
    do 
        if echo $\{UpstreamSourceName\} | grep $\{element\} > /dev/null 
        then 
            echo "Notice from CutSuffix: The suffix of the upstream \\ 
            file is "$\{element\} >> $\{log\} 
            UpstreamSuffix=$\{element\} 
            RecentUpstreamSuffix=$(echo $\{UpstreamSuffix\} | sed --expression s/^.//) 
            ReplaceConfigLines 'RecentUpstreamSuffix' $\{UpstreamSuffix\} 
            KnownTyp=1 
        fi 
    done
 

    if [ $\{KnownTyp\} -ne 1 ] 
    then 
        echo "Notice from CutSuffix: Unknown suffix" >> $\{log\} 
        if ! whiptail --title "Unknown suffix" \\ 
        --yesno "The suffix of $\{UpstreamSourceName\} is not listed.\\n \\ 
        Continue anyway?" --defaultno --yes-button "Yes" \\ 
        --no-button "No" 15 60 
        then 
            exit 
        fi 
    fi
 \} 

\LA{}Name2Version~{\nwtagstyle{}\subpageref{NW4L0rMe-1aQXyX-1}}\RA{} \nwused{\\{NW4L0rMe-8Lh7T-1}}\nwendcode{}\nwbegindocs{270}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/UnknownSuffix.png} \caption{Unknown suffix} \end{figure} 

\subsection{Detect upstream version} 

\nwenddocs{}\nwbegincode{271}\sublabel{NW4L0rMe-42pULG-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-42pULG-1}}}\moddef{BuildNewVersion7~{\nwtagstyle{}\subpageref{NW4L0rMe-42pULG-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1tOTes-1}}\nwenddeflinemarkup 
    # Identify the upstream version number 
    Name2Version 

\LA{}BuildNewVersion8~{\nwtagstyle{}\subpageref{NW4L0rMe-23mNSI-1}}\RA{} \nwused{\\{NW4L0rMe-1tOTes-1}}\nwendcode{}\nwbegindocs{272}\nwdocspar 

\nwenddocs{}\nwbegincode{273}\sublabel{NW4L0rMe-1aQXyX-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1aQXyX-1}}}\moddef{Name2Version~{\nwtagstyle{}\subpageref{NW4L0rMe-1aQXyX-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2KAwru-1}}\nwenddeflinemarkup 
function Name2Version \{ 
    # Called by BuildNewVersion 
    # Extracts version from uptream archive name 
    Suffix=$(echo $\{UpstreamSuffix\} | sed --expression='s/\\./\\\\\\./g') 
    Version1=$(echo $\{UpstreamSourceName\} | sed --expression="s/$\{Suffix\}$//" | \\
    sed --expression="s/.*$\{SourceName\}//gI" | \\ 
    sed --expression='s/-//' | sed --expression='s/v//') 
    if [ -z $\{Version1\} ] 
    then 
        Version1="0.0.0" # Default value 
    fi
 \} 

\LA{}GbpConfIntegration~{\nwtagstyle{}\subpageref{NW4L0rMe-1K4yD3-1}}\RA{} \nwused{\\{NW4L0rMe-2KAwru-1}}\nwendcode{}\nwbegindocs{274}\nwdocspar 

\nwenddocs{}\nwbegincode{275}\sublabel{NW4L0rMe-23mNSI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-23mNSI-1}}}\moddef{BuildNewVersion8~{\nwtagstyle{}\subpageref{NW4L0rMe-23mNSI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-42pULG-1}}\nwenddeflinemarkup 
    if ! whiptail --title "Version" \\ 
    --yesno "You want to build version $\{Version1\}." \\ 
    --yes-button "Yes" --no-button "No" 15 60 
\LA{}BuildNewVersion9~{\nwtagstyle{}\subpageref{NW4L0rMe-2RcgNi-1}}\RA{} \nwused{\\{NW4L0rMe-42pULG-1}}\nwendcode{}\nwbegindocs{276}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/CorrectVersion.png} \caption{Right version?} \end{figure} 

It can happen that the program script cannot determine the correct version designation. In this case, the version designation can be entered in the following dialog box, which can also be processed further. In addition to the digits, the version name may only contain dots and the specification whether it is a \textit{release candidate}, a \textit{beta} or \textit{alpha} version or a specific \textit{commit} from the \texttt{Git} repository. 

\nwenddocs{}\nwbegincode{277}\sublabel{NW4L0rMe-2RcgNi-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2RcgNi-1}}}\moddef{BuildNewVersion9~{\nwtagstyle{}\subpageref{NW4L0rMe-2RcgNi-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-23mNSI-1}}\nwenddeflinemarkup 
    then 
        Version1=$(whiptail --title "Version" \\ 
        --inputbox "Name of the upstream version: $\{UpstreamSourceName\}\\n \\ 
        Which version (without repack identifiers and without revision)\\n \\ 
        of the package $\{SourceName\} should be built?" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3) 

\LA{}BuildNewVersion10~{\nwtagstyle{}\subpageref{NW4L0rMe-1LsmoY-1}}\RA{} \nwused{\\{NW4L0rMe-23mNSI-1}}\nwendcode{}\nwbegindocs{278}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/WhichVersionBuilt.png} \caption{Which version should be built?} \end{figure} 

\nwenddocs{}\nwbegincode{279}\sublabel{NW4L0rMe-1LsmoY-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1LsmoY-1}}}\moddef{BuildNewVersion10~{\nwtagstyle{}\subpageref{NW4L0rMe-1LsmoY-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2RcgNi-1}}\nwenddeflinemarkup 
        if ! whiptail --title "Version" \\ 
        --yesno "Do you really want to build version $\{Version1\}." \\ 
        --yes-button "Yes" --no-button "No" 15 60 \LA{}BuildNewVersion11~{\nwtagstyle{}\subpageref{NW4L0rMe-3SSGeE-1}}\RA{} \nwused{\\{NW4L0rMe-2RcgNi-1}}\nwendcode{}\nwbegindocs{280}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/CorrectVersionBuilt.png} \caption{Will correct version be built?} \end{figure} 

\nwenddocs{}\nwbegincode{281}\sublabel{NW4L0rMe-3SSGeE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3SSGeE-1}}}\moddef{BuildNewVersion11~{\nwtagstyle{}\subpageref{NW4L0rMe-3SSGeE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1LsmoY-1}}\nwenddeflinemarkup 
        then 
            echo "Exit" >> $\{log\} 
            whiptail --title "Bye" --msgbox "Bye" 15 60 
            exit 
        fi
\LA{}BuildNewVersion11-1~{\nwtagstyle{}\subpageref{NW4L0rMe-2uTVOz-1}}\RA{} \nwused{\\{NW4L0rMe-1LsmoY-1}}\nwendcode{}\nwbegindocs{282}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/bye.png} \caption{Quit program} \end{figure} 

\nwenddocs{}\nwbegincode{283}\sublabel{NW4L0rMe-2uTVOz-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2uTVOz-1}}}\moddef{BuildNewVersion11-1~{\nwtagstyle{}\subpageref{NW4L0rMe-2uTVOz-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3SSGeE-1}}\nwenddeflinemarkup 
    fi
 

    ExcludeFiles 

    echo "Version "$\{Version1\}$\{ESuffix\}" of the package "$\{PackName\}" \\ 
    should be built." >> $\{log\} 

\LA{}BuildNewVersion12~{\nwtagstyle{}\subpageref{NW4L0rMe-wKt6k-1}}\RA{} \nwused{\\{NW4L0rMe-3SSGeE-1}}\nwendcode{}\nwbegindocs{284}\nwdocspar 

\subsection{Exclude files from upstream archive} \label{subsec:ExcludeFiles} 

Before \textit{mk-origtargz} is called, the program script allows individual source code files to be excluded from inclusion in the \textit{orig} archive. 

\nwenddocs{}\nwbegincode{285}\sublabel{NW4L0rMe-48Tuu-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-48Tuu-1}}}\moddef{ExcludeFiles~{\nwtagstyle{}\subpageref{NW4L0rMe-48Tuu-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3dKdSR-1}}\nwenddeflinemarkup 
function ExcludeFiles \{ 
    # Called by BuildNewVersion 

\LA{}ExcludeFiles1~{\nwtagstyle{}\subpageref{NW4L0rMe-3vzEPh-1}}\RA{} \nwused{\\{NW4L0rMe-3dKdSR-1}}\nwendcode{}\nwbegindocs{286}\nwdocspar 

It is necessary to specify that files are to be excluded. To do this, the program script determines where the information to exclude files should come from. This is here the file \textit{debian/copyright}. 

Now it checks if a file \textit{debian/copyright} exists. 

\nwenddocs{}\nwbegincode{287}\sublabel{NW4L0rMe-3vzEPh-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3vzEPh-1}}}\moddef{ExcludeFiles1~{\nwtagstyle{}\subpageref{NW4L0rMe-3vzEPh-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-48Tuu-1}}\nwenddeflinemarkup 
    # Checks whether debian/copyright contains a section Files-Excluded 
    gitflag=0 
    exflag=0 
    crflag=0 
    if [ -f $\{GitPath\}/debian/copyright ] 
    then 
\LA{}ExcludeFiles2~{\nwtagstyle{}\subpageref{NW4L0rMe-1dUb7J-1}}\RA{} \nwused{\\{NW4L0rMe-48Tuu-1}}\nwendcode{}\nwbegindocs{288}\nwdocspar 

Then it is checked whether it contains the expression \textit{Files-Excluded}. In this case it is queried whether the file \textit{debian/copyright} should be edited. 

\nwenddocs{}\nwbegincode{289}\sublabel{NW4L0rMe-1dUb7J-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1dUb7J-1}}}\moddef{ExcludeFiles2~{\nwtagstyle{}\subpageref{NW4L0rMe-1dUb7J-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3vzEPh-1}}\nwenddeflinemarkup 
        crflag=1 
        grep 'Files-Excluded' $\{GitPath\}/debian/copyright > /dev/null 
        if [ $? -eq 0 ] 
        then 
            exflag=1 whiptail --title "Copyright file contains Files-Excluded" \\ 
            --msgbox "debian/copyright contains section Files-Excluded." 15 60 
            less --LINE-NUMBERS $\{GitPath\}/debian/copyright 
        fi 
    fi
 

\LA{}ExcludeFiles3~{\nwtagstyle{}\subpageref{NW4L0rMe-39jQIj-1}}\RA{} \nwused{\\{NW4L0rMe-3vzEPh-1}}\nwendcode{}\nwbegindocs{290}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/CopyrightExcluded.png} \caption{File debian/copyright contains section Files-Excluded} \end{figure} 

\nwenddocs{}\nwbegincode{291}\sublabel{NW4L0rMe-39jQIj-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-39jQIj-1}}}\moddef{ExcludeFiles3~{\nwtagstyle{}\subpageref{NW4L0rMe-39jQIj-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1dUb7J-1}}\nwenddeflinemarkup 
    if whiptail --title "Exclude files from upstream source" \\ 
    --yesno "Do you want to exclude files from upstream source?" \\ 
    --defaultno --yes-button "Yes" --no-button "No" 15 60 
\LA{}ExcludeFiles3-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3dhfbH-1}}\RA{} \nwused{\\{NW4L0rMe-1dUb7J-1}}\nwendcode{}\nwbegindocs{292}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ExcludeFiles.png} \caption{Exclude files} \end{figure} 

If no file exclusion is needed, \textit{mk-origtargz} is run in the background.(Chapter \ref{subsec:mkorigtargz}, page \pageref{subsec:mkorigtargz}). Then it continues in chapter \ref{subsec:Link2File}, (page \pageref{subsec:Link2File}). 

\nwenddocs{}\nwbegincode{293}\sublabel{NW4L0rMe-3dhfbH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3dhfbH-1}}}\moddef{ExcludeFiles3-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3dhfbH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-39jQIj-1}}\nwenddeflinemarkup 
    then 
        if [ $crflag -eq 1 ] 
        then 
            if whiptail --title "Copyright file exitst" \\ 
            --yesno "debian/copyright exists.\\nDo you want to edit it?" \\ 
            --yes-button "Yes" --no-button "No" 15 60 
            then 
                gitflag=1 
                nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/copyright 
            fi 
            AddOpt=" --copyright-file "$\{SourceName\}"/debian/copyright"
 

\LA{}ExcludeFiles4~{\nwtagstyle{}\subpageref{NW4L0rMe-YmrY9-1}}\RA{} \nwused{\\{NW4L0rMe-39jQIj-1}}\nwendcode{}\nwbegindocs{294}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/EditDebianCopyright.png} \caption{Should debian/copyright be edited?} \end{figure} 

Otherwise, the \textit{SpecialExcludeFile} function is called. In this function, unless - as in the present case - the information in the file \textit{debian/copyright} is used, a special file is requested which contains the names of the files to be excluded in the format DEP-5\footnote{DEP-5\cite{DEP-5}}. 

\nwenddocs{}\nwbegincode{295}\sublabel{NW4L0rMe-YmrY9-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-YmrY9-1}}}\moddef{ExcludeFiles4~{\nwtagstyle{}\subpageref{NW4L0rMe-YmrY9-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3dhfbH-1}}\nwenddeflinemarkup 
        else 
            SpecialExcludeFile 
        fi
 

\LA{}ExcludeFiles5~{\nwtagstyle{}\subpageref{NW4L0rMe-4JXwD3-1}}\RA{} \nwused{\\{NW4L0rMe-3dhfbH-1}}\nwendcode{}\nwbegindocs{296}\nwdocspar 

If it is already clear before submitting the package to the \texttt{New Queue} that files are to be excluded, no \textit{debian/copyright} file exists at that time. It is then a good idea to list the files to be excluded in a separate file. 

The \textit{ExcludeFiles} function calls the following function for this purpose. This function asks for a special file containing the names of the files to be excluded in DEP-5 format. 

\nwenddocs{}\nwbegincode{297}\sublabel{NW4L0rMe-3dKdSR-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3dKdSR-1}}}\moddef{SpecialExcludeFile~{\nwtagstyle{}\subpageref{NW4L0rMe-3dKdSR-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1O5B2o-1}}\nwenddeflinemarkup 
function SpecialExcludeFile \{ 
    # Called by ExcludeFiles 
    if [ -z "$\{ExcludeFile\}" ] 
    then 
        ExcludeFile=$(whiptail --title "Name of exclude file" \\ 
        --inputbox "Please insert name of the exclude file:" \\ 
        --cancel-button "Exit" 15 60 3>&2 2>&1 1>&3)
        if [ -z "$\{ExcludeFile\}" ] 
        then 
            exit 
        fi 
        echo 'ExcludeFile='$\{ExcludeFile\} >> $\{ConfigPath\}$\{OrigName\} 
    else 
        whiptail --title "Exclude file name" \\ 
        --msgbox "The name of the exlude file is $\{ExcludeFile\}" \\ 
        15 60 
    fi 
    AddOpt=" --copyright-file "$\{ExcludeFile
\} \} 

\LA{}ExcludeFiles~{\nwtagstyle{}\subpageref{NW4L0rMe-48Tuu-1}}\RA{} \nwused{\\{NW4L0rMe-1O5B2o-1}}\nwendcode{}\nwbegindocs{298}\nwdocspar 

Then the program script asks for the attachment to add to the upstream version name\index{Version Name}.. 

Often select \textit{+dfsg} as an attachment here to document the reason for the exclusion (see also chapter \ref{subsubsec:BenamungPakete}, page \pageref{subsubsec:BenamungPakete}) 

\nwenddocs{}\nwbegincode{299}\sublabel{NW4L0rMe-4JXwD3-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4JXwD3-1}}}\moddef{ExcludeFiles5~{\nwtagstyle{}\subpageref{NW4L0rMe-4JXwD3-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-YmrY9-1}}\nwenddeflinemarkup 
        ESuffixN=$(whiptail --title "Suffix:" \\ 
        --radiolist "Please choose the suffix: " \\ 
        --cancel-button "Cancel" 15 60 4 \\ 
        "0" "+ds" off \\ 
        "1" "+dfsg" on \\ 
        "2" "other" off 3>&2 2>&1 1>&3) 
        if [ $\{ESuffixN\} -eq 1 ] 
        then 
            ESuffix="+dfsg" 
        elif [ $\{ESuffixN\} -eq 0 ] 
        then 
            ESuffix="+ds" 
\LA{}ExcludeFile6~{\nwtagstyle{}\subpageref{NW4L0rMe-3fIUk0-1}}\RA{} \nwused{\\{NW4L0rMe-YmrY9-1}}\nwendcode{}\nwbegindocs{300}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/ExcludeSuffix.png} \caption{Suffix for exclusion of files} \end{figure} 

If a suffix other than the two suggested is to be used, this must be added manually. This entry must also be added accordingly in the \textit{debian/watch} file. (s.a chapter \ref{subsec:DebianWatch}, page \pageref{subsec:DebianWatch}) 

\nwenddocs{}\nwbegincode{301}\sublabel{NW4L0rMe-3fIUk0-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3fIUk0-1}}}\moddef{ExcludeFile6~{\nwtagstyle{}\subpageref{NW4L0rMe-3fIUk0-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4JXwD3-1}}\nwenddeflinemarkup 
        else 
            ESuffix=$(whiptail --title "Enter suffix" \\ 
            --inputbox "Please insert the suffix:" \\ 
            --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3) 
        fi 
\LA{}ExcludeFile7~{\nwtagstyle{}\subpageref{NW4L0rMe-17TWQ8-1}}\RA{} \nwused{\\{NW4L0rMe-4JXwD3-1}}\nwendcode{}\nwbegindocs{302}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/InputRepackSuffix.png} \caption{Custom suffix for excluding files} \end{figure} 

\nwenddocs{}\nwbegincode{303}\sublabel{NW4L0rMe-17TWQ8-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-17TWQ8-1}}}\moddef{ExcludeFile7~{\nwtagstyle{}\subpageref{NW4L0rMe-17TWQ8-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3fIUk0-1}}\nwenddeflinemarkup 
        if [ -z "$\{ESuffix\}" ] 
        then 
            whiptail --title "Warning!" \\ 
            --msgbox "You repacked the upstream source and\\n\\ 
            do not want to use a repack suffix." 15 60 
            if [ -n "$\{RecentRepackSuffix\}" ] 
            then 
                # Remove suffix from config file 
                sed --in-place \\ 
                --expression="s/RecentRepackSuffix=.*//g" \\ 
$\{ConfigPath\}$\{OrigName\} 
            fi 
        else 
\LA{}ExcludeFile8~{\nwtagstyle{}\subpageref{NW4L0rMe-2ezXgq-1}}\RA{} \nwused{\\{NW4L0rMe-3fIUk0-1}}\nwendcode{}\nwbegindocs{304}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/WarningNoRepackSuffix.png} \caption{Warning. - No suffix specified} \end{figure} 

In some cases a plus sign (+) can cause problems especially when building Java packages. Sometimes it is also necessary that no suffix can be added. The documentation of such operations can then be done in the file \textit{README.source} (chapter \ref{subsec:ReadmeSource}, page \pageref{subsec:ReadmeSource}) 

\nwenddocs{}\nwbegincode{305}\sublabel{NW4L0rMe-2ezXgq-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2ezXgq-1}}}\moddef{ExcludeFile8~{\nwtagstyle{}\subpageref{NW4L0rMe-2ezXgq-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-17TWQ8-1}}\nwenddeflinemarkup 
            # Insert suffix into config file 
            if [ -z "$\{RecentRepackSuffix\}" ] 
            then 
                echo "RecentRepackSuffix="$\{ESuffix\} >> $\{ConfigPath\}$\{OrigName\} 
            else 
                sed --in-place \\ 
                --expression="s/RecentRepackSuffix=.*/RecentRepackSuffix=$\{ESuffix\}/g" \\ $\{ConfigPath\}$\{OrigName\} 
            fi
 

            RecentRepackSuffix=$\{ESuffix\} 
            AddOpt=$\{AddOpt\}" --repack-suffix "$\{ESuffix\} 
        fi 
\LA{}ExcludeFiles10~{\nwtagstyle{}\subpageref{NW4L0rMe-4INgXM-1}}\RA{} \nwused{\\{NW4L0rMe-17TWQ8-1}}\nwendcode{}\nwbegindocs{306}\nwdocspar 

The compression of the \textit{*.orig.tar.*} archive is stored in the \textit{suffix} variable. It is set to \textit{.tar.xz}. 

\nwenddocs{}\nwbegincode{307}\sublabel{NW4L0rMe-4INgXM-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4INgXM-1}}}\moddef{ExcludeFiles10~{\nwtagstyle{}\subpageref{NW4L0rMe-4INgXM-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2ezXgq-1}}\nwenddeflinemarkup 
        whiptail --title "Option(s) for mk-origtargz:" \\ 
        --msgbox "\\n$\{AddOpt\}" 15 60 
    else 
        AddOpt="" 
        ESuffix=""
 \LA{}ExcludeFiles12~{\nwtagstyle{}\subpageref{NW4L0rMe-2dctS0-1}}\RA{} \nwused{\\{NW4L0rMe-2ezXgq-1}}\nwendcode{}\nwbegindocs{308}\nwdocspar 

If no files are to be excluded, but the \textit{debian/copyright} file contains a \textit{Files-Excluded:} section, remove it (manually). 

\nwenddocs{}\nwbegincode{309}\sublabel{NW4L0rMe-2dctS0-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2dctS0-1}}}\moddef{ExcludeFiles12~{\nwtagstyle{}\subpageref{NW4L0rMe-2dctS0-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4INgXM-1}}\nwenddeflinemarkup 
        if [ $exflag -eq 1 ] 
        then 
            gitflag=1 
            whiptail --title "Copyright file contains Files-Excluded" \\ 
            --msgbox "debian/copyright contains Files-Excluded section.\\n \\ 
            Please delete it" 15 60 
            nano --linenumbers --mouse \\ 
            --softwrap $\{GitPath\}/debian/copyright 
        fi 
    fi
 

\LA{}ExcludeFiles15~{\nwtagstyle{}\subpageref{NW4L0rMe-daBbo-1}}\RA{} \nwused{\\{NW4L0rMe-4INgXM-1}}\nwendcode{}\nwbegindocs{310}\nwdocspar 

If the \textit{debian/copyright} file was edited in connection with the exclusion of files, a corresponding \textit{commit} occurs. 

\nwenddocs{}\nwbegincode{311}\sublabel{NW4L0rMe-daBbo-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-daBbo-1}}}\moddef{ExcludeFiles15~{\nwtagstyle{}\subpageref{NW4L0rMe-daBbo-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2dctS0-1}}\nwenddeflinemarkup 
    if [ $gitflag -eq 1 ] 
    then 
        git add debian/copyright 
        git commit -am "Changed debian/copyright" 
    fi
 \} 

\LA{}CheckSignature~{\nwtagstyle{}\subpageref{NW4L0rMe-3GSX0A-1}}\RA{} \nwused{\\{NW4L0rMe-2dctS0-1}}\nwendcode{}\nwbegindocs{312}\nwdocspar 

\subsection{Create \texttt{Debian} source file} \label{subsec:mkorigtargz} 

The script then continues to execute the \textit{BuildNewVersion} function and passes the parameters necessary for exclusion to the \textit{mk-origtargz} program. (Reference to this location in the other function). 

In this way, a new orig tarball is created with \textit{mk-origtargz} without the files to be excluded from the previous *.tar.gz and its contents are inserted into the existing Git repository with \textit{gbp import-orig}. 

\nwenddocs{}\nwbegincode{313}\sublabel{NW4L0rMe-wKt6k-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-wKt6k-1}}}\moddef{BuildNewVersion12~{\nwtagstyle{}\subpageref{NW4L0rMe-wKt6k-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2uTVOz-1}}\nwenddeflinemarkup 
    # Creating orig file using mk-origtargz 
    if [ -z $\{Version1\} ] 
    then 
        whiptail --title "No version number!"\\ 
        --msgbox "No version - no *.orig.tar.gz! Bye!" 15 60 
        exit 
    fi 
    echo "mk-origtargz --package "$\{SourceName\}" \\ 
    --version "$\{Version1\}$\{AddOpt\}" "$\{UpstreamSourceName\} >> $\{log\}  
    mk-origtargz --package $\{SourceName\} \\ 
    --version $\{Version1\}$\{AddOpt\} $\{UpstreamSourceName\} 2>> $\{log\} 
\LA{}BuildNewVersion13~{\nwtagstyle{}\subpageref{NW4L0rMe-3dF1ag-1}}\RA{} \nwused{\\{NW4L0rMe-2uTVOz-1}}\nwendcode{}\nwbegindocs{314}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/CreateOrigTarGz.png} \caption{Create orig.tar.xz} \end{figure} 

\nwenddocs{}\nwbegincode{313}\sublabel{NW4L0rMe-3dF1ag-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3dF1ag-1}}}\moddef{BuildNewVersion13~{\nwtagstyle{}\subpageref{NW4L0rMe-3dF1ag-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-wKt6k-1}}\nwenddeflinemarkup 
    if [ $? -eq 0 ] 
    then 
        echo "orig file was created by mk-origtargz" >> $\{log\} 
        Version1=$\{Version1\}$\{ESuffix\} 
    else 
        echo "mk-origtargz failed" >> $\{log\} 
        whiptail --title "Fatal error" \\ 
        --msgbox "mk-origtargz failed" 15 60 
        exit 
    fi
 

\LA{}BuildNewVersion14~{\nwtagstyle{}\subpageref{NW4L0rMe-28QC3a-1}}\RA{} \nwused{\\{NW4L0rMe-wKt6k-1}}\nwendcode{}\nwbegindocs{316}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/MKOrigFailed.png} \caption{mk-origtargz failed} \end{figure} 

\nwenddocs{}\nwbegincode{317}\sublabel{NW4L0rMe-28QC3a-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-28QC3a-1}}}\moddef{BuildNewVersion14~{\nwtagstyle{}\subpageref{NW4L0rMe-28QC3a-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3dF1ag-1}}\nwenddeflinemarkup 
    Link2File 
    SearchGbpConf
 

    cd $\{GitPath\} 

    DebianBranch4Import 
\LA{}BuildNewVersion15~{\nwtagstyle{}\subpageref{NW4L0rMe-2NBKow-1}}\RA{} \nwused{\\{NW4L0rMe-3dF1ag-1}}\nwendcode{}\nwbegindocs{318}\nwdocspar 

If the variable \textit{RecentBranch} does not exist or is empty, it is assigned the value \textit{debian/sid} and a corresponding entry is made in the configuration file. 

\nwenddocs{}\nwbegincode{319}\sublabel{NW4L0rMe-1O5B2o-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1O5B2o-1}}}\moddef{DebianBranch4Import~{\nwtagstyle{}\subpageref{NW4L0rMe-1O5B2o-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3J7Lxr-1}}\nwenddeflinemarkup 
function DebianBranch4Import \{ 
    # Called by BuildNewVersion 
    # Makes sure RecentBranch contains value 
    RecentBranch=$(grep 'RecentBranch=' $\{ConfigPath\}$\{OrigName\})  
    RecentBranch=$(echo $\{RecentBranch\} | sed --expression='s/RecentBranch=//') 
    if [ -z "$\{RecentBranch\}" ] 
    then 
        RecentBranch="debian/sid" 
        changeflag=1 
        whiptail --title "Set RecentBranch" \\ 
        --msgbox "Set RecentBranch to $\{RecentBranch\}" 15 60 
    fi
 

    if [ $changeflag -eq 1 ] 
    then 
        echo 'RecentBranch='$\{RecentBranch\} >> $\{ConfigPath\}$\{OrigName\} 
    fi 
    echo "Notice from DebianBranch4Import: \\ 
    The branch is "$\{RecentBranch\} >> $\{log\} 
    changeflag=0
 \} 

\LA{}SpecialExcludeFile~{\nwtagstyle{}\subpageref{NW4L0rMe-3dKdSR-1}}\RA{} \nwused{\\{NW4L0rMe-3J7Lxr-1}}\nwendcode{}\nwbegindocs{320}\nwdocspar 

\subsection{Verify signature} \label{subsec:CheckSignature} 

Some projects publish a signature file along with the source code package. The script can download this and perform a cryptographic check. A signature file in \textit{asc} format is expected. 

\subsubsection{Download signature file} 

\nwenddocs{}\nwbegincode{321}\sublabel{NW4L0rMe-1ikHYS-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1ikHYS-1}}}\moddef{DownloadAscFile~{\nwtagstyle{}\subpageref{NW4L0rMe-1ikHYS-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3GSX0A-1}}\nwenddeflinemarkup 
function DownloadAscFile \{ 
    # Called by BuildNewVersion and itself 

    cd $\{PrjPath\} 

    AscFileURL=$(whiptail --title "URL of .asc file" \\ 
    --inputbox "URL and name (with suffix)\\nof the .asc file:" \\ 
    --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3) 

    if [ $? -eq 1 ] 
    then
        return 1 
    fi
 

    if [ -z "$\{AscFileURL\}" ] 
    then 
        echo -e "URL and name (with suffix)\\nof the .asc file:" 
        read AscFileURL 
    fi 

    if [ -n "$\{AscFileURL\}" ] 
    then 
        # getting -asc file using wget 
        wget --version $\{AscFileURL\} &>> $\{log\} &\{
        if [ $? -eq 0 ] 
        then
            echo -e "The .asc file was pulled from\\n$\{AscFileURL\}\\n \\ 
            by wget." >> $\{log\} 
            whiptail --title "Download successful" \\ 
            --msgbox "$\{AscFileURL\} was downloaded." 15 60 
            if [ -r $\{UpstreamSourceName\}.asc ] 
            then
                CheckSignature 
            else 
                whiptail --title "There is something wrong!" \\ 
                --msgbox "Maybe you has downloaded the wrong .asc file." 15 60 
                DownloadAscFile 
            fi 
        else 
            DownloadAscFile 
        fi 
    fi
 \} 

\LA{}Link2File~{\nwtagstyle{}\subpageref{NW4L0rMe-jJHLT-1}}\RA{} \nwused{\\{NW4L0rMe-3GSX0A-1}}\nwendcode{}\nwbegindocs{322}\nwdocspar 

\subsubsection{Signature Verification} 

\nwenddocs{}\nwbegincode{323}\sublabel{NW4L0rMe-3GSX0A-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3GSX0A-1}}}\moddef{CheckSignature~{\nwtagstyle{}\subpageref{NW4L0rMe-3GSX0A-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-daBbo-1}}\nwenddeflinemarkup 
function CheckSignature \{ 
    # Called by DownloadAscFile 
    gpg --verify $\{UpstreamSourceName\}.asc >> $\{log\} 

    if [ $? -ne 0 ] 
    then 
        tail --lines=5 $\{log\} 
        read x 
    else 
        whiptail --title "Check successfull!" --msgbox "gpg \\ 
        --verify has been successfull" 15 60 
    fi
 \} 

\LA{}DownloadAscFile~{\nwtagstyle{}\subpageref{NW4L0rMe-1ikHYS-1}}\RA{} \nwused{\\{NW4L0rMe-daBbo-1}}\nwendcode{}\nwbegindocs{324}\nwdocspar 

\subsection{Replace link with a copy} \label{subsec:Link2File} 

The default behavior of \textit{mk-origtargz} (chapter \ref{subsec:mkorigtargz}, page \pageref{subsec:mkorigtargz}) is to create a symbolic reference to the original file if it is taken unchanged. 

The program script replaces this reference with a corresponding file if necessary. 

\nwenddocs{}\nwbegincode{325}\sublabel{NW4L0rMe-jJHLT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-jJHLT-1}}}\moddef{Link2File~{\nwtagstyle{}\subpageref{NW4L0rMe-jJHLT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1ikHYS-1}}\nwenddeflinemarkup 
function Link2File \{ 
    # Called by BuildNewVersion 
    OrigLinkNr=$(ls -la $\{PrjPath\} | grep --count -e '.orig.tar.[gx]z -> ') 
    if [ $OrigLinkNr -ge 1 ] 
    then 
        OrigLink=$(ls -la $\{PrjPath\} | grep --regexp='.orig.tar.[gx]z -> ') 
        OrigLink=$(echo $\{OrigLink\} | \\ sed --expression='s/^.*:.. //' | sed --expression='s/ //g') 
        echo $\{OrigLink\}" will be transformed into a file" >> $\{log\} 

        LinkTarget=$(echo $OrigLink | sed --expression='s/^.*->//') 
        LinkName=$(echo $OrigLink | sed --expression='s/->.*$//') 
        rm $\{PrjPath\}/$\{LinkName\} 
        cp -a $\{PrjPath\}/$\{LinkTarget\} $\{PrjPath\}/$\{LinkName\} 
        whiptail --title "Result of transformation link to file:" \\ 
        --msgbox "$(ls -la $\{PrjPath\})" 15 60 
        echo "Result of transformation link to file: \\ 
        "$(ls -la $\{PrjPath\}) >> $\{log\} 
    fi
 \} 

\LA{}CheckGitStatus~{\nwtagstyle{}\subpageref{NW4L0rMe-1vqolW-1}}\RA{} \nwused{\\{NW4L0rMe-1ikHYS-1}}\nwendcode{}\nwbegindocs{326}\nwdocspar 

%\begin{figure}[h] 
%\centering 
%\includegraphics[width=25em,height=30ex]{Pictures/MKOrigFailed.png}
%\caption{mk-origtargz gescheitert}
%\end{figure}
\subsection{\textit{gbp} Configuration File} \label{subsec:GbpConf} 

\textit{gbp import-orig} (chapter \ref{subsec:GbpImportOrig}, page \pageref {subsec:GbpImportOrig}) adds the downloaded source code to the Git repository. 

To control this process, the insertion of a prepared \textit{gbp.conf} file into the \textit{.git} directory is enabled (chapter \ref{subsec:GbpImportOrig}, page \pageref{subsec:GbpImportOrig}) 

\nwenddocs{}\nwbegincode{327}\sublabel{NW4L0rMe-1h1tgJ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1h1tgJ-1}}}\moddef{SearchGbpConf~{\nwtagstyle{}\subpageref{NW4L0rMe-1h1tgJ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-448qDL-1}}\nwenddeflinemarkup 
function SearchGbpConf \{ 
    # Called by BuildNewVersion BuildWithUscan 

    # Neither .git/gbp.conf nor debian/gbp.conf exist 
    if [ ! -f $\{GitPath\}/.git/gbp.conf -a ! -f $\{GitPath\}/debian/gbp.conf ] 
    then 
        if whiptail --title "gbp.conf needed?" \\ 
        --yesno "Do you want to integrate a special gbp.conf for this project?" \\ 
        --defaultno --yes-button "Yes" --no-button "No" 15 60 
\LA{}SearchGbpConf1~{\nwtagstyle{}\subpageref{NW4L0rMe-28A3wT-1}}\RA{} \nwused{\\{NW4L0rMe-448qDL-1}}\nwendcode{}\nwbegindocs{328}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=30em,height=30ex]{Pictures/GbpConf.png} \caption{Special gbp.conf} \end{figure} 

\nwenddocs{}\nwbegincode{329}\sublabel{NW4L0rMe-28A3wT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-28A3wT-1}}}\moddef{SearchGbpConf1~{\nwtagstyle{}\subpageref{NW4L0rMe-28A3wT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1h1tgJ-1}}\nwenddeflinemarkup 
        then 
            GbpConfIntegration 
        fi 
    fi 
\LA{}SearchGbpConf2~{\nwtagstyle{}\subpageref{NW4L0rMe-4c0eRR-1}}\RA{} \nwused{\\{NW4L0rMe-1h1tgJ-1}}\nwendcode{}\nwbegindocs{33028}\nwdocspar 

\nwenddocs{}\nwbegincode{331}\sublabel{NW4L0rMe-1K4yD3-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1K4yD3-1}}}\moddef{GbpConfIntegration~{\nwtagstyle{}\subpageref{NW4L0rMe-1K4yD3-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1aQXyX-1}}\nwenddeflinemarkup 
function GbpConfIntegration \{ 
    # Called by SearchGbpConf and itself 
    GbpConfPath=$(whiptail --title "gbp.conf" \\ 
    --inputbox "Please insert the path to the your special\\n \\ 
    gbp.conf for this project:" \\ 
    --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
\LA{}GbpConfIntegration1~{\nwtagstyle{}\subpageref{NW4L0rMe-SfZ6H-1}}\RA{} \nwused{\\{NW4L0rMe-1aQXyX-1}}\nwendcode{}\nwbegindocs{332}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=30em,height=30ex]{Pictures/GbpConfPath.png} \caption{path to the gbp.conf?} \end{figure} 

\nwenddocs{}\nwbegincode{333}\sublabel{NW4L0rMe-SfZ6H-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-SfZ6H-1}}}\moddef{GbpConfIntegration1~{\nwtagstyle{}\subpageref{NW4L0rMe-SfZ6H-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1K4yD3-1}}\nwenddeflinemarkup 
    if [ -z "$\{GbpConfPath\}" ] 
    then 
        echo "Please insert the path to the your special gbp.conf for this project:" 
        read GbpConfPath 
    fi
 

    # Replace tilde if necessary 
    SuspectPath=$\{GbpConfPath\} 
    ReplaceTilde 
    GbpConfPath=$\{CleanPath\} 

    if [ -f $\{GbpConfPath\}/gbp.conf ] 
    then 
        cp -av $\{GbpConfPath\}/gbp.conf $\{GitPath\}/.git/ 
    else 
        if whiptail --title "File not found!" \\ 
        --yesno "There was no gbp.conf found at $\{GbpConfPath\}! Retry?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            GbpConfIntegration 
        fi 
    fi
 \} 

\LA{}TwoConfFilesFound~{\nwtagstyle{}\subpageref{NW4L0rMe-Bk1iZ-1}}\RA{} \nwused{\\{NW4L0rMe-1K4yD3-1}}\nwendcode{}\nwbegindocs{334}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=30em,height=30ex]{Pictures/GbpConfNoPath.png} \caption{gbp.conf not found} \end{figure} 

If a \textit{gbp.conf} file is found, it is displayed in the editor for checking and, if necessary, adjustment. Especially the value of the variable \textit{compression} should be checked -- especially if a corresponding change of the archive format is to be made. 

\nwenddocs{}\nwbegincode{335}\sublabel{NW4L0rMe-4c0eRR-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4c0eRR-1}}}\moddef{SearchGbpConf2~{\nwtagstyle{}\subpageref{NW4L0rMe-4c0eRR-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-28A3wT-1}}\nwenddeflinemarkup 
    # debian/gbp.conf exists, but not .git/gbp.conf 
    if [ ! -f $\{GitPath\}/.git/gbp.conf -a -f $\{GitPath\}/debian/gbp.conf ] 
    then 
        whiptail --title "Found gbp.conf" \\ 
        --msgbox "Please check and edit your gbp.conf (if necessary)" 15 60
 

\LA{}SearchGbpConf3~{\nwtagstyle{}\subpageref{NW4L0rMe-Guv8H-1}}\RA{} \nwused{\\{NW4L0rMe-28A3wT-1}}\nwendcode{}\nwbegindocs{336}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=30em,height=30ex]{Pictures/FoundGbpConf.png} \caption{Check gbp.conf} \end{figure} 

\nwenddocs{}\nwbegincode{337}\sublabel{NW4L0rMe-Guv8H-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-Guv8H-1}}}\moddef{SearchGbpConf3~{\nwtagstyle{}\subpageref{NW4L0rMe-Guv8H-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4c0eRR-1}}\nwenddeflinemarkup 

        nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/gbp.conf 
    fi 
    # .git/gbp.conf exists, but not debian/gbp.conf 
    if [ -f $\{GitPath\}/.git/gbp.conf -a ! -f $\{GitPath\}/debian/gbp.conf ] 
    then 
        whiptail --title "Found gbp.conf" \\ 
        --msgbox "Please check and edit your gbp.conf (if necessary)" 15 60
 

\LA{}SearchGbpConf4~{\nwtagstyle{}\subpageref{NW4L0rMe-3RcwGz-1}}\RA{} \nwused{\\{NW4L0rMe-4c0eRR-1}}\nwendcode{}\nwbegindocs{338}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=30em,height=30ex]{Pictures/FoundGbpConf.png} \caption{Check gbp.conf} \end{figure} 

\nwenddocs{}\nwbegincode{339}\sublabel{NW4L0rMe-3RcwGz-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3RcwGz-1}}}\moddef{SearchGbpConf4~{\nwtagstyle{}\subpageref{NW4L0rMe-3RcwGz-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-Guv8H-1}}\nwenddeflinemarkup 

        nano --linenumbers --mouse --softwrap $\{GitPath\}/.git/gbp.conf 
    fi 
    # There is a gbp.conf in both directories 
    if [ -f $\{GitPath\}/.git/gbp.conf -a -f $\{GitPath\}/debian/gbp.conf ] 
    then 
        TwoConfFilesFound 
    fi
 \} 

\LA{}MovingGbpConfFile~{\nwtagstyle{}\subpageref{NW4L0rMe-3J7Lxr-1}}\RA{} \nwused{\\{NW4L0rMe-Guv8H-1}}\nwendcode{}\nwbegindocs{340}\nwdocspar 

The following is the file with the information that can be used for many \texttt{Debian} packages. 

\nwenddocs{}\nwbegincode{341}\sublabel{NW4L0rMe-1I7oMK-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1I7oMK-1}}}\moddef{debian/gbp.conf~{\nwtagstyle{}\subpageref{NW4L0rMe-1I7oMK-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
    # Configuration file for git-buildpackage and friends 

[DEFAULT] 
# use pristine-tar: 
pristine-tar = True 
# generate xz compressed orig file 
compression = xz 
debian-branch = debian/experimental 
upstream-branch = upstream 

[pq] 
patch-numbers = False 

[dch] id-length = 7 
debian-branch = debian/experimental 

[import-orig] 
# filter out unwanted files/dirs from upstream 
filter = [ '.cvsignore', '.gitignore', '.hgtags', '.hgignore', '*.orig', *.rej' ] 
# filter the files out of the tarball passed to pristine-tar 
filter-pristine-tar = True 
\nwnotused{debian/gbp.conf}\nwendcode{}\nwbegindocs{342}\nwdocspar 

The \textit{TwoConfFilesFound} function handles the case where a file \textit{gbp.conf} occurs in both the \textit{.git/} and \textit{debian/} directories. 

\nwenddocs{}\nwbegincode{343}\sublabel{NW4L0rMe-Bk1iZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-Bk1iZ-1}}}\moddef{TwoConfFilesFound~{\nwtagstyle{}\subpageref{NW4L0rMe-Bk1iZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-SfZ6H-1}}\nwenddeflinemarkup 
function TwoConfFilesFound \{ 
    # Called by SearchGbpConf MovingGbpConfFile 

    whiptail --title "Information" \\ 
    --msgbox "There are a gbp.conf in debian/ and a gbp.conf in .git/" 15 60
\LA{}TwoConfFilesFound0-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1FC6ni-1}}\RA{} \nwused{\\{NW4L0rMe-SfZ6H-1}}\nwendcode{}\nwbegindocs{344}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/TwoConfFilesFound.png} \caption{\textit{gbp.conf} found twice.} \end{figure} 

\nwenddocs{}\nwbegincode{345}\sublabel{NW4L0rMe-1FC6ni-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1FC6ni-1}}}\moddef{TwoConfFilesFound0-1~{\nwtagstyle{}\subpageref{NW4L0rMe-1FC6ni-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-Bk1iZ-1}}\nwenddeflinemarkup 
    # Are they different? 
    GitConfFile=$(cat $\{GitPath\}/.git/gbp.conf) 
    DebianConfFile=$(cat $\{GitPath\}/debian/gbp.conf) 
    if [ "$\{GitConfFile\}" != "$\{DebianConfFile\}" ] 
    then 
        whiptail --title "Warning!" \\ 
        --msgbox "There are a gbp.conf in debian/ and a gbp.conf in .git/\\n \\ 
        But they are different!\\n\\nThe left column is $\{GitPath\}/.git/gbp.conf\\n \\
        The right column is $\{GitPath\}/debian/gbp.conf\\n \\ 
        After studying the diff press RETURN!" 15 60
 

\LA{}TwoConfFilesFound1~{\nwtagstyle{}\subpageref{NW4L0rMe-1UcH75-1}}\RA{} \nwused{\\{NW4L0rMe-Bk1iZ-1}}\nwendcode{}\nwbegindocs{346}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DifferentConfigFile.png} \caption{Different configuration files} \end{figure} 

With \textit{diff -{}-side-by-side} (-y) the difference is displayed in two columns. 

\nwenddocs{}\nwbegincode{347}\sublabel{NW4L0rMe-1UcH75-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1UcH75-1}}}\moddef{TwoConfFilesFound1~{\nwtagstyle{}\subpageref{NW4L0rMe-1UcH75-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1FC6ni-1}}\nwenddeflinemarkup 
        diff --side-by-side $\{GitPath\}/.git/gbp.conf $\{GitPath\}/debian/gbp.conf 
        read a 
    fi 
    # Editing 
    if whiptail --title "debian/gbp.conf" \\ 
    --yesno "Do you want to edit $\{GitPath\}/debian/gbp.conf?" \\ 
    --yes-button "Yes" --no-button "No" 15 60
\LA{}TwoConfFilesFound2~{\nwtagstyle{}\subpageref{NW4L0rMe-448qDL-1}}\RA{} \nwused{\\{NW4L0rMe-1FC6ni-1}}\nwendcode{}\nwbegindocs{348}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/EditDebianConf.png} \caption{Do you want to edit \textit{gbp.conf} in the \textit{debian/} directory?} \end{figure} 

\nwenddocs{}\nwbegincode{349}\sublabel{NW4L0rMe-448qDL-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-448qDL-1}}}\moddef{TwoConfFilesFound2~{\nwtagstyle{}\subpageref{NW4L0rMe-448qDL-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1UcH75-1}}\nwenddeflinemarkup 
    then 
        nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/gbp.conf 
    fi 
    if
        whiptail --title ".git/gbp.conf" \\ 
        --yesno "Do you want to edit $\{GitPath\}/.git/gbp.conf (too)?" \\ 
        --yes-button "Yes" --no-button "No" 15 60
    then
        nano --linenumbers --mouse --softwrap $\{GitPath\}/.git/gbp.conf
    fi
 \} 

\LA{}SearchGbpConf~{\nwtagstyle{}\subpageref{NW4L0rMe-1h1tgJ-1}}\RA{} \nwused{\\{NW4L0rMe-1UcH75-1}}\nwendcode{}\nwbegindocs{350}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/EditGitConf.png} \caption{Do you want to edit \textit{gbp.conf} in the \textit{.git/} directory?} \end{figure} 

A check is made to see if there is still a local change that has not been marked for commit. These must be processed before importing a new version. 

Here you can also synchronize with the \texttt{Debian} repository on \textit{salsa.debian.org}. 

The following section lists the \textit{tags}. For the following commit with \textit{gbp import-orig}, the tag of the version to be imported must not exist yet. (Tag collision) 

\nwenddocs{}\nwbegincode{35149}\sublabel{NW4L0rMe-1GBX6B-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1GBX6B-1}}}\moddef{CheckTags~{\nwtagstyle{}\subpageref{NW4L0rMe-1GBX6B-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1vqolW-1}}\nwenddeflinemarkup 
function CheckTags \{ 
    # Called by BuildWithUscan Import2Git and itself 
    # checks git tags before executing gbp import-orig 
    echo $(git tag) >> $\{log\} 
    cTags=$(git tag | grep --fixed-strings $\{Version1\}) 
    if [ $\{#cTags\} -gt 0 ] 
    then 
        cTags1=$(echo $\{cTags\} | sed --expression='s/ /\\\\n/g') 
        if ! whiptail --title "List of dubious tags:" \\ 
        --yesno "$\{cTags1\}\\n\\nDo you want to continue regardless?" --defaultno \\ 
        --yes-button "Yes" --no-button "No" 15 60 
\LA{}CheckTags2~{\nwtagstyle{}\subpageref{NW4L0rMe-49hGIo-1}}\RA{} \nwused{\\{NW4L0rMe-1vqolW-1}}\nwendcode{}\nwbegindocs{352}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DubiousTag.png} \caption{Dubious git tag} \end{figure} 

If a \texttt{Git} tag is listed here, which should still be removed before importing a new version, the answer here is "`No"'. Then the next dialog will ask to remove this \texttt{Git} tag. 

\nwenddocs{}\nwbegincode{353}\sublabel{NW4L0rMe-49hGIo-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-49hGIo-1}}}\moddef{CheckTags2~{\nwtagstyle{}\subpageref{NW4L0rMe-49hGIo-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1GBX6B-1}}\nwenddeflinemarkup 
        then 
            whiptail --title "Delete tags!" \\ 
            --msgbox "Please delete tags in another terminal\\n \\ 
            and then press ok" 15 60 
\LA{}CheckTags3~{\nwtagstyle{}\subpageref{NW4L0rMe-RCygQ-1}}\RA{} \nwused{\\{NW4L0rMe-1GBX6B-1}}\nwendcode{}\nwbegindocs{354}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DeleteTags.png} \caption{Delete Git Tags} \end{figure} 

\nwenddocs{}\nwbegincode{355}\sublabel{NW4L0rMe-RCygQ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-RCygQ-1}}}\moddef{CheckTags3~{\nwtagstyle{}\subpageref{NW4L0rMe-RCygQ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-49hGIo-1}}\nwenddeflinemarkup 
            # git tag -d 
            CheckTags 
        fi 
    fi
 \} 

\LA{}Import2Git~{\nwtagstyle{}\subpageref{NW4L0rMe-3jdpfc-1}}\RA{} \nwused{\\{NW4L0rMe-49hGIo-1}}\nwendcode{}\nwbegindocs{356}\nwdocspar 

\subsection{Import to Git} \label{subsec:GbpImportOrig} 

Here \textit{gbp} is used for the first time. As a first step, \textit{gbp import-orig} adds the downloaded source code to the Git repository. The \textit{--debian-branch} option is assigned the contents of the \textit{RecentBranch} variable. 

If several possible branches exist, the \texttt{Debian} branch to import into can be selected beforehand (chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}). 

\nwenddocs{}\nwbegincode{357}\sublabel{NW4L0rMe-2NBKow-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2NBKow-1}}}\moddef{BuildNewVersion15~{\nwtagstyle{}\subpageref{NW4L0rMe-2NBKow-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-28QC3a-1}}\nwenddeflinemarkup 
    Import2Git # Contains import to the git repo using gbp import 
    Task=3 # Go to BuildNewRevision
 \} 

\LA{}DebianFormatTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-2aLmeT-1}}\RA{} \nwused{\\{NW4L0rMe-28QC3a-1}}\nwendcode{}\nwbegindocs{358}\nwdocspar 

\nwenddocs{}\nwbegincode{359}\sublabel{NW4L0rMe-3jdpfc-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3jdpfc-1}}}\moddef{Import2Git~{\nwtagstyle{}\subpageref{NW4L0rMe-3jdpfc-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-RCygQ-1}}\nwenddeflinemarkup 
function Import2Git \{ 
    # Called by BuildNewVersion and itself 

    CheckGitStatus # to exercise caution 
    CheckTags 

    # Check branch for import 
    bl=$(git branch --list | sed --expression='s/* /x_/') 
    ba=($bl) 
    for element in $\{ba[*]\} 
    do 
        if echo $\{element\} | grep --quiet '^x_' 
        then 
            ActiveBranch=$(echo $\{element\} | sed --expression 's/\\x_//') 
        fi 
    done  

    if [ $\{ActiveBranch\} != $\{RecentBranch\} ] 
    then 
        whiptail --title "Check Branch!" \\ 
        --msgbox "The active branch is $\{ActiveBranch\}.\\n\\ 
        In $\{ConfigPath\}$\{OrigName\} 'RecentBranch' is $\{RecentBranch\}." \\ 
        15 60 
        echo -e "The active branch is "$\{ActiveBranch\}".\\n"\\ 
        "In "$\{ConfigPath\}$\{OrigName\}" 'RecentBranch' is "$\{RecentBranch\}"." 
        FailureNotice 
    fi 
 

    # Import to the git repo using gbp import 

    echo "Notice from BuildNewVersion: The branch is \\ 
    $\{RecentBranch\}" >> $\{log\} 
    whiptail --title "Notice from BuildNewVersion:" \\ 
    --msgbox "The branch is $\{RecentBranch\}" 15 60 

    OrigFile=$(ls $\{PrjPath\}/$\{SourceName\}_$\{Version1\}.orig.tar.?z) 
    whiptail --title "Notice from BuildNewVersion:" \\ 
    --msgbox "The orig file to be imported is $\{OrigFile\}" 15 60
 \LA{}Import2Git3~{\nwtagstyle{}\subpageref{NW4L0rMe-2kc1eE-1}}\RA{} \nwused{\\{NW4L0rMe-RCygQ-1}}\nwendcode{}\nwbegindocs{360}\nwdocspar 

Now the input of the passphrase for the GPG key \index{GPG-Key} is requested here. If it is not entered promptly, the import is rolled back. It is therefore first queried whether the \texttt{GnuPG} key is available (chapter \ref{sec:KeyAvailable}, page \pageref{sec:KeyAvailable}). If the question is answered in the negative, the program is terminated. 

This signs the Git tag to be generated. This is in accordance with good practice. Only signed tags should be uploaded to \textit{salsa.debian.org}. 

Tag signing is the default behavior of \textit{gbp import-orig}. This option was nevertheless included in the command line, because ``explicit is better than implicit''. 

If you exceptionally do not want to sign, use the option \textit{--no-sign-tags}.. 

\nwenddocs{}\nwbegincode{361}\sublabel{NW4L0rMe-2kc1eE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2kc1eE-1}}}\moddef{Import2Git3~{\nwtagstyle{}\subpageref{NW4L0rMe-2kc1eE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3jdpfc-1}}\nwenddeflinemarkup 

    GpgKeyAvailable 
    echo -e "\\n Starting gbp import-orig - Please wait"'!'"\\n" 
    # Signing tags is default 
    gbp import-orig --verbose --debian-branch=$\{RecentBranch\} \\ 
    --sign-tags $\{OrigFile\} 

\LA{}Import2Git4~{\nwtagstyle{}\subpageref{NW4L0rMe-fSXSs-1}}\RA{} \nwused{\\{NW4L0rMe-3jdpfc-1}}\nwendcode{}\nwbegindocs{362}\nwdocspar 

Now \textit{gbp buildpackage} shows in detail all the steps that are now executed. Thereby the determined package version must be confirmed and adjusted. 

\nwenddocs{}\nwbegincode{363}\sublabel{NW4L0rMe-fSXSs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-fSXSs-1}}}\moddef{Import2Git4~{\nwtagstyle{}\subpageref{NW4L0rMe-fSXSs-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2kc1eE-1}}\nwenddeflinemarkup 
    if [ $? -eq 0 ] 
    then 
        echo $\{OrigFile\}" was imported by gbp import-orig" >> $\{log\} 
    else 
        whiptail --title "Something went wrong!" \\ 
        --msgbox "gbp import-orig -v --debian-branch=$\{RecentBranch\} \\ 
        --sign-tags $\{OrigFile\} failed!" 15 60 
        echo "gbp import-orig -v --debian-branch="$\{RecentBranch\}" \\ 
        --sign-tags "$\{OrigFile\}" failed!" >> $\{log\} 
        FailureNotice 
        Import2Git 
    fi
 \} 

\LA{}BuildNewVersion~{\nwtagstyle{}\subpageref{NW4L0rMe-3kBVPO-1}}\RA{} \nwused{\\{NW4L0rMe-2kc1eE-1}}\nwendcode{}\nwbegindocs{364}\nwdocspar 

At the end, the \textit{BuildNewVersion} function calls the \textit{BuildNewRevision} function (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}. 

\section{Download and import with \textit{uscan}} \label{sec:ImportWithUscan} 

The following steps are performed by the command \textit{gbp import-orig -{}-uscan \dots}.. 

Using the first entry in the file \textit{debian/changelog} (chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}), \textit{uscan} determines the version name of the last package built. \textit{uscan}\index{uscan} then loads the web page from the \textit{URL} specified in the \textit{debian/watch}\index{debian/watch} file (chapter \ref{subsec:DebianWatch}, page \pageref{subsec:DebianWatch}). Then \textit{uscan} searches for hyperlinks (\textit{href}) pointing to upstream archives using the search pattern specified in \textit{debian/watch}. 

\textit{uscan} downloads the upstream archive with the latest version if it is newer than the last version specified in \textit{debian/changelog}. The downloaded archive is stored in the parent directory. Finally, \textit{mk-origtargz} (see chapter \ref{desc:mkorigtargz}, page \pageref{desc:mkorigtargz}) is called. 

The program script first checks whether a download with \textit{uscan} is possible and useful. 

Furthermore, an existing \textit{gbp.conf}\index{gbp.conf} file (with the \textit{SearchGbpConf} function (chapter \ref{subsec:GbpConf}, page \pageref{subsec:GbpConf})) is opened in the editor for the purpose of checking. Special attention must be paid to the specified compression (\textit{compression}). 

%ToDo: gbp import-orig --uscan doesn't work with exclude suffix
\nwenddocs{}\nwbegincode{365}\sublabel{NW4L0rMe-HGNcf-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-HGNcf-1}}}\moddef{BuildWithUscan~{\nwtagstyle{}\subpageref{NW4L0rMe-HGNcf-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4V2sOW-1}}\nwenddeflinemarkup 
function BuildWithUscan \{ 
    # Called by ClassicalOrUscan 

    cd $\{GitPath\} 

    echo "Try gbp import-orig --uscan" >> $\{log\} 
    uscaninfo=$(uscan --no-download --verbose) 
    if [ $\{#uscaninfo\} -gt 0 ]
    then 
        SearchGbpConf 
        whiptail --title "uscan" --msgbox "$\{uscaninfo\}" \\ 
        --scrolltext 15 60 
        echo -e "Result of uscan:\\n"$\{uscaninfo\} >> $\{log\} 
        echo $\{uscaninfo\} | grep '=> Package is up to date' > /dev/null 
        if [ $? -eq 0 ] 
        then 
            whiptail --title "uscan" \\ 
            --msgbox "Package seems to be up to date.\\n \\ 
            Nothing to do!" 15 60 
            echo "Package seems to be up to date. Nothing to do!" \\ 
            >> $\{log\} 
\LA{}BuildWithUscan4~{\nwtagstyle{}\subpageref{NW4L0rMe-43n51H-1}}\RA{} \nwused{\\{NW4L0rMe-4V2sOW-1}}\nwendcode{}\nwbegindocs{366}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/Uscan.png} \caption{Up to date} \end{figure} 

\nwenddocs{}\nwbegincode{367}\sublabel{NW4L0rMe-43n51H-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-43n51H-1}}}\moddef{BuildWithUscan4~{\nwtagstyle{}\subpageref{NW4L0rMe-43n51H-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-HGNcf-1}}\nwenddeflinemarkup 
        fi 
        echo $\{uscaninfo\} | grep '=> Newer package available from' \\ 
        > /dev/null 
        if [ $? -eq 0 ] 
        then 
            if ! whiptail --title "Newer package available" \\ 
            --yesno "All well? Continue?" --yes-button "Yes" \\ 
            --no-button "Exit" 15 60 
            then 
                exit 
            fi 
\LA{}BuildWithUscan5~{\nwtagstyle{}\subpageref{NW4L0rMe-kHUqZ-1}}\RA{} \nwused{\\{NW4L0rMe-HGNcf-1}}\nwendcode{}\nwbegindocs{368}\nwdocspar 

\begin{figure}[h] \centering \includegraphics[width=25em,height=30ex]{Pictures/NewerPackage.png} \caption{New Version available} \end{figure} 

\nwenddocs{}\nwbegincode{369}\sublabel{NW4L0rMe-kHUqZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-kHUqZ-1}}}\moddef{BuildWithUscan5~{\nwtagstyle{}\subpageref{NW4L0rMe-kHUqZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-43n51H-1}}\nwenddeflinemarkup 
            CheckRepackSuffix 
\LA{}BuildWithUscan5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3f5YTj-1}}\RA{} \nwused{\\{NW4L0rMe-43n51H-1}}\nwendcode{}\nwbegindocs{370}\nwdocspar 

This checks if the \textit{RecentRepackSuffix} entry is present in the configuration file, but no corresponding \textit{debian/watch}. 

In this case a hint is given and the file \textit{debian/watch} is presented for editing. 

\nwenddocs{}\nwbegincode{371}\sublabel{NW4L0rMe-4V2sOW-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4V2sOW-1}}}\moddef{CheckRepackSuffix~{\nwtagstyle{}\subpageref{NW4L0rMe-4V2sOW-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1fxvHr-1}}\nwenddeflinemarkup 
function CheckRepackSuffix \{ 
    # Called by BuildWithUscan 
    if [ -n "$\{RecentRepackSuffix\}" ] 
    then 
        if ! [ cat $\{GitPath\}/debian/watch | grep "repacksuffix=" > /dev/null ] 
        then 
            whiptail -- title "debian/watch!" \\ 
            --msgbox "No repacksuffix in debian/watch." 15 60 
            nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/watch 
        fi 
    fi
 \} 

\LA{}BuildWithUscan~{\nwtagstyle{}\subpageref{NW4L0rMe-HGNcf-1}}\RA{} \nwused{\\{NW4L0rMe-1fxvHr-1}}\nwendcode{}\nwbegindocs{372}\nwdocspar 

\nwenddocs{}\nwbegincode{373}\sublabel{NW4L0rMe-3f5YTj-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3f5YTj-1}}}\moddef{BuildWithUscan5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-3f5YTj-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-kHUqZ-1}}\nwenddeflinemarkup 
            Version1=$(uscan --no-download --verbose | \\ 
            grep newversion | sed --expression 's/ $newversion = //') 
            CheckGitStatus 
\LA{}BuildWithUscan6~{\nwtagstyle{}\subpageref{NW4L0rMe-33uWfD-1}}\RA{} \nwused{\\{NW4L0rMe-kHUqZ-1}}\nwendcode{}\nwbegindocs{374}\nwdocspar 

To sign the archive of the downloaded source code, the GPG key \index{GPG-Key} of the maintainer is required. This must therefore be available. Otherwise it cannot proceed. (Chapter \ref{sec:KeyAvailable}, page~\pageref{sec:KeyAvailable} 

\nwenddocs{}\nwbegincode{375}\sublabel{NW4L0rMe-33uWfD-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-33uWfD-1}}}\moddef{BuildWithUscan6~{\nwtagstyle{}\subpageref{NW4L0rMe-33uWfD-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3f5YTj-1}}\nwenddeflinemarkup 
            GpgKeyAvailable 
\LA{}BuildWithUscan7~{\nwtagstyle{}\subpageref{NW4L0rMe-1VOuRH-1}}\RA{} \nwused{\\{NW4L0rMe-3f5YTj-1}}\nwendcode{}\nwbegindocs{374}\nwdocspar 

The steps described at the beginning are executed by \textit{gbp import-orig -{}-uscan}.. 

This is not the way implied in the new-maintainer guild in Chapter 5.21, but uses \textit{gbp import-org} \cite{GBP-ImportOrig2022}. 

\nwenddocs{}\nwbegincode{377}\sublabel{NW4L0rMe-1VOuRH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1VOuRH-1}}}\moddef{BuildWithUscan7~{\nwtagstyle{}\subpageref{NW4L0rMe-1VOuRH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-33uWfD-1}}\nwenddeflinemarkup 
            CheckTags 
            # Downloads with uscan and imports with gbp import-orig 
            gbp import-orig --uscan --verbose \\ 
            --debian-branch=$\{RecentBranch\} --sign-tags $\{OrigFile\} 
            if [ $? -ne 0 ] 
            then 
                echo "Import with gbp import-orig --uscan failed!" \\ 
                >> $\{log\} 
                exit 
            fi 
            echo "Imported with gbp import-orig --uscan" >> $\{log\} 
        else 
            exit 
        fi 
    else 
        whiptail -- title "Uscan failed!" \\ 
        --msgbox "Please check the watch file with uscan." 15 60 
        echo "Uscan failed! Please check the watch file with uscan." >> $\{log\} 
        exit 
    fi 

    Task=3 # Go to BuildNewRevision
 \} 

\LA{}PrepareUploading~{\nwtagstyle{}\subpageref{nw@notdef}}\RA{} \nwused{\\{NW4L0rMe-33uWfD-1}}\nwendcode{}\nwbegindocs{378}\nwdocspar 

At the end, the \textit{BuildWithUscan} function calls the \textit{BuildNewRevision} function (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}) 

\chapter{Building a new revision} \label{chap:NeueRevisionBauen} 

The \textit{BuildNewRevison} function is automatically called by the \textit{BuildNewVersion} and \textit{BuildWithUscan} functions. 

In order to be able to postpone the building of a new revision to a later time, the possibility is given to cancel the program beforehand. 

\nwenddocs{}\nwbegincode{379}\sublabel{NW4L0rMe-3WaC5w-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3WaC5w-1}}}\moddef{BuildNewRevision2~{\nwtagstyle{}\subpageref{NW4L0rMe-3WaC5w-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-15yPgd-1}}\nwenddeflinemarkup 
    # Intro 
    if ! whiptail --title "New Debian revision" \\ 
    --yesno "A new Debian revision will be built." --yes-button "Yes" \\ 
    --no-button "Exit" 15 60 
    then 
        exit 
    fi 

    echo "A new Debian revision will be built." >> $\{log\} 
\LA{}BuildNewRevision4~{\nwtagstyle{}\subpageref{NW4L0rMe-2Ta3JA-1}}\RA{} \nwused{\\{NW4L0rMe-15yPgd-1}}\nwendcode{}\nwbegindocs{380}\nwdocspar 

\begin{figure}[!h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/BuildNewRevision.png} \caption{Vuilt new revision} \end{figure} 

If the \textit{debian/source} directory exists and it is not a \texttt{Maven} package, the next question is whether to display the files in the \textit{debian/} directory for editing (chapter \ref{sec:DisplayDebianFiles}, page \pageref{sec:DisplayDebianFiles}) 

\section{Creating the \texttt{Debian} directory} \label{sec:AnlegenDebianVerzeichnis} 

If the \textit{debian/source} directory does not (yet) exist, it will be created by the program script. This is usually only relevant if a new package for \texttt{Debian} is to be packaged. 

\nwenddocs{}\nwbegincode{381}\sublabel{NW4L0rMe-15yPgd-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-15yPgd-1}}}\moddef{BuildNewRevision~{\nwtagstyle{}\subpageref{NW4L0rMe-15yPgd-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1gsx31-1}}\nwenddeflinemarkup 
function BuildNewRevision \{ 
    # Called by TaskSelect 
    cd $\{GitPath\} 

    ## Generate directory if necessary 
    echo $(pwd) >> $\{log\} 
    if [ -d debian/source ] 
    then 
        echo "The directory debian/source in $\{GitPath\} \\ 
        already exists." >> $\{log\} 
        dfe=1 
    else 
        mkdir --parents debian/source 
        echo "Directory debian/source was created" >> $\{log\} 
        dfe=0 
    fi
 

\LA{}BuildNewRevision2~{\nwtagstyle{}\subpageref{NW4L0rMe-3WaC5w-1}}\RA{} \nwused{\\{NW4L0rMe-1gsx31-1}}\nwendcode{}\nwbegindocs{382}\nwdocspar 

The result of the execution of the program script is noted in the log file. 

\section{Request: Build with \textit{mh-make}?} 

Provided that the \texttt{Maven} plugin (chapter \ref{chap:MavenPlugin}, page \pageref{chap:MavenPlugin}) is installed and \texttt{Maven} is selected as the build system, you will be asked whether certain files should be created for this build system. Usually this question can be answered in the negative 

\nwenddocs{}\nwbegincode{383}\sublabel{NW4L0rMe-2Ta3JA-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2Ta3JA-1}}}\moddef{BuildNewRevision4~{\nwtagstyle{}\subpageref{NW4L0rMe-2Ta3JA-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3WaC5w-1}}\nwenddeflinemarkup 

    # For building java packages with maven 

    # To avoid an error, if 'MavenPluginFlag' is empty 
    if [ ! -z $\{MavenPluginFlag\} ] &&[ $\{MavenPluginFlag\} -eq 1 ] 
    then 
        if whiptail --title "Maven" \\ 
        --yesno "Should mh_make create the $\{PackName\}.poms\\n \\ 
        file and some maven.* files?\\n\\n \\ 
        Normally you only need it at the first run" --yes-button "Yes" \\ 
        --no-button "No" --defaultno 15 60 
        then 
            . $\{MavenPluginPath\} 
            MakeMaven 
        fi 
    fi
 

\LA{}BuildNewRevision5~{\nwtagstyle{}\subpageref{NW4L0rMe-25jkNk-1}}\RA{} \nwused{\\{NW4L0rMe-3WaC5w-1}}\nwendcode{}\nwbegindocs{384}\nwdocspar 

\begin{figure}[!h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/CreateMavenFiles.png} \caption{Create data for Maven?} \end{figure} 

If it is answered in the affirmative, the MavenPlugin is loaded (chapter \ref{chap:MavenPlugin}, page \pageref{chap:MavenPlugin} and the function \textit{MakeMaven} is called. In chapter \ref{sec:BuildWithMaven} (page \pageref{sec:BuildWithMaven}) the further steps are described. 

\section{Display the \texttt{Debian} files?} \label{sec:DisplayDebianFiles} 

Now the possibility is opened here to create and edit the files in the directory \textit{debian/}. 

\nwenddocs{}\nwbegincode{385}\sublabel{NW4L0rMe-25jkNk-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-25jkNk-1}}}\moddef{BuildNewRevision5~{\nwtagstyle{}\subpageref{NW4L0rMe-25jkNk-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2Ta3JA-1}}\nwenddeflinemarkup 
    # Displaying files in debian/ for editing 
    if [ $\{dfe\} -ne 1 ] 
    then 
        # DisplayDebianFiles 
        DisplayDebianFiles
    else
        if whiptail --title "Showing debian files for editing" \\ 
        --yesno "Should the files of debian/ be displayed\\n \\ 
        to check, edit or create them?" --yes-button "Yes" \\ 
        --no-button "No" 15 60 
        then
            DisplayDebianFiles
        fi 
    fi
    dfe=0
 

\LA{}BuildNewRevision5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-361nEZ-1}}\RA{} \nwused{\\{NW4L0rMe-2Ta3JA-1}}\nwendcode{}\nwbegindocs{386}\nwdocspar 

\begin{figure}[!h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ShowDebianFiles.png} \caption{Display Debian files} \end{figure} 

If the question whether the files in the directory \textit{debian/} should be displayed is answered in the affirmative, these files are created if necessary and displayed for possible editing. 

Otherwise, it continues with changes to the upstream code (chapter \ref{chap:Aenderungen_am_Upstream_Code_vornehmen}, page \pageref{chap:Aenderungen_am_Upstream_Code_vornehmen}) and only the \textit{debian/changelog} file is still displayed (chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}). 

\section {Files in the directory debian/} \label{sec:DateienInDebian} 

The files in the \textit{debian/} directory are used to control and document the build process. 

The script has the task to create the necessary or more frequently used files in the \textit{debian/} directory - as far as possible - to make suggestions for their content. 

\subsection{Display the Debian files} \label{subsec:DebianDateienAnzeigen} 

If the files in the \textit{debian/} directory are to be displayed in order to check them, edit them or even create them, the following function is executed: 

\nwenddocs{}\nwbegincode{387}\sublabel{NW4L0rMe-11cehY-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-11cehY-1}}}\moddef{DisplayDebianFiles~{\nwtagstyle{}\subpageref{NW4L0rMe-11cehY-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3LjOLe-1}}\nwenddeflinemarkup 
function DisplayDebianFiles \{ 
    # Called by BuildNewRevision 

    # Add Debian files 

    # If the Debian files already exists, you can review and improve them now 
    # If not, you have to write them 

    ## There is default content for Debian files 
    ## Change the default values, if you know, what you are doing 

    # Loading Webext plugin or Python3 Plugin if needed 

    if [ -z "$\{WebextFlag\}" ] 
    then
        WebextFlag=0 
    fi
 

    if [ $\{WebextFlag\} -eq 1 ] 
    then 
        . $\{WebextPluginPath\} 
    fi
 

    if [ -z "$\{PythonFlag\}" ] 
    then 
        PythonFlag=0 
    fi
 

    if [ $\{PythonFlag\} -eq 1 ] 
    then 
        . $\{PythonPluginPath\} 
    fi
 

DebianFormatTemplate \LA{}DisplayDebianFiles1~{\nwtagstyle{}\subpageref{NW4L0rMe-41SfS3-1}}\RA{} \nwused{\\{NW4L0rMe-3LjOLe-1}}\nwendcode{}\nwbegindocs{388}\nwdocspar 

s. Chapter \ref{subsec:d/source/format}, page~\pageref{subsec:d/source/format} 

\nwenddocs{}\nwbegincode{389}\sublabel{NW4L0rMe-41SfS3-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-41SfS3-1}}}\moddef{DisplayDebianFiles1~{\nwtagstyle{}\subpageref{NW4L0rMe-41SfS3-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-11cehY-1}}\nwenddeflinemarkup 
    DebianUpstreamMetadataTemplate
\LA{}DisplayDebianFiles2~{\nwtagstyle{}\subpageref{NW4L0rMe-1Xc4x5-1}}\RA{} \nwused{\\{NW4L0rMe-11cehY-1}}\nwendcode{}\nwbegindocs{390}\nwdocspar 

Chapter \ref{subsec:d/upstream/metadata}, Page~\pageref{subsec:d/upstream/metadata} 

\nwenddocs{}\nwbegincode{391}\sublabel{NW4L0rMe-1Xc4x5-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1Xc4x5-1}}}\moddef{DisplayDebianFiles2~{\nwtagstyle{}\subpageref{NW4L0rMe-1Xc4x5-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-41SfS3-1}}\nwenddeflinemarkup 
    DebianCopyrightTemplate
\LA{}DisplayDebianFiles3~{\nwtagstyle{}\subpageref{NW4L0rMe-2x2X0x-1}}\RA{} \nwused{\\{NW4L0rMe-41SfS3-1}}\nwendcode{}\nwbegindocs{392}\nwdocspar 

\nwenddocs{}\nwbegincode{393}\sublabel{NW4L0rMe-2x2X0x-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2x2X0x-1}}}\moddef{DisplayDebianFiles3~{\nwtagstyle{}\subpageref{NW4L0rMe-2x2X0x-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1Xc4x5-1}}\nwenddeflinemarkup 
    DebianControlTemplate \LA{}DisplayDebianFiles4~{\nwtagstyle{}\subpageref{NW4L0rMe-MfAWV-1}}\RA{} \nwused{\\{NW4L0rMe-1Xc4x5-1}}\nwendcode{}\nwbegindocs{394}\nwdocspar 

\nwenddocs{}\nwbegincode{395}\sublabel{NW4L0rMe-MfAWV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-MfAWV-1}}}\moddef{DisplayDebianFiles4~{\nwtagstyle{}\subpageref{NW4L0rMe-MfAWV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2x2X0x-1}}\nwenddeflinemarkup 
    DebianWatchTemplate
\LA{}DisplayDebianFiles4-1~{\nwtagstyle{}\subpageref{NW4L0rMe-PAMgo-1}}\RA{} \nwused{\\{NW4L0rMe-2x2X0x-1}}\nwendcode{}\nwbegindocs{396}\nwdocspar 

\nwenddocs{}\nwbegincode{397}\sublabel{NW4L0rMe-PAMgo-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-PAMgo-1}}}\moddef{DisplayDebianFiles4-1~{\nwtagstyle{}\subpageref{NW4L0rMe-PAMgo-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-MfAWV-1}}\nwenddeflinemarkup 
    DebianRulesTemplate 
\LA{}DisplayDebianFiles4-2~{\nwtagstyle{}\subpageref{NW4L0rMe-2oTN6k-1}}\RA{} \nwused{\\{NW4L0rMe-MfAWV-1}}\nwendcode{}\nwbegindocs{398}\nwdocspar \nwenddocs{}\nwbegincode{397}\sublabel{NW4L0rMe-2oTN6k-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2oTN6k-1}}}\moddef{DisplayDebianFiles4-2~{\nwtagstyle{}\subpageref{NW4L0rMe-2oTN6k-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-PAMgo-1}}\nwenddeflinemarkup 
    DebianSalsaCiTemplate
 

\LA{}DisplayDebianFiles5~{\nwtagstyle{}\subpageref{NW4L0rMe-4EEcIx-1}}\RA{} \nwused{\\{NW4L0rMe-PAMgo-1}}\nwendcode{}\nwbegindocs{400}\nwdocspar 

If a Java package is to be built without a build system, it may be necessary to create a \textit{debian/javabuild} file. 

If the Maven plugin is used, the Maven files are displayed for editing (chapter \ref{sec:MavenDateienBearbeiten}, page \pageref{sec:MavenDateienBearbeiten}). 

\nwenddocs{}\nwbegincode{401}\sublabel{NW4L0rMe-38F31N-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-38F31N-1}}}\moddef{DisplayDebianFiles10~{\nwtagstyle{}\subpageref{NW4L0rMe-38F31N-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3blyBD-1}}\nwenddeflinemarkup 

    if [ $\{JavaFlag\} -eq 1 ] 
    then 
        if [ $\{MavenPluginFlag\} -eq 0 ] 
        then 
            DebianJavabuildTemplate 
        else 
            ls debian/ | grep 'maven' 
            if [ $? -eq 0 ] 
            then
                ShowMaven 
            fi 
        fi 
    fi
    CmeFix
 \} 

\LA{}ForceOrig~{\nwtagstyle{}\subpageref{NW4L0rMe-3u1ISy-1}}\RA{} \nwused{\\{NW4L0rMe-3blyBD-1}}\nwendcode{}\nwbegindocs{402}\nwdocspar 

\subsection{debian/source/format} \label{subsec:d/source/format} 

This file contains the format of the source package. In the \textit{debian/source/format} file, the \textit{3.0 (quilt)} entry is created. This means that it is \emph{not} a native package. In the other case, the \textit{3.0 (native)} entry must be created. 

There is a detailed description of this in the \textit{Debian Guide for New Package Maintainers} \footnote{\url{https://www.debian.org/doc/manuals/maint-guide/dother.en.html\#sourcef}}. 

\nwenddocs{}\nwbegincode{403}\sublabel{NW4L0rMe-2aLmeT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2aLmeT-1}}}\moddef{DebianFormatTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-2aLmeT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2NBKow-1}}\nwenddeflinemarkup 
function DebianFormatTemplate \{ 
    # Called by DisplayDebianFiles 

    # String for debian/source/format 
    str4format="3.0 (quilt)" 

    if ! [ -f $\{GitPath\}/debian/source/format ] 
    then 
        touch $\{GitPath\}/debian/source/format 
        echo $\{str4format\} >> $\{GitPath\}/debian/source/format 
        echo "/debian/source/format was created." >> $\{log\} 
    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/source/format
 \} 

\LA{}DebianUpstreamMetadataTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-4ZSmPc-1}}\RA{} \nwused{\\{NW4L0rMe-2NBKow-1}}\nwendcode{}\nwbegindocs{404}\nwdocspar 

\subsection{debian/source/include.binaries} 

Basically, binary files should not find inclusion in the \texttt{Debian} package. They should therefore be regularly excluded from inclusion in the *.orig archive (chapter \ref{subsec:ExcludeFiles}, page \pageref{subsec:ExcludeFiles}). 

However, there are exceptions. These may include media files and compressed documentation. These files must be listed in the \textit{debian/source/include-binaries} file with their path for documentation purposes. 

\subsection{debian/upstream/metadata} \label{subsec:d/upstream/metadata} 

There is a detailed description\cite{Wiki-DEP-12} of this \textit{YAML} file in English. There is also reference to DEP-12\footnote{Resource:\cite{DEP-12}}. 

There it is also explained which information should be entered in the individual lines by the maintainer, if this information is available. 

It is recommended to remove the comments when editing the file. 

\nwenddocs{}\nwbegincode{405}\sublabel{NW4L0rMe-4ZSmPc-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4ZSmPc-1}}}\moddef{DebianUpstreamMetadataTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-4ZSmPc-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2aLmeT-1}}\nwenddeflinemarkup 
function DebianUpstreamMetadataTemplate \{ 
    # Called by DisplayDebianFiles 

    # Strings for debian/upstream/metadata 
    if ! [ -f $\{GitPath\}/debian/upstream/metadata ] 
    then 
        mkdir --parents debian/upstream 
        # creating a template for debian/upstream/metadata 
        echo -e "# You can find a description at\\n#\\ 
        https://wiki.debian.org/UpstreamMetadata" \\ 
        >> debian/upstream/metadata 
        echo "# Archive: " >> debian/upstream/metadata
        echo "# ASCL-id: " >> debian/upstream/metadata 
        echo "Bug-Database: " >> debian/upstream/metadata 
        echo "Bug-Submit: " >> debian/upstream/metadata 
        echo "# Cite-As: " >> debian/upstream/metadata 
        echo "Changelog: " >> debian/upstream/metadata 
        echo "# CPE: " >> debian/upstream/metadata 
        echo "Documentation: " >> debian/upstream/metadata 
        echo "# Donation: " >> debian/upstream/metadata 
        echo "# FAQ: " >> debian/upstream/metadata 
        echo "# Funding: " >> debian/upstream/metadata 
        echo "# Gallery: " >> debian/upstream/metadata 
        echo "# Other-References: " >> debian/upstream/metadata 
        echo "# Reference: " >> debian/upstream/metadata 
        echo "#     Author: " >> debian/upstream/metadata 
        echo "#     Booktitle: " >> debian/upstream/metadata 
        echo "#     DOI: " >> debian/upstream/metadata 
        echo "#     Editor: " >> debian/upstream/metadata 
        echo "#     Eprint: " >> debian/upstream/metadata 
        echo "#     ISBN: " >> debian/upstream/metadata 
        echo "#     ISSN: " >> debian/upstream/metadata 
        echo "#     Journal: " >> debian/upst  ream/metadata 
        echo "#     Number: " >> debian/upstream/metadata 
        echo "#     Pages: " >> debian/upstream/metadata 
        echo "#     PMID: " >> debian/upstream/metadata 
        echo "#     Publisher: " >> debian/upstream/metadata 
        echo "#     Title: " >> debian/upstream/metadata 
        echo "#     Type: " >> debian/upstream/metadata 
        echo "#     URL: " >> debian/upstream/metadata 
        echo "#     Volume: " >> debian/upstream/metadata 
        echo "#     Year: " >> debian/upstream/metadata 
        echo "#     Debian-package: " >> debian/upstream/metadata 
        echo "# Registration: " >> debian/upstream/metadata 
        echo "# Registry: " >> debian/upstream/metadata 
        echo "Repository: " >> debian/upstream/metadata 
        echo "Repository-Browse: " >> debian/upstream/metadata 
        echo "# Screenshots: " >> debian/upstream/metadata 
        echo "# Security-Contact: " >> debian/upstream/metadata 
        echo "# Webservice: " >> debian/upstream/metadata 
    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/upstream/metadata
 \} 

\LA{}DebianCopyrightTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-6NMqQ-1}}\RA{} \nwused{\\{NW4L0rMe-2aLmeT-1}}\nwendcode{}\nwbegindocs{406}\nwdocspar 

The following fields are relevant for many packages. Their presence is partially checked by \textit{lintian}. 

\begin{description} \item[Bug-Database] URL zur Liste der bekannten Fehler 
\item[Bug-Submit] Adresse, an die Fehlermeldungen gesandt werden können. 
\item[Changelog] URL des Upstream Changelogs 
\item[Documentation] Upstream Dokumentation
 \item[Repository] URL zum Upstream-Repositorium 
\item[Repository-Browse] Durchsuchbares Repositorium von Upstream
 \end{description} 

\subsection{debian/copyright} \label{subsec:d/copyright} 

This file contains information about the copyright and licenses of the original authors' sources. 

This file can be created with \textit{debmake --cc} and stored in DEP-5 format \cite{DEP-5}. 

\nwenddocs{}\nwbegincode{407}\sublabel{NW4L0rMe-6NMqQ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-6NMqQ-1}}}\moddef{DebianCopyrightTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-6NMqQ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4ZSmPc-1}}\nwenddeflinemarkup 
function DebianCopyrightTemplate \{ 
    # Called by DisplayDebianFiles 

    if ! [ -f $\{GitPath\}/debian/copyright ] 
    then 
        # creating debian/copyright using debmake 
        debmake -cc > debian/copyright 
\LA{}DebianCopyrightTemplate2~{\nwtagstyle{}\subpageref{NW4L0rMe-2CHiV-1}}\RA{} \nwused{\\{NW4L0rMe-4ZSmPc-1}}\nwendcode{}\nwbegindocs{408}\nwdocspar 

Excerpt from the man page for \textit{debmake} \begin{verbatim} -c, --copyright scan source for copyright+license text and exit. 

• -c: simple output style 

• -cc: normal output style (similar to the debian/copyright file) 

• -ccc: debug output style \end{verbatim} 

After that, the file still needs to be edited. Files with the same author and the same license can be combined. If files are under several licenses, these licenses are connected with\textit{or}. 

\nwenddocs{}\nwbegincode{409}\sublabel{NW4L0rMe-2CHiV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2CHiV-1}}}\moddef{DebianCopyrightTemplate2~{\nwtagstyle{}\subpageref{NW4L0rMe-2CHiV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-6NMqQ-1}}\nwenddeflinemarkup 
    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/copyright
 \} 

\LA{}TeamMaintainer~{\nwtagstyle{}\subpageref{NW4L0rMe-5jHyT-1}}\RA{} \nwused{\\{NW4L0rMe-6NMqQ-1}}\nwendcode{}\nwbegindocs{410}\nwdocspar 

Each \textit{Files} paragraph in the machine-readable copyright file must reference a license, each of which has a separate license paragraph. These paragraphs must appear \textbf{after} all \textit{Files} paragraphs. 

Standalone license paragraphs can be used to provide the full license text for a particular license only once, rather than repeating it in each \textit{Files} section that references it.\cite{Copyright2020} 

If the license text is available at \url{/usr/share/common-licenses/}, instead of the complete license text an abbreviated version and the file name together with the path of the file containing the license text (for example \textit{/usr/share/common-licenses/GPL-3}) shall be listed. 

\subsection{\textit{debian/control}} \label{subsec:DebianControl} 

This file contains essential values used by the package management tools \index{Package management tool}. 

The package management system processes data that is stored in a common format called control data in the \textit{control} file. This data is used for source packages, binary packages, and the \textit{*.changes} files that control the installation of the uploaded files. 

Details are described in the \texttt{Debian} policy\cite{DebianPolicy}. 

\subsubsection{Fundamental structure} 

The program script creates a "`framework'" of the \textit{control} file for the source package. The \textit{control} file of the binary package and the \textit{.changes} file are created by the build process from the information in the section for the binary file(s). 

\nwenddocs{}\nwbegincode{411}\sublabel{NW4L0rMe-4LaGcs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4LaGcs-1}}}\moddef{DebianControlTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-4LaGcs-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1jKrXH-1}}\nwenddeflinemarkup 
function DebianControlTemplate \{ 
    # Called by DisplayDebianFiles 

    # Strings for debian/control 
    str4versiondebhelpers="(=13)" 
\LA{}DebianControlTemplate1~{\nwtagstyle{}\subpageref{NW4L0rMe-2jxiZh-1}}\RA{} \nwused{\\{NW4L0rMe-1jKrXH-1}}\nwendcode{}\nwbegindocs{412}\nwdocspar 

Starting with version \textit{debhelper >= 12}\index{debhelper}, the \textit{compatibility version} is no longer additionally maintained in the \textit{debian/compat} file. Instead, in the \textit{debian/control} file, the \textit{debhelper} entry is replaced by \textit{debhelper-compat} with version \textit{(= 13)}.\footnote{\url{https://release.debian.org/bookworm/freeze_policy.html} (2023)} This also applies to all subsequent releases. 

The use of version 11 is already discouraged. 

\nwenddocs{}\nwbegincode{413}\sublabel{NW4L0rMe-2jxiZh-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2jxiZh-1}}}\moddef{DebianControlTemplate1~{\nwtagstyle{}\subpageref{NW4L0rMe-2jxiZh-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4LaGcs-1}}\nwenddeflinemarkup 
    str4standardsversion="4.6.2" 

\LA{}DebianControlTemplate2~{\nwtagstyle{}\subpageref{NW4L0rMe-TjsJp-1}}\RA{} \nwused{\\{NW4L0rMe-4LaGcs-1}}\nwendcode{}\nwbegindocs{414}\nwdocspar 

In the file \textit{debian/control} there must be an entry "`default-version: "'\index{Standard-Version} which specifies the conformance to the version of the Debian policy (see chapter \ref{sec:PolicyHandbuch}, page \pageref{sec:PolicyHandbuch}). Here the current version (\textit{now: 4.6.1}) is given in each case. 

At this point in the program script, a template for the \textit{debian/control} file is created if the file does not already exist. 

\nwenddocs{}\nwbegincode{415}\sublabel{NW4L0rMe-TjsJp-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-TjsJp-1}}}\moddef{DebianControlTemplate2~{\nwtagstyle{}\subpageref{NW4L0rMe-TjsJp-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2jxiZh-1}}\nwenddeflinemarkup 
    if ! [ -f $\{GitPath\}/debian/control ] 
    then 
        # creating a template for debian/control 
        echo -e "Source: "$\{SourceName\} > debian/control 
        echo -e "Priority: optional" >> debian/control
 

\LA{}DebianControlTemplate3~{\nwtagstyle{}\subpageref{NW4L0rMe-4Na78n-1}}\RA{} \nwused{\\{NW4L0rMe-2jxiZh-1}}\nwendcode{}\nwbegindocs{416}\nwdocspar 

Name and email address of \texttt{Maintainer} and, if applicable, \texttt{Uploaders} are determined by the \textit{DEBValues} function. (Chapter \ref{subsec:DebNameAndEmail}, page \pageref{subsec:DebNameAndEmail}) 

\nwenddocs{}\nwbegincode{417}\sublabel{NW4L0rMe-1ifAZJ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1ifAZJ-1}}}\moddef{DebianControlTemplate4~{\nwtagstyle{}\subpageref{NW4L0rMe-1ifAZJ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4Na78n-1}}\nwenddeflinemarkup 
        DEBValues 

        if [ -n "$\{Maintainer\}" ] 
        then 
            echo -e "Maintainer: "$\{Maintainer\} >> debian/control 
        else 
            echo "Maintainer: " >> debian/control 
        fi
 

        if [ -n "$\{Uploaders\}" ] 
        then
            echo -e "Uploaders: "$\{Uploaders\} >> debian/control 
        fi
 

\LA{}DebianControlTemplate5~{\nwtagstyle{}\subpageref{NW4L0rMe-35opaf-1}}\RA{} \nwused{\\{NW4L0rMe-4Na78n-1}}\nwendcode{}\nwbegindocs{418}\nwdocspar 

\nwenddocs{}\nwbegincode{419}\sublabel{NW4L0rMe-35opaf-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-35opaf-1}}}\moddef{DebianControlTemplate5~{\nwtagstyle{}\subpageref{NW4L0rMe-35opaf-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1ifAZJ-1}}\nwenddeflinemarkup 
        echo -e "Build-Depends: debhelper-compat" \\ 
        $\{str4versiondebhelpers\} >> debian/control 
\LA{}DebianControlTemplate6~{\nwtagstyle{}\subpageref{NW4L0rMe-imcDF-1}}\RA{} \nwused{\\{NW4L0rMe-1ifAZJ-1}}\nwendcode{}\nwbegindocs{420}\nwdocspar 

\nwenddocs{}\nwbegincode{421}\sublabel{NW4L0rMe-3qwFBN-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3qwFBN-1}}}\moddef{DebianControlTemplate7~{\nwtagstyle{}\subpageref{NW4L0rMe-3qwFBN-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-imcDF-1}}\nwenddeflinemarkup 
       echo -e "Standards-Version: "$\{str4standardsversion\} \\ 
       >> debian/control 
       echo -e "Rules-Requires-Root: no" >> debian/control 
       echo -e "Vcs-Git: https://salsa.debian.org/"$\{SalsaName\} \\
       >> debian/control 
       BrowserName=$(echo $\{SalsaName\} | sed --expression='s/.git$//g') 
       echo -e "Vcs-Browser: https://salsa.debian.org/"$\{BrowserName\} \\ 
       >> debian/control 
       echo -e "Homepage: \\n" >> debian/control 
\LA{}DebianControlTemplate8~{\nwtagstyle{}\subpageref{NW4L0rMe-2J8cmb-1}}\RA{} \nwused{\\{NW4L0rMe-imcDF-1}}\nwendcode{}\nwbegindocs{422}\nwdocspar 

Now follows in the file \textit{debian/control} the information about the binary package. 

\nwenddocs{}\nwbegincode{423}\sublabel{NW4L0rMe-2J8cmb-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2J8cmb-1}}}\moddef{DebianControlTemplate8~{\nwtagstyle{}\subpageref{NW4L0rMe-2J8cmb-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3qwFBN-1}}\nwenddeflinemarkup 
        echo -e "Package: "$\{PackName\} >> debian/control 
        echo -e "Architecture: all" >> debian/control 
        echo -e "Depends: \\$\{misc:Depends\}" >> debian/control 
        echo -e "Description: " >> debian/control 
        echo "A template for debian/control was created." >> $\{log\} 
\LA{}DebianControlTemplate9~{\nwtagstyle{}\subpageref{NW4L0rMe-2XtlXx-1}}\RA{} \nwused{\\{NW4L0rMe-3qwFBN-1}}\nwendcode{}\nwbegindocs{424}\nwdocspar 

\subsubsection{Adaptations for \texttt{Java} packages} 

Information from this file is used when creating the \textit{control} file of the binary package. 

For packaging \texttt{Java} packages, the following entries can already be made.. 

\nwenddocs{}\nwbegincode{425}\sublabel{NW4L0rMe-4Na78n-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4Na78n-1}}}\moddef{DebianControlTemplate3~{\nwtagstyle{}\subpageref{NW4L0rMe-4Na78n-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-TjsJp-1}}\nwenddeflinemarkup 
        if [ $\{JavaFlag\} -eq 1 ] 
        then 
            echo -e "Section: java" >> debian/control 
        else 
            echo -e "Section:" >> debian/control 
        fi 
\LA{}DebianControlTemplate4~{\nwtagstyle{}\subpageref{NW4L0rMe-1ifAZJ-1}}\RA{} \nwused{\\{NW4L0rMe-TjsJp-1}}\nwendcode{}\nwbegindocs{426}\nwdocspar 

For packages that are maintained in a team, the address of the team is specified here. This is usually the email address of the mailing list. In these cases the \texttt{Uploaders} field must also be filled with the names of the package maintainers. 

\textit{Maintainer} for the Java team, for example, is \textit{Debian Java maintainers <pkg-java-maintainers@lists.alioth.debian.org>}. 

So that the packager does not always have to write his full name and e-mail address, the script first looks for this data in the configuration file (chapter \ref{subsec:DebNameAndEmail}, page \pageref{subsec:DebNameAndEmail}). 

\nwenddocs{}\nwbegincode{427}\sublabel{NW4L0rMe-imcDF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-imcDF-1}}}\moddef{DebianControlTemplate6~{\nwtagstyle{}\subpageref{NW4L0rMe-imcDF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-35opaf-1}}\nwenddeflinemarkup 
        if [ $\{JavaFlag\} -eq 1 ] 
        then 
            echo " , default-jdk" >> debian/control 

        if [ $\{MavenPluginFlag\} -eq 1 ] 
        then 
            echo " , maven-debian-helper" >> debian/control 
        fi 
    fi 
\LA{}DebianControlTemplate7~{\nwtagstyle{}\subpageref{NW4L0rMe-3qwFBN-1}}\RA{} \nwused{\\{NW4L0rMe-35opaf-1}}\nwendcode{}\nwbegindocs{428}\nwdocspar 

\subsubsection{Web-Extension-Plugin} 

Call the function to customize the \textit{debian/control} file for \texttt{Mozilla} add-ons. This function is located in the \texttt{Webext} plugin (chapter \ref{subsec:WebextControl}, page \pageref{subsec:WebextControl}) 

\nwenddocs{}\nwbegincode{429}\sublabel{NW4L0rMe-2XtlXx-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2XtlXx-1}}}\moddef{DebianControlTemplate9~{\nwtagstyle{}\subpageref{NW4L0rMe-2XtlXx-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2J8cmb-1}}\nwenddeflinemarkup 
        if [ $\{WebextFlag\} -eq 1 ] 
        then 
            WebextControl 
        fi 
\LA{}DebianControlTemplate10~{\nwtagstyle{}\subpageref{NW4L0rMe-44glDT-1}}\RA{} \nwused{\\{NW4L0rMe-2J8cmb-1}}\nwendcode{}\nwbegindocs{430}\nwdocspar 

\subsubsection{Python-Plugin} 

Call the function to customize the \textit{debian/control} file for \texttt{Python} packages and libraries. This function is located in the \texttt{Python} plugin (chapter \ref{sec:PythonControl}, page \pageref{sec:PythonControl}). 

\nwenddocs{}\nwbegincode{431}\sublabel{NW4L0rMe-44glDT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-44glDT-1}}}\moddef{DebianControlTemplate10~{\nwtagstyle{}\subpageref{NW4L0rMe-44glDT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2XtlXx-1}}\nwenddeflinemarkup 
        if [ $\{PythonFlag\} -eq 1 ] 
        then 
            PythonControl 
        fi 
\LA{}DebianControlTemplate11~{\nwtagstyle{}\subpageref{NW4L0rMe-nRy5H-1}}\RA{} \nwused{\\{NW4L0rMe-2XtlXx-1}}\nwendcode{}\nwbegindocs{432}\nwdocspar 

\nwenddocs{}\nwbegincode{433}\sublabel{NW4L0rMe-nRy5H-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-nRy5H-1}}}\moddef{DebianControlTemplate11~{\nwtagstyle{}\subpageref{NW4L0rMe-nRy5H-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-44glDT-1}}\nwenddeflinemarkup 
    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/control
 \} 

\LA{}OptionsWatchFile~{\nwtagstyle{}\subpageref{NW4L0rMe-4BxyXu-1}}\RA{} \nwused{\\{NW4L0rMe-44glDT-1}}\nwendcode{}\nwbegindocs{434}\nwdocspar 

\subsection{debian/watch} \label{subsec:DebianWatch} 

The \textit{watch}\index{Watch (File)} file in the \texttt{Debian} directory contains data for the \textit{uscan}\index{uscan} program (chapter \ref{sec:ImportWithUscan}, page \pageref{sec:ImportWithUscan} and chapter \ref{sec:uscan}, page \pageref{sec:uscan}).. 

To determine the name of the source package, \textit{uscan} reads the first entry in the \textit{debian/changelog} file (chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}). Using this entry, \textit{uscan} also determines the version name of the last package built \cite{ManUscan2019}. 

Then \textit{uscan} processes the lines of the \textit{debian/watch} file in one go from top to bottom. Details about the \textit{debian/watch}\index{debian/watch} file are described in the corresponding article in the Debian wiki\footnote{\url{https://wiki.debian.org/debian/watch}}. 

Regular expressions \index{regular expressions} in \index{Perl-Format} Perl format\footnote{see for this: \begin{itemize} \item{\url{https://de.wikibooks.org/wiki/Perl-Programmierung:_Reguläre_Ausdrücke}} \item{\url{http://www.mathe2.uni-bayreuth.de/perl/GK/regExp.htm}} \item{\url{http://perl-seiten.privat.t-online.de/html/perl_reg.html}} \end{itemize}} can be used in this file. Lines starting with a \textit{\#} are ignored as comment lines. 

At the beginning of this file is the version of the format used. This specification is required. The recommended version number is \textit{4} and is already entered by the script when the file is created. 

\nwenddocs{}\nwbegincode{435}\sublabel{NW4L0rMe-2DatyJ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2DatyJ-1}}}\moddef{DebianWatchTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-2DatyJ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1GH9XQ-1}}\nwenddeflinemarkup 
function DebianWatchTemplate \{ 
    # Called by DisplayDebianFiles 

    # String for debian/watch str4watch="version=4" 

    if ! [ -f $\{GitPath\}/debian/watch ] 
    then 
        # creating a template for debian/watch 
        echo $\{str4watch\} > debian/watch 
        OptionsWatchFile 
\LA{}DebianWatchTemplate3~{\nwtagstyle{}\subpageref{NW4L0rMe-ssxO7-1}}\RA{} \nwused{\\{NW4L0rMe-1GH9XQ-1}}\nwendcode{}\nwbegindocs{436}\nwdocspar 

Now the options\index{Options (uscan)} are defined how \textit{uscan} can check if the current version is built too. 

The evaluation of the versioning follows the presentation in chapter \ref{chap:VersioningPackage}, (page \pageref{chap:VersioningPackage}). 

The options specify rules for selecting possible Upstream.archives. They are explained in the manual page (man page) of \textit{uscan} \footnote{\url{https://people.debian.org/~osamu/uscan.html\#WATCH-FILE-OPTIONS}}. 

The program script sets the options based on the information available so far in the \textit{debian/watch} file. 

The program script avoids spaces in the list of options. Otherwise the options list must be framed by double quotes ("). 

\nwenddocs{}\nwbegincode{437}\sublabel{NW4L0rMe-4BxyXu-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4BxyXu-1}}}\moddef{OptionsWatchFile~{\nwtagstyle{}\subpageref{NW4L0rMe-4BxyXu-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-nRy5H-1}}\nwenddeflinemarkup 
function OptionsWatchFile \{ 
    # Called by DebianWatchfile 

    olf='\\\\\\n' 
    WOpt='opts=' 

\LA{}OptionsWatchFile1~{\nwtagstyle{}\subpageref{NW4L0rMe-3D3TNs-1}}\RA{} \nwused{\\{NW4L0rMe-nRy5H-1}}\nwendcode{}\nwbegindocs{438}\nwdocspar 

When creating the \textit{*.orig.tar.*} file (chapter \ref{subsec:ArchiveFormat}, page \pageref{subsec:ArchiveFormat}), the original archive format was already determined. This information is now used for the \textit{debian/watch} file.. 

The following option specifies when building a new version using \textit{uscan} that the \textit{*.orig.tar.*} file is archived in a different compression format than the upstream archive to be downloaded. Specified here as the compression format of the orig archive is \textit{xz}. 

Namely, if the upstream archive is in a zip format (including .xpi, .jar, or .oxt), a repackaging must be performed. The \textit{compression=xz} option specifies that an \textit{*.orig.tar.xz} is formed. The \textit{repack} option is dispensable in this case; but explicit is better than implicit. 

\nwenddocs{}\nwbegincode{439}\sublabel{NW4L0rMe-3D3TNs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3D3TNs-1}}}\moddef{OptionsWatchFile1~{\nwtagstyle{}\subpageref{NW4L0rMe-3D3TNs-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4BxyXu-1}}\nwenddeflinemarkup 
    # Repacked <UpstreamPackage>.zip 
    RepackFlag=0 
    ZipSuffix=(.zip .oxt .xpi .jar) 
    if [[ $\{ZipSuffix\} =~ $\{RecentUpstreamSuffix\} ]] 
    then 
        WOpt=$\{WOpt\}$\{olf\}'repack,compression=xz,' 
        RepackFlag=1 
    fi 

\LA{}OptionsWatchFile2~{\nwtagstyle{}\subpageref{NW4L0rMe-bG7F6-1}}\RA{} \nwused{\\{NW4L0rMe-4BxyXu-1}}\nwendcode{}\nwbegindocs{440}\nwdocspar 

If a repackaging has to be done because files have to be removed from the source code archive, this should be evident in the name of the \textit{*.orig.tar.*} file. The \textit{repacksuffix} option is used for this purpose. The files to be excluded result from the corresponding list (\textit{Files-Exluded}) in the file \textit{debian/copyright}. 

\nwenddocs{}\nwbegincode{441}\sublabel{NW4L0rMe-bG7F6-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-bG7F6-1}}}\moddef{OptionsWatchFile2~{\nwtagstyle{}\subpageref{NW4L0rMe-bG7F6-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3D3TNs-1}}\nwenddeflinemarkup 
    # Excluded files 
    if [ -z $\{RecentRepackSuffix\} ] 
    then 
        if [ $\{RepackFlag\} -eq 1 ] 
        then 
            WOpt=$\{WOpt\}$\{olf\}'repacksuffix='$\{RecentRepackSuffix\}',\\\\\\n' 
        else 
            WOpt=$\{WOpt\}$\{olf\}'repack,compression=xz,\\\\\\n\\
            repacksuffix='$\{RecentRepackSuffix\}',\\\\\\n' 
        fi 

\LA{}OptionsWatchFile3~{\nwtagstyle{}\subpageref{NW4L0rMe-3ulhPo-1}}\RA{} \nwused{\\{NW4L0rMe-3D3TNs-1}}\nwendcode{}\nwbegindocs{442}\nwdocspar 

Next is the \textit{dversionmangle}\index{dversionmangle} option. This normalizes the last found upstream version name in the \textit{debian/changelog} file to match the version of the available upstream archive. This is done by removing the \texttt{Debian} specific suffixes like \textit{+dfsg} or \textit{+ds} by way of substitution. 

\nwenddocs{}\nwbegincode{443}\sublabel{NW4L0rMe-3ulhPo-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3ulhPo-1}}}\moddef{OptionsWatchFile3~{\nwtagstyle{}\subpageref{NW4L0rMe-3ulhPo-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-bG7F6-1}}\nwenddeflinemarkup 
        WOpt=$\{WOpt\}$\{olf\}'dversionmangle=s/'$\{RecentRepackSuffix\}'//,' 
    fi 

\LA{}OptionsWatchFile4~{\nwtagstyle{}\subpageref{NW4L0rMe-1t1OnE-1}}\RA{} \nwused{\\{NW4L0rMe-bG7F6-1}}\nwendcode{}\nwbegindocs{444}\nwdocspar 

The \textit{uversionmangle}\index{uversionmangle} option normalizes the strings of the upstream version files extracted from the links to those files in the web page source code. In the version name, the non-numeric characters (except the dot) are replaced in a meaningful way for the sake of uniformity. This makes the version designation of the upstream archive versioning scheme compliant (chapter \ref{sec:schema}, page \pageref{sec:schema}). This is used as version sort index\index{Version index} when selecting the latest upstream version. 

\nwenddocs{}\nwbegincode{445}\sublabel{NW4L0rMe-1t1OnE-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1t1OnE-1}}}\moddef{OptionsWatchFile4~{\nwtagstyle{}\subpageref{NW4L0rMe-1t1OnE-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3ulhPo-1}}\nwenddeflinemarkup 

    # For beta-, rc- etc. releases 

    WOpt=$\{WOpt\}$\{olf\}'uversionmangle=s/-?([^\\d.]+)/~$1/;tr/A-Z/a-z/,' 
\LA{}OptionsWatchFile5~{\nwtagstyle{}\subpageref{NW4L0rMe-2fqPAK-1}}\RA{} \nwused{\\{NW4L0rMe-3ulhPo-1}}\nwendcode{}\nwbegindocs{446}\nwdocspar 

\textit{filenamemangle}\index{filenamemangle} generates the upstream tarball filename from the selected \textit{href} string if the comparison patterns can extract the latest upstream version from the selected \textit{href} string. Otherwise, the upstream tarball filename is generated from its full URL string and the missing upstream version is inserted from the generated upstream tarball filename. 

Without this option, the default upstream tarball filename is generated by taking the last component of the URL and removing everything after a '?' or '\#'. 

\nwenddocs{}\nwbegincode{447}\sublabel{NW4L0rMe-2fqPAK-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2fqPAK-1}}}\moddef{OptionsWatchFile5~{\nwtagstyle{}\subpageref{NW4L0rMe-2fqPAK-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1t1OnE-1}}\nwenddeflinemarkup 
    # For packages from Github 
    if echo $\{DownloadUrl\} | grep "github" > /dev/null 
    then 
        WOpt=$\{WOpt\}$\{olf\}'filenamemangle=s/.+\\/v?(\\d\\S+)\\.*/$1/,' 
    fi 

\LA{}OptionsWatchFile8~{\nwtagstyle{}\subpageref{NW4L0rMe-1GH9XQ-1}}\RA{} \nwused{\\{NW4L0rMe-1t1OnE-1}}\nwendcode{}\nwbegindocs{448}\nwdocspar 

\nwenddocs{}\nwbegincode{447}\sublabel{NW4L0rMe-1GH9XQ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1GH9XQ-1}}}\moddef{OptionsWatchFile8~{\nwtagstyle{}\subpageref{NW4L0rMe-1GH9XQ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2fqPAK-1}}\nwenddeflinemarkup 
    # If there are no options 
    if [ $\{#WOpt\} -eq 6 ] 
    then 
        WOpt='# '$\{WOpt\} WOpt=$(echo $\{WOpt\} | sed 's/\\\\/\\"\\" \\\\/') 
    fi 

    echo -e $\{WOpt\} >> debian/watch
 \} 

\LA{}DebianWatchTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-2DatyJ-1}}\RA{} \nwused{\\{NW4L0rMe-2fqPAK-1}}\nwendcode{}\nwbegindocs{450}\nwdocspar 

\textit{uscan} loads the web page from the \textit{URL} specified in \textit{debian/watch}. Then \textit{uscan} searches for hyperlinks (\textit{hrefs}) pointing to upstream archives using the search pattern specified in \textit{debian/watch}. 

Starting from the URL with which the source code was downloaded, the program script defines how to search for a new version. The URL was assigned to the variable \textit{DownladURL} as value (chapter \ref{subsec:ArchiveFormat}, page \pageref{subsec:ArchiveFormat}). 

\nwenddocs{}\nwbegincode{451}\sublabel{NW4L0rMe-ssxO7-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-ssxO7-1}}}\moddef{DebianWatchTemplate3~{\nwtagstyle{}\subpageref{NW4L0rMe-ssxO7-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2DatyJ-1}}\nwenddeflinemarkup 
        if echo $\{DownloadUrl\} | grep "github" > /dev/null 
        then 
            DownloadUrl=$(echo $\{DownloadUrl\} | \\ 
            sed --expression 's/archive.*$/releases/') 
            DownloadUrl=$\{DownloadUrl\}' .*/v?(\\d\\S+)\\.tar\\.gz' 
            echo -e $\{DownloadUrl\} >> debian/watch 
        fi 
        echo "A template for debian/watch was created." >> $\{log\} 
        whiptail --title "Edit debian/watch!" \\ 
        --msgbox "Please insert reasonable regular expressions\\n \\ 
        into debian/watch!" 15 60 
    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/watch
 \} 

\LA{}DebianRulesTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-3xiV7R-1}}\RA{} \nwused{\\{NW4L0rMe-2DatyJ-1}}\nwendcode{}\nwbegindocs{452}\nwdocspar 

An example: 

\begin{verbatim} opts=repack,compression=xz,dversionmangle=s/\+dfsg$//,\ 
uversionmangle=s/-Beta/~beta/;s/-rc/~rc/,\ 
filenamemangle=s/.*\/v?(\d+\.\d+\.\d+(?:-(Beta|rc)\d+)?)\.tar\ 
.gz/jax-maven-plugin-$1.tar.gz/ \
https://github.com/davidmoten/jax-maven-plugin/releases .*/v?(\d\S+)\.tar\.gz \end{verbatim} 

The \textit{debian/watch} file, when in the directory where the Git repository is located, can be checked with the \textit{uscan --no-download --debug} command. The \textit{--no-download} option causes a found, newer upstream archive not to be downloaded. The \textit{--debug} option generates a human readable report which also shows the status of the internal variables. 

\subsection{\textit{debian/rules} - Fundamental structure} \label{subsec:rules} 

This file controls the flow of the build process. 

Unlike the other files in the \textit{debian} directory, the \textit{debian/rules} file must be marked as executable. 

Like any other \textit{makefile}, the \textit{debian/rules} file is composed of several rules that define the target and how these rules are executed. In the Debian policy, chapter 4.9\cite{DebianPolicy} \textit{Main building script: debian/rules} the details are explained. 

\subsubsection{Create the file} 

If the file \textit{debian/rules} does not exist yet, it will be created. 

It is a Makefile and therefore has a corresponding \textit{Shebang} (\textit{\#!/usr/bin/make -f}). 

\nwenddocs{}\nwbegincode{453}\sublabel{NW4L0rMe-3xiV7R-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3xiV7R-1}}}\moddef{DebianRulesTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-3xiV7R-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-ssxO7-1}}\nwenddeflinemarkup 
function DebianRulesTemplate \{ 
    # Called by DisplayDebianFiles 

    # Strings for debian/rules 
    str4rules="#!/usr/bin/make -f\\n# -*- makefile -*-\\n"\\ 
    str4rulesdh=" 

%:\\n\\tdh \\$@\\n\\n"
    if ! [ -f $\{GitPath\}/debian/rules ] 
    then 
        touch $\{GitPath\}/debian/rules 
        echo -e $\{str4rules\} >> $\{GitPath\}/debian/rules 
\LA{}DebianRulesTemplate1~{\nwtagstyle{}\subpageref{NW4L0rMe-YayWD-1}}\RA{} \nwused{\\{NW4L0rMe-ssxO7-1}}\nwendcode{}\nwbegindocs{454}\nwdocspar 

\subsubsection{Export of variables} 

It is turned on the more comprehensive output of the messages by exporting the variables \textit{DH\_VERBOSE} and \textit{DH\_OPTIONS}, as well as assigning appropriate values to them. 

\nwenddocs{}\nwbegincode{455}\sublabel{NW4L0rMe-YayWD-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-YayWD-1}}}\moddef{DebianRulesTemplate1~{\nwtagstyle{}\subpageref{NW4L0rMe-YayWD-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3xiV7R-1}}\nwenddeflinemarkup 
        echo -e "# Uncomment this to turn on verbose mode.\\n" \\ 
        >> $\{GitPath\}/debian/rules 
        echo -e "export DH_VERBOSE=1\\nexport DH_OPTIONS=-v\\n" \\ 
        >> $\{GitPath\}/debian/rules 

\LA{}DebianRulesTemplate2~{\nwtagstyle{}\subpageref{NW4L0rMe-2fjec1-1}}\RA{} \nwused{\\{NW4L0rMe-3xiV7R-1}}\nwendcode{}\nwbegindocs{456}\nwdocspar 

In addition, supplementary variables are exported for various package types. These are defined in the respective plugins. The description for \texttt{Java} packages can be found in chapter \ref{sec:JavaAdaption} (page \pageref{sec:JavaAdaption}). The customization for \texttt{Java} packages is done by the \textit{Rules4Java} function. 

\nwenddocs{}\nwbegincode{457}\sublabel{NW4L0rMe-2fjec1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2fjec1-1}}}\moddef{DebianRulesTemplate2~{\nwtagstyle{}\subpageref{NW4L0rMe-2fjec1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-YayWD-1}}\nwenddeflinemarkup 
        if [ JavaFlag -eq 1 ] 
        then 
            Rules4Java 
        fi 

\LA{}DebianRulesTemplate3~{\nwtagstyle{}\subpageref{NW4L0rMe-1qdrCP-1}}\RA{} \nwused{\\{NW4L0rMe-YayWD-1}}\nwendcode{}\nwbegindocs{458}\nwdocspar 

Building the \texttt{Mozilla} extensions also requires additional entries. The description of the specifics for the \texttt{Mozilla} add-ons can be found in chapter \ref{subsec:webextrules} (page \pageref{subsec:webextrules}). 

The customization for \textit{Webext} packages is done by the \textit{WebextRules} function in the corresponding plugin (chapter \ref{chap:WebextPlugin} page \pageref{chap:WebextPlugin}). 

\nwenddocs{}\nwbegincode{459}\sublabel{NW4L0rMe-1qdrCP-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1qdrCP-1}}}\moddef{DebianRulesTemplate3~{\nwtagstyle{}\subpageref{NW4L0rMe-1qdrCP-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2fjec1-1}}\nwenddeflinemarkup 
        if [ $\{WebextFlag\} -eq 1 ] 
        then 
            WebextRules 
        fi 

\LA{}DebianRulesTemplate4~{\nwtagstyle{}\subpageref{NW4L0rMe-3vE97d-1}}\RA{} \nwused{\\{NW4L0rMe-2fjec1-1}}\nwendcode{}\nwbegindocs{460}\nwdocspar 

The same applies to the \texttt{Python} packages (chapter \ref{sec:PythonRules} page \pageref{sec:PythonRules}). 

\nwenddocs{}\nwbegincode{461}\sublabel{NW4L0rMe-3vE97d-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3vE97d-1}}}\moddef{DebianRulesTemplate4~{\nwtagstyle{}\subpageref{NW4L0rMe-3vE97d-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1qdrCP-1}}\nwenddeflinemarkup 
        if [ $\{PythonFlag\} -eq 1 ] 
        then 
            PythonRules 
        fi 

\LA{}DebianRulesTemplate5~{\nwtagstyle{}\subpageref{NW4L0rMe-dzLzR-1}}\RA{} \nwused{\\{NW4L0rMe-1qdrCP-1}}\nwendcode{}\nwbegindocs{462}\nwdocspar 

\subsubsection{Call of the Debhelper} 

% Add %:\n\tdh \$@\n\n to the translable string
\nwenddocs{}\nwbegincode{463}\sublabel{NW4L0rMe-dzLzR-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-dzLzR-1}}}\moddef{DebianRulesTemplate5~{\nwtagstyle{}\subpageref{NW4L0rMe-dzLzR-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3vE97d-1}}\nwenddeflinemarkup 
        echo -e $\{str4rulesdh\} >> $\{GitPath\}/debian/rules 

\LA{}DebianRulesTemplate6~{\nwtagstyle{}\subpageref{NW4L0rMe-3A6jWv-1}}\RA{} \nwused{\\{NW4L0rMe-3vE97d-1}}\nwendcode{}\nwbegindocs{464}\nwdocspar 

For \texttt{Maven} packages, the call to the \textit{debhelper} must be added. This is done by the \textit{Rules3MavenDH} function of the Maven plugin (chapter \ref{sec:Rules4MavenDH} page \pageref{sec:Rules4MavenDH}). 

\nwenddocs{}\nwbegincode{465}\sublabel{NW4L0rMe-3A6jWv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3A6jWv-1}}}\moddef{DebianRulesTemplate6~{\nwtagstyle{}\subpageref{NW4L0rMe-3A6jWv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-dzLzR-1}}\nwenddeflinemarkup 
        if [ $\{MavenPluginFlag\} -eq 1 ] 
        then 
            Rules4MavenDH 
        fi 

\LA{}DebianRulesTemplate7~{\nwtagstyle{}\subpageref{NW4L0rMe-1druLV-1}}\RA{} \nwused{\\{NW4L0rMe-dzLzR-1}}\nwendcode{}\nwbegindocs{466}\nwdocspar 

Also for the \texttt{Mozilla} extensions the call to the \textit{debhelper} must be added. This is done by the \textit{Web extension plugin} (chapter \ref{chap:WebextPlugin}, page \pageref{chap:WebextPlugin}). 

\nwenddocs{}\nwbegincode{467}\sublabel{NW4L0rMe-1druLV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1druLV-1}}}\moddef{DebianRulesTemplate7~{\nwtagstyle{}\subpageref{NW4L0rMe-1druLV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3A6jWv-1}}\nwenddeflinemarkup 
        if [ $\{WebextFlag\} -eq 1 ] 
        then 
            WebextRulesDH 
        fi 

\LA{}DebianRulesTemplate10~{\nwtagstyle{}\subpageref{NW4L0rMe-3wCerJ-1}}\RA{} \nwused{\\{NW4L0rMe-3A6jWv-1}}\nwendcode{}\nwbegindocs{468}\nwdocspar 

Also, when packaging Python packages, add the debhelper call to the \textit{debian/rules} file. 

\nwenddocs{}\nwbegincode{469}\sublabel{NW4L0rMe-3wCerJ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3wCerJ-1}}}\moddef{DebianRulesTemplate10~{\nwtagstyle{}\subpageref{NW4L0rMe-3wCerJ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1druLV-1}}\nwenddeflinemarkup 
        if [ $\{PythonFlag\} -eq 1 ] 
        then 
            PythonRulesDH 
        fi 

\LA{}DebianRulesTemplate11~{\nwtagstyle{}\subpageref{NW4L0rMe-ch4gb-1}}\RA{} \nwused{\\{NW4L0rMe-1druLV-1}}\nwendcode{}\nwbegindocs{470}\nwdocspar 

\subsubsection{\textit{debian/rules} - overrides} 

Sometimes it is necessary to execute additional steps before or after the execution of the respective \textit{debhelper} scripts. For this purpose, the respective script is overridden. 

Example: 

\begin{verbatim} override_dh_auto_build: 
        dh_auto_build -- -f org/xmlunit/pom.xml package -DskipTests \end{verbatim} 

The first line of the example names the target to be modified. The second line must start with a \textit{tab character} in a width of 8 characters. 

The double minus sign means that first the parameters are executed that \textit{dh\_auto\_build} normally passes. After that, other parameters may be listed that are passed to the program. 

\textit{package} denotes the so-called \textit{goal}. 

\subsubsection{End of the function} 

At the end of the function, an entry is made in the log file. The \textit{debian/rules} file is displayed for editing. Finally it is made executable as \textit{Make} file. 

\nwenddocs{}\nwbegincode{471}\sublabel{NW4L0rMe-ch4gb-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-ch4gb-1}}}\moddef{DebianRulesTemplate11~{\nwtagstyle{}\subpageref{NW4L0rMe-ch4gb-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3wCerJ-1}}\nwenddeflinemarkup 
        echo "debian/rules was created " >$\{log\} 

    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/rules 

    if ! [ -x $\{GitPath\}/debian/rules ] 
    then 
        chmod ugo+x $\{GitPath\}/debian/rules 
        echo $\{GitPath\}"/debian/rules is now executable" >> $\{log\} 
    fi
 \} 

\LA{}DebianSalsaCiTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-3r5YFV-1}}\RA{} \nwused{\\{NW4L0rMe-3wCerJ-1}}\nwendcode{}\nwbegindocs{472}\nwdocspar 

\subsection{salsa-ci.yml} \label{subsec:SalsaCi} 

On \textit{salsa.debian.org}, enter \textit{debian/salsa-ci.yml} in the respective project under \textit{Settings - CI/CD - General pipelines - CI/CD configuration file}, or the corresponding file name located in the directory \textit{debian/}. 

This triggers the automatic build process for the \textit{Reproducible Builds} as well. 

\nwenddocs{}\nwbegincode{473}\sublabel{NW4L0rMe-3r5YFV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3r5YFV-1}}}\moddef{DebianSalsaCiTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-3r5YFV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-ch4gb-1}}\nwenddeflinemarkup 
function DebianSalsaCiTemplate \{ 
    # Called by DisplayDebianFiles 

    # String for debian/salsa-ci.yml 
    str4salsa="include:\\n\\ 
    - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml\\n\\ 
    - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml" 

    if ! [ -f $\{GitPath\}/debian/salsa-ci.yml ] 
    then 
        touch $\{GitPath\}/debian/salsa-ci.yml 
        echo -e $\{str4salsa\} >> $\{GitPath\}/debian/salsa-ci.yml 
        echo "debian/salsa-ci.yml was created." >> $\{log\} 
    fi 
    nano --linenumbers --mouse --softwrap $\{GitPath\}/debian/salsa-ci.yml
 \} 

\LA{}SelectChangesFile~{\nwtagstyle{}\subpageref{NW4L0rMe-3JXgFA-1}}\RA{} \nwused{\\{NW4L0rMe-ch4gb-1}}\nwendcode{}\nwbegindocs{474}\nwdocspar 

\subsection{debian/javabuild} \label{subsec:javabuild} 

The following function allows the creation of a \textit{debian/javabuild} file, which can be used to build a Java package without a build system. 

The \textit{debian/javabuild} file contains on each line the name of a \textit{.jar} file followed by a list of source code files or directories. This file is read by the \textit{javahelper} program \textit{jh\_build}. 

\nwenddocs{}\nwbegincode{475}\sublabel{NW4L0rMe-f58lA-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-f58lA-1}}}\moddef{DebianJavabuildTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-f58lA-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2gBHGD-1}}\nwenddeflinemarkup 
function DebianJavabuildTemplate \{ 
    # Called by DisplayDebianFiles 
    # For building a java package without build system (like maven) 
    if [ -f debian/javabuild] 
    then 
        if whiptail --title "Creating debian/javabuild?" \\ 
        --defaultno --yesno "Should debian/javabuild be created?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            echo "# NameOfJarFile SourceDirToPackage" >>debian/javabuild 
            echo "debian/javabuild was created" >> $\{log\} 
            nano --linenumbers --mouse --softwrap debian/javabuild 
        fi 
    fi
 \} 

\LA{}DisplayDebianChangelog~{\nwtagstyle{}\subpageref{NW4L0rMe-2lL6hV-1}}\RA{} \nwused{\\{NW4L0rMe-2gBHGD-1}}\nwendcode{}\nwbegindocs{476}\nwdocspar 

\subsection{<Package name>.install} \label{subsec:install} 

This file is needed to specify where a file should be installed. It is mandatory to make sure that the package name is really the name of the binary to be built. 

\nwenddocs{}\nwbegincode{477}\sublabel{NW4L0rMe-4EEcIx-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4EEcIx-1}}}\moddef{DisplayDebianFiles5~{\nwtagstyle{}\subpageref{NW4L0rMe-4EEcIx-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2oTN6k-1}}\nwenddeflinemarkup 
    if [ $\{WebextFlag\} -eq 1 ] &&[ ! -f $\{GitPath\}/debian/$\{PackName\}.install ] 
    then 
        WebextInstall 
    fi 

    nano --linenumbers --mouse \\ 
    --softwrap $\{GitPath\}/debian/$\{PackName\}.install 
\LA{}DisplayDebianFiles6~{\nwtagstyle{}\subpageref{NW4L0rMe-1vjz0Z-1}}\RA{} \nwused{\\{NW4L0rMe-2oTN6k-1}}\nwendcode{}\nwbegindocs{478}\nwdocspar 

Example: \begin{verbatim} 
    nc.jar usr/share/java \end{verbatim} 

This copies the respective files to the future directory. By default, it is not possible to rename a file so that the file name matches the naming of Java libraries in the \textit{Debian Policy for Java} \cite{JavaPolicy}, for example. 

As described in the manual for \textit{dh\_install} \footnote{\url{https://manpages.debian.org/unstable/debhelper/dh_install.1.en.html}}. This then also requires further steps. 

\begin{itemize} \item{The package must have a build dependency on \textit{dh-exec}. The package that must be specified in the \textit{debian/control} file is \textit{dh-exec}} 
\item{The installation file must be marked as executable.} \end{itemize} 

\subsection{<Package name>.dirs} 

This file does not necessarily have to have the name of the binary. The package name can also be omitted completely 

\nwenddocs{}\nwbegincode{479}\sublabel{NW4L0rMe-1vjz0Z-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1vjz0Z-1}}}\moddef{DisplayDebianFiles6~{\nwtagstyle{}\subpageref{NW4L0rMe-1vjz0Z-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4EEcIx-1}}\nwenddeflinemarkup 
    nano --linenumbers --mouse \\ 
    --softwrap $\{GitPath\}/debian/$\{PackName\}.dirs 
\LA{}DisplayDebianFiles7~{\nwtagstyle{}\subpageref{NW4L0rMe-2re9Xj-1}}\RA{} \nwused{\\{NW4L0rMe-4EEcIx-1}}\nwendcode{}\nwbegindocs{480}\nwdocspar 

Example: 
     \begin{verbatim} usr/share/java \end{verbatim} 

\subsection{<Package name|.docs} 

The files listed here are installed in the build process from the corresponding \textit{debhelper} \textit{dh\_installdocs} to a directory created for this purpose \textit{/usr/share/docs/<package name>}. 

The \textit{LICENSE} file does not need to be included. This is automatically installed after \textit{/usr/share/docs/<package name>}. 

\nwenddocs{}\nwbegincode{481}\sublabel{NW4L0rMe-2re9Xj-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2re9Xj-1}}}\moddef{DisplayDebianFiles7~{\nwtagstyle{}\subpageref{NW4L0rMe-2re9Xj-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1vjz0Z-1}}\nwenddeflinemarkup 
    nano --linenumbers --mouse \\ 
    --softwrap $\{GitPath\}/debian/$\{PackName\}.docs 
\LA{}DisplayDebianFiles8~{\nwtagstyle{}\subpageref{NW4L0rMe-sb2el-1}}\RA{} \nwused{\\{NW4L0rMe-1vjz0Z-1}}\nwendcode{}\nwbegindocs{482}\nwdocspar 

\subsection{<Package name>.links} \label{subsec:links} 

This file is called from the \textit{dh\_link}. 

\nwenddocs{}\nwbegincode{483}\sublabel{NW4L0rMe-sb2el-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-sb2el-1}}}\moddef{DisplayDebianFiles8~{\nwtagstyle{}\subpageref{NW4L0rMe-sb2el-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2re9Xj-1}}\nwenddeflinemarkup
     if [ $\{WebextFlag\} -eq 1 ] &&[ ! -f $\{GitPath\}/debian/$\{PackName\}.links ] 
    then
        WebextLinksTB 
    fi 

    nano --linenumbers --mouse \\ 
    --softwrap $\{GitPath\}/debian/$\{PackName\}.links 
\LA{}DisplayDebianFiles9~{\nwtagstyle{}\subpageref{NW4L0rMe-3blyBD-1}}\RA{} \nwused{\\{NW4L0rMe-2re9Xj-1}}\nwendcode{}\nwbegindocs{484}\nwdocspar 

\subsection{<Package name>.desktop} 

% Dies ist erst einmal ein Beispiel:
\nwenddocs{}\nwbegincode{485}\sublabel{NW4L0rMe-4Cofvj-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4Cofvj-1}}}\moddef{PaketnameDesktop~{\nwtagstyle{}\subpageref{NW4L0rMe-4Cofvj-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
[Desktop Entry] 
X-AppInstall-Package=JVerein 
X-AppInstall-Popcon=1 
X-AppInstall-Section=main 

Version=1.0 
Name=JVerein 
Comment=Administration of an Association 
Comment[de]=Vereinssoftware 

Exec=jameica 
Icon=jameica-icon 
Terminal=false 
Type=Application 
Categories=Office 
Keywords=Association;Verein 
StartupNotify=true 

\nwnotused{PaketnameDesktop}\nwendcode{}\nwbegindocs{486}\nwdocspar 

% TODO: Wenn es eine Desktop-Datei gibt muss der folgende Eintrag auch 
% in die Datei d/<Paketname.install>
% debian/source/include-binaries ist eine Datei. Sie enthält zu Dokumentationszwecke 
% den Namen der Icon Datei, wenn diese nicht von Upstream bereitgestellt wird.
% https://lists.debian.org/debian-mentors/2020/10/msg00018.html
\subsection{<Package name>.examples} 

This file is called by the \textit{dh\_installexamples}. 

\nwenddocs{}\nwbegincode{487}\sublabel{NW4L0rMe-3blyBD-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3blyBD-1}}}\moddef{DisplayDebianFiles9~{\nwtagstyle{}\subpageref{NW4L0rMe-3blyBD-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-sb2el-1}}\nwenddeflinemarkup 
    nano --linenumbers --mouse \\ 
    --softwrap $\{GitPath\}/debian/$\{PackName\}.examples 

\LA{}DisplayDebianFiles10~{\nwtagstyle{}\subpageref{NW4L0rMe-38F31N-1}}\RA{} \nwused{\\{NW4L0rMe-sb2el-1}}\nwendcode{}\nwbegindocs{488}\nwdocspar 

\subsection{README.Debian} 

\subsection{README.source} \label{subsec:ReadmeSource} 

This file can be used to document the exclusions (chapter \ref{subsubsec:BenamungPakete}, page \pageref{subsubsec:BenamungPakete}) and their justifications. \footnote{Debian-Policy, chapter 4.14 \cite{DebianPolicy}}. This file gets an entry in any case when building with \textit{maven}. (Chapter \ref{subsec:MavenReadmeSource}, page \pageref{subsec:MavenReadmeSource}. 

\section{Checking the files in \textit{debian/} with CmeFix} \label{sec:cmefix} 

The \textit{cme fix dpkg} command checks the \textit{dpkg} files, updates obsolete parameters, and applies any fixes. 

With the parameter \textit{-verbose} you get more information about what happens. The parameter \textit{-backup} creates backup files before saving the changes. These are identified by the extension \textit{.old}. Note that in this case the long form of the options are really just prefixed with a hyphen \footnote{\url{https://manpages.debian.org/unstable/cme/cme.1p.en.html}}. 

\nwenddocs{}\nwbegincode{489}\sublabel{NW4L0rMe-1LZU6O-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1LZU6O-1}}}\moddef{CmeFix~{\nwtagstyle{}\subpageref{NW4L0rMe-1LZU6O-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3y9lo5-1}}\nwenddeflinemarkup 

function CmeFix \{ 
    # Called by DisplayDebianFiles 

    if whiptail --title "Check and fix with cme?" \\ 
    --yesno "Should debian files be checked and fixed using 'cme fix'?" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
    then 
        if whiptail --title "Backup?" \\ 
        --yesno "Should the recent files be backuped (recommended)?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            cme fix -verbose -backup dpkg 
        else
            cme fix -verbose dpkg 
        fi 
\LA{}cmefix1~{\nwtagstyle{}\subpageref{NW4L0rMe-3LjOLe-1}}\RA{} \nwused{\\{NW4L0rMe-3y9lo5-1}}\nwendcode{}\nwbegindocs{490}\nwdocspar 

Execution of the program script is halted here so that the output of the \textit{cme fix dpkg} command can be analyzed. In another terminal -- if the backup option was selected -- the original files can be compared with the newly created files, backup files can be deleted and corrections can be made if necessary. 

\nwenddocs{}\nwbegincode{491}\sublabel{NW4L0rMe-3LjOLe-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3LjOLe-1}}}\moddef{cmefix1~{\nwtagstyle{}\subpageref{NW4L0rMe-3LjOLe-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1LZU6O-1}}\nwenddeflinemarkup 
        echo "Please check the result of cme fix!" 
        echo "You can check and fix it in another terminal." 
        echo "Please press RETURN to go on." 
        read a 
    fi
 \} 

\LA{}DisplayDebianFiles~{\nwtagstyle{}\subpageref{NW4L0rMe-11cehY-1}}\RA{} \nwused{\\{NW4L0rMe-1LZU6O-1}}\nwendcode{}\nwbegindocs{492}\nwdocspar 

\chapter{Making changes to upstream code} \label{chap:Aenderungen_am_Upstream_Code_vornehmen} 

We continue with possible changes to the source code. If no changes are made to the source code, the treatment of the file \textit{debian/changelog} (chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}) follows directly. 

\nwenddocs{}\nwbegincode{493}\sublabel{NW4L0rMe-361nEZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-361nEZ-1}}}\moddef{BuildNewRevision5-1~{\nwtagstyle{}\subpageref{NW4L0rMe-361nEZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-25jkNk-1}}\nwenddeflinemarkup 
    # Patches treatment 
    PatchesTreatment 

\LA{}BuildNewRevision6~{\nwtagstyle{}\subpageref{NW4L0rMe-4e7uxk-1}}\RA{} \nwused{\\{NW4L0rMe-25jkNk-1}}\nwendcode{}\nwbegindocs{494}\nwdocspar 

When a new revision is created, the user is asked if changes should be made to the source code. However, to do this, the program first checks again (see chapter \ref{sec:ImportPatchQueue}, page \pageref{sec:ImportPatchQueue}) whether a directory \textit{debian/patches} already exists and informs the user of the result of this check. 

\nwenddocs{}\nwbegincode{495}\sublabel{NW4L0rMe-1KCu8R-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1KCu8R-1}}}\moddef{PatchesTreatment~{\nwtagstyle{}\subpageref{NW4L0rMe-1KCu8R-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2htUbp-1}}\nwenddeflinemarkup 
function PatchesTreatment \{ 
    # Called by BuildNewRevision 

    # Patches treatment 
    cd $\{GitPath\} 
    if [ -d debian/patches ] 
    then 
        whiptail --title "Info" \\ 
        --msgbox "There is a directory debian/patches" 15 60 
\LA{}PatchesTreatment1~{\nwtagstyle{}\subpageref{NW4L0rMe-1xHmJ1-1}}\RA{} \nwused{\\{NW4L0rMe-2htUbp-1}}\nwendcode{}\nwbegindocs{496}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ThereIsPatchDir.png} \caption{There is a directory debian/patches.} \end{figure} 

\nwenddocs{}\nwbegincode{497}\sublabel{NW4L0rMe-1xHmJ1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1xHmJ1-1}}}\moddef{PatchesTreatment1~{\nwtagstyle{}\subpageref{NW4L0rMe-1xHmJ1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1KCu8R-1}}\nwenddeflinemarkup 
    else 
        whiptail --title "Info" \\ 
        --msgbox "There is no directory debian/patches" 15 60 
    fi 

\LA{}PatchesTreatment2~{\nwtagstyle{}\subpageref{NW4L0rMe-4CNE2d-1}}\RA{} \nwused{\\{NW4L0rMe-1KCu8R-1}}\nwendcode{}\nwbegindocs{498}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ThereIsNoPatchDir.png} \caption{There is no directory debian/patches.} \end{figure} 

Now the query occurs whether a patch is to be created, edited or deleted. Furthermore, you can choose between the two methods \textit{quilt} (chapter \ref{sec:NutzungQuilt}, page \pageref{sec:NutzungQuilt}) and \textit{gbp pq} (chapter \ref{sec:WorkingwithGbpPq}, page \pageref{sec:WorkingwithGbpPq}). Of course, the build process can also be continued without \textit{patch} (chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}). 

\nwenddocs{}\nwbegincode{499}\sublabel{NW4L0rMe-4CNE2d-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4CNE2d-1}}}\moddef{PatchesTreatment2~{\nwtagstyle{}\subpageref{NW4L0rMe-4CNE2d-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1xHmJ1-1}}\nwenddeflinemarkup 
    PMTask=$(whiptail --title "Tasks:" \\ 
    --radiolist "Do you want to create, edit or delete patches?" 15 60 4 \\ 
    "0" "By using quilt" off \\ 
    "1" "By using gbp pq" off \\ 
    "2" "No" on --cancel-button "Exit" 3>&2 2>&1 1>&3) 

\LA{}PatchesTreatment3~{\nwtagstyle{}\subpageref{NW4L0rMe-IWzDf-1}}\RA{} \nwused{\\{NW4L0rMe-1xHmJ1-1}}\nwendcode{}\nwbegindocs{500}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/PatchesTasks.png} \caption{Create patches for Debian} \end{figure} 

If the question is answered in the negative, the next step is to edit the \textit{debian/changelog} file (chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}). 

With \textit{Exit} the program script is left. 

\nwenddocs{}\nwbegincode{501}\sublabel{NW4L0rMe-IWzDf-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-IWzDf-1}}}\moddef{PatchesTreatment3~{\nwtagstyle{}\subpageref{NW4L0rMe-IWzDf-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4CNE2d-1}}\nwenddeflinemarkup 
    if [ -z "$\{PMTask\}" ] 
    then 
        exit 
    fi 

\LA{}PatchesTreatment4~{\nwtagstyle{}\subpageref{NW4L0rMe-2yaKJP-1}}\RA{} \nwused{\\{NW4L0rMe-4CNE2d-1}}\nwendcode{}\nwbegindocs{502}\nwdocspar 

If you have decided to patch and to use a method, the program script now calls the respective further functions. 

\nwenddocs{}\nwbegincode{503}\sublabel{NW4L0rMe-2yaKJP-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2yaKJP-1}}}\moddef{PatchesTreatment4~{\nwtagstyle{}\subpageref{NW4L0rMe-2yaKJP-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-IWzDf-1}}\nwenddeflinemarkup 
    if [ $\{PMTask\} -eq 0 ] 
    then 
        PatchRunNr=0 
        PatchTasks 
    elif [ $PMTask -eq 1 ] 
    then 
        CheckGitStatus 
        PQMigration 
    fi
 \} 

\LA{}LastQuestionsBeforeBuild~{\nwtagstyle{}\subpageref{NW4L0rMe-2ea8K1-1}}\RA{} \nwused{\\{NW4L0rMe-IWzDf-1}}\nwendcode{}\nwbegindocs{504}\nwdocspar 

Either you work with \textit{gbp pq} or with \textit{quilt} (chapter \ref{sec:NutzungQuilt}, page \pageref{sec:NutzungQuilt}). 

If one has decided to work with \textit{quilt}, the variable \textit{PatchRunNr} is set to \textit{0} and the function \textit{PatchTasks} (chapter \ref{sec:NutzungQuilt}, page \pageref{sec:NutzungQuilt}) is called. 

Otherwise, the \textit{PQMigration} function (chapter \ref{subsec:CreatePQMigration}, page \pageref{subsec:CreatePQMigration}) of the program script is called. 

\section{Working with \textit{gbp pq}} \label{sec:WorkingwithGbpPq} 

To manage patches, \textit{gbp pq} can be used. This is mainly intended for source packages in \textit{3.0 (quilt)} format (see chapter \ref{subsec:d/source/format}, page \pageref{subsec:d/source/format}). The modification of the upstream source code is done by files in the \textit{debian/patches/} directory. 

The \textit{PQMigration} function can create a patch queue branch using these patches if it does not already exist. Furthermore, this function can update an existing patch queue branch. 

\subsection{Creating a Patch Queue Branch} \label{subsec:CreatePQMigration} 

It will check again if there is a file \textit{debian/patches/series} or not. 

It also checks if there is a matching \textit{patch queue branch}. 

There are four cases to distinguish: 

\begin{enumerate} \item 
There is neither a file \textit{debian/patches/series} nor a matching \textit{patch-queue branch}. Then \textit{git checkout -b} creates a new \textit{patch-queue branch} and changes to it. \item The file \textit{debian/patches/series} does not exist, but a matching \textit{patch-queue branch} already does. Then its existence is pointed out and changed to it. \item The file \textit{debian/patches/series} exists, but no matching \textit{patch-queue branch}. Then \textit{gbp pq import} is used to create a matching \textit{patch-queue branch}. However, this involves significant risks if not all patches in the queue are applicable (chapter \ref{sec:ImportPatchQueue}, page \pageref{sec:ImportPatchQueue}). Therefore, it is \textbf{urgently} recommended to create the \textit{patch queue branch} if necessary before downloading a new version. If this has not been done, the option to work with \textit{quilt} should be selected. \item Both the \textit{debian/patches/series} file and the matching \textit{patch-queue branch} exist. This will often be the case. Then \textit{gbp pq rebase} is applied first. \end{enumerate} 

A \textit{patch queue} branch is created only in cases 1 and 3. 

\nwenddocs{}\nwbegincode{505}\sublabel{NW4L0rMe-27lD23-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-27lD23-1}}}\moddef{PQMigration~{\nwtagstyle{}\subpageref{NW4L0rMe-27lD23-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-XpxM8-1}}\nwenddeflinemarkup 
function PQMigration \{ 
    # Called by PatchesTreatment and itself 
    # Transfers patches into patch-queue branch 
    npqf=0 
    cd $\{GitPath
\} 

    if [ ! -f debian/patches/series ] 
    # debian/patches/series does not exists 
    then 
        # Case 2 
        # Anything is easy 
        npqf=1 
        if echo $(git branch) | grep --quiet 'patch-queue/'$\{RecentBranch\} 
        then 
            whiptail --title "PQ-branch exists" \\ 
            --msgbox "Branch 'patch-queue/$\{RecentBranch\}' exists." 15 60 
            git checkout patch-queue/$\{RecentBranch\} 
\LA{}PQMigration0~{\nwtagstyle{}\subpageref{NW4L0rMe-2tBIfH-1}}\RA{} \nwused{\\{NW4L0rMe-XpxM8-1}}\nwendcode{}\nwbegindocs{506}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/PQBranchExists.png} \caption{There exists a PQ branch.} \end{figure} 

If the file \textit{debian/patches/series} does not exist and no matching patch queue branch exists, it is recreated here and changed to this. 

\nwenddocs{}\nwbegincode{507}\sublabel{NW4L0rMe-2tBIfH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2tBIfH-1}}}\moddef{PQMigration0~{\nwtagstyle{}\subpageref{NW4L0rMe-2tBIfH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-27lD23-1}}\nwenddeflinemarkup 
        else 
            git checkout -b patch-queue/$\{RecentBranch\} 
        fi
\LA{}PQMigration1~{\nwtagstyle{}\subpageref{NW4L0rMe-1v0L5b-1}}\RA{} \nwused{\\{NW4L0rMe-27lD23-1}}\nwendcode{}\nwbegindocs{508}\nwdocspar 

You can then immediately start editing the source code (chapter \ref{subsec:Edit source code}, page \pageref{subsec:Edit source code}). 

Both \textit{gbp pq rebase} and \textit{gbp pq import} assume that there are no unversioned files in the current Git branch and that all previous patches can be applied. Otherwise, merge conflicts need to be resolved. 

The user is informed about this. 

\nwenddocs{}\nwbegincode{509}\sublabel{NW4L0rMe-1v0L5b-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1v0L5b-1}}}\moddef{PQMigration1~{\nwtagstyle{}\subpageref{NW4L0rMe-1v0L5b-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2tBIfH-1}}\nwenddeflinemarkup 
    else 
        # debian/patches/series exists 
        Notice="All patches listed in 'debian/patches/series' \\n\\ 
        have to be appliable"'!'"\\n\\ 
        Otherwise you have to solve 'merge conflicts'"'!' 
        if whiptail --title "Attention please"'!' \\ 
        --yesno "$\{Notice\} Do you want to check the situation?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            ShowPatches "check" 
\LA{}PQMigration1-1~{\nwtagstyle{}\subpageref{NW4L0rMe-44Wxo8-1}}\RA{} \nwused{\\{NW4L0rMe-2tBIfH-1}}\nwendcode{}\nwbegindocs{510}\nwdocspar 

What can be done here is given in chapter \ref{sec:ChoosePatches}, page \pageref{sec:ChoosePatches}). 

\nwenddocs{}\nwbegincode{511}\sublabel{NW4L0rMe-44Wxo8-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-44Wxo8-1}}}\moddef{PQMigration1-1~{\nwtagstyle{}\subpageref{NW4L0rMe-44Wxo8-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1v0L5b-1}}\nwenddeflinemarkup 
        if whiptail --title "Attention please"'!' \\ 
        --yesno "Do you want to edit 'debian/patches/series'?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            nano --linenumbers --mouse --softwrap debian/patches/series 
        fi 
    fi
 

    echo -e $\{Notice\} 
    CheckGitStatus 
    fi 
\LA{}PQMigration2~{\nwtagstyle{}\subpageref{NW4L0rMe-4EdMuF-1}}\RA{} \nwused{\\{NW4L0rMe-1v0L5b-1}}\nwendcode{}\nwbegindocs{512}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/Notice4GbpPQ.png} \caption{Hint on the requirements for further work.} \end{figure} 

\subsection{Manual Editing} 

In the \textit{debian/patches/series} file, yes, all patches are listed in the order in which they have been applied so far.{Manual edit} 

Now they need to be checked to see if the problems have already been improved by upstream, making these patches obsolete. 

Then these patches are to be removed from the \textit{debian/patches} directory and their entries from the \textit{debian/patches/series} file. These adjustments are made in the main branch. 

\subsection{Troubleshooting hints} \label{subsec:TroubleShooting} 

Only general information can be given for troubleshooting after a failure. 

If changes to source code files already exist, these are to be undone with \textit{git restore <path/filename>}. A possibly existing directory \textit{.pc/} is to be deleted. 

Changes to the \textit{debian/changelog} file are to be committed. 

\subsection{Refreshing the patch queue branch} 

The program script checks whether a corresponding patch queue branch already exists. 

If a suitable patch queue branch exists, the program script first calls the \textit{RebasePQBranch} function. 

Otherwise, patch queue branch is created by \textit{gbp pq import} from the current \textit{Git} branch (chapter \ref{subsec:ImportExistingPatches}, page \pageref{subsec:ImportExistingPatches}). 

\nwenddocs{}\nwbegincode{513}\sublabel{NW4L0rMe-4EdMuF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4EdMuF-1}}}\moddef{PQMigration2~{\nwtagstyle{}\subpageref{NW4L0rMe-4EdMuF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-44Wxo8-1}}\nwenddeflinemarkup 

    if [ $\{npqf\} -eq 0 ] 
    then 
        if echo $(git branch) | grep --quiet 'patch-queue/'$\{RecentBranch\} 
        # patch-queue branch exists 
        then 
            # Case 4 
            RebaseCounter=0 
            RebasePQBranch 
\LA{}PQMigration3~{\nwtagstyle{}\subpageref{NW4L0rMe-Kn85H-1}}\RA{} \nwused{\\{NW4L0rMe-44Wxo8-1}}\nwendcode{}\nwbegindocs{514}\nwdocspar 

The \textit{RebasePQBranch} function executes a \textit{gbp pq rebase}. The commits of the \textit{debian/} branch are applied to the patch queue branch. 

With \textit{gbp pq rebase} it is changed to the patch queue branch which is connected to the current branch. All new additions to the current branch are transferred to the patch queue branch by a \textit{rebase}.\cite{GBP-PQ2020} 

\nwenddocs{}\nwbegincode{515}\sublabel{NW4L0rMe-3OX4Ly-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3OX4Ly-1}}}\moddef{RebasePQBranch~{\nwtagstyle{}\subpageref{NW4L0rMe-3OX4Ly-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4kh8u-1}}\nwenddeflinemarkup 
function RebasePQBranch \{ 
    # Called by PQMigration and itself 
    if [ $\{RebaseCounter\} == 0 ] 
    then 
        gbp pq rebase --verbose 
    else 
        git rebase --continue --verbose 
    fi 

\LA{}RebasePQBranch1~{\nwtagstyle{}\subpageref{NW4L0rMe-2g71yC-1}}\RA{} \nwused{\\{NW4L0rMe-4kh8u-1}}\nwendcode{}\nwbegindocs{516}\nwdocspar 

If the execution of \textit{gbp pq rebase} fails, manual intervention can and must be performed to rectify the situation (chapter \ref{subsec:CleanUpPatchQueue}, page \pageref{subsec:CleanUpPatchQueue}). 

For this purpose, \texttt{Git} gives the user hints. These look like the following, for example: 

\begin{verbatim} Resolve all conflicts manually, mark them as resolved with Hinweis: "git add/rm <conflicted_files>", then run "git rebase --continue". Hinweis: You can instead skip this commit: run "git rebase --skip". Hinweis: To abort and get back to the state before "git rebase", run "git rebase --abort". Konnte 9d4ba6c... (modify source to follow common conventions. Prevent texhash.) nicht anwenden gbp:error: Couldn't run git rebase: it exited with 1 

Manually resolve all conflicts, mark them as resolved with "git add/rm <conflicted_files>" and then run "git rebase --continue". You can also skip this commit: Run "git rebase --skip". To abort and return to the state before "git rebase", run "git rebase --abort". Could 9d4ba6c... (Adapt source code to common conventions. prevent texhash.) did not apply gbp:error: git rebase could not be executed: it terminated with 1 \end{verbatim} 

\nwenddocs{}\nwbegincode{517}\sublabel{NW4L0rMe-2g71yC-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2g71yC-1}}}\moddef{RebasePQBranch1~{\nwtagstyle{}\subpageref{NW4L0rMe-2g71yC-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3OX4Ly-1}}\nwenddeflinemarkup 
    if [ $? -ne 0 ] 
    then 
        git rebase --show-current-patch | cat 
\LA{}RebasePQBranch2~{\nwtagstyle{}\subpageref{NW4L0rMe-XpxM8-1}}\RA{} \nwused{\\{NW4L0rMe-3OX4Ly-1}}\nwendcode{}\nwbegindocs{518}\nwdocspar 

At this point, the patch that cannot be applied (completely) is displayed. With this help, it is then possible to manually resolve the merge conflicts after the interruption. 

\nwenddocs{}\nwbegincode{519}\sublabel{NW4L0rMe-XpxM8-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-XpxM8-1}}}\moddef{RebasePQBranch2~{\nwtagstyle{}\subpageref{NW4L0rMe-XpxM8-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2g71yC-1}}\nwenddeflinemarkup 
        Notice="gbp pq rebase failed"'!'"\\n\\ 
        All changes must be committed"'!'"\\n\\
        All patches have to be appliable"'!'"\\n" 
        FailureNotice $\{Notice\} 
        RebaseCounter=$(expr $\{RebaseCounter\} + 1) 
        RebasePQBranch 
    fi
 \} 

\LA{}PQMigration~{\nwtagstyle{}\subpageref{NW4L0rMe-27lD23-1}}\RA{} \nwused{\\{NW4L0rMe-2g71yC-1}}\nwendcode{}\nwbegindocs{520}\nwdocspar 

After that, a new attempt can be made. 

\subsection{Hints for cleaning up the patch queue} \label{subsec:CleanUpPatchQueue} 

In very many cases the \textit{pq rebase} command fails, because there are also always changes from upstream to already patched files. Patches that have already been adopted by the upstream project can be removed.  

The program script git in such cases the hint to switch to another terminal. There you can check with \textit{git status} that there is an incomplete rebase.  

The following command displays the failed patch in the additional terminal.  

\begin{verbatim} git rebase --show-current-patch \end{verbatim} 

In yet another terminal, the (still) existence of the file to be patched can be checked with the following command.  

\begin{verbatim} tar --list --file ../<UpstreamPackageName>.orig.tar.xz | grep <Filename> \end{verbatim} 

If the file does not (longer) exist, the patch can be removed with  

\begin{verbatim} git rebase --skip \end{verbatim} 

Then, in the (original) terminal in which the program script is running, continue with \textit{RETURN}. This first executes a \textit{git rebase --continue --verbose}.  

If the file to be patched exists, it must be edited in an editor. This changes the patches so that they can be applied to the new version.  

The file is then to be saved and a \textit{git add} executed. In the original terminal, continue with \textit{RETURN}.  

If necessary, repeat the procedure until the program script continues with its execution.  

Eine Möglichkeit ist es auch, durch den Befehl 

\begin{verbatim} gbp pq import --time-maschine=<n> \end{verbatim} 

solange Commit für Commit durchzugehen, bis die Patch-Queue angewandt werden kann. 

\textit{n} gibt dabei die maximale Anzahl der Rückschritte an. 

\subsection {Import of existing patches} \label{subsec:ImportExistingPatches} 

The contents of \textit{debian/patches} are imported into the patch queue branch with \textit{gbp pq} and changed into it\footnote{s. section \textit{gbp.patches.html} and \textit{man.gbp.pq.html}\cite{Guenther2006-2017}}. 

On import, output like this is generated: \begin{verbatim} gbp:info: Trying to apply patches \under 'aaa1011bfd5aa74fea43620aae94709de05f80be' \apply. 

gbp:info: 18 patches listed in 'debian/patches/series' \ 
imported under 'patch-queue/debian/sid'. \end{verbatim} 

It imported each patch file with \textit{gbp pq} and changed to the newly created patch queue branch \textit{patch-queue/debian/sid}. 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/pq-applied.png} \caption{The patch queue branch with patches from debian/patches has been applied.\cite{Guenther2006-2017}} \end{figure} 

If the file \textit{debian/patches/series} exists, but no corresponding patch queue branch exists yet, \textit{gbp pq import} is executed. This is done in the \textit{PQImport} function (chapter \ref{sec:ImportPatchQueue}, page \pageref{sec:ImportPatchQueue}). 

\textit{gbp pq import} creates a new patch queue branch from the \textit{quilt patches} in the \textit{debian/patches} directory listed in the \textit{debian/patches/series} file. These patches must be applicable without fuzziness. 

\nwenddocs{}\nwbegincode{521}\sublabel{NW4L0rMe-Kn85H-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-Kn85H-1}}}\moddef{PQMigration3~{\nwtagstyle{}\subpageref{NW4L0rMe-Kn85H-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4EdMuF-1}}\nwenddeflinemarkup 
        else 
            # patch-queue branch does not exist 
            # Case 3 
            if whiptail --title "Attention"'!' \\ 
            --yesno "Do you really want to use 'gbp pq import'?" \\ 
            --yes-button "Yes" --no-button "Working with Quilt" 15 60 
            then 
                PQImport 0 
            else 
                PatchTasks 
                # Working with Quilt 
            fi 
        fi 
    fi 
\LA{}PQMigration4~{\nwtagstyle{}\subpageref{NW4L0rMe-2wIt5z-1}}\RA{} \nwused{\\{NW4L0rMe-4EdMuF-1}}\nwendcode{}\nwbegindocs{522}\nwdocspar 

The above troubleshooting instructions also apply here (chapter \ref{subsec:TroubleShooting}, page \pageref{subsec:TroubleShooting}). 

\subsection{Edit source code} \label{subsec:Edit source code} 

\nwenddocs{}\nwbegincode{523}\sublabel{NW4L0rMe-2wIt5z-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2wIt5z-1}}}\moddef{PQMigration4~{\nwtagstyle{}\subpageref{NW4L0rMe-2wIt5z-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-Kn85H-1}}\nwenddeflinemarkup 

# Starting the work in the patch-queue branch echo echo "Break for patching in another terminal" echo "After finishing press RETURN to go on!" read a 

\LA{}PQMigration5~{\nwtagstyle{}\subpageref{NW4L0rMe-1Z9E4d-1}}\RA{} \nwused{\\{NW4L0rMe-Kn85H-1}}\nwendcode{}\nwbegindocs{524}\nwdocspar 

In the separate terminal, \textit{git branch -v} should be used to determine that the correct Git branch (\textit{patch-queue/} branch) is active and that its state matches that of the previous Git branch. Then files in the patch queue branch can be edited. 

Code can be added, changed or removed. The patches can be created or ``brought into shape'' like this. 

In doing so, the changes are to be committed as small as possible. What will later become a single patch in \textit{debian/patches/} is simply added by a commit. 

The first line of the commit message later becomes part of the patch name. The following lines contain the details about the functions of the patch. Therefore, it is useful to write multiline commit messages. 

The multiline commit message should then conform to the \textit{patch tagging guideline} in the patch\footnote{\url{https://dep-team.pages.debian.net/deps/dep3/}\cite{DEP-3}} The header of the patch file will look like this: 

The author and the date are set automatically. The name entered under \textit{Gbp-PQ} must not contain spaces. If necessary, these are to be replaced by \textit{underscores (\_)}. This will be the name of the patch file in the \textit{debian/patches} directory.  

\begin{verbatim} From: Autor <email address> 
Date: <Date and time of creation> 
Subject: <Commit message> 

Gbp-Pq: Name <name of the patch> 
Forwarded: Yes/No <if necessary>  

* posix/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET handling. 

Origin: upstream, http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdb56bac 
Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=9697 
Bug-Debian: http://bugs.debian.org/510219 \end{verbatim} 

This can be corrected with \textit{git commit -{}-amend -m "New Message"} can be corrected. 

%Um Commits zu entfernen oder zu bearbeiten, wird \textit{git rebase -i} 
%verwendet . Die Git-Dokumentation erklärt, wie man mit git-rebase arbeitet.
%Als Nächstes können Sie die Datei \textit{debian/changelog} aktualisieren
%(z.~B. durch Ausführen von \textit{gbp dch -S -a}, was dasselbe ist wie 
%\textit{gbp dch -{}-snapshot -{}-auto)} und das Paket -- wie gewohnt -- erstellen.
\subsection{Export the patches} 

Once we are satisfied with the commits, let's regenerate the patches in \textit{debian/patches/} using \textit{gbp pq}. This will switch you back to the debian/sid branch and regenerate the patches using a method similar to git-format-patch: 

The result could now be added as follows: 

\begin{verbatim} gbp pq export 
git add debian/patches 
git commit \end{verbatim} 

\textit{gbp pq export} means: 

Exported the patches on the patch queue branch associated with the current branch to a quilt row of patches to \textit{debian/patches/} and updated the \textit{series} file in the current branch (e.g., \textit{debian/sid})\footnote{\url{https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.patches.html}}\cite{Guenther2006-2017}. 

To avoid having to transfer the result by hand each time, \textit{--commit} can also be passed to the gbp export command. 

\nwenddocs{}\nwbegincode{525}\sublabel{NW4L0rMe-1Z9E4d-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1Z9E4d-1}}}\moddef{PQMigration5~{\nwtagstyle{}\subpageref{NW4L0rMe-1Z9E4d-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2wIt5z-1}}\nwenddeflinemarkup 
    # Export 
    if whiptail --title "Use gbp pq export?" \\ 
    --yesno "Do you like to use 'gbp pq export --commit'?" \\ 
    --yes-button "Yes" --no-button "No" 15 60
\LA{}PQMigration7~{\nwtagstyle{}\subpageref{NW4L0rMe-rR02h-1}}\RA{} \nwused{\\{NW4L0rMe-2wIt5z-1}}\nwendcode{}\nwbegindocs{526}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/GbpPqExport.png} \caption{Should \textit{gbp pq export} be applied?} \end{figure} 

\nwenddocs{}\nwbegincode{527}\sublabel{NW4L0rMe-rR02h-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-rR02h-1}}}\moddef{PQMigration7~{\nwtagstyle{}\subpageref{NW4L0rMe-rR02h-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1Z9E4d-1}}\nwenddeflinemarkup 
    then 
        gbp pq export --commit --verbose >> $\{log\} 2>&1 
        echo "Check branch." 
        git branch --verbose 
        echo "Press RETURN to continue!" 
        read a
\LA{}PQMigration8~{\nwtagstyle{}\subpageref{NW4L0rMe-2PEcRT-1}}\RA{} \nwused{\\{NW4L0rMe-1Z9E4d-1}}\nwendcode{}\nwbegindocs{528}\nwdocspar 

After exporting the patches, the next step is usually to determine the distribution. (Chapter \ref{subsec:IdentifyDist}, page \pageref{subsec:IdentifyDist}) 

If the question is answered in the negative, manual intervention is possible. 

\nwenddocs{}\nwbegincode{529}\sublabel{NW4L0rMe-2PEcRT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2PEcRT-1}}}\moddef{PQMigration8~{\nwtagstyle{}\subpageref{NW4L0rMe-2PEcRT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-rR02h-1}}\nwenddeflinemarkup 
    else 
        git log 
        git checkout $\{HistoricBranch\} 
        ReplaceConfigLines 'RecentBranch' $\{HistoricBranch\} 
        git branch 
        echo "Break for importing in another way in another terminal" 
        echo "After finishing press RETURN to go on!" 
        read a 
    fi
 \} 

\LA{}PatchTasks~{\nwtagstyle{}\subpageref{NW4L0rMe-1x4iD7-1}}\RA{} \nwused{\\{NW4L0rMe-rR02h-1}}\nwendcode{}\nwbegindocs{530}\nwdocspar 

\section{Using Quilt} \label{sec:NutzungQuilt} 

The changes to the upstream are made with the help of Quilt. As described at the beginning, \textit{dquilt} has to be set up first (chapter \ref{sec:QuiltEinrichtung}, page \pageref{sec:QuiltEinrichtung}). 

The setup in \textit{.bashrc} cannot be used when running this program (chapter \ref{sec:QuiltEinrichtung}, page \pageref{sec:QuiltEinrichtung}). 

The program therefore first checks whether \textit{quilt} is available. Since the script ignores the alias of \textit{.bashrc}, \textit{dquilt} is defined in a variable. 

\nwenddocs{}\nwbegincode{531}\sublabel{NW4L0rMe-2bkGIk-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2bkGIk-1}}}\moddef{CreateDquilt~{\nwtagstyle{}\subpageref{NW4L0rMe-2bkGIk-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-26Q7wV-1}}\nwenddeflinemarkup 
function CreateDquilt \{ 
    # Called by PatchTasks
 

# Check whether quilt is available if [ $\{PatchRunNr\} -eq 0 ] then if [ ! -f ~/.quiltrc-dpkg ] \LA{}CreateDquilt1~{\nwtagstyle{}\subpageref{NW4L0rMe-2sRlVv-1}}\RA{} \nwused{\\{NW4L0rMe-26Q7wV-1}}\nwendcode{}\nwbegindocs{532}\nwdocspar 

The line checks if there is a file \textit{.quiltrc-dpkg} in the user's home directory. If this file does not exist, the message \textit{dquilt} is not configured, because then the corresponding alias for \textit{quilt --quiltrc=\${HOME}/.quiltrc-dpkg} cannot be created. 

\nwenddocs{}\nwbegincode{533}\sublabel{NW4L0rMe-2sRlVv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2sRlVv-1}}}\moddef{CreateDquilt1~{\nwtagstyle{}\subpageref{NW4L0rMe-2sRlVv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2bkGIk-1}}\nwenddeflinemarkup 
        then 
            whiptail --title "No dquilt!" \\ 
            --msgbox "Dquilt seems not to be configured.\\n \\ 
            See: https://www.debian.org/doc/manuals/maint-guide/modify.html" \\ 
            15 60 
            exit 
        fi 

\LA{}CreateDquilt2~{\nwtagstyle{}\subpageref{NW4L0rMe-LBzSB-1}}\RA{} \nwused{\\{NW4L0rMe-2bkGIk-1}}\nwendcode{}\nwbegindocs{534}\nwdocspar 

If the file \textit{.quiltrc-dpkg} is not found, the script prints an appropriate message and exits. 

Only if the file \textit{ /.quiltrc-dpkg} exists, the following definition can be made. 

\nwenddocs{}\nwbegincode{535}\sublabel{NW4L0rMe-LBzSB-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-LBzSB-1}}}\moddef{CreateDquilt2~{\nwtagstyle{}\subpageref{NW4L0rMe-LBzSB-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2sRlVv-1}}\nwenddeflinemarkup 
    # Definition of dquilt 
        dquilt="quilt --quiltrc=$\{HOME\}/.quiltrc-dpkg" 
    fi
 \} 

\LA{}MakePatches~{\nwtagstyle{}\subpageref{NW4L0rMe-4C4kEn-1}}\RA{} \nwused{\\{NW4L0rMe-2sRlVv-1}}\nwendcode{}\nwbegindocs{536}\nwdocspar 

A selection is made as to whether patches are to be created, edited or removed. These tasks can be executed in any order and also several times. 

\nwenddocs{}\nwbegincode{537}\sublabel{NW4L0rMe-1x4iD7-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1x4iD7-1}}}\moddef{PatchTasks~{\nwtagstyle{}\subpageref{NW4L0rMe-1x4iD7-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2PEcRT-1}}\nwenddeflinemarkup 
function PatchTasks \{ 
    # Called by PatchesTreatment and itself 

    cd $\{GitPath\} 
    if [ ! -d debian/patches ] 
    then 
        # Create patch 
        if whiptail --title "Patches" --yesno "Is a patch necessary?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            CreateDquilt 
            MakePatches 
        else 
            return 
        fi 
    else 
        CreateDquilt 
        PTask=$(whiptail --title "Tasks:" \\ 
        --radiolist "What do you like to do? " 15 60 8 \\ 
        "0" "Display patch files to check or edit them" off \\ 
        "1" "Create additional patch" off \\ 
        "2" "Add another patch to existing patch file" off \\ 
        "3" "Show patch files for deleting" off \\ 
        "4" "Edit debian/patches/series" off \\ 
        "5" "Exit to go on" on --cancel-button "Cancel" 3>&2 2>&1 1>&3) \LA{}PatchTasks1~{\nwtagstyle{}\subpageref{NW4L0rMe-k9dmF-1}}\RA{} \nwused{\\{NW4L0rMe-2PEcRT-1}}\nwendcode{}\nwbegindocs{538}\nwdocspar 

If the \textit{Cancel} button is pressed, the \textit{Exit to go on} task is also executed. Here the value \textit{1}. 

\nwenddocs{}\nwbegincode{539}\sublabel{NW4L0rMe-k9dmF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-k9dmF-1}}}\moddef{PatchTasks1~{\nwtagstyle{}\subpageref{NW4L0rMe-k9dmF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1x4iD7-1}}\nwenddeflinemarkup 

        if [ $? -eq 1 ] 
        then 
            PTask=6 
        fi 

\LA{}PatchTasks2~{\nwtagstyle{}\subpageref{NW4L0rMe-33mfat-1}}\RA{} \nwused{\\{NW4L0rMe-1x4iD7-1}}\nwendcode{}\nwbegindocs{540}\nwdocspar 

In the following section, commands are assigned to the individual tasks. Thereby the variable \textit{PTask} contains a digit from 0 to 4. 

For example, if this variable is assigned the value \textit{0 = Display patch files to check or edit them}, then the \textit{ChangePatches} function is executed. 

In the following \textit{case statement}, \textit{0)} is a value from the list of 0 to 4 against which the contents of the variable \textit{PTask} are compared. 

\nwenddocs{}\nwbegincode{541}\sublabel{NW4L0rMe-33mfat-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-33mfat-1}}}\moddef{PatchTasks2~{\nwtagstyle{}\subpageref{NW4L0rMe-33mfat-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-k9dmF-1}}\nwenddeflinemarkup 
        # Patches treatment 
        case "$PTask" in 
            0) ChangePatches;; # Edit patches 
\LA{}PatchTasks3~{\nwtagstyle{}\subpageref{NW4L0rMe-1VH3Mx-1}}\RA{} \nwused{\\{NW4L0rMe-k9dmF-1}}\nwendcode{}\nwbegindocs{536}\nwdocspar 

Using the \textit{JaxWS} package, we describe how to edit existing patches. 

\subsection{Create patch} \label{subsec:PatchErstellen} 

\nwenddocs{}\nwbegincode{543}\sublabel{NW4L0rMe-1VH3Mx-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1VH3Mx-1}}}\moddef{PatchTasks3~{\nwtagstyle{}\subpageref{NW4L0rMe-1VH3Mx-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-33mfat-1}}\nwenddeflinemarkup 
            1) MakePatches;; # If (more) patches are necessary 
\LA{}PatchTasks4~{\nwtagstyle{}\subpageref{NW4L0rMe-47M0dn-1}}\RA{} \nwused{\\{NW4L0rMe-33mfat-1}}\nwendcode{}\nwbegindocs{538}\nwdocspar 

Now the creation of a patch begins. 

\nwenddocs{}\nwbegincode{545}\sublabel{NW4L0rMe-4C4kEn-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4C4kEn-1}}}\moddef{MakePatches~{\nwtagstyle{}\subpageref{NW4L0rMe-4C4kEn-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-LBzSB-1}}\nwenddeflinemarkup 
function MakePatches \{ 
    # Called by PatchTasks and itself 

    cd $\{GitPath\} 
    cnpr=0 CreateNewPatch 
    if [ $cnpr -ne 0 ] 
    then 
        return 
    fi 

    PatchRunNr=1 

    if whiptail --title "Another patch?" \\ 
    --yesno "Do you want to apply another patch?" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
    then 
        MakePatches 
    fi
 \} 

\LA{}ShowPatches~{\nwtagstyle{}\subpageref{NW4L0rMe-2AhPFn-1}}\RA{} \nwused{\\{NW4L0rMe-LBzSB-1}}\nwendcode{}\nwbegindocs{546}\nwdocspar 

\section{Create new patch} 

\nwenddocs{}\nwbegincode{547}\sublabel{NW4L0rMe-32SiEI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-32SiEI-1}}}\moddef{CreateNewPatch~{\nwtagstyle{}\subpageref{NW4L0rMe-32SiEI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4R2L2m-1}}\nwenddeflinemarkup 
function CreateNewPatch \{ 
    # Called by MakePatches 

    PatchFileName=$(whiptail --title "Patch name" \\ 
--inputbox "Name of the patchfile:" \\ 
--cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3)
    if [ $? -eq 1 ] 
    then
        return 1 
    fi
 

    # Because a user might use blanks in a filename 
    PatchFileName=$(echo $\{PatchFileName\} | sed --expression='s/ /-/g') 
    if [ -z "$\{PatchFileName\}" ] 
    then 
        cnpr=1 
        return 1 
    fi
 

\LA{}CreateNewPatch1~{\nwtagstyle{}\subpageref{NW4L0rMe-3Pt0H1-1}}\RA{} \nwused{\\{NW4L0rMe-4R2L2m-1}}\nwendcode{}\nwbegindocs{548}\nwdocspar 

Now it checks if a file <i0>debian/copyright</i0> exists. 

\nwenddocs{}\nwbegincode{549}\sublabel{NW4L0rMe-3Pt0H1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3Pt0H1-1}}}\moddef{CreateNewPatch1~{\nwtagstyle{}\subpageref{NW4L0rMe-3Pt0H1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-32SiEI-1}}\nwenddeflinemarkup 
    if [ -f debian/patches/$\{PatchFileName\} ] 
    then 
        if ! whiptail --title "Patch exists" \\ 
            --yesno "$\{PatchFileName\} exists already.\\nContinue?" \\ 
            --yes-button "Yes" --no-button "No" 15 60 
        then 
            return 1 
        fi 
    fi
 

\LA{}CreateNewPatch2~{\nwtagstyle{}\subpageref{NW4L0rMe-yJCoZ-1}}\RA{} \nwused{\\{NW4L0rMe-32SiEI-1}}\nwendcode{}\nwbegindocs{550}\nwdocspar 

The command \textit{dquilt new} with the parameter of the patch name creates the first "patch file".  

The following files are created: \begin{verbatim} 
debian/patches/series contains the name of the patch DescriptionNoRegistration.patch 
.pc/applied-patches contains the name of the patch DescriptionNoRegistration.patch 
.pc/DescriptionNoRegistration.patch/ 
.pc/.quilt_patches contains debian/patches 
.pc/.quilt_series contains series 
.pc/.version contains 2 \end{verbatim} 

If patches already exist, make sure that they are named in the correct order in the \textit{debian/patches/series} file.  

\nwenddocs{}\nwbegincode{551}\sublabel{NW4L0rMe-yJCoZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-yJCoZ-1}}}\moddef{CreateNewPatch2~{\nwtagstyle{}\subpageref{NW4L0rMe-yJCoZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3Pt0H1-1}}\nwenddeflinemarkup 
    # Create a new patch file 
    $dquilt new $\{PatchFileName
\} 

# Patch FileToPatch \LA{}CreateNewPatch4~{\nwtagstyle{}\subpageref{NW4L0rMe-26Q7wV-1}}\RA{} \nwused{\\{NW4L0rMe-3Pt0H1-1}}\nwendcode{}\nwbegindocs{552}\nwdocspar 

\section{Select file for patching} 

\nwenddocs{}\nwbegincode{553}\sublabel{NW4L0rMe-4R2L2m-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4R2L2m-1}}}\moddef{FileToPatch~{\nwtagstyle{}\subpageref{NW4L0rMe-4R2L2m-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3ENL7W-1}}\nwenddeflinemarkup 
function FileToPatch \{ 
    # Called by CreateNewPatch PatchTasks and itself
 

    FileSelector $\{GitPath\} # Select the file to be patched 
    File2Patch=$\{selected\} 

    echo "Patch $\{PatchFileName\} because of $\{File2Patch\}" >> $\{log\} 

    # quilt add must get only the filename without 
    # the path of the file to be patched 
    File2pName=$(basename $\{File2Patch\}) 
    $dquilt add -P $\{PatchFileName\} $\{File2pName\} 

    nano --linenumbers --mouse --softwrap $\{File2Patch\} 

    $dquilt refresh $\{PatchFileName\} 

    if whiptail --title "Patch another" \\ 
    --yesno "Do you want to patch another file in $\{PatchFileName\}?" \\ 
    --yes-button "Yes" --no-button "No" --defaultno 15 60 
    then 
        FileToPatch 
    fi
 \} 

\LA{}CreateNewPatch~{\nwtagstyle{}\subpageref{NW4L0rMe-32SiEI-1}}\RA{} \nwused{\\{NW4L0rMe-3ENL7W-1}}\nwendcode{}\nwbegindocs{554}\nwdocspar 

The file to be corrected is selected in a file selection dialogue. 

\nwenddocs{}\nwbegincode{555}\sublabel{NW4L0rMe-3ENL7W-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3ENL7W-1}}}\moddef{FileSelector~{\nwtagstyle{}\subpageref{NW4L0rMe-3ENL7W-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2C9hCO-1}}\nwenddeflinemarkup 
function FileSelector \{ 
    # Called by CreateNewPatch and itself 
    # Dialog to select a file using whiptail
 

    StartPath=$1 
    cd $StartPath 
    txta=($(ls -a))  

    i=0 
    flist='' 
    for element in $\{txta[*]\} 
    do 
        if [ $element == '.' ] 
        then 
            i=$(expr $i + 1) 
            continue 
        fi 
        flist=$flist' '$i' '$\{element\} i=$(expr $i + 1) 
    done  

    sel=$(whiptail --title "Filepicker" \\ 
    --menu "Select:" 15 60 6 $flist 3>&2 2>&1 1>&3) 

    if [ $? -ne 0 ] 
    then 
        return 
    fi  

    # Go back 
    if [ $\{txta[$sel]\} = '..' ] 
    then 
        cd .. 
        StartPath=$(pwd) 
        selected=$\{StartPath\} 
    else 
        selected=$\{StartPath\}"/"$\{txta[$sel]\} 
    fi  

    # The order of the following if-clauses is important 
    if [ -f $\{selected\} ] 
    then 
        if ! whiptail --title "Your choice;" \\ 
        --yesno "$\{selected\}\\nContinue?" --yes-button "Yes" \\ 
        --no-button "No" 15 60 
        then 
            FileSelector $\{StartPath\} 
        fi 
    fi  

    if [ -d $\{selected\} ] 
    then 
        FileSelector $\{selected\} 
    fi
 \} 

\LA{}FileToPatch~{\nwtagstyle{}\subpageref{NW4L0rMe-4R2L2m-1}}\RA{} \nwused{\\{NW4L0rMe-2C9hCO-1}}\nwendcode{}\nwbegindocs{556}\nwdocspar 

If all files are present in this directory, \textit{dquilt add} with the parameter of the file to be edited will include it in \textit{quilt}.  

With this in \textit{.pc/DescriptionNoRegistration.patch/} the mentioned file is added. There it is then available for the first adjustment.  

\nwenddocs{}\nwbegincode{557}\sublabel{NW4L0rMe-26Q7wV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-26Q7wV-1}}}\moddef{CreateNewPatch4~{\nwtagstyle{}\subpageref{NW4L0rMe-26Q7wV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-yJCoZ-1}}\nwenddeflinemarkup PatchHeader \} 

\LA{}CreateDquilt~{\nwtagstyle{}\subpageref{NW4L0rMe-2bkGIk-1}}\RA{} \nwused{\\{NW4L0rMe-yJCoZ-1}}\nwendcode{}\nwbegindocs{558}\nwdocspar 

\nwenddocs{}\nwbegincode{559}\sublabel{NW4L0rMe-47M0dn-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-47M0dn-1}}}\moddef{PatchTasks4~{\nwtagstyle{}\subpageref{NW4L0rMe-47M0dn-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1VH3Mx-1}}\nwenddeflinemarkup 
            2) FileToPatch # Add patch to patch file 
               PatchRunNr=1 
                $dquilt refresh;; \LA{}PatchTasks6~{\nwtagstyle{}\subpageref{NW4L0rMe-2pJ7xb-1}}\RA{} \nwused{\\{NW4L0rMe-1VH3Mx-1}}\nwendcode{}\nwbegindocs{554}\nwdocspar 

\subsection{Delete Patch}  

The following selection deletes existing patches. This is necessary if a previous patch is no longer needed because the corrections have been incorporated by the upstream in the meantime.  

\nwenddocs{}\nwbegincode{561}\sublabel{NW4L0rMe-2pJ7xb-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2pJ7xb-1}}}\moddef{PatchTasks6~{\nwtagstyle{}\subpageref{NW4L0rMe-2pJ7xb-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-47M0dn-1}}\nwenddeflinemarkup 
            3) DeletePatches;; # Delete patches 
\LA{}PatchTasks7~{\nwtagstyle{}\subpageref{NW4L0rMe-22U7aV-1}}\RA{} \nwused{\\{NW4L0rMe-47M0dn-1}}\nwendcode{}\nwbegindocs{562}\nwdocspar 

However, it may be that the previous patch needs to be adapted for the current upstream version. One way to do this is to delete the old patch and create a new one (see chapter \ref{subsec:PatchErstellen}, page \pageref{subsec:PatchErstellen}).  

\nwenddocs{}\nwbegincode{563}\sublabel{NW4L0rMe-4kh8u-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4kh8u-1}}}\moddef{DeletePatches~{\nwtagstyle{}\subpageref{NW4L0rMe-4kh8u-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-Pholv-1}}\nwenddeflinemarkup 
function DeletePatches \{ 
    # Called by PatchTasks and itself  

    cd $\{GitPath\} 
    DeletePatch 
    PatchRunNr=1  

    if whiptail --title "Another patch?" \\ 
    --yesno "Do you want to delete another patch?" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
    then 
        DeletePatches 
    fi
 \} 

\LA{}RebasePQBranch~{\nwtagstyle{}\subpageref{NW4L0rMe-3OX4Ly-1}}\RA{} \nwused{\\{NW4L0rMe-Pholv-1}}\nwendcode{}\nwbegindocs{564}\nwdocspar 

If the question is answered with \textit{No}, the program jumps back to the patch task selection (chapter \ref{sec:NutzungQuilt}, page \pageref{sec:NutzungQuilt}). 

\nwenddocs{}\nwbegincode{565}\sublabel{NW4L0rMe-Pholv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-Pholv-1}}}\moddef{DeletePatch~{\nwtagstyle{}\subpageref{NW4L0rMe-Pholv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3aoew0-1}}\nwenddeflinemarkup 
function DeletePatch \{ 
    # Called by DeletePatches  

    ShowPatches "delete" # String will be found in $\{1\} 

    if [ -z "$\{PatchFileName\}" ] 
    then 
        PatchTasks 
    fi  

    less --LINE-NUMBERS $\{GitPath\}/debian/patches/$\{PatchFileName\} 

    if whiptail --title "Delete this patch?" \\ 
    --yesno "Do you really want to delete $\{PatchFileName\}?" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
    then 
        $dquilt delete -r --backup $\{PatchFileName\} 

        if whiptail --title "Delete backup file?" \\ 
        --yesno "Do you want to delete the backup file, too" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            rm $\{GitPath\}/debian/patches/$\{PatchFileName\}~ 
        fi 
    fi
 \} 

\LA{}DeletePatches~{\nwtagstyle{}\subpageref{NW4L0rMe-4kh8u-1}}\RA{} \nwused{\\{NW4L0rMe-3aoew0-1}}\nwendcode{}\nwbegindocs{566}\nwdocspar 

In order to use the \textit{gbp pq} function, it must be set up beforehand (chapter \ref{subsubsec:BeschreibungPQ}, page \pageref{subsubsec:BeschreibungPQ}). 

\nwenddocs{}\nwbegincode{567}\sublabel{NW4L0rMe-22U7aV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-22U7aV-1}}}\moddef{PatchTasks7~{\nwtagstyle{}\subpageref{NW4L0rMe-22U7aV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2pJ7xb-1}}\nwenddeflinemarkup 
               # Edit series 
            4) nano --linenumbers --mouse --softwrap debian/patches/series;;
\LA{}PatchTasks8~{\nwtagstyle{}\subpageref{NW4L0rMe-3ZQwb5-1}}\RA{} \nwused{\\{NW4L0rMe-2pJ7xb-1}}\nwendcode{}\nwbegindocs{568}\nwdocspar 

\subsection{Restore the initial state}  

If a patch has been created, edited or deleted with \textit{quilt}, exiting the function will remove the patches from the upstream code and return it to its original state. This is done with \textit{quilt pop -a}. This means that all applied patches are removed. 

\nwenddocs{}\nwbegincode{569}\sublabel{NW4L0rMe-3ZQwb5-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3ZQwb5-1}}}\moddef{PatchTasks8~{\nwtagstyle{}\subpageref{NW4L0rMe-3ZQwb5-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-22U7aV-1}}\nwenddeflinemarkup 
           5) if [ $\{PatchRunNr\} -eq 1 ] 
              then 
                  # remove all patches and return the source 
                  # to its original state 
                  $\{dquilt\} pop -a 
                  PatchRunNr=0 
              fi 
              # If debian/patches/series is empty, 
              # delete directory debian/patches 
              if ! [ -s debian/patches/series ] 
              then 
                  rm debian/patches/series 
                  rmdir debian/patches 
              fi 
              return;; 
        esac 
    fi  

PatchTasks \} 

\LA{}GitBranch2RecentBranch~{\nwtagstyle{}\subpageref{NW4L0rMe-2Rvw4e-1}}\RA{} \nwused{\\{NW4L0rMe-22U7aV-1}}\nwendcode{}\nwbegindocs{570}\nwdocspar 

So it is possible for Quilt to always create the diff between the previous version and the current version. After that the change is made. The registration information is removed. With \textit{dquilt refresh} one creates the diff to document the change. With \textit{dquilt header -e} now the description of the change is created in the \$EDITOR.  

\nwenddocs{}\nwbegincode{571}\sublabel{NW4L0rMe-2C9hCO-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2C9hCO-1}}}\moddef{PatchHeader~{\nwtagstyle{}\subpageref{NW4L0rMe-2C9hCO-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3JXgFA-1}}\nwenddeflinemarkup 
function PatchHeader \{ 
    # Called by CreateNewPatch EditPatch  

    PatchDescription=$(whiptail --title "Describe patch!" \\ 
    --inputbox "Description:\\n\\n" \\ 
    --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3) 
    if [ -z "$\{PatchDescription\}" ] 
    then 
        echo "Please insert the description of the patch!" 
        read PatchDescription 
    fi 
    if whiptail --title "Describe patch!" --yesno "Forwarded:?" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
    then 
        PatchForwarded="Yes" 
    else 
        PatchForwarded="No" 
    fi  

    DEBValues 
    if [ -z $\{Uploaders\} ] 
    then 
        PatchAuthor=$\{Maintainer\} 
    else 
        PatchAuthor=$\{Uploaders\} 
    fi  

    PatchUpdate=$(date +  

%Y'-'%m'-'%d)
    touch $\{PatchFileName\}.header 
    echo "Description: "$\{PatchDescription\} >> $\{PatchFileName\}.header 
    echo "Forwarded: "$\{PatchForwarded\} >> $\{PatchFileName\}.header 
    echo "Author: "$\{PatchAuthor\} >> $\{PatchFileName\}.header 
    echo "Last-Update: "$\{PatchUpdate\} >> $\{PatchFileName\}.header  

    $dquilt header -a < $\{PatchFileName\}.header 
    rm $\{PatchFileName\}.header
 \} 

\LA{}FileSelector~{\nwtagstyle{}\subpageref{NW4L0rMe-3ENL7W-1}}\RA{} \nwused{\\{NW4L0rMe-3JXgFA-1}}\nwendcode{}\nwbegindocs{572}\nwdocspar 

Here is an example of this:  

\begin{verbatim} Description: removed registration of license Forwarded: No Author: Mechtilde Stehmann <ooo@mechtilde.de> Last-Update: 2014-05-18 \end{verbatim} 

\section{Patch selection} \label{sec:ChoosePatches} 

\nwenddocs{}\nwbegincode{573}\sublabel{NW4L0rMe-2AhPFn-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2AhPFn-1}}}\moddef{ShowPatches~{\nwtagstyle{}\subpageref{NW4L0rMe-2AhPFn-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4C4kEn-1}}\nwenddeflinemarkup 
function ShowPatches \{ 
    # Called by EditPatch DeletePatch and itself 
    actionstr=$\{1\} 

    patchfilesa=$(ls debian/patches) 
    i=0; slct='' 
    for element in $\{patchfilesa[*]\} 
    do 
        if [ $\{element\} != 'series' ] 
        then 
            slct=$slct' '$i' '$\{element\}' off ' 
            newPFA[$i]=$\{element\} 
            i=$(expr $i + 1) 
        fi 
    done  

    PatchFileNo=$(whiptail --title "Select patch" \\ 
    --radiolist "Select one of these patches:" \\ 
    --cancel-button "Cancel" 15 60 8 \\ 
    $slct 3>&2 2>&1 1>&3) 

    if [ "$\{actionstr\}" = "check" ] 
    then 
        # Code for PQMigation 
        if [ -z "$\{PatchFileNo\}" ] 
        then 
            return 
        fi 
        PatchFileName=$\{newPFA[$PatchFileNo]\} 
        less --LINE-NUMBERS debian/patches/$\{PatchFileName\} 
        ShowPatches "check" 
    else 
        if [ -z "$\{PatchFileNo\}" ] 
        then 
            PatchFileName="" 
    else 
        PatchFileName=$\{newPFA[$PatchFileNo]\} 
        if ! whiptail --title "$\{PatchFileNo\}" \\ 
        --yesno "Do you want to $\{actionstr\} $\{PatchFileName\}?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            ShowPatches 
        fi 
    fi 
fi
 \} 

\LA{}EditPatch~{\nwtagstyle{}\subpageref{NW4L0rMe-1PELy0-1}}\RA{} \nwused{\\{NW4L0rMe-4C4kEn-1}}\nwendcode{}\nwbegindocs{574}\nwdocspar 

\section{Editing Patch} 

\nwenddocs{}\nwbegincode{575}\sublabel{NW4L0rMe-1PELy0-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1PELy0-1}}}\moddef{EditPatch~{\nwtagstyle{}\subpageref{NW4L0rMe-1PELy0-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2AhPFn-1}}\nwenddeflinemarkup 
function EditPatch \{ 
    # Called by ChangePatches  

    ShowPatches "edit" # String will be found in $\{1\} 

    if [ -z "$\{PatchFileName\}" ] 
    then 
        return 1 
    else 
        PatchRunNr=1 
    fi  

    $dquilt pop $\{PatchFileName\} 
    nano --linenumbers --mouse --softwrap debian/patches/$\{PatchFileName\} 
    $dquilt refresh  

    if whiptail --title "New Patch Header" \\ 
    --yesno "Do you want to create a new patch header?" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
    then 
        PatchHeader 
    fi  

    while $dquilt push 
    do 
        $dquilt refresh 
    done \} 

\LA{}ChangePatches~{\nwtagstyle{}\subpageref{NW4L0rMe-3aoew0-1}}\RA{} \nwused{\\{NW4L0rMe-2AhPFn-1}}\nwendcode{}\nwbegindocs{576}\nwdocspar 

\section{Modify Patch} 

\nwenddocs{}\nwbegincode{577}\sublabel{NW4L0rMe-3aoew0-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3aoew0-1}}}\moddef{ChangePatches~{\nwtagstyle{}\subpageref{NW4L0rMe-3aoew0-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1PELy0-1}}\nwenddeflinemarkup 
function ChangePatches \{ 
    # Called by PatchTasks and itself  

    cd $\{GitPath\} 
    EditPatch  

    if whiptail --title "Another patch?" \\ 
    --yesno "Do you want to edit another patch?" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
    then 
         ChangePatches 
    fi
 \} 

\LA{}DeletePatch~{\nwtagstyle{}\subpageref{NW4L0rMe-Pholv-1}}\RA{} \nwused{\\{NW4L0rMe-1PELy0-1}}\nwendcode{}\nwbegindocs{578}\nwdocspar 

\chapter{Building} \label{chap:Bauen} 

The actual building of the binary packages is done in a \textit{chroot}. This mainly involves checking that all the required build dependencies are listed in the \textit{debian/control} file (chapter \ref{subsec:DebianControl}, page \pageref{subsec:DebianControl}) and are already available as \texttt{Debian} packages. This ensures that the package can also be built reproducibly by the FTP masters without access to further network resources. 

\section{debian/changelog} \label{sec:DebianChangelog} 

Before the actual build, the \textit{debian/changelog} file is displayed for adjustment. 

\nwenddocs{}\nwbegincode{579}\sublabel{NW4L0rMe-4e7uxk-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4e7uxk-1}}}\moddef{BuildNewRevision6~{\nwtagstyle{}\subpageref{NW4L0rMe-4e7uxk-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-361nEZ-1}}\nwenddeflinemarkup 
    # Check debian/changelog 
    # - includes creating changelog using gbp dch 
    DisplayDebianChangelog 

\LA{}MovingGbpConf~{\nwtagstyle{}\subpageref{NW4L0rMe-1hJP4x-1}}\RA{} \nwused{\\{NW4L0rMe-361nEZ-1}}\nwendcode{}\nwbegindocs{580}\nwdocspar 

First, the script checks if a file \textit{debian/changelog} already exists. If this is the case, this file is displayed and queried if it is correct. 

Otherwise it is created with \textit{gbp dch}. 

\nwenddocs{}\nwbegincode{581}\sublabel{NW4L0rMe-2lL6hV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2lL6hV-1}}}\moddef{DisplayDebianChangelog~{\nwtagstyle{}\subpageref{NW4L0rMe-2lL6hV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-f58lA-1}}\nwenddeflinemarkup 
function DisplayDebianChangelog \{ 
    # Called by BuildNewRevision 

    newChangelog=0 
    if [ -f debian/changelog ] 
    then 
        less --LINE-NUMBERS debian/changelog 
        if ! whiptail --title "Changelog ok?" --defaultno \\ 
        --yesno "Is debian/changelog ok?" --yes-button "Yes" \\ 
        --no-button "No" 15 60 
        then 
            newChangelog=1 
        fi 
    else 
        newChangelog=1 
    fi 

\LA{}DisplayDebianChangelog1~{\nwtagstyle{}\subpageref{NW4L0rMe-In4cP-1}}\RA{} \nwused{\\{NW4L0rMe-f58lA-1}}\nwendcode{}\nwbegindocs{582}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ChangelogOK.png} \caption{Debian-Changelog OK?} \end{figure} 

If the question about the correctness of the changelog is answered in the affirmative, the process continues with a possible move of the \textit{gbp} configuration file (chapter \ref{sec:MovingGbpconfFile}, page \pageref{sec:MovingGbpconfFile}). Otherwise, this file is displayed in the editor. 

Pay special attention to the version and revision designation in the first line of the \textit{debian/changelog} file. This applies mainly when files have been excluded from the upstream source code (chapter \ref{subsubsec:BenamungPakete}, page \pageref{subsubsec:BenamungPakete}.  

For a non-maintainer upload (NMU), the first entry expected after the version information is the entry. 

\begin{verbatim} * Non-maintainer upload \end{verbatim} 

 

Also for \textit{dquilt} the file \textit{.bashrc} has to be added. (Chapter <n0>, page <n1>.  

\nwenddocs{}\nwbegincode{583}\sublabel{NW4L0rMe-In4cP-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-In4cP-1}}}\moddef{DisplayDebianChangelog1~{\nwtagstyle{}\subpageref{NW4L0rMe-In4cP-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2lL6hV-1}}\nwenddeflinemarkup 
    # Check whether d/control exists without a comment in line 1 
    if [ $\{newChangelog\} -eq 1 ] 
    then
        if ! [ -f debian/control ] 
        then 
            DebianControlTemplate 
        else 
            cat --number debian/conrol | grep '1' | grep '#' > /dev/null 
            if [ $? -eq 0 ] 
        then 
            DebianControlTemplate 
        fi 
    fi
    # creating changelog using gbp dch  

AddVersionNumber \LA{}DisplayDebianChangelog3~{\nwtagstyle{}\subpageref{NW4L0rMe-1wPTBV-1}}\RA{} \nwused{\\{NW4L0rMe-2lL6hV-1}}\nwendcode{}\nwbegindocs{584}\nwdocspar 

\subsection{Insert version number} \label{subsec:Versionsbezeichnung} 

\textit{gbp dch} requires the current version name to be specified. If the corresponding variable does not contain this value, you will be prompted to (manually) enter this version designation.  

In contrast, \textit{dch} can create the next higher version designation with \textit{dch --increment}. This can also be done explicitly with \textit{dch -{}-newversion <version>}. \footnote{New Maintainer Guide, Chap. 8.1\cite{maint-guide}} 

The program script uses the second option.  

\nwenddocs{}\nwbegincode{585}\sublabel{NW4L0rMe-35jY5q-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-35jY5q-1}}}\moddef{AddVersionNumber~{\nwtagstyle{}\subpageref{NW4L0rMe-35jY5q-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2jvbx-1}}\nwenddeflinemarkup 
function AddVersionNumber \{ 
    # Called by DisplayDebianChangelog 
    if [ -z "$\{Version1\}" ] 
    then 
        RecentIdentifier 
    fi 
 

\LA{}AddVersionNumber1~{\nwtagstyle{}\subpageref{NW4L0rMe-2gBHGD-1}}\RA{} \nwused{\\{NW4L0rMe-2jvbx-1}}\nwendcode{}\nwbegindocs{586}\nwdocspar 

First it is checked which version designation is entered in the first line of the file \textit{debian/changelog}. It is queried whether a version designation found there is to be taken over. If the file \textit{debian/changelog} does not exist, the version number is queried (see page \pageref{par:InsertIdentifier}).  

\nwenddocs{}\nwbegincode{587}\sublabel{NW4L0rMe-1bsH0l-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1bsH0l-1}}}\moddef{RecentIdentifier~{\nwtagstyle{}\subpageref{NW4L0rMe-1bsH0l-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3pAgV8-1}}\nwenddeflinemarkup 
function RecentIdentifier \{ 
    # Called by AddVersionNumber ForceOrig 
    # Takes version number from debian/changelog, if it exists  

    if [ -f $\{GitPath\}/debian/changelog ] 
    then 
        firstLine=$(grep --line-number 'urgency=' $\{GitPath\}/debian/changelog | grep '^1:') 
        whiptail --title "First line:" \\ 
        --msgbox "First line of debian/changelog;\\n$\{firstLine\}" 15 60 
        recentId=$(echo $\{firstLine\} | sed --expression='s/^.*(//' | \\ 
        sed --expression='s/).*//') 
\LA{}RecentIdentifier2~{\nwtagstyle{}\subpageref{NW4L0rMe-4Wup5B-1}}\RA{} \nwused{\\{NW4L0rMe-3pAgV8-1}}\nwendcode{}\nwbegindocs{588}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/FirstLineChangelog.png} \caption{Display the first line of the \textit{debian/changelog} file.} \end{figure} 

\nwenddocs{}\nwbegincode{589}\sublabel{NW4L0rMe-4Wup5B-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4Wup5B-1}}}\moddef{RecentIdentifier2~{\nwtagstyle{}\subpageref{NW4L0rMe-4Wup5B-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1bsH0l-1}}\nwenddeflinemarkup 
        whiptail --title "Recent identifier" \\ 
        --msgbox "Recent identifier is $\{recentId\}" 15 60    

\LA{}RecentIdentifier3~{\nwtagstyle{}\subpageref{NW4L0rMe-2jvbx-1}}\RA{} \nwused{\\{NW4L0rMe-1bsH0l-1}}\nwendcode{}\nwbegindocs{590}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/RecentId.png} \caption{Recent version} \end{figure} 

\nwenddocs{}\nwbegincode{591}\sublabel{NW4L0rMe-2jvbx-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2jvbx-1}}}\moddef{RecentIdentifier3~{\nwtagstyle{}\subpageref{NW4L0rMe-2jvbx-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4Wup5B-1}}\nwenddeflinemarkup 
        if [ -n "$\{recentId\}" ] 
        then 
            Version1=$\{recentId\} 
        fi 
    else 
        InsertIdentifier 
    fi
 \} 

\LA{}AddVersionNumber~{\nwtagstyle{}\subpageref{NW4L0rMe-35jY5q-1}}\RA{} \nwused{\\{NW4L0rMe-4Wup5B-1}}\nwendcode{}\nwbegindocs{592}\nwdocspar 

After that, it continues with control questions.  

\nwenddocs{}\nwbegincode{593}\sublabel{NW4L0rMe-2gBHGD-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2gBHGD-1}}}\moddef{AddVersionNumber1~{\nwtagstyle{}\subpageref{NW4L0rMe-2gBHGD-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-35jY5q-1}}\nwenddeflinemarkup 
    revisionflag=$(echo $\{Version1\} | grep --count '\\-[0-9]') 
    if [ $\{revisionflag\} -eq 0 ] 
    then 
        if ! whiptail --title "Identifier of the version:" \\ 
        --defaultno --yesno "$\{Version1\} contains no revision number.\\n \\ 
        Is it a native package?" --yes-button "Yes" --no-button "No" 15 60 
        then 
            InsertIdentifier 
            if ! whiptail --title "Identifier of the version:" \\ 
            --defaultno --yesno "Is $\{Version1\} the right identifier?" \\ 
            --yes-button "Yes" --no-button "No" 15 60 
            then 
                InsertIdentifier 
            fi 
        fi 
    else 
        if ! whiptail --title "Identifier of the version:" \\ 
        --defaultno --yesno "Is $\{Version1\} the right identifier?" \\ 
        --yes-button "Yes" --no-button "No" 15 60 
        then 
            InsertIdentifier 
        fi
    fi
    echo "Message from AddVersionNumber: identifier="$\{Version1\} >> $\{log
\} \} 

\LA{}DebianJavabuildTemplate~{\nwtagstyle{}\subpageref{NW4L0rMe-f58lA-1}}\RA{} \nwused{\\{NW4L0rMe-35jY5q-1}}\nwendcode{}\nwbegindocs{594}\nwdocspar \paragraph*{} \label{par:InsertIdentifier} 

In the \textit{InsertIdentifier} function, first the complete identifier of the package including the verion name of the revision is requested.  

\nwenddocs{}\nwbegincode{595}\sublabel{NW4L0rMe-3pAgV8-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3pAgV8-1}}}\moddef{InsertIdentifier~{\nwtagstyle{}\subpageref{NW4L0rMe-3pAgV8-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2Zqh7t-1}}\nwenddeflinemarkup 
function InsertIdentifier \{ 
    # Called by AddVersionNumber Recentidentifier 
    RIdentifier=$\{Version1\} 
    Version1=$(whiptail --title "Identifier" \\ 
    --inputbox "Recent identifier: $\{RIdentifier\}\\n \\ 
    Please insert the whole identifier of the package\\n \\ 
    (including revision version):" \\ 
    --nocancel 15 60 3>&2 2>&1 1>&3) \} 

\LA{}RecentIdentifier~{\nwtagstyle{}\subpageref{NW4L0rMe-1bsH0l-1}}\RA{} \nwused{\\{NW4L0rMe-2Zqh7t-1}}\nwendcode{}\nwbegindocs{596}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/IdentifierVersion.png} \caption{Query the identifier} \end{figure} 

The presence of a tilde is used to check whether it is a snapshot version. If this is the case, the \textit{gbp dch} command is also given the \textit{-{}-dch-opt=-{}-force-bad-version} option and this is displayed.  

This causes the \textit{debchange} program not to stop if the new version is smaller than the current one. This is especially useful when backporting.  

\nwenddocs{}\nwbegincode{597}\sublabel{NW4L0rMe-1wPTBV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1wPTBV-1}}}\moddef{DisplayDebianChangelog3~{\nwtagstyle{}\subpageref{NW4L0rMe-1wPTBV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-In4cP-1}}\nwenddeflinemarkup 
        SnapshotFlag=$(echo $\{Version1\} | grep --count '~') 
        if [ $\{SnapshotFlag\} -eq 0 ] 
        then 
            DchAdd='' 
        else 
            DchAdd=' --dch-opt=--force-bad-version' 
            whiptail --title "Additional option to gbp dch:" \\ 
            --msgbox "Option: $\{DchAdd\}" 15 60 
        fi 
\LA{}DisplayDebianChangelog4~{\nwtagstyle{}\subpageref{NW4L0rMe-3y9lo5-1}}\RA{} \nwused{\\{NW4L0rMe-In4cP-1}}\nwendcode{}\nwbegindocs{598}\nwdocspar \begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/AdditionalOption.png} \caption{More options for \textit{dch}} \end{figure} 

The \textit{debian/changelog} file is created by the program script using \textit{gbp dch}. Always \textit{gbp dch} is called with the options \textit{-{}-verbose}, \textit{-{}-debian-branch=} and \textit{-{}-new-version=}.  

In case \textit{gbp dch} fails, an error message is printed. Otherwise, the \textit{debian/changelog} file is displayed for editing.  

\nwenddocs{}\nwbegincode{599}\sublabel{NW4L0rMe-3y9lo5-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3y9lo5-1}}}\moddef{DisplayDebianChangelog4~{\nwtagstyle{}\subpageref{NW4L0rMe-3y9lo5-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1wPTBV-1}}\nwenddeflinemarkup 
        gbp dch --verbose --debian-branch=$\{RecentBranch\} \\ 
        --new-version=$\{Version1\}$\{DchAdd\} 
        if [ $? -ne 0 ] 
        then 
            FailureNotice 
        fi 
        nano --linenumbers --mouse --softwrap debian/changelog 
    fi
 \} 

\LA{}CmeFix~{\nwtagstyle{}\subpageref{NW4L0rMe-1LZU6O-1}}\RA{} \nwused{\\{NW4L0rMe-1wPTBV-1}}\nwendcode{}\nwbegindocs{600}\nwdocspar 

For the \textit{tbsync} package, the following command line resulted for building a bug fix for Buster, which was too currently the stable release.  

\begin{verbatim} gbp dch --verbose --debian-branch=debian/buster 
\--new-version=1.16-1~deb10u1 --dch-opt=--force-bad-version \end{verbatim} 

The following is to be said about the background:  

With \textit{-{}-dch-opt=\textless{}dch-option\textgreater{}} options for \textit{debchange} (\textit{dch}) can be passed to the \textit{gbp dch} command. It should be noted that \textit{dbp dch} calls the \textit{dch} program multiple times and passes the option on each call. Therefore, not all \textit{dch} options are useful at this point. Also, options may conflict with options passed by \textit{gbp dch} by itself.  

\section{Moving the \textit{gbp} configuration file} \label{sec:MovingGbpconfFile} 

If a special configuration file for \textit{git-buildpackage} is to be used for the package to be built (chapter \ref{sec:GbpConf}, page \pageref{sec:GbpConf}), it is published in the directory \textit{debian/}.  

If such a configuration file was created for \textit{gbp import-orig} when the source code was (initially) downloaded (chapter \ref{subsec:GbpConf}, page \pageref{subsec:GbpConf}), it must be moved to the \textit{debian/} directory if necessary. This is done by the \textit{MovingGbpConfFile} function.  

\nwenddocs{}\nwbegincode{601}\sublabel{NW4L0rMe-1hJP4x-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1hJP4x-1}}}\moddef{MovingGbpConf~{\nwtagstyle{}\subpageref{NW4L0rMe-1hJP4x-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4e7uxk-1}}\nwenddeflinemarkup 
    MovingGbpConfFile 
\LA{}Preparations~{\nwtagstyle{}\subpageref{NW4L0rMe-1hm6rL-1}}\RA{} \nwused{\\{NW4L0rMe-4e7uxk-1}}\nwendcode{}\nwbegindocs{600}\nwdocspar 

If a \textit{gbp.conf} file exists in the \textit{.git/} directory, but none exists in the \textit{debian/} directory, this file is moved to \textit{debian/}.  

If there are corresponding files in both directories, the file to be published can be selected.  

\nwenddocs{}\nwbegincode{603}\sublabel{NW4L0rMe-3J7Lxr-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3J7Lxr-1}}}\moddef{MovingGbpConfFile~{\nwtagstyle{}\subpageref{NW4L0rMe-3J7Lxr-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3RcwGz-1}}\nwenddeflinemarkup 
function MovingGbpConfFile \{ 
    # Called by BuildNewRevision  

    # .git/gbp.conf exists, but not debian/gbp.conf 
    # Move gbp.conf from .git/ to debian/ 
    if [ -f $\{GitPath\}/.git/gbp.conf -a ! -f $\{GitPath\}/debian/gbp.conf ] 
    then 
        mv -iv $\{GitPath\}/.git/gbp.conf $\{GitPath\}/debian 
    fi 
    # There is a gbp.conf in both directories 
    if [ -f $\{GitPath\}/.git/gbp.conf -a -f $\{GitPath\}/debian/gbp.conf ] 
    then 
        TwoConfFilesFound 
    fi
 \} 

\LA{}DebianBranch4Import~{\nwtagstyle{}\subpageref{NW4L0rMe-1O5B2o-1}}\RA{} \nwused{\\{NW4L0rMe-3RcwGz-1}}\nwendcode{}\nwbegindocs{604}\nwdocspar 

The function \textit{TwoConfFilesFound} which enables this selection is described in chapter \ref{subsec:GbpConf}.  

\section{Set parameters for \textit{gbp buildpackage}.} \label{sec:preparations} 

Before building the packages can begin, parameters for \textit{gbp buildpackage} must first be determined and set.  

\nwenddocs{}\nwbegincode{605}\sublabel{NW4L0rMe-1hm6rL-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1hm6rL-1}}}\moddef{Preparations~{\nwtagstyle{}\subpageref{NW4L0rMe-1hm6rL-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1hJP4x-1}}\nwenddeflinemarkup 
     # Preparations for gbp buildpackage 
     AskDist # Ensure that RecentBranch has a value 
\LA{}Preparations1~{\nwtagstyle{}\subpageref{NW4L0rMe-2IReVA-1}}\RA{} \nwused{\\{NW4L0rMe-1hJP4x-1}}\nwendcode{}\nwbegindocs{606}\nwdocspar 

\subsection{Identify Git branch and distribution} \label{subsec:IdentifyDist} 

In order to build in the right Git branch and with the right distribution, these parameters are determined and displayed. They can also still be adjusted.  

First, the \textit{IdentifyBranches} function is used to determine the existing \texttt{Git} branches (chapter \ref{subsec:IdentifyBranches}, page \pageref{subsec:IdentifyBranches}). 

\nwenddocs{}\nwbegincode{607}\sublabel{NW4L0rMe-2sUMSc-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2sUMSc-1}}}\moddef{AskDist~{\nwtagstyle{}\subpageref{NW4L0rMe-2sUMSc-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-27Aw5E-1}}\nwenddeflinemarkup 
function AskDist \{ 
    # Called by BuildNewRevision PrepareUploading LastQuestionsBeforeBuild  

    IdentifyBranches 
    ba=($bl) 
    for element in $\{ba[*]\} 
    do 
        # rb=$(echo $\{element\} | grep --count '^x_') 
        # if [ $rb -ge 1 ] 
        if echo $\{element\} | grep --quiet '^x_' 
        then 
            CurrentBranch=$(echo $\{element\} | sed --expression='s/^x_//') 
        fi 
    done  

\LA{}AskDist0~{\nwtagstyle{}\subpageref{NW4L0rMe-1FocXF-1}}\RA{} \nwused{\\{NW4L0rMe-27Aw5E-1}}\nwendcode{}\nwbegindocs{608}\nwdocspar 


First, \textit{-z} is used to check whether the variable \textit{RecentBranch} is empty. In this case the function \textit{GitBranch2RecentBranch} (chapter \ref{subsec:GitBranch2RecentBranch}, page \pageref{subsec:GitBranch2RecentBranch}) is called. 

Otherwise, it checks if the name of the current branch corresponds to the value of the variable \textit{RecentBranch}.If this is not the case, a hint is given and the user can select one of the two branches. 

\nwenddocs{}\nwbegincode{609}\sublabel{NW4L0rMe-1FocXF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1FocXF-1}}}\moddef{AskDist0~{\nwtagstyle{}\subpageref{NW4L0rMe-1FocXF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2sUMSc-1}}\nwenddeflinemarkup 
    if [ -z "$\{RecentBranch\}" ] 
    then 
        GitBranch2RecentBranch 
    else 
        if [ "$\{RecentBranch\}" != "$\{CurrentBranch\}" ] 
        then 
            Msg="Branch according to git: "$\{CurrentBranch\}",\\n \\ 
            branch according to "$\{ConfigPath\}$\{OrigName\}": "$\{RecentBranch\} 
            whiptail --title "There is something wrong!" --msgbox "$\{Msg\}" 15 60
\LA{}AskDist1~{\nwtagstyle{}\subpageref{NW4L0rMe-3FZjFN-1}}\RA{} \nwused{\\{NW4L0rMe-2sUMSc-1}}\nwendcode{}\nwbegindocs{610}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/SomethingWrong.png} \caption{Something is going wrong!} \end{figure} 

\nwenddocs{}\nwbegincode{611}\sublabel{NW4L0rMe-3FZjFN-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3FZjFN-1}}}\moddef{AskDist1~{\nwtagstyle{}\subpageref{NW4L0rMe-3FZjFN-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1FocXF-1}}\nwenddeflinemarkup 
            WishedBranch=$(whiptail --title "Choose branch:" \\ 
            --radiolist "Which branch do you want to work with? " \\ 
            --cancel-button "Cancel" 15 60 2 \\ 
            "0" "$\{RecentBranch\}" off \\ 
            "1" "$\{CurrentBranch\}" off 3>&2 2>&1 1>&3) \LA{}AskDist2~{\nwtagstyle{}\subpageref{NW4L0rMe-18R39Z-1}}\RA{} \nwused{\\{NW4L0rMe-1FocXF-1}}\nwendcode{}\nwbegindocs{612}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ChooseBranch.png} \caption{Selection of the branch} \end{figure} 

\nwenddocs{}\nwbegincode{613}\sublabel{NW4L0rMe-18R39Z-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-18R39Z-1}}}\moddef{AskDist2~{\nwtagstyle{}\subpageref{NW4L0rMe-18R39Z-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3FZjFN-1}}\nwenddeflinemarkup 
            if [ $\{WishedBranch\} -eq 0 ] 
            then 
                git checkout $\{RecentBranch\} 
            else 
                GitBranch2RecentBranch 
            fi 
       fi 
    fi  

    echo "Notice from AskDist: The branch is "$\{RecentBranch\} >> $\{log\} 
    va=$(grep --count $\{RecentBranch\}_Dist $\{ConfigPath\}$\{OrigName\}) 
    if [ $va -eq 1 ] 
    then 
        bName=$\{RecentBranch\} 
        Search4Dist 
        RecentBranchD=$\{va\} 
    elif [ $va -gt 1 ] 
    then 
        nano $\{ConfigPath\}$\{OrigName\} 
        AskDist  

\LA{}AskDist5~{\nwtagstyle{}\subpageref{NW4L0rMe-2Zqh7t-1}}\RA{} \nwused{\\{NW4L0rMe-3FZjFN-1}}\nwendcode{}\nwbegindocs{614}\nwdocspar 

\nwenddocs{}\nwbegincode{615}\sublabel{NW4L0rMe-2Zqh7t-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2Zqh7t-1}}}\moddef{AskDist5~{\nwtagstyle{}\subpageref{NW4L0rMe-2Zqh7t-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-18R39Z-1}}\nwenddeflinemarkup 
    else 
        Distro4Branch 
    fi  

    if [ -z "$\{RecentBranchD\}" ] 
    then 
        RecentBranchD="sid" 
    fi 
    echo "Notice from AskDist: The distribution is "$\{RecentBranchD\} >> $\{log
\} \} 

\LA{}InsertIdentifier~{\nwtagstyle{}\subpageref{NW4L0rMe-3pAgV8-1}}\RA{} \nwused{\\{NW4L0rMe-18R39Z-1}}\nwendcode{}\nwbegindocs{616}\nwdocspar 

\nwenddocs{}\nwbegincode{617}\sublabel{NW4L0rMe-2IReVA-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2IReVA-1}}}\moddef{Preparations1~{\nwtagstyle{}\subpageref{NW4L0rMe-2IReVA-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1hm6rL-1}}\nwenddeflinemarkup 
    echo "Notice from BuildNewRevision: Branch is "$\{RecentBranch\} >> $\{log\} 
    whiptail --title "Please check!" \\ 
    --yesno "The git branch is $\{RecentBranch\}" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
    rbq=$? 
\LA{}Preparations2~{\nwtagstyle{}\subpageref{NW4L0rMe-4Rr7dU-1}}\RA{} \nwused{\\{NW4L0rMe-1hm6rL-1}}\nwendcode{}\nwbegindocs{618}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ReleaseBranch.png} \caption{ Release-Branch} \end{figure} 

If the question whether the displayed Git branch is the correct one is answered in the negative, the applicable branch can be selected (chapter \ref{sec:AuswahlGitBranch}, page \pageref{sec:AuswahlGitBranch}).  

\nwenddocs{}\nwbegincode{619}\sublabel{NW4L0rMe-4Rr7dU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4Rr7dU-1}}}\moddef{Preparations2~{\nwtagstyle{}\subpageref{NW4L0rMe-4Rr7dU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2IReVA-1}}\nwenddeflinemarkup 
    if [ $rbq -ne 0 ] 
    then 
        SelectBranch 
    fi \LA{}Preparations3~{\nwtagstyle{}\subpageref{NW4L0rMe-92BMq-1}}\RA{} \nwused{\\{NW4L0rMe-2IReVA-1}}\nwendcode{}\nwbegindocs{620}\nwdocspar 

If the question whether the displayed distribution is the correct one is answered in the negative, the applicable distribution can be selected (chapter \ref{subsec:Distro4Branch}, page \pageref{subsec:Distro4Branch}).  

\nwenddocs{}\nwbegincode{621}\sublabel{NW4L0rMe-92BMq-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-92BMq-1}}}\moddef{Preparations3~{\nwtagstyle{}\subpageref{NW4L0rMe-92BMq-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4Rr7dU-1}}\nwenddeflinemarkup 
    if ! whiptail --title "Please check!" \\ 
    --yesno "The distribution is $\{RecentBranchD\}" --yes-button "Yes" \\ 
    --no-button "No" 15 60 
\LA{}Preparation4~{\nwtagstyle{}\subpageref{NW4L0rMe-4KEAEt-1}}\RA{} \nwused{\\{NW4L0rMe-4Rr7dU-1}}\nwendcode{}\nwbegindocs{622}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/RecentBranchDistribution.png} \caption{Release branch of the distribution} \end{figure} 

\nwenddocs{}\nwbegincode{623}\sublabel{NW4L0rMe-4KEAEt-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4KEAEt-1}}}\moddef{Preparation4~{\nwtagstyle{}\subpageref{NW4L0rMe-4KEAEt-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-92BMq-1}}\nwenddeflinemarkup 

    then 
        RecentBranchD="" 
        Distro4Branch 
    fi  

    echo "Notice from BuildNewRevision: Distribution is "$\{RecentBranchD\} >> $\{log\} 

    SBuildOrPBuilder  

\LA{}BuildNewRevision8~{\nwtagstyle{}\subpageref{NW4L0rMe-30vv5k-1}}\RA{} \nwused{\\{NW4L0rMe-92BMq-1}}\nwendcode{}\nwbegindocs{624}\nwdocspar 

\subsection{\texttt{Customize Git} branch} \label{subsec:GitBranch2RecentBranch} 

First, in the value of the variable \textit{CurrentBranch} (which is the name of the current branch), a ''\slash'' is replaced by ''\textbackslash\slash'', that is, a slash is masked. 

Then the so changed value of the variable is inserted as \textit{RecentBranch} into the configuration file. 

Finally, this value is assigned to the \textit{RecentBranch} variable. 

\nwenddocs{}\nwbegincode{625}\sublabel{NW4L0rMe-2Rvw4e-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2Rvw4e-1}}}\moddef{GitBranch2RecentBranch~{\nwtagstyle{}\subpageref{NW4L0rMe-2Rvw4e-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3ZQwb5-1}}\nwenddeflinemarkup 
function GitBranch2RecentBranch \{ 
    # Called by AskDist  

    bName1=$(echo $\{CurrentBranch\} | sed --expression='s/\\//\\\\\\//g') 
    sed --in-place --expression="s/RecentBranch=.*/RecentBranch=$\{bName1\}/g" \\ 
    $\{ConfigPath\}$\{OrigName\} 
    RecentBranch=$\{CurrentBranch
\} \} 

\LA{}Search4Dist~{\nwtagstyle{}\subpageref{NW4L0rMe-27Aw5E-1}}\RA{} \nwused{\\{NW4L0rMe-3ZQwb5-1}}\nwendcode{}\nwbegindocs{626}\nwdocspar 

\subsection{Identify distribution} \label{subsec:DetermineDistribution} 

\nwenddocs{}\nwbegincode{627}\sublabel{NW4L0rMe-27Aw5E-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-27Aw5E-1}}}\moddef{Search4Dist~{\nwtagstyle{}\subpageref{NW4L0rMe-27Aw5E-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2Rvw4e-1}}\nwenddeflinemarkup 
function Search4Dist \{ 
    # Called by AskDist ParseConfig 
    va=$(grep $\{bName\}_Dist $\{ConfigPath\}$\{OrigName\}) 
    bName1=$(echo $\{bName\} | sed --expression='s/\\//\\\\\\//g') 
    va=$(echo $va | sed --expression="s/# $\{bName1\}_Dist=//g") 
    va=$(echo $va | sed --expression='s/"//g') \} 

\LA{}AskDist~{\nwtagstyle{}\subpageref{NW4L0rMe-2sUMSc-1}}\RA{} \nwused{\\{NW4L0rMe-2Rvw4e-1}}\nwendcode{}\nwbegindocs{628}\nwdocspar 

\subsection{Checking the parameters}  

Before the package construction finally starts, the parameters are displayed for the last time for checking.  

\nwenddocs{}\nwbegincode{629}\sublabel{NW4L0rMe-2ea8K1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2ea8K1-1}}}\moddef{LastQuestionsBeforeBuild~{\nwtagstyle{}\subpageref{NW4L0rMe-2ea8K1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2yaKJP-1}}\nwenddeflinemarkup 
function LastQuestionsBeforeBuild \{ 
    # Called by UsingSBuild UsingPBuilder  

    if ! whiptail --title "Please check!" \\ 
    --yesno "The release you want to build for in $\{BuildEnv\} is $\{RecentBranchD\}" \\ 
    --yes-button "Yes" --no-button "No" 15 60 
    then 
        AskDist 
    fi  

\LA{}LastQuestionsBeforeBuild1~{\nwtagstyle{}\subpageref{NW4L0rMe-T3wiA-1}}\RA{} \nwused{\\{NW4L0rMe-2yaKJP-1}}\nwendcode{}\nwbegindocs{630}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ReleaseDistribution.png} \caption{Distribution for PBuilder} \end{figure} 

\subsection{Last option to exit}  

Finally, before the package is built, a last opportunity to exit is given.  

\nwenddocs{}\nwbegincode{631}\sublabel{NW4L0rMe-T3wiA-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-T3wiA-1}}}\moddef{LastQuestionsBeforeBuild1~{\nwtagstyle{}\subpageref{NW4L0rMe-T3wiA-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2ea8K1-1}}\nwenddeflinemarkup 
    whiptail --title "Last opportunity to exit before building" \\ 
    --yesno "Do you want to start the build process?" --yes-button "Yes" \\ 
    --no-button "Exit" 15 60 
\LA{}LastQuestionsBeforeBuild2~{\nwtagstyle{}\subpageref{NW4L0rMe-2kQBUI-1}}\RA{} \nwused{\\{NW4L0rMe-2ea8K1-1}}\nwendcode{}\nwbegindocs{632}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/StartBuildProcess.png} \caption{Start building the package} \end{figure} 

\nwenddocs{}\nwbegincode{633}\sublabel{NW4L0rMe-2kQBUI-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2kQBUI-1}}}\moddef{LastQuestionsBeforeBuild2~{\nwtagstyle{}\subpageref{NW4L0rMe-2kQBUI-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-T3wiA-1}}\nwenddeflinemarkup 
if [ $? -ne 0 ] 
then 
    whiptail --title "Bye" --msgbox "Exit" 15 60
\LA{}LastQuestionsBeforeBuild3~{\nwtagstyle{}\subpageref{NW4L0rMe-1oW0x8-1}}\RA{} \nwused{\\{NW4L0rMe-T3wiA-1}}\nwendcode{}\nwbegindocs{634}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/Bye.png} \caption{Finish} \end{figure} 

\nwenddocs{}\nwbegincode{635}\sublabel{NW4L0rMe-1oW0x8-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1oW0x8-1}}}\moddef{LastQuestionsBeforeBuild3~{\nwtagstyle{}\subpageref{NW4L0rMe-1oW0x8-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2kQBUI-1}}\nwenddeflinemarkup 
        exit 
    else 
        whiptail --title "Start building" \\ 
        --msgbox "$\{BuildEnv\} will be updated first\\n \\ 
        This need sudo and/or root rights" 15 60 
    fi
 \} 

\LA{}UsingSBuild~{\nwtagstyle{}\subpageref{NW4L0rMe-1BfCKV-1}}\RA{} \nwused{\\{NW4L0rMe-2kQBUI-1}}\nwendcode{}\nwbegindocs{636}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/BuildEnvUpdateInfo.png} \caption{Information about updating the build environment} \end{figure} 

\subsection{Selecting the build system}  

Now you can choose whether to build with \textit{pbuilder} or \textit{sbuild}. 

\nwenddocs{}\nwbegincode{637}\sublabel{NW4L0rMe-4HAa99-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4HAa99-1}}}\moddef{SBuildOrPBuilder~{\nwtagstyle{}\subpageref{NW4L0rMe-4HAa99-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-OhNcU-1}}\nwenddeflinemarkup 
function SBuildOrPBuilder \{ 
    # Called by BuildNewRevision TaskSelect  

    Builder=$(whiptail --title "Which builder do you want to use?" \\ 
    --radiolist "Which builder do you want to use? " 15 60 6 \\ 
    "0" "PBuilder" off \\ 
    "1" "SBuild" on \\ 
    --cancel-button "Exit" 3>&2 2>&1 1>&3) 
\LA{}SBuildOrPbuilder1~{\nwtagstyle{}\subpageref{NW4L0rMe-1gsx31-1}}\RA{} \nwused{\\{NW4L0rMe-OhNcU-1}}\nwendcode{}\nwbegindocs{638}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/AuswahlBuildSystem.png} \caption{Selecting the build system}  \end{figure} 

The default is to select \textit{sbuild}.  

\nwenddocs{}\nwbegincode{631}\sublabel{NW4L0rMe-1gsx31-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1gsx31-1}}}\moddef{SBuildOrPbuilder1~{\nwtagstyle{}\subpageref{NW4L0rMe-1gsx31-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4HAa99-1}}\nwenddeflinemarkup 
    if [ -z "$\{Builder\}" ] 
    then
        exit 
    fi 
    if [ $\{Builder\} -eq 1 ] 
    then 
        echo "Using SBuild." >>$\{log\} 
        UsingSBuild
    else
        echo "Using PBuilder." >>$\{log\} 
        UsingPBuilder 
    fi 
\} \LA{}BuildNewRevision~{\nwtagstyle{}\subpageref{NW4L0rMe-15yPgd-1}}\RA{} \nwused{\\{NW4L0rMe-4HAa99-1}}\nwendcode{}\nwbegindocs{640}\nwdocspar 

If \textit{sbuild} is selected, the program script calls the \textit{UsingSBuild} function. If \textit{pbuilder} is selected, the \textit{UsingPBuilder} function is called.  

For a description of the \textit{PBuilder}, see chapter \ref{sec:pbuilderdoes} (page \pageref{sec:pbuilderdoes}).  

\section{What does \textit{Sbuild} do?} 

\textit{Sbuild} is used in the official \textit{buildd} network to build binary and source packages for all supported architectures.  

A separate build environment is created for each.  

\nwenddocs{}\nwbegincode{641}\sublabel{NW4L0rMe-1BfCKV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1BfCKV-1}}}\moddef{UsingSBuild~{\nwtagstyle{}\subpageref{NW4L0rMe-1BfCKV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1oW0x8-1}}\nwenddeflinemarkup 
function UsingSBuild \{ 
    # Called by BuildNewRevision  

    BuildEnv="sbuild" 
\LA{}UsingSBuild1~{\nwtagstyle{}\subpageref{NW4L0rMe-1ZExEV-1}}\RA{} \nwused{\\{NW4L0rMe-1oW0x8-1}}\nwendcode{}\nwbegindocs{642}\nwdocspar 

First, the \textit{LastQuestionsBeforeBuild} function is called to set the \textit{release} parameters and the associated Git branch for \textit{gbp buildpackage}.  

\nwenddocs{}\nwbegincode{643}\sublabel{NW4L0rMe-1ZExEV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1ZExEV-1}}}\moddef{UsingSBuild1~{\nwtagstyle{}\subpageref{NW4L0rMe-1ZExEV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1BfCKV-1}}\nwenddeflinemarkup 
    LastQuestionsBeforeBuild  

\LA{}UsingSbuild2~{\nwtagstyle{}\subpageref{NW4L0rMe-40BWcH-1}}\RA{} \nwused{\\{NW4L0rMe-1BfCKV-1}}\nwendcode{}\nwbegindocs{644}\nwdocspar 

\section{Build in the \texttt{Sbuild} chroot} \label{sec:ChangeRoot} 

\subsection{Creating the S-Chroot} \label{subsec:CreateSchroot} 

First it is checked if the file \textit{.sbuildrc} is already created in the user's home directory (chapter \ref{sec:confFileSBuild}, page \pageref{sec:confFileSBuild}).  

\nwenddocs{}\nwbegincode{645}\sublabel{NW4L0rMe-3vEcmx-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3vEcmx-1}}}\moddef{CreateSchroot~{\nwtagstyle{}\subpageref{NW4L0rMe-3vEcmx-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1NlbiI-1}}\nwenddeflinemarkup 
function CreateNewSchroot \{ 
    # Called by UsingSBuild 
'   # Check whether ~/.sbuildrc exists 
    if ! [ -f ~/.sbuildrc ] 
    then 
    # Copy from template 
    cp /usr/share/doc/sbuild/examples/example.sbuildrc \\ 
    $\{HOME\}/.sbuildrc  

    fi  

    whiptail --title ".sbuildrc (now) exists." \\ 
    --msgbox "Please check (and edit) ~/.sbuildrc!" 15 60  

\LA{}CreateSchroot2~{\nwtagstyle{}\subpageref{NW4L0rMe-4V7noF-1}}\RA{} \nwused{\\{NW4L0rMe-1NlbiI-1}}\nwendcode{}\nwbegindocs{646}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/CheckSbuilRC.png} \caption{Check .sbuildrc} \end{figure} 

Now the file can still be edited  

\nwenddocs{}\nwbegincode{647}\sublabel{NW4L0rMe-4V7noF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4V7noF-1}}}\moddef{CreateSchroot2~{\nwtagstyle{}\subpageref{NW4L0rMe-4V7noF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3vEcmx-1}}\nwenddeflinemarkup 
    nano ~/.sbuildrc  

\LA{}CreateSchroot3~{\nwtagstyle{}\subpageref{NW4L0rMe-wuL1-1}}\RA{} \nwused{\\{NW4L0rMe-3vEcmx-1}}\nwendcode{}\nwbegindocs{648}\nwdocspar 

Then the \texttt{Sbuild} chroot is created.  

This uses \textit{sbuild-createchroot} to create a \textit{chroot} which is used by \textit{sbuild} to build packages for \textit{\texttt{Debian} Unstable Main}.  

\nwenddocs{}\nwbegincode{649}\sublabel{NW4L0rMe-wuL1-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-wuL1-1}}}\moddef{CreateSchroot3~{\nwtagstyle{}\subpageref{NW4L0rMe-wuL1-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4V7noF-1}}\nwenddeflinemarkup
    bDist="sid" 
    bDist=$(whiptail --title "Create new Sbuild-Chroot for $\{RecentBranch\}" \\ 
    --inputbox "Debian distribution\\n \\ 
    for this branch $\{RecentBranch\}:" \\ 
    --cancel-button "Use Sid" 15 60 3>&2 2>&1 1>&3) 
    if [ $\{bDist\} = "" ] 
    then 
        bDist="sid" 
    fi  

    sudo sbuild-createchroot $\{bDist\} \\ 
    /srv/chroot/$\{bDist\}-amd64-sbuild \\ 
    http://127.0.0.1:3142/deb.debian.org/debian 
    echo "Schroot for "$\{bDist\}" created." >> $\{log\} 

\} \LA{}CreateNewCow~{\nwtagstyle{}\subpageref{NW4L0rMe-26QStU-1}}\RA{} \nwused{\\{NW4L0rMe-4V7noF-1}}\nwendcode{}\nwbegindocs{650}\nwdocspar 

The \textit{schroot} is placed in \textit{/srv/chroot/unstable-amd64-sbuild}. It will install the ccache package in the \textit{schroot} in case you want to use some of the extensions described below. The related \textit{apt} repository is the \textit{http://deb.debian.org/debian} mirror service via \textit{apt-cacher-ng}, which automatically selects a suitable local mirror. This can be changed to use a URL for a different mirror of the Debian archive.  

This command can be run once per desired distribution and passed to \textit{-{}-arch=i386} to create a \textit{schroot} for a different architecture (the default is the host architecture).  

\subsection{sbuild-update}  

The \textit{schroot} should be up to date before building packages in it. The updates can be done with \textit{sbuild-update}.\cite{SBuild2022} 

\nwenddocs{}\nwbegincode{651}\sublabel{NW4L0rMe-40BWcH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-40BWcH-1}}}\moddef{UsingSbuild2~{\nwtagstyle{}\subpageref{NW4L0rMe-40BWcH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1ZExEV-1}}\nwenddeflinemarkup 
    # Check whether chroot directory exits  

    if [ -d /srv/chroot/$\{RecentBranchD\}-amd64-sbuild ] 
    then 
        # if exists update-chroot 
        sudo sbuild-update --update --dist-upgrade --clean --autoclean \\ 
        --autoremove $\{RecentBranchD\} 
        echo "Updated Schroot for $\{RecentBranchD\}." >>$\{log\} 
    else 
        # else create chroot 
        CreateNewSchroot 
    fi 
    # ForceOrig  

    # sbuild --dist=$\{RecentBranchD\} *.dsc 
    gbp buildpackage --git-builder=sbuild \\ 
        --git-debian-branch=$\{RecentBranch\} \\ 
        --git-dist=$\{RecentBranchD\} --git-ignore-new 
    gbpq=$? 
 

\LA{}UsingSbuild3~{\nwtagstyle{}\subpageref{NW4L0rMe-s1te9-1}}\RA{} \nwused{\\{NW4L0rMe-1ZExEV-1}}\nwendcode{}\nwbegindocs{652}\nwdocspar 

All \textit{sbuild} chroots created with \textit{sbuild-createchroot} are created by \textit{schroot} and have the suffix \textit{"-sbuild"}. So, to find the names of all \textit{sbuild} chroots, the following is executed.  

\begin{verbatim}     schroot -l | grep sbuild \end{verbatim} 

\nwenddocs{}\nwbegincode{653}\sublabel{NW4L0rMe-s1te9-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-s1te9-1}}}\moddef{UsingSbuild3~{\nwtagstyle{}\subpageref{NW4L0rMe-s1te9-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-40BWcH-1}}\nwenddeflinemarkup 

    build --dist=$\{RecentBranchD\} #*.dsc 
\} \LA{}UsingPBuilder~{\nwtagstyle{}\subpageref{NW4L0rMe-1PRVTo-1}}\RA{} \nwused{\\{NW4L0rMe-40BWcH-1}}\nwendcode{}\nwbegindocs{654}\nwdocspar 

\section{Build in the Pbuilder chroot} \label{sec:pbuilderdoes} 

The packages are built in a \textit{chroot} provided by \textit{pbuilder}. For better control of the process, so-called \textit{hooks} can be built in at predefined places (chapter \ref{subsec:HooksEinrichten}, page \pageref{subsec:HooksEinrichten}).  

\subsection{Create \textit{base.cow}} \label{subsec:CreateCow} 

If the required \textit{base-cow} does not yet exist, it is created with \textit{git-pbuilder create}. This can also be used to create a \textit{chroot} for a different architecture such as \textit{i386 (32-bit)} on a \textit{64-bit} machine. For this a \textit{base-sid-i386.cow} is created with   

\begin{verbatim} DIST=sid ARCH=i386 git-pbuilder create \end{verbatim} 

 

\nwenddocs{}\nwbegincode{655}\sublabel{NW4L0rMe-26QStU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-26QStU-1}}}\moddef{CreateNewCow~{\nwtagstyle{}\subpageref{NW4L0rMe-26QStU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-wuL1-1}}\nwenddeflinemarkup 
function CreateNewCow \{ 
    # Called by Distro4Branch UsingPBuilder  

    bDist="sid" 
    bDist=$(whiptail --title "Create new cow for $\{RecentBranch\}" \\ 
    --inputbox "Debian distribution\\n \\ 
    for this branch $\{RecentBranch\}:" \\ 
    --cancel-button "Use Sid" 15 60 3>&2 2>&1 1>&3) \LA{}CreateNewCow1~{\nwtagstyle{}\subpageref{NW4L0rMe-4UgTuZ-1}}\RA{} \nwused{\\{NW4L0rMe-wuL1-1}}\nwendcode{}\nwbegindocs{656}\nwdocspar 

\begin{figure}[h]
 \centering \includegraphics[width=25em,height=30ex]{Pictures/SelectCow.png} 
\caption{Selection of the cow to create.} \end{figure} 

\nwenddocs{}\nwbegincode{657}\sublabel{NW4L0rMe-4UgTuZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4UgTuZ-1}}}\moddef{CreateNewCow1~{\nwtagstyle{}\subpageref{NW4L0rMe-4UgTuZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-26QStU-1}}\nwenddeflinemarkup 
    if [ $\{bDist\} == "" ] 
    then 
        bDist="sid" 
    fi 
    # You must be root to create a cow 
    echo -e "\\nPlease enter Password for creating pbuilder cow.\\n" 
    sudo DIST=$\{bDist\} git-pbuilder create 
    echo "Cow for "$\{bDist\}" created." >> $\{log
\} \} 

\LA{}Distro4Branch~{\nwtagstyle{}\subpageref{NW4L0rMe-3efUH3-1}}\RA{} \nwused{\\{NW4L0rMe-26QStU-1}}\nwendcode{}\nwbegindocs{658}\nwdocspar 

With \textit{PBuilder} an environment is created in which Debian packages can be built (see also chapter \ref{sec:configurepbuilder}, page \pageref{sec:configurepbuilder}).  

A wrapper is a program that surrounds another program. The wrappers mentioned below are technical in nature. \textit{Git-pbuilder} is a wrapper for \textit{pdebuild} and is intended for use by \textit{gbp buildpackage}.  

\textit{Git-pbuilder} configures \textit{pdebuild} to use \textit{cowbuilder} by default.  

\textit{Cowbuilder} is again a \textit{pbuilder} wrapper for \textit{cowdancer}. \textit{cowbuilder} performs the specified operation with \textit{cowdancer}.  

Since \textit{git pbuilder} requires \textit{root} privileges to update the base installation, a password prompt is issued.  

\subsection{git-pbuilder update} \label{subsec:GitPBuilderUpdate} 

Before starting \textit{gbp buildpackage}, precautions must be taken to ensure that the setup in the \textit{chroot} is up-to-date. This is done using \textit{git-pbuilder update}. Before this, it is still checked whether the necessary \textit{base-cow} (of the corresponding branch/release) is available.  

While the \textit{cow} directories for the other releases have the release names in their names, the corresponding directory for \textit{sid} is simply called \textit{base.cow}. 

Therefore, two conditions are used to check whether the corresponding directory exists.  

If the corresponding directory is missing, it is created using the \textit{CreateNewCow} function (chapter \ref{subsec:CreateCow}, page \pageref{subsec:CreateCow}).  

\nwenddocs{}\nwbegincode{659}\sublabel{NW4L0rMe-1PRVTo-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1PRVTo-1}}}\moddef{UsingPBuilder~{\nwtagstyle{}\subpageref{NW4L0rMe-1PRVTo-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-s1te9-1}}\nwenddeflinemarkup 

function UsingPBuilder \{ 
    # Called by BuildNewRevision  

    BuildEnv="pbuilder" 
    LastQuestionsBeforeBuild  

    # Building package using git-pbuilder and gbp buildpackage  

    # check, whether cow exists 
    # if exists update cow 
    # else create cow 
    if [ -d /var/cache/pbuilder/base-$\{RecentBranchD\}.cow ] 
    then 
        echo -e "\\nPlease enter Password for updating pbuilder cow.\\n" 
        DIST=$\{RecentBranchD\} git-pbuilder update 
        echo "Notice from BuildNewRevision: Pbuilder was updated." >> $\{log\} 
    elif [ -d /var/cache/pbuilder/base.cow -a $\{RecentBranchD\} = "sid" ] 
    then 
        echo -e "\\nPlease enter Password for updating pbuilder cow.\\n" 
        DIST=$\{RecentBranchD\} git-pbuilder update 
        echo "Notice from BuildNewRevision: Pbuilder was updated." >> $\{log\} 
    else 
        CreateNewCow 
    fi 
    ForceOrig 
\LA{}UsingPBuilder3~{\nwtagstyle{}\subpageref{NW4L0rMe-33cKBy-1}}\RA{} \nwused{\\{NW4L0rMe-s1te9-1}}\nwendcode{}\nwbegindocs{660}\nwdocspar 

\subsection{Inclusion of the *.orig archive in *.changes} \label{subsec: PBuilderOptions} 

Basically, the *.orig archive (\textit{*.orig.tar.gz} or \textit{*.orig.tar.xz}) is only included in the *.changes file and thus also uploaded if the revision number does not exceed 1. 

So first the version identifier is determined and displayed by calling the \textit{RecentIdentifier} function (chapter \ref{subsec:Versionsbezeichnung}, page \pageref{subsec:Versionsbezeichnung}). 

\nwenddocs{}\nwbegincode{661}\sublabel{NW4L0rMe-3u1ISy-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3u1ISy-1}}}\moddef{ForceOrig~{\nwtagstyle{}\subpageref{NW4L0rMe-3u1ISy-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-38F31N-1}}\nwenddeflinemarkup 
function ForceOrig \{ 
    # Called by BuildNewRevision PrepareUploading 
    OptFlag=1 
    if [ -z "$\{Version1\}" ] 
    then 
        RecentIdentifier 
    fi 
    whiptail --title "Version" --msgbox "Version: $\{Version1\}" 15 60 

\LA{}ForceOrig2~{\nwtagstyle{}\subpageref{NW4L0rMe-1NnZn5-1}}\RA{} \nwused{\\{NW4L0rMe-38F31N-1}}\nwendcode{}\nwbegindocs{662}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/Version.png} \caption{Display of the version with revision number} \end{figure} 

From this, the revision number is now extracted and displayed. For native packages no revision number is displayed. 

\nwenddocs{}\nwbegincode{663}\sublabel{NW4L0rMe-1NnZn5-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1NnZn5-1}}}\moddef{ForceOrig2~{\nwtagstyle{}\subpageref{NW4L0rMe-1NnZn5-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3u1ISy-1}}\nwenddeflinemarkup 
    cat debian/source/format | grep "native" > /dev/null 
    if [ $? -ne 0 ] 
    then 
        RevNr=$(echo $\{Version1\} | sed --expression='s/[^0-9]/#/g' | \\ 
        sed --expression='s/^.*#//') whiptail --title "Revision number" \\ 
        --msgbox "The number of the revision is $\{RevNr\}." 15 60 
        pbuilderOpt=" --git-builder=git-pbuilder \\ 
        --git-pbuilder-options='--source-only-changes'" 

\LA{}ForceOrig5~{\nwtagstyle{}\subpageref{NW4L0rMe-4Z4nBv-1}}\RA{} \nwused{\\{NW4L0rMe-3u1ISy-1}}\nwendcode{}\nwbegindocs{664}\nwdocspar 

%     --git-pbuilder-options='--hookdir ${HOME}/.pbuilder/'
\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/RevisionNumber.png} \caption{Display of the revision number} \end{figure} 

However, you can force the *.orig archive to be included in the *.changes file and thus also uploaded if the revision number is greater than 1 by giving \textit{git-pbuilder} the \textit{-sa} option. 

This is useful if the *orig archive has not been uploaded yet or needs to be re-provisioned in the \textit{New Queue}.. 

When using \textit{gbp buildpackage}, as in the script, the corresponding option is \textit{--git-builder=git-pbuilder -sa}.. 

\nwenddocs{}\nwbegincode{665}\sublabel{NW4L0rMe-4Z4nBv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4Z4nBv-1}}}\moddef{ForceOrig5~{\nwtagstyle{}\subpageref{NW4L0rMe-4Z4nBv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1NnZn5-1}}\nwenddeflinemarkup 
        if [ $\{RevNr\} -gt 1 ] 
        then 
            if whiptail --title "orig in changes file" \\ 
            --yesno "Do you want to insert the orig archive into the changes file?\\n \\ 
            That makes sense, if the orig archive has not been uploaded before." \\ 
            --defaultno --yes-button "Yes" --no-button "No" 15 60 
\LA{}ForceOrig6~{\nwtagstyle{}\subpageref{NW4L0rMe-2AuBIF-1}}\RA{} \nwused{\\{NW4L0rMe-1NnZn5-1}}\nwendcode{}\nwbegindocs{666}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ChangesFile.png} \caption{Should the upstream tarball be uploaded too} \end{figure} 

The \textit{-sa} option means that according to \textit{dpkg-buildpackage --help} the source always contains \textit{Orig}. 

\nwenddocs{}\nwbegincode{667}\sublabel{NW4L0rMe-2AuBIF-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2AuBIF-1}}}\moddef{ForceOrig6~{\nwtagstyle{}\subpageref{NW4L0rMe-2AuBIF-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4Z4nBv-1}}\nwenddeflinemarkup 
            then 
                pbuilderOpt=" --git-builder=git-pbuilder -sa" 
            fi 
        fi 
    fi
 \} 

\LA{}MoreOptions~{\nwtagstyle{}\subpageref{NW4L0rMe-3XHV1N-1}}\RA{} \nwused{\\{NW4L0rMe-4Z4nBv-1}}\nwendcode{}\nwbegindocs{668}\nwdocspar 

Now in the following function the possibility is opened to give further options for the \textit{pbuilder} in \textit{gbp buildpackage}. Before that the previous options are displayed. 

\nwenddocs{}\nwbegincode{669}\sublabel{NW4L0rMe-3XHV1N-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3XHV1N-1}}}\moddef{MoreOptions~{\nwtagstyle{}\subpageref{NW4L0rMe-3XHV1N-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2AuBIF-1}}\nwenddeflinemarkup
function MoreOptions \{ 
    # Called by BuildNewRevision PrepareUploading 
    # Adds options to specify pbuilder in gpb buildpackage 
    moreOpts='' 
    intText="The options for gbp buildpackage are:\\n" 
    intText=$\{intText\}$\{normalOpts\} 
    if whiptail --title "Options for gbp buildpackage" \\ 
    --yesno "$\{intText\}\\nDo you want to add some more?" --yes-button "Yes" \\ 
    --no-button "No" --defaultno 15 60 \LA
{}MoreOptions2~{\nwtagstyle{}\subpageref{NW4L0rMe-2htUbp-1}}\RA{} \nwused{\\{NW4L0rMe-2AuBIF-1}}\nwendcode{}\nwbegindocs{670}
\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/ShowBuildPackageOptions.png} \caption{Display the options of \textit{gbp buildbackage}.} \end{figure} 

\nwenddocs{}\nwbegincode{671}\sublabel{NW4L0rMe-2htUbp-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-2htUbp-1}}}\moddef{MoreOptions2~{\nwtagstyle{}\subpageref{NW4L0rMe-2htUbp-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3XHV1N-1}}\nwenddeflinemarkup 
    then 
        moreOpts=$(whiptail --title "Options for gbp buildpackage" \\ 
        --inputbox "$\{intText\}\\nPlease insert options to be added:" \\ 
        --cancel-button "Cancel" 15 60 3>&2 2>&1 1>&3) 
        moreOpts=" "$\{moreOpts\} 
    fi
 \} 

\LA{}PatchesTreatment~{\nwtagstyle{}\subpageref{NW4L0rMe-1KCu8R-1}}\RA{} \nwused{\\{NW4L0rMe-3XHV1N-1}}\nwendcode{}\nwbegindocs{672}\nwdocspar 

%\begin{figure}[h]
%\centering
%\includegraphics[width=25em,height=30ex]{Pictures/MoreGBPOptions.png}
%\caption{Mehr Optionen von \textit{gbp buildbackage}}
%\end{figure}
The information about \textit{pbuilderOpt} has been gathered from various manpages. 

In the manpage of \textit{gbp buildbackage} you get the information that with \textit{--git-pbuilder-options= PBUILDER\_OPTIONS} further options of \textit{pbuilder} can be added. Which options these are can be found in the man page of \textit{pbuilder.} 

\subsection{Build with \textit{gbp buildpackage}} 

After the preparations now the building of the respective package with \textit{gbp buildpackage} takes place. If this fails, the program terminates. Otherwise it continues to check the built packages (chapter \ref{chap:Ueberpruefungen}, page \pageref{chap:Ueberpruefungen}). Good luck! 

\nwenddocs{}\nwbegincode{673}\sublabel{NW4L0rMe-33cKBy-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-33cKBy-1}}}\moddef{UsingPBuilder3~{\nwtagstyle{}\subpageref{NW4L0rMe-33cKBy-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1PRVTo-1}}\nwenddeflinemarkup 

    normalOpts="--git-debian-branch="$\{RecentBranch\}" \\ 
    --git-dist="$\{RecentBranchD\}" --git-verbose \\ 
    --git-ignore-new"$\{pbuilderOpt\} 
    MoreOptions 
\LA{}UsingPBuilder4~{\nwtagstyle{}\subpageref{NW4L0rMe-OhNcU-1}}\RA{} \nwused{\\{NW4L0rMe-1PRVTo-1}}\nwendcode{}\nwbegindocs{674}\nwdocspar 

Now the actual building of the Debian package starts here with the download of the build dependencies. 

\nwenddocs{}\nwbegincode{675}\sublabel{NW4L0rMe-OhNcU-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-OhNcU-1}}}\moddef{UsingPBuilder4~{\nwtagstyle{}\subpageref{NW4L0rMe-OhNcU-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-33cKBy-1}}\nwenddeflinemarkup 
    echo "Starting gbp buildpackage" >> $\{log\} 
    gbp buildpackage --git-debian-branch=$\{RecentBranch\} \\ 
    --git-dist=$\{RecentBranchD\} --git-verbose \\ 
    --git-ignore-new$\{pbuilderOpt\}$\{moreOpts\} 
    gbpq=$?
 \} 

\LA{}SBuildOrPBuilder~{\nwtagstyle{}\subpageref{NW4L0rMe-4HAa99-1}}\RA{} \nwused{\\{NW4L0rMe-33cKBy-1}}\nwendcode{}\nwbegindocs{676}\nwdocspar 

\nwenddocs{}\nwbegincode{677}\sublabel{NW4L0rMe-30vv5k-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-30vv5k-1}}}\moddef{BuildNewRevision8~{\nwtagstyle{}\subpageref{NW4L0rMe-30vv5k-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4KEAEt-1}}\nwenddeflinemarkup 
    if [ $gbpq -eq 0 ] 
    then 
        echo -e "The package $\{SourceName\} was built with gbp buildpackage\\n \\ 
        without creating and signing tags." >> $\{log\} 
    else 
        whiptail --title "Build failed!" \\ 
        --msgbox "Gbp buildpackage failed!" 15 60 
        echo 
        echo "Please fix the problem in another terminal!" 
        echo "After fixing, press RETURN to continue." 
        read a 
        if [ "$\{BuildEnv\}" = "sbuild" ] 
        then 
            UsingSBuild 
        else 
            UsingPBuilder 
        fi 
    fi 

Task=5 # Go to RunningTests \} 

\LA{}RunningLintian~{\nwtagstyle{}\subpageref{NW4L0rMe-1TokRZ-1}}\RA{} \nwused{\\{NW4L0rMe-4KEAEt-1}}\nwendcode{}\nwbegindocs{678}\nwdocspar 

\begin{figure}[h!] \centering

\includegraphics[width=25em,height=30ex]{Pictures/BuildFailed.png} \caption{Unsuccessful building attempt!} \end{figure} 

\subsection{Download dependencies} 

\subsection{Build - compile in \textit{pbuilder}.} 

\chapter{If building fails} \label{chap:BuildFails} 

If the build fails or the subsequent tests (chapter \ref{chap:Ueberpruefungen}, page \pageref{chap:Ueberpruefungen}) are not satisfactory, this can have various causes. 

First starting point for root cause investigation is to study the file\\\textit{$<SourceName>$\_$<Version>$-$<Revision>$\_$<Arch>$.build}. 

One reason why the build failed may be insufficient determination of the build dependencies. Determining whether required dependencies are already packaged is described in chapter \ref{sec:CheckDependencies} (page \pageref{sec:CheckDependencies}). 

\chapter{Build beyond Unstable (sid)} \label{chap:BuildBeyondSid} 

To build for \textit{backports} and \textit{proposed-updates} packages (chapter \ref{chap:JenseitsUnstable}, page \pageref{chap:JenseitsUnstable}), the following procedure has worked well for us. 

First, from the output selection (chapter \ref{sec:Aufgabenauswahl}, page \pageref{sec:Aufgabenauswahl}), a new Git branch must be created (chapter \ref{sec:NeuenBranchErstellen}, page \pageref{sec:NeuenBranchErstellen}). This usually starts from the Git branch \textit{debian/sid} or \textit{master}. 

The name of this new branch should specify the target of the package (e.g. debian/bookworm-bpo). 

If this Git branch already exists, it is used. 

\nwenddocs{}\nwbegincode{679}\sublabel{NW4L0rMe-3p2iT7-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3p2iT7-1}}}\moddef{Merge2Stable~{\nwtagstyle{}\subpageref{NW4L0rMe-3p2iT7-1}}}\endmoddef\nwstartdeflinemarkup\nwenddeflinemarkup 
  git branch -vv 
  git checkout <stableBranch> 
  git merge debian/sid # or master 
  # Solve merge conflicts esp. d/changelog 
  nano debian/changelog 
  git add debian/changelog 
  git commit 
  # This is the merge commit \nwnotused{Merge2Stable}\nwendcode{}\nwbegindocs{680}\nwdocspar 

Fixing the merge conflict usually requires at least editing the \textit{debian/changelog} file. 

After that, build a new revision (chapter \ref{chap:NeueRevisionBauen}, page \pageref{chap:NeueRevisionBauen}). 

This creates a new entry in \textit{d/changelog}. (Chapter \ref{sec:DebianChangelog}, page \pageref{sec:DebianChangelog}) 

For the version entry in \textit{debian/changelog} it is mandatory to use nomenclature described in chapter \ref{sec:Versioning} (page \pageref{sec:Versioning}). 

After that, the package for \textit{proposed-update} is built. The changelog \textbf{must not} contain the number of this bug report. 

If the release team approves the request, the package can be built and uploaded. (Chapter \ref{sec:SalsaHochladen}, page \pageref{sec:SalsaHochladen} or Chapter \ref{sec:DputHochladen}, page \pageref{sec:DputHochladen}) 

The bug report to \textit{release.debian.org} will be closed once the package has been added to the next point release of the stable release. This is then the end of this process. 

\chapter{Verifications} \label{chap:Ueberpruefungen} 

An initial quality control is already performed during the construction process in \textit{pbuilder} with \textit{lintian}. 

The following quality control is done with \textit{lintian} in \textit{pedantic} mode and with \textit{uscan} regarding the content of the file \textit{debian/watch}.. 

This is followed by more checks with \textit{debdiff} and \textit{diffoscope}. 

Finally \textit{piuparts} is described. 

\nwenddocs{}\nwbegincode{681}\sublabel{NW4L0rMe-3nHlL3-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3nHlL3-1}}}\moddef{RunningTests~{\nwtagstyle{}\subpageref{NW4L0rMe-3nHlL3-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4YNhTs-1}}\nwenddeflinemarkup 
function RunningTests \{ 
     # Called by TaskSelect BuildNewRevision 

    # QA using lintian and uscan 

    # lintian RunningLintian 

    # uscan 
    if [ $linq -eq 0 ] 
    then 
        RunningUscan 
    else 
        usq=1 
    fi 

\LA{}RunningTests3~{\nwtagstyle{}\subpageref{NW4L0rMe-1fxvHr-1}}\RA{} \nwused{\\{NW4L0rMe-4YNhTs-1}}\nwendcode{}\nwbegindocs{682}\nwdocspar 

If at least one of the two test results is qualified as poor, the program script terminates after a corresponding entry into the log file. 

Otherwise there is a question whether to prepare the upload of the package. 

\nwenddocs{}\nwbegincode{683}\sublabel{NW4L0rMe-1fxvHr-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1fxvHr-1}}}\moddef{RunningTests3~{\nwtagstyle{}\subpageref{NW4L0rMe-1fxvHr-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3nHlL3-1}}\nwenddeflinemarkup 
    if [ $usq -ne 0 ] || [ $linq -ne 0 ] 
    then 
        echo "At least one test failed!" >> $\{log\} 
        exit 
    else 
        if whiptail --title "Upload?" \\ 
        --yesno "Should the package be prepared to be uploaded now?" \\ 
        --yes-button "Yes" --no-button "Exit" 15 60 
        then 
            Task=5 # Go to PrepareUploading 
        else 
            exit 
        fi 
   fi
 \} 

\LA{}CheckRepackSuffix~{\nwtagstyle{}\subpageref{NW4L0rMe-4V2sOW-1}}\RA{} \nwused{\\{NW4L0rMe-3nHlL3-1}}\nwendcode{}\nwbegindocs{684}\nwdocspar 

\begin{figure}[h!] \centering

\includegraphics[width=25em,height=30ex]{Pictures/PreparedUpload.png} \caption{Prepare upload of release} \end{figure} 

\section{Selection of the Changes file} \label{sec:SelectChangesFile} 

This function is used to select the changes file (\textit{*.changes}), which is used to check the package build result and determine which files to upload. 

\nwenddocs{}\nwbegincode{685}\sublabel{NW4L0rMe-3JXgFA-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3JXgFA-1}}}\moddef{SelectChangesFile~{\nwtagstyle{}\subpageref{NW4L0rMe-3JXgFA-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3r5YFV-1}}\nwenddeflinemarkup 
function SelectChangesFile \{ 
    # Called by RunningLintian SelectUploadTarget 

    titlestr=$\{1\} 
    cd $\{PrjPath\} 
    changesa=($(ls $\{SourceName\}_$\{Version1\}*_*.changes)) 

    if [ -z "$\{changesa\}" ] 
    then 
        echo "File *"$\{SourceName\}"*_"$\{Version1\}"*_*.changes not found!"
        exit 
    fi 

    i=0; slct='' 
    for element in $\{changesa[*]\} 
    do 
        slct=$slct' '$i' '$\{element\}' off ' 
        i=$(expr $i + 1) 
    done 

    paket=$(whiptail --title "$\{titlestr\}" --radiolist "Select:" \\ 
    --cancel-button "Exit" 15 60 8 $slct 3>&2 2>&1 1>&3) 

    if [ -z "$\{paket\}" ] 
    then 
        exit 
    fi
 \} 

\LA{}PatchHeader~{\nwtagstyle{}\subpageref{NW4L0rMe-2C9hCO-1}}\RA{} \nwused{\\{NW4L0rMe-3r5YFV-1}}\nwendcode{}\nwbegindocs{686}\nwdocspar 

\section{Yamllint} 

With the command line tool \textit{yamllint} the syntax of the corresponding files can be checked. 

\section{Lintian} 

There is a User's Manual for \texttt{Lintian}, which is also available in the \textit{lintian} package as file \textit{lintian.rst} (in English)\cite{LintianUserManual2023}. 

\subsection{Test with Lintian} \label{subsec:RunningLintian} 

The result of the build is checked with \textit{lintian}. To do this, the \textit{*.changes} file to which the check should refer must first be selected. For this the function \textit{SelectChangesFile} is called (chapter \ref{sec:SelectChangesFile}, page \pageref{sec:SelectChangesFile}). 

\nwenddocs{}\nwbegincode{687}\sublabel{NW4L0rMe-1TokRZ-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1TokRZ-1}}}\moddef{RunningLintian~{\nwtagstyle{}\subpageref{NW4L0rMe-1TokRZ-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-30vv5k-1}}\nwenddeflinemarkup 
function RunningLintian \{ 
    # Called by RunningTests 

    SelectChangesFile "lintian_check" # String will be found in $\{1\} 
    linfile=$\{changesa[$paket]\} 
\LA{}RunningLintian1~{\nwtagstyle{}\subpageref{NW4L0rMe-x3Lx5-1}}\RA{} \nwused{\\{NW4L0rMe-30vv5k-1}}\nwendcode{}\nwbegindocs{688}\nwdocspar 

\textit{Lintian} is called with options that cause a verbose check. 

\nwenddocs{}\nwbegincode{689}\sublabel{NW4L0rMe-x3Lx5-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-x3Lx5-1}}}\moddef{RunningLintian1~{\nwtagstyle{}\subpageref{NW4L0rMe-x3Lx5-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1TokRZ-1}}\nwenddeflinemarkup 

    lininfo=$(lintian --check --display-experimental --display-info \\ 
    --info --verbose --show-overrides --pedantic --tag-display-limit 0 \\ 
    --color auto $\{linfile\}) 
    lx=$? 

\LA{}RunningLintian3~{\nwtagstyle{}\subpageref{NW4L0rMe-1R8pjv-1}}\RA{} \nwused{\\{NW4L0rMe-1TokRZ-1}}\nwendcode{}\nwbegindocs{690}\nwdocspar 

If \textit{Lintian} does not report anything, the user should experience this pleasing result. 

\nwenddocs{}\nwbegincode{691}\sublabel{NW4L0rMe-1R8pjv-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1R8pjv-1}}}\moddef{RunningLintian3~{\nwtagstyle{}\subpageref{NW4L0rMe-1R8pjv-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-x3Lx5-1}}\nwenddeflinemarkup 
    if [ $\{lx\} -eq 0 ] 
    then 
       lininfo="Lintian does not find any Errors, Warnings or \\n \\ 
        any other problems. \\n\\n Congratulations" 
    fi 

\LA{}RunningLintian4~{\nwtagstyle{}\subpageref{NW4L0rMe-4cQ38l-1}}\RA{} \nwused{\\{NW4L0rMe-x3Lx5-1}}\nwendcode{}\nwbegindocs{692}\nwdocspar 

The variable \textit{lininfo} must still be edited with \textit{sed} so that the Lintian messages appear in individual lines. 

\nwenddocs{}\nwbegincode{693}\sublabel{NW4L0rMe-4cQ38l-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4cQ38l-1}}}\moddef{RunningLintian4~{\nwtagstyle{}\subpageref{NW4L0rMe-4cQ38l-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1R8pjv-1}}\nwenddeflinemarkup 
    # Make lininfo better readable 
    lininfo=$(echo $\{lininfo\} | sed --expression='s/ [EWIPNX]:/\\\\n&/g') 

    echo -e "lintian("$\{lx\}"): "$\{lininfo\} 
    whiptail --title "Lintian" --msgbox "$\{lininfo\}" --scrolltext 15 60 
    echo -e "Result of Lintian:\\n"$\{lininfo\} >> $\{log\} 

\LA{}RunningLintian5~{\nwtagstyle{}\subpageref{NW4L0rMe-AVwi3-1}}\RA{} \nwused{\\{NW4L0rMe-1R8pjv-1}}\nwendcode{}\nwbegindocs{694}\nwdocspar 

After displaying the result of the test, the user must evaluate the result. 

\nwenddocs{}\nwbegincode{695}\sublabel{NW4L0rMe-AVwi3-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-AVwi3-1}}}\moddef{RunningLintian5~{\nwtagstyle{}\subpageref{NW4L0rMe-AVwi3-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4cQ38l-1}}\nwenddeflinemarkup 
    whiptail --title "All well?" \\ 
    --yesno "All well? Continue?" --yes-button "Yes" \\ 
    --no-button "Exit" 15 60 
    linq=$?
 \} 

\LA{}RunningUscan~{\nwtagstyle{}\subpageref{NW4L0rMe-401muT-1}}\RA{} \nwused{\\{NW4L0rMe-4cQ38l-1}}\nwendcode{}\nwbegindocs{696}\nwdocspar 

\begin{figure}[!h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/AllWell.png} \caption{Lintian: All Well?} \end{figure} 

If the result is OK, the next test follows.  

\subsection{Lintian reports}  

A complete list of possible messages can be found at \url{https://lintian.debian.org/tags.html}.  

Here are some examples:  

\begin{description} \item[bad-jar-name] Der Name entspricht nicht den Richtlinien der \texttt{Java}-Policy. \footnote{Chapter 2.4 of the \texttt{Java} Policy\cite{JavaPolicy}} \item[codeless-jar] Die *.jar Datei enthält keinen kompilierten \texttt{Java}-Code. \item[empty-binary-package] Das gebaute Paket ist leer. \item[javalib-but-no-public-jars] Im Verzeichnis \textit{/usr/share/java/} gibt es kein \textit{*.jar}-Archiv. Dann fehlt in der Regel der Eintrag in der entsprechenden Datei \textit{debian/<paketname.poms} als \textit{--java-lib}. \item[new-package-should-close-itp-bug] In der Datei \textit{debian/changelog} ist der ITP-Bug zu schließen (Closes: \#nnnnnn) \item[rules-requires-root-missing] In die Datei \textit{debian/control} wird im ersten Abschnitt der Eintrag \textit{Rules-Requires-Root: no} benötigt. \item[wildcard-matches-nothing-in-dep5-copyright] \item[backports-changes-missing] \item[out-of-date-standard] \item[testsuite-autopkgtest-missing] 

\end{description} 

\section{Uscan} \label{sec:uscan} 

With the option \textit{--verbose}, \textit{uscan} creates a human-readable report about the programme execution. With the option \textit{--debug}, the status of the internal variables is additionally displayed.  

\nwenddocs{}\nwbegincode{697}\sublabel{NW4L0rMe-401muT-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-401muT-1}}}\moddef{RunningUscan~{\nwtagstyle{}\subpageref{NW4L0rMe-401muT-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-AVwi3-1}}\nwenddeflinemarkup 
function RunningUscan \{ 
    # Called by RunningTests BuildWithUscan  

    cd $\{GitPath\} 
    uscaninfo=$(uscan --no-download --verbose) 
    if [ $\{#uscaninfo\} -gt 0 ] 
    then 
        whiptail --title "uscan" --msgbox "$\{uscaninfo\}" --scrolltext 15 60 
        echo -e "Result of uscan:\\n"$\{uscaninfo\} >> $\{log\}
\LA{}RunningUscan1~{\nwtagstyle{}\subpageref{NW4L0rMe-taCYK-1}}\RA{} \nwused{\\{NW4L0rMe-AVwi3-1}}\nwendcode{}\nwbegindocs{698}\nwdocspar 

Here it is read from \textit{uscaninfo} whether the built version is also the current one. This applies to all builds that are to be published in \textit{experimental} or \textit{sid}. The corresponding message is: "=> Package is up to date \dots".  

\nwenddocs{}\nwbegincode{699}\sublabel{NW4L0rMe-taCYK-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-taCYK-1}}}\moddef{RunningUscan1~{\nwtagstyle{}\subpageref{NW4L0rMe-taCYK-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-401muT-1}}\nwenddeflinemarkup 
        echo $\{uscaninfo\} | grep '=> Package is up to date' > /dev/null 
        usc1=$? 
        echo $\{uscaninfo\} | grep '=> Only older package available' > /dev/null 
        usc2=$? 
        if [ $\{usc1\} -eq 0 ] 
        then 
            whiptail --title "uscan" --msgbox "Package seems to be up to date." 15 60 
            usq=0
\LA{}RunningUscan2~{\nwtagstyle{}\subpageref{NW4L0rMe-3VNYh6-1}}\RA{} \nwused{\\{NW4L0rMe-401muT-1}}\nwendcode{}\nwbegindocs{692}\nwdocspar 

\nwenddocs{}\nwbegincode{701}\sublabel{NW4L0rMe-3VNYh6-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3VNYh6-1}}}\moddef{RunningUscan2~{\nwtagstyle{}\subpageref{NW4L0rMe-3VNYh6-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-taCYK-1}}\nwenddeflinemarkup 
        elif [ $\{usc2\} -eq 0 ] 
        then 
            whiptail --title "uscan" --msgbox "Only older package available." 15 60 
            usq=0 
\LA{}RunningUscan3~{\nwtagstyle{}\subpageref{NW4L0rMe-1MXHou-1}}\RA{} \nwused{\\{NW4L0rMe-taCYK-1}}\nwendcode{}\nwbegindocs{702}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/OldPackage.png} \caption{Older package available} \end{figure} 

\nwenddocs{}\nwbegincode{703}\sublabel{NW4L0rMe-1MXHou-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1MXHou-1}}}\moddef{RunningUscan3~{\nwtagstyle{}\subpageref{NW4L0rMe-1MXHou-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-3VNYh6-1}}\nwenddeflinemarkup 
        else 
            whiptail --title "No up to date message" \\ 
            --yesno "No up to date message!\\nRegardless all well? Continue?" \\ 
            --defaultno --yes-button "Yes" --no-button "Exit" 15 60 
            usq=$? 
        fi 
\LA{}RunningUscan4~{\nwtagstyle{}\subpageref{NW4L0rMe-4YNhTs-1}}\RA{} \nwused{\\{NW4L0rMe-3VNYh6-1}}\nwendcode{}\nwbegindocs{694}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/AllWell.png} \caption{Uscan - OK?} \end{figure} 

\nwenddocs{}\nwbegincode{705}\sublabel{NW4L0rMe-4YNhTs-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4YNhTs-1}}}\moddef{RunningUscan4~{\nwtagstyle{}\subpageref{NW4L0rMe-4YNhTs-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1MXHou-1}}\nwenddeflinemarkup 
    else 
        echo "uscan failed" >> $\{log\} 
        whiptail --title "uscan failed" --msgbox "uscan failed" 15 60 
        usq=1 
    fi
 \} 

\LA{}RunningTests~{\nwtagstyle{}\subpageref{NW4L0rMe-3nHlL3-1}}\RA{} \nwused{\\{NW4L0rMe-1MXHou-1}}\nwendcode{}\nwbegindocs{696}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/UscanFailed.png} \caption{Uscan fails} \end{figure} 

\section{Checking the file \textit{debian/copyright}} 

At this point, it is checked whether \textbf{all} details of the licences\index{License verification} in the file \textit{debian/copyright} have really been made. There are several tools for this. These are described in chapter \ref{sec:LicenseCheck} (page \pageref{sec:LicenseCheck}).  

At present, this check still has to be done manually, because the use of these tools is sometimes insufficient.  

\section{Check with \textit{debdiff} and \textit{diffoscope}} 

Both programmes are used to show the difference between the current package and the previous version.  

\textit{debdiff} is installed with the \textit{devscripts} package. \textit{diffoscope}, on the other hand, must be installed additionally with the package of the same name.  

\subsection{\textit{debdiff}} \label{subsec:debdiff} 

With \textit{debdiff} file lists in two Debian packages can be compared. 

\textit{debdiff} is used in this case to prove that there are no differences between two source packets without only minor differences. 

\nwenddocs{}\nwbegincode{707}\sublabel{NW4L0rMe-1P2CeH-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-1P2CeH-1}}}\moddef{DebDiff~{\nwtagstyle{}\subpageref{NW4L0rMe-1P2CeH-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-2u5wZs-1}}\nwenddeflinemarkup 
function DebDiff \{ 
    # Called by TaskSelect 
    if [ $1 -gt 0 ] 
    then 
        whiptail --title "debdiff" \\ 
        --msgbox "Now you can detect the differences between two builds."\\n \\ 
        15 60 
    fi 

\LA{}DebDiff1~{\nwtagstyle{}\subpageref{NW4L0rMe-4kxbV-1}}\RA{} \nwused{\\{NW4L0rMe-2u5wZs-1}}\nwendcode{}\nwbegindocs{708}\nwdocspar 

\begin{figure}[h] \centering

\includegraphics[width=25em,height=30ex]{Pictures/DebDiff.png} \caption{Determine differences} \end{figure} 

For this purpose, \textit{debdiff} is passed two source packages (.dsc files). This compares the contents of the source packages. If the source packages differ only in the Debian revision number (i.e. the .orig.tar.gz files are the same in both .dsc files), then \textit{interdiff} is used to compare the two patch files. The \textit{interdiff} program from the \textit{patchutils} package must be available on the system to do this. Otherwise, a diff is performed between both source directory trees. 

\nwenddocs{}\nwbegincode{709}\sublabel{NW4L0rMe-4kxbV-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-4kxbV-1}}}\moddef{DebDiff1~{\nwtagstyle{}\subpageref{NW4L0rMe-4kxbV-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-1P2CeH-1}}\nwenddeflinemarkup 
    cd $\{PrjPath\} 
    PackageList=$(ls $\{PrjPath\} | grep \\.dsc$ | sort --reverse --version-sort)
    PackageArray=($\{PackageList\}) 

    i=0 
    for element in $\{PackageArray[*]\} 
    do 
        if [ $i -eq 0 ] 
        then 
            i=$(expr $i + 1) 
            continue
        fi
        packageE=$\{packageE\}' '$i' '$\{element\}' off ' 
        i=$(expr $i + 1)
    done 

    PackageNr=$(whiptail --title "debdiff" \\ 
    --radiolist "Which version should be compared?" 15 60 $i $\{packageE\} \\ 
    --cancel-button "Cancel" \\ 3>&2 2>&1 1>&3) 

\LA{}DebDiff4~{\nwtagstyle{}\subpageref{NW4L0rMe-3k7enB-1}}\RA{} \nwused{\\{NW4L0rMe-1P2CeH-1}}\nwendcode{}\nwbegindocs{710}\nwdocspar 

%\begin{figure}[h]
%\centering
%\includegraphics[width=25em,height=30ex]{Pictures/DebDiffSelectVersion.png}
%\caption{Welche Versionen vergleichen}
%\end{figure}
\nwenddocs{}\nwbegincode{711}\sublabel{NW4L0rMe-3k7enB-1}\nwmargintag{{\nwtagstyle{}\subpageref{NW4L0rMe-3k7enB-1}}}\moddef{DebDiff4~{\nwtagstyle{}\subpageref{NW4L0rMe-3k7enB-1}}}\endmoddef\nwstartdeflinemarkup\nwusesondefline{\\{NW4L0rMe-4kxbV-1}}\nwenddeflinemarkup 

    if [ -z "$\{PackageNr\}" ] 
    then
        CommonTasks fi  

    debdiff --diffstat $\{PackageArray[$\{PackageNr\}]\} $\{PackageArray[0]\} >> \\ 
    debdiff_$\{PackageArray[$\{PackageNr\}]\}-$\{PackageArray[0]\}.diff
 

        less debdiff_$\{PackageArray[$\{PackageNr\}]\}-$\{PackageArray[0]\}.diff 
        CommonTasks \} 

\LA{}ImportDebianPackage~{\nwtagstyle{}\subpageref{NW4L0rMe-PF5jU-1}}\RA{} \nwused{\\{NW4L0rMe-4kxbV-1}}\nwendcode{} 

\nwixlogsorted{c}{{AddGitServer}{nw@notdef}{\nwixu{NW4L0rMe-1zea7-1}}} \nwixlogsorted{c}{{AddHomeServer}{NW4L0rMe-4L4WbO-1}{\nwixu{NW4L0rMe-3OnqXO-1}\nwixd{NW4L0rMe-4L4WbO-1}}} \nwixlogsorted{c}{{AddNameAndEmail}{NW4L0rMe-1HD2qU-1}{\nwixd{NW4L0rMe-1HD2qU-1}\nwixu{NW4L0rMe-2rrHFd-1}}} \nwixlogsorted{c}{{AddNameAndEmail1}{NW4L0rMe-3OnqXO-1}{\nwixu{NW4L0rMe-1HD2qU-1}\nwixd{NW4L0rMe-3OnqXO-1}}} \nwixlogsorted{c}{{AddVersionNumber}{NW4L0rMe-35jY5q-1}{\nwixd{NW4L0rMe-35jY5q-1}\nwixu{NW4L0rMe-2jvbx-1}}} \nwixlogsorted{c}{{AddVersionNumber1}{NW4L0rMe-2gBHGD-1}{\nwixu{NW4L0rMe-35jY5q-1}\nwixd{NW4L0rMe-2gBHGD-1}}} \nwixlogsorted{c}{{AskConfig}{NW4L0rMe-3aFUbk-1}{\nwixd{NW4L0rMe-3aFUbk-1}\nwixu{NW4L0rMe-1gTQn9-1}}} \nwixlogsorted{c}{{AskConfig1}{NW4L0rMe-3WXxaw-1}{\nwixu{NW4L0rMe-3aFUbk-1}\nwixd{NW4L0rMe-3WXxaw-1}}} \nwixlogsorted{c}{{AskConfig10}{NW4L0rMe-1G9JzK-1}{\nwixu{NW4L0rMe-2U714I-1}\nwixd{NW4L0rMe-1G9JzK-1}}} \nwixlogsorted{c}{{AskConfig10-1}{NW4L0rMe-1tT2l2-1}{\nwixu{NW4L0rMe-1G9JzK-1}\nwixd{NW4L0rMe-1tT2l2-1}}} \nwixlogsorted{c}{{AskConfig11}{NW4L0rMe-3FuQhS-1}{\nwixu{NW4L0rMe-1tT2l2-1}\nwixd{NW4L0rMe-3FuQhS-1}}} \nwixlogsorted{c}{{AskConfig12}{NW4L0rMe-18lkbe-1}{\nwixu{NW4L0rMe-3FuQhS-1}\nwixd{NW4L0rMe-18lkbe-1}}} \nwixlogsorted{c}{{AskConfig15}{NW4L0rMe-2ZcCJq-1}{\nwixu{NW4L0rMe-18lkbe-1}\nwixd{NW4L0rMe-2ZcCJq-1}}} \nwixlogsorted{c}{{AskConfig15-1}{NW4L0rMe-1tT6TE-1}{\nwixu{NW4L0rMe-2ZcCJq-1}\nwixd{NW4L0rMe-1tT6TE-1}}} \nwixlogsorted{c}{{AskConfig18}{NW4L0rMe-1ehcju-1}{\nwixu{NW4L0rMe-1tT6TE-1}\nwixd{NW4L0rMe-1ehcju-1}}} \nwixlogsorted{c}{{AskConfig18-1}{NW4L0rMe-1tT0jc-1}{\nwixu{NW4L0rMe-1ehcju-1}\nwixd{NW4L0rMe-1tT0jc-1}}} \nwixlogsorted{c}{{AskConfig19}{NW4L0rMe-3DDExq-1}{\nwixu{NW4L0rMe-1tT0jc-1}\nwixd{NW4L0rMe-3DDExq-1}}} \nwixlogsorted{c}{{AskConfig2}{NW4L0rMe-1SoT3u-1}{\nwixu{NW4L0rMe-3WXxaw-1}\nwixd{NW4L0rMe-1SoT3u-1}}} \nwixlogsorted{c}{{AskConfig20}{NW4L0rMe-1FcBaw-1}{\nwixu{NW4L0rMe-3DDExq-1}\nwixd{NW4L0rMe-1FcBaw-1}}} \nwixlogsorted{c}{{AskConfig22}{NW4L0rMe-19N0jW-1}{\nwixu{NW4L0rMe-1FcBaw-1}\nwixd{NW4L0rMe-19N0jW-1}}} \nwixlogsorted{c}{{AskConfig3}{NW4L0rMe-3QImjW-1}{\nwixu{NW4L0rMe-1SoT3u-1}\nwixd{NW4L0rMe-3QImjW-1}}} \nwixlogsorted{c}{{AskConfig3-1}{NW4L0rMe-3AWmCJ-1}{\nwixu{NW4L0rMe-3QImjW-1}\nwixd{NW4L0rMe-3AWmCJ-1}}} \nwixlogsorted{c}{{AskConfig4}{NW4L0rMe-9LajO-1}{\nwixu{NW4L0rMe-3AWmCJ-1}\nwixd{NW4L0rMe-9LajO-1}}} \nwixlogsorted{c}{{AskConfig5}{NW4L0rMe-4dWUCc-1}{\nwixu{NW4L0rMe-9LajO-1}\nwixd{NW4L0rMe-4dWUCc-1}}} \nwixlogsorted{c}{{AskConfig5-1}{NW4L0rMe-3AWq4p-1}{\nwixu{NW4L0rMe-4dWUCc-1}\nwixd{NW4L0rMe-3AWq4p-1}}} \nwixlogsorted{c}{{AskConfig5-2}{NW4L0rMe-dH415-1}{\nwixu{NW4L0rMe-3AWq4p-1}\nwixd{NW4L0rMe-dH415-1}}} \nwixlogsorted{c}{{AskConfig6}{NW4L0rMe-26Gi8s-1}{\nwixu{NW4L0rMe-dH415-1}\nwixd{NW4L0rMe-26Gi8s-1}}} \nwixlogsorted{c}{{AskConfig7}{NW4L0rMe-2U714I-1}{\nwixu{NW4L0rMe-26Gi8s-1}\nwixd{NW4L0rMe-2U714I-1}}} \nwixlogsorted{c}{{AskDist}{NW4L0rMe-2sUMSc-1}{\nwixd{NW4L0rMe-2sUMSc-1}\nwixu{NW4L0rMe-27Aw5E-1}}} \nwixlogsorted{c}{{AskDist0}{NW4L0rMe-1FocXF-1}{\nwixu{NW4L0rMe-2sUMSc-1}\nwixd{NW4L0rMe-1FocXF-1}}} \nwixlogsorted{c}{{AskDist1}{NW4L0rMe-3FZjFN-1}{\nwixu{NW4L0rMe-1FocXF-1}\nwixd{NW4L0rMe-3FZjFN-1}}} \nwixlogsorted{c}{{AskDist2}{NW4L0rMe-18R39Z-1}{\nwixu{NW4L0rMe-3FZjFN-1}\nwixd{NW4L0rMe-18R39Z-1}}} \nwixlogsorted{c}{{AskDist5}{NW4L0rMe-2Zqh7t-1}{\nwixu{NW4L0rMe-18R39Z-1}\nwixd{NW4L0rMe-2Zqh7t-1}}} \nwixlogsorted{c}{{AskOrigName}{NW4L0rMe-4d0TUI-1}{\nwixd{NW4L0rMe-4d0TUI-1}\nwixu{NW4L0rMe-3CAFBW-1}}} \nwixlogsorted{c}{{AskOrigName1}{NW4L0rMe-2dk0pw-1}{\nwixu{NW4L0rMe-4d0TUI-1}\nwixd{NW4L0rMe-2dk0pw-1}}} \nwixlogsorted{c}{{AskOrigName2}{NW4L0rMe-a0WIu-1}{\nwixu{NW4L0rMe-2dk0pw-1}\nwixd{NW4L0rMe-a0WIu-1}}} \nwixlogsorted{c}{{Bashrc}{NW4L0rMe-1U7K3A-1}{\nwixd{NW4L0rMe-1U7K3A-1}}} \nwixlogsorted{c}{{BuildApp}{NW4L0rMe-1tFcJG-1}{\nwixd{NW4L0rMe-1tFcJG-1}\nwixu{NW4L0rMe-a0WIu-1}}} \nwixlogsorted{c}{{BuildApp10}{NW4L0rMe-2uaRFM-1}{\nwixu{NW4L0rMe-2IHETL-1}\nwixd{NW4L0rMe-2uaRFM-1}}} \nwixlogsorted{c}{{BuildApp3}{NW4L0rMe-4KRvn1-1}{\nwixu{NW4L0rMe-1tFcJG-1}\nwixd{NW4L0rMe-4KRvn1-1}}} \nwixlogsorted{c}{{BuildApp7}{NW4L0rMe-3pVebz-1}{\nwixu{NW4L0rMe-4KRvn1-1}\nwixd{NW4L0rMe-3pVebz-1}}} \nwixlogsorted{c}{{BuildApp8}{NW4L0rMe-2IHETL-1}{\nwixu{NW4L0rMe-3pVebz-1}\nwixd{NW4L0rMe-2IHETL-1}}} \nwixlogsorted{c}{{BuildNewPackage}{NW4L0rMe-1uGjo9-1}{\nwixd{NW4L0rMe-1uGjo9-1}\nwixu{NW4L0rMe-4L4WbO-1}}} \nwixlogsorted{c}{{BuildNewPackage2}{NW4L0rMe-2eDXeg-1}{\nwixu{NW4L0rMe-1uGjo9-1}\nwixd{NW4L0rMe-2eDXeg-1}}} \nwixlogsorted{c}{{BuildNewPackage3}{NW4L0rMe-1rOXHa-1}{\nwixd{NW4L0rMe-1rOXHa-1}\nwixu{NW4L0rMe-2eDXeg-1}}} \nwixlogsorted{c}{{BuildNewPackage5}{NW4L0rMe-d2RIE-1}{\nwixu{NW4L0rMe-1rOXHa-1}\nwixd{NW4L0rMe-d2RIE-1}}} \nwixlogsorted{c}{{BuildNewPackage6}{NW4L0rMe-3BQbsE-1}{\nwixd{NW4L0rMe-3BQbsE-1}\nwixu{NW4L0rMe-d2RIE-1}}} \nwixlogsorted{c}{{BuildNewRevision}{NW4L0rMe-15yPgd-1}{\nwixd{NW4L0rMe-15yPgd-1}\nwixu{NW4L0rMe-1gsx31-1}}} \nwixlogsorted{c}{{BuildNewRevision2}{NW4L0rMe-3WaC5w-1}{\nwixd{NW4L0rMe-3WaC5w-1}\nwixu{NW4L0rMe-15yPgd-1}}} \nwixlogsorted{c}{{BuildNewRevision4}{NW4L0rMe-2Ta3JA-1}{\nwixu{NW4L0rMe-3WaC5w-1}\nwixd{NW4L0rMe-2Ta3JA-1}}} \nwixlogsorted{c}{{BuildNewRevision5}{NW4L0rMe-25jkNk-1}{\nwixu{NW4L0rMe-2Ta3JA-1}\nwixd{NW4L0rMe-25jkNk-1}}} \nwixlogsorted{c}{{BuildNewRevision5-1}{NW4L0rMe-361nEZ-1}{\nwixu{NW4L0rMe-25jkNk-1}\nwixd{NW4L0rMe-361nEZ-1}}} \nwixlogsorted{c}{{BuildNewRevision6}{NW4L0rMe-4e7uxk-1}{\nwixu{NW4L0rMe-361nEZ-1}\nwixd{NW4L0rMe-4e7uxk-1}}} \nwixlogsorted{c}{{BuildNewRevision8}{NW4L0rMe-30vv5k-1}{\nwixu{NW4L0rMe-4KEAEt-1}\nwixd{NW4L0rMe-30vv5k-1}}} \nwixlogsorted{c}{{BuildNewVersion}{NW4L0rMe-3kBVPO-1}{\nwixd{NW4L0rMe-3kBVPO-1}\nwixu{NW4L0rMe-fSXSs-1}}} \nwixlogsorted{c}{{BuildNewVersion10}{NW4L0rMe-1LsmoY-1}{\nwixu{NW4L0rMe-2RcgNi-1}\nwixd{NW4L0rMe-1LsmoY-1}}} \nwixlogsorted{c}{{BuildNewVersion11}{NW4L0rMe-3SSGeE-1}{\nwixu{NW4L0rMe-1LsmoY-1}\nwixd{NW4L0rMe-3SSGeE-1}}} \nwixlogsorted{c}{{BuildNewVersion11-1}{NW4L0rMe-2uTVOz-1}{\nwixu{NW4L0rMe-3SSGeE-1}\nwixd{NW4L0rMe-2uTVOz-1}}} \nwixlogsorted{c}{{BuildNewVersion12}{NW4L0rMe-wKt6k-1}{\nwixu{NW4L0rMe-2uTVOz-1}\nwixd{NW4L0rMe-wKt6k-1}}} \nwixlogsorted{c}{{BuildNewVersion13}{NW4L0rMe-3dF1ag-1}{\nwixu{NW4L0rMe-wKt6k-1}\nwixd{NW4L0rMe-3dF1ag-1}}} \nwixlogsorted{c}{{BuildNewVersion14}{NW4L0rMe-28QC3a-1}{\nwixu{NW4L0rMe-3dF1ag-1}\nwixd{NW4L0rMe-28QC3a-1}}} \nwixlogsorted{c}{{BuildNewVersion15}{NW4L0rMe-2NBKow-1}{\nwixu{NW4L0rMe-28QC3a-1}\nwixd{NW4L0rMe-2NBKow-1}}} \nwixlogsorted{c}{{BuildNewVersion3}{NW4L0rMe-48DroU-1}{\nwixu{NW4L0rMe-3kBVPO-1}\nwixd{NW4L0rMe-48DroU-1}}} \nwixlogsorted{c}{{BuildNewVersion4}{NW4L0rMe-1Wi6nm-1}{\nwixu{NW4L0rMe-48DroU-1}\nwixd{NW4L0rMe-1Wi6nm-1}}} \nwixlogsorted{c}{{BuildNewVersion4-1}{NW4L0rMe-3CrH1m-1}{\nwixu{NW4L0rMe-1Wi6nm-1}\nwixd{NW4L0rMe-3CrH1m-1}}} \nwixlogsorted{c}{{BuildNewVersion4-2}{NW4L0rMe-b3ut0-1}{\nwixu{NW4L0rMe-3CrH1m-1}\nwixd{NW4L0rMe-b3ut0-1}}} \nwixlogsorted{c}{{BuildNewVersion5}{NW4L0rMe-32wvzC-1}{\nwixu{NW4L0rMe-b3ut0-1}\nwixd{NW4L0rMe-32wvzC-1}}} \nwixlogsorted{c}{{BuildNewVersion5-1}{NW4L0rMe-3CrE1y-1}{\nwixu{NW4L0rMe-32wvzC-1}\nwixd{NW4L0rMe-3CrE1y-1}}} \nwixlogsorted{c}{{BuildNewVersion5-2}{NW4L0rMe-b3rtC-1}{\nwixu{NW4L0rMe-3CrE1y-1}\nwixd{NW4L0rMe-b3rtC-1}}} \nwixlogsorted{c}{{BuildNewVersion6}{NW4L0rMe-lahD4-1}{\nwixu{NW4L0rMe-b3rtC-1}\nwixd{NW4L0rMe-lahD4-1}}} \nwixlogsorted{c}{{BuildNewVersion6-1}{NW4L0rMe-3CrLzO-1}{\nwixu{NW4L0rMe-lahD4-1}\nwixd{NW4L0rMe-3CrLzO-1}}} \nwixlogsorted{c}{{BuildNewVersion6-2}{NW4L0rMe-b3zqc-1}{\nwixu{NW4L0rMe-3CrLzO-1}\nwixd{NW4L0rMe-b3zqc-1}}} \nwixlogsorted{c}{{BuildNewVersion6-3}{NW4L0rMe-3uZa1K-1}{\nwixu{NW4L0rMe-b3zqc-1}\nwixd{NW4L0rMe-3uZa1K-1}}} \nwixlogsorted{c}{{BuildNewVersion6-4}{NW4L0rMe-1tOTes-1}{\nwixu{NW4L0rMe-3uZa1K-1}\nwixd{NW4L0rMe-1tOTes-1}}} \nwixlogsorted{c}{{BuildNewVersion7}{NW4L0rMe-42pULG-1}{\nwixu{NW4L0rMe-1tOTes-1}\nwixd{NW4L0rMe-42pULG-1}}} \nwixlogsorted{c}{{BuildNewVersion8}{NW4L0rMe-23mNSI-1}{\nwixu{NW4L0rMe-42pULG-1}\nwixd{NW4L0rMe-23mNSI-1}}} \nwixlogsorted{c}{{BuildNewVersion9}{NW4L0rMe-2RcgNi-1}{\nwixu{NW4L0rMe-23mNSI-1}\nwixd{NW4L0rMe-2RcgNi-1}}} \nwixlogsorted{c}{{BuildWithUscan}{NW4L0rMe-HGNcf-1}{\nwixd{NW4L0rMe-HGNcf-1}\nwixu{NW4L0rMe-4V2sOW-1}}} \nwixlogsorted{c}{{BuildWithUscan4}{NW4L0rMe-43n51H-1}{\nwixu{NW4L0rMe-HGNcf-1}\nwixd{NW4L0rMe-43n51H-1}}} \nwixlogsorted{c}{{BuildWithUscan5}{NW4L0rMe-kHUqZ-1}{\nwixu{NW4L0rMe-43n51H-1}\nwixd{NW4L0rMe-kHUqZ-1}}} \nwixlogsorted{c}{{BuildWithUscan5-1}{NW4L0rMe-3f5YTj-1}{\nwixu{NW4L0rMe-kHUqZ-1}\nwixd{NW4L0rMe-3f5YTj-1}}} \nwixlogsorted{c}{{BuildWithUscan6}{NW4L0rMe-33uWfD-1}{\nwixu{NW4L0rMe-3f5YTj-1}\nwixd{NW4L0rMe-33uWfD-1}}} \nwixlogsorted{c}{{BuildWithUscan7}{NW4L0rMe-1VOuRH-1}{\nwixu{NW4L0rMe-33uWfD-1}\nwixd{NW4L0rMe-1VOuRH-1}}} \nwixlogsorted{c}{{ChangeEntry}{NW4L0rMe-1IRwiW-1}{\nwixd{NW4L0rMe-1IRwiW-1}}} \nwixlogsorted{c}{{ChangePatches}{NW4L0rMe-3aoew0-1}{\nwixu{NW4L0rMe-1PELy0-1}\nwixd{NW4L0rMe-3aoew0-1}}} \nwixlogsorted{c}{{CheckGitStatus}{NW4L0rMe-1vqolW-1}{\nwixd{NW4L0rMe-1vqolW-1}\nwixu{NW4L0rMe-jJHLT-1}}} \nwixlogsorted{c}{{CheckRepackSuffix}{NW4L0rMe-4V2sOW-1}{\nwixd{NW4L0rMe-4V2sOW-1}\nwixu{NW4L0rMe-1fxvHr-1}}} \nwixlogsorted{c}{{CheckSignature}{NW4L0rMe-3GSX0A-1}{\nwixu{NW4L0rMe-daBbo-1}\nwixd{NW4L0rMe-3GSX0A-1}}} \nwixlogsorted{c}{{CheckTags}{NW4L0rMe-1GBX6B-1}{\nwixu{NW4L0rMe-1vqolW-1}\nwixd{NW4L0rMe-1GBX6B-1}}} \nwixlogsorted{c}{{CheckTags2}{NW4L0rMe-49hGIo-1}{\nwixu{NW4L0rMe-1GBX6B-1}\nwixd{NW4L0rMe-49hGIo-1}}} \nwixlogsorted{c}{{CheckTags3}{NW4L0rMe-RCygQ-1}{\nwixu{NW4L0rMe-49hGIo-1}\nwixd{NW4L0rMe-RCygQ-1}}} \nwixlogsorted{c}{{ClassicalOrUscan}{NW4L0rMe-42gj5Q-1}{\nwixu{NW4L0rMe-3PGErV-1}\nwixd{NW4L0rMe-42gj5Q-1}}} \nwixlogsorted{c}{{ClassicalOrUscan1}{NW4L0rMe-3kcUaX-1}{\nwixu{NW4L0rMe-42gj5Q-1}\nwixd{NW4L0rMe-3kcUaX-1}}} \nwixlogsorted{c}{{ClassicalOrUscan1-1}{NW4L0rMe-2qrPTU-1}{\nwixu{NW4L0rMe-3kcUaX-1}\nwixd{NW4L0rMe-2qrPTU-1}}} \nwixlogsorted{c}{{ClassicalOrUscan2}{NW4L0rMe-1EV733-1}{\nwixu{NW4L0rMe-2qrPTU-1}\nwixd{NW4L0rMe-1EV733-1}}} \nwixlogsorted{c}{{ClassicalOrUscan3}{NW4L0rMe-3L4asj-1}{\nwixu{NW4L0rMe-1EV733-1}\nwixd{NW4L0rMe-3L4asj-1}}} \nwixlogsorted{c}{{ClassicalOrUscan5}{NW4L0rMe-4QLWi1-1}{\nwixu{NW4L0rMe-3L4asj-1}\nwixd{NW4L0rMe-4QLWi1-1}}} \nwixlogsorted{c}{{CloneFromSalsa}{NW4L0rMe-NVYSY-1}{\nwixd{NW4L0rMe-NVYSY-1}\nwixu{NW4L0rMe-OrTYh-1}}} \nwixlogsorted{c}{{CloneFromSalsa2}{NW4L0rMe-MXeZO-1}{\nwixu{NW4L0rMe-NVYSY-1}\nwixd{NW4L0rMe-MXeZO-1}}} \nwixlogsorted{c}{{CloneFromSalsa3}{NW4L0rMe-4E76Lq-1}{\nwixu{NW4L0rMe-MXeZO-1}\nwixd{NW4L0rMe-4E76Lq-1}}} \nwixlogsorted{c}{{CloneFromSalsa5}{NW4L0rMe-2wv13q-1}{\nwixu{NW4L0rMe-4E76Lq-1}\nwixd{NW4L0rMe-2wv13q-1}}} \nwixlogsorted{c}{{CloneFromSalsa7}{NW4L0rMe-41L9Uw-1}{\nwixu{NW4L0rMe-2wv13q-1}\nwixd{NW4L0rMe-41L9Uw-1}}} \nwixlogsorted{c}{{CmeFix}{NW4L0rMe-1LZU6O-1}{\nwixd{NW4L0rMe-1LZU6O-1}\nwixu{NW4L0rMe-3y9lo5-1}}} \nwixlogsorted{c}{{cmefix1}{NW4L0rMe-3LjOLe-1}{\nwixu{NW4L0rMe-1LZU6O-1}\nwixd{NW4L0rMe-3LjOLe-1}}} \nwixlogsorted{c}{{CommonTasks}{NW4L0rMe-3CAFBW-1}{\nwixu{NW4L0rMe-17dpue-1}\nwixd{NW4L0rMe-3CAFBW-1}}} \nwixlogsorted{c}{{ConfigFileLEC}{NW4L0rMe-QjVKo-1}{\nwixd{NW4L0rMe-QjVKo-1}\nwixu{NW4L0rMe-1vvaZu-1}}} \nwixlogsorted{c}{{ConfigFileLEC1}{NW4L0rMe-3B7jzR-1}{\nwixu{NW4L0rMe-QjVKo-1}\nwixd{NW4L0rMe-3B7jzR-1}}} \nwixlogsorted{c}{{ConfigFileLEC2}{NW4L0rMe-cjZPR-1}{\nwixu{NW4L0rMe-3B7jzR-1}\nwixd{NW4L0rMe-cjZPR-1}}} \nwixlogsorted{c}{{ConfigFileLEC3}{NW4L0rMe-3wF9a9-1}{\nwixu{NW4L0rMe-cjZPR-1}\nwixd{NW4L0rMe-3wF9a9-1}}} \nwixlogsorted{c}{{ConfigFileLEC4}{NW4L0rMe-1rerev-1}{\nwixd{NW4L0rMe-1rerev-1}\nwixu{NW4L0rMe-3wF9a9-1}}} \nwixlogsorted{c}{{ConfigFileLEC5}{NW4L0rMe-2eTs21-1}{\nwixu{NW4L0rMe-1rerev-1}\nwixd{NW4L0rMe-2eTs21-1}}} \nwixlogsorted{c}{{ConfigFileLEC6}{NW4L0rMe-Zbyyj-1}{\nwixu{NW4L0rMe-2eTs21-1}\nwixd{NW4L0rMe-Zbyyj-1}}} \nwixlogsorted{c}{{ConfigFileLEC7}{NW4L0rMe-4I6Gb7-1}{\nwixu{NW4L0rMe-Zbyyj-1}\nwixd{NW4L0rMe-4I6Gb7-1}}} \nwixlogsorted{c}{{CreateDirsAndLogfile}{NW4L0rMe-C6pCp-1}{\nwixu{NW4L0rMe-4I6Gb7-1}\nwixd{NW4L0rMe-C6pCp-1}}} \nwixlogsorted{c}{{CreateDquilt}{NW4L0rMe-2bkGIk-1}{\nwixd{NW4L0rMe-2bkGIk-1}\nwixu{NW4L0rMe-26Q7wV-1}}} \nwixlogsorted{c}{{CreateDquilt1}{NW4L0rMe-2sRlVv-1}{\nwixu{NW4L0rMe-2bkGIk-1}\nwixd{NW4L0rMe-2sRlVv-1}}} \nwixlogsorted{c}{{CreateDquilt2}{NW4L0rMe-LBzSB-1}{\nwixu{NW4L0rMe-2sRlVv-1}\nwixd{NW4L0rMe-LBzSB-1}}} \nwixlogsorted{c}{{CreateLogFile}{NW4L0rMe-BUXUI-1}{\nwixu{NW4L0rMe-C6pCp-1}\nwixd{NW4L0rMe-BUXUI-1}}} \nwixlogsorted{c}{{CreateNewBranch}{nw@notdef}{\nwixu{NW4L0rMe-1YaJyO-1}}} \nwixlogsorted{c}{{CreateNewCow}{NW4L0rMe-26QStU-1}{\nwixu{NW4L0rMe-wuL1-1}\nwixd{NW4L0rMe-26QStU-1}}} \nwixlogsorted{c}{{CreateNewCow1}{NW4L0rMe-4UgTuZ-1}{\nwixu{NW4L0rMe-26QStU-1}\nwixd{NW4L0rMe-4UgTuZ-1}}} \nwixlogsorted{c}{{CreateNewPatch}{NW4L0rMe-32SiEI-1}{\nwixd{NW4L0rMe-32SiEI-1}\nwixu{NW4L0rMe-4R2L2m-1}}} \nwixlogsorted{c}{{CreateNewPatch1}{NW4L0rMe-3Pt0H1-1}{\nwixu{NW4L0rMe-32SiEI-1}\nwixd{NW4L0rMe-3Pt0H1-1}}} \nwixlogsorted{c}{{CreateNewPatch2}{NW4L0rMe-yJCoZ-1}{\nwixu{NW4L0rMe-3Pt0H1-1}\nwixd{NW4L0rMe-yJCoZ-1}}} \nwixlogsorted{c}{{CreateNewPatch4}{NW4L0rMe-26Q7wV-1}{\nwixu{NW4L0rMe-yJCoZ-1}\nwixd{NW4L0rMe-26Q7wV-1}}} \nwixlogsorted{c}{{CreateSchroot}{NW4L0rMe-3vEcmx-1}{\nwixu{NW4L0rMe-1NlbiI-1}\nwixd{NW4L0rMe-3vEcmx-1}}} \nwixlogsorted{c}{{CreateSchroot2}{NW4L0rMe-4V7noF-1}{\nwixu{NW4L0rMe-3vEcmx-1}\nwixd{NW4L0rMe-4V7noF-1}}} \nwixlogsorted{c}{{CreateSchroot3}{NW4L0rMe-wuL1-1}{\nwixu{NW4L0rMe-4V7noF-1}\nwixd{NW4L0rMe-wuL1-1}}} \nwixlogsorted{c}{{CutSuffix}{NW4L0rMe-8Lh7T-1}{\nwixu{NW4L0rMe-41L9Uw-1}\nwixd{NW4L0rMe-8Lh7T-1}}} \nwixlogsorted{c}{{CutSuffix1}{NW4L0rMe-2KAwru-1}{\nwixu{NW4L0rMe-8Lh7T-1}\nwixd{NW4L0rMe-2KAwru-1}}} \nwixlogsorted{c}{{DebDiff}{NW4L0rMe-1P2CeH-1}{\nwixu{NW4L0rMe-2u5wZs-1}\nwixd{NW4L0rMe-1P2CeH-1}}} \nwixlogsorted{c}{{DebDiff1}{NW4L0rMe-4kxbV-1}{\nwixu{NW4L0rMe-1P2CeH-1}\nwixd{NW4L0rMe-4kxbV-1}}} \nwixlogsorted{c}{{DebDiff4}{NW4L0rMe-3k7enB-1}{\nwixu{NW4L0rMe-4kxbV-1}\nwixd{NW4L0rMe-3k7enB-1}}} \nwixlogsorted{c}{{debian/gbp.conf}{NW4L0rMe-1I7oMK-1}{\nwixd{NW4L0rMe-1I7oMK-1}}} \nwixlogsorted{c}{{DebianBranch4Import}{NW4L0rMe-1O5B2o-1}{\nwixd{NW4L0rMe-1O5B2o-1}\nwixu{NW4L0rMe-3J7Lxr-1}}} \nwixlogsorted{c}{{DebianBranches}{NW4L0rMe-4UIoSF-1}{\nwixd{NW4L0rMe-4UIoSF-1}\nwixu{NW4L0rMe-1IRwiW-1}}} \nwixlogsorted{c}{{DebianBranches1}{NW4L0rMe-1YaJyO-1}{\nwixu{NW4L0rMe-4UIoSF-1}\nwixd{NW4L0rMe-1YaJyO-1}}} \nwixlogsorted{c}{{DebianBranchName}{NW4L0rMe-4RhSCg-1}{\nwixd{NW4L0rMe-4RhSCg-1}\nwixu{NW4L0rMe-2ZbxsM-1}}} \nwixlogsorted{c}{{DebianBranchName2}{NW4L0rMe-Tj9lI-1}{\nwixu{NW4L0rMe-4RhSCg-1}\nwixd{NW4L0rMe-Tj9lI-1}}} \nwixlogsorted{c}{{DebianBranchName3}{NW4L0rMe-4NZOaG-1}{\nwixu{NW4L0rMe-Tj9lI-1}\nwixd{NW4L0rMe-4NZOaG-1}}} \nwixlogsorted{c}{{DebianControlTemplate}{NW4L0rMe-4LaGcs-1}{\nwixu{NW4L0rMe-1jKrXH-1}\nwixd{NW4L0rMe-4LaGcs-1}}} \nwixlogsorted{c}{{DebianControlTemplate1}{NW4L0rMe-2jxiZh-1}{\nwixu{NW4L0rMe-4LaGcs-1}\nwixd{NW4L0rMe-2jxiZh-1}}} \nwixlogsorted{c}{{DebianControlTemplate10}{NW4L0rMe-44glDT-1}{\nwixu{NW4L0rMe-2XtlXx-1}\nwixd{NW4L0rMe-44glDT-1}}} \nwixlogsorted{c}{{DebianControlTemplate11}{NW4L0rMe-nRy5H-1}{\nwixu{NW4L0rMe-44glDT-1}\nwixd{NW4L0rMe-nRy5H-1}}} \nwixlogsorted{c}{{DebianControlTemplate2}{NW4L0rMe-TjsJp-1}{\nwixu{NW4L0rMe-2jxiZh-1}\nwixd{NW4L0rMe-TjsJp-1}}} \nwixlogsorted{c}{{DebianControlTemplate3}{NW4L0rMe-4Na78n-1}{\nwixu{NW4L0rMe-TjsJp-1}\nwixd{NW4L0rMe-4Na78n-1}}} \nwixlogsorted{c}{{DebianControlTemplate4}{NW4L0rMe-1ifAZJ-1}{\nwixd{NW4L0rMe-1ifAZJ-1}\nwixu{NW4L0rMe-4Na78n-1}}} \nwixlogsorted{c}{{DebianControlTemplate5}{NW4L0rMe-35opaf-1}{\nwixu{NW4L0rMe-1ifAZJ-1}\nwixd{NW4L0rMe-35opaf-1}}} \nwixlogsorted{c}{{DebianControlTemplate6}{NW4L0rMe-imcDF-1}{\nwixu{NW4L0rMe-35opaf-1}\nwixd{NW4L0rMe-imcDF-1}}} \nwixlogsorted{c}{{DebianControlTemplate7}{NW4L0rMe-3qwFBN-1}{\nwixd{NW4L0rMe-3qwFBN-1}\nwixu{NW4L0rMe-imcDF-1}}} \nwixlogsorted{c}{{DebianControlTemplate8}{NW4L0rMe-2J8cmb-1}{\nwixu{NW4L0rMe-3qwFBN-1}\nwixd{NW4L0rMe-2J8cmb-1}}} \nwixlogsorted{c}{{DebianControlTemplate9}{NW4L0rMe-2XtlXx-1}{\nwixu{NW4L0rMe-2J8cmb-1}\nwixd{NW4L0rMe-2XtlXx-1}}} \nwixlogsorted{c}{{DebianCopyrightTemplate}{NW4L0rMe-6NMqQ-1}{\nwixu{NW4L0rMe-4ZSmPc-1}\nwixd{NW4L0rMe-6NMqQ-1}}} \nwixlogsorted{c}{{DebianCopyrightTemplate2}{NW4L0rMe-2CHiV-1}{\nwixu{NW4L0rMe-6NMqQ-1}\nwixd{NW4L0rMe-2CHiV-1}}} \nwixlogsorted{c}{{DebianFormatTemplate}{NW4L0rMe-2aLmeT-1}{\nwixu{NW4L0rMe-2NBKow-1}\nwixd{NW4L0rMe-2aLmeT-1}}} \nwixlogsorted{c}{{DebianJavabuildTemplate}{NW4L0rMe-f58lA-1}{\nwixd{NW4L0rMe-f58lA-1}\nwixu{NW4L0rMe-2gBHGD-1}}} \nwixlogsorted{c}{{DebianRulesTemplate}{NW4L0rMe-3xiV7R-1}{\nwixu{NW4L0rMe-ssxO7-1}\nwixd{NW4L0rMe-3xiV7R-1}}} \nwixlogsorted{c}{{DebianRulesTemplate1}{NW4L0rMe-YayWD-1}{\nwixu{NW4L0rMe-3xiV7R-1}\nwixd{NW4L0rMe-YayWD-1}}} \nwixlogsorted{c}{{DebianRulesTemplate10}{NW4L0rMe-3wCerJ-1}{\nwixu{NW4L0rMe-1druLV-1}\nwixd{NW4L0rMe-3wCerJ-1}}} \nwixlogsorted{c}{{DebianRulesTemplate11}{NW4L0rMe-ch4gb-1}{\nwixu{NW4L0rMe-3wCerJ-1}\nwixd{NW4L0rMe-ch4gb-1}}} \nwixlogsorted{c}{{DebianRulesTemplate2}{NW4L0rMe-2fjec1-1}{\nwixu{NW4L0rMe-YayWD-1}\nwixd{NW4L0rMe-2fjec1-1}}} \nwixlogsorted{c}{{DebianRulesTemplate3}{NW4L0rMe-1qdrCP-1}{\nwixu{NW4L0rMe-2fjec1-1}\nwixd{NW4L0rMe-1qdrCP-1}}} \nwixlogsorted{c}{{DebianRulesTemplate4}{NW4L0rMe-3vE97d-1}{\nwixu{NW4L0rMe-1qdrCP-1}\nwixd{NW4L0rMe-3vE97d-1}}} \nwixlogsorted{c}{{DebianRulesTemplate5}{NW4L0rMe-dzLzR-1}{\nwixu{NW4L0rMe-3vE97d-1}\nwixd{NW4L0rMe-dzLzR-1}}} \nwixlogsorted{c}{{DebianRulesTemplate6}{NW4L0rMe-3A6jWv-1}{\nwixu{NW4L0rMe-dzLzR-1}\nwixd{NW4L0rMe-3A6jWv-1}}} \nwixlogsorted{c}{{DebianRulesTemplate7}{NW4L0rMe-1druLV-1}{\nwixu{NW4L0rMe-3A6jWv-1}\nwixd{NW4L0rMe-1druLV-1}}} \nwixlogsorted{c}{{DebianSalsaCiTemplate}{NW4L0rMe-3r5YFV-1}{\nwixu{NW4L0rMe-ch4gb-1}\nwixd{NW4L0rMe-3r5YFV-1}}} \nwixlogsorted{c}{{DebianUpstreamMetadataTemplate}{NW4L0rMe-4ZSmPc-1}{\nwixu{NW4L0rMe-2aLmeT-1}\nwixd{NW4L0rMe-4ZSmPc-1}}} \nwixlogsorted{c}{{DebianWatchTemplate}{NW4L0rMe-2DatyJ-1}{\nwixd{NW4L0rMe-2DatyJ-1}\nwixu{NW4L0rMe-1GH9XQ-1}}} \nwixlogsorted{c}{{DebianWatchTemplate3}{NW4L0rMe-ssxO7-1}{\nwixu{NW4L0rMe-2DatyJ-1}\nwixd{NW4L0rMe-ssxO7-1}}} \nwixlogsorted{c}{{DEBValues}{NW4L0rMe-1BrXdv-1}{\nwixd{NW4L0rMe-1BrXdv-1}\nwixu{NW4L0rMe-5jHyT-1}}} \nwixlogsorted{c}{{DEBValues3}{NW4L0rMe-14bQN1-1}{\nwixu{NW4L0rMe-1BrXdv-1}\nwixd{NW4L0rMe-14bQN1-1}}} \nwixlogsorted{c}{{DEBValues5}{NW4L0rMe-2IOK6F-1}{\nwixu{NW4L0rMe-14bQN1-1}\nwixd{NW4L0rMe-2IOK6F-1}}} \nwixlogsorted{c}{{DEBValues5-1}{NW4L0rMe-nA1m5-1}{\nwixu{NW4L0rMe-2IOK6F-1}\nwixd{NW4L0rMe-nA1m5-1}}} \nwixlogsorted{c}{{DEBValues5-2}{NW4L0rMe-3174zR-1}{\nwixu{NW4L0rMe-nA1m5-1}\nwixd{NW4L0rMe-3174zR-1}}} \nwixlogsorted{c}{{DEBValues6}{NW4L0rMe-4RnnEZ-1}{\nwixu{NW4L0rMe-3174zR-1}\nwixd{NW4L0rMe-4RnnEZ-1}}} \nwixlogsorted{c}{{DEBValues7}{NW4L0rMe-8yqxv-1}{\nwixu{NW4L0rMe-4RnnEZ-1}\nwixd{NW4L0rMe-8yqxv-1}}} \nwixlogsorted{c}{{DEBValues8}{NW4L0rMe-38lJb9-1}{\nwixu{NW4L0rMe-8yqxv-1}\nwixd{NW4L0rMe-38lJb9-1}}} \nwixlogsorted{c}{{DEBValues9}{NW4L0rMe-1jKrXH-1}{\nwixu{NW4L0rMe-38lJb9-1}\nwixd{NW4L0rMe-1jKrXH-1}}} \nwixlogsorted{c}{{DeletePatch}{NW4L0rMe-Pholv-1}{\nwixd{NW4L0rMe-Pholv-1}\nwixu{NW4L0rMe-3aoew0-1}}} \nwixlogsorted{c}{{DeletePatches}{NW4L0rMe-4kh8u-1}{\nwixd{NW4L0rMe-4kh8u-1}\nwixu{NW4L0rMe-Pholv-1}}} \nwixlogsorted{c}{{DetectPlugins}{NW4L0rMe-4V5mzF-1}{\nwixd{NW4L0rMe-4V5mzF-1}\nwixu{NW4L0rMe-7ORWt-1}}} \nwixlogsorted{c}{{DetectPlugins3}{NW4L0rMe-1gTQn9-1}{\nwixu{NW4L0rMe-4V5mzF-1}\nwixd{NW4L0rMe-1gTQn9-1}}} \nwixlogsorted{c}{{DisplayDebianChangelog}{NW4L0rMe-2lL6hV-1}{\nwixu{NW4L0rMe-f58lA-1}\nwixd{NW4L0rMe-2lL6hV-1}}} \nwixlogsorted{c}{{DisplayDebianChangelog1}{NW4L0rMe-In4cP-1}{\nwixu{NW4L0rMe-2lL6hV-1}\nwixd{NW4L0rMe-In4cP-1}}} \nwixlogsorted{c}{{DisplayDebianChangelog3}{NW4L0rMe-1wPTBV-1}{\nwixu{NW4L0rMe-In4cP-1}\nwixd{NW4L0rMe-1wPTBV-1}}} \nwixlogsorted{c}{{DisplayDebianChangelog4}{NW4L0rMe-3y9lo5-1}{\nwixu{NW4L0rMe-1wPTBV-1}\nwixd{NW4L0rMe-3y9lo5-1}}} \nwixlogsorted{c}{{DisplayDebianFiles}{NW4L0rMe-11cehY-1}{\nwixd{NW4L0rMe-11cehY-1}\nwixu{NW4L0rMe-3LjOLe-1}}} \nwixlogsorted{c}{{DisplayDebianFiles1}{NW4L0rMe-41SfS3-1}{\nwixu{NW4L0rMe-11cehY-1}\nwixd{NW4L0rMe-41SfS3-1}}} \nwixlogsorted{c}{{DisplayDebianFiles10}{NW4L0rMe-38F31N-1}{\nwixd{NW4L0rMe-38F31N-1}\nwixu{NW4L0rMe-3blyBD-1}}} \nwixlogsorted{c}{{DisplayDebianFiles2}{NW4L0rMe-1Xc4x5-1}{\nwixu{NW4L0rMe-41SfS3-1}\nwixd{NW4L0rMe-1Xc4x5-1}}} \nwixlogsorted{c}{{DisplayDebianFiles3}{NW4L0rMe-2x2X0x-1}{\nwixu{NW4L0rMe-1Xc4x5-1}\nwixd{NW4L0rMe-2x2X0x-1}}} \nwixlogsorted{c}{{DisplayDebianFiles4}{NW4L0rMe-MfAWV-1}{\nwixu{NW4L0rMe-2x2X0x-1}\nwixd{NW4L0rMe-MfAWV-1}}} \nwixlogsorted{c}{{DisplayDebianFiles4-1}{NW4L0rMe-PAMgo-1}{\nwixu{NW4L0rMe-MfAWV-1}\nwixd{NW4L0rMe-PAMgo-1}}} \nwixlogsorted{c}{{DisplayDebianFiles4-2}{NW4L0rMe-2oTN6k-1}{\nwixu{NW4L0rMe-PAMgo-1}\nwixd{NW4L0rMe-2oTN6k-1}}} \nwixlogsorted{c}{{DisplayDebianFiles5}{NW4L0rMe-4EEcIx-1}{\nwixu{NW4L0rMe-2oTN6k-1}\nwixd{NW4L0rMe-4EEcIx-1}}} \nwixlogsorted{c}{{DisplayDebianFiles6}{NW4L0rMe-1vjz0Z-1}{\nwixu{NW4L0rMe-4EEcIx-1}\nwixd{NW4L0rMe-1vjz0Z-1}}} \nwixlogsorted{c}{{DisplayDebianFiles7}{NW4L0rMe-2re9Xj-1}{\nwixu{NW4L0rMe-1vjz0Z-1}\nwixd{NW4L0rMe-2re9Xj-1}}} \nwixlogsorted{c}{{DisplayDebianFiles8}{NW4L0rMe-sb2el-1}{\nwixu{NW4L0rMe-2re9Xj-1}\nwixd{NW4L0rMe-sb2el-1}}} \nwixlogsorted{c}{{DisplayDebianFiles9}{NW4L0rMe-3blyBD-1}{\nwixu{NW4L0rMe-sb2el-1}\nwixd{NW4L0rMe-3blyBD-1}}} \nwixlogsorted{c}{{Distro4Branch}{NW4L0rMe-3efUH3-1}{\nwixd{NW4L0rMe-3efUH3-1}\nwixu{NW4L0rMe-4UgTuZ-1}}} \nwixlogsorted{c}{{Distro4Branch2}{NW4L0rMe-2ZbxsM-1}{\nwixu{NW4L0rMe-3efUH3-1}\nwixd{NW4L0rMe-2ZbxsM-1}}} \nwixlogsorted{c}{{DownloadAscFile}{NW4L0rMe-1ikHYS-1}{\nwixd{NW4L0rMe-1ikHYS-1}\nwixu{NW4L0rMe-3GSX0A-1}}} \nwixlogsorted{c}{{EditPatch}{NW4L0rMe-1PELy0-1}{\nwixu{NW4L0rMe-2AhPFn-1}\nwixd{NW4L0rMe-1PELy0-1}}} \nwixlogsorted{c}{{ExcludeFile6}{NW4L0rMe-3fIUk0-1}{\nwixu{NW4L0rMe-4JXwD3-1}\nwixd{NW4L0rMe-3fIUk0-1}}} \nwixlogsorted{c}{{ExcludeFile7}{NW4L0rMe-17TWQ8-1}{\nwixu{NW4L0rMe-3fIUk0-1}\nwixd{NW4L0rMe-17TWQ8-1}}} \nwixlogsorted{c}{{ExcludeFile8}{NW4L0rMe-2ezXgq-1}{\nwixu{NW4L0rMe-17TWQ8-1}\nwixd{NW4L0rMe-2ezXgq-1}}} \nwixlogsorted{c}{{ExcludeFiles}{NW4L0rMe-48Tuu-1}{\nwixd{NW4L0rMe-48Tuu-1}\nwixu{NW4L0rMe-3dKdSR-1}}} \nwixlogsorted{c}{{ExcludeFiles1}{NW4L0rMe-3vzEPh-1}{\nwixu{NW4L0rMe-48Tuu-1}\nwixd{NW4L0rMe-3vzEPh-1}}} \nwixlogsorted{c}{{ExcludeFiles10}{NW4L0rMe-4INgXM-1}{\nwixu{NW4L0rMe-2ezXgq-1}\nwixd{NW4L0rMe-4INgXM-1}}} \nwixlogsorted{c}{{ExcludeFiles12}{NW4L0rMe-2dctS0-1}{\nwixu{NW4L0rMe-4INgXM-1}\nwixd{NW4L0rMe-2dctS0-1}}} \nwixlogsorted{c}{{ExcludeFiles15}{NW4L0rMe-daBbo-1}{\nwixu{NW4L0rMe-2dctS0-1}\nwixd{NW4L0rMe-daBbo-1}}} \nwixlogsorted{c}{{ExcludeFiles2}{NW4L0rMe-1dUb7J-1}{\nwixu{NW4L0rMe-3vzEPh-1}\nwixd{NW4L0rMe-1dUb7J-1}}} \nwixlogsorted{c}{{ExcludeFiles3}{NW4L0rMe-39jQIj-1}{\nwixu{NW4L0rMe-1dUb7J-1}\nwixd{NW4L0rMe-39jQIj-1}}} \nwixlogsorted{c}{{ExcludeFiles3-1}{NW4L0rMe-3dhfbH-1}{\nwixu{NW4L0rMe-39jQIj-1}\nwixd{NW4L0rMe-3dhfbH-1}}} \nwixlogsorted{c}{{ExcludeFiles4}{NW4L0rMe-YmrY9-1}{\nwixu{NW4L0rMe-3dhfbH-1}\nwixd{NW4L0rMe-YmrY9-1}}} \nwixlogsorted{c}{{ExcludeFiles5}{NW4L0rMe-4JXwD3-1}{\nwixu{NW4L0rMe-YmrY9-1}\nwixd{NW4L0rMe-4JXwD3-1}}} \nwixlogsorted{c}{{FailureNotice}{NW4L0rMe-7xnC6-1}{\nwixu{NW4L0rMe-4NZOaG-1}\nwixd{NW4L0rMe-7xnC6-1}}} \nwixlogsorted{c}{{FileSelector}{NW4L0rMe-3ENL7W-1}{\nwixd{NW4L0rMe-3ENL7W-1}\nwixu{NW4L0rMe-2C9hCO-1}}} \nwixlogsorted{c}{{FileToPatch}{NW4L0rMe-4R2L2m-1}{\nwixd{NW4L0rMe-4R2L2m-1}\nwixu{NW4L0rMe-3ENL7W-1}}} \nwixlogsorted{c}{{ForceOrig}{NW4L0rMe-3u1ISy-1}{\nwixu{NW4L0rMe-38F31N-1}\nwixd{NW4L0rMe-3u1ISy-1}}} \nwixlogsorted{c}{{ForceOrig2}{NW4L0rMe-1NnZn5-1}{\nwixu{NW4L0rMe-3u1ISy-1}\nwixd{NW4L0rMe-1NnZn5-1}}} \nwixlogsorted{c}{{ForceOrig5}{NW4L0rMe-4Z4nBv-1}{\nwixu{NW4L0rMe-1NnZn5-1}\nwixd{NW4L0rMe-4Z4nBv-1}}} \nwixlogsorted{c}{{ForceOrig6}{NW4L0rMe-2AuBIF-1}{\nwixu{NW4L0rMe-4Z4nBv-1}\nwixd{NW4L0rMe-2AuBIF-1}}} \nwixlogsorted{c}{{GbpConfIntegration}{NW4L0rMe-1K4yD3-1}{\nwixu{NW4L0rMe-1aQXyX-1}\nwixd{NW4L0rMe-1K4yD3-1}}} \nwixlogsorted{c}{{GbpConfIntegration1}{NW4L0rMe-SfZ6H-1}{\nwixu{NW4L0rMe-1K4yD3-1}\nwixd{NW4L0rMe-SfZ6H-1}}} \nwixlogsorted{c}{{GitBranch2RecentBranch}{NW4L0rMe-2Rvw4e-1}{\nwixu{NW4L0rMe-3ZQwb5-1}\nwixd{NW4L0rMe-2Rvw4e-1}}} \nwixlogsorted{c}{{GpgKeyAvailable}{NW4L0rMe-7ORWt-1}{\nwixd{NW4L0rMe-7ORWt-1}\nwixu{NW4L0rMe-1pFM12-1}}} \nwixlogsorted{c}{{IdentifyBranches}{NW4L0rMe-1NlbiI-1}{\nwixu{NW4L0rMe-3BQbsE-1}\nwixd{NW4L0rMe-1NlbiI-1}}} \nwixlogsorted{c}{{Import2Git}{NW4L0rMe-3jdpfc-1}{\nwixu{NW4L0rMe-RCygQ-1}\nwixd{NW4L0rMe-3jdpfc-1}}} \nwixlogsorted{c}{{Import2Git3}{NW4L0rMe-2kc1eE-1}{\nwixu{NW4L0rMe-3jdpfc-1}\nwixd{NW4L0rMe-2kc1eE-1}}} \nwixlogsorted{c}{{Import2Git4}{NW4L0rMe-fSXSs-1}{\nwixu{NW4L0rMe-2kc1eE-1}\nwixd{NW4L0rMe-fSXSs-1}}} \nwixlogsorted{c}{{ImportDebianPackage}{NW4L0rMe-PF5jU-1}{\nwixd{NW4L0rMe-PF5jU-1}\nwixu{NW4L0rMe-3k7enB-1}}} \nwixlogsorted{c}{{ImportDebianPackage1}{NW4L0rMe-4UH0W4-1}{\nwixu{NW4L0rMe-PF5jU-1}\nwixd{NW4L0rMe-4UH0W4-1}}} \nwixlogsorted{c}{{ImportDebianPackage2}{NW4L0rMe-2FBYmS-1}{\nwixu{NW4L0rMe-4UH0W4-1}\nwixd{NW4L0rMe-2FBYmS-1}}} \nwixlogsorted{c}{{ImportDebianPackage3}{NW4L0rMe-2d1rhs-1}{\nwixu{NW4L0rMe-2FBYmS-1}\nwixd{NW4L0rMe-2d1rhs-1}}} \nwixlogsorted{c}{{ImportDebianPackage4}{NW4L0rMe-17dpue-1}{\nwixu{NW4L0rMe-2d1rhs-1}\nwixd{NW4L0rMe-17dpue-1}}} \nwixlogsorted{c}{{InsertConfigLine}{NW4L0rMe-3wEjds-1}{\nwixd{NW4L0rMe-3wEjds-1}}} \nwixlogsorted{c}{{InsertDebEmail}{NW4L0rMe-2rrHFd-1}{\nwixu{NW4L0rMe-3nmG5W-1}\nwixd{NW4L0rMe-2rrHFd-1}}} \nwixlogsorted{c}{{InsertDebName}{NW4L0rMe-3nmG5W-1}{\nwixu{NW4L0rMe-BUXUI-1}\nwixd{NW4L0rMe-3nmG5W-1}}} \nwixlogsorted{c}{{InsertIdentifier}{NW4L0rMe-3pAgV8-1}{\nwixd{NW4L0rMe-3pAgV8-1}\nwixu{NW4L0rMe-2Zqh7t-1}}} \nwixlogsorted{c}{{LastQuestionsBeforeBuild}{NW4L0rMe-2ea8K1-1}{\nwixu{NW4L0rMe-2yaKJP-1}\nwixd{NW4L0rMe-2ea8K1-1}}} \nwixlogsorted{c}{{LastQuestionsBeforeBuild1}{NW4L0rMe-T3wiA-1}{\nwixu{NW4L0rMe-2ea8K1-1}\nwixd{NW4L0rMe-T3wiA-1}}} \nwixlogsorted{c}{{LastQuestionsBeforeBuild2}{NW4L0rMe-2kQBUI-1}{\nwixu{NW4L0rMe-T3wiA-1}\nwixd{NW4L0rMe-2kQBUI-1}}} \nwixlogsorted{c}{{LastQuestionsBeforeBuild3}{NW4L0rMe-1oW0x8-1}{\nwixu{NW4L0rMe-2kQBUI-1}\nwixd{NW4L0rMe-1oW0x8-1}}} \nwixlogsorted{c}{{Link2File}{NW4L0rMe-jJHLT-1}{\nwixu{NW4L0rMe-1ikHYS-1}\nwixd{NW4L0rMe-jJHLT-1}}} \nwixlogsorted{c}{{MainProgram}{NW4L0rMe-2dfaZH-1}{\nwixd{NW4L0rMe-2dfaZH-1}\nwixu{NW4L0rMe-2uaRFM-1}}} \nwixlogsorted{c}{{MakePatches}{NW4L0rMe-4C4kEn-1}{\nwixu{NW4L0rMe-LBzSB-1}\nwixd{NW4L0rMe-4C4kEn-1}}} \nwixlogsorted{c}{{Merge2Stable}{NW4L0rMe-3p2iT7-1}{\nwixd{NW4L0rMe-3p2iT7-1}}} \nwixlogsorted{c}{{MoreOptions}{NW4L0rMe-3XHV1N-1}{\nwixu{NW4L0rMe-2AuBIF-1}\nwixd{NW4L0rMe-3XHV1N-1}}} \nwixlogsorted{c}{{MoreOptions2}{NW4L0rMe-2htUbp-1}{\nwixu{NW4L0rMe-3XHV1N-1}\nwixd{NW4L0rMe-2htUbp-1}}} \nwixlogsorted{c}{{MovingGbpConf}{NW4L0rMe-1hJP4x-1}{\nwixu{NW4L0rMe-4e7uxk-1}\nwixd{NW4L0rMe-1hJP4x-1}}} \nwixlogsorted{c}{{MovingGbpConfFile}{NW4L0rMe-3J7Lxr-1}{\nwixu{NW4L0rMe-3RcwGz-1}\nwixd{NW4L0rMe-3J7Lxr-1}}} \nwixlogsorted{c}{{Name2Version}{NW4L0rMe-1aQXyX-1}{\nwixu{NW4L0rMe-2KAwru-1}\nwixd{NW4L0rMe-1aQXyX-1}}} \nwixlogsorted{c}{{OptionsWatchFile}{NW4L0rMe-4BxyXu-1}{\nwixu{NW4L0rMe-nRy5H-1}\nwixd{NW4L0rMe-4BxyXu-1}}} \nwixlogsorted{c}{{OptionsWatchFile1}{NW4L0rMe-3D3TNs-1}{\nwixu{NW4L0rMe-4BxyXu-1}\nwixd{NW4L0rMe-3D3TNs-1}}} \nwixlogsorted{c}{{OptionsWatchFile2}{NW4L0rMe-bG7F6-1}{\nwixu{NW4L0rMe-3D3TNs-1}\nwixd{NW4L0rMe-bG7F6-1}}} \nwixlogsorted{c}{{OptionsWatchFile3}{NW4L0rMe-3ulhPo-1}{\nwixu{NW4L0rMe-bG7F6-1}\nwixd{NW4L0rMe-3ulhPo-1}}} \nwixlogsorted{c}{{OptionsWatchFile4}{NW4L0rMe-1t1OnE-1}{\nwixu{NW4L0rMe-3ulhPo-1}\nwixd{NW4L0rMe-1t1OnE-1}}} \nwixlogsorted{c}{{OptionsWatchFile5}{NW4L0rMe-2fqPAK-1}{\nwixu{NW4L0rMe-1t1OnE-1}\nwixd{NW4L0rMe-2fqPAK-1}}} \nwixlogsorted{c}{{OptionsWatchFile8}{NW4L0rMe-1GH9XQ-1}{\nwixu{NW4L0rMe-2fqPAK-1}\nwixd{NW4L0rMe-1GH9XQ-1}}} \nwixlogsorted{c}{{PaketnameDesktop}{NW4L0rMe-4Cofvj-1}{\nwixd{NW4L0rMe-4Cofvj-1}}} \nwixlogsorted{c}{{ParseConfig}{NW4L0rMe-aD8Kl-1}{\nwixd{NW4L0rMe-aD8Kl-1}}} \nwixlogsorted{c}{{PatchesTreatment}{NW4L0rMe-1KCu8R-1}{\nwixd{NW4L0rMe-1KCu8R-1}\nwixu{NW4L0rMe-2htUbp-1}}} \nwixlogsorted{c}{{PatchesTreatment1}{NW4L0rMe-1xHmJ1-1}{\nwixu{NW4L0rMe-1KCu8R-1}\nwixd{NW4L0rMe-1xHmJ1-1}}} \nwixlogsorted{c}{{PatchesTreatment2}{NW4L0rMe-4CNE2d-1}{\nwixu{NW4L0rMe-1xHmJ1-1}\nwixd{NW4L0rMe-4CNE2d-1}}} \nwixlogsorted{c}{{PatchesTreatment3}{NW4L0rMe-IWzDf-1}{\nwixu{NW4L0rMe-4CNE2d-1}\nwixd{NW4L0rMe-IWzDf-1}}} \nwixlogsorted{c}{{PatchesTreatment4}{NW4L0rMe-2yaKJP-1}{\nwixu{NW4L0rMe-IWzDf-1}\nwixd{NW4L0rMe-2yaKJP-1}}} \nwixlogsorted{c}{{PatchHeader}{NW4L0rMe-2C9hCO-1}{\nwixd{NW4L0rMe-2C9hCO-1}\nwixu{NW4L0rMe-3JXgFA-1}}} \nwixlogsorted{c}{{PatchTasks}{NW4L0rMe-1x4iD7-1}{\nwixu{NW4L0rMe-2PEcRT-1}\nwixd{NW4L0rMe-1x4iD7-1}}} \nwixlogsorted{c}{{PatchTasks1}{NW4L0rMe-k9dmF-1}{\nwixu{NW4L0rMe-1x4iD7-1}\nwixd{NW4L0rMe-k9dmF-1}}} \nwixlogsorted{c}{{PatchTasks2}{NW4L0rMe-33mfat-1}{\nwixu{NW4L0rMe-k9dmF-1}\nwixd{NW4L0rMe-33mfat-1}}} \nwixlogsorted{c}{{PatchTasks3}{NW4L0rMe-1VH3Mx-1}{\nwixu{NW4L0rMe-33mfat-1}\nwixd{NW4L0rMe-1VH3Mx-1}}} \nwixlogsorted{c}{{PatchTasks4}{NW4L0rMe-47M0dn-1}{\nwixu{NW4L0rMe-1VH3Mx-1}\nwixd{NW4L0rMe-47M0dn-1}}} \nwixlogsorted{c}{{PatchTasks6}{NW4L0rMe-2pJ7xb-1}{\nwixu{NW4L0rMe-47M0dn-1}\nwixd{NW4L0rMe-2pJ7xb-1}}} \nwixlogsorted{c}{{PatchTasks7}{NW4L0rMe-22U7aV-1}{\nwixu{NW4L0rMe-2pJ7xb-1}\nwixd{NW4L0rMe-22U7aV-1}}} \nwixlogsorted{c}{{PatchTasks8}{NW4L0rMe-3ZQwb5-1}{\nwixu{NW4L0rMe-22U7aV-1}\nwixd{NW4L0rMe-3ZQwb5-1}}} \nwixlogsorted{c}{{PQImport}{NW4L0rMe-kZHCE-1}{\nwixu{NW4L0rMe-7xnC6-1}\nwixd{NW4L0rMe-kZHCE-1}}} \nwixlogsorted{c}{{PQImport1}{NW4L0rMe-2TdfSP-1}{\nwixu{NW4L0rMe-kZHCE-1}\nwixd{NW4L0rMe-2TdfSP-1}}} \nwixlogsorted{c}{{PQImport1-1}{NW4L0rMe-25wVEn-1}{\nwixu{NW4L0rMe-2TdfSP-1}\nwixd{NW4L0rMe-25wVEn-1}}} \nwixlogsorted{c}{{PQImport2}{NW4L0rMe-A0ddl-1}{\nwixu{NW4L0rMe-25wVEn-1}\nwixd{NW4L0rMe-A0ddl-1}}} \nwixlogsorted{c}{{PQImport3}{NW4L0rMe-4eBX6z-1}{\nwixu{NW4L0rMe-A0ddl-1}\nwixd{NW4L0rMe-4eBX6z-1}}} \nwixlogsorted{c}{{PQImport4}{NW4L0rMe-1RlvBt-1}{\nwixu{NW4L0rMe-4eBX6z-1}\nwixd{NW4L0rMe-1RlvBt-1}}} \nwixlogsorted{c}{{PQImport5}{NW4L0rMe-3PGErV-1}{\nwixu{NW4L0rMe-1RlvBt-1}\nwixd{NW4L0rMe-3PGErV-1}}} \nwixlogsorted{c}{{PQMigration}{NW4L0rMe-27lD23-1}{\nwixd{NW4L0rMe-27lD23-1}\nwixu{NW4L0rMe-XpxM8-1}}} \nwixlogsorted{c}{{PQMigration0}{NW4L0rMe-2tBIfH-1}{\nwixu{NW4L0rMe-27lD23-1}\nwixd{NW4L0rMe-2tBIfH-1}}} \nwixlogsorted{c}{{PQMigration1}{NW4L0rMe-1v0L5b-1}{\nwixu{NW4L0rMe-2tBIfH-1}\nwixd{NW4L0rMe-1v0L5b-1}}} \nwixlogsorted{c}{{PQMigration1-1}{NW4L0rMe-44Wxo8-1}{\nwixu{NW4L0rMe-1v0L5b-1}\nwixd{NW4L0rMe-44Wxo8-1}}} \nwixlogsorted{c}{{PQMigration2}{NW4L0rMe-4EdMuF-1}{\nwixu{NW4L0rMe-44Wxo8-1}\nwixd{NW4L0rMe-4EdMuF-1}}} \nwixlogsorted{c}{{PQMigration3}{NW4L0rMe-Kn85H-1}{\nwixu{NW4L0rMe-4EdMuF-1}\nwixd{NW4L0rMe-Kn85H-1}}} \nwixlogsorted{c}{{PQMigration4}{NW4L0rMe-2wIt5z-1}{\nwixu{NW4L0rMe-Kn85H-1}\nwixd{NW4L0rMe-2wIt5z-1}}} \nwixlogsorted{c}{{PQMigration5}{NW4L0rMe-1Z9E4d-1}{\nwixu{NW4L0rMe-2wIt5z-1}\nwixd{NW4L0rMe-1Z9E4d-1}}} \nwixlogsorted{c}{{PQMigration7}{NW4L0rMe-rR02h-1}{\nwixu{NW4L0rMe-1Z9E4d-1}\nwixd{NW4L0rMe-rR02h-1}}} \nwixlogsorted{c}{{PQMigration8}{NW4L0rMe-2PEcRT-1}{\nwixu{NW4L0rMe-rR02h-1}\nwixd{NW4L0rMe-2PEcRT-1}}} \nwixlogsorted{c}{{Preparation4}{NW4L0rMe-4KEAEt-1}{\nwixu{NW4L0rMe-92BMq-1}\nwixd{NW4L0rMe-4KEAEt-1}}} \nwixlogsorted{c}{{Preparations}{NW4L0rMe-1hm6rL-1}{\nwixu{NW4L0rMe-1hJP4x-1}\nwixd{NW4L0rMe-1hm6rL-1}}} \nwixlogsorted{c}{{Preparations1}{NW4L0rMe-2IReVA-1}{\nwixu{NW4L0rMe-1hm6rL-1}\nwixd{NW4L0rMe-2IReVA-1}}} \nwixlogsorted{c}{{Preparations2}{NW4L0rMe-4Rr7dU-1}{\nwixu{NW4L0rMe-2IReVA-1}\nwixd{NW4L0rMe-4Rr7dU-1}}} \nwixlogsorted{c}{{Preparations3}{NW4L0rMe-92BMq-1}{\nwixu{NW4L0rMe-4Rr7dU-1}\nwixd{NW4L0rMe-92BMq-1}}} \nwixlogsorted{c}{{PrepareUploading}{nw@notdef}{\nwixu{NW4L0rMe-1VOuRH-1}}} \nwixlogsorted{c}{{PullFromSalsa}{NW4L0rMe-1w2rfN-1}{\nwixd{NW4L0rMe-1w2rfN-1}\nwixu{NW4L0rMe-4QLWi1-1}}} \nwixlogsorted{c}{{PullFromSalsa1}{NW4L0rMe-OrTYh-1}{\nwixu{NW4L0rMe-1w2rfN-1}\nwixd{NW4L0rMe-OrTYh-1}}} \nwixlogsorted{c}{{RebasePQBranch}{NW4L0rMe-3OX4Ly-1}{\nwixd{NW4L0rMe-3OX4Ly-1}\nwixu{NW4L0rMe-4kh8u-1}}} \nwixlogsorted{c}{{RebasePQBranch1}{NW4L0rMe-2g71yC-1}{\nwixu{NW4L0rMe-3OX4Ly-1}\nwixd{NW4L0rMe-2g71yC-1}}} \nwixlogsorted{c}{{RebasePQBranch2}{NW4L0rMe-XpxM8-1}{\nwixu{NW4L0rMe-2g71yC-1}\nwixd{NW4L0rMe-XpxM8-1}}} \nwixlogsorted{c}{{RecentIdentifier}{NW4L0rMe-1bsH0l-1}{\nwixd{NW4L0rMe-1bsH0l-1}\nwixu{NW4L0rMe-3pAgV8-1}}} \nwixlogsorted{c}{{RecentIdentifier2}{NW4L0rMe-4Wup5B-1}{\nwixu{NW4L0rMe-1bsH0l-1}\nwixd{NW4L0rMe-4Wup5B-1}}} \nwixlogsorted{c}{{RecentIdentifier3}{NW4L0rMe-2jvbx-1}{\nwixu{NW4L0rMe-4Wup5B-1}\nwixd{NW4L0rMe-2jvbx-1}}} \nwixlogsorted{c}{{ReplaceConfigLines}{NW4L0rMe-z7rFD-1}{\nwixd{NW4L0rMe-z7rFD-1}\nwixu{NW4L0rMe-3wEjds-1}}} \nwixlogsorted{c}{{ReplaceConfigLines1}{NW4L0rMe-1pFM12-1}{\nwixu{NW4L0rMe-z7rFD-1}\nwixd{NW4L0rMe-1pFM12-1}}} \nwixlogsorted{c}{{ReplaceTilde}{NW4L0rMe-1vvaZu-1}{\nwixu{NW4L0rMe-19N0jW-1}\nwixd{NW4L0rMe-1vvaZu-1}}} \nwixlogsorted{c}{{RunningLintian}{NW4L0rMe-1TokRZ-1}{\nwixu{NW4L0rMe-30vv5k-1}\nwixd{NW4L0rMe-1TokRZ-1}}} \nwixlogsorted{c}{{RunningLintian1}{NW4L0rMe-x3Lx5-1}{\nwixu{NW4L0rMe-1TokRZ-1}\nwixd{NW4L0rMe-x3Lx5-1}}} \nwixlogsorted{c}{{RunningLintian3}{NW4L0rMe-1R8pjv-1}{\nwixu{NW4L0rMe-x3Lx5-1}\nwixd{NW4L0rMe-1R8pjv-1}}} \nwixlogsorted{c}{{RunningLintian4}{NW4L0rMe-4cQ38l-1}{\nwixu{NW4L0rMe-1R8pjv-1}\nwixd{NW4L0rMe-4cQ38l-1}}} \nwixlogsorted{c}{{RunningLintian5}{NW4L0rMe-AVwi3-1}{\nwixu{NW4L0rMe-4cQ38l-1}\nwixd{NW4L0rMe-AVwi3-1}}} \nwixlogsorted{c}{{RunningTests}{NW4L0rMe-3nHlL3-1}{\nwixd{NW4L0rMe-3nHlL3-1}\nwixu{NW4L0rMe-4YNhTs-1}}} \nwixlogsorted{c}{{RunningTests3}{NW4L0rMe-1fxvHr-1}{\nwixu{NW4L0rMe-3nHlL3-1}\nwixd{NW4L0rMe-1fxvHr-1}}} \nwixlogsorted{c}{{RunningUscan}{NW4L0rMe-401muT-1}{\nwixu{NW4L0rMe-AVwi3-1}\nwixd{NW4L0rMe-401muT-1}}} \nwixlogsorted{c}{{RunningUscan1}{NW4L0rMe-taCYK-1}{\nwixu{NW4L0rMe-401muT-1}\nwixd{NW4L0rMe-taCYK-1}}} \nwixlogsorted{c}{{RunningUscan2}{NW4L0rMe-3VNYh6-1}{\nwixu{NW4L0rMe-taCYK-1}\nwixd{NW4L0rMe-3VNYh6-1}}} \nwixlogsorted{c}{{RunningUscan3}{NW4L0rMe-1MXHou-1}{\nwixu{NW4L0rMe-3VNYh6-1}\nwixd{NW4L0rMe-1MXHou-1}}} \nwixlogsorted{c}{{RunningUscan4}{NW4L0rMe-4YNhTs-1}{\nwixu{NW4L0rMe-1MXHou-1}\nwixd{NW4L0rMe-4YNhTs-1}}} \nwixlogsorted{c}{{SBuildOrPBuilder}{NW4L0rMe-4HAa99-1}{\nwixd{NW4L0rMe-4HAa99-1}\nwixu{NW4L0rMe-OhNcU-1}}} \nwixlogsorted{c}{{SBuildOrPbuilder1}{NW4L0rMe-1gsx31-1}{\nwixu{NW4L0rMe-4HAa99-1}\nwixd{NW4L0rMe-1gsx31-1}}} \nwixlogsorted{c}{{Search4Dist}{NW4L0rMe-27Aw5E-1}{\nwixu{NW4L0rMe-2Rvw4e-1}\nwixd{NW4L0rMe-27Aw5E-1}}} \nwixlogsorted{c}{{SearchGbpConf}{NW4L0rMe-1h1tgJ-1}{\nwixd{NW4L0rMe-1h1tgJ-1}\nwixu{NW4L0rMe-448qDL-1}}} \nwixlogsorted{c}{{SearchGbpConf1}{NW4L0rMe-28A3wT-1}{\nwixu{NW4L0rMe-1h1tgJ-1}\nwixd{NW4L0rMe-28A3wT-1}}} \nwixlogsorted{c}{{SearchGbpConf2}{NW4L0rMe-4c0eRR-1}{\nwixu{NW4L0rMe-28A3wT-1}\nwixd{NW4L0rMe-4c0eRR-1}}} \nwixlogsorted{c}{{SearchGbpConf3}{NW4L0rMe-Guv8H-1}{\nwixu{NW4L0rMe-4c0eRR-1}\nwixd{NW4L0rMe-Guv8H-1}}} \nwixlogsorted{c}{{SearchGbpConf4}{NW4L0rMe-3RcwGz-1}{\nwixu{NW4L0rMe-Guv8H-1}\nwixd{NW4L0rMe-3RcwGz-1}}} \nwixlogsorted{c}{{SelectBranch}{NW4L0rMe-nazv4-1}{\nwixd{NW4L0rMe-nazv4-1}\nwixu{NW4L0rMe-aD8Kl-1}}} \nwixlogsorted{c}{{SelectBranch1}{NW4L0rMe-3HFFnr-1}{\nwixu{NW4L0rMe-nazv4-1}\nwixd{NW4L0rMe-3HFFnr-1}}} \nwixlogsorted{c}{{SelectBranch3}{NW4L0rMe-3gn9Vf-1}{\nwixu{NW4L0rMe-3HFFnr-1}\nwixd{NW4L0rMe-3gn9Vf-1}}} \nwixlogsorted{c}{{SelectBranch4}{NW4L0rMe-2FwhnT-1}{\nwixu{NW4L0rMe-3gn9Vf-1}\nwixd{NW4L0rMe-2FwhnT-1}}} \nwixlogsorted{c}{{SelectBranch6}{NW4L0rMe-1zea7-1}{\nwixu{NW4L0rMe-2FwhnT-1}\nwixd{NW4L0rMe-1zea7-1}}} \nwixlogsorted{c}{{SelectChangesFile}{NW4L0rMe-3JXgFA-1}{\nwixu{NW4L0rMe-3r5YFV-1}\nwixd{NW4L0rMe-3JXgFA-1}}} \nwixlogsorted{c}{{ShowPatches}{NW4L0rMe-2AhPFn-1}{\nwixu{NW4L0rMe-4C4kEn-1}\nwixd{NW4L0rMe-2AhPFn-1}}} \nwixlogsorted{c}{{SpecialExcludeFile}{NW4L0rMe-3dKdSR-1}{\nwixd{NW4L0rMe-3dKdSR-1}\nwixu{NW4L0rMe-1O5B2o-1}}} \nwixlogsorted{c}{{StartTasks}{NW4L0rMe-4MGn06-1}{\nwixd{NW4L0rMe-4MGn06-1}}} \nwixlogsorted{c}{{StartTasks1}{NW4L0rMe-2u5wZs-1}{\nwixu{NW4L0rMe-4MGn06-1}\nwixd{NW4L0rMe-2u5wZs-1}}} \nwixlogsorted{c}{{TaskSelect}{NW4L0rMe-jY8Bs-1}{\nwixd{NW4L0rMe-jY8Bs-1}}} \nwixlogsorted{c}{{TaskSelect3}{NW4L0rMe-2RUsag-1}{\nwixu{NW4L0rMe-jY8Bs-1}\nwixd{NW4L0rMe-2RUsag-1}}} \nwixlogsorted{c}{{TaskSelect4}{NW4L0rMe-11Dd8c-1}{\nwixu{NW4L0rMe-2RUsag-1}\nwixd{NW4L0rMe-11Dd8c-1}}} \nwixlogsorted{c}{{TaskSelect5}{NW4L0rMe-3Z2bSU-1}{\nwixu{NW4L0rMe-11Dd8c-1}\nwixd{NW4L0rMe-3Z2bSU-1}}} \nwixlogsorted{c}{{TaskSelect6}{NW4L0rMe-1Pd8KA-1}{\nwixu{NW4L0rMe-3Z2bSU-1}\nwixd{NW4L0rMe-1Pd8KA-1}}} \nwixlogsorted{c}{{TaskSelect7}{NW4L0rMe-3N7Rzm-1}{\nwixu{NW4L0rMe-1Pd8KA-1}\nwixd{NW4L0rMe-3N7Rzm-1}}} \nwixlogsorted{c}{{TaskSelect9}{nw@notdef}{\nwixu{NW4L0rMe-3N7Rzm-1}}} \nwixlogsorted{c}{{TeamMaintainer}{NW4L0rMe-5jHyT-1}{\nwixd{NW4L0rMe-5jHyT-1}\nwixu{NW4L0rMe-2CHiV-1}}} \nwixlogsorted{c}{{TwoConfFilesFound}{NW4L0rMe-Bk1iZ-1}{\nwixu{NW4L0rMe-SfZ6H-1}\nwixd{NW4L0rMe-Bk1iZ-1}}} \nwixlogsorted{c}{{TwoConfFilesFound0-1}{NW4L0rMe-1FC6ni-1}{\nwixu{NW4L0rMe-Bk1iZ-1}\nwixd{NW4L0rMe-1FC6ni-1}}} \nwixlogsorted{c}{{TwoConfFilesFound1}{NW4L0rMe-1UcH75-1}{\nwixu{NW4L0rMe-1FC6ni-1}\nwixd{NW4L0rMe-1UcH75-1}}} \nwixlogsorted{c}{{TwoConfFilesFound2}{NW4L0rMe-448qDL-1}{\nwixu{NW4L0rMe-1UcH75-1}\nwixd{NW4L0rMe-448qDL-1}}} \nwixlogsorted{c}{{UsingPBuilder}{NW4L0rMe-1PRVTo-1}{\nwixu{NW4L0rMe-s1te9-1}\nwixd{NW4L0rMe-1PRVTo-1}}} \nwixlogsorted{c}{{UsingPBuilder3}{NW4L0rMe-33cKBy-1}{\nwixu{NW4L0rMe-1PRVTo-1}\nwixd{NW4L0rMe-33cKBy-1}}} \nwixlogsorted{c}{{UsingPBuilder4}{NW4L0rMe-OhNcU-1}{\nwixu{NW4L0rMe-33cKBy-1}\nwixd{NW4L0rMe-OhNcU-1}}} \nwixlogsorted{c}{{UsingSBuild}{NW4L0rMe-1BfCKV-1}{\nwixu{NW4L0rMe-1oW0x8-1}\nwixd{NW4L0rMe-1BfCKV-1}}} \nwixlogsorted{c}{{UsingSBuild1}{NW4L0rMe-1ZExEV-1}{\nwixu{NW4L0rMe-1BfCKV-1}\nwixd{NW4L0rMe-1ZExEV-1}}} \nwixlogsorted{c}{{UsingSbuild2}{NW4L0rMe-40BWcH-1}{\nwixu{NW4L0rMe-1ZExEV-1}\nwixd{NW4L0rMe-40BWcH-1}}} \nwixlogsorted{c}{{UsingSbuild3}{NW4L0rMe-s1te9-1}{\nwixu{NW4L0rMe-40BWcH-1}\nwixd{NW4L0rMe-s1te9-1}}} \nwbegindocs{712}\nwdocspar \nwenddocs{} 