~ubuntu-branches/ubuntu/oneiric/libvirt/oneiric-updates

« back to all changes in this revision

Viewing changes to src/conf/storage_conf.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2011-05-11 12:29:51 UTC
  • mfrom: (1.2.10) (3.4.30 sid)
  • Revision ID: package-import@ubuntu.com-20110511122951-ku5fk1tv37o5aymm
Tags: 0.9.1-1ubuntu1
* Resynchronize and merge from Debian unstable (LP: #794378). Remaining
  changes:
  - debian/control:
    * set X-Python-Version to 2.7, as 2.6 is not in oneiric.
    * set ubuntu maintainer
    * Build-Depends:
      - remove [linux-any] from all dependencies
      - remove [!linux-any] deps
      - swap libxen to libxen3, qemu to qemu-kvm, and open-iscsi to
        open-iscsi-utils in Build-Depends
      - remove virtualbox-ose Build-Depends
      - add parted and libapparmor-dev Build-Depends
    * convert Vcs-Git to Xs-Debian-Vcs-Git
    * libvirt-bin Depends: move netcat-openbsd, bridge-utils, dnsmasq-base
      (>= 2.46-1), and iptables from Recommends to Depends
    * libvirt-bin Recommends: move qemu to Suggests
    * libvirt-bin Suggests: add apparmor
    * libvirt0 Recommands: move lvm2 to Suggests
  - keep debian/libvirt-bin.apport
  - keep debian/libvirt-bin.cron.daily
  - debian/libvirt-bin.dirs:
    * add apparmor, cron.daily, and apport dirs
  - debian/libvirt-bin.examples:
    * add debian/libvirt-suspendonreboot
  - debian/libvirt-bin.install:
    * add /etc/apparmor.d files
    * add apport hook
  - debian/libvirt-bin.manpages:
    * add debian/libvirt-migrate-qemu-disks.1
  - debian/libvirt-bin.postinst:
    * replace libvirt groupname with libvirtd
    * add each admin user to libvirtd group
    * call apparmor_parser on usr.sbin.libvirtd and
      usr.lib.libvirt.virt-aa-helper
    * call 'libvirt-migrate-qemu-disks -a' after
      libvirt-bin has started if migrating from
      older than 0.8.3-1ubuntu1
  - debian/libvirt-bin.postrm:
    * replace libvirt groupname with libvirtd
    * remove usr.sbin.libvirtd and
      usr.lib.libvirt.virt-aa-helper
  - keep added files under debian/:
    * libvirt-bin.upstart
    * libvirt-migrate-qemu-disks
    * libvirt-migrate-qemu-disks.1
    * libvirt-suspendonreboot
    * apparmor profiles
  - debian/README.Debian:
    * add 'Apparmor Profile' section
    * add 'Disk migration' section
  - debian/rules:
    * move include of debhelper.mk to top of file so DEB_HOST_ARCH_OS
      is defined.
    * don't build with vbox since virtualbox-ose is in universe
      - remove WITH_VBOX, add explicit --without-vbox
    * add --with-apparmor to DEB_CONFIGURE_EXTRA_FLAGS
    * set DEB_DH_INSTALLINIT_ARGS to '--upstart-only'
    * remove unneeded binary-install/libvirt-bin:: and clean::
      sections (they only deal with sysvinit stuff)
    * add build/libvirt-bin:: section to install
      - apparmor files
      - apport hooks
      - libvirt-migrate-qemu-disks
* debian/patches/series:
  - don't apply Disable-CHECKSUM-rule.patch: our iptables can do this
  - don't apply Debian-specific Debianize-libvirt-guests.patch (sysvinit only)
  - don't apply Disable qemu-disable-network.diff.patch
* debian/patches:
  - drop 9007-fix-daemon-conf-ftbfs.patch (looks like it may be fixed)
  - drop patches applied upstream:
    * 9022-drop-booton-when-kernel-specified.patch
    * 9023-fix-lxc-console-hangup.patch
    * 9024-fix-broken-commandtest.patch
    * 9025-Pass-virSecurityManagerPtr-to-virSecurityDAC-Set-Res.patch
    * 9026-security-avoid-memory-leak.patch
    * 9027-CVE-2011-1146.patch
  - keep patches:
    * 9000-delayed_iff_up_bridge.patch
    * 9001-dont_clobber_existing_bridges.patch
    * 9002-better_default_uri_virsh.patch
    * 9003-better-default-arch.patch
    * 9004-libvirtd-group-name.patch
    * 9005-increase-unix-socket-timeout.patch
    * 9006-default-config-test-case.patch
    * 9011-move-ebtables-script.patch (refreshed)
    * 9014-skip-nodeinfotest.patch (modified to make it apply)
    * 9020-lp545795.patch (modified to make it still apply)
    * 9021-fix-uint64_t.patch
    * 9022-allows-lxc-containers-with-lxcguest.patch (renamed, modified
      to make it still apply, and added DEP-3 tags).
  - new patches:
    * 9023-disable-test-poll.patch - don't run broken test-poll

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
    char *authType = NULL;
397
397
    int nsource, i;
398
398
    virStoragePoolOptionsPtr options;
399
 
    char *port;
 
399
    char *port = NULL;
400
400
 
401
401
    relnode = ctxt->node;
402
402
    ctxt->node = node;
1473
1473
    }
