master - lvmetad: Keep the cache consistent when a PV moves around.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bf29eabdba4be1...
Commit: bf29eabdba4be1c706da7b80c803de5a98619baf
Parent: a36869867275b8ef0f6d324bc5a7f3e2b8e445e9
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Fri Feb 28 10:59:12 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
lvmetad: Keep the cache consistent when a PV moves around.
In cases where PV appears on a new device without disappearing from an old one
first, the device->pvid pointers could become ambiguous. This could cause the
ambiguous PV to be lost from the cache when a different PV comes up on one of
the ambiguous devices.
---
daemons/lvmetad/lvmetad-core.c | 15 ++++++++++++---
test/shell/lvmetad-ambiguous.sh | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index e6e222f..db05dc2 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -861,7 +861,7 @@ static response pv_found(lvmetad_state *s, request r)
const char *vgid = daemon_request_str(r, "metadata/id", NULL);
const char *vgid_old = NULL;
struct dm_config_node *pvmeta = dm_config_find_node(r.cft->root, "pvmeta");
- uint64_t device;
+ uint64_t device, device_old_pvid = 0;
struct dm_config_tree *cft, *pvmeta_old_dev = NULL, *pvmeta_old_pvid = NULL;
char *old;
char *pvid_dup;
@@ -883,9 +883,12 @@ static response pv_found(lvmetad_state *s, request r)
dm_hash_remove(s->pvid_to_pvmeta, old);
vgid_old = dm_hash_lookup(s->pvid_to_vgid, old);
}
- pvmeta_old_pvid = dm_hash_lookup(s->pvid_to_pvmeta, pvid);
- DEBUGLOG(s, "pv_found %s, vgid = %s, device = %" PRIu64 ", old = %s", pvid, vgid, device, old);
+ if ((pvmeta_old_pvid = dm_hash_lookup(s->pvid_to_pvmeta, pvid)))
+ dm_config_get_uint64(pvmeta_old_pvid->root, "pvmeta/device", &device_old_pvid);
+
+ DEBUGLOG(s, "pv_found %s, vgid = %s, device = %" PRIu64 " (previously %" PRIu64 "), old = %s",
+ pvid, vgid, device, device_old_pvid, old);
dm_free(old);
@@ -903,6 +906,11 @@ static response pv_found(lvmetad_state *s, request r)
return reply_fail("out of memory");
}
+ if (pvmeta_old_pvid && device != device_old_pvid) {
+ DEBUGLOG(s, "pv %s no longer on device %" PRIu64, pvid, device_old_pvid);
+ dm_hash_remove_binary(s->device_to_pvid, &device_old_pvid, sizeof(device_old_pvid));
+ }
+
if (!dm_hash_insert(s->pvid_to_pvmeta, pvid, cft) ||
!dm_hash_insert_binary(s->device_to_pvid, &device, sizeof(device), (void*)pvid_dup)) {
dm_hash_remove(s->pvid_to_pvmeta, pvid);
@@ -911,6 +919,7 @@ static response pv_found(lvmetad_state *s, request r)
dm_free(pvid_dup);
return reply_fail("out of memory");
}
+
if (pvmeta_old_pvid)
dm_config_destroy(pvmeta_old_pvid);
if (pvmeta_old_dev && pvmeta_old_dev != pvmeta_old_pvid)
diff --git a/test/shell/lvmetad-ambiguous.sh b/test/shell/lvmetad-ambiguous.sh
new file mode 100644
index 0000000..455aa5d
--- /dev/null
+++ b/test/shell/lvmetad-ambiguous.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+. lib/test
+
+test -e LOCAL_LVMETAD || skip
+
+aux prepare_pvs 2
+
+# flip the devices around
+aux init_udev_transaction
+dmsetup remove -f "$dev1"
+dmsetup remove -f "$dev2"
+dmsetup create -u TEST-${PREFIX}pv2 ${PREFIX}pv2 ${PREFIX}pv2.table
+dmsetup create -u TEST-${PREFIX}pv1 ${PREFIX}pv1 ${PREFIX}pv1.table
+aux finish_udev_transaction
+
+# re-scan them
+pvscan --cache $dev1
+pvscan --cache $dev2
+
+# expect both to be there
+pvs | tee pvs.txt
+grep $dev1 pvs.txt
+grep $dev2 pvs.txt
+
9 years, 9 months
master - lvmetad: Hide corrupt MDAs from the cache.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a36869867275b8...
Commit: a36869867275b8ef0f6d324bc5a7f3e2b8e445e9
Parent: 6b43db580474ae96627c6b3784c136b56f30dde3
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 27 23:06:42 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
lvmetad: Hide corrupt MDAs from the cache.
This is probably not optimal, but makes the lvmetad case mimic non-lvmetad code
more closely. It also fixes vgremove of a partially corrupt VG with lvmetad, as
_vg_write_raw (and consequently, entire vg_write) currently panics when it
encounters a corrupt MDA. Ideally, we'd be able to explicitly control when it is
safe to ignore them.
---
lib/format_text/format-text.c | 47 +++++++++++++++++++++++-------------
test/shell/vgremove-corrupt-vg.sh | 20 +++++++++++++++
2 files changed, 50 insertions(+), 17 deletions(-)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index b4f96f8..0d6483a 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -316,18 +316,13 @@ static void _xlate_mdah(struct mda_header *mdah)
}
}
-struct mda_header *raw_read_mda_header(const struct format_type *fmt,
- struct device_area *dev_area)
+static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev_area)
{
- struct mda_header *mdah;
-
- if (!(mdah = dm_pool_alloc(fmt->cmd->mem, MDA_HEADER_SIZE))) {
- log_error("struct mda_header allocation failed");
- return NULL;
- }
+ if (!dev_open(dev_area->dev))
+ return_0;
if (!dev_read(dev_area->dev, dev_area->start, MDA_HEADER_SIZE, mdah))
- goto_bad;
+ return_0;
if (mdah->checksum_xl != xlate32(calc_crc(INITIAL_CRC, (uint8_t *)mdah->magic,
MDA_HEADER_SIZE -
@@ -335,7 +330,7 @@ struct mda_header *raw_read_mda_header(const struct format_type *fmt,
log_error("Incorrect metadata area header checksum on %s"
" at offset %"PRIu64, dev_name(dev_area->dev),
dev_area->start);
- goto bad;
+ return 0;
}
_xlate_mdah(mdah);
@@ -344,28 +339,42 @@ struct mda_header *raw_read_mda_header(const struct format_type *fmt,
log_error("Wrong magic number in metadata area header on %s"
" at offset %"PRIu64, dev_name(dev_area->dev),
dev_area->start);
- goto bad;
+ return 0;
}
if (mdah->version != FMTT_VERSION) {
log_error("Incompatible metadata area header version: %d on %s"
" at offset %"PRIu64, mdah->version,
dev_name(dev_area->dev), dev_area->start);
- goto bad;
+ return 0;
}
if (mdah->start != dev_area->start) {
log_error("Incorrect start sector in metadata area header: %"
PRIu64" on %s at offset %"PRIu64, mdah->start,
dev_name(dev_area->dev), dev_area->start);
- goto bad;
+ return 0;
}
- return mdah;
+ return 1;
+}
-bad:
- dm_pool_free(fmt->cmd->mem, mdah);
- return NULL;
+struct mda_header *raw_read_mda_header(const struct format_type *fmt,
+ struct device_area *dev_area)
+{
+ struct mda_header *mdah;
+
+ if (!(mdah = dm_pool_alloc(fmt->cmd->mem, MDA_HEADER_SIZE))) {
+ log_error("struct mda_header allocation failed");
+ return NULL;
+ }
+
+ if (!_raw_read_mda_header(mdah, dev_area)) {
+ dm_pool_free(fmt->cmd->mem, mdah);
+ return NULL;
+ }
+
+ return mdah;
}
static int _raw_write_mda_header(const struct format_type *fmt,
@@ -1670,6 +1679,10 @@ static int _mda_export_text_raw(struct metadata_area *mda,
struct dm_config_node *parent)
{
struct mda_context *mdc = (struct mda_context *) mda->metadata_locn;
+ char mdah[MDA_HEADER_SIZE]; /* temporary */
+
+ if (!mdc || !_raw_read_mda_header(mdah, &mdc->area))
+ return 1; /* pretend the MDA does not exist */
return config_make_nodes(cft, parent, NULL,
"ignore = %" PRId64, (int64_t) mda_is_ignored(mda),
diff --git a/test/shell/vgremove-corrupt-vg.sh b/test/shell/vgremove-corrupt-vg.sh
new file mode 100644
index 0000000..9e750ac
--- /dev/null
+++ b/test/shell/vgremove-corrupt-vg.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+. lib/test
+
+aux prepare_vg 3
+lvcreate -n blabla -L 1 $vg -an --zero n
+
+dd if=/dev/urandom bs=512 seek=2 count=32 of="$dev2"
+aux notify_lvmetad "$dev2"
+
+vgremove -f $vg
9 years, 9 months
master - NIX: Change the URL for the lcov RPM to a more canonic location.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6b43db580474ae...
Commit: 6b43db580474ae96627c6b3784c136b56f30dde3
Parent: ea5ec4ad51e3270b6b4337822d248d5bdbe12ddc
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 27 23:43:57 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
NIX: Change the URL for the lcov RPM to a more canonic location.
---
nix/default.nix | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nix/default.nix b/nix/default.nix
index 9a688dd..75c7277 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -17,7 +17,7 @@ let
# fc16 lcov is broken and el6 has none... be creative
prepareImagePhase = ''
rpm -Uv ${pkgs.fetchurl {
- url="ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/updates/16/i386/lcov-1.9-2.fc16.noarch.rpm";
+ url = "http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/16/i38...";
sha256 = "0ycdh5mb7p5ll76mqk0p6gpnjskvxxgh3a3bfr1crh94nvpwhp4z"; }}
dmesg -n 1 # avoid spilling dmesg into the main log, we capture it in harness
'';
9 years, 9 months
master - NIX: Update the release.nix path in build.sh.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ea5ec4ad51e327...
Commit: ea5ec4ad51e3270b6b4337822d248d5bdbe12ddc
Parent: b86489843ea1d82430fbf7a9d1e68d9187f6acbe
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 27 23:43:29 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
NIX: Update the release.nix path in build.sh.
---
nix/build.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nix/build.sh b/nix/build.sh
index e9aee37..88f6479 100755
--- a/nix/build.sh
+++ b/nix/build.sh
@@ -6,6 +6,6 @@ rm -rf lvm-snapshot
mkdir lvm-snapshot
git ls-tree -r HEAD --name-only | xargs cp --parents --target-directory=lvm-snapshot
tar cvzf lvm-snapshot.tar.gz lvm-snapshot
-nix-build release.nix \
+nix-build nix/ \
--arg lvm2Src "`pwd`/lvm-snapshot.tar.gz" \
--arg lvm2Nix `pwd` -A "$@"
9 years, 9 months
master - NIX: Add a short README (to be expanded).
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b86489843ea1d8...
Commit: b86489843ea1d82430fbf7a9d1e68d9187f6acbe
Parent: 421ca4cd143d3d3935567a76dbed1b19d7c397ce
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 27 23:36:49 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
NIX: Add a short README (to be expanded).
---
nix/README | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/nix/README b/nix/README
new file mode 100644
index 0000000..bee7a07
--- /dev/null
+++ b/nix/README
@@ -0,0 +1,13 @@
+This directory contains nix integration for building and testing LVM2 in various
+virtual machine configurations. The *.nix files are written in the nix
+declarative language (see http://nixos.org/nix).
+
+There are two basic use-cases for this integration. First, a hydra instance (see
+http://divine.fi.muni.cz/hydra/project/lvm2 and
+http://divine.fi.muni.cz/~xrockai/lvm-testmatrix.html) builds and tests LVM in
+all the configurations described in default.nix after every push to the git
+repository. Second, any nix-enabled system can very closely reproduce any of
+those test scenarios using the "build.sh" script and an appropriate checkout of
+"nixpkgs" (cf. http://nixos.org/nixpkgs).
+
+(The rest of this document is TODO.)
9 years, 9 months
master - spec: Add a copyright header and an explanatory notice.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=421ca4cd143d3d...
Commit: 421ca4cd143d3d3935567a76dbed1b19d7c397ce
Parent: 658f8976a3d755aaccbbcc161b4464da9b48f9c6
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 27 23:22:33 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
spec: Add a copyright header and an explanatory notice.
---
spec/lvm2.spec | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/spec/lvm2.spec b/spec/lvm2.spec
index f339367..89b37e7 100644
--- a/spec/lvm2.spec
+++ b/spec/lvm2.spec
@@ -1,3 +1,19 @@
+# Copyright (C) 2013-2014 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# NB. This specfile is a work in progress. It is currently used by the
+# continuous integration system driven by nix and hydra to create and test RPMs
+# on Fedora, CentOS and RHEL systems. It is not yet ready for deployment of LVM
+# on those systems.
+
+# A macro to pull in an include file from an appropriate location.
%define import() %include %(test -e %{S:%1} && echo %{S:%1} || echo %{_sourcedir}/%1)
%import source.inc
9 years, 9 months
master - NIX: Move nix-related bits under nix/.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=658f8976a3d755...
Commit: 658f8976a3d755aaccbbcc161b4464da9b48f9c6
Parent: 244b80d948052c07b6f252c40146bae4a866362c
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 27 23:15:28 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
NIX: Move nix-related bits under nix/.
---
nix-build.sh | 11 ---
nix/build.sh | 11 +++
nix/default.nix | 239 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
release.nix | 239 -------------------------------------------------------
4 files changed, 250 insertions(+), 250 deletions(-)
diff --git a/nix-build.sh b/nix-build.sh
deleted file mode 100755
index e9aee37..0000000
--- a/nix-build.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-set -ex
-rm -f result
-rm -f divine-snapshot.tar.gz
-rm -rf lvm-snapshot
-mkdir lvm-snapshot
-git ls-tree -r HEAD --name-only | xargs cp --parents --target-directory=lvm-snapshot
-tar cvzf lvm-snapshot.tar.gz lvm-snapshot
-nix-build release.nix \
- --arg lvm2Src "`pwd`/lvm-snapshot.tar.gz" \
- --arg lvm2Nix `pwd` -A "$@"
diff --git a/nix/build.sh b/nix/build.sh
new file mode 100755
index 0000000..e9aee37
--- /dev/null
+++ b/nix/build.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -ex
+rm -f result
+rm -f divine-snapshot.tar.gz
+rm -rf lvm-snapshot
+mkdir lvm-snapshot
+git ls-tree -r HEAD --name-only | xargs cp --parents --target-directory=lvm-snapshot
+tar cvzf lvm-snapshot.tar.gz lvm-snapshot
+nix-build release.nix \
+ --arg lvm2Src "`pwd`/lvm-snapshot.tar.gz" \
+ --arg lvm2Nix `pwd` -A "$@"
diff --git a/nix/default.nix b/nix/default.nix
new file mode 100644
index 0000000..9a688dd
--- /dev/null
+++ b/nix/default.nix
@@ -0,0 +1,239 @@
+{ nixpkgs ? <nixpkgs>, lvm2Src, release ? false,
+ rawhide32 ? "" , rawhide64 ? "" ,
+ fc19_32_updates ? "", fc19_64_updates ? "",
+ fc18_32_updates ? "", fc18_64_updates ? "",
+ lvm2Nix ? lvm2Src, T ? "" }:
+
+let
+ pkgs = import nixpkgs {};
+ mkVM = { VM, extras ? [], diskFun, kernel }:
+ VM rec {
+ inherit kernel;
+ name = "lvm2";
+ fullName = "LVM2";
+ src = jobs.tarball;
+ diskImage = diskFun { extraPackages = extras; };
+ memSize = 768;
+ # fc16 lcov is broken and el6 has none... be creative
+ prepareImagePhase = ''
+ rpm -Uv ${pkgs.fetchurl {
+ url="ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/updates/16/i386/lcov-1.9-2.fc16.noarch.rpm";
+ sha256 = "0ycdh5mb7p5ll76mqk0p6gpnjskvxxgh3a3bfr1crh94nvpwhp4z"; }}
+ dmesg -n 1 # avoid spilling dmesg into the main log, we capture it in harness
+ '';
+ postBuild = ''
+ cd `cat /tmp/build-location`
+ mv test/results/list test/results/list-rpm
+ rpm -Uvh /tmp/rpmout/RPMS/*/*.rpm # */
+ (/usr/lib/systemd/systemd-udevd || /usr/lib/udev/udevd || /sbin/udevd || find / -xdev -name \*udevd) &
+ make check_system QUIET=1 T=${T} || touch $out/nix-support/failed
+ mv test/results/list test/results/list-system
+ cat test/results/list-* > test/results/list
+ cp -R test/results $out/test-results && \
+ echo "report tests $out/test-results" >> $out/nix-support/hydra-build-products || \
+ true
+ make lcov || true
+ cp -R lcov_reports $out/coverage && \
+ echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products || \
+ true # not really fatal, although kinda disappointing
+ '';
+ };
+
+ rootmods = [ "virtio_pci" "virtio_blk" "virtio_balloon" "ext4" "unix"
+ "cifs" "virtio_net" "unix" "hmac" "md4" "ecb" "des_generic" "sha256" ];
+
+ centos_url = ver: arch: if ver == "6.5"
+ then "http://ftp.fi.muni.cz/pub/linux/centos/${ver}/os/${arch}/"
+ else "http://vault.centos.org/${ver}/os/${arch}/";
+ fedora_url = ver: arch: if pkgs.lib.eqStrings ver "rawhide" || pkgs.lib.eqStrings ver "19"
+ then "ftp://ftp.fi.muni.cz/pub/linux/fedora/linux/development/${ver}/${arch}/os/"
+ else "mirror://fedora/linux/releases/${ver}/Everything/${arch}/os/";
+ fedora_update_url = ver: arch: "mirror://fedora/linux/updates/${ver}/${arch}";
+ extra_distros = with pkgs.lib; let
+ centos = { version, sha, arch }: {
+ name = "centos-${version}-${arch}";
+ fullName = "CentOS ${version} (${arch})";
+ packagesList = pkgs.fetchurl {
+ url = centos_url version arch + "repodata/${sha}-primary.xml.gz";
+ sha256 = sha;
+ };
+ urlPrefix = centos_url version arch;
+ archs = ["noarch" arch] ++ (if eqStrings arch "i386" then ["i586" "i686"] else []);
+ packages = filter (n: !(eqStrings n "fedora-release")) pkgs.vmTools.commonFedoraPackages ++
+ [ "centos-release" ];
+ };
+ fedora = { version, sha, arch }: rec {
+ name = "fedora-${version}-${arch}";
+ fullName = "Fedora ${version} (${arch})";
+ packagesList = pkgs.fetchurl {
+ url = fedora_url version arch + "repodata/${sha}-primary.xml.gz";
+ sha256 = sha;
+ };
+ urlPrefix = fedora_url version arch;
+ archs = ["noarch" arch] ++ (if eqStrings arch "i386" then ["i586" "i686"] else []);
+ packages = pkgs.vmTools.commonFedoraPackages;
+ unifiedSystemDir = true;
+ };
+ rawhide = version: arch: repodata: import (pkgs.runCommand "rawhide-${version}-${arch}.nix" {} ''
+ sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:')
+ echo '{fedora}: fedora { version = "${version}"; sha = "'$sha'"; arch = "${arch}"; }' > $out
+ '') { inherit fedora; };
+ update = version: arch: repodata: orig: orig // (import (pkgs.runCommand "updates-fedora.nix" {} ''
+ sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:')
+ echo fedora ${version} updates sha: $sha
+ (echo 'fetchurl: orig: { packagesLists = [ orig.packagesList ('
+ echo "fetchurl { "
+ echo " url = \"${fedora_update_url version arch}/repodata/$sha-primary.xml.gz\";"
+ echo " sha256 = \"$sha\";"
+ echo '} ) ]; urlPrefixes = [ orig.urlPrefix "${fedora_update_url version arch}" ]; }'
+ ) > $out
+ echo built $out 1>&2
+ '')) pkgs.fetchurl orig;
+ in {
+ rawhidex86_64 = rawhide "rawhide" "x86_64" rawhide64;
+ rawhidei386 = rawhide "rawhide" "i386" rawhide32;
+ fedora19ux86_64 = update "19" "x86_64" fc19_64_updates pkgs.vmTools.rpmDistros.fedora19x86_64;
+ fedora19ui386 = update "19" "i386" fc19_32_updates pkgs.vmTools.rpmDistros.fedora19i386;
+ fedora18ux86_64 = update "18" "x86_64" fc18_64_updates pkgs.vmTools.rpmDistros.fedora18x86_64;
+ fedora18ui386 = update "18" "i386" fc18_32_updates pkgs.vmTools.rpmDistros.fedora18i386;
+
+ #centos63x86_64 = centos {
+ # version="6.3"; arch="x86_64";
+ # sha="4d3cddf382e81c20b167a8d13c7c92067040a1947dbb3c29cfafa01a74a26a2b";
+ #};
+
+ #centos63i386 = centos {
+ # version="6.3"; arch="i386";
+ # sha="5cee0e0c4d7e2dcb997f123ce9107dedbc424d80dd7f2b2471b3b348f3e1754c";
+ #};
+
+ centos64x86_64 = centos {
+ version="6.4"; arch="x86_64";
+ sha="4d4030b92f010f466eb4f004312b9f532b9e85e60c5e6421e8b429c180ac1efe";
+ };
+
+ centos64i386 = centos {
+ version="6.4"; arch="i386";
+ sha="87aa4c4e19f9a3ec93e3d820f1ea6b6ece8810cb45f117a16354465e57a1b50d";
+ };
+
+ centos65i386 = centos {
+ version="6.5"; arch="i386";
+ sha="a89f27cc7d3cea431f3bd605a1e9309c32d5d409abc1b51a7b5c71c05f18a0c2";
+ };
+
+ centos65x86_64 = centos {
+ version="6.5"; arch="x86_64";
+ sha="3353e378f5cb4bb6c3b3dd2ca266c6d68a1e29c36cf99f76aea3d8e158626024";
+ };
+ };
+
+ vm = pkgs: xmods: with pkgs.lib; rec {
+ tools = import "${nixpkgs}/pkgs/build-support/vm/default.nix" {
+ inherit pkgs; rootModules = rootmods ++ xmods ++
+ [ "loop" "dm_mod" "dm_snapshot" "dm_mirror" "dm_zero" "dm_raid" "dm_thin_pool" ]; };
+ release = import "${nixpkgs}/pkgs/build-support/release/default.nix" {
+ pkgs = pkgs // { vmTools = tools; }; };
+ imgs = pkgs.vmTools.diskImageFuns //
+ mapAttrs (n: a: b: pkgs.vmTools.makeImageFromRPMDist (a // b)) extra_distros;
+ rpmdistros = pkgs.vmTools.rpmDistros // extra_distros;
+ rpmbuild = release.rpmBuild;
+ };
+
+ extra_rpms = rec {
+ common = [ "libselinux-devel" "libsepol-devel" "ncurses-devel" "readline-devel"
+ "corosynclib-devel"
+ "redhat-rpm-config" # needed for rpmbuild of lvm
+ "which" "e2fsprogs" # needed for fsadm
+ "perl-GD" # for lcov
+ ];
+ centos63 = [ "clusterlib-devel" "openaislib-devel" "cman" "libudev-devel" ];
+ centos64 = centos63;
+ centos65 = centos64;
+ fedora16 = [ "clusterlib-devel" "openaislib-devel" "cman" "systemd-devel" "libudev-devel" ];
+ fedora17 = [ "dlm-devel" "corosynclib-devel" "device-mapper-persistent-data"
+ "dlm" "systemd-devel" "perl-Digest-MD5" "libudev-devel" ];
+ fedora18 = [ "dlm-devel" "corosynclib-devel" "device-mapper-persistent-data"
+ "dlm" "systemd-devel" "perl-Digest-MD5" ];
+ fedora18u = fedora18;
+ fedora19 = [ "dlm-devel" "dlm" "corosynclib-devel" "perl-Digest-MD5" "systemd-devel" "procps-ng" ];
+ fedora19u = fedora19;
+ rawhide = fedora19;
+ };
+
+ mkRPM = { arch, image }: with pkgs.lib;
+ let use = vm (if eqStrings arch "i386" then pkgs.pkgsi686Linux else pkgs)
+ (if image == "centos64" || image == "centos65" then [] else [ "9p" "9pnet_virtio" ]);
+ in mkVM {
+ VM = use.rpmbuild;
+ diskFun = builtins.getAttr "${image}${arch}" use.imgs;
+ extras = extra_rpms.common ++ builtins.getAttr image extra_rpms;
+ kernel = use.tools.makeKernelFromRPMDist (builtins.getAttr "${image}${arch}" use.rpmdistros);
+ };
+
+ jobs = rec {
+ tarball = pkgs.releaseTools.sourceTarball rec {
+ name = "lvm2-tarball";
+ versionSuffix = if lvm2Src ? revCount
+ then ".pre${toString lvm2Src.revCount}"
+ else "";
+ src = lvm2Src;
+ autoconfPhase = ":";
+ distPhase = ''
+ set -x
+ make distclean
+ version=`cat VERSION | cut "-d(" -f1`${versionSuffix}
+ version_dm=`cat VERSION_DM | cut "-d-" -f1`${versionSuffix}
+ sed -e s,-git,${versionSuffix}, -i VERSION VERSION_DM
+ rm -rf spec; cp -R ${lvm2Nix}/spec/* .
+ chmod u+w *
+ (echo "%define enable_profiling 1";
+ echo "%define check_commands \\";
+ echo "make lcov-reset \\";
+ echo "dmsetup targets\\";
+ echo "make check QUIET=1 T=${T} || touch \$out/nix-support/failed \\"
+ echo "pwd > /tmp/build-location \\"
+ echo "touch rpm-no-clean") >> source.inc
+ sed -e "s,\(device_mapper_version\) [0-9.]*$,\1 $version_dm," \
+ -e "s,^\(Version:[^0-9%]*\)[0-9.]*$,\1 $version," \
+ -e "s,^\(Release:[^0-9%]*\)[0-9.]\+,\1 0.HYDRA," \
+ -e "s:%with clvmd corosync:%with clvmd corosync,singlenode:" \
+ -i source.inc
+ sed -e '/^%changelog/,$d' \
+ -i lvm2.spec
+ echo "%changelog" >> lvm2.spec;
+ echo "* `date +"%a %b %d %Y"` Petr Rockai <prockai(a)redhat.com> - $version" >> lvm2.spec;
+ echo "- AUTOMATED BUILD BY Hydra" >> lvm2.spec
+ mkdir ../LVM2.$version
+ mv * ../LVM2.$version
+ ensureDir $out/tarballs
+ cd ..
+ tar cvzf $out/tarballs/LVM2.$version.tgz LVM2.$version
+ '';
+ };
+
+ fc19_x86_64 = mkRPM { arch = "x86_64"; image = "fedora19"; };
+ fc19_i386 = mkRPM { arch = "i386" ; image = "fedora19"; };
+ fc18_x86_64 = mkRPM { arch = "x86_64"; image = "fedora18"; };
+ fc18_i386 = mkRPM { arch = "i386" ; image = "fedora18"; };
+ fc17_x86_64 = mkRPM { arch = "x86_64"; image = "fedora17"; };
+ fc17_i386 = mkRPM { arch = "i386" ; image = "fedora17"; };
+ fc16_x86_64 = mkRPM { arch = "x86_64"; image = "fedora16"; };
+ fc16_i386 = mkRPM { arch = "i386" ; image = "fedora16"; };
+
+ fc18u_x86_64 = mkRPM { arch = "x86_64"; image = "fedora18u"; };
+ fc18u_i386 = mkRPM { arch = "i386"; image = "fedora18u"; };
+ fc19u_x86_64 = mkRPM { arch = "x86_64"; image = "fedora19u"; };
+ fc19u_i386 = mkRPM { arch = "i386"; image = "fedora19u"; };
+
+ #centos63_i386 = mkRPM { arch = "i386" ; image = "centos63"; };
+ #centos63_x86_64 = mkRPM { arch = "x86_64" ; image = "centos63"; };
+ centos64_i386 = mkRPM { arch = "i386" ; image = "centos64"; };
+ centos64_x86_64 = mkRPM { arch = "x86_64" ; image = "centos64"; };
+ centos65_i386 = mkRPM { arch = "i386" ; image = "centos65"; };
+ centos65_x86_64 = mkRPM { arch = "x86_64" ; image = "centos65"; };
+
+ rawhide_i386 = mkRPM { arch = "i386" ; image = "rawhide"; };
+ rawhide_x86_64 = mkRPM { arch = "x86_64" ; image = "rawhide"; };
+ };
+in jobs
diff --git a/release.nix b/release.nix
deleted file mode 100644
index 9a688dd..0000000
--- a/release.nix
+++ /dev/null
@@ -1,239 +0,0 @@
-{ nixpkgs ? <nixpkgs>, lvm2Src, release ? false,
- rawhide32 ? "" , rawhide64 ? "" ,
- fc19_32_updates ? "", fc19_64_updates ? "",
- fc18_32_updates ? "", fc18_64_updates ? "",
- lvm2Nix ? lvm2Src, T ? "" }:
-
-let
- pkgs = import nixpkgs {};
- mkVM = { VM, extras ? [], diskFun, kernel }:
- VM rec {
- inherit kernel;
- name = "lvm2";
- fullName = "LVM2";
- src = jobs.tarball;
- diskImage = diskFun { extraPackages = extras; };
- memSize = 768;
- # fc16 lcov is broken and el6 has none... be creative
- prepareImagePhase = ''
- rpm -Uv ${pkgs.fetchurl {
- url="ftp://ftp.isu.edu.tw/pub/Linux/Fedora/linux/updates/16/i386/lcov-1.9-2.fc16.noarch.rpm";
- sha256 = "0ycdh5mb7p5ll76mqk0p6gpnjskvxxgh3a3bfr1crh94nvpwhp4z"; }}
- dmesg -n 1 # avoid spilling dmesg into the main log, we capture it in harness
- '';
- postBuild = ''
- cd `cat /tmp/build-location`
- mv test/results/list test/results/list-rpm
- rpm -Uvh /tmp/rpmout/RPMS/*/*.rpm # */
- (/usr/lib/systemd/systemd-udevd || /usr/lib/udev/udevd || /sbin/udevd || find / -xdev -name \*udevd) &
- make check_system QUIET=1 T=${T} || touch $out/nix-support/failed
- mv test/results/list test/results/list-system
- cat test/results/list-* > test/results/list
- cp -R test/results $out/test-results && \
- echo "report tests $out/test-results" >> $out/nix-support/hydra-build-products || \
- true
- make lcov || true
- cp -R lcov_reports $out/coverage && \
- echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products || \
- true # not really fatal, although kinda disappointing
- '';
- };
-
- rootmods = [ "virtio_pci" "virtio_blk" "virtio_balloon" "ext4" "unix"
- "cifs" "virtio_net" "unix" "hmac" "md4" "ecb" "des_generic" "sha256" ];
-
- centos_url = ver: arch: if ver == "6.5"
- then "http://ftp.fi.muni.cz/pub/linux/centos/${ver}/os/${arch}/"
- else "http://vault.centos.org/${ver}/os/${arch}/";
- fedora_url = ver: arch: if pkgs.lib.eqStrings ver "rawhide" || pkgs.lib.eqStrings ver "19"
- then "ftp://ftp.fi.muni.cz/pub/linux/fedora/linux/development/${ver}/${arch}/os/"
- else "mirror://fedora/linux/releases/${ver}/Everything/${arch}/os/";
- fedora_update_url = ver: arch: "mirror://fedora/linux/updates/${ver}/${arch}";
- extra_distros = with pkgs.lib; let
- centos = { version, sha, arch }: {
- name = "centos-${version}-${arch}";
- fullName = "CentOS ${version} (${arch})";
- packagesList = pkgs.fetchurl {
- url = centos_url version arch + "repodata/${sha}-primary.xml.gz";
- sha256 = sha;
- };
- urlPrefix = centos_url version arch;
- archs = ["noarch" arch] ++ (if eqStrings arch "i386" then ["i586" "i686"] else []);
- packages = filter (n: !(eqStrings n "fedora-release")) pkgs.vmTools.commonFedoraPackages ++
- [ "centos-release" ];
- };
- fedora = { version, sha, arch }: rec {
- name = "fedora-${version}-${arch}";
- fullName = "Fedora ${version} (${arch})";
- packagesList = pkgs.fetchurl {
- url = fedora_url version arch + "repodata/${sha}-primary.xml.gz";
- sha256 = sha;
- };
- urlPrefix = fedora_url version arch;
- archs = ["noarch" arch] ++ (if eqStrings arch "i386" then ["i586" "i686"] else []);
- packages = pkgs.vmTools.commonFedoraPackages;
- unifiedSystemDir = true;
- };
- rawhide = version: arch: repodata: import (pkgs.runCommand "rawhide-${version}-${arch}.nix" {} ''
- sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:')
- echo '{fedora}: fedora { version = "${version}"; sha = "'$sha'"; arch = "${arch}"; }' > $out
- '') { inherit fedora; };
- update = version: arch: repodata: orig: orig // (import (pkgs.runCommand "updates-fedora.nix" {} ''
- sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:')
- echo fedora ${version} updates sha: $sha
- (echo 'fetchurl: orig: { packagesLists = [ orig.packagesList ('
- echo "fetchurl { "
- echo " url = \"${fedora_update_url version arch}/repodata/$sha-primary.xml.gz\";"
- echo " sha256 = \"$sha\";"
- echo '} ) ]; urlPrefixes = [ orig.urlPrefix "${fedora_update_url version arch}" ]; }'
- ) > $out
- echo built $out 1>&2
- '')) pkgs.fetchurl orig;
- in {
- rawhidex86_64 = rawhide "rawhide" "x86_64" rawhide64;
- rawhidei386 = rawhide "rawhide" "i386" rawhide32;
- fedora19ux86_64 = update "19" "x86_64" fc19_64_updates pkgs.vmTools.rpmDistros.fedora19x86_64;
- fedora19ui386 = update "19" "i386" fc19_32_updates pkgs.vmTools.rpmDistros.fedora19i386;
- fedora18ux86_64 = update "18" "x86_64" fc18_64_updates pkgs.vmTools.rpmDistros.fedora18x86_64;
- fedora18ui386 = update "18" "i386" fc18_32_updates pkgs.vmTools.rpmDistros.fedora18i386;
-
- #centos63x86_64 = centos {
- # version="6.3"; arch="x86_64";
- # sha="4d3cddf382e81c20b167a8d13c7c92067040a1947dbb3c29cfafa01a74a26a2b";
- #};
-
- #centos63i386 = centos {
- # version="6.3"; arch="i386";
- # sha="5cee0e0c4d7e2dcb997f123ce9107dedbc424d80dd7f2b2471b3b348f3e1754c";
- #};
-
- centos64x86_64 = centos {
- version="6.4"; arch="x86_64";
- sha="4d4030b92f010f466eb4f004312b9f532b9e85e60c5e6421e8b429c180ac1efe";
- };
-
- centos64i386 = centos {
- version="6.4"; arch="i386";
- sha="87aa4c4e19f9a3ec93e3d820f1ea6b6ece8810cb45f117a16354465e57a1b50d";
- };
-
- centos65i386 = centos {
- version="6.5"; arch="i386";
- sha="a89f27cc7d3cea431f3bd605a1e9309c32d5d409abc1b51a7b5c71c05f18a0c2";
- };
-
- centos65x86_64 = centos {
- version="6.5"; arch="x86_64";
- sha="3353e378f5cb4bb6c3b3dd2ca266c6d68a1e29c36cf99f76aea3d8e158626024";
- };
- };
-
- vm = pkgs: xmods: with pkgs.lib; rec {
- tools = import "${nixpkgs}/pkgs/build-support/vm/default.nix" {
- inherit pkgs; rootModules = rootmods ++ xmods ++
- [ "loop" "dm_mod" "dm_snapshot" "dm_mirror" "dm_zero" "dm_raid" "dm_thin_pool" ]; };
- release = import "${nixpkgs}/pkgs/build-support/release/default.nix" {
- pkgs = pkgs // { vmTools = tools; }; };
- imgs = pkgs.vmTools.diskImageFuns //
- mapAttrs (n: a: b: pkgs.vmTools.makeImageFromRPMDist (a // b)) extra_distros;
- rpmdistros = pkgs.vmTools.rpmDistros // extra_distros;
- rpmbuild = release.rpmBuild;
- };
-
- extra_rpms = rec {
- common = [ "libselinux-devel" "libsepol-devel" "ncurses-devel" "readline-devel"
- "corosynclib-devel"
- "redhat-rpm-config" # needed for rpmbuild of lvm
- "which" "e2fsprogs" # needed for fsadm
- "perl-GD" # for lcov
- ];
- centos63 = [ "clusterlib-devel" "openaislib-devel" "cman" "libudev-devel" ];
- centos64 = centos63;
- centos65 = centos64;
- fedora16 = [ "clusterlib-devel" "openaislib-devel" "cman" "systemd-devel" "libudev-devel" ];
- fedora17 = [ "dlm-devel" "corosynclib-devel" "device-mapper-persistent-data"
- "dlm" "systemd-devel" "perl-Digest-MD5" "libudev-devel" ];
- fedora18 = [ "dlm-devel" "corosynclib-devel" "device-mapper-persistent-data"
- "dlm" "systemd-devel" "perl-Digest-MD5" ];
- fedora18u = fedora18;
- fedora19 = [ "dlm-devel" "dlm" "corosynclib-devel" "perl-Digest-MD5" "systemd-devel" "procps-ng" ];
- fedora19u = fedora19;
- rawhide = fedora19;
- };
-
- mkRPM = { arch, image }: with pkgs.lib;
- let use = vm (if eqStrings arch "i386" then pkgs.pkgsi686Linux else pkgs)
- (if image == "centos64" || image == "centos65" then [] else [ "9p" "9pnet_virtio" ]);
- in mkVM {
- VM = use.rpmbuild;
- diskFun = builtins.getAttr "${image}${arch}" use.imgs;
- extras = extra_rpms.common ++ builtins.getAttr image extra_rpms;
- kernel = use.tools.makeKernelFromRPMDist (builtins.getAttr "${image}${arch}" use.rpmdistros);
- };
-
- jobs = rec {
- tarball = pkgs.releaseTools.sourceTarball rec {
- name = "lvm2-tarball";
- versionSuffix = if lvm2Src ? revCount
- then ".pre${toString lvm2Src.revCount}"
- else "";
- src = lvm2Src;
- autoconfPhase = ":";
- distPhase = ''
- set -x
- make distclean
- version=`cat VERSION | cut "-d(" -f1`${versionSuffix}
- version_dm=`cat VERSION_DM | cut "-d-" -f1`${versionSuffix}
- sed -e s,-git,${versionSuffix}, -i VERSION VERSION_DM
- rm -rf spec; cp -R ${lvm2Nix}/spec/* .
- chmod u+w *
- (echo "%define enable_profiling 1";
- echo "%define check_commands \\";
- echo "make lcov-reset \\";
- echo "dmsetup targets\\";
- echo "make check QUIET=1 T=${T} || touch \$out/nix-support/failed \\"
- echo "pwd > /tmp/build-location \\"
- echo "touch rpm-no-clean") >> source.inc
- sed -e "s,\(device_mapper_version\) [0-9.]*$,\1 $version_dm," \
- -e "s,^\(Version:[^0-9%]*\)[0-9.]*$,\1 $version," \
- -e "s,^\(Release:[^0-9%]*\)[0-9.]\+,\1 0.HYDRA," \
- -e "s:%with clvmd corosync:%with clvmd corosync,singlenode:" \
- -i source.inc
- sed -e '/^%changelog/,$d' \
- -i lvm2.spec
- echo "%changelog" >> lvm2.spec;
- echo "* `date +"%a %b %d %Y"` Petr Rockai <prockai(a)redhat.com> - $version" >> lvm2.spec;
- echo "- AUTOMATED BUILD BY Hydra" >> lvm2.spec
- mkdir ../LVM2.$version
- mv * ../LVM2.$version
- ensureDir $out/tarballs
- cd ..
- tar cvzf $out/tarballs/LVM2.$version.tgz LVM2.$version
- '';
- };
-
- fc19_x86_64 = mkRPM { arch = "x86_64"; image = "fedora19"; };
- fc19_i386 = mkRPM { arch = "i386" ; image = "fedora19"; };
- fc18_x86_64 = mkRPM { arch = "x86_64"; image = "fedora18"; };
- fc18_i386 = mkRPM { arch = "i386" ; image = "fedora18"; };
- fc17_x86_64 = mkRPM { arch = "x86_64"; image = "fedora17"; };
- fc17_i386 = mkRPM { arch = "i386" ; image = "fedora17"; };
- fc16_x86_64 = mkRPM { arch = "x86_64"; image = "fedora16"; };
- fc16_i386 = mkRPM { arch = "i386" ; image = "fedora16"; };
-
- fc18u_x86_64 = mkRPM { arch = "x86_64"; image = "fedora18u"; };
- fc18u_i386 = mkRPM { arch = "i386"; image = "fedora18u"; };
- fc19u_x86_64 = mkRPM { arch = "x86_64"; image = "fedora19u"; };
- fc19u_i386 = mkRPM { arch = "i386"; image = "fedora19u"; };
-
- #centos63_i386 = mkRPM { arch = "i386" ; image = "centos63"; };
- #centos63_x86_64 = mkRPM { arch = "x86_64" ; image = "centos63"; };
- centos64_i386 = mkRPM { arch = "i386" ; image = "centos64"; };
- centos64_x86_64 = mkRPM { arch = "x86_64" ; image = "centos64"; };
- centos65_i386 = mkRPM { arch = "i386" ; image = "centos65"; };
- centos65_x86_64 = mkRPM { arch = "x86_64" ; image = "centos65"; };
-
- rawhide_i386 = mkRPM { arch = "i386" ; image = "rawhide"; };
- rawhide_x86_64 = mkRPM { arch = "x86_64" ; image = "rawhide"; };
- };
-in jobs
9 years, 9 months
master - spec: Package the new clvmd/cmirrord systemd units.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=244b80d948052c...
Commit: 244b80d948052c07b6f252c40146bae4a866362c
Parent: 9770c03ce0e7a955a6c6a4f7921ccdaf9c3bb1f0
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Thu Feb 20 09:49:45 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
spec: Package the new clvmd/cmirrord systemd units.
---
spec/packages.inc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index 4c00617..d7502de 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -259,6 +259,11 @@ fi
%attr(755,root,root) /usr/sbin/clvmd
%{_mandir}/man8/clvmd.8.gz
%{_sysconfdir}/rc.d/init.d/clvmd
+%if %{enable_systemd}
+ %{_unitdir}/lvm2-clvmd.service
+ %{_unitdir}/lvm2-cluster-activation.service
+ %{_unitdir}/../lvm2-cluster-activation
+%endif
%endif
@@ -291,6 +296,9 @@ fi
%attr(755,root,root) /usr/sbin/cmirrord
%{_mandir}/man8/cmirrord.8.gz
%{_sysconfdir}/rc.d/init.d/cmirrord
+%if %{enable_systemd}
+ %{_unitdir}/lvm2-cmirrord.service
+%endif
%endif
9 years, 9 months
master - NIX: On RHEL<=6 and FC<=16, udevd is /sbin/udevd.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9770c03ce0e7a9...
Commit: 9770c03ce0e7a955a6c6a4f7921ccdaf9c3bb1f0
Parent: 2c99601267072a6d9b8e418f860b7b6726eb9561
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Thu Jan 23 22:12:00 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
NIX: On RHEL<=6 and FC<=16, udevd is /sbin/udevd.
---
release.nix | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/release.nix b/release.nix
index 0973bc2..9a688dd 100644
--- a/release.nix
+++ b/release.nix
@@ -25,7 +25,7 @@ let
cd `cat /tmp/build-location`
mv test/results/list test/results/list-rpm
rpm -Uvh /tmp/rpmout/RPMS/*/*.rpm # */
- (/usr/lib/systemd/systemd-udevd || /usr/lib/udev/udevd || find / -name \*udevd) &
+ (/usr/lib/systemd/systemd-udevd || /usr/lib/udev/udevd || /sbin/udevd || find / -xdev -name \*udevd) &
make check_system QUIET=1 T=${T} || touch $out/nix-support/failed
mv test/results/list test/results/list-system
cat test/results/list-* > test/results/list
9 years, 9 months
master - NIX: Add a local nix-build.sh script.
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2c99601267072a...
Commit: 2c99601267072a6d9b8e418f860b7b6726eb9561
Parent: fb2c6fffe15620e4c26e6a108ab2ff82b035a4b4
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Thu Jan 23 16:42:54 2014 +0100
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Fri Feb 28 11:23:52 2014 +0100
NIX: Add a local nix-build.sh script.
---
nix-build.sh | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/nix-build.sh b/nix-build.sh
new file mode 100755
index 0000000..e9aee37
--- /dev/null
+++ b/nix-build.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -ex
+rm -f result
+rm -f divine-snapshot.tar.gz
+rm -rf lvm-snapshot
+mkdir lvm-snapshot
+git ls-tree -r HEAD --name-only | xargs cp --parents --target-directory=lvm-snapshot
+tar cvzf lvm-snapshot.tar.gz lvm-snapshot
+nix-build release.nix \
+ --arg lvm2Src "`pwd`/lvm-snapshot.tar.gz" \
+ --arg lvm2Nix `pwd` -A "$@"
9 years, 9 months