[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#702257: marked as done (apt-setup: new preseed option to disable CDROM entries at the end of the install)



Your message dated Fri, 11 Sep 2015 09:19:03 +0000
with message-id <E1ZaKU3-0003Hs-NW@franck.debian.org>
and subject line Bug#702257: fixed in apt-setup 1:0.102
has caused the Debian Bug report #702257,
regarding apt-setup: new preseed option to disable CDROM entries at the end of the install
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
702257: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702257
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt-setup
Version: 0.77
Severity: wishlist
Tags: patch

apt-setup keep the cdrom: entries in sources.list unless the cdrom is a
netinst. More ofthen than not, those cdrom entries are not desired:
- ISO images to install virtual machines do not want to rely on the
  ISO image down the road
- CD/DVD images are used for one-shot install and are then reused for
  other purposes.
- I also often generate custom CD imagse with automated installation for
  my customers.

As a compromise with the initial design, I suggest to add a new preseed
option to make it possible to disable those cdrom entries at the end of
the installation. This solves the issue for my third scenario above
and that's the one which matters most because there's no clear user who
can fix it afterwards.

Please find a possible patch attached. It has been tested.

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From c6a18c2e08f4daf32735b7081661ac3ad23a6d82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>
Date: Fri, 1 Mar 2013 18:37:45 +0100
Subject: [PATCH] Add new apt-setup/disable-cdrom-entries internal debconf
 parameter

It can be preseeded to disable any cdrom entries in APT's configuration
even if the installation media is not a netinst image.
---
 debian/apt-cdrom-setup.templates   |   11 +++++++++++
 debian/changelog                   |    8 ++++++++
 finish-install.d/10apt-cdrom-setup |   15 +++++++++++++--
 3 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/debian/apt-cdrom-setup.templates b/debian/apt-cdrom-setup.templates
index 220f816..544ffa4 100644
--- a/debian/apt-cdrom-setup.templates
+++ b/debian/apt-cdrom-setup.templates
@@ -122,3 +122,14 @@ Template: apt-setup/use/inet2
 Type: text
 # :sl1:
 _Description: If you have a reasonably good Internet connection, use of a mirror is suggested if you plan to install a graphical desktop environment.
+
+Template: apt-setup/disable-cdrom-entries
+Type: boolean
+Default: false
+Description: for internal use; can be preseeded
+ When set to true, apt-setup always disables cdrom entries from APT's
+ configuration. Otherwise, it disables them only when a netinst image
+ has been used.
+ .
+ This option can be preseeded for automated installations that should
+ not reference the installation media in the target system.
diff --git a/debian/changelog b/debian/changelog
index 526aae7..3fb3345 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+apt-setup (1:0.78) UNRELEASED; urgency=low
+
+  * Add new apt-setup/disable-cdrom-entries internal debconf parameter that
+    can be preseeded to disable any cdrom entries in APT's configuration
+    even if the installation media is not a netinst image.
+
+ -- Raphaël Hertzog <hertzog@debian.org>  Fri, 01 Mar 2013 18:25:43 +0100
+
 apt-setup (1:0.77) unstable; urgency=low
 
   [ Updated translations ]
diff --git a/finish-install.d/10apt-cdrom-setup b/finish-install.d/10apt-cdrom-setup
index c955228..4e51884 100755
--- a/finish-install.d/10apt-cdrom-setup
+++ b/finish-install.d/10apt-cdrom-setup
@@ -1,12 +1,23 @@
 #! /bin/sh
 set -e
 
-# Disable netinst CD image in sources.list if any other sources are present
+. /usr/share/debconf/confmodule
+
+# Can be preseed to true to force cdrom entries to be disabled
+db_get apt-setup/disable-cdrom-entries
+disable_cdrom_entries="$RET"
+
+# Always disable netinst CD image in sources.list if any other sources are present
 if [ -e /cdrom/.disk/base_installable ] && \
    [ -e /cdrom/.disk/cd_type ] && \
    [ "$(cat /cdrom/.disk/cd_type)" = not_complete ] && \
    grep -q "^deb \(ht\|f\)tp" /target/etc/apt/sources.list; then
-	logger -t finish-install "Disabling netinst CD in sources.list"
+	disable_cdrom_entries="true"
+fi
+
+# Comment out the cdrom entries and update APT's cache
+if [ "$disable_cdrom_entries" = "true" ]; then
+	logger -t finish-install "Disabling CDROM entries in sources.list"
 	sed -i "/^deb cdrom:/s/^/#/" /target/etc/apt/sources.list
 	log-output -t finish-install chroot /target apt-get update
 fi
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
Source: apt-setup
Source-Version: 1:0.102

We believe that the bug you reported is fixed in the latest version of
apt-setup, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 702257@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated apt-setup package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 11 Sep 2015 07:01:54 +0200
Source: apt-setup
Binary: apt-setup-udeb apt-mirror-setup apt-cdrom-setup
Architecture: source all i386
Version: 1:0.102
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description:
 apt-cdrom-setup - set up a CD in sources.list (udeb)
 apt-mirror-setup - set up a mirror in sources.list (udeb)
 apt-setup-udeb - Configure apt (udeb)
Closes: 652987 702257
Changes:
 apt-setup (1:0.102) unstable; urgency=medium
 .
   [ Raphaël Hertzog ]
   * Add a new apt-setup/disable-cdrom-entries to be used in preseeding
     that will drop the "cdrom" entries in the target /etc/apt/sources.list.
     Closes: #702257
   * Also disable "cdrom" entries when the detected cd_type is live.
     Closes: #652987
Checksums-Sha1:
 5b020aaa337c1f7e86d4be62dc2a3e5163e18552 1772 apt-setup_0.102.dsc
 7618fad259d5fb7d9619ef90981b7c0f0866fda0 243584 apt-setup_0.102.tar.xz
 02f93c8a87442a1f9ce2f17dc251adf97c597485 97682 apt-cdrom-setup_0.102_all.udeb
 ce94d000bccfeca47f5e3e30dce74a9412df78f9 74052 apt-mirror-setup_0.102_all.udeb
 45804f9179396c6eb2a118f632dff435fd4f05a4 73248 apt-setup-udeb_0.102_i386.udeb
Checksums-Sha256:
 1c731263f457d8af94fbfe884e1e4e3b4d7d9f08769bd3187e048d06bfdcefa9 1772 apt-setup_0.102.dsc
 9ba912227945beffb332b0c84dd6a419b3ebc371db5044343e1328cf2b5b8d9c 243584 apt-setup_0.102.tar.xz
 cb306d248a4b91deae0e9b36b4fd2543220ebaf950742a322db92bea09d4134b 97682 apt-cdrom-setup_0.102_all.udeb
 1935052ec3b2ed9af4433edcec0b916dc0230751505faa5ff696d21de134c9c2 74052 apt-mirror-setup_0.102_all.udeb
 706839fce9e61a54416b1ba2d16d3d34befab53fb490e3da78c53281445ceeed 73248 apt-setup-udeb_0.102_i386.udeb
Files:
 98905dcf24c341fc186af10633cc2797 1772 debian-installer extra apt-setup_0.102.dsc
 931e849d9512aeb31f6d8c4e37e5d49f 243584 debian-installer extra apt-setup_0.102.tar.xz
 6af8202301f95c751c9714db17f59bb6 97682 debian-installer extra apt-cdrom-setup_0.102_all.udeb
 8e1fdba067118b74f1fe98ab4c94daee 74052 debian-installer extra apt-mirror-setup_0.102_all.udeb
 ebf9431a9b01cb0cc24fbef29ad3bfa6 73248 debian-installer standard apt-setup-udeb_0.102_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJV8ojKAAoJEIcvcCxNbiWodpsP/jCmUeEoF4wwL0c5oQDrwX6h
lsGs5f+4nH0aZGO47KqlFo9quH8cXuFrbfqExCItvVw96GHBLrnIaihknG3fIEGc
4LvZXRXr0fykSYFQic4EFHb06u+sWVkMpZCwFyfviQn9WaMycRJ8jE8YRUnIzVLT
cpr8awDgSAkXNHtjRJHVDC7iqE/uCPaeIBCtXvT+3tuIy2dbM0NaI66z/SpQgihg
F6+1VdZJRp4X/CXFwu6CoSEE8iBNsiOAhIGskrMS/Se5h30Liyh+oxrOo8600Qs1
lOilGN3Fh+LNgYySnVqYBWgN0IEtTK3ppciwmEinduKMSs/4FJcNeqY4fJpNwy71
+GznP65IKqQvFJVUfohBV7kgHHtb1yxc1H1iLVRQqlN5IEeshTQMDeC8AqDlY5G2
5+oqg/wSYGj3a5SjObAzT8T89iPlQiOaTSlrd3uOVGx/3F8BbHvHLmZWJcSFF8Pk
bH1VEsXV7jJoDnJS/G/pJqZ3hh+CptpxPbZo13xq9i2TCSnaIxC1XaHfkkd+jwU8
6jYpCfyFyTZL8YZ+gcvk5f6SML93aoR/SB4vBY7LK+2qeJFeIaqIImGbqP/L1GsA
7+OrIDQbcBOmI5GpxVXudRplXCC7c8BAjZF6fpxhwJr8qpld0Vg/lBPFNdDDkGoD
1d/WJn50gml0EgevVZji
=A1kl
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: