[iwhd] build: update to latest gnulib and adapt
by Jim Meyering
commit a17c231d4f71f2271b069af206f158a955374c29
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed Dec 14 17:41:30 2011 +0100
build: update to latest gnulib and adapt
* configure.ac: Use -Wno-format-nonliteral.
Mark functions as pure, per recommendations enabled by new
gcc -W options.
* dc-rhev-image.c: Use _GL_ATTRIBUTE_PURE.
* rest.c: Likewise.
* setup.c: Likewise.
* setup.h: Likewise.
* user.h: Likewise.
* dc-vmware-image.c: Likewise, and disable -Wsuggest-attribute=pure.
* qparser.y: Likewise, and disable -Wsuggest-attribute=pure
* t/provider: Reverse compare arguments, to avoid new syntax-check.
* t/parse-test: Likewise.
configure.ac | 1 +
dc-rhev-image.c | 6 ++++--
dc-vmware-image.c | 13 +++++++++++--
gnulib | 2 +-
qparser.y | 12 +++++++++---
rest.c | 4 ++--
setup.c | 2 +-
setup.h | 2 +-
t/parse-test | 6 +++---
t/provider | 2 +-
user.h | 2 +-
11 files changed, 35 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a147cd8..2c11bb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,6 +162,7 @@ if test "$gl_gcc_warnings" = yes; then
gl_WARN_ADD([-Wno-unused-function])
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
gl_WARN_ADD([-Wno-sign-compare]) # warnings in bison-generated qparser.c
+ gl_WARN_ADD([-Wno-format-nonliteral])
# In spite of excluding -Wlogical-op above, it is enabled, as of
# gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
diff --git a/dc-rhev-image.c b/dc-rhev-image.c
index bf26212..99d2b8b 100644
--- a/dc-rhev-image.c
+++ b/dc-rhev-image.c
@@ -461,7 +461,8 @@ static size_t api_rcb(void *ptr, size_t bsz, size_t nmemb, void *arg)
return count;
}
-static void require_api_root(const xmlChar *actual, const char *required)
+static void _GL_ATTRIBUTE_PURE
+require_api_root(const xmlChar *actual, const char *required)
{
if (strcmp((const char *)actual, required) != 0) {
fprintf(stderr,
@@ -557,7 +558,8 @@ static void apipaths(struct api_conn *connection,
exit(EXIT_FAILURE);
}
-static xmlNode *xmlGetChild(xmlNode *node, const char *name)
+static xmlNode * _GL_ATTRIBUTE_PURE
+xmlGetChild(xmlNode *node, const char *name)
{
xmlNode *et;
diff --git a/dc-vmware-image.c b/dc-vmware-image.c
index 6f041b3..9fbe6a3 100644
--- a/dc-vmware-image.c
+++ b/dc-vmware-image.c
@@ -15,6 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+/* Without this pragma, gcc 4.7.0 20111202 mistakenly suggests that
+ the x_getchild function might be candidate for attribute 'pure' */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#endif
+
#include <config.h>
#include <stdbool.h>
@@ -366,7 +373,8 @@ static bool curlx_add_header(struct curl_slist **headers, const char *hdr)
}
/* No idea why DV never implemented this, but implemented xmlGetProp. */
-static xmlNode *xmlGetChild(xmlNode *etroot, const char *name)
+static xmlNode * _GL_ATTRIBUTE_PURE
+xmlGetChild(xmlNode *etroot, const char *name)
{
xmlNode *et;
@@ -380,7 +388,8 @@ static xmlNode *xmlGetChild(xmlNode *etroot, const char *name)
return NULL;
}
-static xmlNode *x_getchild(xmlNode *etroot, const char *name)
+static xmlNode *
+x_getchild(xmlNode *etroot, const char *name)
{
xmlNode *et;
const xmlChar *p;
diff --git a/gnulib b/gnulib
index 996ce97..4e0358a 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 996ce97a8f8572ae9bade6c7df1aa364bd0e259f
+Subproject commit 4e0358a6af54a597c5a3a8f7558a7e856758b141
diff --git a/qparser.y b/qparser.y
index d1e8d52..76eaeb6 100644
--- a/qparser.y
+++ b/qparser.y
@@ -2,6 +2,12 @@
%error-verbose
%{
+/* Without this pragma, gcc 4.7.0 20111202 rightly suggests that
+ bison-emitted functions might be candidate for attribute 'pure' */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#endif
+
#include <config.h>
#include "query.h"
#include "qparser.h"
@@ -266,7 +272,7 @@ static const struct { char *name; char *value; } hacked_obj_fields[] = {
};
/* Fake out the eval code for unit testing. */
-static const char *
+static const char * _GL_ATTRIBUTE_PURE
unit_oget_func (void * notused, const char *text)
{
int i;
@@ -300,7 +306,7 @@ static const struct { char *obj; char *key; char *value; } hacked_links[] = {
{ NULL, NULL, NULL }
};
-static char *
+static char * _GL_ATTRIBUTE_PURE
follow_link (const char *object, const char *key)
{
unsigned int i;
@@ -445,7 +451,7 @@ string_value (value_t *v, const getter_t *oget, const getter_t *sget)
* Check whether a string looks like a simple decimal number. There's
* probably a library function for this somewhere.
*/
-static int
+static int _GL_ATTRIBUTE_PURE
is_ok_number (const char *a_str)
{
const char *p;
diff --git a/rest.c b/rest.c
index 22acc1e..5dee8d7 100644
--- a/rest.c
+++ b/rest.c
@@ -220,7 +220,7 @@ validate_put (struct MHD_Connection *conn)
}
}
-static int
+static int _GL_ATTRIBUTE_PURE
is_reserved (const char *cand, char const *const *resv_list)
{
int i;
@@ -2216,7 +2216,7 @@ rebuild_url(bool is_ssl, struct MHD_Connection *conn, const char *path)
the string, TYPE, followed by more optional spaces.
If so, return a pointer to the first non-space following
TYPE in VAL. Otherwise, return NULL. */
-static const char *
+static const char * _GL_ATTRIBUTE_PURE
auth_type_check (const char *val, const char *type)
{
const char *p;
diff --git a/setup.c b/setup.c
index 184cfd5..a81477d 100644
--- a/setup.c
+++ b/setup.c
@@ -291,7 +291,7 @@ dup_json_string (const json_t *obj, const char *field)
return tmp;
}
-static int
+static int _GL_ATTRIBUTE_PURE
is_reserved_attr (const char *name)
{
static char const *const rsvd[] = {
diff --git a/setup.h b/setup.h
index ca14735..f55f1f3 100644
--- a/setup.h
+++ b/setup.h
@@ -52,7 +52,7 @@ extern const char *auto_config (void);
extern int validate_provider (Hash_table *h);
extern provider_t *find_provider (const char *name);
extern int add_provider (Hash_table *h);
-extern provider_t *get_main_provider (void);
+extern provider_t *get_main_provider (void) _GL_ATTRIBUTE_PURE;
extern void set_main_provider (provider_t *prov);
typedef int (*prov_iterator_fn) (provider_t *, void *);
diff --git a/t/parse-test b/t/parse-test
index d9eb6ec..c88a841 100755
--- a/t/parse-test
+++ b/t/parse-test
@@ -20,16 +20,16 @@ d= 0
EOF
parser-test '#a=="fubar"&&!($b.c.d<3)' > features 2> err || fail=1
-compare features f.exp || fail=1
+compare f.exp features || fail=1
compare /dev/null err || fail=1
parser-test '#a == "fubar" && ! ( $b.c.d < 3)' > white-space 2> err || fail=1
-compare white-space f.exp || fail=1
+compare f.exp white-space || fail=1
compare /dev/null err || fail=1
parser-test '$ a' > a.out 2>&1 || fail=1
printf "OBJECT FIELD a (2)\ns= 2\n" > a.exp
-compare a.out a.exp || fail=1
+compare a.exp a.out || fail=1
parser-test '$.a' > e1.out 2>&1; test $? = 1 || fail=1
printf "could not parse '$.a'\n" > e1.exp
diff --git a/t/provider b/t/provider
index c858be2..083cfe0 100644
--- a/t/provider
+++ b/t/provider
@@ -65,7 +65,7 @@ for z in xml json; do
emit_provider $z primary fs '' 0 '' '' is-last || fail=1
emit_provider_list_suffix $z
} > p-exp-$z
- compare p-list-$z p-exp-$z || fail=1
+ compare p-exp-$z p-list-$z || fail=1
done
diff --git a/user.h b/user.h
index 1308241..becb518 100644
--- a/user.h
+++ b/user.h
@@ -25,7 +25,7 @@ struct user {
char pass[USERPASS_MAX+1];
};
-extern struct user *user_lookup (const char *userid);
+extern struct user *user_lookup (const char *userid) _GL_ATTRIBUTE_PURE;
extern void user_add (const char *usercred);
extern bool parse_users (const char *);
12 years, 4 months
[iwhd] build: now that we don't use transifex, don't require "tx"
by Jim Meyering
commit 9c1e34ad3a32d83bafd220c53e6b6e970de2ff3f
Author: Pete Zaitcev <zaitcev(a)redhat.com>
Date: Thu Dec 8 22:15:25 2011 +0100
build: now that we don't use transifex, don't require "tx"
* bootstrap.conf (buildreq): No longer require "tx".
bootstrap.conf | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/bootstrap.conf b/bootstrap.conf
index aed649c..5ec9611 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -113,7 +113,6 @@ gzip -
flex -
rsync -
tar -
-tx -
"
bootstrap_epilogue()
12 years, 4 months
[iwhd] po: switch from transifex to translationproject.org
by Jim Meyering
commit 114d8d06aad6511722e17d79a6ca18e8e607de5f
Author: Jim Meyering <meyering(a)redhat.com>
Date: Thu Dec 8 15:49:47 2011 +0100
po: switch from transifex to translationproject.org
* bootstrap.conf: Remove transifex-related hooks.
* po/LINGUAS: Remove from version control. Generated.
* .gitignore: Ignore generated files in po/
.gitignore | 21 +++++++++++++++++++++
bootstrap.conf | 13 -------------
po/LINGUAS | 5 -----
3 files changed, 21 insertions(+), 18 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0594918..d034914 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,27 @@
/man/iwhd.8
/parser-test
/parser-test.c
+/po/*.gmo
+/po/*.po
+/po/.gitignore
+/po/.reference
+/po/LINGUAS
+/po/Makefile.in
+/po/Makefile.in.in
+/po/Makevars
+/po/Makevars.template
+/po/POTFILES
+/po/Rules-quot
+/po/boldquot.sed
+/po/checksums
+/po/en(a)boldquot.header
+/po/en(a)quot.header
+/po/insert-header.sin
+/po/iwhd.pot
+/po/quot.sed
+/po/remove-potcdate.sed
+/po/remove-potcdate.sin
+/po/stamp-po
/qlexer.c
/qparser.c
/qparser.h
diff --git a/bootstrap.conf b/bootstrap.conf
index 033f25f..aed649c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -141,16 +141,3 @@ bootstrap_epilogue()
EOF
chmod u-w $m
}
-
-# Set up to run "tx". This is rather obtuse because, at least with tx from
-# the transifex-client-0.5.2-1 package, there is no way to tell it to download
-# .po files to po/.reference/. To get that effect, we create po/po as a
-# symlink to the dest. directory and run tx from ./po. But to do that, tx
-# requires a .tx/config directory, so we create a .tx directory and symlink
-# the top-level config file into it.
-mkdir -p po/.reference po/.tx
-touch po/.reference/x.po
-rm -f po/po po/.reference/*.po po/.tx/config
-ln -s .reference po/po
-ln -s ../../.tx/config po/.tx
-po_download_command_format='(cd po && tx pull -a)'
12 years, 4 months
[iwhd] maint: adjust/simply spec file template; add RHEL-version test,
by Jim Meyering
commit c0cb22b889984ccdfa82b079ee34747c9e99ac5c
Author: Jim Meyering <meyering(a)redhat.com>
Date: Thu Dec 8 13:42:40 2011 +0100
maint: adjust/simply spec file template; add RHEL-version test,
so we can use the same spec file for RHEL as we use for Fedora.
* iwhd.spec.in [rhel < 7 || fedora < 16]: Define _unitdir, so we can...
(%files): ...use "%{_unitdir}/iwhd.service" unconditionally.
iwhd.spec.in | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/iwhd.spec.in b/iwhd.spec.in
index 7c43ef9..b96fa9b 100644
--- a/iwhd.spec.in
+++ b/iwhd.spec.in
@@ -31,8 +31,9 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: help2man
-# this defines %{_unitdir}
-%if 0%{?fedora} >= 17
+%if 0%{?rhel} < 7 || 0%{?fedora} < 16
+%define _unitdir /lib/systemd/system
+%else
BuildRequires: systemd-units
%endif
@@ -75,12 +76,7 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/logrotate.d/iwhd
%config(noreplace) %{_sysconfdir}/sysconfig/iwhd
%{_localstatedir}/lib/iwhd
-
-%if 0%{?fedora} >= 17
%{_unitdir}/iwhd.service
-%else
-/lib/systemd/system/iwhd.service
-%endif
%changelog
* Wed Oct 7 2010 Jim Meyering <meyering(a)redhat.com> - 0.90-1
12 years, 4 months
[iwhd] Created tag v1.2
by Jim Meyering
The signed tag 'v1.2' was created.
Tagger: Jim Meyering <meyering(a)redhat.com>
Date: Tue Dec 6 20:04:55 2011 +0100
iwhd 1.2
Changes since the last tag 'v1.1':
Ian McLeod (1):
rhev-m: add QCOW image support
Jim Meyering (9):
maint: post-release administrivia
build: stop distributing gzip'd releases; xz is enough
maint: add po/fr_FR.po to the repository
diagnose object write failure with FS back-end
maint: add incoming names to AUTHORS
tests: print better diagnostics for one particular test failure
maint: don't VC po/*.po files; instead, pull at bootstrap time
maint: adjust tx set-up code to avoid a spurious warning
version 1.2
Pete Zaitcev (2):
Make commented parts of spec file conditional instead
doc: fix/improve README-hacking
Scott Seago (1):
build: fix "make rpm" rule and iwhd.spec.in to work with .xz (not .gz)
12 years, 4 months
[iwhd] maint: post-release administrivia
by Jim Meyering
commit 069cdb8f5301b5d93722147baa1e7c07e808332b
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Dec 6 20:06:56 2011 +0100
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
.prev-version | 2 +-
NEWS | 3 +++
cfg.mk | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/.prev-version b/.prev-version
index 9459d4b..5625e59 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-1.1
+1.2
diff --git a/NEWS b/NEWS
index 9732cad..55be1a0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
iwhd NEWS -*- outline -*-
+* Noteworthy changes in release ?.? (????-??-??) [?]
+
+
* Noteworthy changes in release 1.2 (2011-12-06) [stable]
** New features
diff --git a/cfg.mk b/cfg.mk
index d800adb..571274f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -38,7 +38,7 @@ bootstrap-tools = autoconf,automake,gnulib
# Now that we have better tests, make this the default.
export VERBOSE = yes
-old_NEWS_hash = d9ce89989e4c6e3768d6c722f5c73e83
+old_NEWS_hash = 0a56abca285afae7ddc31d855891bc5a
sc_prohibit_echo_minus_en:
@prohibit='\<echo -[en]' \
12 years, 4 months
[iwhd] version 1.2
by Jim Meyering
commit d19f4572fd4201f3a2f92acef713cf73cececc5f
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Dec 6 20:04:55 2011 +0100
version 1.2
* NEWS: Record release date.
NEWS | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 23682d3..9732cad 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
iwhd NEWS -*- outline -*-
-* Noteworthy changes in release ?.? (????-??-??) [?]
+* Noteworthy changes in release 1.2 (2011-12-06) [stable]
** New features
12 years, 4 months
[iwhd] doc: fix/improve README-hacking
by Jim Meyering
commit 06810912ddd09b5edd92b2e74f307a8008086b15
Author: Pete Zaitcev <zaitcev(a)redhat.com>
Date: Tue Dec 6 20:03:48 2011 +0100
doc: fix/improve README-hacking
* README-hacking: Correct the git:// URL.
Mention the --skip-po option, now that it requires a transifex.net
account and network access.
README-hacking | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/README-hacking b/README-hacking
index 377e14f..6eecd24 100644
--- a/README-hacking
+++ b/README-hacking
@@ -24,7 +24,7 @@ few prerequisites, later, a plain `git pull && make' should be sufficient.
You can get a copy of the source repository like this:
- $ git clone git://repo.or.cz/iwhd.git
+ $ git clone git://git.fedorahosted.org/iwhd.git
$ cd iwhd
As an optional step, if you already have a copy of the gnulib git
@@ -36,7 +36,7 @@ reduce download time and disk space requirements:
The next step is to get and check other files needed to build,
which are extracted from other source packages:
- $ ./bootstrap
+ $ ./bootstrap #[--skip-po] [+]
To use the most-recent gnulib (as opposed to the gnulib version that
the package last synchronized to), do this next:
@@ -59,6 +59,10 @@ should output no difference.
Enjoy!
+[+] Use the --skip-po option if you do not have an account at
+transifex.net, where the translations are kept, or if you don't
+have network access.
+
[*] The --enable-gcc-warnings option is useful only with glibc
and with a very recent version of gcc. You'll probably also have
to use recent system headers. If you configure with this option,
12 years, 4 months
[iwhd] maint: adjust tx set-up code to avoid a spurious warning
by Jim Meyering
commit 31f392fe361bf7b8c733ecdb16945e7fed3b570c
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Dec 6 18:46:49 2011 +0100
maint: adjust tx set-up code to avoid a spurious warning
* bootstrap.conf: Also remove po/.tx/config, to avoid ln failure
on second and subsequent ./bootstrap runs.
(buildreq): Add tx to the list of required programs.
bootstrap.conf | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/bootstrap.conf b/bootstrap.conf
index 9b7559f..033f25f 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -150,7 +150,7 @@ EOF
# the top-level config file into it.
mkdir -p po/.reference po/.tx
touch po/.reference/x.po
-rm -f po/po po/.reference/*.po
+rm -f po/po po/.reference/*.po po/.tx/config
ln -s .reference po/po
ln -s ../../.tx/config po/.tx
po_download_command_format='(cd po && tx pull -a)'
12 years, 4 months
[iwhd] maint: don't VC po/*.po files; instead, pull at bootstrap time
by Jim Meyering
commit 684a2d8d13726aca73105649f09f4c338dc12977
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Dec 6 12:16:27 2011 +0100
maint: don't VC po/*.po files; instead, pull at bootstrap time
* bootstrap.conf: Teach bootstrap how to use tx pull -a.
It's slightly obfuscated because tx pull always pulls into a
sub-directory named "po", so we create a symlink from po/po to
bootstrap's usual po/.reference/ directory and run tx from ./po.
(buildreq): Add tx to the list of required programs.
* po/LINGUAS: Regenerate.
* po/es.po: Remove file.
* po/fr_FR.po: Likewise.
* po/ja.po: Likewise.
* po/ru.po: Likewise.
* po/uk.po: Likewise.
With this change, the problem of forgetting to add a new .po
file to version control (as happened for iwhd-1.1, fixed by
commit babcf679), can no longer arise.
bootstrap.conf | 16 +-
po/LINGUAS | 2 +-
po/es.po | 993 --------------------------------------------------------
po/fr_FR.po | 939 -----------------------------------------------------
po/ja.po | 937 ----------------------------------------------------
po/ru.po | 938 ----------------------------------------------------
po/uk.po | 990 -------------------------------------------------------
7 files changed, 14 insertions(+), 4801 deletions(-)
---
diff --git a/bootstrap.conf b/bootstrap.conf
index 60f05f7..9b7559f 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -113,6 +113,7 @@ gzip -
flex -
rsync -
tar -
+tx -
"
bootstrap_epilogue()
@@ -141,6 +142,15 @@ EOF
chmod u-w $m
}
-# FIXME: this is just temporary
-# Tell bootstrap not to download PO files from translationproject.org.
-SKIP_PO=t
+# Set up to run "tx". This is rather obtuse because, at least with tx from
+# the transifex-client-0.5.2-1 package, there is no way to tell it to download
+# .po files to po/.reference/. To get that effect, we create po/po as a
+# symlink to the dest. directory and run tx from ./po. But to do that, tx
+# requires a .tx/config directory, so we create a .tx directory and symlink
+# the top-level config file into it.
+mkdir -p po/.reference po/.tx
+touch po/.reference/x.po
+rm -f po/po po/.reference/*.po
+ln -s .reference po/po
+ln -s ../../.tx/config po/.tx
+po_download_command_format='(cd po && tx pull -a)'
diff --git a/po/LINGUAS b/po/LINGUAS
index 6d101d0..d0b8340 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,5 +1,5 @@
-fr_FR
es
+fr_FR
ja
ru
uk
12 years, 4 months