diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-16 13:57:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-16 13:57:32 +0100 |
commit | e97190eb74ebb4abc0f5958ba99f838f4766b1cf (patch) | |
tree | 3b2b4d8dd30bcd28d09f42cfea1681b55edea967 | |
parent | f2b264a16c3c9a4199876740a210496e63b0bea4 (diff) | |
download | gnunet-e97190eb74ebb4abc0f5958ba99f838f4766b1cf.tar.gz gnunet-e97190eb74ebb4abc0f5958ba99f838f4766b1cf.zip |
add versioning.sql
-rw-r--r-- | po/de.po | 12 | ||||
-rw-r--r-- | po/es.po | 40 | ||||
-rw-r--r-- | po/fr.po | 12 | ||||
-rw-r--r-- | po/it.po | 12 | ||||
-rw-r--r-- | po/sr.po | 16 | ||||
-rw-r--r-- | po/sv.po | 28 | ||||
-rw-r--r-- | po/vi.po | 16 | ||||
-rw-r--r-- | po/zh_CN.po | 12 | ||||
-rw-r--r-- | src/fs/Makefile.am | 2 | ||||
-rw-r--r-- | src/include/gnunet_pq_lib.h | 33 | ||||
-rw-r--r-- | src/pq/Makefile.am | 9 | ||||
-rw-r--r-- | src/pq/pq_connect.c | 2 | ||||
-rw-r--r-- | src/pq/pq_eval.c | 10 | ||||
-rw-r--r-- | src/pq/versioning.sql | 293 | ||||
-rw-r--r-- | src/util/crypto_crc.c | 5 |
15 files changed, 419 insertions, 83 deletions
@@ -10,7 +10,7 @@ msgid "" | |||
10 | msgstr "" | 10 | msgstr "" |
11 | "Project-Id-Version: gnunet 0.10.1\n" | 11 | "Project-Id-Version: gnunet 0.10.1\n" |
12 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 12 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
13 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 13 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
14 | "PO-Revision-Date: 2015-03-08 16:16+0100\n" | 14 | "PO-Revision-Date: 2015-03-08 16:16+0100\n" |
15 | "Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n" | 15 | "Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n" |
16 | "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" | 16 | "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" |
@@ -4627,23 +4627,23 @@ msgstr "" | |||
4627 | msgid "Maintain egos" | 4627 | msgid "Maintain egos" |
4628 | msgstr "" | 4628 | msgstr "" |
4629 | 4629 | ||
4630 | #: src/identity/gnunet-service-identity.c:685 | 4630 | #: src/identity/gnunet-service-identity.c:687 |
4631 | #: src/identity/gnunet-service-identity.c:804 | 4631 | #: src/identity/gnunet-service-identity.c:806 |
4632 | #, fuzzy, c-format | 4632 | #, fuzzy, c-format |
4633 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4633 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4634 | msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" | 4634 | msgstr "Fehler beim Aktualisieren der Daten des Moduls `%s'\n" |
4635 | 4635 | ||
4636 | #: src/identity/gnunet-service-identity.c:919 | 4636 | #: src/identity/gnunet-service-identity.c:921 |
4637 | #, fuzzy, c-format | 4637 | #, fuzzy, c-format |
4638 | msgid "Failed to parse ego information in `%s'\n" | 4638 | msgid "Failed to parse ego information in `%s'\n" |
4639 | msgstr "Fehler beim Parsen der Gerätedaten von `%s' bei %s:%d.\n" | 4639 | msgstr "Fehler beim Parsen der Gerätedaten von `%s' bei %s:%d.\n" |
4640 | 4640 | ||
4641 | #: src/identity/gnunet-service-identity.c:977 | 4641 | #: src/identity/gnunet-service-identity.c:979 |
4642 | #, fuzzy, c-format | 4642 | #, fuzzy, c-format |
4643 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4643 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4644 | msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" | 4644 | msgstr "Fehler beim Speichern der Konfigurationsdatei `%s':" |
4645 | 4645 | ||
4646 | #: src/identity/gnunet-service-identity.c:986 | 4646 | #: src/identity/gnunet-service-identity.c:988 |
4647 | #, fuzzy, c-format | 4647 | #, fuzzy, c-format |
4648 | msgid "Failed to create directory `%s' for storing egos\n" | 4648 | msgid "Failed to create directory `%s' for storing egos\n" |
4649 | msgstr "Dateiformat fehlerhaft (kein GNUnet Verzeichnis?)\n" | 4649 | msgstr "Dateiformat fehlerhaft (kein GNUnet Verzeichnis?)\n" |
@@ -8,7 +8,7 @@ msgid "" | |||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: gnunet 0.9.5a\n" | 9 | "Project-Id-Version: gnunet 0.9.5a\n" |
10 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 10 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
11 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 11 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
12 | "PO-Revision-Date: 2013-02-23 17:50+0100\n" | 12 | "PO-Revision-Date: 2013-02-23 17:50+0100\n" |
13 | "Last-Translator: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>\n" | 13 | "Last-Translator: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>\n" |
14 | "Language-Team: Spanish <es@li.org>\n" | 14 | "Language-Team: Spanish <es@li.org>\n" |
@@ -4786,24 +4786,24 @@ msgstr "" | |||
4786 | msgid "Maintain egos" | 4786 | msgid "Maintain egos" |
4787 | msgstr "" | 4787 | msgstr "" |
4788 | 4788 | ||
4789 | #: src/identity/gnunet-service-identity.c:685 | 4789 | #: src/identity/gnunet-service-identity.c:687 |
4790 | #: src/identity/gnunet-service-identity.c:804 | 4790 | #: src/identity/gnunet-service-identity.c:806 |
4791 | #, fuzzy, c-format | 4791 | #, fuzzy, c-format |
4792 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4792 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4793 | msgstr "" | 4793 | msgstr "" |
4794 | "Se produjo un fallo al obtener los identificadores de fichero para «%s»\n" | 4794 | "Se produjo un fallo al obtener los identificadores de fichero para «%s»\n" |
4795 | 4795 | ||
4796 | #: src/identity/gnunet-service-identity.c:919 | 4796 | #: src/identity/gnunet-service-identity.c:921 |
4797 | #, fuzzy, c-format | 4797 | #, fuzzy, c-format |
4798 | msgid "Failed to parse ego information in `%s'\n" | 4798 | msgid "Failed to parse ego information in `%s'\n" |
4799 | msgstr "Se produjo un fallo al procesar la identidad del par «%s»\n" | 4799 | msgstr "Se produjo un fallo al procesar la identidad del par «%s»\n" |
4800 | 4800 | ||
4801 | #: src/identity/gnunet-service-identity.c:977 | 4801 | #: src/identity/gnunet-service-identity.c:979 |
4802 | #, fuzzy, c-format | 4802 | #, fuzzy, c-format |
4803 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4803 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4804 | msgstr "Se produjo un fallo al borrar el fichero de configuración %s\n" | 4804 | msgstr "Se produjo un fallo al borrar el fichero de configuración %s\n" |
4805 | 4805 | ||
4806 | #: src/identity/gnunet-service-identity.c:986 | 4806 | #: src/identity/gnunet-service-identity.c:988 |
4807 | #, fuzzy, c-format | 4807 | #, fuzzy, c-format |
4808 | msgid "Failed to create directory `%s' for storing egos\n" | 4808 | msgid "Failed to create directory `%s' for storing egos\n" |
4809 | msgstr "Se produjo un fallo al leer el directorio «%s»\n" | 4809 | msgstr "Se produjo un fallo al leer el directorio «%s»\n" |
@@ -11614,8 +11614,8 @@ msgstr "¡Se produjo un fallo al conectar con el almacén de nombres!\n" | |||
11614 | #~ "%llu, omitiendo bytes.\n" | 11614 | #~ "%llu, omitiendo bytes.\n" |
11615 | 11615 | ||
11616 | #~ msgid "" | 11616 | #~ msgid "" |
11617 | #~ "Syntax error in topology specification at offset %llu, skipping bytes " | 11617 | #~ "Syntax error in topology specification at offset %llu, skipping bytes `" |
11618 | #~ "`%s'.\n" | 11618 | #~ "%s'.\n" |
11619 | #~ msgstr "" | 11619 | #~ msgstr "" |
11620 | #~ "Error de sintaxis en la especificación de topología en el desplazamiento " | 11620 | #~ "Error de sintaxis en la especificación de topología en el desplazamiento " |
11621 | #~ "%llu, omitiendo bytes «%s».\n" | 11621 | #~ "%llu, omitiendo bytes «%s».\n" |
@@ -13170,10 +13170,10 @@ msgstr "¡Se produjo un fallo al conectar con el almacén de nombres!\n" | |||
13170 | #~ "You can specify a hostname, GNUnet will then use DNS to resolve it.\n" | 13170 | #~ "You can specify a hostname, GNUnet will then use DNS to resolve it.\n" |
13171 | #~ "If in doubt, leave this empty." | 13171 | #~ "If in doubt, leave this empty." |
13172 | #~ msgstr "" | 13172 | #~ msgstr "" |
13173 | #~ "Si tu proveedor siempre te asigna la misma dirección IP (una IP " | 13173 | #~ "Si tu proveedor siempre te asigna la misma dirección IP (una IP \"estática" |
13174 | #~ "\"estática\") introducela en el campo \"Dirección IP\". Si tu dirección " | 13174 | #~ "\") introducela en el campo \"Dirección IP\". Si tu dirección IP cambia " |
13175 | #~ "IP cambia pero hay un nombre de dominio que siempre apunta a tu dirección " | 13175 | #~ "pero hay un nombre de dominio que siempre apunta a tu dirección IP actual " |
13176 | #~ "IP actual (\"DNS dinámica\"), puedes introducirlo allí también.\n" | 13176 | #~ "(\"DNS dinámica\"), puedes introducirlo allí también.\n" |
13177 | #~ "En caso de duda deja el campo en blanco. GNUnet intentará determinar tu " | 13177 | #~ "En caso de duda deja el campo en blanco. GNUnet intentará determinar tu " |
13178 | #~ "dirección IP" | 13178 | #~ "dirección IP" |
13179 | 13179 | ||
@@ -14540,8 +14540,8 @@ msgstr "¡Se produjo un fallo al conectar con el almacén de nombres!\n" | |||
14540 | #~ "SNAT, a un router o a un \"cortafuegos de hardware\" y otros ordenadores " | 14540 | #~ "SNAT, a un router o a un \"cortafuegos de hardware\" y otros ordenadores " |
14541 | #~ "no pueden conectar con tu ordenador marca la última opción en ésta " | 14541 | #~ "no pueden conectar con tu ordenador marca la última opción en ésta " |
14542 | #~ "página. Déjala sin marcar en conexiones directas a través de modems, " | 14542 | #~ "página. Déjala sin marcar en conexiones directas a través de modems, " |
14543 | #~ "tarjetas de RDSI y DNAT (también conocido como \"seguimiento de " | 14543 | #~ "tarjetas de RDSI y DNAT (también conocido como \"seguimiento de puertos" |
14544 | #~ "puertos\")." | 14544 | #~ "\")." |
14545 | 14545 | ||
14546 | #~ msgid "Computer cannot receive inbound connections (SNAT/Firewall)" | 14546 | #~ msgid "Computer cannot receive inbound connections (SNAT/Firewall)" |
14547 | #~ msgstr "" | 14547 | #~ msgstr "" |
@@ -14978,10 +14978,10 @@ msgstr "¡Se produjo un fallo al conectar con el almacén de nombres!\n" | |||
14978 | #~ "\n" | 14978 | #~ "\n" |
14979 | #~ "Si tu estás conectado a Internet a través de otro ordenador haciendo " | 14979 | #~ "Si tu estás conectado a Internet a través de otro ordenador haciendo " |
14980 | #~ "SNAT, un router o un \"cortafuegos de hardware\" y otros ordenadores no " | 14980 | #~ "SNAT, un router o un \"cortafuegos de hardware\" y otros ordenadores no " |
14981 | #~ "pueden conectarse al tuyo a través de Internet directamente, responde " | 14981 | #~ "pueden conectarse al tuyo a través de Internet directamente, responde \"si" |
14982 | #~ "\"si\" aquí. Responde \"no\" en conexiones directas a través de módems, " | 14982 | #~ "\" aquí. Responde \"no\" en conexiones directas a través de módems, " |
14983 | #~ "tarjetas de RDSI y DNAT (también conocido como \"seguimiento de " | 14983 | #~ "tarjetas de RDSI y DNAT (también conocido como \"seguimiento de puertos" |
14984 | #~ "puertos\")." | 14984 | #~ "\")." |
14985 | 14985 | ||
14986 | #, fuzzy | 14986 | #, fuzzy |
14987 | #~ msgid "Run gnunetd as this user." | 14987 | #~ msgid "Run gnunetd as this user." |
@@ -15234,8 +15234,8 @@ msgstr "¡Se produjo un fallo al conectar con el almacén de nombres!\n" | |||
15234 | #~ msgstr "Recibido mensaje UDP no válido del %u.%u.%u.%u:%u, omitiendo.\n" | 15234 | #~ msgstr "Recibido mensaje UDP no válido del %u.%u.%u.%u:%u, omitiendo.\n" |
15235 | 15235 | ||
15236 | #~ msgid "" | 15236 | #~ msgid "" |
15237 | #~ "Configuration file must specify directory for storing FS data in section " | 15237 | #~ "Configuration file must specify directory for storing FS data in section `" |
15238 | #~ "`%s' under `%s'.\n" | 15238 | #~ "%s' under `%s'.\n" |
15239 | #~ msgstr "" | 15239 | #~ msgstr "" |
15240 | #~ "El fichero de configuración debe especificar el directorio para almacenar " | 15240 | #~ "El fichero de configuración debe especificar el directorio para almacenar " |
15241 | #~ "los datos FS en la sección '%s' bajo '%s'.\n" | 15241 | #~ "los datos FS en la sección '%s' bajo '%s'.\n" |
@@ -7,7 +7,7 @@ msgid "" | |||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: gnunet 0.10.1\n" | 8 | "Project-Id-Version: gnunet 0.10.1\n" |
9 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 9 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
10 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 10 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
11 | "PO-Revision-Date: 2021-11-21 00:53+0100\n" | 11 | "PO-Revision-Date: 2021-11-21 00:53+0100\n" |
12 | "Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" | 12 | "Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" |
13 | "Language-Team: French <traduc@traduc.org>\n" | 13 | "Language-Team: French <traduc@traduc.org>\n" |
@@ -4441,23 +4441,23 @@ msgstr "" | |||
4441 | msgid "Maintain egos" | 4441 | msgid "Maintain egos" |
4442 | msgstr "" | 4442 | msgstr "" |
4443 | 4443 | ||
4444 | #: src/identity/gnunet-service-identity.c:685 | 4444 | #: src/identity/gnunet-service-identity.c:687 |
4445 | #: src/identity/gnunet-service-identity.c:804 | 4445 | #: src/identity/gnunet-service-identity.c:806 |
4446 | #, c-format | 4446 | #, c-format |
4447 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4447 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4448 | msgstr "" | 4448 | msgstr "" |
4449 | 4449 | ||
4450 | #: src/identity/gnunet-service-identity.c:919 | 4450 | #: src/identity/gnunet-service-identity.c:921 |
4451 | #, c-format | 4451 | #, c-format |
4452 | msgid "Failed to parse ego information in `%s'\n" | 4452 | msgid "Failed to parse ego information in `%s'\n" |
4453 | msgstr "" | 4453 | msgstr "" |
4454 | 4454 | ||
4455 | #: src/identity/gnunet-service-identity.c:977 | 4455 | #: src/identity/gnunet-service-identity.c:979 |
4456 | #, c-format | 4456 | #, c-format |
4457 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4457 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4458 | msgstr "" | 4458 | msgstr "" |
4459 | 4459 | ||
4460 | #: src/identity/gnunet-service-identity.c:986 | 4460 | #: src/identity/gnunet-service-identity.c:988 |
4461 | #, c-format | 4461 | #, c-format |
4462 | msgid "Failed to create directory `%s' for storing egos\n" | 4462 | msgid "Failed to create directory `%s' for storing egos\n" |
4463 | msgstr "" | 4463 | msgstr "" |
@@ -8,7 +8,7 @@ msgid "" | |||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: gnunet 0.10.1\n" | 9 | "Project-Id-Version: gnunet 0.10.1\n" |
10 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 10 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
11 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 11 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
12 | "PO-Revision-Date: 2019-10-16 11:00+0200\n" | 12 | "PO-Revision-Date: 2019-10-16 11:00+0200\n" |
13 | "Last-Translator: Sebastiano Pistore <sebastianopistore.info@protonmail.ch>\n" | 13 | "Last-Translator: Sebastiano Pistore <sebastianopistore.info@protonmail.ch>\n" |
14 | "Language-Team: Italian <tp@lists.linux.it>\n" | 14 | "Language-Team: Italian <tp@lists.linux.it>\n" |
@@ -4466,23 +4466,23 @@ msgstr "" | |||
4466 | msgid "Maintain egos" | 4466 | msgid "Maintain egos" |
4467 | msgstr "" | 4467 | msgstr "" |
4468 | 4468 | ||
4469 | #: src/identity/gnunet-service-identity.c:685 | 4469 | #: src/identity/gnunet-service-identity.c:687 |
4470 | #: src/identity/gnunet-service-identity.c:804 | 4470 | #: src/identity/gnunet-service-identity.c:806 |
4471 | #, c-format | 4471 | #, c-format |
4472 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4472 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4473 | msgstr "" | 4473 | msgstr "" |
4474 | 4474 | ||
4475 | #: src/identity/gnunet-service-identity.c:919 | 4475 | #: src/identity/gnunet-service-identity.c:921 |
4476 | #, c-format | 4476 | #, c-format |
4477 | msgid "Failed to parse ego information in `%s'\n" | 4477 | msgid "Failed to parse ego information in `%s'\n" |
4478 | msgstr "" | 4478 | msgstr "" |
4479 | 4479 | ||
4480 | #: src/identity/gnunet-service-identity.c:977 | 4480 | #: src/identity/gnunet-service-identity.c:979 |
4481 | #, c-format | 4481 | #, c-format |
4482 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4482 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4483 | msgstr "" | 4483 | msgstr "" |
4484 | 4484 | ||
4485 | #: src/identity/gnunet-service-identity.c:986 | 4485 | #: src/identity/gnunet-service-identity.c:988 |
4486 | #, c-format | 4486 | #, c-format |
4487 | msgid "Failed to create directory `%s' for storing egos\n" | 4487 | msgid "Failed to create directory `%s' for storing egos\n" |
4488 | msgstr "" | 4488 | msgstr "" |
@@ -6,7 +6,7 @@ msgid "" | |||
6 | msgstr "" | 6 | msgstr "" |
7 | "Project-Id-Version: gnunet-0.10.1\n" | 7 | "Project-Id-Version: gnunet-0.10.1\n" |
8 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 8 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
9 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 9 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
10 | "PO-Revision-Date: 2020-10-23 18:39+0200\n" | 10 | "PO-Revision-Date: 2020-10-23 18:39+0200\n" |
11 | "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n" | 11 | "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n" |
12 | "Language-Team: Serbian <(nothing)>\n" | 12 | "Language-Team: Serbian <(nothing)>\n" |
@@ -14,8 +14,8 @@ msgstr "" | |||
14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
15 | "Content-Type: text/plain; charset=UTF-8\n" | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
16 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
17 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " | 17 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
18 | "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" | 18 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" |
19 | "X-Bugs: Report translation errors to the Language-Team address.\n" | 19 | "X-Bugs: Report translation errors to the Language-Team address.\n" |
20 | 20 | ||
21 | #: src/abd/gnunet-abd.c:392 src/namestore/gnunet-namestore-zonefile.c:193 | 21 | #: src/abd/gnunet-abd.c:392 src/namestore/gnunet-namestore-zonefile.c:193 |
@@ -4649,24 +4649,24 @@ msgstr "" | |||
4649 | msgid "Maintain egos" | 4649 | msgid "Maintain egos" |
4650 | msgstr "Одржава егое" | 4650 | msgstr "Одржава егое" |
4651 | 4651 | ||
4652 | #: src/identity/gnunet-service-identity.c:685 | 4652 | #: src/identity/gnunet-service-identity.c:687 |
4653 | #: src/identity/gnunet-service-identity.c:804 | 4653 | #: src/identity/gnunet-service-identity.c:806 |
4654 | #, c-format | 4654 | #, c-format |
4655 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4655 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4656 | msgstr "Нисам успео да запишем основну мапу одредника подсистема у „%s“.\n" | 4656 | msgstr "Нисам успео да запишем основну мапу одредника подсистема у „%s“.\n" |
4657 | 4657 | ||
4658 | #: src/identity/gnunet-service-identity.c:919 | 4658 | #: src/identity/gnunet-service-identity.c:921 |
4659 | #, c-format | 4659 | #, c-format |
4660 | msgid "Failed to parse ego information in `%s'\n" | 4660 | msgid "Failed to parse ego information in `%s'\n" |
4661 | msgstr "Нисам успео да обрадим податке егоа у „%s“\n" | 4661 | msgstr "Нисам успео да обрадим податке егоа у „%s“\n" |
4662 | 4662 | ||
4663 | #: src/identity/gnunet-service-identity.c:977 | 4663 | #: src/identity/gnunet-service-identity.c:979 |
4664 | #, c-format | 4664 | #, c-format |
4665 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4665 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4666 | msgstr "" | 4666 | msgstr "" |
4667 | "Нисам успео да обрадим датотеку подешавања идентитета субсистема „%s“\n" | 4667 | "Нисам успео да обрадим датотеку подешавања идентитета субсистема „%s“\n" |
4668 | 4668 | ||
4669 | #: src/identity/gnunet-service-identity.c:986 | 4669 | #: src/identity/gnunet-service-identity.c:988 |
4670 | #, c-format | 4670 | #, c-format |
4671 | msgid "Failed to create directory `%s' for storing egos\n" | 4671 | msgid "Failed to create directory `%s' for storing egos\n" |
4672 | msgstr "Нисам успео да направим директоријум „%s“ за смештајне егое\n" | 4672 | msgstr "Нисам успео да направим директоријум „%s“ за смештајне егое\n" |
@@ -7,7 +7,7 @@ msgid "" | |||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: GNUnet 0.7.0b\n" | 8 | "Project-Id-Version: GNUnet 0.7.0b\n" |
9 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 9 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
10 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 10 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
11 | "PO-Revision-Date: 2006-01-21 17:16+0100\n" | 11 | "PO-Revision-Date: 2006-01-21 17:16+0100\n" |
12 | "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" | 12 | "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" |
13 | "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" | 13 | "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" |
@@ -4645,23 +4645,23 @@ msgstr "" | |||
4645 | msgid "Maintain egos" | 4645 | msgid "Maintain egos" |
4646 | msgstr "" | 4646 | msgstr "" |
4647 | 4647 | ||
4648 | #: src/identity/gnunet-service-identity.c:685 | 4648 | #: src/identity/gnunet-service-identity.c:687 |
4649 | #: src/identity/gnunet-service-identity.c:804 | 4649 | #: src/identity/gnunet-service-identity.c:806 |
4650 | #, fuzzy, c-format | 4650 | #, fuzzy, c-format |
4651 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4651 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4652 | msgstr "Misslyckades att läsa kompislista från \"%s\"\n" | 4652 | msgstr "Misslyckades att läsa kompislista från \"%s\"\n" |
4653 | 4653 | ||
4654 | #: src/identity/gnunet-service-identity.c:919 | 4654 | #: src/identity/gnunet-service-identity.c:921 |
4655 | #, fuzzy, c-format | 4655 | #, fuzzy, c-format |
4656 | msgid "Failed to parse ego information in `%s'\n" | 4656 | msgid "Failed to parse ego information in `%s'\n" |
4657 | msgstr "Misslyckades att läsa kompislista från \"%s\"\n" | 4657 | msgstr "Misslyckades att läsa kompislista från \"%s\"\n" |
4658 | 4658 | ||
4659 | #: src/identity/gnunet-service-identity.c:977 | 4659 | #: src/identity/gnunet-service-identity.c:979 |
4660 | #, fuzzy, c-format | 4660 | #, fuzzy, c-format |
4661 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4661 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4662 | msgstr "Kunde inte spara konfigurationsfil \"%s\":" | 4662 | msgstr "Kunde inte spara konfigurationsfil \"%s\":" |
4663 | 4663 | ||
4664 | #: src/identity/gnunet-service-identity.c:986 | 4664 | #: src/identity/gnunet-service-identity.c:988 |
4665 | #, fuzzy, c-format | 4665 | #, fuzzy, c-format |
4666 | msgid "Failed to create directory `%s' for storing egos\n" | 4666 | msgid "Failed to create directory `%s' for storing egos\n" |
4667 | msgstr "Misslyckades att läsa kompislista från \"%s\"\n" | 4667 | msgstr "Misslyckades att läsa kompislista från \"%s\"\n" |
@@ -7683,15 +7683,15 @@ msgstr "Testar transport(er) %s\n" | |||
7683 | #, fuzzy, c-format | 7683 | #, fuzzy, c-format |
7684 | msgid "Specific IPv4 address `%s' in configuration file is invalid!\n" | 7684 | msgid "Specific IPv4 address `%s' in configuration file is invalid!\n" |
7685 | msgstr "" | 7685 | msgstr "" |
7686 | "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion " | 7686 | "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion \"%s" |
7687 | "\"%s\".\n" | 7687 | "\".\n" |
7688 | 7688 | ||
7689 | #: src/transport/plugin_transport_http_server.c:3133 | 7689 | #: src/transport/plugin_transport_http_server.c:3133 |
7690 | #, fuzzy, c-format | 7690 | #, fuzzy, c-format |
7691 | msgid "Specific IPv6 address `%s' in configuration file is invalid!\n" | 7691 | msgid "Specific IPv6 address `%s' in configuration file is invalid!\n" |
7692 | msgstr "" | 7692 | msgstr "" |
7693 | "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion " | 7693 | "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion \"%s" |
7694 | "\"%s\".\n" | 7694 | "\".\n" |
7695 | 7695 | ||
7696 | #: src/transport/plugin_transport_http_server.c:3208 | 7696 | #: src/transport/plugin_transport_http_server.c:3208 |
7697 | #, fuzzy, c-format | 7697 | #, fuzzy, c-format |
@@ -9056,8 +9056,8 @@ msgid "" | |||
9056 | "Missing `%s' or numeric IP address for `%s' of `%s' in configuration, DNS " | 9056 | "Missing `%s' or numeric IP address for `%s' of `%s' in configuration, DNS " |
9057 | "resolution will be unavailable.\n" | 9057 | "resolution will be unavailable.\n" |
9058 | msgstr "" | 9058 | msgstr "" |
9059 | "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion " | 9059 | "Du måste ange ett positivt nummer för \"%s\" i konfigurationen i sektion \"%s" |
9060 | "\"%s\".\n" | 9060 | "\".\n" |
9061 | 9061 | ||
9062 | #: src/util/resolver_api.c:887 | 9062 | #: src/util/resolver_api.c:887 |
9063 | #, fuzzy, c-format | 9063 | #, fuzzy, c-format |
@@ -12391,8 +12391,8 @@ msgstr "Misslyckades att ansluta till gnunetd.\n" | |||
12391 | #~ msgstr "Kunde inte slå upp namnet för SMTP-server \"%s\": %s" | 12391 | #~ msgstr "Kunde inte slå upp namnet för SMTP-server \"%s\": %s" |
12392 | 12392 | ||
12393 | #~ msgid "" | 12393 | #~ msgid "" |
12394 | #~ "You must specify the name of a pipe for the SMTP transport in section " | 12394 | #~ "You must specify the name of a pipe for the SMTP transport in section `" |
12395 | #~ "`%s' under `%s'.\n" | 12395 | #~ "%s' under `%s'.\n" |
12396 | #~ msgstr "" | 12396 | #~ msgstr "" |
12397 | #~ "Du måste ange ett namn på röret för SMTP-transporten i sektion \"%s\" " | 12397 | #~ "Du måste ange ett namn på röret för SMTP-transporten i sektion \"%s\" " |
12398 | #~ "under \"%s\".\n" | 12398 | #~ "under \"%s\".\n" |
@@ -8,7 +8,7 @@ msgid "" | |||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: gnunet 0.8.0a\n" | 9 | "Project-Id-Version: gnunet 0.8.0a\n" |
10 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 10 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
11 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 11 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
12 | "PO-Revision-Date: 2008-09-10 22:05+0930\n" | 12 | "PO-Revision-Date: 2008-09-10 22:05+0930\n" |
13 | "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" | 13 | "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" |
14 | "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" | 14 | "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" |
@@ -4703,23 +4703,23 @@ msgstr "hiển thị giá trị tổng kiểm của tập tin" | |||
4703 | msgid "Maintain egos" | 4703 | msgid "Maintain egos" |
4704 | msgstr "" | 4704 | msgstr "" |
4705 | 4705 | ||
4706 | #: src/identity/gnunet-service-identity.c:685 | 4706 | #: src/identity/gnunet-service-identity.c:687 |
4707 | #: src/identity/gnunet-service-identity.c:804 | 4707 | #: src/identity/gnunet-service-identity.c:806 |
4708 | #, fuzzy, c-format | 4708 | #, fuzzy, c-format |
4709 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4709 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4710 | msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" | 4710 | msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" |
4711 | 4711 | ||
4712 | #: src/identity/gnunet-service-identity.c:919 | 4712 | #: src/identity/gnunet-service-identity.c:921 |
4713 | #, fuzzy, c-format | 4713 | #, fuzzy, c-format |
4714 | msgid "Failed to parse ego information in `%s'\n" | 4714 | msgid "Failed to parse ego information in `%s'\n" |
4715 | msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" | 4715 | msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" |
4716 | 4716 | ||
4717 | #: src/identity/gnunet-service-identity.c:977 | 4717 | #: src/identity/gnunet-service-identity.c:979 |
4718 | #, fuzzy, c-format | 4718 | #, fuzzy, c-format |
4719 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4719 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4720 | msgstr "Không thể lưu tập tin cấu hình « %s »:" | 4720 | msgstr "Không thể lưu tập tin cấu hình « %s »:" |
4721 | 4721 | ||
4722 | #: src/identity/gnunet-service-identity.c:986 | 4722 | #: src/identity/gnunet-service-identity.c:988 |
4723 | #, fuzzy, c-format | 4723 | #, fuzzy, c-format |
4724 | msgid "Failed to create directory `%s' for storing egos\n" | 4724 | msgid "Failed to create directory `%s' for storing egos\n" |
4725 | msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" | 4725 | msgstr "Lỗi đọc danh sách bạn bè từ « %s »\n" |
@@ -10829,8 +10829,8 @@ msgstr "Không kết nối được đến trình nền gnunetd." | |||
10829 | 10829 | ||
10830 | #, fuzzy | 10830 | #, fuzzy |
10831 | #~ msgid "" | 10831 | #~ msgid "" |
10832 | #~ "Syntax error in topology specification at offset %llu, skipping bytes " | 10832 | #~ "Syntax error in topology specification at offset %llu, skipping bytes `" |
10833 | #~ "`%s'.\n" | 10833 | #~ "%s'.\n" |
10834 | #~ msgstr "" | 10834 | #~ msgstr "" |
10835 | #~ "Lỗi cú pháp trong sự xác định địa hình học, đang bỏ qua các byte « %s ».\n" | 10835 | #~ "Lỗi cú pháp trong sự xác định địa hình học, đang bỏ qua các byte « %s ».\n" |
10836 | 10836 | ||
diff --git a/po/zh_CN.po b/po/zh_CN.po index 50e8fc217..576e6b0b7 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po | |||
@@ -7,7 +7,7 @@ msgid "" | |||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: gnunet-0.8.1\n" | 8 | "Project-Id-Version: gnunet-0.8.1\n" |
9 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" | 9 | "Report-Msgid-Bugs-To: gnunet-developers@mail.gnu.org\n" |
10 | "POT-Creation-Date: 2022-11-04 14:22+0900\n" | 10 | "POT-Creation-Date: 2022-11-14 08:54+0100\n" |
11 | "PO-Revision-Date: 2011-07-09 12:12+0800\n" | 11 | "PO-Revision-Date: 2011-07-09 12:12+0800\n" |
12 | "Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n" | 12 | "Last-Translator: Wylmer Wang <wantinghard@gmail.com>\n" |
13 | "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" | 13 | "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" |
@@ -4520,23 +4520,23 @@ msgstr "显示一个文件的散列值" | |||
4520 | msgid "Maintain egos" | 4520 | msgid "Maintain egos" |
4521 | msgstr "" | 4521 | msgstr "" |
4522 | 4522 | ||
4523 | #: src/identity/gnunet-service-identity.c:685 | 4523 | #: src/identity/gnunet-service-identity.c:687 |
4524 | #: src/identity/gnunet-service-identity.c:804 | 4524 | #: src/identity/gnunet-service-identity.c:806 |
4525 | #, fuzzy, c-format | 4525 | #, fuzzy, c-format |
4526 | msgid "Failed to write subsystem default identifier map to `%s'.\n" | 4526 | msgid "Failed to write subsystem default identifier map to `%s'.\n" |
4527 | msgstr "解析配置文件“%s”失败\n" | 4527 | msgstr "解析配置文件“%s”失败\n" |
4528 | 4528 | ||
4529 | #: src/identity/gnunet-service-identity.c:919 | 4529 | #: src/identity/gnunet-service-identity.c:921 |
4530 | #, fuzzy, c-format | 4530 | #, fuzzy, c-format |
4531 | msgid "Failed to parse ego information in `%s'\n" | 4531 | msgid "Failed to parse ego information in `%s'\n" |
4532 | msgstr "解析配置文件“%s”失败\n" | 4532 | msgstr "解析配置文件“%s”失败\n" |
4533 | 4533 | ||
4534 | #: src/identity/gnunet-service-identity.c:977 | 4534 | #: src/identity/gnunet-service-identity.c:979 |
4535 | #, fuzzy, c-format | 4535 | #, fuzzy, c-format |
4536 | msgid "Failed to parse subsystem identity configuration file `%s'\n" | 4536 | msgid "Failed to parse subsystem identity configuration file `%s'\n" |
4537 | msgstr "解析配置文件“%s”失败\n" | 4537 | msgstr "解析配置文件“%s”失败\n" |
4538 | 4538 | ||
4539 | #: src/identity/gnunet-service-identity.c:986 | 4539 | #: src/identity/gnunet-service-identity.c:988 |
4540 | #, fuzzy, c-format | 4540 | #, fuzzy, c-format |
4541 | msgid "Failed to create directory `%s' for storing egos\n" | 4541 | msgid "Failed to create directory `%s' for storing egos\n" |
4542 | msgstr "解析配置文件“%s”失败\n" | 4542 | msgstr "解析配置文件“%s”失败\n" |
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index 3d8ec2bac..56df4bfc7 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am | |||
@@ -273,7 +273,7 @@ endif | |||
273 | 273 | ||
274 | 274 | ||
275 | if ENABLE_TEST_RUN | 275 | if ENABLE_TEST_RUN |
276 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; $(MONKEY) | 276 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; |
277 | TESTS = \ | 277 | TESTS = \ |
278 | test_fs_directory \ | 278 | test_fs_directory \ |
279 | test_fs_download \ | 279 | test_fs_download \ |
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index d52c0e40d..4ea286b9f 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.h | |||
@@ -147,6 +147,39 @@ GNUNET_PQ_query_param_bool (bool b); | |||
147 | 147 | ||
148 | 148 | ||
149 | /** | 149 | /** |
150 | * Information for an array argument. | ||
151 | */ | ||
152 | struct GNUNET_PQ_ArraySpec | ||
153 | { | ||
154 | /** | ||
155 | * Number of dimensions of the array | ||
156 | */ | ||
157 | unsigned int ndims; | ||
158 | |||
159 | /** | ||
160 | * Array of @e ndims lengths of the array | ||
161 | */ | ||
162 | unsigned int *lens; | ||
163 | |||
164 | /** | ||
165 | * One-dimensional array of pointers to conversion functions for the | ||
166 | * elements in the array. | ||
167 | */ | ||
168 | const struct GNUNET_PQ_QueryParam *ae; | ||
169 | |||
170 | }; | ||
171 | |||
172 | |||
173 | /** | ||
174 | * Generate query parameter for an array. | ||
175 | * | ||
176 | * @param as array specification | ||
177 | */ | ||
178 | struct GNUNET_PQ_QueryParam | ||
179 | GNUNET_PQ_query_param_array (const struct GNUNET_PQ_ArraySpec *as); | ||
180 | |||
181 | |||
182 | /** | ||
150 | * Generate fixed-size query parameter with size determined | 183 | * Generate fixed-size query parameter with size determined |
151 | * by variable type. | 184 | * by variable type. |
152 | * | 185 | * |
diff --git a/src/pq/Makefile.am b/src/pq/Makefile.am index 013b20588..d4afe9232 100644 --- a/src/pq/Makefile.am +++ b/src/pq/Makefile.am | |||
@@ -5,6 +5,14 @@ if USE_COVERAGE | |||
5 | AM_CFLAGS = --coverage | 5 | AM_CFLAGS = --coverage |
6 | endif | 6 | endif |
7 | 7 | ||
8 | sqldir = $(prefix)/share/gnunet/sql/ | ||
9 | |||
10 | sql_DATA = \ | ||
11 | versioning.sql | ||
12 | |||
13 | EXTRA_DIST = \ | ||
14 | $(sql_DATA) | ||
15 | |||
8 | if HAVE_POSTGRESQL | 16 | if HAVE_POSTGRESQL |
9 | lib_LTLIBRARIES = libgnunetpq.la | 17 | lib_LTLIBRARIES = libgnunetpq.la |
10 | endif | 18 | endif |
@@ -27,6 +35,7 @@ libgnunetpq_la_LDFLAGS = \ | |||
27 | -version-info 3:0:0 | 35 | -version-info 3:0:0 |
28 | 36 | ||
29 | if ENABLE_TEST_RUN | 37 | if ENABLE_TEST_RUN |
38 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; | ||
30 | TESTS = \ | 39 | TESTS = \ |
31 | test_pq | 40 | test_pq |
32 | endif | 41 | endif |
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index a911bf8e1..e8617a5c9 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c | |||
@@ -352,6 +352,7 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) | |||
352 | PQsetNoticeProcessor (db->conn, | 352 | PQsetNoticeProcessor (db->conn, |
353 | &pq_notice_processor_cb, | 353 | &pq_notice_processor_cb, |
354 | db); | 354 | db); |
355 | if (NULL != db->load_path) | ||
355 | { | 356 | { |
356 | PGresult *res; | 357 | PGresult *res; |
357 | ExecStatusType est; | 358 | ExecStatusType est; |
@@ -414,6 +415,7 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) | |||
414 | { | 415 | { |
415 | PGresult *res; | 416 | PGresult *res; |
416 | 417 | ||
418 | GNUNET_assert (NULL != db->load_path); | ||
417 | res = PQprepare (db->conn, | 419 | res = PQprepare (db->conn, |
418 | "gnunet_pq_check_patch", | 420 | "gnunet_pq_check_patch", |
419 | "SELECT" | 421 | "SELECT" |
diff --git a/src/pq/pq_eval.c b/src/pq/pq_eval.c index 5f96ff884..cc16c7864 100644 --- a/src/pq/pq_eval.c +++ b/src/pq/pq_eval.c | |||
@@ -255,11 +255,11 @@ GNUNET_PQ_eval_prepared_multi_select (struct GNUNET_PQ_Context *db, | |||
255 | * codes to `enum GNUNET_DB_QueryStatus`. | 255 | * codes to `enum GNUNET_DB_QueryStatus`. |
256 | */ | 256 | */ |
257 | enum GNUNET_DB_QueryStatus | 257 | enum GNUNET_DB_QueryStatus |
258 | GNUNET_PQ_eval_prepared_singleton_select (struct GNUNET_PQ_Context *db, | 258 | GNUNET_PQ_eval_prepared_singleton_select ( |
259 | const char *statement_name, | 259 | struct GNUNET_PQ_Context *db, |
260 | const struct | 260 | const char *statement_name, |
261 | GNUNET_PQ_QueryParam *params, | 261 | const struct GNUNET_PQ_QueryParam *params, |
262 | struct GNUNET_PQ_ResultSpec *rs) | 262 | struct GNUNET_PQ_ResultSpec *rs) |
263 | { | 263 | { |
264 | PGresult *result; | 264 | PGresult *result; |
265 | enum GNUNET_DB_QueryStatus qs; | 265 | enum GNUNET_DB_QueryStatus qs; |
diff --git a/src/pq/versioning.sql b/src/pq/versioning.sql new file mode 100644 index 000000000..116f409b7 --- /dev/null +++ b/src/pq/versioning.sql | |||
@@ -0,0 +1,293 @@ | |||
1 | -- LICENSE AND COPYRIGHT | ||
2 | -- | ||
3 | -- Copyright (C) 2010 Hubert depesz Lubaczewski | ||
4 | -- | ||
5 | -- This program is distributed under the (Revised) BSD License: | ||
6 | -- L<http://www.opensource.org/licenses/bsd-license.php> | ||
7 | -- | ||
8 | -- Redistribution and use in source and binary forms, with or without | ||
9 | -- modification, are permitted provided that the following conditions | ||
10 | -- are met: | ||
11 | -- | ||
12 | -- * Redistributions of source code must retain the above copyright | ||
13 | -- notice, this list of conditions and the following disclaimer. | ||
14 | -- | ||
15 | -- * Redistributions in binary form must reproduce the above copyright | ||
16 | -- notice, this list of conditions and the following disclaimer in the | ||
17 | -- documentation and/or other materials provided with the distribution. | ||
18 | -- | ||
19 | -- * Neither the name of Hubert depesz Lubaczewski's Organization | ||
20 | -- nor the names of its contributors may be used to endorse or | ||
21 | -- promote products derived from this software without specific | ||
22 | -- prior written permission. | ||
23 | -- | ||
24 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
25 | -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
26 | -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
27 | -- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
28 | -- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
29 | -- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
30 | -- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
31 | -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
32 | -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
33 | -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
34 | -- | ||
35 | -- Code origin: https://gitlab.com/depesz/Versioning/blob/master/install.versioning.sql | ||
36 | -- | ||
37 | -- | ||
38 | -- # NAME | ||
39 | -- | ||
40 | -- **Versioning** - simplistic take on tracking and applying changes to databases. | ||
41 | -- | ||
42 | -- # DESCRIPTION | ||
43 | -- | ||
44 | -- This project strives to provide simple way to manage changes to | ||
45 | -- database. | ||
46 | -- | ||
47 | -- Instead of making changes on development server, then finding | ||
48 | -- differences between production and development, deciding which ones | ||
49 | -- should be installed on production, and finding a way to install them - | ||
50 | -- you start with writing diffs themselves! | ||
51 | -- | ||
52 | -- # INSTALLATION | ||
53 | -- | ||
54 | -- To install versioning simply run install.versioning.sql in your database | ||
55 | -- (all of them: production, stage, test, devel, ...). | ||
56 | -- | ||
57 | -- # USAGE | ||
58 | -- | ||
59 | -- In your files with patches to database, put whole logic in single | ||
60 | -- transaction, and use \_v.\* functions - usually \_v.register_patch() at | ||
61 | -- least to make sure everything is OK. | ||
62 | -- | ||
63 | -- For example. Let's assume you have patch files: | ||
64 | -- | ||
65 | -- ## 0001.sql: | ||
66 | -- | ||
67 | -- ``` | ||
68 | -- create table users (id serial primary key, username text); | ||
69 | -- ``` | ||
70 | -- | ||
71 | -- ## 0002.sql: | ||
72 | -- | ||
73 | -- ``` | ||
74 | -- insert into users (username) values ('depesz'); | ||
75 | -- ``` | ||
76 | -- To change it to use versioning you would change the files, to this | ||
77 | -- state: | ||
78 | -- | ||
79 | -- 0000.sql: | ||
80 | -- | ||
81 | -- ``` | ||
82 | -- BEGIN; | ||
83 | -- select _v.register_patch('000-base', NULL, NULL); | ||
84 | -- create table users (id serial primary key, username text); | ||
85 | -- COMMIT; | ||
86 | -- ``` | ||
87 | -- | ||
88 | -- ## 0002.sql: | ||
89 | -- | ||
90 | -- ``` | ||
91 | -- BEGIN; | ||
92 | -- select _v.register_patch('001-users', ARRAY['000-base'], NULL); | ||
93 | -- insert into users (username) values ('depesz'); | ||
94 | -- COMMIT; | ||
95 | -- ``` | ||
96 | -- | ||
97 | -- This will make sure that patch 001-users can only be applied after | ||
98 | -- 000-base. | ||
99 | -- | ||
100 | -- # AVAILABLE FUNCTIONS | ||
101 | -- | ||
102 | -- ## \_v.register_patch( TEXT ) | ||
103 | -- | ||
104 | -- Registers named patch, or dies if it is already registered. | ||
105 | -- | ||
106 | -- Returns integer which is id of patch in \_v.patches table - only if it | ||
107 | -- succeeded. | ||
108 | -- | ||
109 | -- ## \_v.register_patch( TEXT, TEXT[] ) | ||
110 | -- | ||
111 | -- Same as \_v.register_patch( TEXT ), but checks is all given patches (given as | ||
112 | -- array in second argument) are already registered. | ||
113 | -- | ||
114 | -- ## \_v.register_patch( TEXT, TEXT[], TEXT[] ) | ||
115 | -- | ||
116 | -- Same as \_v.register_patch( TEXT, TEXT[] ), but also checks if there are no conflicts with preexisting patches. | ||
117 | -- | ||
118 | -- Third argument is array of names of patches that conflict with current one. So | ||
119 | -- if any of them is installed - register_patch will error out. | ||
120 | -- | ||
121 | -- ## \_v.unregister_patch( TEXT ) | ||
122 | -- | ||
123 | -- Removes information about given patch from the versioning data. | ||
124 | -- | ||
125 | -- It doesn't remove objects that were created by this patch - just removes | ||
126 | -- metainformation. | ||
127 | -- | ||
128 | -- ## \_v.assert_user_is_superuser() | ||
129 | -- | ||
130 | -- Make sure that current patch is being loaded by superuser. | ||
131 | -- | ||
132 | -- If it's not - it will raise exception, and break transaction. | ||
133 | -- | ||
134 | -- ## \_v.assert_user_is_not_superuser() | ||
135 | -- | ||
136 | -- Make sure that current patch is not being loaded by superuser. | ||
137 | -- | ||
138 | -- If it is - it will raise exception, and break transaction. | ||
139 | -- | ||
140 | -- ## \_v.assert_user_is_one_of(TEXT, TEXT, ... ) | ||
141 | -- | ||
142 | -- Make sure that current patch is being loaded by one of listed users. | ||
143 | -- | ||
144 | -- If ```current_user``` is not listed as one of arguments - function will raise | ||
145 | -- exception and break the transaction. | ||
146 | |||
147 | BEGIN; | ||
148 | |||
149 | -- This file adds versioning support to database it will be loaded to. | ||
150 | -- It requires that PL/pgSQL is already loaded - will raise exception otherwise. | ||
151 | -- All versioning "stuff" (tables, functions) is in "_v" schema. | ||
152 | |||
153 | -- All functions are defined as 'RETURNS SETOF INT4' to be able to make them to RETURN literally nothing (0 rows). | ||
154 | -- >> RETURNS VOID<< IS similar, but it still outputs "empty line" in psql when calling. | ||
155 | CREATE SCHEMA IF NOT EXISTS _v; | ||
156 | COMMENT ON SCHEMA _v IS 'Schema for versioning data and functionality.'; | ||
157 | |||
158 | CREATE TABLE IF NOT EXISTS _v.patches ( | ||
159 | patch_name TEXT PRIMARY KEY, | ||
160 | applied_tsz TIMESTAMPTZ NOT NULL DEFAULT now(), | ||
161 | applied_by TEXT NOT NULL, | ||
162 | requires TEXT[], | ||
163 | conflicts TEXT[] | ||
164 | ); | ||
165 | COMMENT ON TABLE _v.patches IS 'Contains information about what patches are currently applied on database.'; | ||
166 | COMMENT ON COLUMN _v.patches.patch_name IS 'Name of patch, has to be unique for every patch.'; | ||
167 | COMMENT ON COLUMN _v.patches.applied_tsz IS 'When the patch was applied.'; | ||
168 | COMMENT ON COLUMN _v.patches.applied_by IS 'Who applied this patch (PostgreSQL username)'; | ||
169 | COMMENT ON COLUMN _v.patches.requires IS 'List of patches that are required for given patch.'; | ||
170 | COMMENT ON COLUMN _v.patches.conflicts IS 'List of patches that conflict with given patch.'; | ||
171 | |||
172 | CREATE OR REPLACE FUNCTION _v.register_patch( IN in_patch_name TEXT, IN in_requirements TEXT[], in_conflicts TEXT[], OUT versioning INT4 ) RETURNS setof INT4 AS $$ | ||
173 | DECLARE | ||
174 | t_text TEXT; | ||
175 | t_text_a TEXT[]; | ||
176 | i INT4; | ||
177 | BEGIN | ||
178 | -- Thanks to this we know only one patch will be applied at a time | ||
179 | LOCK TABLE _v.patches IN EXCLUSIVE MODE; | ||
180 | |||
181 | SELECT patch_name INTO t_text FROM _v.patches WHERE patch_name = in_patch_name; | ||
182 | IF FOUND THEN | ||
183 | RAISE EXCEPTION 'Patch % is already applied!', in_patch_name; | ||
184 | END IF; | ||
185 | |||
186 | t_text_a := ARRAY( SELECT patch_name FROM _v.patches WHERE patch_name = any( in_conflicts ) ); | ||
187 | IF array_upper( t_text_a, 1 ) IS NOT NULL THEN | ||
188 | RAISE EXCEPTION 'Versioning patches conflict. Conflicting patche(s) installed: %.', array_to_string( t_text_a, ', ' ); | ||
189 | END IF; | ||
190 | |||
191 | IF array_upper( in_requirements, 1 ) IS NOT NULL THEN | ||
192 | t_text_a := '{}'; | ||
193 | FOR i IN array_lower( in_requirements, 1 ) .. array_upper( in_requirements, 1 ) LOOP | ||
194 | SELECT patch_name INTO t_text FROM _v.patches WHERE patch_name = in_requirements[i]; | ||
195 | IF NOT FOUND THEN | ||
196 | t_text_a := t_text_a || in_requirements[i]; | ||
197 | END IF; | ||
198 | END LOOP; | ||
199 | IF array_upper( t_text_a, 1 ) IS NOT NULL THEN | ||
200 | RAISE EXCEPTION 'Missing prerequisite(s): %.', array_to_string( t_text_a, ', ' ); | ||
201 | END IF; | ||
202 | END IF; | ||
203 | |||
204 | INSERT INTO _v.patches (patch_name, applied_tsz, applied_by, requires, conflicts ) VALUES ( in_patch_name, now(), current_user, coalesce( in_requirements, '{}' ), coalesce( in_conflicts, '{}' ) ); | ||
205 | RETURN; | ||
206 | END; | ||
207 | $$ language plpgsql; | ||
208 | COMMENT ON FUNCTION _v.register_patch( TEXT, TEXT[], TEXT[] ) IS 'Function to register patches in database. Raises exception if there are conflicts, prerequisites are not installed or the migration has already been installed.'; | ||
209 | |||
210 | CREATE OR REPLACE FUNCTION _v.register_patch( TEXT, TEXT[] ) RETURNS setof INT4 AS $$ | ||
211 | SELECT _v.register_patch( $1, $2, NULL ); | ||
212 | $$ language sql; | ||
213 | COMMENT ON FUNCTION _v.register_patch( TEXT, TEXT[] ) IS 'Wrapper to allow registration of patches without conflicts.'; | ||
214 | CREATE OR REPLACE FUNCTION _v.register_patch( TEXT ) RETURNS setof INT4 AS $$ | ||
215 | SELECT _v.register_patch( $1, NULL, NULL ); | ||
216 | $$ language sql; | ||
217 | COMMENT ON FUNCTION _v.register_patch( TEXT ) IS 'Wrapper to allow registration of patches without requirements and conflicts.'; | ||
218 | |||
219 | CREATE OR REPLACE FUNCTION _v.unregister_patch( IN in_patch_name TEXT, OUT versioning INT4 ) RETURNS setof INT4 AS $$ | ||
220 | DECLARE | ||
221 | i INT4; | ||
222 | t_text_a TEXT[]; | ||
223 | BEGIN | ||
224 | -- Thanks to this we know only one patch will be applied at a time | ||
225 | LOCK TABLE _v.patches IN EXCLUSIVE MODE; | ||
226 | |||
227 | t_text_a := ARRAY( SELECT patch_name FROM _v.patches WHERE in_patch_name = ANY( requires ) ); | ||
228 | IF array_upper( t_text_a, 1 ) IS NOT NULL THEN | ||
229 | RAISE EXCEPTION 'Cannot uninstall %, as it is required by: %.', in_patch_name, array_to_string( t_text_a, ', ' ); | ||
230 | END IF; | ||
231 | |||
232 | DELETE FROM _v.patches WHERE patch_name = in_patch_name; | ||
233 | GET DIAGNOSTICS i = ROW_COUNT; | ||
234 | IF i < 1 THEN | ||
235 | RAISE EXCEPTION 'Patch % is not installed, so it can''t be uninstalled!', in_patch_name; | ||
236 | END IF; | ||
237 | |||
238 | RETURN; | ||
239 | END; | ||
240 | $$ language plpgsql; | ||
241 | COMMENT ON FUNCTION _v.unregister_patch( TEXT ) IS 'Function to unregister patches in database. Dies if the patch is not registered, or if unregistering it would break dependencies.'; | ||
242 | |||
243 | CREATE OR REPLACE FUNCTION _v.assert_patch_is_applied( IN in_patch_name TEXT ) RETURNS TEXT as $$ | ||
244 | DECLARE | ||
245 | t_text TEXT; | ||
246 | BEGIN | ||
247 | SELECT patch_name INTO t_text FROM _v.patches WHERE patch_name = in_patch_name; | ||
248 | IF NOT FOUND THEN | ||
249 | RAISE EXCEPTION 'Patch % is not applied!', in_patch_name; | ||
250 | END IF; | ||
251 | RETURN format('Patch %s is applied.', in_patch_name); | ||
252 | END; | ||
253 | $$ language plpgsql; | ||
254 | COMMENT ON FUNCTION _v.assert_patch_is_applied( TEXT ) IS 'Function that can be used to make sure that patch has been applied.'; | ||
255 | |||
256 | CREATE OR REPLACE FUNCTION _v.assert_user_is_superuser() RETURNS TEXT as $$ | ||
257 | DECLARE | ||
258 | v_super bool; | ||
259 | BEGIN | ||
260 | SELECT usesuper INTO v_super FROM pg_user WHERE usename = current_user; | ||
261 | IF v_super THEN | ||
262 | RETURN 'assert_user_is_superuser: OK'; | ||
263 | END IF; | ||
264 | RAISE EXCEPTION 'Current user is not superuser - cannot continue.'; | ||
265 | END; | ||
266 | $$ language plpgsql; | ||
267 | COMMENT ON FUNCTION _v.assert_user_is_superuser() IS 'Function that can be used to make sure that patch is being applied using superuser account.'; | ||
268 | |||
269 | CREATE OR REPLACE FUNCTION _v.assert_user_is_not_superuser() RETURNS TEXT as $$ | ||
270 | DECLARE | ||
271 | v_super bool; | ||
272 | BEGIN | ||
273 | SELECT usesuper INTO v_super FROM pg_user WHERE usename = current_user; | ||
274 | IF v_super THEN | ||
275 | RAISE EXCEPTION 'Current user is superuser - cannot continue.'; | ||
276 | END IF; | ||
277 | RETURN 'assert_user_is_not_superuser: OK'; | ||
278 | END; | ||
279 | $$ language plpgsql; | ||
280 | COMMENT ON FUNCTION _v.assert_user_is_not_superuser() IS 'Function that can be used to make sure that patch is being applied using normal (not superuser) account.'; | ||
281 | |||
282 | CREATE OR REPLACE FUNCTION _v.assert_user_is_one_of(VARIADIC p_acceptable_users TEXT[] ) RETURNS TEXT as $$ | ||
283 | DECLARE | ||
284 | BEGIN | ||
285 | IF current_user = any( p_acceptable_users ) THEN | ||
286 | RETURN 'assert_user_is_one_of: OK'; | ||
287 | END IF; | ||
288 | RAISE EXCEPTION 'User is not one of: % - cannot continue.', p_acceptable_users; | ||
289 | END; | ||
290 | $$ language plpgsql; | ||
291 | COMMENT ON FUNCTION _v.assert_user_is_one_of(TEXT[]) IS 'Function that can be used to make sure that patch is being applied by one of defined users.'; | ||
292 | |||
293 | COMMIT; | ||
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c index a2ffdb543..8b0449d4b 100644 --- a/src/util/crypto_crc.c +++ b/src/util/crypto_crc.c | |||
@@ -56,18 +56,17 @@ static void | |||
56 | crc_init () | 56 | crc_init () |
57 | { | 57 | { |
58 | static int once; | 58 | static int once; |
59 | unsigned int i, j; | ||
60 | GNUNET_uLong h = 1; | 59 | GNUNET_uLong h = 1; |
61 | 60 | ||
62 | if (once) | 61 | if (once) |
63 | return; | 62 | return; |
64 | once = 1; | 63 | once = 1; |
65 | crc_table[0] = 0; | 64 | crc_table[0] = 0; |
66 | for (i = 128; i; i >>= 1) | 65 | for (unsigned int i = 128; i; i >>= 1) |
67 | { | 66 | { |
68 | h = (h >> 1) ^ ((h & 1) ? POLYNOMIAL : 0); | 67 | h = (h >> 1) ^ ((h & 1) ? POLYNOMIAL : 0); |
69 | /* h is now crc_table[i] */ | 68 | /* h is now crc_table[i] */ |
70 | for (j = 0; j < 256; j += 2 * i) | 69 | for (unsigned int j = 0; j < 256; j += 2 * i) |
71 | crc_table[i + j] = crc_table[j] ^ h; | 70 | crc_table[i + j] = crc_table[j] ^ h; |
72 | } | 71 | } |
73 | } | 72 | } |