Bug 12976 - schroot and dchroot commands are mostly unusable in Mageia 4
Summary: schroot and dchroot commands are mostly unusable in Mageia 4
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure mga4-32-ok mga4-64-ok ...
Keywords: Triaged, validated_update
Depends on:
Blocks:
 
Reported: 2014-03-09 10:39 CET by Oleg Bosis
Modified: 2014-03-24 08:42 CET (History)
5 users (show)

See Also:
Source RPM: schroot-1.7.0-2.mga4.src.rpm
CVE:
Status comment:


Attachments
Fixed/reworked spec-file (5.61 KB, text/x-rpm-spec)
2014-03-10 09:45 CET, Oleg Bosis
Details

Description Oleg Bosis 2014-03-09 10:39:59 CET
Description of problem:

I've updated one of my PCs from Mageia 3 to Mageia 4 and now I can not use neither schroot nor dchroot command. I do always have the following error:

$ schroot -c mga4_32
E: /etc/schroot/schroot.conf: Attempt to add object âdirectoryâ which is not a facet

I've made some investigation and discovered that schroot (and dchroot) doesn't support most of the chroot types it previously supported:

$ schroot --version
schroot (Debian sbuild) 1.7.0 (04 май 2013)
Written by Roger Leigh

Copyright © 2004â2012 Roger Leigh
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Configured features:
  PAM          Pluggable Authentication Modules
  PERSONALITY  Linux kernel Application Binary Interface switching
  UNSHARE      Linux dissassociation of shared execution context

Installed chroot facets:
  personality       Linux kernel Application Binary Interface switching
  plain             Support for âplainâ chroots
  session           Support for session chroots
  session-clonable  Support for session chroot cloning
  source            Support for source chroots
  source-clonable   Support for source chroot cloning
  unshare           Linux dissassociation of shared execution context
  userdata          User setting of custom configuration parameters

There are no any mention of 'directory' (which I use), 'file', 'loopback', 'block-device',  'btrfs-snapshot'  and  'lvm-snapshot' types listed in man schroot.conf.

After further investigation I've found that the reason is that schroot and dchroot are built with static internal libs instead of dynamic ones. I've tried to rebuild schroot package with --enable-shared --disable-static configure options and all these chroot types (except for btrfs one) reappeared:

$ LD_LIBRARY_PATH=../lib64 ./schroot --version
schroot (Debian sbuild) 1.7.0 (04 май 2013)
Written by Roger Leigh

Copyright © 2004â2012 Roger Leigh
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Configured features:
  PAM          Pluggable Authentication Modules
  PERSONALITY  Linux kernel Application Binary Interface switching
  UNION        Support for filesystem unioning
  UNSHARE      Linux dissassociation of shared execution context

Installed chroot facets:
  block-device      Support for âblock-deviceâ chroots
  custom            Support for âcustomâ chroots
  directory         Support for âdirectoryâ chroots
  file              Support for âfileâ chroots
  filesystem-union  Support for filesystem unioning
  loopback          Support for âloopbackâ chroots
  lvm-snapshot      Support for âlvm-snapshotâ chroots
  mountable         Support for filesystem mounting
  personality       Linux kernel Application Binary Interface switching
  plain             Support for âplainâ chroots
  session           Support for session chroots
  session-clonable  Support for session chroot cloning
  source            Support for source chroots
  source-clonable   Support for source chroot cloning
  unshare           Linux dissassociation of shared execution context
  userdata          User setting of custom configuration parameters

Also the UNION feature appeared.

I do not know why static linking schroot doesn't work anymore but the package needs to be rebuilt with dynamic internal library.

Version-Release number of selected component (if applicable):
schroot-1.7.0

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2014-03-09 13:44:52 CET

Keywords: (none) => Triaged
Assignee: bugsquad => makowski.mageia