1474
1474
 
1475
1475
    while ((entry = readdir(dir))) {
1476
 
        char path[PATH_MAX];
1477
 
        char autostartLink[PATH_MAX];
 
1476
        char *path;
 
1477
        char *autostartLink;
1478
1478
        virStoragePoolObjPtr pool;
1479
1479
 
1480
1480
        if (entry->d_name[0] == '.')
1483
1483
        if (!virFileHasSuffix(entry->d_name, ".xml"))
1484
1484
            continue;
1485
1485
 
1486
 
        if (virFileBuildPath(configDir, entry->d_name,
1487
 
                             NULL, path, PATH_MAX) < 0) {
1488
 
            virStorageReportError(VIR_ERR_INTERNAL_ERROR,
1489
 
                                  _("Config filename '%s/%s' is too long"),
1490
 
                                  configDir, entry->d_name);
 
1486
        if (!(path = virFileBuildPath(configDir, entry->d_name, NULL)))
1491
1487
            continue;
1492
 
        }
1493
1488
 
1494
 
        if (virFileBuildPath(autostartDir, entry->d_name,
1495
 
                             NULL, autostartLink, PATH_MAX) < 0) {
1496
 
            virStorageReportError(VIR_ERR_INTERNAL_ERROR,
1497
 
                                  _("Autostart link path '%s/%s' is too long"),
1498
 
                                  autostartDir, entry->d_name);
 
1489
        if (!(autostartLink = virFileBuildPath(autostartDir, entry->d_name,
 
1490
                                               NULL))) {
 
1491
            VIR_FREE(path);
1499
1492
            continue;
1500
1493
        }
1501
1494
 
1503
1496
                                     autostartLink);
1504
1497
        if (pool)
1505
1498
            virStoragePoolObjUnlock(pool);
 
1499
 
 
1500
        VIR_FREE(path);
 
1501
        VIR_FREE(autostartLink);
1506
1502
    }
1507
1503
 
1508
1504
    closedir(dir);
1520
1516
 
1521
1517
    if (!pool->configFile) {
1522
1518
        int err;
1523
 
        char path[PATH_MAX];
1524
1519
 
1525
1520
        if ((err = virFileMakePath(driver->configDir))) {
1526
1521
            virReportSystemError(err,
1529
1524
            return -1;
1530
1525
        }
1531
1526
 
1532
 
        if (virFileBuildPath(driver->configDir, def->name, ".xml",
1533
 
                             path, sizeof(path)) < 0) {
1534
 
            virStorageReportError(VIR_ERR_INTERNAL_ERROR,
1535
 
                                  "%s", _("cannot construct config file path"));
1536
 
            return -1;
1537
 
        }
1538
 
        if (!(pool->configFile = strdup(path))) {
1539
 
            virReportOOMError();
 
1527
        if (!(pool->configFile = virFileBuildPath(driver->configDir,
 
1528
                                                  def->name, ".xml"))) {
1540
1529
            return -1;
1541
1530
        }
1542
1531
 
1543
 
        if (virFileBuildPath(driver->autostartDir, def->name, ".xml",
1544
 
                             path, sizeof(path)) < 0) {
1545
 
            virStorageReportError(VIR_ERR_INTERNAL_ERROR,
1546
 
                                  "%s", _("cannot construct "
1547
 
                                          "autostart link path"));
1548
 
            VIR_FREE(pool->configFile);
1549
 
            return -1;
1550
 
        }
1551
 
        if (!(pool->autostartLink = strdup(path))) {
1552
 
            virReportOOMError();
 
1532
        if (!(pool->autostartLink = virFileBuildPath(driver->autostartDir,
 
1533
                                                     def->name, ".xml"))) {
1553
1534
            VIR_FREE(pool->configFile);
1554
1535
            return -1;
1555
1536
        }