Bug 811856

Summary: Add features in build: lvm-snapshot, btrfs-snapshot, unit testing
Product: [Fedora] Fedora Reporter: Oron Peled <oron>
Component: schrootAssignee: Zach Carter <os>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: os
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-27 01:48:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oron Peled 2012-04-12 06:46:46 UTC
Description of problem:

current schroot has no 'lvm-snapshot' support

Steps to Reproduce:
1. create an 'lvm-snapshot' configuration file:
       [sid-snapshot]
       type=lvm-snapshot
       description=Debian unstable LVM snapshot
       priority=3
       groups=sbuild
       users=rleigh
       source-root-users=rleigh
       source-root-groups=admin
       device=/dev/hda_vg/sid_chroot
       mount-options=-o atime,sync,user_xattr
       lvm-snapshot-options=--size 2G

2. run 'schroot -l'
  
Additional info:

The reason is very simple. The schroot configure script check during
build if both lvcreate/lvremove exists. If not, than it compiles
the code without 'lvm-snapshot' support.

Suggested fix:
 * Add a BuildRequires: lvm2
 * I don't currently use btrfs, but 'btrfs-snapshot' is also turned off
   because of similar test. Maybe it's time to add this support as well.

Comment 1 Oron Peled 2012-04-12 09:05:42 UTC
 * Note: bug #600636 comment #4 contains a minor patch to lockdev.
         With this patch, schroot finally can be used by non-root users
         on 'lvm-snapshot' schroots.

 * Supporting also btrfs-snapshot:
   - Add BR: btrfs-progs enable this feature in schroot

   - Build tested, but cannot use this    feature now, since I don't have
     any btrfs filesystems.

 * Support unit testing:
   - Add BR: cppunit-devel

   - Add BR: fakeroot

   - Add to the .spec file:
      %check
      fakeroot make check

   - The unit testing works either with/without the LVM and BTRFS changes
     (without them, these features simply runs 0 tests)

Comment 2 Zach Carter 2012-04-12 16:56:55 UTC
New rawhide build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=3985793

%changelog
* Thu Apr 12 2012 Zach Carter <z.carter> - 1.4.25-1
- New upstream version (removes need for gcc47-patch)
- Add BR to enable unit tests, lvm snapshot, btrfs snapshot support (BZ 811856)
- Add schroot-test-sbuild-util-path.patch

Comment 3 Fedora Update System 2012-05-10 18:40:57 UTC
schroot-1.4.25-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/schroot-1.4.25-1.fc17

Comment 4 Fedora Update System 2012-05-10 20:12:57 UTC
schroot-1.4.25-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/schroot-1.4.25-3.fc16

Comment 5 Oron Peled 2012-05-10 21:09:15 UTC
Browsing the build.log, there is a minor man-pages build bug.
Example (around line 678 of the log):
   make[2]: [schroot-setup.5] Error 127 (ignored)
   /bin/sh: I: command not found

From looking in the man/Makefile.am, it seems the problem is caused
by missing definition of $(SOELIM) which should be found by ./configure.

The configure.ac indeed looks for SOELIM and looking again in the build.log
shows it did not find the soelim(1) program in the mock chroot.

On Fedora, soelim(1) is provided by groff which should be added to the BR of the package.

Comment 6 Fedora Update System 2012-05-11 10:29:10 UTC
Package schroot-1.4.25-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing schroot-1.4.25-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-7690/schroot-1.4.25-3.fc16
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-05-11 16:38:05 UTC
schroot-1.4.25-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/schroot-1.4.25-4.fc16

Comment 8 Fedora Update System 2012-05-25 17:34:13 UTC
schroot-1.4.25-7.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/schroot-1.4.25-7.fc17

Comment 9 Fedora Update System 2012-05-27 01:48:42 UTC
schroot-1.4.25-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2012-06-13 21:36:06 UTC
schroot-1.4.25-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.