Bug#897145: marked as done (installation report)

2018-04-28 Thread Debian Bug Tracking System
Your message dated Sun, 29 Apr 2018 05:58:44 +0100
with message-id <76c0352d53a2c9ce562ddd5455b825bbb18ed3fa.ca...@decadent.org.uk>
and subject line Re: Bug#897145: installation report
has caused the Debian Bug report #897145,
regarding installation report
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 ow...@bugs.debian.org
immediately.)


-- 
897145: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897145
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---

Package: installation-reports

Boot method: USB drive created from Buster Alpha 2 ISO using unetbootin
Image version: 
https://cdimage.debian.org/cdimage/buster_di_alpha2/amd64/iso-cd/debian-buster-DI-alpha2-amd64-netinst.iso
Date: April 27, 2018 @ 21:33 Eastern (US) Daylight Saving time

Machine: Dell Inspiron 15 3000
Processor:AMD A6
Memory: 8 GB
Partitions: can't boot into Linux to check, installation failed. Standard Dell 
disk not yet changed.

Output of lspci -knn (or lspci -nn): cannot boot into Linux to check, 
installation failed.

Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot:   [E ]
Detect network card:[ ]
Configure network:  [ ]
Detect CD:  [ ]
Load installer modules: [ ]
Detect hard drives: [ ]
Partition hard drives:  [ ]
Install base system:[ ]
Clock/timezone setup:   [ ]
User/password setup:[ ]
Install tasks:  [ ]
Install boot loader:[ ]
Overall install:[ ]

Comments/Problems:
Switched BIOS settings to allow legacy boot and make USB drives first, attempt was made 
to start from USB drive, got "Grub Loading Stage 1.5, Error 17" Cannot boot 
from this drive.

I will try writing the image to a different USB drive to see if the problem 
might be the partition table of the installer drive, which is what Error 17 
would seem to point to.
--
Carl Fink  c...@finknetwork.com
Thinking and logic and stuff at Reasonably Literate
http://reasonablyliterate.com
--- End Message ---
--- Begin Message ---
On Sat, 2018-04-28 at 21:38 -0400, Carl Fink wrote:
> Package: installation-reports
> 
> Boot method: USB drive created from Buster Alpha 2 ISO using unetbootin
[...]

Don't use unetbootin with Debian images; it's not necessary and is
known to cause problems.

https://www.debian.org/CD/faq/#write-usb

Ben.

-- 
Ben Hutchings
[W]e found...that it wasn't as easy to get programs right as we had
thought. I realized that a large part of my life from then on was going
to be spent in finding mistakes in my own programs.
 - Maurice Wilkes, 1949


signature.asc
Description: This is a digitally signed message part
--- End Message ---


Bug#897145: installation report

2018-04-28 Thread Carl Fink

Package: installation-reports

Boot method: USB drive created from Buster Alpha 2 ISO using unetbootin
Image version: 
https://cdimage.debian.org/cdimage/buster_di_alpha2/amd64/iso-cd/debian-buster-DI-alpha2-amd64-netinst.iso
Date: April 27, 2018 @ 21:33 Eastern (US) Daylight Saving time

Machine: Dell Inspiron 15 3000
Processor:AMD A6
Memory: 8 GB
Partitions: can't boot into Linux to check, installation failed. Standard Dell 
disk not yet changed.

Output of lspci -knn (or lspci -nn): cannot boot into Linux to check, 
installation failed.

Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot:   [E ]
Detect network card:[ ]
Configure network:  [ ]
Detect CD:  [ ]
Load installer modules: [ ]
Detect hard drives: [ ]
Partition hard drives:  [ ]
Install base system:[ ]
Clock/timezone setup:   [ ]
User/password setup:[ ]
Install tasks:  [ ]
Install boot loader:[ ]
Overall install:[ ]

Comments/Problems:
Switched BIOS settings to allow legacy boot and make USB drives first, attempt was made 
to start from USB drive, got "Grub Loading Stage 1.5, Error 17" Cannot boot 
from this drive.

