[libvirt] [libvirt-php 1/3] build: add error message

* configure.ac: issue an error message when tools not found * libvirt-php.spec.in: add BuildRequires: libxslt --- configure.ac | 18 +++++++++++++++--- libvirt-php.spec.in | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8d81b9d..ed1e65f 100644 --- a/configure.ac +++ b/configure.ac @@ -82,9 +82,21 @@ AC_ARG_WITH([xml-catalog-file], AC_SUBST([XML_CATALOG_FILE]) # External programs to generate documentation -AC_PATH_PROG([XSLTPROC], [xsltproc], [/usr/bin/xsltproc]) -AC_PATH_PROG([XMLLINT], [xmllint], [/usr/bin/xmllint]) -AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [/usr/bin/xmlcatalog]) +AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) +if test "x$XSLTPROC" = "xno"; then + AC_MSG_ERROR([xsltproc not found]) +fi + +AC_PATH_PROG([XMLLINT], [xmllint], [no]) +if test "x$XMLLINT" = "xno"; then + AC_MSG_ERROR([xmllint not found]) +fi + +AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [no]) +if test "x$XMLCATALOG" = "xno"; then + AC_MSG_ERROR([xmlcatalog not found]) +fi + dnl Specific dir for HTML output ? AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path], diff --git a/libvirt-php.spec.in b/libvirt-php.spec.in index 465532c..9507927 100644 --- a/libvirt-php.spec.in +++ b/libvirt-php.spec.in @@ -26,6 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel BuildRequires: libvirt-devel >= %{req_libvirt_version} BuildRequires: libxml2-devel +BuildRequires: libxslt %if 0%{?suse_version} BuildRequires: xhtml-dtd %else -- 1.7.1

On 02/25/2011 02:48 PM, Lyre wrote:
oops! Just one patch, the other two are commit and revert.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Please repost the whole patch series once you fix it.
Michal -- Michal Novotny<minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

于 2011/2/25 22:42, Michal Novotny 写道:
On 02/25/2011 02:48 PM, Lyre wrote:
oops! Just one patch, the other two are commit and revert.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Please repost the whole patch series once you fix it.
Michal
Hi michal: Just this patch, I don't know how to format-patch for a specified commit. I've made 3 commits in git: 1.this one, 2.another commit 3.revert commit2, so is equal to commit1,is that right? I formated those 3 patch but only send the first commit, but didn't noticed the title 1/3. Could anyone tell me the correct way to do it?

On 02/25/2011 05:15 PM, 李勇 wrote:
于 2011/2/25 22:42, Michal Novotny 写道:
On 02/25/2011 02:48 PM, Lyre wrote:
oops! Just one patch, the other two are commit and revert.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Please repost the whole patch series once you fix it.
Michal
Hi michal:
Just this patch, I don't know how to format-patch for a specified commit.
It's simple. You have to commit the patches to your repository and then you run `git format-patch -X -n` where -X is the number of patches to be formatted. Optional is `-n` argument is good when you do multipart patch (i.e. in more commits) since the subject ends up in "PATCH 0/2" instead of just "PATCH" for case you are formatting it for 2 last commits. It's very useful. Also, if you would like to have an e-mail describing functionality and similar you can include cover letter using `--cover-letter` argument passed to the git format-patch command. Example: If you would like to send 3 last local commits in the patches and include some information to them you would run `git format-patch -3 -n --cover-letter'. It will create: 0000-cover-letter.patch 0001-commit-message-header-1.patch 0002-commit-message-header-2.patch 0003-commit-message-header-3.patch Those files are separate commits which will result into separate e-mails. You should open 0000-cover-letter.patch using your favorite text file editor and include subject and message instead of **SUBJECT** and **BLURB** lines. When you're done with that you can send them using `git send-email 00* --to e-mail-address@domain.tld`.
I've made 3 commits in git:
1.this one, 2.another commit 3.revert commit2, so is equal to commit1,is that right?
Yes, this way it's fine since it is commit 1 only but since it's not in the upstream repo yet you could reset it using the `git reset --hard HEAD^` after step 2 to revert the commit (commit 2) and send just the one patch to the list. Hope this helps, Michal -- Michal Novotny<minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 02/25/2011 09:25 AM, Michal Novotny wrote:
Example:
If you would like to send 3 last local commits in the patches and include some information to them you would run `git format-patch -3 -n --cover-letter'. It will create:
0000-cover-letter.patch 0001-commit-message-header-1.patch 0002-commit-message-header-2.patch 0003-commit-message-header-3.patch
Those files are separate commits which will result into separate e-mails. You should open 0000-cover-letter.patch using your favorite text file editor and include subject and message instead of **SUBJECT** and **BLURB** lines. When you're done with that you can send them using `git send-email 00* --to e-mail-address@domain.tld`.
Or consolidate those steps, and run: git send-email -3 --cover-letter --annotate which opens an editor on 4 temporary files (the cover letter and three patches), and mails all four of them on exit, without you having to do any file cleanup afterwards. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 02/25/2011 09:32 PM, Eric Blake wrote:
On 02/25/2011 09:25 AM, Michal Novotny wrote:
Example:
If you would like to send 3 last local commits in the patches and include some information to them you would run `git format-patch -3 -n --cover-letter'. It will create:
0000-cover-letter.patch 0001-commit-message-header-1.patch 0002-commit-message-header-2.patch 0003-commit-message-header-3.patch
Those files are separate commits which will result into separate e-mails. You should open 0000-cover-letter.patch using your favorite text file editor and include subject and message instead of **SUBJECT** and **BLURB** lines. When you're done with that you can send them using `git send-email 00* --to e-mail-address@domain.tld`. Or consolidate those steps, and run:
git send-email -3 --cover-letter --annotate
which opens an editor on 4 temporary files (the cover letter and three patches), and mails all four of them on exit, without you having to do any file cleanup afterwards.
Thanks for your reply Eric but this depends on git version Lyre is using. From what I know the old version of Git (available for RHEL-5) is not having option to use this syntax to work so it's good to know that if Lyre has new enough version of Git but if not, my steps are the right ones. Thanks, Michal -- Michal Novotny<minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

于 2011/2/25 22:42, Michal Novotny 写道:
On 02/25/2011 02:48 PM, Lyre wrote:
oops! Just one patch, the other two are commit and revert.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Please repost the whole patch series once you fix it.
Michal
Hi michal: Just this patch, I don't know how to format-patch for a specified commit. I've made 3 commits in git: 1.this one, 2.another commit 3.revert commit2, so is equal to commit1,is that right? I formated those 3 patch but only send the first commit, but didn't notice the title 1/3. Could anyone tell me the correct way to do it?

On 02/25/2011 02:45 PM, Lyre wrote:
* configure.ac: issue an error message when tools not found * libvirt-php.spec.in: add BuildRequires: libxslt --- configure.ac | 18 +++++++++++++++--- libvirt-php.spec.in | 1 + 2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac index 8d81b9d..ed1e65f 100644 --- a/configure.ac +++ b/configure.ac @@ -82,9 +82,21 @@ AC_ARG_WITH([xml-catalog-file], AC_SUBST([XML_CATALOG_FILE])
# External programs to generate documentation -AC_PATH_PROG([XSLTPROC], [xsltproc], [/usr/bin/xsltproc]) -AC_PATH_PROG([XMLLINT], [xmllint], [/usr/bin/xmllint]) -AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [/usr/bin/xmlcatalog]) +AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) +if test "x$XSLTPROC" = "xno"; then + AC_MSG_ERROR([xsltproc not found]) +fi + +AC_PATH_PROG([XMLLINT], [xmllint], [no]) +if test "x$XMLLINT" = "xno"; then + AC_MSG_ERROR([xmllint not found]) +fi + +AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [no]) +if test "x$XMLCATALOG" = "xno"; then + AC_MSG_ERROR([xmlcatalog not found]) +fi +
dnl Specific dir for HTML output ? AC_ARG_WITH([html-dir], [AC_HELP_STRING([--with-html-dir=path], diff --git a/libvirt-php.spec.in b/libvirt-php.spec.in index 465532c..9507927 100644 --- a/libvirt-php.spec.in +++ b/libvirt-php.spec.in @@ -26,6 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel BuildRequires: libvirt-devel>= %{req_libvirt_version} BuildRequires: libxml2-devel +BuildRequires: libxslt %if 0%{?suse_version} BuildRequires: xhtml-dtd %else Thanks! Pushed now.
Michal -- Michal Novotny<minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat
participants (4)
-
Eric Blake
-
Lyre
-
Michal Novotny
-
李勇