Automating the installation of individual debian 8 packages with interactive prompts

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I am looking to automate some package installations via bash script; they will be installed to a pre-existing chroot'd filesystem. Some of the packages however involve interactive user input (i.e. ddclient asks to select a dynamic DNS service provider), which I haven't been able to automate as easily.



debconf preseeding seems to be the most common way to automate interactive package installations, but all the examples I've read imply that it's for an entire Debian installation rather than just individual packages.



I've been following this How to automate interactive Debian package installations but it doesn't really explain the specifics.



Thanks in advance!







share|improve this question



















  • Ansible or Salt
    – Rui F Ribeiro
    Jun 14 at 19:27














up vote
2
down vote

favorite












I am looking to automate some package installations via bash script; they will be installed to a pre-existing chroot'd filesystem. Some of the packages however involve interactive user input (i.e. ddclient asks to select a dynamic DNS service provider), which I haven't been able to automate as easily.



debconf preseeding seems to be the most common way to automate interactive package installations, but all the examples I've read imply that it's for an entire Debian installation rather than just individual packages.



I've been following this How to automate interactive Debian package installations but it doesn't really explain the specifics.



Thanks in advance!







share|improve this question



















  • Ansible or Salt
    – Rui F Ribeiro
    Jun 14 at 19:27












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I am looking to automate some package installations via bash script; they will be installed to a pre-existing chroot'd filesystem. Some of the packages however involve interactive user input (i.e. ddclient asks to select a dynamic DNS service provider), which I haven't been able to automate as easily.



debconf preseeding seems to be the most common way to automate interactive package installations, but all the examples I've read imply that it's for an entire Debian installation rather than just individual packages.



I've been following this How to automate interactive Debian package installations but it doesn't really explain the specifics.



Thanks in advance!







share|improve this question











I am looking to automate some package installations via bash script; they will be installed to a pre-existing chroot'd filesystem. Some of the packages however involve interactive user input (i.e. ddclient asks to select a dynamic DNS service provider), which I haven't been able to automate as easily.



debconf preseeding seems to be the most common way to automate interactive package installations, but all the examples I've read imply that it's for an entire Debian installation rather than just individual packages.



I've been following this How to automate interactive Debian package installations but it doesn't really explain the specifics.



Thanks in advance!









share|improve this question










share|improve this question




share|improve this question









asked Jun 14 at 19:17









kapkong

132




132











  • Ansible or Salt
    – Rui F Ribeiro
    Jun 14 at 19:27
















  • Ansible or Salt
    – Rui F Ribeiro
    Jun 14 at 19:27















Ansible or Salt
– Rui F Ribeiro
Jun 14 at 19:27




Ansible or Salt
– Rui F Ribeiro
Jun 14 at 19:27










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Short of using a “proper” deployment and configuration management tool such as Ansible or Salt, debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages.



The simplest way to get started with it is to manually configure the packages you want to install, by installing the package and answering the questions. Then run debconf-get-selections (from the debconf-utils package); that will list all the settings that are stored, including those for the packages you just installed, along with the question text in comments — so you can easily find the questions you want to preseed. The format is



<package> <debconf key> <type> <value>


For example



# System's default paper size:
# Choices: letter, a4, note, legal, executive, halfletter, halfexecutive, 11x17, statement, folio, quarto, 10x14, ledger, tabloid, a0, a1, a2, a3, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, c5, DL, Comm10, Monarch, archE, archD, archC, archB, archA, flsa, flse, csheet, dsheet, esheet
libpaper1 libpaper/defaultpaper select a4


Store the settings you want to preseed in a file, then run debconf-set-selections (in the debconf package) on the target system, either with the file available locally and named as the first argument, or its contents piped:



cat preseed-file | ssh remotehost debconf-set-selections


Do this before installing the packages on the target system.






share|improve this answer





















  • thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
    – kapkong
    Jun 14 at 19:52










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449885%2fautomating-the-installation-of-individual-debian-8-packages-with-interactive-pro%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










Short of using a “proper” deployment and configuration management tool such as Ansible or Salt, debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages.



The simplest way to get started with it is to manually configure the packages you want to install, by installing the package and answering the questions. Then run debconf-get-selections (from the debconf-utils package); that will list all the settings that are stored, including those for the packages you just installed, along with the question text in comments — so you can easily find the questions you want to preseed. The format is



<package> <debconf key> <type> <value>


For example