I will try writing the image to a different USB drive to see if the problem 
might be the partition table of the installer drive, which is what Error 17 
would seem to point to.
--
Carl Fink  c...@finknetwork.com
Thinking and logic and stuff at Reasonably Literate
http://reasonablyliterate.com



Re: Salsa

2018-04-28 Thread Steve McIntyre
On Fri, Apr 27, 2018 at 04:20:26AM +0200, Cyril Brulebois wrote:
>Hi,
>
>I've just checked the list you provided below with what's in my local
>copy, deployed with .mrconfig:
>
>Steve McIntyre  (2018-04-26):
>> bak.debootstrap
>
>=> deleted as mentioned earlier.
>
>> d-i
>
>=> can go away (alioth generated for all git-based projects)?

Yup. It's empty, so I've killed it. We'll want it anyway for the
top-level d-i git repo, see below!

>> daily-build-logs
>
>=> repository is likely corrupted, not sure it's recoverable; it might
>   make sense to scratch it since its main purpose is to make it easy
>   to find what broke when daily builds regress. Most useful short term
>   anyway, IMHO.

Nod. Looks totally broken, so the import to salsa didn't work. Deleted
the salsa project.

>> kadit-playbooks
>> kadit
>
>=> both not mentioned on purpose

Nod.

>So I think we're (almost) good here.

Yup. I'm now working on the svn2git conversion for the top-level d-i
svn repo. It's taking a while with ~70k commits to resolve! I'm
explicitly ignoring the "people" dir for now, as most of those
personal brances are ancient:

$ svn ls -v svn://svn.debian.org/svn/d-i/people/ 
  69848 adrianor  Apr 22  2015 ./
  40600 xam   Sep 12  2006 alphix-guest/
  43936 fjp   Jan 06  2007 barbier/
  57427 bubulle   Jan 23  2009 bubulle/
  50510 cjwatson  Dec 18  2007 cjwatson/
  41238 eddyp-gu  Oct 04  2006 eddyp/
  62833 fjp   Apr 01  2010 fjp/
  40623 huggieSep 13  2006 huggie/
  21996 jbailey   Sep 24  2004 jbailey/
  60699 joeyh Sep 09  2009 joeyh/
  48862 lunar Aug 03  2007 lunar/
  41604 sferriol  Oct 12  2006 ninou/
  40190 joeyh Aug 24  2006 otavio/
  42674 pgeyleg-  Nov 17  2006 pema/
  51136 philh Feb 01  2008 philh/
  49104 rmh   Sep 01  2007 rmh/
  69848 adrianor  Apr 22  2015 sandbox/
  17800 sjogren   Jul 16  2004 sjogren/
  63663 aurel32   Jul 06  2010 slackydeb/
  41094 stappers  Sep 29  2006 stappers/
  35463 tbm   Mar 16  2006 tbm/
  65626 cjwatson  Nov 15  2010 waldi/
  66442 wouterMar 13  2011 wouter/
  41260 fjp   Oct 05  2006 xam/
  49051 zinoviev  Aug 27  2007 zinoviev/

If people want their old personal svn branches, shout now or they can
grab them from the archive...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"I've only once written 'SQL is my bitch' in a comment. But that code 
 is in use on a military site..." -- Simon Booth



Bug#690210: debootstrap : debian-ports support

2018-04-28 Thread jhcha54008
Hi,

Thank you for your message and your help to improve the
patch towards the quality standard of Debian.

There are still some questions left on the best way to 
package a debian-port support in debootstrap.


