Skip to content

Commit

Permalink
Install the APT HTTPS transport during the Devuan installation process.
Browse files Browse the repository at this point in the history
  • Loading branch information
ladar committed Dec 4, 2023
1 parent 637d5fd commit 050b9dd
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 40 deletions.
2 changes: 1 addition & 1 deletion http/generic.devuan1.vagrant.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ d-i preseed/late_command string \
chroot /target /bin/bash -c 'echo "deb http://archive.devuan.org/merged jessie main" >> /etc/apt/sources.list' ; \
chroot /target /bin/bash -c 'echo "deb http://archive.devuan.org/merged jessie-security main" >> /etc/apt/sources.list' ; \
chroot /target /bin/bash -c 'apt-get update' ; \
chroot /target /bin/sh -i -l -v -c '(export DEBIAN_FRONTEND=noninteractive ; unset DEBIAN_HAS_FRONTEND ; unset DEBCONF_REDIR ; unset DEBCONF_OLD_FD_BASE ; apt-get --assume-yes install openssh-server sudo sed)' ; \
chroot /target /bin/sh -i -l -v -c '(export DEBIAN_FRONTEND=noninteractive ; unset DEBIAN_HAS_FRONTEND ; unset DEBCONF_REDIR ; unset DEBCONF_OLD_FD_BASE ; apt-get --assume-yes install openssh-server sudo sed apt-transport-https)' ; \
chroot /target /bin/bash -c 'service ssh stop' ; \
sed -i -e "s/.*PermitRootLogin.*/PermitRootLogin yes/g" /target/etc/ssh/sshd_config ; \
dmesg | grep -E "Hypervisor detected: Microsoft HyperV|Hypervisor detected: Microsoft Hyper-V" ; \
Expand Down
2 changes: 1 addition & 1 deletion http/generic.devuan2.vagrant.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ d-i preseed/late_command string \
printf "deb http://archive.devuan.org/merged ascii main\n" >> /target/etc/apt/sources.list ; \
printf "deb http://archive.devuan.org/merged ascii-security main\n" >> /target/etc/apt/sources.list ; \
chroot /target /bin/bash -c 'apt-get update' ; \
chroot /target /bin/sh -i -l -v -c '(export DEBIAN_FRONTEND=noninteractive ; unset DEBIAN_HAS_FRONTEND ; unset DEBCONF_REDIR ; unset DEBCONF_OLD_FD_BASE ; apt-get --assume-yes install curl openssh-server sudo sed net-tools)' ; \
chroot /target /bin/sh -i -l -v -c '(export DEBIAN_FRONTEND=noninteractive ; unset DEBIAN_HAS_FRONTEND ; unset DEBCONF_REDIR ; unset DEBCONF_OLD_FD_BASE ; apt-get --assume-yes install curl openssh-server sudo sed net-tools apt-transport-https)' ; \
chroot /target /bin/bash -c 'service ssh stop' ; \
sed -i -e "s/.*PermitRootLogin.*/PermitRootLogin yes/g" /target/etc/ssh/sshd_config ; \
dmesg | grep -E "Hypervisor detected: Microsoft HyperV|Hypervisor detected: Microsoft Hyper-V" ; \
Expand Down
2 changes: 1 addition & 1 deletion http/generic.devuan3.vagrant.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ d-i passwd/user-uid string 1000
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i passwd/username string vagrant
d-i pkgsel/include string curl openssh-server sudo sed net-tools
d-i pkgsel/include string curl openssh-server sudo sed net-tools apt-transport-https
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select none
d-i pkgsel/upgrade select none
Expand Down
2 changes: 1 addition & 1 deletion http/generic.devuan4.vagrant.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ d-i passwd/user-uid string 1000
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i passwd/username string vagrant
d-i pkgsel/include string curl openssh-server sudo sed net-tools
d-i pkgsel/include string curl openssh-server sudo sed net-tools apt-transport-https
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select none
d-i pkgsel/upgrade select none
Expand Down
2 changes: 1 addition & 1 deletion http/generic.devuan5.vagrant.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ d-i passwd/user-uid string 1000
d-i passwd/user-password password vagrant
d-i passwd/user-password-again password vagrant
d-i passwd/username string vagrant
d-i pkgsel/include string curl openssh-server sudo sed net-tools
d-i pkgsel/include string curl openssh-server sudo sed net-tools apt-transport-https
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select none
d-i pkgsel/upgrade select none
Expand Down
2 changes: 1 addition & 1 deletion scripts/debian10/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
2 changes: 1 addition & 1 deletion scripts/debian11/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
2 changes: 1 addition & 1 deletion scripts/debian12/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
2 changes: 1 addition & 1 deletion scripts/debian8/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
2 changes: 1 addition & 1 deletion scripts/debian9/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
2 changes: 1 addition & 1 deletion scripts/devuan1/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
2 changes: 1 addition & 1 deletion scripts/devuan2/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ error() {
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand Down
33 changes: 15 additions & 18 deletions scripts/devuan3/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,34 +43,34 @@ error() {

cat <<-EOF > /etc/apt/sources.list
deb http://devuan.c3sl.ufpr.br/merged beowulf main
deb-src http://devuan.c3sl.ufpr.br/merged beowulf main
deb https://devuan.c3sl.ufpr.br/merged beowulf main
deb-src https://devuan.c3sl.ufpr.br/merged beowulf main
deb http://devuan.c3sl.ufpr.br/merged beowulf-updates main
deb-src http://devuan.c3sl.ufpr.br/merged beowulf-updates main
deb https://devuan.c3sl.ufpr.br/merged beowulf-updates main
deb-src https://devuan.c3sl.ufpr.br/merged beowulf-updates main
deb http://devuan.c3sl.ufpr.br/merged beowulf-security main
deb-src http://devuan.c3sl.ufpr.br/merged beowulf-security main
deb https://devuan.c3sl.ufpr.br/merged beowulf-security main
deb-src https://devuan.c3sl.ufpr.br/merged beowulf-security main
# deb http://devuan.c3sl.ufpr.br/merged beowulf main contrib non-free
# deb-src http://devuan.c3sl.ufpr.br/merged beowulf main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged beowulf main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged beowulf main contrib non-free
# deb http://devuan.c3sl.ufpr.br/merged beowulf-updates main contrib non-free
# deb-src http://devuan.c3sl.ufpr.br/merged beowulf-updates main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged beowulf-updates main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged beowulf-updates main contrib non-free
# deb http://devuan.c3sl.ufpr.br/merged beowulf-backports main contrib non-free
# deb-src http://devuan.c3sl.ufpr.br/merged beowulf-backports main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged beowulf-backports main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged beowulf-backports main contrib non-free
# deb http://devuan.c3sl.ufpr.br/merged beowulf-security main contrib non-free
# deb-src http://devuan.c3sl.ufpr.br/merged beowulf-security main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged beowulf-security main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged beowulf-security main contrib non-free
EOF

# To allow for automated installs, we disable interactive configuration steps.
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand All @@ -84,9 +84,6 @@ printf "APT::Acquire::Retries \"0\";\n" >> /etc/apt/apt.conf.d/20retries

fi

# Remove the CDROM as a media source.
sed -i -e "/cdrom:/d" /etc/apt/sources.list

# Ensure the server includes any necessary updates.
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" update; error
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" upgrade; error
Expand Down
34 changes: 29 additions & 5 deletions scripts/devuan4/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,36 @@ error() {



cat <<-EOF > /etc/apt/sources.list
deb https://devuan.c3sl.ufpr.br/merged chimaera main
deb-src https://devuan.c3sl.ufpr.br/merged chimaera main
deb https://devuan.c3sl.ufpr.br/merged chimaera-updates main
deb-src https://devuan.c3sl.ufpr.br/merged chimaera-updates main
deb https://devuan.c3sl.ufpr.br/merged chimaera-security main
deb-src https://devuan.c3sl.ufpr.br/merged chimaera-security main
# deb https://devuan.c3sl.ufpr.br/merged chimaera main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged chimaera main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged chimaera-updates main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged chimaera-updates main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged chimaera-backports main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged chimaera-backports main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged chimaera-security main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged chimaera-security main contrib non-free
EOF

# To allow for automated installs, we disable interactive configuration steps.
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand All @@ -60,16 +85,15 @@ printf "APT::Acquire::Retries \"0\";\n" >> /etc/apt/apt.conf.d/20retries

fi

# Remove the CDROM as a media source.
sed -i -e "/cdrom:/d" /etc/apt/sources.list

# Ensure the server includes any necessary updates.
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" update; error
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" upgrade; error
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" dist-upgrade; error

# The packages users expect on a sane system.
retry apt-get --assume-yes install vim mlocate psmisc rsync; error
retry apt-get --assume-yes install vim mlocate psmisc rsync curl \
sudo sed net-tools apt-transport-https sysstat lsb-release mlocate lsof \
bash-doc bash-completion manpages tar xz-utils ; error

# Populate the mlocate database during boot.
printf "@reboot root command bash -c '/etc/cron.daily/mlocate'\n" > /etc/cron.d/mlocate
33 changes: 28 additions & 5 deletions scripts/devuan5/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,36 @@ error() {
#### use the archive server once the distro reaches end of life.


cat <<-EOF > /etc/apt/sources.list
deb https://devuan.c3sl.ufpr.br/merged daedalus main
deb-src https://devuan.c3sl.ufpr.br/merged daedalus main
deb https://devuan.c3sl.ufpr.br/merged daedalus-updates main
deb-src https://devuan.c3sl.ufpr.br/merged daedalus-updates main
deb https://devuan.c3sl.ufpr.br/merged daedalus-security main
deb-src https://devuan.c3sl.ufpr.br/merged daedalus-security main
# deb https://devuan.c3sl.ufpr.br/merged daedalus main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged daedalus main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged daedalus-updates main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged daedalus-updates main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged daedalus-backports main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged daedalus-backports main contrib non-free
# deb https://devuan.c3sl.ufpr.br/merged daedalus-security main contrib non-free
# deb-src https://devuan.c3sl.ufpr.br/merged daedalus-security main contrib non-free
EOF

# To allow for automated installs, we disable interactive configuration steps.
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

# We handle name server setup later, but for now, we need to ensure valid resolvers are available.
# We handle name server setup later, but for now, we need to ensure a valid resolver is available.
printf "nameserver 4.2.2.1\nnameserver 4.2.2.2\nnameserver 208.67.220.220\n" > /etc/resolv.conf

# If the apt configuration directory exists, we add our own config options.
Expand All @@ -61,16 +85,15 @@ printf "APT::Acquire::Retries \"0\";\n" >> /etc/apt/apt.conf.d/20retries

fi

# Remove the CDROM as a media source.
sed -i -e "/cdrom:/d" /etc/apt/sources.list

# Ensure the server includes any necessary updates.
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" update; error
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" upgrade; error
retry apt-get --assume-yes -o Dpkg::Options::="--force-confnew" dist-upgrade; error

# The packages users expect on a sane system.
retry apt-get --assume-yes install vim mlocate psmisc rsync; error
retry apt-get --assume-yes install vim mlocate psmisc rsync curl \
sudo sed net-tools apt-transport-https sysstat lsb-release mlocate lsof \
bash-doc bash-completion manpages tar xz-utils ; error

# Populate the mlocate database during boot.
printf "@reboot root command bash -c '/etc/cron.daily/mlocate'\n" > /etc/cron.d/mlocate

0 comments on commit 050b9dd

Please sign in to comment.