# System's default paper size:
# Choices: letter, a4, note, legal, executive, halfletter, halfexecutive, 11x17, statement, folio, quarto, 10x14, ledger, tabloid, a0, a1, a2, a3, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, c5, DL, Comm10, Monarch, archE, archD, archC, archB, archA, flsa, flse, csheet, dsheet, esheet
libpaper1 libpaper/defaultpaper select a4


Store the settings you want to preseed in a file, then run debconf-set-selections (in the debconf package) on the target system, either with the file available locally and named as the first argument, or its contents piped:



cat preseed-file | ssh remotehost debconf-set-selections


Do this before installing the packages on the target system.






share|improve this answer





















  • thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
    – kapkong
    Jun 14 at 19:52














up vote
3
down vote



accepted










Short of using a “proper” deployment and configuration management tool such as Ansible or Salt, debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages.



The simplest way to get started with it is to manually configure the packages you want to install, by installing the package and answering the questions. Then run debconf-get-selections (from the debconf-utils package); that will list all the settings that are stored, including those for the packages you just installed, along with the question text in comments — so you can easily find the questions you want to preseed. The format is



<package> <debconf key> <type> <value>


For example



# System's default paper size:
# Choices: letter, a4, note, legal, executive, halfletter, halfexecutive, 11x17, statement, folio, quarto, 10x14, ledger, tabloid, a0, a1, a2, a3, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, c5, DL, Comm10, Monarch, archE, archD, archC, archB, archA, flsa, flse, csheet, dsheet, esheet
libpaper1 libpaper/defaultpaper select a4


Store the settings you want to preseed in a file, then run debconf-set-selections (in the debconf package) on the target system, either with the file available locally and named as the first argument, or its contents piped:



cat preseed-file | ssh remotehost debconf-set-selections


Do this before installing the packages on the target system.






share|improve this answer





















  • thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
    – kapkong
    Jun 14 at 19:52












up vote
3
down vote



accepted







up vote
3
down vote



accepted






Short of using a “proper” deployment and configuration management tool such as Ansible or Salt, debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages.



The simplest way to get started with it is to manually configure the packages you want to install, by installing the package and answering the questions. Then run debconf-get-selections (from the debconf-utils package); that will list all the settings that are stored, including those for the packages you just installed, along with the question text in comments — so you can easily find the questions you want to preseed. The format is



<package> <debconf key> <type> <value>


For example



# System's default paper size:
# Choices: letter, a4, note, legal, executive, halfletter, halfexecutive, 11x17, statement, folio, quarto, 10x14, ledger, tabloid, a0, a1, a2, a3, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, c5, DL, Comm10, Monarch, archE, archD, archC, archB, archA, flsa, flse, csheet, dsheet, esheet
libpaper1 libpaper/defaultpaper select a4


Store the settings you want to preseed in a file, then run debconf-set-selections (in the debconf package) on the target system, either with the file available locally and named as the first argument, or its contents piped:



cat preseed-file | ssh remotehost debconf-set-selections


Do this before installing the packages on the target system.






share|improve this answer













Short of using a “proper” deployment and configuration management tool such as Ansible or Salt, debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages.



The simplest way to get started with it is to manually configure the packages you want to install, by installing the package and answering the questions. Then run debconf-get-selections (from the debconf-utils package); that will list all the settings that are stored, including those for the packages you just installed, along with the question text in comments — so you can easily find the questions you want to preseed. The format is



<package> <debconf key> <type> <value>


For example



# System's default paper size:
# Choices: letter, a4, note, legal, executive, halfletter, halfexecutive, 11x17, statement, folio, quarto, 10x14, ledger, tabloid, a0, a1, a2, a3, a5, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, b5, c5, DL, Comm10, Monarch, archE, archD, archC, archB, archA, flsa, flse, csheet, dsheet, esheet
libpaper1 libpaper/defaultpaper select a4


Store the settings you want to preseed in a file, then run debconf-set-selections (in the debconf package) on the target system, either with the file available locally and named as the first argument, or its contents piped:



cat preseed-file | ssh remotehost debconf-set-selections


Do this before installing the packages on the target system.







share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 14 at 19:37









Stephen Kitt

139k22301363




139k22301363











  • thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
    – kapkong
    Jun 14 at 19:52
















  • thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
    – kapkong
    Jun 14 at 19:52















thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
– kapkong
Jun 14 at 19:52




thanks! This is exactly what I'm looking for. Hopefully it's cool if I try it out and reply if I encounter any issues.
– kapkong
Jun 14 at 19:52












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449885%2fautomating-the-installation-of-individual-debian-8-packages-with-interactive-pro%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?