Le vendredi 20 avril à 00h 16mn 13s (+0200), Raphael Hertzog a écrit :
> On Wed, 18 Apr 2018, Hideki Yamane wrote:
> > control: tags -1 +pending
> 
> It's not "pending" because it's not yet pushed to the official git
> repository. I don't know if you just forgot to push or if willingly kept
> it out for now...
> 
> But please can you avoid committing intrusive changes before seeking
> reviews ?
> 
> I know that I encouraged you to work on debootstrap but now I feel
> responsible to double check all your work because I found out (an
> non-negligible rate) of simple mistakes and discutable design decisions
> in what you submitted so far.
> 
> >  Adjust it to current git code, could you check it, please?
> 
> I feel really uncomfortable with this patch. It's really intrusive
> and adds tons of perl code in a codebase that was not depending
> on perl. The comment even suggests that we would need an alternative
> C implementation in case perl is not available (and that C implementation
> is not provided here). And the perl code is actually duplicating
> code from libdpkg-perl.

I am afraid debootstrap already depends on perl (it
doesn't show up in the control file as perl-base
is Essential) : it ships a perl function 'pkg_details'
inline (see file /usr/share/debootstrap/functions line 1323
in debootstrap version 1.0.97)

There is no perl in debian-installer, and a C helper is 
provided by the udeb package 'bootstrap-base' as 
/usr/lib/debootstrap/pkgdetails (debootstrap-udeb is arch:all 
and bootstrap-base is arch:any)

I followed the same path to add a debian-ports support. Surely, 
the perl code would greatly benefit from the eye of a perl 
specialist (I am not).

As far as I know, there is no C implementation of sort_pkgs
packaged in debian-installer yet (for an example of what I
have in mind, see 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885878#44

deduplicate from Colin Watson 
https://launchpadlibrarian.net/14818796/234486.diff
seems to have a similar purpose - I haven't tested it yet)

Should the perl code depends on libdpkg-perl or is it bearable
to inline the needed functions ? The former avoids code duplication
with benefits in size and maintainability, the latter keeps the
dependencies to a minimum (wget, perl-base).

As far as I know, there are three main use cases of debootstrap :
1. create a debian chroot on a host running debian (or similar)
2. in debian-installer (base-installer step)
3. "to install Debian GNU/Linux from a Unix/Linux system"
(https://www.debian.org/releases/stable/amd64/apds03.html.en)

Depending on libdpkg-perl is beneficial to the first use case,
and inlining the functions to the third.

> 
> IMO the special casing for ports.debian.org architectures should be
> handled in a dedicated wrapper. And maybe debootstrap needs new features
> to make this wrapper possible.

May I ask what for new features you have in mind ?

> 
> But I ask you to not commit this unless you get other reviews explaining
> that this change is OK despite the above comments.
> 
> Alternatively, some sort of middle ground would be to provide a script
> dedicated to stuff hosted ports.debian.org, the main script would be
> unmodified and the hackish code would be hidden in a script that the user
> would have to request explicitly.
> 
> Cheers,
> -- 
> Raphaël Hertzog ◈ Debian Developer
> 
> Support Debian LTS: https://www.freexian.com/services/debian-lts.html
> Learn to master Debian: https://debian-handbook.info/get/


Is the hope of a debian-ports support in debootstrap still
(not too un)reasonable ?

Regards,
JH Chatenet



Bug#690210: debootstrap : debian-ports support

2018-04-28 Thread jhcha54008
Le mercredi 18 avril à 14h 40mn 35s (+0900), Hideki Yamane a écrit :
> control: tags -1 +pending
> 
> On Sat, 27 May 2017 11:27:06 +0200 jhcha54008  wrote:
> > I am testing the updated ([1],[2]) version attached of a 
> > debootstrap script to accomodate the peculiarities of non 
> > released port architectures from www.debian-ports.org : 
> (snip)
> > I would be thankful for feedback if someone has the opportunity 
> > to test it.
> 
>  Adjust it to current git code, could you check it, please?
> 

Hi again,

Here is a new version of the patch with a better separation of the main 
code from the one to support debian-ports.

I hope it will help !

Regards,
JH Chatenet

diff -Naur debootstrap-1.0.97.orig/debian/rules debootstrap-1.0.97/debian/rules
--- debootstrap-1.0.97.orig/debian/rules2018-04-17 04:06:32.0 
+0200
+++ debootstrap-1.0.97/debian/rules 2018-04-28 11:55:40.107863387 +0200
@@ -37,6 +37,7 @@
debian/debootstrap-udeb/usr/share/debootstrap/scripts/stable \
debian/debootstrap-udeb/usr/share/debootstrap/scripts/testing \
debian/debootstrap-udeb/usr/share/debootstrap/scripts/unstable
+   -rm -f debian/debootstrap-udeb/usr/share/debootstrap/sort_pkgs_perl 
 
 override_dh_gencontrol:
dh_gencontrol -- -Vkeyring=$(KEYRING)
diff -Naur debootstrap-1.0.97.orig/debootstrap debootstrap-1.0.97/debootstrap
--- debootstrap-1.0.97.orig/debootstrap 2018-04-17 04:06:32.0 +0200
+++ debootstrap-1.0.97/debootstrap  2018-04-28 11:55:40.211863902 +0200
@@ -46,6 +46,7 @@
 CHECKCERTIF=""
 PRIVATEKEY=""
 CACHE_DIR=""
+PORT=""
 
 DEF_MIRROR="http://deb.debian.org/debian;
 DEF_HTTPS_MIRROR="https://deb.debian.org/debian;
@@ -124,6 +125,7 @@
   --private-key=file read the private key from file
   --certificate=file use the client certificate stored in file (PEM)
   --no-check-certificate do not check certificate against certificate 
authorities
+  --debian-ports set up defaults for a port architecture (see 
www.ports.debian.org)
 EOF
 }
 
@@ -384,6 +386,10 @@
CHECKCERTIF="--no-check-certificate"
shift
;;
+  --debian-ports)
+   PORT=yes
+   shift
+   ;;
-*)
error 1 BADARG "unrecognized or invalid option %s" "$1"
;;
@@ -428,6 +434,9 @@
TARGET=$CHROOTDIR
fi
SCRIPT=$DEBOOTSTRAP_DIR/suite-script
+   if [ -e "$DEBOOTSTRAP_DIR/functions_for_debian_ports" ]; then
+   PORT=yes
+   fi
 else