Comment 1 Philippe Makowski 2014-03-09 15:04:01 CET
(In reply to Oleg Bosis from comment #0)
> I do not know why static linking schroot doesn't work anymore but the
> package needs to be rebuilt with dynamic internal library.
good question
the change was made to fix https://bugs.mageia.org/show_bug.cgi?id=10166
can you check if using --enable-shared --disable-static don't lead to dependency on devel packages ?
Comment 2 Oleg Bosis 2014-03-09 17:14:56 CET
(In reply to Philippe Makowski from comment #1)
> (In reply to Oleg Bosis from comment #0)
> > I do not know why static linking schroot doesn't work anymore but the
> > package needs to be rebuilt with dynamic internal library.
> good question
> the change was made to fix https://bugs.mageia.org/show_bug.cgi?id=10166
> can you check if using --enable-shared --disable-static don't lead to
> dependency on devel packages ?

I'll need to build proper packages to test it. This would take some time. Now I can see that in debian they changed packaging when upgrading to schroot 1.7. They generated the following packages for schroot version 1.6 (from http://ftp.de.debian.org/debian/pool/main/s/schroot/schroot_1.6.4-4.dsc ):

Package-List: 
 dchroot deb admin optional
 dchroot-dsa deb admin optional
 libsbuild-dev deb libdevel optional
 libsbuild-doc deb doc optional
 schroot deb admin optional
 schroot-common deb admin optional
 schroot-dbg deb debug extra

and for schroot 1.7 the package list is the following (from http://ftp.de.debian.org/debian/pool/main/s/schroot/schroot_1.7.2-2.dsc ):

Package-List: 
 dchroot deb admin optional
 dchroot-dsa deb admin optional
 libsbuild-dev deb libdevel optional
 libsbuild-doc deb doc optional
 libsbuild1.7.2 deb libs optional
 libsbuild1.7.2-dbg deb debug extra
 schroot deb admin optional
 schroot-common deb admin optional

There is now separate libsbuild1.7.2 package now, so I think it is required now to use shared version of the library.

BTW debian uses cmake to build schroot and they've removed support for autotools in 1.7.1 and 1.7.2 versions. And to enable lvm-snapshot and btrfs-snapshot types of chroots they use --enable-lvm-snapshot --enable-btrfs-snapshot
options (or -Dlvm-snapshot=ON -Dbtrfs-snapshot=ON for cmake).
Comment 3 Oleg Bosis 2014-03-10 09:45:51 CET
Created attachment 5035 [details]
Fixed/reworked spec-file

I've built the test version of schroot rpm package and tested it on my sysytem. It seems to work so I attach my spec file.

I've used schroot version 1.7.2, so I've moved build process to cmake and enabled missing btrfs and lvm features:

$ schroot --version
schroot (Debian sbuild) 1.7.2 (04 Ñнв 2014)
Written by Roger Leigh

Copyright © 2004â2012 Roger Leigh
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Configured features:
  PAM          Pluggable Authentication Modules
  PERSONALITY  Linux kernel Application Binary Interface switching
  UNION        Support for filesystem unioning
  UNSHARE      Linux dissassociation of shared execution context

Installed chroot facets:
  block-device      Support for âblock-deviceâ chroots
  btrfs-snapshot    Support for âbtrfs-snapshotâ chroots
  custom            Support for âcustomâ chroots
  directory         Support for âdirectoryâ chroots
  file              Support for âfileâ chroots
  filesystem-union  Support for filesystem unioning
  loopback          Support for âloopbackâ chroots
  lvm-snapshot      Support for âlvm-snapshotâ chroots
  mountable         Support for filesystem mounting
  personality       Linux kernel Application Binary Interface switching
  plain             Support for âplainâ chroots
  session           Support for session chroots
  session-clonable  Support for session chroot cloning
  source            Support for source chroots
  source-clonable   Support for source chroot cloning
  unshare           Linux dissassociation of shared execution context
  userdata          User setting of custom configuration parameters
Comment 4 Philippe Makowski 2014-03-10 13:43:08 CET
thanks
Comment 5 Philippe Makowski 2014-03-10 21:23:15 CET
Suggested advisory:
========================

Updated schroot packages fix mga#12976 : "schroot (and dchroot) doesn't support most of the chroot types it previously supported".


References:
https://bugs.mageia.org/show_bug.cgi?id=12976

========================

Updated packages in core/updates_testing:
========================
schroot-1.7.2-1.mga4
lib64sbuild1.7.2-1.7.2-1.mga4
libsbuild1.7.2-1.7.2-1.mga4
schroot-debuginfo-1.7.2-1.mga4
dchroot-1.7.2-1.mga4
lib64sbuild-devel-1.7.2-1.mga4
libsbuild-devel-1.7.2-1.mga4

Source RPMs: 
schroot-1.7.2-1.mga4.src


note: procedure is in https://bugs.mageia.org/show_bug.cgi?id=10166#c6

Assignee: makowski.mageia => qa-bugs
Whiteboard: (none) => has_procedure

Comment 6 Carolyn Rowse 2014-03-23 12:47:53 CET
Tested on Mga4 32-bit.

Running schroot --version and dchroot --version before update confirmed the bug.  Running them after update gave the full listing.

Carolyn

CC: (none) => cmrisolde
Whiteboard: has_procedure => has_procedure MGA4-32-OK

Comment 7 Carolyn Rowse 2014-03-23 13:08:12 CET
Same with Mga4 64-bit.

Just seen the procedure mentioned in comment 5, I'll try to do that as well if I get time, unless someone else manages to first.

Carolyn

Keywords: (none) => validated_update
Whiteboard: has_procedure MGA4-32-OK => has_procedure
CC: (none) => sysadmin-bugs

David GEIGER 2014-03-23 13:10:57 CET

CC: (none) => geiger.david68210
Whiteboard: has_procedure => has_procedure mga4-64-ok mga4-32-ok

Carolyn Rowse 2014-03-23 13:11:48 CET

Keywords: validated_update => (none)

Comment 8 Carolyn Rowse 2014-03-23 18:31:04 CET
Tried Claire's procedure as per link in comment 5 on both archs.

32-bit, everything fine.
64-bit, all fine except deleting the chroot afterwards, will revisit that later this evening.

Carolyn

Whiteboard: has_procedure mga4-64-ok mga4-32-ok => has_procedure mga4-32-ok

Comment 9 Carolyn Rowse 2014-03-23 20:27:08 CET
64-bit is all fine as well, don't know what happened the first time!

Update validated.

See comment 5 for advisory and SRPM.

Could sysadmin please push from core/updates_testing to core/updates.

Thank you.

Carolyn

Keywords: (none) => validated_update
Whiteboard: has_procedure mga4-32-ok => has_procedure mga4-32-ok mga4-64-ok

Comment 10 Dave Hodgins 2014-03-23 21:13:33 CET
Advisory added to svn. Someone from the sysadmin team please push 12976.adv
to updates.

CC: (none) => davidwhodgins
Whiteboard: has_procedure mga4-32-ok mga4-64-ok => has_procedure mga4-32-ok mga4-64-ok advisory

Comment 11 Thomas Backlund 2014-03-24 08:42:55 CET
Update pushed:
http://advisories.mageia.org/MGAA-2014-0088.html

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.