if [ -z "$1" ] || [ -z "$2" ]; then
usage_err 1 NEEDSUITETARGET "You must specify a suite and a 
target."
@@ -613,6 +622,10 @@
 
 ###
 
+if [ -n "$PORT" ]; then
+   . "$DEBOOTSTRAP_DIR/functions_for_debian_ports"
+fi
+
 . "$SCRIPT"
 
 if [ "$SECOND_STAGE_ONLY" = "true" ]; then
@@ -716,6 +729,8 @@
echo "$base">"$TARGET/debootstrap/base"
 
chmod 755 "$TARGET/debootstrap/debootstrap"
+   [ "" = "$PORT" ] || \
+   cp "$DEBOOTSTRAP_DIR/functions_for_debian_ports" 
"$TARGET/debootstrap/"
fi
 fi
 
diff -Naur debootstrap-1.0.97.orig/debootstrap.8 
debootstrap-1.0.97/debootstrap.8
--- debootstrap-1.0.97.orig/debootstrap.8   2018-04-17 04:06:32.0 
+0200
+++ debootstrap-1.0.97/debootstrap.82018-04-28 11:55:40.243864061 +0200
@@ -165,6 +165,10 @@
 .IP
 .IP "\fB\-\-private\-key=FILE\fP"
 Read the private key from file
+.IP
+.IP "\fB\-\-debian\-ports=FILE\fP"
+Tweaking for port architectures (see www.ports.debian.org) when downloading
+from a ftp.ports.debian.org mirror.
 
 .SH EXAMPLES
 .
diff -Naur debootstrap-1.0.97.orig/functions debootstrap-1.0.97/functions
--- debootstrap-1.0.97.orig/functions   2018-04-17 04:06:32.0 +0200
+++ debootstrap-1.0.97/functions2018-04-28 11:55:40.479865231 +0200
@@ -1801,3 +1801,8 @@
 fakechroot" >> "$TARGET/var/lib/dpkg/diversions"
 
 }
+
+## debian-ports 
support
+packages_merge_in_work_out_debs () {
+:
+}
diff -Naur debootstrap-1.0.97.orig/functions_for_debian_ports 
debootstrap-1.0.97/functions_for_debian_ports
--- debootstrap-1.0.97.orig/functions_for_debian_ports  1970-01-01 
01:00:00.0 +0100
+++ debootstrap-1.0.97/functions_for_debian_ports   2018-04-28 
12:05:10.262690632 +0200
@@ -0,0 +1,113 @@
+download_indices () {
+   mk_download_dirs
+   "$DOWNLOAD_INDICES" "$(echo "$@" | tr ' ' '\n' | sort)"
+   # debian-ports also needs "unreleased" architecture
+   local mem_SUITE
+   mem_SUITE="$SUITE"
+   SUITE="unreleased" "$DOWNLOAD_INDICES" $(echo "$@" | tr ' ' '\n' | sort)
+   SUITE="$mem_SUITE"
+}
+
+merge_packages_files () {
+   local TEMP_COMPONENTS m c c1 path pkgdest path1 

Bug#621118: patch provided

2018-04-28 Thread Garinot Pierre
I also encountered this bug.

The attached patches fixes it for me.
They also should allow using multiple PV for the same VG (not tested).

WARNING:
_ partman-auto.diff applies on top of the one i provided in #896826
_ I have no idea how to get the device in reuse_partitions(), so my
patch set it to 'reuse', that's wrong, but i don't use $reuse{ and
don't even know what it is used for, so i can't test.

What they do:
_ when calling setup_partition() we also give it the device
(/dev/...) associated to it, setup_partition() writes it in
$id/device
_ auto_lvm_create_vg_map() use the previous information to find
the PVs associated to a VG (by checking $id/vg_name)
diff -Nru partman-auto-137+arcadia1/debian/changelog partman-auto-137+arcadia2/debian/changelog
--- partman-auto-137+arcadia1/debian/changelog	2018-04-27 21:16:34.0 +0200
+++ partman-auto-137+arcadia2/debian/changelog	2018-04-28 18:22:44.0 +0200
@@ -1,3 +1,9 @@
+partman-auto (137+arcadia2) unstable; urgency=medium
+
+  * Add device names to partman directory partitions
+
+ -- Garinot Pierre   Sat, 28 Apr 2018 18:22:44 +0200
+
 partman-auto (137+arcadia1) unstable; urgency=medium
 
   * Filter LVs for computing min_size
diff -Nru partman-auto-137+arcadia1/lib/auto-shared.sh partman-auto-137+arcadia2/lib/auto-shared.sh
--- partman-auto-137+arcadia1/lib/auto-shared.sh	2014-09-06 08:54:15.0 +0200
+++ partman-auto-137+arcadia2/lib/auto-shared.sh	2018-04-28 16:52:49.0 +0200
@@ -103,7 +103,7 @@
 			db_progress STOP
 			autopartitioning_failed
 		fi
-		setup_partition $id $*
+		setup_partition $id reuse $*
 		# Hack to stop EFI partitions showing up as formatted when
 		# they will actually not be.  We do not have a good
 		# interface for this yet.
@@ -172,7 +172,7 @@
 		elif echo "$*" | grep -q "method{ crypto }"; then
 			pv_devices="$pv_devices /dev/mapper/${path##*/}_crypt"
 		fi
-		setup_partition $id $*
+		setup_partition $id $path $*
 		primary=''
 		scheme="$scheme_rest"
 		free_space=$new_free_space
@@ -224,7 +224,7 @@
 	elif echo "$*" | grep -q "method{ crypto }"; then
 		pv_devices="$pv_devices /dev/mapper/${path##*/}_crypt"
 	fi
-	setup_partition $id $*
+	setup_partition $id $path $*
 	free_space=$(partition_after $id)'
 }
 
diff -Nru partman-auto-137+arcadia1/lib/recipes.sh partman-auto-137+arcadia2/lib/recipes.sh
--- partman-auto-137+arcadia1/lib/recipes.sh	2018-04-27 21:16:34.0 +0200
+++ partman-auto-137+arcadia2/lib/recipes.sh	2018-04-28 16:51:08.0 +0200
@@ -278,8 +278,10 @@
 }
 
 setup_partition () {
-	local id flags file line
+	local id flags file line path
 	id=$1; shift
+	path=$1; shift
+	echo "$path" >$id/device
 	while [ "$1" ]; do
 		case "$1" in
 		\$bootable{)
diff -Nru partman-auto-lvm-59/debian/changelog partman-auto-lvm-59+arcadia1/debian/changelog
--- partman-auto-lvm-59/debian/changelog	2016-02-07 18:21:59.0 +0100
+++ partman-auto-lvm-59+arcadia1/debian/changelog	2018-04-28 18:20:56.0 +0200
@@ -1,3 +1,9 @@
+partman-auto-lvm (59+arcadia1) unstable; urgency=medium
+
+  * Fix PV finding
+
+ -- Garinot Pierre   Sat, 28 Apr 2018 18:20:56 +0200
+
 partman-auto-lvm (59) unstable; urgency=medium
 
   [ Colin Watson ]
diff -Nru partman-auto-lvm-59/lib/auto-lvm.sh partman-auto-lvm-59+arcadia1/lib/auto-lvm.sh
--- partman-auto-lvm-59/lib/auto-lvm.sh	2013-07-13 10:51:51.0 +0200
+++ partman-auto-lvm-59+arcadia1/lib/auto-lvm.sh	2018-04-28 18:20:56.0 +0200
@@ -45,6 +45,8 @@
 # temporary name is stored into $DEFAULT_VG.
 auto_lvm_create_vg_map() {
 	local pv_device line recipe_device vg_name vg_file pv_device pv_found
+	local dev part_file
+	dev=$1
 
 	rm -rf $VG_MAP_DIR
 	mkdir -p $VG_MAP_DIR
@@ -66,43 +68,22 @@
 		recipe_device=$(echo "$line" | sed -n -e 's!.*device{ *\([^ }]*\) *}.*!\1!p')
 		# If no VG has been specified, use default VG
 		[ "$vg_name" ] || vg_name="$DEFAULT_VG"
-		# If no PV has been specified, use main device
-		[ "$recipe_device" ] || recipe_device="$main_pv"
 
-		# Find the device for this PV from the list of known PVs
-		pv_found=
-		for pv_device in $pv_devices; do
-			if echo $pv_device | grep -q "$recipe_device[[:digit:]]*"; then
-pv_found=1
-break
+		# Find the devices for this PV from the list of known PVs
+		for part_file in $dev/*; do
+			if [ -d $part_file ] && [ -f $part_file/vg_name ] && 
+[ $(cat $part_file/vg_name) = $vg_name ]; then
+pv_device=$(cat $part_file/device)
+echo "$pv_device" >> $VG_MAP_DIR/$vg_name
 			fi
 		done
-		if [ "$pv_found" ]; then
-			echo $pv_device >> $VG_MAP_DIR/$vg_name
-		else
-			bail_out no_such_pv
-		fi
 	done
 	restore_ifs
-
-	# Add unused devices to default VG
-	for pv_device in $pv_devices; do
-		if ! grep -q "^$pv_device$" $VG_MAP_DIR/*; then
-			echo $pv_device >> $VG_MAP_DIR/$DEFAULT_VG
-		fi
-	done
-
-	# Ensure that all VG have at least one PV
-	for vg_file in 

Bug#517935: Related bug

2018-04-28 Thread Garinot Pierre
Just found this bug while looking for something else, sorry i missed it
before.
I reported the same to partman-auto: #896826
My idea for the patch is almost the same, except it doesn't modify
min_size() and only ignore lvm in choose_recipe.

Not sure which is better...


pgp4Wg5NHktGr.pgp
Description: OpenPGP digital signature


Bug#896826: also filter for recipes defined by the installer

2018-04-28 Thread Garinot Pierre
I updated the patch (joined) so that we also run filter_lvm on recipes
from /lib/partman/recipes*.
diff -Nru partman-auto-137/debian/changelog partman-auto-137+arcadia1/debian/changelog
--- partman-auto-137/debian/changelog	2016-10-13 07:02:40.0 +0200
+++ partman-auto-137+arcadia1/debian/changelog	2018-04-27 21:16:34.0 +0200
@@ -1,3 +1,9 @@
+partman-auto (137+arcadia1) unstable; urgency=medium
+
+  * Filter LVs for computing min_size
+
+ -- Garinot Pierre   Fri, 27 Apr 2018 21:16:34 +0200
+
 partman-auto (137) unstable; urgency=medium
 
   [ Helge Deller ]
diff -Nru partman-auto-137/lib/recipes.sh partman-auto-137+arcadia1/lib/recipes.sh
--- partman-auto-137/lib/recipes.sh	2013-10-01 07:21:24.0 +0200
+++ partman-auto-137+arcadia1/lib/recipes.sh	2018-04-27 21:16:34.0 +0200
@@ -200,6 +200,21 @@
 	done
 }
 
+filter_lvm () {
+	scheme_lvm=$(
+	foreach_partition '
+		if echo "$*" | grep -q '\''in_vg{'\''; then
+			echo "$*"
+		fi'
+	)
+	scheme=$(
+	foreach_partition '
+		if ! echo "$*" | grep -q '\''in_vg{'\''; then
+			echo "$*"
+		fi'
+	)
+}
+
 min_size () {
 	local size
 	size=0
@@ -374,6 +389,9 @@
 		recipe="$RET"
 		decode_recipe $recipe $type
 		filter_reused
+		if [ "$type" = "lvm" ]; then
+			filter_lvm
+		fi
 		min_size=$(min_size)
 		if [ $min_size -le $free_size ]; then
 			return 0
@@ -401,6 +419,9 @@
 		[ -f "$recipe" ] || continue
 		decode_recipe $recipe $type
 		filter_reused
+		if [ "$type" = "lvm" ]; then
+			filter_lvm
+		fi
 		if [ $(min_size) -le $free_size ]; then
 			choices="${choices}${recipe}${TAB}${name}${NL}"
 			if [ "$default_recipe" = no ]; then


pgp72qg2ITOre.pgp
Description: OpenPGP digital signature


Bug#690210: debootstrap : debian-ports support

2018-04-28 Thread jhcha54008
Le mercredi 18 avril à 14h 40mn 35s (+0900), Hideki Yamane a écrit :
> control: tags -1 +pending
> 
> On Sat, 27 May 2017 11:27:06 +0200 jhcha54008  wrote:
> > I am testing the updated ([1],[2]) version attached of a 
> > debootstrap script to accomodate the peculiarities of non 
> > released port architectures from www.debian-ports.org : 
> (snip)
> > I would be thankful for feedback if someone has the opportunity 
> > to test it.
> 
>  Adjust it to current git code, could you check it, please?
> 

Hi,

Thank you for your work on debootstrap and for this
patch adding debian-ports support.

A slightly modified version of the patch (included below)
worked for me (alpha qemu-user emulation in a sid chroot, 
jessie/amd64). I have not the opportunity to test on a 
real alpha workstation presently.

The purpose of the patch was to install through http (or
https) from a debian-ports mirror. This code shouldn't run
if one installs from a CD (there is no 'unreleased' archive on
CD/DVD, https://cdimage.debian.org/cdimage/ports/)
Some architectures (e.g. hppa) don't use the 'unreleased'
distribution for deb packages, even on debian-ports mirrors.
(However, the patch doesn't hurt there as they need to switch the 
default keyring and mirror to the debian-ports ones)

The user should be able to deactivate the debian-ports support code
at will : think of the somewhat special use case where you set up a 
local http mirror serving the content of a CD and install from it.

There are some more comments in this version of the patch. 
However, code which lands in an udeb package has usually terse 
comments : size matters. Please suppress or rephrase the comments
that you don't find necessary for the intelligibility of the code
(an external eye is definitely better than mine !)

We may minimize the footprint in moving the perl code in a separate 
file that we don't ship in debootstrap-udeb : it is useless in 
debian-installer (there is no perl therein).

Where is the right place to give due credit to libdpkg-perl 
(Dpkg::Package and Dpkg::Version) for the functions that I reused ?
Shipping the whole perl code make debootstrap usable with minimal
dependencies (wget and perl-base) : was it the right choice ?

I keep for a coming message some more questions on the 
best way to package debian-ports support inside debian.

Thank you very much for getting debian-ports support under way 
after these years !

Regards,

JH Chatenet

diff -Naur debootstrap-1.0.97.orig/debian/rules debootstrap-1.0.97/debian/rules
--- debootstrap-1.0.97.orig/debian/rules2018-04-17 04:06:32.0 
+0200
+++ debootstrap-1.0.97/debian/rules 2018-04-27 23:55:36.279303900 +0200
@@ -37,6 +37,7 @@
debian/debootstrap-udeb/usr/share/debootstrap/scripts/stable \
debian/debootstrap-udeb/usr/share/debootstrap/scripts/testing \
debian/debootstrap-udeb/usr/share/debootstrap/scripts/unstable
+   -rm -f debian/debootstrap-udeb/usr/share/debootstrap/sort_pkgs_perl 
 
 override_dh_gencontrol:
dh_gencontrol -- -Vkeyring=$(KEYRING)
diff -Naur debootstrap-1.0.97.orig/debootstrap debootstrap-1.0.97/debootstrap
--- debootstrap-1.0.97.orig/debootstrap 2018-04-17 04:06:32.0 +0200
+++ debootstrap-1.0.97/debootstrap  2018-04-27 23:55:36.383304416 +0200
@@ -46,6 +46,7 @@
 CHECKCERTIF=""
 PRIVATEKEY=""
 CACHE_DIR=""
+PORT=""
 
 DEF_MIRROR="http://deb.debian.org/debian;
 DEF_HTTPS_MIRROR="https://deb.debian.org/debian;
@@ -124,6 +125,7 @@
   --private-key=file read the private key from file
   --certificate=file use the client certificate stored in file (PEM)
   --no-check-certificate do not check certificate against certificate 
authorities
+  --debian-ports set up defaults for a port architecture (see 
www.ports.debian.org)
 EOF
 }
 
@@ -384,6 +386,10 @@
CHECKCERTIF="--no-check-certificate"
shift
;;
+  --debian-ports)
+   PORT=yes
+   shift
+   ;;
-*)
error 1 BADARG "unrecognized or invalid option %s" "$1"
;;
@@ -428,6 +434,9 @@
TARGET=$CHROOTDIR
fi
SCRIPT=$DEBOOTSTRAP_DIR/suite-script
+   if [ -e "$DEBOOTSTRAP_DIR/debian_ports" ]; then
+   PORT=yes
+   fi
 else
if [ -z "$1" ] || [ -z "$2" ]; then
usage_err 1 NEEDSUITETARGET "You must specify a suite and a 
target."
@@ -716,6 +725,7 @@
echo "$base">"$TARGET/debootstrap/base"
 
chmod 755 "$TARGET/debootstrap/debootstrap"
+   [ "" = "$PORT" ] || touch "$TARGET/debootstrap/debian_ports"
fi
 fi
 
diff -Naur debootstrap-1.0.97.orig/debootstrap.8 
debootstrap-1.0.97/debootstrap.8
--- debootstrap-1.0.97.orig/debootstrap.8   2018-04-17 04:06:32.0 
+0200
+++ debootstrap-1.0.97/debootstrap.82018-04-27